Changeset b07c332 in mainline for kernel/arch/ia32/src/mm/frame.c
- Timestamp:
- 2008-02-05T14:02:09Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b5ed4f8
- Parents:
- a0f6a61
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/frame.c
ra0f6a61 rb07c332 46 46 47 47 #include <print.h> 48 #include <console/cmd.h>49 #include <console/kconsole.h>50 48 51 49 size_t hardcoded_unmapped_ktext_size = 0; … … 56 54 static void init_e820_memory(pfn_t minconf) 57 55 { 58 int i;56 unsigned int i; 59 57 pfn_t start, conf; 60 58 size_t size; … … 64 62 start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, FRAME_SIZE)); 65 63 size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, FRAME_SIZE)); 64 66 65 if ((minconf < start) || (minconf >= start + size)) 67 66 conf = start; 68 67 else 69 68 conf = minconf; 69 70 70 zone_create(start, size, conf, 0); 71 71 72 if (last_frame < ALIGN_UP(e820table[i].base_address + 72 73 e820table[i].size, FRAME_SIZE)) … … 76 77 } 77 78 } 78 79 static int cmd_e820mem(cmd_arg_t *argv);80 static cmd_info_t e820_info = {81 .name = "e820list",82 .description = "List e820 memory.",83 .func = cmd_e820mem,84 .argc = 085 };86 79 87 80 static char *e820names[] = { … … 95 88 96 89 97 static int cmd_e820mem(cmd_arg_t *argv)90 void physmem_print(void) 98 91 { 99 92 unsigned int i; … … 112 105 e820table[i].size, name); 113 106 } 114 return 0;115 107 } 116 108 … … 118 110 void frame_arch_init(void) 119 111 { 120 staticpfn_t minconf;112 pfn_t minconf; 121 113 122 114 if (config.cpu_active == 1) { 123 cmd_initialize(&e820_info);124 cmd_register(&e820_info);125 126 115 minconf = 1; 127 116 #ifdef CONFIG_SMP 128 117 minconf = max(minconf, 129 130 118 ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + 119 hardcoded_unmapped_kdata_size)); 131 120 #endif 132 121 #ifdef CONFIG_SIMICS_FIX … … 141 130 /* Reserve AP real mode bootstrap memory */ 142 131 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 143 144 132 (hardcoded_unmapped_ktext_size + 133 hardcoded_unmapped_kdata_size) >> FRAME_WIDTH); 145 134 146 135 #ifdef CONFIG_SIMICS_FIX
Note:
See TracChangeset
for help on using the changeset viewer.