]> Git Repo - qemu.git/commitdiff
hw/arm/virt: add DT property /secure-chosen/stdout-path indicating secure UART
authorJerome Forissier <[email protected]>
Fri, 5 Oct 2018 08:07:29 +0000 (10:07 +0200)
committerPeter Maydell <[email protected]>
Tue, 16 Oct 2018 15:15:01 +0000 (16:15 +0100)
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 <[email protected]>
Message-id: 20181005080729[email protected]
Reviewed-by: Peter Maydell <[email protected]>
[PMM: commit message tweak]
Signed-off-by: Peter Maydell <[email protected]>
hw/arm/virt.c

index 96dd4ef10c50e5e1ef1689858768ec6403fc8391..9f677825f9fa1ac5a033128c1034db30a70b7bad 100644 (file)
@@ -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);
This page took 0.029941 seconds and 4 git commands to generate.