12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #include <assert.h>
- #include <string.h>
- #include <platform_def.h>
- #include <arch_helpers.h>
- #include <common/bl_common.h>
- #include <drivers/generic_delay_timer.h>
- #include <plat/arm/common/plat_arm.h>
- #include <plat/common/platform.h>
- #pragma weak bl2u_platform_setup
- #pragma weak bl2u_early_platform_setup
- #pragma weak bl2u_plat_arch_setup
- #define MAP_BL2U_TOTAL MAP_REGION_FLAT( \
- BL2U_BASE, \
- BL2U_LIMIT - BL2U_BASE, \
- MT_MEMORY | MT_RW | MT_SECURE)
- void arm_bl2u_platform_setup(void)
- {
-
- plat_arm_security_setup();
- }
- void bl2u_platform_setup(void)
- {
- arm_bl2u_platform_setup();
- }
- void arm_bl2u_early_platform_setup(struct meminfo *mem_layout, void *plat_info)
- {
-
- arm_console_boot_init();
- generic_delay_timer_init();
- }
- void bl2u_early_platform_setup(struct meminfo *mem_layout, void *plat_info)
- {
- arm_bl2u_early_platform_setup(mem_layout, plat_info);
- }
- void arm_bl2u_plat_arch_setup(void)
- {
- #if USE_COHERENT_MEM
-
- assert((BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE) == 0U);
- #endif
- const mmap_region_t bl_regions[] = {
- MAP_BL2U_TOTAL,
- ARM_MAP_BL_RO,
- #if USE_ROMLIB
- ARM_MAP_ROMLIB_CODE,
- ARM_MAP_ROMLIB_DATA,
- #endif
- {0}
- };
- setup_page_tables(bl_regions, plat_arm_get_mmap());
- #ifdef __aarch64__
- enable_mmu_el1(0);
- #else
- enable_mmu_svc_mon(0);
- #endif
- arm_setup_romlib();
- }
- void bl2u_plat_arch_setup(void)
- {
- arm_bl2u_plat_arch_setup();
- }
|