diff options
| author | Samuel Holland <samuel.holland@sifive.com> | 2024-07-30 21:58:54 -0700 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2024-08-24 13:02:54 +0530 |
| commit | 6e5db7b09c6c25be59900a3470923727a4e14033 (patch) | |
| tree | 665c8ce7ac46e77118da40f4c0b8852490116ec1 /platform/generic/include | |
| parent | 3f964652d9236bcd5a7111bace3fd8bdb5dec7b1 (diff) | |
| download | opensbi-6e5db7b09c6c25be59900a3470923727a4e14033.tar.gz opensbi-6e5db7b09c6c25be59900a3470923727a4e14033.tar.bz2 opensbi-6e5db7b09c6c25be59900a3470923727a4e14033.zip | |
platform: generic: Pass FDT to early/final_init overrides
Several of these override functions access the FDT blob. Explicitly
indicate which callbacks are allowed to modify the FDT blob by passing
the parameter as a possibly-const pointer. This also reduces code size
by deduplicating the call to fdt_get_address().
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'platform/generic/include')
| -rw-r--r-- | platform/generic/include/andes/andes_pma.h | 3 | ||||
| -rw-r--r-- | platform/generic/include/platform_override.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/platform/generic/include/andes/andes_pma.h b/platform/generic/include/andes/andes_pma.h index e2d52791..be614964 100644 --- a/platform/generic/include/andes/andes_pma.h +++ b/platform/generic/include/andes/andes_pma.h @@ -48,7 +48,8 @@ struct andes_pma_region { bool dma_default; }; -int andes_pma_setup_regions(const struct andes_pma_region *pma_regions, +int andes_pma_setup_regions(void *fdt, + const struct andes_pma_region *pma_regions, unsigned int pma_regions_count); /** diff --git a/platform/generic/include/platform_override.h b/platform/generic/include/platform_override.h index bd6fdacc..946fb8f7 100644 --- a/platform/generic/include/platform_override.h +++ b/platform/generic/include/platform_override.h @@ -21,8 +21,8 @@ struct platform_override { u64 (*tlbr_flush_limit)(const struct fdt_match *match); u32 (*tlb_num_entries)(const struct fdt_match *match); bool (*cold_boot_allowed)(u32 hartid, const struct fdt_match *match); - int (*early_init)(bool cold_boot, const struct fdt_match *match); - int (*final_init)(bool cold_boot, const struct fdt_match *match); + int (*early_init)(bool cold_boot, const void *fdt, const struct fdt_match *match); + int (*final_init)(bool cold_boot, void *fdt, const struct fdt_match *match); void (*early_exit)(const struct fdt_match *match); void (*final_exit)(const struct fdt_match *match); int (*fdt_fixup)(void *fdt, const struct fdt_match *match); |
