File indexing completed on 2025-05-11 08:22:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <bsp.h>
0012 #include <bsp/start.h>
0013 #include <bsp/arm-cp15-start.h>
0014
0015 #define ARM_SECTIONS 4096
0016
0017 #define ARM_SECTION_SIZE (1024 * 1024)
0018
0019
0020
0021
0022 BSP_START_DATA_SECTION static const arm_cp15_start_section_config
0023 beagle_mmu_config_table[] = {
0024 ARMV7_CP15_START_DEFAULT_SECTIONS,
0025 {
0026 .begin = 0x40000000U,
0027 .end = 0x4FFFFFFFU,
0028 .flags = ARMV7_MMU_DEVICE
0029 }
0030 };
0031
0032
0033
0034
0035 BSP_START_TEXT_SECTION void beagle_setup_mmu_and_cache(void) __attribute__ ((weak));
0036
0037 BSP_START_TEXT_SECTION void beagle_setup_mmu_and_cache(void)
0038 {
0039
0040 uint32_t ctrl = arm_cp15_start_setup_mmu_and_cache(
0041 ARM_CP15_CTRL_M | ARM_CP15_CTRL_A,
0042 ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_Z
0043 );
0044
0045 arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
0046 ctrl,
0047 (uint32_t *) bsp_translation_table_base,
0048 ARM_MMU_DEFAULT_CLIENT_DOMAIN,
0049 &beagle_mmu_config_table[0],
0050 RTEMS_ARRAY_SIZE(beagle_mmu_config_table)
0051 );
0052 }