On Mon, May 19, 2014 at 7:00 PM, Fan, Jeff <jeff....@intel.com> wrote:
> X64 Exception Type - 000000000000000E     means Page Fault exception
> RIP  - 0000000006BA58DE                                 means in 
> MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe. 
> (ImageBase=0000000006B9F000)
> CR2 - FFFFFFFFFFFFFFF0                                     means Page Fault 
> exception occurred at address 0xFFFFFFFFFFFFFFF0
>
> So, the code in ConsplitterDxe try to access 0xFFFFFFFFFFFFFFF0 that is 
> invalid address without page table entry.  Maybe Some memory is crashed.
>
> In general, DEBUG does not involve ConsplitterDxe. But Print() does involve 
> ConspliteterDxe to print message on console devices.
>
> You may try comment all Print() and only test DEBUG to see if it could work 
> well.
>
>        // Print(L"a\n");
>        DEBUG(( D_INFO, (CHAR8 *)"D_INFO\r\n"));
>        //Print(L"b\n");
>       DEBUG(( D_ERROR, (CHAR8 *)"D_ERROR\r\n"));
>       //Print(L"c\n");

It is a little confusing, but I think gnu-efi has its own DEBUG macro
that may use ST->StdErr. So, that may still involve the ConSplitter.

-Jordan

> -----Original Message-----
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Monday, May 19, 2014 5:16 PM
> To: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] Crash in qemu + OVMF after a call to DEBUG()
>
> On 05/19/14 10:33, Ludovic Rousseau wrote:
>
>> My debug1.c code is now:
>> #include <efi.h>
>> #include <efilib.h>
>>
>> EFI_STATUS
>> efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
>>     InitializeLib(ImageHandle, SystemTable);
>>
>>     Print(L"a\n");
>>     DEBUG(( D_INFO, (CHAR8 *)"D_INFO\r\n"));
>>     Print(L"b\n");
>>     DEBUG(( D_ERROR, (CHAR8 *)"D_ERROR\r\n"));
>>     Print(L"c\n");
>>
>>     return EFI_SUCCESS;
>> }
>>
>> On the serial console I get:
>> FS0:\> debug1.efi
>> a
>> b
>> !!!! X64 Exception Type - 000000000000000E     CPU Apic ID - 00000000 !!!!
>> RIP  - 0000000006BA58DE, CS  - 0000000000000028, RFLAGS -
>> 0000000000000287 ExceptionData - 0000000000000000 RAX  -
>> FFFFFFFFFFFFFFF0, RCX - 0000000000000000, RDX - 0000000000000007 RBX
>> - 0000000080000000, RSP - 0000000007F6A4F0, RBP - 0000000007F6A530 RSI
>> - 000000000000000E, RDI - 0000000006BAA790
>> R8   - 0000000000000000, R9  - 0000000007F69EA7, R10 - 00000000069A169D
>> R11  - 0000000000000040, R12 - 0000000000000005, R13 -
>> 0000000000000000
>> R14  - 0000000000000000, R15 - 0000000000000000
>> DS   - 0000000000000008, ES  - 0000000000000008, FS  - 0000000000000008
>> GS   - 0000000000000008, SS  - 0000000000000008
>> CR0  - 0000000080000033, CR2 - FFFFFFFFFFFFFFF0, 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 - 0000000007F6A150
>> !!!! Find PE image
>> /home/lroussea/Documents/UEFI/edk2/Build/OvmfX64/DEBUG_GCC47/X64/MdeMo
>> dulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe/DEBUG/ConSplit
>> terDxe.dll (ImageBase=0000000006B9F000, EntryPoint=0000000006B9F2AF)
>> !!!!
>>
>> I get this crash before the debug message is displayed. This is with
>> OVMF I rebuild myself using edk2 SVN revision 15536
>
> Please state your qemu version and qemu command line.
>
> Please also upload
> "/home/lroussea/Documents/UEFI/edk2/Build/OvmfX64/DEBUG_GCC47/X64/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe/DEBUG/ConSplitterDxe.dll"
> somewhere public. (The binary must match the above register dump.)
>
> Thanks,
> Laszlo
>
> ------------------------------------------------------------------------------
> "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
>
> ------------------------------------------------------------------------------
> "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

------------------------------------------------------------------------------
"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

Reply via email to