Changeset 39539da in mainline
- Timestamp:
- 2005-11-21T22:15:05Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8cd20b70
- Parents:
- db79676
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/mm/page.c
rdb79676 r39539da 54 54 */ 55 55 for (i = 0; i < config.memory_size/FRAME_SIZE; i++) { 56 map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));56 page_mapping_insert(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba)); 57 57 } 58 58 -
arch/ia32/src/drivers/ega.c
rdb79676 r39539da 50 50 __u8 hi, lo; 51 51 52 map_page_to_frame(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0);52 page_mapping_insert(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0); 53 53 outb(0x3d4,0xe); 54 54 hi = inb(0x3d5); -
arch/ia32/src/mm/page.c
rdb79676 r39539da 57 57 */ 58 58 for (i = 0; i < config.memory_size/PAGE_SIZE; i++) 59 map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, KA2PA(dba));59 page_mapping_insert(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, KA2PA(dba)); 60 60 61 61 trap_register(14, page_fault); -
arch/ia32/src/smp/smp.c
rdb79676 r39539da 64 64 65 65 if (config.cpu_count > 1) { 66 map_page_to_frame((__address)l_apic, (__address)l_apic,66 page_mapping_insert((__address)l_apic, (__address)l_apic, 67 67 PAGE_NOT_CACHEABLE, 0); 68 map_page_to_frame((__address) io_apic,68 page_mapping_insert((__address) io_apic, 69 69 (__address) io_apic, 70 70 PAGE_NOT_CACHEABLE, 0); -
arch/mips32/src/mm/tlb.c
rdb79676 r39539da 367 367 * Handler cannot succeed if badvaddr has no mapping. 368 368 */ 369 pte = find_mapping(badvaddr, 0);369 pte = page_mapping_find(badvaddr, 0); 370 370 if (!pte) { 371 371 printf("No such mapping.\n"); -
genarch/src/acpi/acpi.c
rdb79676 r39539da 80 80 static void map_sdt(struct acpi_sdt_header *sdt) 81 81 { 82 map_page_to_frame((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0);82 page_mapping_insert((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0); 83 83 map_structure((__address) sdt, sdt->length); 84 84 } -
generic/include/mm/page.h
rdb79676 r39539da 108 108 109 109 extern void page_init(void); 110 extern void map_page_to_frame(__address page, __address frame, int flags, __address root);111 extern pte_t * find_mapping(__address page, __address root);110 extern void page_mapping_insert(__address page, __address frame, int flags, __address root); 111 extern pte_t *page_mapping_find(__address page, __address root); 112 112 extern void map_structure(__address s, size_t size); 113 113 -
generic/src/mm/page.c
rdb79676 r39539da 38 38 { 39 39 page_arch_init(); 40 map_page_to_frame(0x0, 0x0, PAGE_NOT_PRESENT, 0);40 page_mapping_insert(0x0, 0x0, PAGE_NOT_PRESENT, 0); 41 41 } 42 42 … … 58 58 59 59 for (i = 0; i < cnt; i++) 60 map_page_to_frame(s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);60 page_mapping_insert(s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0); 61 61 62 62 } … … 72 72 * @param root Explicit PTL0 address. 73 73 */ 74 void map_page_to_frame(__address page, __address frame, int flags, __address root)74 void page_mapping_insert(__address page, __address frame, int flags, __address root) 75 75 { 76 76 pte_t *ptl0, *ptl1, *ptl2, *ptl3; … … 119 119 * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise. 120 120 */ 121 pte_t * find_mapping(__address page, __address root)121 pte_t *page_mapping_find(__address page, __address root) 122 122 { 123 123 pte_t *ptl0, *ptl1, *ptl2, *ptl3; -
generic/src/mm/vm.c
rdb79676 r39539da 162 162 ASSERT(m->ptl0); 163 163 for (i=0; i<a->size; i++) 164 map_page_to_frame(a->address + i*PAGE_SIZE, a->mapping[i], flags, (__address) m->ptl0);164 page_mapping_insert(a->address + i*PAGE_SIZE, a->mapping[i], flags, (__address) m->ptl0); 165 165 166 166 spinlock_unlock(&a->lock); … … 180 180 ASSERT(m->ptl0); 181 181 for (i=0; i<a->size; i++) 182 map_page_to_frame(a->address + i*PAGE_SIZE, 0, PAGE_NOT_PRESENT, (__address) m->ptl0);182 page_mapping_insert(a->address + i*PAGE_SIZE, 0, PAGE_NOT_PRESENT, (__address) m->ptl0); 183 183 184 184 spinlock_unlock(&a->lock); -
test/mm/mapping1/test.c
rdb79676 r39539da 56 56 57 57 printf("Mapping virtual address %P to physical address %P.\n", PAGE0, KA2PA(frame0)); 58 map_page_to_frame(PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE, 0);58 page_mapping_insert(PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE, 0); 59 59 printf("Mapping virtual address %P to physical address %P.\n", PAGE1, KA2PA(frame1)); 60 map_page_to_frame(PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE, 0);60 page_mapping_insert(PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE, 0); 61 61 62 62 printf("Value at virtual address %P is %L.\n", PAGE0, v0 = *((__u32 *) PAGE0));
Note:
See TracChangeset
for help on using the changeset viewer.