|
| 1 | +/* |
| 2 | +* Copyright (c) 2020 - 2025 Renesas Electronics Corporation and/or its affiliates |
| 3 | +* |
| 4 | +* SPDX-License-Identifier: BSD-3-Clause |
| 5 | +*/ |
| 6 | + |
| 7 | +#ifndef BSP_LINKER_H |
| 8 | +#define BSP_LINKER_H |
| 9 | + |
| 10 | +/*********************************************************************************************************************** |
| 11 | + * Macro definitions |
| 12 | + **********************************************************************************************************************/ |
| 13 | + |
| 14 | +/******* Solution Definitions *************/ |
| 15 | + |
| 16 | +/*********************************************************************************************************************** |
| 17 | + * Typedef definitions |
| 18 | + **********************************************************************************************************************/ |
| 19 | +/* linker generated initialization table data structures types */ |
| 20 | +typedef enum e_bsp_init_mem |
| 21 | +{ |
| 22 | + INIT_MEM_ZERO, |
| 23 | + INIT_MEM_FLASH, |
| 24 | + INIT_MEM_DATA_FLASH, |
| 25 | + INIT_MEM_RAM, |
| 26 | + INIT_MEM_DTCM, |
| 27 | + INIT_MEM_ITCM, |
| 28 | + INIT_MEM_CTCM, |
| 29 | + INIT_MEM_STCM, |
| 30 | + INIT_MEM_OSPI0_CS0, |
| 31 | + INIT_MEM_OSPI0_CS1, |
| 32 | + INIT_MEM_OSPI1_CS0, |
| 33 | + INIT_MEM_OSPI1_CS1, |
| 34 | + INIT_MEM_QSPI_FLASH, |
| 35 | + INIT_MEM_SDRAM, |
| 36 | +} bsp_init_mem_t; |
| 37 | + |
| 38 | +typedef struct st_bsp_init_type |
| 39 | +{ |
| 40 | + uint32_t destination_type :8; |
| 41 | + uint32_t source_type :8; |
| 42 | + uint32_t destination_external :1; /* =1 if destination type is external, else internal */ |
| 43 | + uint32_t source_external :1; /* =1 if source type is external, else internal */ |
| 44 | + uint32_t external :1; /* =1 if either source or destination is external, else 0 */ |
| 45 | + uint32_t copy_64 :1; /* if 1, must use 64 bit copy operation (to keep ecc happy) */ |
| 46 | +} bsp_init_type_t; |
| 47 | + |
| 48 | +typedef struct st_bsp_init_zero_info |
| 49 | +{ |
| 50 | + uint32_t *const p_base; |
| 51 | + uint32_t *const p_limit; |
| 52 | + bsp_init_type_t type; |
| 53 | +} bsp_init_zero_info_t; |
| 54 | + |
| 55 | +typedef struct st_bsp_init_copy_info |
| 56 | +{ |
| 57 | + uint32_t *const p_base; |
| 58 | + uint32_t *const p_limit; |
| 59 | + uint32_t *const p_load; |
| 60 | + bsp_init_type_t type; |
| 61 | +} bsp_init_copy_info_t; |
| 62 | +typedef struct st_bsp_init_nocache_info |
| 63 | +{ |
| 64 | + uint32_t *const p_base; |
| 65 | + uint32_t *const p_limit; |
| 66 | +} bsp_mpu_nocache_info_t; |
| 67 | + |
| 68 | +typedef struct st_bsp_init_info |
| 69 | +{ |
| 70 | + uint32_t zero_count; |
| 71 | + bsp_init_zero_info_t const *const p_zero_list; |
| 72 | + uint32_t copy_count; |
| 73 | + bsp_init_copy_info_t const *const p_copy_list; |
| 74 | + uint32_t nocache_count; |
| 75 | + bsp_mpu_nocache_info_t const *const p_nocache_list; |
| 76 | +} bsp_init_info_t; |
| 77 | + |
| 78 | +/*********************************************************************************************************************** |
| 79 | + * Exported global variables |
| 80 | + **********************************************************************************************************************/ |
| 81 | + |
| 82 | +extern bsp_init_info_t const g_init_info; |
| 83 | +/* These symbols are used for sau/idau configuration in a secure project */ |
| 84 | + |
| 85 | +#endif // BSP_LINKER_C |
| 86 | + |
| 87 | +/* UNCRUSTIFY-ON */ |
0 commit comments