diff options
| -rw-r--r-- | kernel/e1000.c | 2 | ||||
| -rw-r--r-- | kernel/kernel.c | 8 | ||||
| -rw-r--r-- | kernel/kernel.h | 2 | ||||
| -rw-r--r-- | kernel/mem.c | 6 | ||||
| -rw-r--r-- | kernel/pci.c | 7 | ||||
| -rw-r--r-- | kernel/timer.c | 2 | ||||
| -rw-r--r-- | kernel/vmem.c | 2 | ||||
| -rw-r--r-- | screenshots/foolos.png | bin | 9390 -> 20918 bytes |
8 files changed, 15 insertions, 14 deletions
diff --git a/kernel/e1000.c b/kernel/e1000.c index 800b771..1ef8fb3 100644 --- a/kernel/e1000.c +++ b/kernel/e1000.c @@ -1,5 +1,5 @@ void init_e1000() { - scr_put_string_nl("initializing E1000 Intel PCI Ethernet Controller (TODO)"); + scr_put_string_nl("e1000: initializing E1000 Intel PCI Ethernet Controller (TODO)"); } diff --git a/kernel/kernel.c b/kernel/kernel.c index c7391e0..b0bf71d 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -36,16 +36,12 @@ void kernel_main() //pit config timer_init(); - scr_put_string_nl("Configured PIT Channel 0 : Mode 2 : 1/25 s."); - scr_put_string_nl(""); // we know that here the bootloader placed the mamory map! mem_init(0x7c00+0x140); - scr_put_string_nl(""); // we know that here the bootloader placed the mamory map! vmem_init(); - scr_put_string_nl(""); // init and interrupt decriptor table int_init(0x08); @@ -68,11 +64,11 @@ void kernel_main() // now we can enable interrupts back again int_enable(); - scr_put_string_nl("Interrupts are up and running"); - scr_put_string_nl(""); + scr_put_string_nl("interrupts: Interrupts are up and running"); // pci pci_init(); + scr_put_string_nl(""); //init shell shell_init(); diff --git a/kernel/kernel.h b/kernel/kernel.h index 45494c7..6281fb6 100644 --- a/kernel/kernel.h +++ b/kernel/kernel.h @@ -3,7 +3,7 @@ #include <stdint.h> //needed for uint16_t -#define KERNEL_HELLO_MESSAGE "FoolOs 0.0.2" +#define KERNEL_HELLO_MESSAGE "FoolOs 0.0.4" // #define DEBUG #endif diff --git a/kernel/mem.c b/kernel/mem.c index d45e10f..9b04cff 100644 --- a/kernel/mem.c +++ b/kernel/mem.c @@ -220,6 +220,7 @@ void mem_init(uint16_t *memmap) if(memmap[8]==0)break; +#ifdef MEM_PRINT_MEMORYMAP scr_put_hex(memmap[8]); scr_put_string(" : "); @@ -235,6 +236,7 @@ void mem_init(uint16_t *memmap) scr_put_hex(memmap[4]); scr_put_string_nl(""); +#endif if(memmap[8]==1) @@ -246,13 +248,13 @@ void mem_init(uint16_t *memmap) memmap+=12; } - scr_put_string("Total Available Mem: "); + scr_put_string("mem: Total Available Mem: "); scr_put_hex(avail_mem>>16); scr_put_string(" "); scr_put_hex(avail_mem&0xffff); scr_put_string_nl(" byte"); - scr_put_string("Total of free (4KB) blocks: "); + scr_put_string("mem: Total of free (4KB) blocks: "); scr_put_hex(mem_free_blocks>>16); scr_put_hex(mem_free_blocks&0xffff); scr_put_string_nl(""); diff --git a/kernel/pci.c b/kernel/pci.c index 5e1c869..292bf1b 100644 --- a/kernel/pci.c +++ b/kernel/pci.c @@ -89,7 +89,7 @@ void test_bar(uint8_t bus, uint8_t slot, uint8_t offset) // restore original values pciConfigSet(bus,slot,0,offset,(bar_high<<16)+bar_low); - scr_put_string("BAR: "); + scr_put_string("e1000: BAR: "); if(bar_low& 1)scr_put_string("i/o "); else scr_put_string("mem "); @@ -119,6 +119,7 @@ uint16_t pciCheck(uint8_t bus, uint8_t slot) if ((vendor = pciConfigReadWord(bus,slot,0,0)) != 0xFFFF) { device = pciConfigReadWord(bus,slot,0,2); + scr_put_string("pci: "); scr_put_hex(vendor); scr_put_hex(device); scr_put_string_nl(";"); @@ -129,6 +130,7 @@ uint16_t pciCheck(uint8_t bus, uint8_t slot) { // uint16_t irq=pciConfigReadWord(bus,slot,0,0x3C); // uint16_t irq2=pciConfigReadWord(bus,slot,0,0x3E); + init_e1000(); test_bar(bus,slot,0x10); test_bar(bus,slot,0x14); @@ -139,7 +141,6 @@ uint16_t pciCheck(uint8_t bus, uint8_t slot) // scr_put_string_nl(";"); - init_e1000(); } @@ -153,7 +154,7 @@ uint16_t pciCheck(uint8_t bus, uint8_t slot) void pci_init() { - scr_put_string_nl("scanning pci bus"); + scr_put_string_nl("pci: scanning pci bus"); // todo: recurse on pci to pci bridges! // todo: support multiple pci host controllers! // (check more funcitons of device 0:0) diff --git a/kernel/timer.c b/kernel/timer.c index ee78bd5..da62f78 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -99,4 +99,6 @@ void timer_init() __asm__("out %al, $0x40"); __asm__("popa"); + + scr_put_string_nl("timer: Configured PIT Channel 0 : Mode 2 : 1/25 s."); } diff --git a/kernel/vmem.c b/kernel/vmem.c index 7e48dea..4424edf 100644 --- a/kernel/vmem.c +++ b/kernel/vmem.c @@ -72,5 +72,5 @@ struct pdirectory { void vmem_init() { - scr_put_string_nl("Init paging (TODO)"); + scr_put_string_nl("vmem: Init paging (TODO)"); } diff --git a/screenshots/foolos.png b/screenshots/foolos.png Binary files differindex cc533d7..8d0601e 100644 --- a/screenshots/foolos.png +++ b/screenshots/foolos.png |
