Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 15 → Rev 16

/SPARTAN/trunk/src/Makefile.config
11,7 → 11,7
HT=__HT__
 
# Deadlock detection support for spinlocks.
DEBUG_SPINLOCK=DEBUG_SPINLOCK
#DEBUG_SPINLOCK=DEBUG_SPINLOCK
 
# Uncomment if you want to run in the test mode
#TEST=__TEST__
/SPARTAN/trunk/src/proc/thread.c
99,7 → 99,7
 
i = (t->pri < RQ_COUNT -1) ? ++t->pri : t->pri;
cpu = the->cpu;
cpu = CPU;
if (t->flags & X_WIRED) {
cpu = t->cpu;
}
/SPARTAN/trunk/src/main/main.c
103,6 → 103,7
 
arch_init();
 
 
printf("%s, %s\n", project, copyright);
 
printf("%L: hardcoded_ktext_size=%dK, hardcoded_kdata_size=%dK\n",
/SPARTAN/trunk/src/cpu/cpu.c
39,8 → 39,7
#include <memstr.h>
#include <list.h>
 
cpu_private_page_t *the = NULL;
 
cpu_private_data_t *cpu_private_data;
cpu_t *cpus;
 
void cpu_init(void) {
49,11 → 48,16
#ifdef __SMP__
if (config.cpu_active == 1) {
#endif /* __SMP__ */
cpu_private_data = (cpu_private_data_t *) malloc(sizeof(cpu_private_data_t) * config.cpu_count);
if (!cpu_private_data)
panic("malloc/cpu_private_data");
 
cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count);
if (!cpus)
panic("malloc/cpus");
 
/* initialize everything */
memsetb((__address) cpu_private_data, sizeof(cpu_private_data_t) * config.cpu_count, 0);
memsetb((__address) cpus, sizeof(cpu_t) * config.cpu_count, 0);
for (i=0; i < config.cpu_count; i++) {
70,22 → 74,14
for (j = 0; j < RQ_COUNT; j++) {
list_initialize(&cpus[i].rq[j].rq_head);
}
cpu_private_data[i].cpu = &cpus[i];
}
the = (cpu_private_page_t *) frame_alloc(FRAME_KA | FRAME_PANIC);
memsetb((__address) the, PAGE_SIZE, 0);
#ifdef __SMP__
}
else {
__address frame;
frame = frame_alloc(FRAME_KA | FRAME_PANIC);
memsetb(frame, PAGE_SIZE, 0);
map_page_to_frame((__address) the, frame, PAGE_CACHEABLE, 1);
}
#endif /* __SMP__ */
CPU = &cpus[config.cpu_active-1];
cpu_identify();
cpu_arch_init();
}