[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv4 30/43] plat/kvm: Initialize device tree for Arm64
Arm64 entry code passed the base address of device tree to _libkvmplat_start. We will check the device tree header and then save the address for further usage. Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- plat/kvm/arm/setup.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plat/kvm/arm/setup.c b/plat/kvm/arm/setup.c index a5581b7..892a0a9 100644 --- a/plat/kvm/arm/setup.c +++ b/plat/kvm/arm/setup.c @@ -36,6 +36,19 @@ #include <uk/assert.h> #include <uk/essentials.h> +void *_libkvmplat_dtb; + +static void _init_dtb(void *dtb_pointer) +{ + int ret; + + if ((ret = fdt_check_header(dtb_pointer))) + UK_CRASH("Invalid DTB: %s\n", fdt_strerror(ret)); + + _libkvmplat_dtb = dtb_pointer; + uk_printd(DLVL_INFO, "Found device tree on: %p\n", dtb_pointer); +} + static void _init_cpufeatures(void) { /* TODO */ @@ -43,6 +56,7 @@ static void _init_cpufeatures(void) void _libkvmplat_start(void *dtb_pointer) { + _init_dtb(dtb_pointer); _init_cpufeatures(); _libkvmplat_init_console(); -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |