diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c index 2d867b16fd..fb6e0aeb92 100644 --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c @@ -210,6 +210,7 @@ FindNextMemoryNodeReg ( { INT32 Prev, Next; CONST CHAR8 *DeviceType; + CONST CHAR8 *NodeStatus; INT32 Len; EFI_STATUS Status; @@ -222,6 +223,13 @@ FindNextMemoryNodeReg ( break; } + NodeStatus = fdt_getprop (mDeviceTreeBase, Next, "status", &Len); + if (NodeStatus != NULL && AsciiStrCmp (NodeStatus, "okay") != 0) { + DEBUG ((DEBUG_WARN, "%a: ignoring memory node with status \"%a\"\n", + __FUNCTION__, NodeStatus)); + continue; + } + DeviceType = fdt_getprop (mDeviceTreeBase, Next, "device_type", &Len); if (DeviceType != NULL && AsciiStrCmp (DeviceType, "memory") == 0) { //