2014-05-13 17:56 GMT+02:00 Laszlo Ersek <ler...@redhat.com>: > On 05/13/14 16:55, Ludovic Rousseau wrote: >> 2014-05-13 16:24 GMT+02:00 Laszlo Ersek <ler...@redhat.com>: > >>> Please rebuild your gnu-efi installation with the attached patch, and >>> retest your app. >> >> I still get a crash but with a different message in serial.log >> FS0:\> debug1 >> a >> b >> !!!! X64 Exception Type - 000000000000000D CPU Apic ID - 00000000 !!!! >> RIP - 0000000007DCE98B, CS - 0000000000000028, RFLAGS - 0000000000000282 >> ExceptionData - 0000000000000000 >> RAX - C9F0458B48685089, RCX - C9F0458B48685089, RDX - 0000000000000000 >> RBX - 0000000080000000, RSP - 0000000007F94520, RBP - 0000000007F94560 >> RSI - 000000000000000E, RDI - 0000000007DD0C30 >> R8 - 0000000000000000, R9 - 0000000007F93F07, R10 - 0000000006D86DBA >> R11 - 0000000000000040, R12 - 0000000000000000, R13 - 0000000000000000 >> R14 - 0000000000000000, R15 - 0000000000000000 >> DS - 0000000000000008, ES - 0000000000000008, FS - 0000000000000008 >> GS - 0000000000000008, SS - 0000000000000008 >> CR0 - 0000000080000033, CR2 - 0000000000000000, CR3 - 0000000007F33000 >> CR4 - 0000000000000668, CR8 - 0000000000000000 >> DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000 >> DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400 >> GDTR - 0000000007F1ED98 000000000000003F, LDTR - 0000000000000000 >> IDTR - 000000000747F018 0000000000000FFF, TR - 0000000000000000 >> FXSAVE_STATE - 0000000007F94180 >> !!!! Find PE image >> /home/jljusten/tmp/edk2/Build/OvmfX64/RELEASE_GCC47/X64/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe/DEBUG/ConSplitterDxe.dll >> (ImageBase=0000000007DC9000, EntryPoint=0000000007DC92AF) !!!! >> >> I do not see the "D_ERROR" log message any more. The crash now occurs >> _before_ the debug message is displayed. >> >> Another suggestion? > > Ah, certainly. This tells us that the DEBUG() call actually succeeded. > Internally, it probably attempted to write some data (your debug > message) to the console. > > The register dump itself comes from > "UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c". > Exception type 0xD seems to be EXCEPT_X64_GP_FAULT > [MdePkg/Include/Protocol/DebugSupport.h]. > > The console output is split (duplicated) by ConSplitterDxe to the > graphics window and the serial console. gnu-efi might be doing something > in DbgPrint that makes ConSplitterDxe dereference a bad pointer. > > I'd recommend digging into DbgPrint to see where exactly it triggers this. > > In addition, if you can reproduce this crash with a OVMF binary that you > build yourself (preferably from a fresh checkout), then you'll have the > "ConSplitterDxe.dll" file available (referenced above). > > That should help you locate the crash in ConSplitterDxe; see eg. > <http://thread.gmane.org/gmane.comp.bios.tianocore.devel/5187/focus=5193>. > (Search it for "X64 Exception Type".)
I rebuild OVMF from edk2 svn revision 15536 and used it in qemu. With a unmodified gnu-efi 3.0i I do not get a crash but the progam hangs after: FS0:\> debug1 a b With-efi 3.0v I get a crash before any display, even the first Print(): FS0:\> debug1 !!!! X64 Exception Type - 000000000000000E CPU Apic ID - 00000000 !!!! RIP - 00000000061FB009, CS - 0000000000000028, RFLAGS - 0000000000000246 ExceptionData - 0000000000000000 RAX - 0000000000000000, RCX - 00000000061FC000, RDX - 000000000000000F RBX - 0000000006258DA0, RSP - 0000000007F6A5B8, RBP - FFFFFFFFFFFFFFFF RSI - 0000000007F6A6C0, RDI - 0000000000003480 R8 - 0000000000000000, R9 - 0000000007F6A6C0, R10 - 0000000000000068 R11 - 0000000000000012, R12 - 0000000007F6A6C0, R13 - FFFFFFFFFFFFFFFF R14 - 0000000000000000, R15 - 00000000061FC000 DS - 0000000000000008, ES - 0000000000000008, FS - 0000000000000008 GS - 0000000000000008, SS - 0000000000000008 CR0 - 0000000080000033, CR2 - FFFFFFFFAFAFE42F, CR3 - 0000000007F09000 CR4 - 0000000000000668, CR8 - 0000000000000000 DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000 DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400 GDTR - 0000000007EF2D98 000000000000003F, LDTR - 0000000000000000 IDTR - 0000000007C1E018 0000000000000FFF, TR - 0000000000000000 FXSAVE_STATE - 0000000007F6A210 !!!! Find PE image (No PDB) (ImageBase=00000000061F3000, EntryPoint=00000000061F6000) !!!! I tried to rebuild gnu-efi latest git version (commit 644898eabc06c8efaa3aa54f84cdd468960a2f6c) but the build fails with a compiler internal compiler error. I reported the bug at https://sourceforge.net/p/gnu-efi/bugs/7/ So for now I have to use gnu-efi 3.0i and I can't use DEBUG(). I will try to use edk2 to build a helloworld program. Bye -- Dr. Ludovic Rousseau ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel