Commit 49e9ac28 authored by Manish V Badarkhe's avatar Manish V Badarkhe
Browse files

refactor(plat/arm): replace FIP base and size macro with a generic name



Replaced PLAT_ARM_FIP_BASE and PLAT_ARM_FIP_MAX_SIZE macro with a
generic name PLAT_ARM_FLASH_IMAGE_BASE and PLAT_ARM_FLASH_IMAGE_MAX_SIZE
so that these macros can be reused in the subsequent GPT based support
changes.

Change-Id: I88fdbd53e1966578af4f1e8e9d5fef42c27b1173
Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
parent 067cb3ae
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
#define MAX_IO_HANDLES 4 #define MAX_IO_HANDLES 4
/* Reserve the last block of flash for PSCI MEM PROTECT flag */ /* Reserve the last block of flash for PSCI MEM PROTECT flag */
#define PLAT_ARM_FIP_BASE V2M_FLASH0_BASE #define PLAT_ARM_FLASH_IMAGE_BASE V2M_FLASH0_BASE
#define PLAT_ARM_FIP_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
#define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE #define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE
#define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
......
...@@ -315,8 +315,8 @@ ...@@ -315,8 +315,8 @@
#define MAX_IO_HANDLES 4 #define MAX_IO_HANDLES 4
/* Reserve the last block of flash for PSCI MEM PROTECT flag */ /* Reserve the last block of flash for PSCI MEM PROTECT flag */
#define PLAT_ARM_FIP_BASE BOOT_BASE #define PLAT_ARM_FLASH_IMAGE_BASE BOOT_BASE
#define PLAT_ARM_FIP_MAX_SIZE (BOOT_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE (BOOT_SIZE - V2M_FLASH_BLOCK_SIZE)
#define PLAT_ARM_NVM_BASE BOOT_BASE #define PLAT_ARM_NVM_BASE BOOT_BASE
#define PLAT_ARM_NVM_SIZE (BOOT_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_NVM_SIZE (BOOT_SIZE - V2M_FLASH_BLOCK_SIZE)
......
...@@ -24,8 +24,8 @@ __dead2 void plat_arm_error_handler(int err) ...@@ -24,8 +24,8 @@ __dead2 void plat_arm_error_handler(int err)
case -EAUTH: case -EAUTH:
/* Image load or authentication error. Erase the ToC */ /* Image load or authentication error. Erase the ToC */
INFO("Erasing FIP ToC from flash...\n"); INFO("Erasing FIP ToC from flash...\n");
(void)nor_unlock(PLAT_ARM_FIP_BASE); (void)nor_unlock(PLAT_ARM_FLASH_IMAGE_BASE);
ret = nor_word_program(PLAT_ARM_FIP_BASE, 0); ret = nor_word_program(PLAT_ARM_FLASH_IMAGE_BASE, 0);
if (ret != 0) { if (ret != 0) {
ERROR("Cannot erase ToC\n"); ERROR("Cannot erase ToC\n");
} else { } else {
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
#define MAX_IO_HANDLES 4 #define MAX_IO_HANDLES 4
/* Reserve the last block of flash for PSCI MEM PROTECT flag */ /* Reserve the last block of flash for PSCI MEM PROTECT flag */
#define PLAT_ARM_FIP_BASE V2M_FLASH0_BASE #define PLAT_ARM_FLASH_IMAGE_BASE V2M_FLASH0_BASE
#define PLAT_ARM_FIP_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
#define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE #define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE
#define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
......
...@@ -303,8 +303,8 @@ ...@@ -303,8 +303,8 @@
#define MAX_IO_HANDLES 4 #define MAX_IO_HANDLES 4
/* Reserve the last block of flash for PSCI MEM PROTECT flag */ /* Reserve the last block of flash for PSCI MEM PROTECT flag */
#define PLAT_ARM_FIP_BASE V2M_FLASH1_BASE #define PLAT_ARM_FLASH_IMAGE_BASE V2M_FLASH1_BASE
#define PLAT_ARM_FIP_MAX_SIZE (V2M_FLASH1_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE (V2M_FLASH1_SIZE - V2M_FLASH_BLOCK_SIZE)
#define PLAT_ARM_NVM_BASE V2M_FLASH1_BASE #define PLAT_ARM_NVM_BASE V2M_FLASH1_BASE
#define PLAT_ARM_NVM_SIZE (V2M_FLASH1_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_NVM_SIZE (V2M_FLASH1_SIZE - V2M_FLASH_BLOCK_SIZE)
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#include <platform_def.h> #include <platform_def.h>
const io_block_spec_t fip_block_spec = { const io_block_spec_t fip_block_spec = {
.offset = PLAT_ARM_FIP_BASE, .offset = PLAT_ARM_FLASH_IMAGE_BASE,
.length = PLAT_ARM_FIP_MAX_SIZE .length = PLAT_ARM_FLASH_IMAGE_MAX_SIZE
}; };
const io_uuid_spec_t arm_uuid_spec[MAX_NUMBER_IDS] = { const io_uuid_spec_t arm_uuid_spec[MAX_NUMBER_IDS] = {
......
...@@ -184,8 +184,8 @@ ...@@ -184,8 +184,8 @@
#define MAX_IO_HANDLES U(4) #define MAX_IO_HANDLES U(4)
/* Reserve the last block of flash for PSCI MEM PROTECT flag */ /* Reserve the last block of flash for PSCI MEM PROTECT flag */
#define PLAT_ARM_FIP_BASE V2M_FLASH0_BASE #define PLAT_ARM_FLASH_IMAGE_BASE V2M_FLASH0_BASE
#define PLAT_ARM_FIP_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
#define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE #define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE
#define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) #define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment