On Jan 27, 2014, at 11:22 AM, Olivier Martin <olivier.mar...@arm.com> wrote:

> Dear MdeModulePkg maintainer,
>  
> Please find the attached patch that fixed a severe defect in DxeCore.
>  
> Interrupts are expected to be disabled when calling CoreExitBootServices()
> (see explicit call to 'gCpu->DisableInterrupt (gCpu)' in the function).
>  
> Calling ReportStatusCode functions re-enabled the interrupt through
> CoreRestoreTpl():
>  

I’m wondering if we should remove the call to REPORT_STATUS_CODE? I don’t see 
any place in the library class definition that restricts allocating memory. 
Maybe it would make more sense for the ReportStatusCode lib to have an exit 
boot services event?

Thanks,

Andrew Fish

> -----
> CoreRestoreTpl() {
>   (...)
>  
>   //
>   // If lowering below HIGH_LEVEL, make sure
>   // interrupts are enabled
>   //
>   if (gEfiCurrentTpl < TPL_HIGH_LEVEL) {
>     CoreSetInterruptState (TRUE);
>   }
> }
> -----
>  
> The workaround is to switch the calls to always disable the CPU interrupts.
> Another solution would be to change TPL Raise/Restore code to save the
> state of the interrupts prior to call RaiseTpl.
>  
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Olivier Martin <olivier.mar...@arm.com>
>  
> Regards,
> Olivier
> <MdeModulePkg-DxeCore-Fixed-CoreExitBootServices.patch>------------------------------------------------------------------------------
> 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

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

Reply via email to