Changes in / [b5a3b50:029e3cc] in mainline


Ignore:
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    rb5a3b50 r029e3cc  
    8787
    8888% 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
    89103@ "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
    93108@ "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
    97113@ "armv7_a" ARMv7-A
    98 ! [PLATFORM=arm32&MACHINE=beagleboardxm] PROCESSOR (choice)
     114! [PLATFORM=arm32&(PROCESSOR=cortex_a8)] PROCESSOR_ARCH (choice)
    99115
    100116% RAM disk format
     
    348364## armv7 made fpu hardware compulsory
    349365% FPU support
    350 ! [PLATFORM=arm32&PROCESSOR=armv7_a] CONFIG_FPU (y)
     366! [PLATFORM=arm32&PROCESSOR_ARCH=armv7_a] CONFIG_FPU (y)
    351367
    352368% FPU support
  • boot/arch/arm32/Makefile.inc

    rb5a3b50 r029e3cc  
    4949BITS = 32
    5050ENDIANESS = LE
    51 EXTRA_CFLAGS = -march=$(subst _,-,$(PROCESSOR)) -mno-unaligned-access
     51EXTRA_CFLAGS = -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access
    5252
    5353ifeq ($(MACHINE), gta02)
  • boot/arch/arm32/src/mm.c

    rb5a3b50 r029e3cc  
    130130                "mcr p15, 0, r0, c3, c0, 0\n"
    131131               
    132 #ifdef PROCESSOR_armv7_a
     132#ifdef PROCESSOR_ARCH_armv7_a
    133133                /* Read Auxiliary control register */
    134134                "mrc p15, 0, r0, c1, c0, 1\n"
     
    142142                "mrc p15, 0, r0, c1, c0, 0\n"
    143143               
    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"
    147154#else
    148155#ifdef MACHINE_gta02
     
    151158                "ldr r1, =0x00001005\n"
    152159#else
    153                 /* Mask to enable paging */
    154                 "ldr r1, =0x00000001\n"
     160                /* Mask to enable paging and branch prediction */
     161                "ldr r1, =0x00000801\n"
    155162#endif
    156163#endif
  • kernel/arch/arm32/Makefile.inc

    rb5a3b50 r029e3cc  
    3333ATSIGN = %
    3434
    35 GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR)) -mno-unaligned-access
     35GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access
    3636
    3737ifeq ($(CONFIG_FPU),y)
  • kernel/arch/arm32/include/asm.h

    rb5a3b50 r029e3cc  
    4848 * ARM920T has custom coprocessor action to do the same. See ARM920T Technical
    4949 * 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)
    5052 */
    5153NO_TRACE static inline void cpu_sleep(void)
    5254{
    53 #ifdef PROCESSOR_armv7_a
     55#ifdef PROCESSOR_ARCH_armv7_a
    5456        asm volatile ( "wfe" :: );
    55 #elif defined(MACHINE_gta02)
     57#elif defined(MACHINE_gta02) | defined(MACHINE_integratorcp)
    5658        asm volatile ( "mcr p15,0,R0,c7,c0,4" :: );
    5759#endif
  • kernel/arch/arm32/include/mm/frame.h

    rb5a3b50 r029e3cc  
    4747
    4848#ifdef MACHINE_gta02
     49
     50#define PHYSMEM_START_ADDR       0x30008000
    4951#define BOOT_PAGE_TABLE_ADDRESS  0x30010000
     52
    5053#elif defined MACHINE_beagleboardxm
     54
     55#define PHYSMEM_START_ADDR       0x80000000
    5156#define BOOT_PAGE_TABLE_ADDRESS  0x80008000
     57
    5258#else
     59
     60#define PHYSMEM_START_ADDR       0x00000000
    5361#define BOOT_PAGE_TABLE_ADDRESS  0x00008000
     62
    5463#endif
    5564
     
    5766#define BOOT_PAGE_TABLE_SIZE_IN_FRAMES  (BOOT_PAGE_TABLE_SIZE >> FRAME_WIDTH)
    5867
    59 #ifdef MACHINE_gta02
    60 #define PHYSMEM_START_ADDR      0x30008000
    61 #elif defined MACHINE_beagleboardxm
    62 #define PHYSMEM_START_ADDR      0x80000000
    63 #else
    64 #define PHYSMEM_START_ADDR      0x00000000
    65 #endif
    6668
    6769extern void frame_low_arch_init(void);
  • kernel/arch/arm32/include/mm/page.h

    rb5a3b50 r029e3cc  
    129129        set_pt_level1_present((pte_t *) (ptl3), (size_t) (i))
    130130
    131 #if defined(PROCESSOR_armv6) | defined(PROCESSOR_armv7_a)
     131#if defined(PROCESSOR_ARCH_armv6) | defined(PROCESSOR_ARCH_armv7_a)
    132132#include "page_armv6.h"
    133 #elif defined(PROCESSOR_armv4) | defined(PROCESSOR_armv5)
     133#elif defined(PROCESSOR_ARCH_armv4) | defined(PROCESSOR_ARCH_armv5)
    134134#include "page_armv4.h"
    135135#else
  • kernel/arch/arm32/include/regutils.h

    rb5a3b50 r029e3cc  
    4747#define CP15_R1_CACHE_EN          (1 << 2)
    4848#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 */
    5050#define CP15_R1_SWAP_EN           (1 << 10)
    5151#define CP15_R1_BRANCH_PREDICT_EN (1 << 11)
  • kernel/arch/arm32/src/cpu/cpu.c

    rb5a3b50 r029e3cc  
    9898void cpu_arch_init(void)
    9999{
    100 #if defined(PROCESSOR_armv7_a) | defined(PROCESSOR_armv6)
    101100        uint32_t control_reg = 0;
    102101        asm volatile (
     
    105104        );
    106105       
    107         /* Turn off tex remap, RAZ ignores writes prior to armv7 */
     106        /* Turn off tex remap, RAZ/WI prior to armv7 */
    108107        control_reg &= ~CP15_R1_TEX_REMAP_EN;
    109         /* Turn off accessed flag, RAZ ignores writes prior to armv7 */
     108        /* Turn off accessed flag, RAZ/WI prior to armv7 */
    110109        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,
    113117         * see ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition
    114118         * L.3.1 (p. 2456) */
     
    124128         *    ARM Architecture Reference Manual ARMv7-A and ARMv7-R Edition
    125129         *    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.
    128132         */
    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
    130141       
    131142        asm volatile (
     
    133144                :: [control_reg] "r" (control_reg)
    134145        );
    135 #endif
    136146#ifdef CONFIG_FPU
    137147        fpu_setup();
  • kernel/arch/arm32/src/mm/page_fault.c

    rb5a3b50 r029e3cc  
    174174}
    175175
    176 #if defined(PROCESSOR_armv4) | defined(PROCESSOR_armv5)
     176#if defined(PROCESSOR_ARCH_armv4) | defined(PROCESSOR_ARCH_armv5)
    177177/** Decides whether read or write into memory is requested.
    178178 *
     
    281281        }
    282282
    283 #if defined(PROCESSOR_armv6) | defined(PROCESSOR_armv7_a)
     283#if defined(PROCESSOR_ARCH_armv6) | defined(PROCESSOR_ARCH_armv7_a)
    284284        const pf_access_t access =
    285285            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)
    287287        const pf_access_t access = get_memory_access_type(istate->pc, badvaddr);
    288288#else
  • uspace/lib/c/arch/arm32/Makefile.common

    rb5a3b50 r029e3cc  
    2828#
    2929
    30 GCC_CFLAGS += -ffixed-r9 -mtp=soft -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR))
     30GCC_CFLAGS += -ffixed-r9 -mtp=soft -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH))
    3131
    3232ifeq ($(CONFIG_FPU),y)
Note: See TracChangeset for help on using the changeset viewer.