EmbeddedPkg: Remove misleading error message in FindNextMemoryNodeReg
FindNextMemoryNodeReg prints "ignoring disabled memory node" for all top-level disabled nodes in the tree, not just the ones with the "device_type" property set to "memory". Rework the loop to only print the message for the relevant nodes. Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
This commit is contained in:
parent
107981f3f0
commit
9bb11cad9d
|
@ -262,13 +262,16 @@ FindNextMemoryNodeReg (
|
|||
break;
|
||||
}
|
||||
|
||||
DeviceType = fdt_getprop (mDeviceTreeBase, Next, "device_type", &Len);
|
||||
if ((DeviceType == NULL) || (AsciiStrCmp (DeviceType, "memory") != 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!IsNodeEnabled (Next)) {
|
||||
DEBUG ((DEBUG_WARN, "%a: ignoring disabled memory node\n", __func__));
|
||||
continue;
|
||||
}
|
||||
|
||||
DeviceType = fdt_getprop (mDeviceTreeBase, Next, "device_type", &Len);
|
||||
if ((DeviceType != NULL) && (AsciiStrCmp (DeviceType, "memory") == 0)) {
|
||||
//
|
||||
// Get the 'reg' property of this memory node. For now, we will assume
|
||||
// 8 byte quantities for base and size, respectively.
|
||||
|
@ -299,7 +302,6 @@ FindNextMemoryNodeReg (
|
|||
*SizeCells = 2;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue