diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-01 13:26:52 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-01 13:26:52 +0200 |
| commit | 347ee926fd09d7fb45025f2c4e4a4eeab83459c9 (patch) | |
| tree | 8d082bcaebe7579fe4fa73dd6eead7c00bb051fd /kernel/kernel.c | |
| parent | a9682cac5f14f8d04c87d206cf1d8367e77a61e1 (diff) | |
Added kernel_entry for APs
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index 5a32c95..7bbfcce 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -21,9 +21,27 @@ uint32_t read_eip(); // this is the very heart of our operating system! // -void kernel_main(uint32_t initial_stack) +void kernel_main(uint32_t initial_stack, int mp) { + + // catch the APs (Application Processors) + if(mp==1) + { + uint16_t c3=0; + while(1) + { + + + c3++; + asm("cli"); + + PutString("cpu2: %03d", 200,560,0b1111100000000000, c3/100); + + asm("sti"); + } + } + // // We want to get output to the screen as fast as possible! // @@ -44,6 +62,7 @@ void kernel_main(uint32_t initial_stack) // our video memory // + uint32_t vesa_physbase=vesa_init(0x8300,0x8400,0x7200); @@ -53,6 +72,8 @@ void kernel_main(uint32_t initial_stack) log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"initial esp: 0x%08X",initial_stack); + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"mp: %d",mp); + // // Initialize other processors // @@ -72,6 +93,7 @@ void kernel_main(uint32_t initial_stack) log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"setting up PIC."); pic_setup(); + //while(1); // // Configuring the PIT timer. @@ -130,7 +152,7 @@ void kernel_main(uint32_t initial_stack) // Initialize Floppy Disk // - floppy_init(); + // floppy_init(); // |
