mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
CpuArchLib: Fixed CpuGetMemoryAttributes().
This commit is contained in:
parent
79e0eca155
commit
558889562f
@ -417,8 +417,16 @@ CpuGetMemoryAttributes (
|
||||
PAGE_ATTRIBUTE PageAttribute;
|
||||
UINT64 *PageEntry;
|
||||
|
||||
ASSERT (Attributes != NULL);
|
||||
|
||||
GetCurrentPagingContext (&PagingContext);
|
||||
|
||||
if ((PagingContext.MachineType == IMAGE_FILE_MACHINE_I386) &&
|
||||
((PagingContext.ContextData.Ia32.Attributes & PAGE_TABLE_LIB_PAGING_CONTEXT_IA32_X64_ATTRIBUTES_PAE) == 0)) {
|
||||
*Attributes = 0;
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
PageEntry = GetPageTableEntry (&PagingContext, Address, &PageAttribute);
|
||||
if (PageEntry == NULL) {
|
||||
*Attributes = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user