hw/arm/virt: add DT property /secure-chosen/sdtout-path being secure UART
PATCH 1/1 hw/arm/virt: add DT property /secure-chosen/sdtout-path being secure UART
Bindings for /secure-chosen and /secure-chosen/stdout-path have been proposed 1.5 years ago [1] and implemented in OP-TEE at the same time [2].
This patch creates the property when the machine is secure.
[1] https://patchwork.kernel.org/patch/9602401/
[2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544a
--- hw/arm/virt.c | 4 ++++ 1 file changed, 4 insertions(+)
hw/arm/virt.c +4 -0
@@ -712,6 +712,10 @@ static void create_uart(const VirtMachineState *vms, qemu_irq *pic, int uart,/* Mark as not usable by the normal world */ qemu_fdt_setprop_string (vms->fdt, nodename,"status" ,"disabled" );qemu_fdt_setprop_string (vms->fdt, nodename,"secure-status" ,"okay" ); + +qemu_fdt_add_subnode (vms->fdt,"/secure-chosen" ); +qemu_fdt_setprop_string (vms->fdt,"/secure-chosen" ,"stdout-path" , + nodename); }g_free (nodename);
Signature · 1 line
2.15.1
Quoted 9 lines · Jerome Forissier
Bindings for /secure-chosen and /secure-chosen/stdout-path have been proposed 1.5 years ago [1] and implemented in OP-TEE at the same time [2].
This patch creates the property when the machine is secure.
[1] https://patchwork.kernel.org/patch/9602401/
[2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544aSigned-off-by Jerome Forissier <[email protected]>
The patch seems OK, but it looks like the DT bindings are not upstream yet? [*] I wouldn't want QEMU to start creating bindings until the spec is definitely final.
[*] they're not in
https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/secure.txt
anyway; is that the wrong place to look?
thanks
-- PMM
+CC: Rob Herring
Quoted 7 lines · Peter Maydell
Quoted 5 lines · Jerome Forissier
Bindings for /secure-chosen and /secure-chosen/stdout-path have been proposed 1.5 years ago [1] and implemented in OP-TEE at the same time [2].
This patch creates the property when the machine is secure.
Quoted 7 lines
Quoted 4 lines
[1] https://patchwork.kernel.org/patch/9602401/
[2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544aSigned-off-by Jerome Forissier <[email protected]>The patch seems OK, but it looks like the DT bindings are not upstream yet? [*]
No, they're not.
I wouldn't want QEMU to start creating
Quoted 1 line
bindings until the spec is definitely final.
I understand, but I think we may have a chicken-and-egg problem, because Rob said he'd like to see more usage of DT in secure world before merging the bindings ;-)
That being said, I can certainly re-submit the binding to the LKML. Rob, what do you say?
Quoted 8 lines
[*] they're not in
https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/secure.txt
anyway; is that the wrong place to look?thanks
-- PMM
Thanks,
Signature · 1 line
Jerome
Hi Peter,
Quoted 13 lines · Jerome Forissier
+CC: Rob Herring
Quoted 10 lines · Peter Maydell
Quoted 8 lines · Jerome Forissier
Bindings for /secure-chosen and /secure-chosen/stdout-path have been proposed 1.5 years ago [1] and implemented in OP-TEE at the same time [2].
This patch creates the property when the machine is secure.
[1] https://patchwork.kernel.org/patch/9602401/
[2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544a
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Jerome Forissier <[email protected]>The patch seems OK, but it looks like the DT bindings are not upstream yet? [*]
No, they're not.
Update: Rob has now accepted the bindings [3] (thanks!).
[3] http://patchwork.ozlabs.org/patch/980467/#2009642
Signature · 1 line
Jerome
Quoted 22 lines
I wouldn't want QEMU to start creating
Quoted 1 line
bindings until the spec is definitely final.
I understand, but I think we may have a chicken-and-egg problem, because Rob said he'd like to see more usage of DT in secure world before merging the bindings ;-)
That being said, I can certainly re-submit the binding to the LKML. Rob, what do you say?
Quoted 8 lines
[*] they're not in
https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/secure.txt
anyway; is that the wrong place to look?thanks
-- PMMThanks,
Quoted 16 lines · Jerome Forissier
Hi Peter,
Quoted 13 lines · Jerome Forissier
+CC: Rob Herring
Quoted 10 lines · Peter Maydell
Quoted 8 lines · Jerome Forissier
Bindings for /secure-chosen and /secure-chosen/stdout-path have been proposed 1.5 years ago [1] and implemented in OP-TEE at the same time [2].
This patch creates the property when the machine is secure.
[1] https://patchwork.kernel.org/patch/9602401/
[2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544a
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Jerome Forissier <[email protected]>The patch seems OK, but it looks like the DT bindings are not upstream yet? [*]
No, they're not.
Update: Rob has now accepted the bindings [3] (thanks!).
OK; I've applied the QEMU patch to my target-arm.next branch.
thanks
-- PMM