Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 191 → Rev 192

/SPARTAN/trunk/src/Makefile.config
20,7 → 20,7
#USERSPACE=__USERSPACE__
 
# Uncomment if you want to run in the test mode
TEST=__TEST__
#TEST=__TEST__
 
TEST_FILE=test.c
 
33,4 → 33,4
#TEST_DIR=synch/semaphore1/
#TEST_DIR=synch/semaphore2/
#TEST_DIR=fpu/fpu1
TEST_DIR=print/print1
#TEST_DIR=print/print1
/SPARTAN/trunk/src/main/main.c
179,7 → 179,6
*/
t = thread_create(kinit, NULL, k, 0);
if (!t) panic("can't create kinit thread\n");
 
thread_ready(t);
 
/*
210,6 → 209,11
*/
config.cpu_active++;
 
/*
* The THE structure is well defined because ctx.sp is used as stack.
*/
the_initialize(THE);
 
arch_pre_mm_init();
frame_init();
page_init();
221,6 → 225,7
l_apic_init();
l_apic_debug();
 
the_copy(THE, (the_t *) CPU->stack);
 
/*
* If we woke kmp up before we left the kernel stack, we could
/SPARTAN/trunk/src/cpu/cpu.c
39,11 → 39,8
#include <memstr.h>
#include <list.h>
 
 
cpu_private_data_t *cpu_private_data;
cpu_t *cpus;
 
 
/** Initialize CPUs
*
* Initialize kernel CPUs support.
55,20 → 52,15
#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++) {
cpus[i].stack = (__u8 *) malloc(CPU_STACK_SIZE);
cpus[i].stack = (__u8 *) frame_alloc(FRAME_KA | FRAME_PANIC);
if (!cpus[i].stack)
panic("malloc/cpus[%d].stack\n", i);
87,6 → 79,8
}
#endif /* __SMP__ */
CPU = &cpus[config.cpu_active-1];
CPU->active = 1;
CPU->tlb_active = 1;