Changeset 95498e5 in mainline for arch/ia32/src
- Timestamp:
- 2005-12-05T23:18:18Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 59b6a70
- Parents:
- eef75f6
- Location:
- arch/ia32/src/mm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/mm/frame.c
reef75f6 r95498e5 35 35 #include <panic.h> 36 36 #include <debug.h> 37 #include <align.h> 37 38 38 39 size_t hardcoded_unmapped_ktext_size = 0; 39 40 size_t hardcoded_unmapped_kdata_size = 0; 41 42 __address last_frame = 0; 40 43 41 44 void frame_arch_init(void) … … 54 57 for (i = 0; i < e820counter; i++) { 55 58 if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { 56 zone_create_in_region(e820table[i].base_address, e820table[i].size & ~(FRAME_SIZE-1)); 57 } 59 zone_create_in_region(e820table[i].base_address, e820table[i].size & ~(FRAME_SIZE-1)); 60 if (last_frame < ALIGN(e820table[i].base_address + e820table[i].size, FRAME_SIZE)) 61 last_frame = ALIGN(e820table[i].base_address + e820table[i].size, FRAME_SIZE); 62 } 58 63 } 59 64 } -
arch/ia32/src/mm/page.c
reef75f6 r95498e5 27 27 */ 28 28 29 #include <arch/mm/page.h> 30 #include <arch/mm/frame.h> 31 #include <mm/frame.h> 32 #include <mm/page.h> 29 33 #include <arch/types.h> 30 34 #include <config.h> 31 35 #include <func.h> 32 #include <mm/frame.h>33 #include <mm/page.h>34 #include <arch/mm/page.h>35 36 #include <arch/interrupt.h> 36 37 #include <arch/asm.h> … … 45 46 { 46 47 __address dba; 47 __ u32 i;48 __address cur; 48 49 49 50 if (config.cpu_active == 1) { … … 54 55 55 56 /* 56 * PA2KA(identity) mapping for all frames .57 * PA2KA(identity) mapping for all frames until last_frame. 57 58 */ 58 for ( i = 0; i < config.memory_size/PAGE_SIZE; i++)59 page_mapping_insert(PA2KA( i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, KA2PA(dba));59 for (cur = 0; cur < last_frame; cur += FRAME_SIZE) 60 page_mapping_insert(PA2KA(cur), cur, PAGE_CACHEABLE, KA2PA(dba)); 60 61 61 62 trap_register(14, page_fault);
Note:
See TracChangeset
for help on using the changeset viewer.
