If ExitBootServices() fails, it is mostly caused by map key that is racing with asynchronous events signaled over the back of the timer interrupt. In this case new memory map should be obtained prior to another ExitBootServices() call attempt
This commit is contained in:
parent
9443da9817
commit
0293fb6f28
@ -140,7 +140,20 @@ XtEnablePaging(IN PLIST_ENTRY MemoryMappings,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to exit boot services */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to exit boot services (Status code: %lx)\n", Status);
|
||||
Status = XtLdrProtocol->Memory.GetMemoryMap(MemoryMap);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to get memory map */
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = XtLdrProtocol->Util.ExitBootServices(MemoryMap->MapKey);
|
||||
}
|
||||
|
||||
/* Check if exitted boot services successfully */
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
XtLdrProtocol->Console.Print(L"Failed to exit boot services (Status code: %lx)\n", Status);
|
||||
return STATUS_EFI_ABORTED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user