diff options
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | driver/pci.c | 2 | ||||
| -rw-r--r-- | kernel/apic.c | 6 | ||||
| -rw-r--r-- | kernel/scheduler.c | 1 | ||||
| -rw-r--r-- | kernel/vmem.c | 3 |
5 files changed, 9 insertions, 6 deletions
@@ -30,7 +30,8 @@ CFLAGS= CFLAGS+=-DGIT_REVISION=\"$(GIT_REVISION)\" CFLAGS+=-ffreestanding # do we need this if using own compiler? CFLAGS+=-nostdlib -CFLAGS+=-Og +#CFLAGS+=-Og +CFLAGS+=-O0 CFLAGS+=-I. CFLAGS+=-I/home/miguel/temp/foolos/usr/i686-foolos/include/ CFLAGS+=-I./asm diff --git a/driver/pci.c b/driver/pci.c index 79f3e24..a6d68c1 100644 --- a/driver/pci.c +++ b/driver/pci.c @@ -86,6 +86,7 @@ uint32_t test_bar(uint8_t bus, uint8_t slot, uint8_t offset) uint16_t pciCheck(uint8_t bus, uint8_t slot) { + //https://pci-ids.ucw.cz/v2.2/pci.ids uint16_t vendor, device, irq; /* try and read the first configuration register. Since there are no */ @@ -98,7 +99,6 @@ uint16_t pciCheck(uint8_t bus, uint8_t slot) irq = pciConfigReadWord(bus,slot,0,0x3c); uint8_t header = pciConfigReadWord(bus,slot,0,0xd)&0xff; - klog("[%d,%d]: vendor: 0x%x / device: 0x%x",bus,slot,vendor,device); klog("header_typ=%x, %d,pin=%d , irq=%d",header,irq,irq&0xFf00,irq&0xFf); diff --git a/kernel/apic.c b/kernel/apic.c index e48b19b..4bc2bb3 100644 --- a/kernel/apic.c +++ b/kernel/apic.c @@ -156,10 +156,10 @@ void ioapic_config() // ioapic_config_entry(2,0x90|0xa000,0x3<<24); // level trigger on low // CPU -// ioapic_config_entry(2, INTERRUPT_PIT_TIMER, 0x0<<24); // pit + ioapic_config_entry(2, INTERRUPT_PIT_TIMER, 0x0<<24); // pit ioapic_config_entry(1, INTERRUPT_KEYBOARD, 0x0<<24); // kb -// ioapic_config_entry(12, INTERRUPT_MOUSE, 0x0<<24); // mouse -// ioapic_config_entry(11, INTERRUPT_E1000|0x8000, 0x0<<24); // e1000 (level trigger on high) + ioapic_config_entry(12, INTERRUPT_MOUSE, 0x0<<24); // mouse + ioapic_config_entry(11, INTERRUPT_E1000|0x8000, 0x0<<24); // e1000 (level trigger on high) } /** startup other cpus*/ diff --git a/kernel/scheduler.c b/kernel/scheduler.c index dfe1b25..5382053 100644 --- a/kernel/scheduler.c +++ b/kernel/scheduler.c @@ -355,6 +355,7 @@ void task_syscall_worker() volatile uint32_t task_syscall(uint32_t eax,uint32_t ebx, uint32_t ecx, uint32_t edx) { + if(eax==2)while(1); uint32_t cpu=smp_get(SMP_APIC_ID); task_list[cpu][current_task[cpu]].syscall=true; task_list[cpu][current_task[cpu]].try=true; diff --git a/kernel/vmem.c b/kernel/vmem.c index 4f854b6..0c751b8 100644 --- a/kernel/vmem.c +++ b/kernel/vmem.c @@ -199,7 +199,6 @@ static pdirectory* vmem_clean_dir() fixme("replace ALLL kballoc with getting the pages from mem/vmem"); pdirectory* dir = (pdirectory*) kballoc(1); for(int i=0;i<1024;i++)dir->m_entries [i]=0; // zero all - klog("fresh page directory: 0x%X",dir); return dir; } @@ -320,6 +319,7 @@ void vmem_free_space_dir(pdirectory *dir,bool stack_only) { fixme("free kmalloc too!"); fixme("stack_only version too!"); + klog("free page directory at: 0x%X",dir); //free user pages uint32_t virt=0; @@ -351,6 +351,7 @@ void vmem_free_space_dir(pdirectory *dir,bool stack_only) pdirectory* vmem_new_space_dir(pdirectory *copy_dir,bool stack_only) { pdirectory* dir = vmem_clean_dir(); //let's start with a fresh page directory + klog("new page directory at: 0x%X",dir); //link non-user pages. for(int i=0;i<1024;i++) |
