Hi, Gerd,

The current UEFI payload has an assumption that all interrupt sources will be 
masked off before transferring to the UEFI payload.
In your case I saw the 8259 interrupts were unmasked before the handoff.

I tried to add the following in the entry point of the CbSupportPei PEIM to 
mask off the 8259 interrupt sources, and then it booted to EFI shell on Qemu.
  IoWrite8 (0x21, 0xFF);
  IoWrite8 (0xA1, 0xFF);

Maybe we should add this in CorebootPayloadPkg and remove the assumption 
mentioned above.

Thanks
Maurice

-----Original Message-----
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Friday, May 29, 2015 5:58 AM
To: Gerd Hoffmann
Cc: Ma, Maurice; edk2-devel list; Dong, Guo; Scott Duplichan
Subject: Re: CorebootModulePkg: gcc reports conflicting types for 
'CbParseAcpiTable'

On 05/29/15 14:20, Gerd Hoffmann wrote:
>   Hi,
> 
>>> Any idea what this could be?
>>
>> Yes, you can track this down. Just locate the .dll file referenced in 
>> the above register dump (well, in fact, the same pathname with the 
>> .debug suffix might be even better), and then with the help of 
>> "objdump", you can tie the crash site to the source code:
>>
>> http://thread.gmane.org/gmane.comp.bios.tianocore.devel/7300/focus=73
>> 05
> 
> Thanks.  It's the return instruction of the EnableInterrupts() function.
> So a stack overflow in an interrupt handler, which overwrites the 
> return address?  The EnableInterrupts() function itself does just 
> 'sti', that'll hardly corrupt anything ...

Hm, I don't know. The exception type in the register dump is 0, which seems to 
mean "division by zero".

http://wiki.osdev.org/Exceptions

If that's right, maybe you can peek at the guest memory with the qemu monitor, 
and see the "saved instruction pointer" on the stack that "points to the DIV or 
IDIV instruction which caused the exception".

Just guessing... Adding a bunch of DEBUG()s to the CpuDxe source might help.

Thanks
Laszlo
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to