|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCHv4 21/43] plat/kvm: Add Arm64 basic entry code
Hi, On 07/06/2018 10:03 AM, Wei Chen wrote: Can you clarify why you are using the ELF format and not Image? My main concern is the former does not seem to have a clear description of the state of the VM at boot.QEMU/KVM can boot an Arm64 elf image without multiboot. In this case, we can plage _libkvmplat_entry to entry64.S directly as the vCPU reset entry. In this basic entry code, we just initialize the boot stack and prepare jumping to _libkvmplat_start. For instance, it is not clear what is the state of the cache, SCTLR... You also assume the MMU is turned on. Do you have a pointer on what is the expected state at boot? This would be quite useful to review the boot code. Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- plat/kvm/arm/entry64.S | 36 ++++++++++++++++++++++++++++++ plat/kvm/arm/setup.c | 50 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 plat/kvm/arm/entry64.S create mode 100644 plat/kvm/arm/setup.c diff --git a/plat/kvm/arm/entry64.S b/plat/kvm/arm/entry64.S new file mode 100644 index 0000000..8a8a2e0 --- /dev/null +++ b/plat/kvm/arm/entry64.S @@ -0,0 +1,36 @@ +#include <uk/arch/limits.h> +#include <arm/cpu_defs.h> + +.data +.globl _dtb + +#define BOOT_STACK_SIZE PAGE_SIZE + +/* + * The registers used by _libkvmplat_start: + * x0 - FDT pointer + */ + +.text +ENTRY(_libkvmplat_entry) + /* Boot stack is placed after pagetable area temporarily */ + ldr x26, =_end + add x26, x26, #PAGE_TABLE_SIZE + add x27, x26, #BOOT_STACK_SIZE + + /* Clean the boot stack */ +1: + stp xzr, xzr, [x26], #16 + stp xzr, xzr, [x26], #16 + stp xzr, xzr, [x26], #16 + stp xzr, xzr, [x26], #16 I guess you expect the stack to be 64-byte aligned? If so, It would be nice to write it down in a comment. How about adding this function in the patch filling the body? 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 |