Changeset 8262010 in mainline for src/cpu/cpu.c
- Timestamp:
- 2005-04-10T16:36:45Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23c0c08
- Parents:
- 43114c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/cpu/cpu.c
r43114c5 r8262010 40 40 #include <list.h> 41 41 42 cpu_private_page_t *the = NULL; 43 42 cpu_private_data_t *cpu_private_data; 44 43 cpu_t *cpus; 45 44 … … 50 49 if (config.cpu_active == 1) { 51 50 #endif /* __SMP__ */ 51 cpu_private_data = (cpu_private_data_t *) malloc(sizeof(cpu_private_data_t) * config.cpu_count); 52 if (!cpu_private_data) 53 panic("malloc/cpu_private_data"); 54 52 55 cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count); 53 56 if (!cpus) … … 55 58 56 59 /* initialize everything */ 60 memsetb((__address) cpu_private_data, sizeof(cpu_private_data_t) * config.cpu_count, 0); 57 61 memsetb((__address) cpus, sizeof(cpu_t) * config.cpu_count, 0); 58 62 … … 71 75 list_initialize(&cpus[i].rq[j].rq_head); 72 76 } 77 78 cpu_private_data[i].cpu = &cpus[i]; 73 79 } 74 80 75 the = (cpu_private_page_t *) frame_alloc(FRAME_KA | FRAME_PANIC);76 memsetb((__address) the, PAGE_SIZE, 0);77 81 #ifdef __SMP__ 78 }79 else {80 __address frame;81 82 frame = frame_alloc(FRAME_KA | FRAME_PANIC);83 memsetb(frame, PAGE_SIZE, 0);84 map_page_to_frame((__address) the, frame, PAGE_CACHEABLE, 1);85 82 } 86 83 #endif /* __SMP__ */ 87 84 88 CPU = &cpus[config.cpu_active-1];89 85 cpu_identify(); 90 86 cpu_arch_init();
Note:
See TracChangeset
for help on using the changeset viewer.