Changeset 0ab362c in mainline for boot/arch/arm32/src/mm.c


Ignore:
Timestamp:
2012-11-22T14:36:04Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e32720ff
Parents:
1f7753a (diff), 0f2c80a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge support for BeagleBoard-xM (armv7).

Most of the changes outside arm arch are pio_* stuff (addition of pio_trace capability, header consolidation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/src/mm.c

    r1f7753a r0ab362c  
    5454{
    5555        pte->descriptor_type = PTE_DESCRIPTOR_SECTION;
    56         pte->bufferable = 0;
     56        pte->bufferable = 1;
    5757        pte->cacheable = 0;
    58         pte->impl_specific = 0;
     58        pte->xn = 0;
    5959        pte->domain = 0;
    6060        pte->should_be_zero_1 = 0;
    61         pte->access_permission = PTE_AP_USER_NO_KERNEL_RW;
     61        pte->access_permission_0 = PTE_AP_USER_NO_KERNEL_RW;
     62        pte->tex = 0;
     63        pte->access_permission_1 = 0;
     64        pte->non_global = 0;
    6265        pte->should_be_zero_2 = 0;
     66        pte->non_secure = 0;
    6367        pte->section_base_addr = frame;
    6468}
     
    6771static void init_boot_pt(void)
    6872{
    69         pfn_t split_page = 0x800;
    70        
     73        const pfn_t split_page = PTL0_ENTRIES;
    7174        /* Create 1:1 virtual-physical mapping (in lower 2 GB). */
    7275        pfn_t page;
     
    7881         * (upper 2 GB), physical addresses start from 0.
    7982         */
     83        /* BeagleBoard-xM (DM37x) memory starts at 2GB border,
     84         * thus mapping only lower 2GB is not not enough.
     85         * Map entire AS 1:1 instead and hope it works. */
    8086        for (page = split_page; page < PTL0_ENTRIES; page++)
     87#ifndef MACHINE_beagleboardxm
    8188                init_ptl0_section(&boot_pt[page], page - split_page);
     89#else
     90                init_ptl0_section(&boot_pt[page], page);
     91#endif
    8292       
    8393        asm volatile (
     
    95105                /* Behave as a client of domains */
    96106                "ldr r0, =0x55555555\n"
    97                 "mcr p15, 0, r0, c3, c0, 0\n" 
     107                "mcr p15, 0, r0, c3, c0, 0\n"
    98108               
     109#ifdef PROCESSOR_armv7_a
     110                /* Read Auxiliary control register */
     111                "mrc p15, 0, r0, c1, c0, 1\n"
     112                /* Mask to enable L2 cache */
     113                "ldr r1, =0x00000002\n"
     114                "orr r0, r0, r1\n"
     115                /* Store Auxiliary control register */
     116                "mrc p15, 0, r0, c1, c0, 1\n"
     117#endif
    99118                /* Current settings */
    100119                "mrc p15, 0, r0, c1, c0, 0\n"
    101120               
     121#ifdef PROCESSOR_armv7_a
     122                /* Mask to enable paging, caching */
     123                "ldr r1, =0x00000005\n"
     124#else
    102125                /* Mask to enable paging */
    103126                "ldr r1, =0x00000001\n"
     127#endif
    104128                "orr r0, r0, r1\n"
    105129               
Note: See TracChangeset for help on using the changeset viewer.