[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] strange behavior with Multiboot2 on EFI



Hello,

I am implementing Multiboot2 support for FreeBSD loader to load Xen
kernel. Currently I pass EFI 64-bit system table pointer tag, EFI boot
services not terminated tag, EFI 64-bit image handle pointer tag and
Image load base physical address tag.

The problem is, Xen kernel gets stuck into infinite loop at address
near 0x7fa419be without printing anything. System table is at
0x7fbee018 and image handle is at 0x7f22fd98. If I debugged correctly,
it got into infinite loop after first time calling void
efi_console_set_mode(void) [0] because it didn't return from it.

Note that if I don't pass EFI 64-bit system table pointer tag, boot
services not terminated tag or 64-bit image handle pointer tag then
Xen kernel correctly prints error message!

Is this behavior intended? If not, where could be a problem?

I compiled Xen kernel on FreeBSD with this command:

# gmake -j4 xen clang=y LD=/usr/local/bin/ld CC="cc -B/usr/local/bin" \
  NM=/usr/local/bin/nm

and I test with this command:

$ qemu-system-x86_64 -m 2048 -bios OVMF-pure-efi.fd -hda test_disk.img

OVMF-pure-efi.fd is taken from
edk2.git-ovmf-x64-0-20180612.155.g5a56c04939.noarch.rpm at [1]

I also tried to load Xen kernel bare-metal with Grub2. I added
following lines to /boot/grub/grub.cfg:

menuentry 'xen' {
    set root='hd0,gpt1'
    multiboot2 /xen
}

and after launching Xen it also didn't print anything.


Thanks, Kristaps.

[0] 
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/common/efi/boot.c;h=64d12685d35747d3734c1ad8ac27634e83bcf7db;hb=HEAD#l697
[1] https://www.kraxel.org/repos/jenkins/edk2/

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.