Changeset 939dfd7 in mainline
- Timestamp:
- 2005-12-09T18:29:34Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 705b4149
- Parents:
- ef0e259
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/include/drivers/arc.h
ref0e259 r939dfd7 34 34 #define ARC_BASE_ADDR 0x1000; 35 35 #define ARC_MAGIC 0x53435241 36 /* Frame size used by ARC */ 37 #define ARC_FRAME 4096 36 38 37 39 typedef enum { … … 208 210 }__attribute__ ((packed)) arc_sbp; 209 211 210 extern int init_arc(void);212 extern int arc_init(void); 211 213 extern void arc_print_memory_map(void); 212 214 extern int arc_enabled(void); … … 214 216 extern void arc_print_devices(void); 215 217 extern int arc_getchar(void); 218 void arc_frame_init(void); 219 216 220 #endif -
arch/mips32/include/mm/memory_init.h
ref0e259 r939dfd7 32 32 #include <config.h> 33 33 34 /* When this function is called, we do not have ARC initiated 35 * - provide some reasonable minimum and update it later 36 */ 34 37 #define get_memory_size() CONFIG_MEMORY_SIZE 35 //#define get_memory_size() 150*1024*102436 38 37 39 #endif -
arch/mips32/src/drivers/arc.c
ref0e259 r939dfd7 32 32 #include <arch.h> 33 33 #include <arch/byteorder.h> 34 #include <arch/mm/frame.h> 35 #include <mm/frame.h> 34 36 35 37 /* This is a good joke, SGI HAS different types than NT bioses... */ … … 102 104 * @return 0 - ARC OK, -1 - ARC does not exist 103 105 */ 104 int init_arc(void)106 int arc_init(void) 105 107 { 106 108 if (sbp->signature != ARC_MAGIC) { … … 166 168 while (desc) { 167 169 printf("%s: %d (size: %dKB)\n",basetypes[desc->type], 168 desc->basepage * 4096,169 desc->basecount* 4);170 desc->basepage * ARC_FRAME, 171 desc->basecount*ARC_FRAME/1024); 170 172 desc = arc_entry->getmemorydescriptor(desc); 171 173 } … … 203 205 return ch; 204 206 } 207 208 /* Initialize frame zones from ARC firmware. 209 * In the future we may use even the FirmwareTemporary regions, 210 * currently we use the FreeMemory (what about the LoadedProgram?) 211 */ 212 void arc_frame_init(void) 213 { 214 arc_memdescriptor_t *desc; 215 int total = 0; 216 217 desc = arc_entry->getmemorydescriptor(NULL); 218 while (desc) { 219 if (desc->type == FreeMemory || 220 desc->type == FreeContiguous) { 221 total += desc->basecount*ARC_FRAME; 222 zone_create_in_region(desc->basepage*ARC_FRAME, 223 desc->basecount*ARC_FRAME); 224 } 225 desc = arc_entry->getmemorydescriptor(desc); 226 } 227 228 config.memory_size = total; 229 } 230 -
arch/mips32/src/mips32.c
ref0e259 r939dfd7 56 56 interrupts_disable(); 57 57 58 init_arc();58 arc_init(); 59 59 60 60 /* Copy the exception vectors to the right places */ -
arch/mips32/src/mm/frame.c
ref0e259 r939dfd7 34 34 #include <panic.h> 35 35 #include <print.h> 36 #include <arch/drivers/arc.h> 36 37 38 /** Create memory zones 39 * 40 * If ARC is known, read information from ARC, otherwise 41 * assume some defaults. 42 * - blacklist first FRAME because there is an exception vector 43 */ 37 44 void frame_arch_init(void) 38 45 { 39 zone_create_in_region(KA2PA(KERNEL_LOAD_ADDRESS), config.memory_size & ~(FRAME_SIZE-1)); 46 /* Blacklist first 4KB, exception vector */ 47 frame_region_not_free(0, FRAME_SIZE); 48 49 if (arc_enabled()) 50 arc_frame_init(); 51 else 52 zone_create_in_region(KA2PA(KERNEL_LOAD_ADDRESS), 53 config.memory_size & ~(FRAME_SIZE-1)); 40 54 } -
tools/config.py
ref0e259 r939dfd7 290 290 return False 291 291 if oper== '!=' and condval == defaults[condname]: 292 print 2293 292 return False 294 293 if ctype=='cnf':
Note:
See TracChangeset
for help on using the changeset viewer.