mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcMemoryLib: Avoid rebuilding attributes when MAT is empty (#304)
Some firmware implementations may provide an empty Memory Attributes Table (NumberOfEntries is zero). Avoid calling OcUpdateDescriptors in this case, as it will lead to division by zero. This resolves boot failures due to #DE on XPS 15 9560 when Secure Boot is enabled.
This commit is contained in:
parent
18e32b6053
commit
c466fbc0f0
@ -438,7 +438,7 @@ OcRebuildAttributes (
|
||||
UINT32 DescriptorVersion;
|
||||
|
||||
MemoryAttributesTable = OcGetMemoryAttributes (&MemoryAttributesEntry);
|
||||
if (MemoryAttributesTable == NULL) {
|
||||
if (MemoryAttributesTable == NULL || MemoryAttributesTable->NumberOfEntries == 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user