diff options
author | danh-arm <dan.handley@arm.com> | 2016-02-22 13:23:49 +0000 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2016-02-22 13:23:49 +0000 |
commit | 9931932bfd3429aa8e98c33a26dfafcdbda71a43 (patch) | |
tree | 29fe2640dd4e1112e205c4c2caaeb280144a6868 /include | |
parent | 094a935de268a560494f6b36b122a50d7c6967fc (diff) | |
parent | c64a04486ff469a826c01aa563a8988006a712ec (diff) |
Merge pull request #532 from soby-mathew/vk/configure_mmap_macros
Rationalise MMU and Page table related constants on ARM platforms
Diffstat (limited to 'include')
-rw-r--r-- | include/plat/arm/board/common/board_arm_def.h | 88 |
1 files changed, 18 insertions, 70 deletions
diff --git a/include/plat/arm/board/common/board_arm_def.h b/include/plat/arm/board/common/board_arm_def.h index db2a8dfb..aaf419e2 100644 --- a/include/plat/arm/board/common/board_arm_def.h +++ b/include/plat/arm/board/common/board_arm_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -60,80 +60,28 @@ #endif /* - * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the - * plat_arm_mmap array defined for each BL stage. + * The constants below are not optimised for memory usage. Platforms that wish + * to optimise these constants should set `ARM_BOARD_OPTIMISE_MMAP` to 1 and + * provide there own values. */ -#if IMAGE_BL1 -# if PLAT_fvp -# if TRUSTED_BOARD_BOOT -# define PLAT_ARM_MMAP_ENTRIES 8 -# else -# define PLAT_ARM_MMAP_ENTRIES 7 -# endif /* TRUSTED_BOARD_BOOT */ -# else -# if TRUSTED_BOARD_BOOT -# define PLAT_ARM_MMAP_ENTRIES 7 -# else -# define PLAT_ARM_MMAP_ENTRIES 6 -# endif /* TRUSTED_BOARD_BOOT */ -# endif /* PLAT_ */ -#endif -#if IMAGE_BL2 -# if PLAT_fvp -# define PLAT_ARM_MMAP_ENTRIES 9 -# else -# define PLAT_ARM_MMAP_ENTRIES 8 -# endif -#endif -#if IMAGE_BL2U -# if PLAT_fvp -# define PLAT_ARM_MMAP_ENTRIES 3 -# else -# define PLAT_ARM_MMAP_ENTRIES 4 -#endif -#endif -#if IMAGE_BL31 -#define PLAT_ARM_MMAP_ENTRIES 5 -#endif -#if IMAGE_BL32 -#define PLAT_ARM_MMAP_ENTRIES 4 -#endif - +#if !ARM_BOARD_OPTIMISE_MMAP /* - * Platform specific page table and MMU setup constants + * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the + * plat_arm_mmap array defined for each BL stage. + * + * Provide relatively optimised values for the runtime images (BL31 and BL32). + * Optimisation is less important for the other, transient boot images so a + * common, maximum value is used across these images. */ -#if IMAGE_BL1 -# if TRUSTED_BOARD_BOOT -# define MAX_XLAT_TABLES 4 -# else -# if PLAT_juno -# define MAX_XLAT_TABLES 2 -# else -# define MAX_XLAT_TABLES 3 -# endif /* PLAT_ */ -# endif /* TRUSTED_BOARD_BOOT */ -#elif IMAGE_BL2 -# if PLAT_juno -# define MAX_XLAT_TABLES 3 -# else -# define MAX_XLAT_TABLES 4 -# endif /* PLAT_ */ -#elif IMAGE_BL2U -# if PLAT_juno -# define MAX_XLAT_TABLES 3 -# else -# define MAX_XLAT_TABLES 4 -# endif /* PLAT_ */ -#elif IMAGE_BL31 -# define MAX_XLAT_TABLES 2 -#elif IMAGE_BL32 -# if ARM_TSP_RAM_LOCATION_ID == ARM_DRAM_ID -# define MAX_XLAT_TABLES 3 -# else -# define MAX_XLAT_TABLES 2 -# endif +#if IMAGE_BL31 || IMAGE_BL32 +# define PLAT_ARM_MMAP_ENTRIES 6 +# define MAX_XLAT_TABLES 3 +#else +# define PLAT_ARM_MMAP_ENTRIES 9 +# define MAX_XLAT_TABLES 4 #endif +#endif /* ARM_BOARD_OPTIMISE_MMAP */ #define MAX_IO_DEVICES 3 #define MAX_IO_HANDLES 4 |