Date: Wed, 3 Apr 2019 21:25:52 -0600 From: Rebecca Cran <rebecca@bluestop.org> To: freebsd-virtualization@freebsd.org Subject: Bhyve with UEFI edk2-stable201903 and CSM support - debugging the crash Message-ID: <9927beac-92cd-1059-298d-b7ffd9f34a42@bluestop.org>
next in thread | raw e-mail | index | archive | help
I've spent some time trying to figure out where and why the UEFI 2.70 firmware is crashing when built with CSM support under Bhyve. The first thing I noticed is that the code that builds the E820 table doesn't appear to be finding the location of the EBDA at 0x40E: the first entry should be something like 0x0 to 0x4cf00, but is 0-0 instead. E820[ 0]: 0x 0 ---- 0x 0, Type = 0x1 E820[ 1]: 0x 0 ---- 0x A0000, Type = 0x2 E820[ 2]: 0x E0000 ---- 0x 100000, Type = 0x2 E820[ 3]: 0x 100000 ---- 0x 406000, Type = 0x1 ... As an aside, I'm working on a patch to submit upstream to fix the output so it pads with zeros instead of spaces. I've also found that as was probably pretty obvious the system is crashing when trying to call into the CSM to initialize it. It gets as far as calling AsmThunk16 (AsmThunk.nasm), but never appears to reach CsmMain in BhyveCsm16.c. I'll see if I can work on it some more to narrow down the error. Another thing: the GNUmakefile in OvmfPkg/Csm/BhyveCsm16 has "CC ?= gcc", but it appears the build system already sets CC to "cc", which uses the system's clang compiler, which can't compile the assembly code. I don't know if we might want to either hard-code CC to "gcc" for now, or have users create a 'cc' symlinks in BaseTools/Bin/FreeBSD-amd64 ? -- Rebecca Cran
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9927beac-92cd-1059-298d-b7ffd9f34a42>