|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCHv4 32/43] plat/kvm: Parse memory info from device tree for Arm64
Hi Wei, On 06/07/18 10:03, Wei Chen wrote: QEMU/KVM will store the memory informations like memory region, memory base address and memory size to device tree. We parse these informations for memory allocater and s/allocater/allocator/Also, this code does not seem very KVM specific. Might be worth thinking to move it in the common code at some point. new stack setting. Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- plat/kvm/arm/setup.c | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/plat/kvm/arm/setup.c b/plat/kvm/arm/setup.c index a881152..685308c 100644 --- a/plat/kvm/arm/setup.c +++ b/plat/kvm/arm/setup.c @@ -35,10 +35,15 @@ #include <uk/plat/console.h> #include <uk/assert.h> #include <uk/essentials.h> +#include <arm/cpu_defs.h>#define MAX_CMDLINE_SIZE 1024static char cmdline[MAX_CMDLINE_SIZE];+void *_libkvmplat_pagetable;+void *_libkvmplat_heap_start; +void *_libkvmplat_stack_top; +void *_libkvmplat_mem_end; void *_libkvmplat_dtb;static void _init_dtb(void *dtb_pointer) Why do you put _ in front of the function name? AFAIK, the name prefixed with _ will be reserved for the compiler/libc. address-cells and size-cells may not be 2 for your platform. As for the PL011, it feels like you want to provide wrapper for reading range in the DT. So you are only supported one bank here. It would be nice to at least write that assumption in the code and commit message. A warning would also be a nice addition if the user specifies more than 1 bank.
Cheers, -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |