diff mbox series

[PULL,01/19] hw/arm/virt: add DT property /secure-chosen/stdout-path indicating secure UART

Message ID 20181016152325.31367-2-peter.maydell@linaro.org
State Accepted
Commit fb23d693a3e0f22c25fdc2f373ac81d9cbb26680
Headers show
Series target-arm queue | expand

Commit Message

Peter Maydell Oct. 16, 2018, 3:23 p.m. UTC
From: Jerome Forissier <jerome.forissier@linaro.org>


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].
They've now been officially agreed on, so we can implement them
in QEMU.

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

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>

Message-id: 20181005080729.6480-1-jerome.forissier@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

[PMM: commit message tweak]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 hw/arm/virt.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.19.0
diff mbox series

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 96dd4ef10c5..9f677825f9f 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -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);