Changeset d8c0dc5 in mainline
- Timestamp:
- 2008-12-31T13:35:39Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 666773c
- Parents:
- 2f08ff55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/frame.c
r2f08ff55 rd8c0dc5 41 41 #include <macros.h> 42 42 43 #define KERNEL_RESERVED_AREA_BASE (0x4400000)44 #define KERNEL_RESERVED_AREA_SIZE (16*1024*1024)43 #define KERNEL_RESERVED_AREA_BASE (0x4400000) 44 #define KERNEL_RESERVED_AREA_SIZE (16 * 1024 * 1024) 45 45 46 #define ONE_TO_ONE_MAPPING_SIZE (256*1048576) // Mapped at start 46 #define ROM_BASE 0xa0000 /* for simulators */ 47 #define ROM_SIZE (384 * 1024) /* for simulators */ 47 48 48 #define ROM_BASE 0xa0000 //For ski 49 #define ROM_SIZE (384 * 1024) //For ski 50 void poke_char(int x,int y,char ch, char c); 49 #define MIN_ZONE_SIZE (64 * 1024) 51 50 52 #define MIN _ZONE_SIZE (64*1024)51 #define MINCONF 1 53 52 54 53 uintptr_t last_frame; 55 #define MINCONF 156 54 57 55 void frame_arch_init(void) 58 56 { 57 if (config.cpu_active == 1) { 58 unsigned int i; 59 for (i = 0; i < bootinfo->memmap_items; i++) { 60 if (bootinfo->memmap[i].type == EFI_MEMMAP_FREE_MEM) { 61 uint64_t base = bootinfo->memmap[i].base; 62 uint64_t size = bootinfo->memmap[i].size; 63 uint64_t abase = ALIGN_UP(base, FRAME_SIZE); 59 64 60 if(config.cpu_active==1){ 61 62 63 64 unsigned int i; 65 for(i=0;i<bootinfo->memmap_items;i++){ 66 if (bootinfo->memmap[i].type==EFI_MEMMAP_FREE_MEM){ 67 uint64_t base=bootinfo->memmap[i].base; 68 uint64_t size=bootinfo->memmap[i].size; 69 uint64_t abase=ALIGN_UP(base,FRAME_SIZE); 70 if(size>FRAME_SIZE) size -=abase-base; 71 65 if (size > FRAME_SIZE) 66 size -= abase - base; 72 67 73 if(size>MIN_ZONE_SIZE) { 74 zone_create(abase >> FRAME_WIDTH, (size) >> FRAME_WIDTH, max(MINCONF,((abase) >> FRAME_WIDTH)), 0); 68 if (size > MIN_ZONE_SIZE) { 69 zone_create(abase >> FRAME_WIDTH, 70 size >> FRAME_WIDTH, 71 max(MINCONF, abase >> FRAME_WIDTH), 72 0); 75 73 } 76 74 } … … 78 76 79 77 /* 80 * Blacklist ROM regions. 81 */ 82 frame_mark_unavailable(ADDR2PFN(ROM_BASE), SIZE2FRAMES(ROM_SIZE)); 78 * Blacklist ROM regions. 79 */ 80 frame_mark_unavailable(ADDR2PFN(ROM_BASE), 81 SIZE2FRAMES(ROM_SIZE)); 83 82 84 frame_mark_unavailable(ADDR2PFN(KERNEL_RESERVED_AREA_BASE), SIZE2FRAMES(KERNEL_RESERVED_AREA_SIZE)); 83 frame_mark_unavailable(ADDR2PFN(KERNEL_RESERVED_AREA_BASE), 84 SIZE2FRAMES(KERNEL_RESERVED_AREA_SIZE)); 85 85 } 86 86 }
Note:
See TracChangeset
for help on using the changeset viewer.