diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig index 25b8886b..b1808012 100644 --- a/platform/generic/Kconfig +++ b/platform/generic/Kconfig @@ -23,6 +23,11 @@ config PLATFORM_GENERIC_MINOR_VER range 0 65535 default 1 +config PLATFORM_GENERIC_FDT_EMPTY_SPACE + int "Platform FDT empty space (KB)" + range 0 1024 + default 4 + config PLATFORM_ALLWINNER_D1 bool "Allwinner D1 support" depends on FDT_IRQCHIP_PLIC diff --git a/platform/generic/platform.c b/platform/generic/platform.c index e66f99fa..01fa03e0 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -245,7 +245,10 @@ int generic_final_init(bool cold_boot) fdt_fixups(fdt); fdt_domain_fixup(fdt); + /* Set the empty space in FDT based on kconfig option */ fdt_pack(fdt); + fdt_open_into(fdt, fdt, fdt_totalsize(fdt) + + CONFIG_PLATFORM_GENERIC_FDT_EMPTY_SPACE * 1024); return 0; }