Changeset ac5d02b in mainline for arch/ia32/src/mm/page.c
- Timestamp:
- 2005-06-03T13:17:05Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 70527f1
- Parents:
- dcbc8be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/mm/page.c
rdcbc8be rac5d02b 36 36 #include <arch/asm.h> 37 37 #include <synch/spinlock.h> 38 #include <debug.h> 38 39 39 40 /* … … 54 55 55 56 if (config.cpu_active == 1) { 56 dba = KA2PA(frame_alloc(FRAME_KA | FRAME_PANIC));57 dba = frame_alloc(FRAME_KA | FRAME_PANIC); 57 58 memsetb(dba, PAGE_SIZE, 0); 58 59 … … 69 70 70 71 trap_register(14, page_fault); 71 cpu_write_dba( dba);72 cpu_write_dba(KA2PA(dba)); 72 73 } 73 74 else { … … 82 83 dba = frame_alloc(FRAME_KA | FRAME_PANIC); 83 84 memcopy(bootstrap_dba, dba, PAGE_SIZE); 84 cpu_write_dba( dba);85 cpu_write_dba(KA2PA(dba)); 85 86 } 86 87 … … 122 123 * frame for the page table and clean it. 123 124 */ 124 newpt = KA2PA(frame_alloc(FRAME_KA));125 pd[pde].frame_address = newpt>> 12;125 newpt = frame_alloc(FRAME_KA); 126 pd[pde].frame_address = KA2PA(newpt) >> 12; 126 127 memsetb(newpt, PAGE_SIZE, 0); 127 128 pd[pde].present = 1; … … 129 130 } 130 131 if (copy) { 131 newpt = KA2PA(frame_alloc(FRAME_KA));132 newpt = frame_alloc(FRAME_KA); 132 133 memcopy(pd[pde].frame_address << 12, newpt, PAGE_SIZE); 133 pd[pde].frame_address = newpt>> 12;134 pd[pde].frame_address = KA2PA(newpt) >> 12; 134 135 } 135 136
Note:
See TracChangeset
for help on using the changeset viewer.