lib/utils: fdt: Update FDT expand size to 1024 for reserved memory node

Currently 256 bytes is used for the FDT expand size when fixing up
reserved memory node. Increase it to 1024 bytes with an estimated
size of 64 bytes per PMP memory region by 16 regions in total.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Цей коміт міститься в:
Bin Meng authored and Anup Patel committed 2020-07-06 14:05:29 +05:30
1 джерело 7d61a68775
коміт a5f9104330
1 file changed
+8 -2
+8 -2
Переглянути файл
@@ -151,8 +151,14 @@ int fdt_reserved_memory_fixup(void *fdt)
int na = fdt_address_cells(fdt, 0);
int ns = fdt_size_cells(fdt, 0);
/* expand the device tree to accommodate new node */
err = fdt_open_into(fdt, fdt, fdt_totalsize(fdt) + 256);
/*
* Expand the device tree to accommodate new node
* by the following estimated size:
*
* Each PMP memory region entry occupies 64 bytes.
* With 16 PMP memory regions we need 64 * 16 = 1024 bytes.
*/
err = fdt_open_into(fdt, fdt, fdt_totalsize(fdt) + 1024);
if (err < 0)
return err;