Changeset 4d02595 in mainline
- Timestamp:
- 2012-04-02T22:45:50Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6b3ee0c5
- Parents:
- 1bd99214
- Location:
- boot/arch/arm32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/include/mm.h
r1bd99214 r4d02595 58 58 unsigned int bufferable : 1; 59 59 unsigned int cacheable : 1; 60 unsigned int impl_specific: 1;60 unsigned int xn : 1; 61 61 unsigned int domain : 4; 62 62 unsigned int should_be_zero_1 : 1; 63 unsigned int access_permission : 2; 64 unsigned int should_be_zero_2 : 8; 63 unsigned int access_permission_0 : 2; 64 unsigned int tex : 3; 65 unsigned int access_permission_1 : 2; 66 unsigned int non_global : 1; 67 unsigned int should_be_zero_2 : 1; 68 unsigned int non_secure : 1; 65 69 unsigned int section_base_addr : 12; 66 70 } __attribute__((packed)) pte_level0_section_t; -
boot/arch/arm32/src/mm.c
r1bd99214 r4d02595 54 54 { 55 55 pte->descriptor_type = PTE_DESCRIPTOR_SECTION; 56 pte->bufferable = 0;56 pte->bufferable = 1; 57 57 pte->cacheable = 0; 58 pte-> impl_specific= 0;58 pte->xn = 0; 59 59 pte->domain = 0; 60 60 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; 62 65 pte->should_be_zero_2 = 0; 66 pte->non_secure = 0; 63 67 pte->section_base_addr = frame; 64 68 } … … 67 71 static void init_boot_pt(void) 68 72 { 69 /* BeagleBoard-xM (MD37x) memory starts at 2GB border,70 * thus mapping only lower 2GB is not not enough.71 * Map entire AS 1:1 instead and hope it works. */72 #ifdef MACHINE_beagleboardxm73 73 const pfn_t split_page = PTL0_ENTRIES; 74 #else75 const pfn_t split_page = 0x800;76 #endif77 74 /* Create 1:1 virtual-physical mapping (in lower 2 GB). */ 78 75 pfn_t page; … … 84 81 * (upper 2 GB), physical addresses start from 0. 85 82 */ 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. */ 86 86 for (page = split_page; page < PTL0_ENTRIES; page++) 87 #ifndef MACHINE_beagleboardxm 87 88 init_ptl0_section(&boot_pt[page], page - split_page); 89 #else 90 init_ptl0_section(&boot_pt[page], page); 91 #endif 88 92 89 93 asm volatile ( … … 106 110 "mrc p15, 0, r0, c1, c0, 0\n" 107 111 108 /* Mask to enable paging */109 "ldr r1, =0x0000000 1\n"112 /* Mask to enable paging, alignment and caching */ 113 "ldr r1, =0x00000007\n" 110 114 "orr r0, r0, r1\n" 111 115
Note:
See TracChangeset
for help on using the changeset viewer.