Changeset de7663f in mainline for boot/arch/arm32/loader/mm.c
- Timestamp:
- 2007-06-13T18:39:31Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 341140c
- Parents:
- c03ee1c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/loader/mm.c
rc03ee1c rde7663f 43 43 * Will be readable/writable by kernel with no access from user mode. 44 44 * Will belong to domain 0. No cache or buffering is enabled. 45 * 46 * @param pte 47 * @param frame 45 * 46 * @param pte Section entry to initialize. 47 * @param frame First frame in the section (frame number). 48 48 * 49 * @note If frame is not 1MB aligned, first lower 1MB aligned frame will be used. 50 */ 51 static void init_pte_level0_section(pte_level0_section_t* pte, unsigned int frame) 49 * @note If frame is not 1MB aligned, first lower 1MB aligned frame will be 50 * used. 51 */ 52 static void init_pte_level0_section(pte_level0_section_t* pte, 53 unsigned int frame) 52 54 { 53 pte->descriptor_type 54 pte->bufferable 55 pte->cacheable = 0;56 pte->impl_specific 57 pte->domain 55 pte->descriptor_type = PTE_DESCRIPTOR_SECTION; 56 pte->bufferable = 0; 57 pte->cacheable = 0; 58 pte->impl_specific = 0; 59 pte->domain = 0; 58 60 pte->should_be_zero_1 = 0; 59 pte->access_permission = PTE_AP_USER_NO_KERNEL_RW; 61 pte->access_permission = PTE_AP_USER_NO_KERNEL_RW; 60 62 pte->should_be_zero_2 = 0; 61 63 pte->section_base_addr = frame; 62 64 } 63 64 65 65 66 /** Initializes page table used while booting the kernel. */ … … 69 70 const unsigned int first_kernel_page = ADDR2PFN(PA2KA(0)); 70 71 71 / / create 1:1 virtual-physical mapping (in lower 2GB)72 /* Create 1:1 virtual-physical mapping (in lower 2GB). */ 72 73 for (i = 0; i < first_kernel_page; i++) { 73 74 init_pte_level0_section(&page_table[i], i); 74 75 } 75 76 76 // create 1:1 virtual-physical mapping in kernel space (upper 2GB), 77 // physical addresses start from 0 77 /* 78 * Create 1:1 virtual-physical mapping in kernel space (upper 2GB), 79 * physical addresses start from 0. 80 */ 78 81 for (i = first_kernel_page; i < PTL0_ENTRIES; i++) { 79 82 init_pte_level0_section(&page_table[i], i - first_kernel_page); 80 83 } 81 84 } 82 83 85 84 86 /** Starts the MMU - initializes page table and enables paging. */ … … 89 91 } 90 92 91 92 93 /** @} 93 94 */ 94 95
Note:
See TracChangeset
for help on using the changeset viewer.