mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 14:14:31 +02:00
ArmVirtPkg/FdtClientDxe: fix check for size of "reg" properties
Currently, the code in FdtClientDxe assumes #address-cells/#size-cells values of <2>. Since DT "reg" properties always consist of <base, size> tuples, this means the size of the entire property should always be a multiple of 16 bytes (i.e, 4 * sizeof(UINT32), not 8. So fix this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
f8db6527da
commit
38ed4a9e3a
@ -178,7 +178,7 @@ FindCompatibleNodeReg (
|
||||
return Status;
|
||||
}
|
||||
|
||||
if ((*RegSize % 8) != 0) {
|
||||
if ((*RegSize % 16) != 0) {
|
||||
DEBUG ((EFI_D_ERROR,
|
||||
"%a: '%a' compatible node has invalid 'reg' property (size == 0x%x)\n",
|
||||
__FUNCTION__, CompatibleString, *RegSize));
|
||||
|
Loading…
x
Reference in New Issue
Block a user