On 01/16/14 09:01, Gary Ching-Pang Lin wrote: > On Wed, Jan 15, 2014 at 02:03:02PM +0100, Laszlo Ersek wrote: >> On 01/15/14 07:31, Gary Ching-Pang Lin wrote: >>> Hi, >>> >>> I recently started to build OVMF on my openSUSE 13.1 box and found the >>> secure boot config menu went blank. After several tests, the root >>> cause is identified: >>> >>> https://sourceware.org/git/?p=glibc.git;a=commit;h=2d48b41c8fa610067c4d664ac2339ae6ca43e78c >>> >>> This glibc commit is included in glibc 2.18 and introduces a faster >>> memcpy which somehow breaks the sb config menu. >>> >>> The known affected system: openSUSE 13.1 and fedora 20 > > It turned out the problem is caused by VfrCompile + glibc 2.18. > I built the programs in BaseTools/Source/C static-linked with glibc 2.17 > and replaced the binaries in BaseTools/Source/C/bin, and the OVMF image that > is built with static-linked VfrCompile showed the secure boot menu as > expected. So, either the glibc commit is buggy, or some black magic in new > gcc/glibc causes the problem. > >> >> That glibc commit seems to be full of SSE code. >> >> For reference, please see the following OVMF commit: >> >> https://github.com/tianocore/edk2/commit/4a8266f5 >> >> Apparently the glibc code (or maybe a gcc intrinsic?) "leaks" into the >> OVMF build. This should never happen. >> >> We need to find the offending code in OVMF. I have no better idea than: >> >> Please locate the EFI file corresponding to the secure boot config form >> (I think it's called SecureBootConfigDxe.efi) in your Build directory. >> Then please run "objdump -S" on it, and try to find any SSE instructions >> (like movdqu) and cross-reference them with the C source. > I didn't find any SSE instruction in the dumped assembly code, so we can > rule out this case.
Very interesting, thanks for following up. Apparently glibc-2.18 has some code that, when built into VfrCompile, causes VfrCompile to mis-compile the "OvmfPkg/SecureBootConfigDxe/SecureBootConfig.vfr" file (Visual Forms Representation). And then the form display engine cannot work with the output (IFR, Internal Forms Representation). I think it might be interesting to compare the two versions of the IFR files, and check their differences against the VFR spec. If you post the two IFRs then maybe the VfrCompile and form display engine maintainers could help. I think the following two files are interesting, per build: - Build/OvmfX64/DEBUG_GCC48/X64/OvmfPkg/SecureBootConfigDxe/SecureBootConfigDxe/DEBUG/SecureBootConfig.c - Build/OvmfX64/DEBUG_GCC48/X64/OvmfPkg/SecureBootConfigDxe/SecureBootConfigDxe/DEBUG/SecureBootConfig.lst (If these turn out to be identical between the two glibc versions, then maybe the generated SecureBootConfig.c file is compiled to different binaries, dependent on the glibc version. It would be quite strange, because this C file contains nothing but a huge byte array.) Thanks Laszlo ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel