Changeset dcbc8be in mainline for arch/ia32/src/mm/page.c
- Timestamp:
- 2005-06-02T23:56:26Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ac5d02b
- Parents:
- 7dcbc0a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/mm/page.c
r7dcbc0a1 rdcbc8be 54 54 55 55 if (config.cpu_active == 1) { 56 dba = frame_alloc(FRAME_KA | FRAME_PANIC);56 dba = KA2PA(frame_alloc(FRAME_KA | FRAME_PANIC)); 57 57 memsetb(dba, PAGE_SIZE, 0); 58 cpu_write_dba(dba);59 58 60 59 bootstrap_dba = dba; … … 62 61 /* 63 62 * Identity mapping for all but 0th page. 63 * PA2KA(identity) mapping for all but 0th page. 64 64 */ 65 for (i = 1; i < frames; i++) 65 for (i = 1; i < frames; i++) { 66 66 map_page_to_frame(i * PAGE_SIZE, i * PAGE_SIZE, PAGE_CACHEABLE, 0); 67 map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, 0); 68 } 67 69 68 70 trap_register(14, page_fault); 71 cpu_write_dba(dba); 69 72 } 70 73 else { … … 105 108 int pde, pte; 106 109 107 dba = cpu_read_dba(); 110 // TODO: map_page_to_frame should take dba as a parameter 111 // dba = cpu_read_dba(); 112 dba = bootstrap_dba; 108 113 109 114 pde = page >> 22; /* page directory entry */ … … 117 122 * frame for the page table and clean it. 118 123 */ 119 newpt = frame_alloc(FRAME_KA);124 newpt = KA2PA(frame_alloc(FRAME_KA)); 120 125 pd[pde].frame_address = newpt >> 12; 121 126 memsetb(newpt, PAGE_SIZE, 0); … … 124 129 } 125 130 if (copy) { 126 newpt = frame_alloc(FRAME_KA);131 newpt = KA2PA(frame_alloc(FRAME_KA)); 127 132 memcopy(pd[pde].frame_address << 12, newpt, PAGE_SIZE); 128 133 pd[pde].frame_address = newpt >> 12;
Note:
See TracChangeset
for help on using the changeset viewer.