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

Re: [Xen-devel] strange behavior with Multiboot2 on EFI



On Fri, Jun 15, 2018 at 10:06:15AM +0200, Roger Pau Monné wrote:
> Adding Daniel Kiper.
>
> On Wed, Jun 13, 2018 at 02:09:45AM +0300, Kristaps Čivkulis wrote:
> > 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]
>
> Daniel, ISTR that you used QEMU + OVMF in order to develop multiboot2
> support for Xen, do you happen to know if a specific OVMF or QEMU
> version is needed to get this working?
>
> Kristaps is trying to get Xen/EFI to boot using OVMF and multiboot2,
> but that doesn't seem to work (at least with the versions he is
> testing with).

A few suggestions:
  - increase memory to 4 GiB at least;
    IIRC Xen has some difficulties when it runs
    on machine with 2 GiB of RAM or less; sadly
    I do not remember the reason,
  - setup serial console,
  - use the latest QEMU; at least stable one,
  - disable virtualization extensions; in general
    OVMF works with them but in strange cases it
    is worth checking even that thing,
  - OVMF outputs debug stuff to 0x402 port;
    README from OVMF package is your friend;
    in general I would suggest to read all
    stuff in it.

If above does not help drop me a line.

Daniel

_______________________________________________
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®.