Changeset ef67bab in mainline for arch/amd64/src/mm/page.c
- Timestamp:
- 2006-02-01T00:02:16Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 071a8ae6
- Parents:
- fc1e4f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/mm/page.c
rfc1e4f6 ref67bab 39 39 #include <interrupt.h> 40 40 41 static __address bootstrap_dba;42 43 41 void page_arch_init(void) 44 42 { 45 __address dba;46 43 __address cur; 47 44 … … 49 46 page_operations = &page_pt_operations; 50 47 51 dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME, NULL);52 memsetb(dba, PAGE_SIZE, 0);53 54 bootstrap_dba = dba;55 56 48 /* 57 49 * PA2KA(identity) mapping for all frames. 58 50 */ 59 51 for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { 60 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, PAGE_CACHEABLE | PAGE_EXEC , KA2PA(dba));52 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, PAGE_CACHEABLE | PAGE_EXEC); 61 53 } 62 54 63 55 exc_register(14, "page_fault", page_fault); 64 write_cr3( KA2PA(dba));56 write_cr3((__address) AS_KERNEL->page_table); 65 57 } 66 58 else { 67 write_cr3( KA2PA(bootstrap_dba));59 write_cr3((__address) AS_KERNEL->page_table); 68 60 } 69 61 }
Note:
See TracChangeset
for help on using the changeset viewer.