On 25.05.20 18:04, Martin Lucina wrote:
Hi,

I'm trying to bootstrap a new PVH-only Xen domU OS "from scratch", to
replace our existing use of Mini-OS for the early boot/low-level support
layer in MirageOS. I've done this by creating new Xen bindings for Solo5
[1], basing them on our existing virtio code [2].

Unfortunately, I can't seem to get past the first few instructions on VCPU
boot. Here's what I have at the moment (abridged):

     .section .note.solo5.xen

             .align  4
             .long   4
             .long   4
             .long   XEN_ELFNOTE_PHYS32_ENTRY
             .ascii "Xen\0"
             .long   _start32

     /* ... */

     .code32

     ENTRY(_start32)
             cld

             lgdt (gdt64_ptr)
             ljmp $0x10, $1f

You need to setup virtual addressing and enable 64 bit mode before using
64-bit GDT.

See Mini-OS source arch/x86/x86_hvm.S


Juergen

Reply via email to