diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-15 13:48:15 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-15 15:30:11 +0100 |
commit | 38ed4a9e3a65185e7e7b3c891feab1ddc865fdb5 (patch) | |
tree | ab91ddd97e1f954d572baf251c9a73a3df66da26 /ArmVirtPkg/FdtClientDxe | |
parent | f8db6527da8678f1480f08ba99b745279e8d104a (diff) | |
download | edk2-38ed4a9e3a65185e7e7b3c891feab1ddc865fdb5.zip edk2-38ed4a9e3a65185e7e7b3c891feab1ddc865fdb5.tar.gz edk2-38ed4a9e3a65185e7e7b3c891feab1ddc865fdb5.tar.bz2 |
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>
Diffstat (limited to 'ArmVirtPkg/FdtClientDxe')
-rw-r--r-- | ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c index c336e24..2063a59 100644 --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c @@ -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));
|