Ignore:
File:
1 edited

Legend:

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

    r6b3ee0c5 r4872160  
    5454{
    5555        pte->descriptor_type = PTE_DESCRIPTOR_SECTION;
    56         pte->bufferable = 1;
     56        pte->bufferable = 0;
    5757        pte->cacheable = 0;
    58         pte->xn = 0;
     58        pte->impl_specific = 0;
    5959        pte->domain = 0;
    6060        pte->should_be_zero_1 = 0;
    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;
     61        pte->access_permission = PTE_AP_USER_NO_KERNEL_RW;
    6562        pte->should_be_zero_2 = 0;
    66         pte->non_secure = 0;
    6763        pte->section_base_addr = frame;
    6864}
     
    7167static void init_boot_pt(void)
    7268{
    73         const pfn_t split_page = PTL0_ENTRIES;
     69        pfn_t split_page = 0x800;
     70       
    7471        /* Create 1:1 virtual-physical mapping (in lower 2 GB). */
    7572        pfn_t page;
     
    8178         * (upper 2 GB), physical addresses start from 0.
    8279         */
    83         /* BeagleBoard-xM (MD37x) 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. */
    8680        for (page = split_page; page < PTL0_ENTRIES; page++)
    87 #ifndef MACHINE_beagleboardxm
    8881                init_ptl0_section(&boot_pt[page], page - split_page);
    89 #else
    90                 init_ptl0_section(&boot_pt[page], page);
    91 #endif
    9282       
    9383        asm volatile (
     
    10595                /* Behave as a client of domains */
    10696                "ldr r0, =0x55555555\n"
    107                 "mcr p15, 0, r0, c3, c0, 0\n"
     97                "mcr p15, 0, r0, c3, c0, 0\n" 
    10898               
    109 #ifdef PROCESSOR_armv7
    110                 /* Clean L2 cache */
    111                 "mov r12, #0x1\n"   //set up to invalidate L2
    112                 "smc #0\n"  //Call SMI monitor
    113                
    114                 /* Read Auxiliary control register */
    115                 "mrc p15, 0, r0, c1, c0, 1\n"
    116                 /* Mask to enable L2 cache */
    117                 "ldr r1, =0x00000002\n"
    118                 "orr r0, r0, r1\n"
    119                 /* Store Auxiliary control register */
    120                 "mrc p15, 0, r0, c1, c0, 1\n"
    121 #endif
    12299                /* Current settings */
    123100                "mrc p15, 0, r0, c1, c0, 0\n"
    124101               
    125 #ifdef PROCESSOR_armv7
    126                 /* Mask to enable paging, alignment and caching */
    127                 "ldr r1, =0x00000007\n"
    128 #else
    129102                /* Mask to enable paging */
    130103                "ldr r1, =0x00000001\n"
    131 #endif
    132104                "orr r0, r0, r1\n"
    133105               
Note: See TracChangeset for help on using the changeset viewer.