25 lines
718 B
C
25 lines
718 B
C
#include <stdint.h>
|
|
|
|
#define BOOT_HEADER_SIGNATURE_VALID 0x46434642 /* FCFB */
|
|
#define BOOT_HEADER_CONFIG_INIT_SDRAM_Pos 0
|
|
#define BOOT_HEADER_CONFIG_INIT_SDRAM_Msk (1 << BOOT_HEADER_CONFIG_INIT_SDRAM_Pos)
|
|
#define BOOT_HEADER_CONFIG_KEEP_RTC_Pos 1
|
|
#define BOOT_HEADER_CONFIG_KEEP_RTC_Msk (1 << BOOT_HEADER_CONFIG_KEEP_RTC_Msk)
|
|
|
|
typedef struct {
|
|
uint32_t signature;
|
|
uint32_t config;
|
|
uint32_t base;
|
|
} boot_header_t;
|
|
|
|
#ifdef XIP_BOOT_ENABLED
|
|
__attribute__((section(".xip_fcfb"))) const boot_header_t boot_hdr = {
|
|
.signature = BOOT_HEADER_SIGNATURE_VALID,
|
|
#ifdef XIP_ENABLE_SDRAM
|
|
.config = BOOT_HEADER_CONFIG_INIT_SDRAM_Msk,
|
|
#else
|
|
.config = 0UL,
|
|
#endif
|
|
.base = 0x90001000UL,
|
|
};
|
|
#endif |