Changeset 95498e5 in mainline
- Timestamp:
- 2005-12-05T23:18:18Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 59b6a70
- Parents:
- eef75f6
- Location:
- arch
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/mm/frame.h
reef75f6 r95498e5 30 30 #define __amd64_FRAME_H__ 31 31 32 #ifndef __ASM__ 33 #include <arch/types.h> 34 #endif /* __ASM__ */ 35 32 36 #define FRAME_SIZE 4096 33 37 34 38 #ifndef __ASM__ 39 extern __address last_frame; 35 40 extern void frame_arch_init(void); 36 #endif 41 #endif /* __ASM__ */ 37 42 38 43 #endif -
arch/amd64/src/mm/page.c
reef75f6 r95498e5 27 27 */ 28 28 29 #include <arch/mm/page.h> 30 #include <arch/mm/frame.h> 29 31 #include <mm/page.h> 30 32 #include <mm/frame.h> 31 #include <arch/mm/page.h>32 33 #include <arch/interrupt.h> 33 34 #include <arch/asm.h> 34 35 #include <config.h> 35 36 36 #include <memstr.h> 37 38 37 39 38 __address bootstrap_dba; … … 42 41 { 43 42 __address dba; 44 count_t i;43 __address cur; 45 44 46 45 if (config.cpu_active == 1) { … … 53 52 * PA2KA(identity) mapping for all frames. 54 53 */ 55 for ( i = 0; i < config.memory_size/FRAME_SIZE; i++) {56 page_mapping_insert(PA2KA( i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));54 for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { 55 page_mapping_insert(PA2KA(cur), cur, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba)); 57 56 } 58 57 -
arch/ia32/include/boot/memmap.h
reef75f6 r95498e5 56 56 __u64 size; 57 57 __u32 type; 58 58 } __attribute__ ((packed)); 59 59 60 60 extern struct e820memmap_ e820table[MEMMAP_E820_MAX_RECORDS]; … … 62 62 extern __u8 e820counter; 63 63 64 extern __u32 e801memorysize; / / size of memory in KB64 extern __u32 e801memorysize; /**< Size of available memory in KB. */ 65 65 66 66 #endif -
arch/ia32/include/mm/frame.h
reef75f6 r95498e5 35 35 36 36 extern __address bootstrap_dba; 37 extern __address last_frame; 37 38 38 39 extern void frame_arch_init(void); -
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.