Changes in / [b5a3b50:029e3cc] in mainline
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rb5a3b50 r029e3cc 87 87 88 88 % CPU type 89 @ "cortex_a8" ARM Cortex A-8 90 ! [PLATFORM=arm32&MACHINE=beagleboardxm] PROCESSOR (choice) 91 92 % CPU type 93 @ "arm920t" ARM920T 94 ! [PLATFORM=arm32&MACHINE=gta02] PROCESSOR (choice) 95 96 % CPU type 97 @ "arm926ej_s" ARM926EJ-S 98 ! [PLATFORM=arm32&MACHINE=integratorcp] PROCESSOR (choice) 99 100 101 # Add more ARMv4 CPUs 102 % CPU arch 89 103 @ "armv4" ARMv4 90 ! [PLATFORM=arm32&(MACHINE=gta02)] PROCESSOR (choice) 91 92 % CPU type 104 ! [PLATFORM=arm32&(PROCESSOR=arm920t)] PROCESSOR_ARCH (choice) 105 106 # Add more ARMv5 CPUs 107 % CPU arch 93 108 @ "armv5" ARMv5 94 ! [PLATFORM=arm32&MACHINE=integratorcp] PROCESSOR (choice) 95 96 % CPU type 109 ! [PLATFORM=arm32&(PROCESSOR=arm926ej_s)] PROCESSOR_ARCH (choice) 110 111 # Add more ARMv7-A CPUs 112 % CPU arch 97 113 @ "armv7_a" ARMv7-A 98 ! [PLATFORM=arm32& MACHINE=beagleboardxm] PROCESSOR(choice)114 ! [PLATFORM=arm32&(PROCESSOR=cortex_a8)] PROCESSOR_ARCH (choice) 99 115 100 116 % RAM disk format … … 348 364 ## armv7 made fpu hardware compulsory 349 365 % FPU support 350 ! [PLATFORM=arm32&PROCESSOR =armv7_a] CONFIG_FPU (y)366 ! [PLATFORM=arm32&PROCESSOR_ARCH=armv7_a] CONFIG_FPU (y) 351 367 352 368 % FPU support -
boot/arch/arm32/Makefile.inc
rb5a3b50 r029e3cc 49 49 BITS = 32 50 50 ENDIANESS = LE 51 EXTRA_CFLAGS = -march=$(subst _,-,$(PROCESSOR )) -mno-unaligned-access51 EXTRA_CFLAGS = -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access 52 52 53 53 ifeq ($(MACHINE), gta02) -
boot/arch/arm32/src/mm.c
rb5a3b50 r029e3cc 130 130 "mcr p15, 0, r0, c3, c0, 0\n" 131 131 132 #ifdef PROCESSOR_ armv7_a132 #ifdef PROCESSOR_ARCH_armv7_a 133 133 /* Read Auxiliary control register */ 134 134 "mrc p15, 0, r0, c1, c0, 1\n" … … 142 142 "mrc p15, 0, r0, c1, c0, 0\n" 143 143 144 #ifdef PROCESSOR_armv7_a 145 /* Mask to enable paging, caching */ 146 "ldr r1, =0x00000005\n" 144 #ifdef PROCESSOR_cortex_a8 145 /* Mask to enable paging, I-cache D-cache and branch predict 146 * See kernel/arch/arm32/include/regutils.h for bit values. 147 * It's safe because Cortex-A8 implements IVIPT extension 148 * See Cortex-A8 TRM ch. 7.2.6 p. 7-4 (PDF 245) */ 149 "ldr r1, =0x00001805\n" 150 #elif defined(PROCESSOR_ARCH_armv7_a) | defined(PROCESSOR_ARCH_armv6) 151 /* Enable paging, data cache and branch prediction 152 * see arch/arm32/src/cpu/cpu.c for reasoning */ 153 "ldr r1, =0x00000805\n" 147 154 #else 148 155 #ifdef MACHINE_gta02 … … 151 158 "ldr r1, =0x00001005\n" 152 159 #else 153 /* Mask to enable paging */154 "ldr r1, =0x00000 001\n"160 /* Mask to enable paging and branch prediction */ 161 "ldr r1, =0x00000801\n" 155 162 #endif 156 163 #endif -
kernel/arch/arm32/Makefile.inc
rb5a3b50 r029e3cc 33 33 ATSIGN = % 34 34 35 GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR )) -mno-unaligned-access35 GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access 36 36 37 37 ifeq ($(CONFIG_FPU),y) -
kernel/arch/arm32/include/asm.h
rb5a3b50 r029e3cc 48 48 * ARM920T has custom coprocessor action to do the same. See ARM920T Technical 49 49 * Reference Manual ch 4.9 p. 4-23 (103 in the PDF) 50 * ARM926EJ-S uses the same coprocessor instruction as ARM920T. See ARM926EJ-S 51 * chapter 2.3.8 p.2-22 (52 in the PDF) 50 52 */ 51 53 NO_TRACE static inline void cpu_sleep(void) 52 54 { 53 #ifdef PROCESSOR_ armv7_a55 #ifdef PROCESSOR_ARCH_armv7_a 54 56 asm volatile ( "wfe" :: ); 55 #elif defined(MACHINE_gta02) 57 #elif defined(MACHINE_gta02) | defined(MACHINE_integratorcp) 56 58 asm volatile ( "mcr p15,0,R0,c7,c0,4" :: ); 57 59 #endif -
kernel/arch/arm32/include/mm/frame.h
rb5a3b50 r029e3cc 47 47 48 48 #ifdef MACHINE_gta02 49 50 #define PHYSMEM_START_ADDR 0x30008000 49 51 #define BOOT_PAGE_TABLE_ADDRESS 0x30010000 52 50 53 #elif defined MACHINE_beagleboardxm 54 55 #define PHYSMEM_START_ADDR 0x80000000 51 56 #define BOOT_PAGE_TABLE_ADDRESS 0x80008000 57 52 58 #else 59 60 #define PHYSMEM_START_ADDR 0x00000000 53 61 #define BOOT_PAGE_TABLE_ADDRESS 0x00008000 62 54 63 #endif 55 64 … … 57 66 #define BOOT_PAGE_TABLE_SIZE_IN_FRAMES (BOOT_PAGE_TABLE_SIZE >> FRAME_WIDTH) 58 67 59 #ifdef MACHINE_gta0260 #define PHYSMEM_START_ADDR 0x3000800061 #elif defined MACHINE_beagleboardxm62 #define PHYSMEM_START_ADDR 0x8000000063 #else64 #define PHYSMEM_START_ADDR 0x0000000065 #endif66 68 67 69 extern void frame_low_arch_init(void); -
kernel/arch/arm32/include/mm/page.h
rb5a3b50 r029e3cc 129 129 set_pt_level1_present((pte_t *) (ptl3), (size_t) (i)) 130 130 131 #if defined(PROCESSOR_ armv6) | defined(PROCESSOR_armv7_a)131 #if defined(PROCESSOR_ARCH_armv6) | defined(PROCESSOR_ARCH_armv7_a) 132 132 #include "page_armv6.h" 133 #elif defined(PROCESSOR_ armv4) | defined(PROCESSOR_armv5)133 #elif defined(PROCESSOR_ARCH_armv4) | defined(PROCESSOR_ARCH_armv5) 134 134 #include "page_armv4.h" 135 135 #else -
kernel/arch/arm32/include/regutils.h
rb5a3b50 r029e3cc 47 47 #define CP15_R1_CACHE_EN (1 << 2) 48 48 #define CP15_R1_CP15_BARRIER_EN (1 << 5) 49 #define CP15_R1_B_EN (1 << 7) /* ARMv6- only big endian switch */49 #define CP15_R1_B_EN (1 << 7) /* ARMv6- only, big endian switch */ 50 50 #define CP15_R1_SWAP_EN (1 << 10) 51 51 #define CP15_R1_BRANCH_PREDICT_EN (1 << 11) -
kernel/arch/arm32/src/cpu/cpu.c
rb5a3b50 r029e3cc 98 98 void cpu_arch_init(void) 99 99 { 100 #if defined(PROCESSOR_armv7_a) | defined(PROCESSOR_armv6)101 100 uint32_t control_reg = 0; 102 101 asm volatile ( … … 105 104 ); 106 105 107 /* Turn off tex remap, RAZ ignores writesprior to armv7 */106 /* Turn off tex remap, RAZ/WI prior to armv7 */ 108 107 control_reg &= ~CP15_R1_TEX_REMAP_EN; 109 /* Turn off accessed flag, RAZ ignores writesprior to armv7 */108 /* Turn off accessed flag, RAZ/WI prior to armv7 */ 110 109 control_reg &= ~(CP15_R1_ACCESS_FLAG_EN | CP15_R1_HW_ACCESS_FLAG_EN); 111 /* Enable unaligned access, RAZ ignores writes prior to armv6 112 * switchable on armv6, RAO ignores writes on armv7, 110 /* Enable branch prediction RAZ/WI if not supported */ 111 control_reg |= CP15_R1_BRANCH_PREDICT_EN; 112 113 /* Unaligned access is supported on armv6+ */ 114 #if defined(PROCESSOR_ARCH_armv7_a) | defined(PROCESSOR_ARCH_armv6) 115 /* Enable unaligned access, RAZ/WI prior to armv6 116 * switchable on armv6, RAO/WI writes on armv7, 113 117 * see ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition 114 118 * L.3.1 (p. 2456) */ … … 124 128 * ARM Architecture Reference Manual ARMv7-A and ARMv7-R Edition 125 129 * B3.11.1 (p. 1383) 126 * ICache coherency is elaborate on in barrier.h.127 * We are safe to turn these on.130 * We are safe to turn this on. For arm v6 see ch L.6.2 (p. 2469) 131 * L2 Cache for armv7 was enabled in boot code. 128 132 */ 129 control_reg |= CP15_R1_CACHE_EN | CP15_R1_INST_CACHE_EN; 133 control_reg |= CP15_R1_CACHE_EN; 134 #endif 135 #ifdef PROCESSOR_cortex_a8 136 /* ICache coherency is elaborate on in barrier.h. 137 * Cortex-A8 implements IVIPT extension. 138 * Cortex-A8 TRM ch. 7.2.6 p. 7-4 (PDF 245) */ 139 control_reg |= CP15_R1_INST_CACHE_EN; 140 #endif 130 141 131 142 asm volatile ( … … 133 144 :: [control_reg] "r" (control_reg) 134 145 ); 135 #endif136 146 #ifdef CONFIG_FPU 137 147 fpu_setup(); -
kernel/arch/arm32/src/mm/page_fault.c
rb5a3b50 r029e3cc 174 174 } 175 175 176 #if defined(PROCESSOR_ armv4) | defined(PROCESSOR_armv5)176 #if defined(PROCESSOR_ARCH_armv4) | defined(PROCESSOR_ARCH_armv5) 177 177 /** Decides whether read or write into memory is requested. 178 178 * … … 281 281 } 282 282 283 #if defined(PROCESSOR_ armv6) | defined(PROCESSOR_armv7_a)283 #if defined(PROCESSOR_ARCH_armv6) | defined(PROCESSOR_ARCH_armv7_a) 284 284 const pf_access_t access = 285 285 fsr.data.wr ? PF_ACCESS_WRITE : PF_ACCESS_READ; 286 #elif defined(PROCESSOR_ armv4) | defined(PROCESSOR_armv5)286 #elif defined(PROCESSOR_ARCH_armv4) | defined(PROCESSOR_ARCH_armv5) 287 287 const pf_access_t access = get_memory_access_type(istate->pc, badvaddr); 288 288 #else -
uspace/lib/c/arch/arm32/Makefile.common
rb5a3b50 r029e3cc 28 28 # 29 29 30 GCC_CFLAGS += -ffixed-r9 -mtp=soft -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR ))30 GCC_CFLAGS += -ffixed-r9 -mtp=soft -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) 31 31 32 32 ifeq ($(CONFIG_FPU),y)
Note:
See TracChangeset
for help on using the changeset viewer.