aboutsummaryrefslogtreecommitdiff
path: root/platform/ext/target/musca_a/partition/region_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ext/target/musca_a/partition/region_defs.h')
-rw-r--r--platform/ext/target/musca_a/partition/region_defs.h155
1 files changed, 0 insertions, 155 deletions
diff --git a/platform/ext/target/musca_a/partition/region_defs.h b/platform/ext/target/musca_a/partition/region_defs.h
deleted file mode 100644
index a733abfe1a..0000000000
--- a/platform/ext/target/musca_a/partition/region_defs.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2017-2020 Arm Limited. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __REGION_DEFS_H__
-#define __REGION_DEFS_H__
-
-#include "flash_layout.h"
-
-#define BL2_HEAP_SIZE (0x0001000)
-#define BL2_MSP_STACK_SIZE (0x0001800)
-
-#define S_HEAP_SIZE (0x0001000)
-#define S_MSP_STACK_SIZE_INIT (0x0000400)
-#define S_MSP_STACK_SIZE (0x0000800)
-#define S_PSP_STACK_SIZE (0x0000800)
-
-#define NS_HEAP_SIZE (0x0001000)
-#define NS_MSP_STACK_SIZE (0x00000A0)
-#define NS_PSP_STACK_SIZE (0x0000140)
-
-/* This size of buffer is big enough to store an attestation
- * token produced by initial attestation service
- */
-#define PSA_INITIAL_ATTEST_TOKEN_MAX_SIZE (0x250)
-
-/* MPC granularity is 128 KB on Musca_A. Alignment
- * of partitions is defined in accordance with this constraint.
- */
-#define S_IMAGE_PRIMARY_PARTITION_OFFSET (FLASH_AREA_0_OFFSET)
-#define S_IMAGE_SECONDARY_PARTITION_OFFSET (FLASH_AREA_2_OFFSET)
-
-#define NS_IMAGE_PRIMARY_PARTITION_OFFSET (FLASH_AREA_0_OFFSET \
- + FLASH_S_PARTITION_SIZE)
-
-/* Boot partition structure if MCUBoot is used:
- * 0x0_0000 Bootloader header
- * 0x0_0400 Image area
- * 0x1_FC00 Trailer
- */
-/* IMAGE_CODE_SIZE is the space available for the software binary image.
- * It is less than the FLASH_S_PARTITION_SIZE + FLASH_NS_PARTITION_SIZE
- * because we reserve space for the image header and trailer introduced
- * by the bootloader.
- */
-#define BL2_HEADER_SIZE (0x400) /* 1 KB */
-#define BL2_TRAILER_SIZE (0x400) /* 1 KB */
-
-#define IMAGE_S_CODE_SIZE \
- (FLASH_S_PARTITION_SIZE - BL2_HEADER_SIZE - BL2_TRAILER_SIZE)
-#define IMAGE_NS_CODE_SIZE \
- (FLASH_NS_PARTITION_SIZE - BL2_HEADER_SIZE - BL2_TRAILER_SIZE)
-
-#define CMSE_VENEER_REGION_SIZE (0x340)
-
-/* Alias definitions for secure and non-secure areas*/
-#define S_ROM_ALIAS(x) (S_SRAM_ALIAS_BASE + (x))
-#define NS_ROM_ALIAS(x) (NS_SRAM_ALIAS_BASE + (x))
-
-#define S_RAM_ALIAS(x) (S_RAM_ALIAS_BASE + (x))
-#define NS_RAM_ALIAS(x) (NS_RAM_ALIAS_BASE + (x))
-
-/* Secure regions */
-#define S_IMAGE_PRIMARY_AREA_OFFSET \
- (S_IMAGE_PRIMARY_PARTITION_OFFSET + BL2_HEADER_SIZE)
-#define S_CODE_START (S_ROM_ALIAS(S_IMAGE_PRIMARY_AREA_OFFSET))
-#define S_CODE_SIZE (IMAGE_S_CODE_SIZE - CMSE_VENEER_REGION_SIZE)
-#define S_CODE_LIMIT (S_CODE_START + S_CODE_SIZE - 1)
-
-#define S_DATA_START (S_RAM_ALIAS(0x0))
-/* Reserve 96 KB of RAM to the SPE to meet worst case scenario
- * requirements which are encountered in IPC mode and regression
- * tests enabled. Leave the remaining 32 KB to the NSPE.
- */
-#define S_DATA_SIZE ((TOTAL_RAM_SIZE / 4) * 3)
-#define S_DATA_LIMIT (S_DATA_START + S_DATA_SIZE - 1)
-
-/* CMSE Veneers region */
-#define CMSE_VENEER_REGION_START (S_CODE_LIMIT + 1)
-
-/* Non-secure regions */
-#define NS_IMAGE_PRIMARY_AREA_OFFSET \
- (NS_IMAGE_PRIMARY_PARTITION_OFFSET + BL2_HEADER_SIZE)
-#define NS_CODE_START (NS_ROM_ALIAS(NS_IMAGE_PRIMARY_AREA_OFFSET))
-#define NS_CODE_SIZE (IMAGE_NS_CODE_SIZE - FLASH_AREA_BL2_SIZE)
-#define NS_CODE_LIMIT (NS_CODE_START + NS_CODE_SIZE - 1)
-
-#define NS_DATA_START (NS_RAM_ALIAS(S_DATA_SIZE))
-#define NS_DATA_SIZE (TOTAL_RAM_SIZE - S_DATA_SIZE)
-
-#define NS_DATA_LIMIT (NS_DATA_START + NS_DATA_SIZE - 1)
-
-/* NS partition information is used for MPC and SAU configuration */
-#define NS_PARTITION_START \
- (NS_ROM_ALIAS(NS_IMAGE_PRIMARY_PARTITION_OFFSET))
-#define NS_PARTITION_SIZE (FLASH_NS_PARTITION_SIZE)
-
-/* Secondary partition for new images in case of firmware upgrade */
-#define SECONDARY_PARTITION_START \
- (NS_ROM_ALIAS(S_IMAGE_SECONDARY_PARTITION_OFFSET))
-#define SECONDARY_PARTITION_SIZE (FLASH_S_PARTITION_SIZE + \
- FLASH_NS_PARTITION_SIZE)
-
-/* Code SRAM area */
-#define TOTAL_CODE_SRAM_SIZE (TOTAL_ROM_SIZE)
-#define S_CODE_SRAM_ALIAS_BASE (0x10000000)
-#define NS_CODE_SRAM_ALIAS_BASE (0x00000000)
-
-#define BL2_CODE_SRAM_EXEC_BASE (S_CODE_SRAM_ALIAS_BASE)
-#define S_CODE_SRAM_EXEC_BASE (S_CODE_SRAM_ALIAS_BASE)
-#define S_CODE_SRAM_EXEC_LIMIT (S_CODE_SRAM_EXEC_BASE + \
- (TOTAL_CODE_SRAM_SIZE / 2) - 1)
-#define NS_CODE_SRAM_EXEC_BASE (NS_CODE_SRAM_ALIAS_BASE + \
- (TOTAL_CODE_SRAM_SIZE / 2))
-#define NS_CODE_SRAM_EXEC_LIMIT (NS_CODE_SRAM_EXEC_BASE + \
- (TOTAL_CODE_SRAM_SIZE / 2) - 1)
-
-/* Since we enable/disable flash during s/ns code copy to code sram we cannot
- * access bl2 code from flash, hence we need to copy the bl2 code to code sram
- */
-#define BL2_CODE_SRAM_ALIAS_BASE (S_SRAM_ALIAS_BASE)
-#define BL2_CODE_SRAM_ALIAS(x) (BL2_CODE_SRAM_ALIAS_BASE + x)
-#define BL2_CODE_SRAM_BASE (BL2_CODE_SRAM_ALIAS(FLASH_AREA_BL2_OFFSET))
-
-/* Bootloader regions */
-#define BL2_CODE_START (S_QSPI_ALIAS_BASE)
-#define BL2_CODE_SIZE (FLASH_AREA_BL2_SIZE)
-#define BL2_CODE_LIMIT (BL2_CODE_START + BL2_CODE_SIZE - 1)
-
-#define BL2_DATA_START (S_RAM_ALIAS(0x0))
-#define BL2_DATA_SIZE (TOTAL_RAM_SIZE)
-#define BL2_DATA_LIMIT (BL2_DATA_START + BL2_DATA_SIZE - 1)
-
-/* Shared data area between bootloader and runtime firmware.
- * Shared data area is allocated at the beginning of the RAM, it is overlapping
- * with TF-M Secure code's MSP stack
- */
-#define BOOT_TFM_SHARED_DATA_BASE S_RAM_ALIAS_BASE
-#define BOOT_TFM_SHARED_DATA_SIZE (0x400)
-#define BOOT_TFM_SHARED_DATA_LIMIT (BOOT_TFM_SHARED_DATA_BASE + \
- BOOT_TFM_SHARED_DATA_SIZE - 1)
-
-#endif /* __REGION_DEFS_H__ */