Changeset 939dfd7 in mainline for arch/mips32/src/drivers/arc.c
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.