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>
- if ((*RegSize % 8) != 0) {\r
+ if ((*RegSize % 16) != 0) {\r
DEBUG ((EFI_D_ERROR,\r
"%a: '%a' compatible node has invalid 'reg' property (size == 0x%x)\n",\r
__FUNCTION__, CompatibleString, *RegSize));\r
DEBUG ((EFI_D_ERROR,\r
"%a: '%a' compatible node has invalid 'reg' property (size == 0x%x)\n",\r
__FUNCTION__, CompatibleString, *RegSize));\r