diff --git a/cpu/i386/isr.c b/cpu/i386/isr.c index af633c9..dece8d0 100644 --- a/cpu/i386/isr.c +++ b/cpu/i386/isr.c @@ -180,7 +180,7 @@ void isr_handler(registers_t r) { } else if (r.eax==5) { r.ebx=(uint32_t)tasking_get_errno_address(); } else if (r.eax==6) { - r.ebx=tasking_get_msg((uint32_t*)r.ebx); + r.ebx=(uint32_t)tasking_get_msg((uint32_t*)r.ebx); } else if (r.eax==7) { tasking_send_msg(r.ebx,(void*)r.ecx,r.edx); } diff --git a/cpu/i386/pmem.c b/cpu/i386/pmem.c index fcaa123..f85f1e9 100644 --- a/cpu/i386/pmem.c +++ b/cpu/i386/pmem.c @@ -1,5 +1,6 @@ #include #include "../halt.h" +#include "../../drivers/vga.h" #include #include #include @@ -38,7 +39,6 @@ void pmem_init(struct multiboot_boot_header_tag* tags) { struct multiboot_mmap_entry* orig_ptr=(struct multiboot_mmap_entry*)(((char*)tag)+16); for (struct multiboot_mmap_entry* ptr=orig_ptr;(char*)ptr<((char*)orig_ptr)+tag->size;ptr++) { if (ptr->type!=MULTIBOOT_MEMORY_AVAILABLE) continue; - uint32_t size=ptr->len; uint32_t start=ptr->addr; if (start<0x100000) continue; uint32_t end=start+ptr->len-1; @@ -51,7 +51,6 @@ void pmem_init(struct multiboot_boot_header_tag* tags) { clear_bmap_bit(i); } } - char str[256]; break; } } diff --git a/cpu/i386/tasking.c b/cpu/i386/tasking.c index e25aafe..6e4f034 100644 --- a/cpu/i386/tasking.c +++ b/cpu/i386/tasking.c @@ -86,7 +86,7 @@ void tasking_send_msg(uint32_t pid,void* msg,uint32_t size) { void* phys_addr=virt_to_phys(msg); load_address_space(task->regs.cr3); uint32_t page=find_free_pages((size/4096)+1); - map_pages(page<<12,phys_addr,(size/4096)+1,1,0); + map_pages((void*)(page<<12),phys_addr,(size/4096)+1,1,0); if (task->msg_store==NULL) { task->msg_store=malloc(sizeof(void*)*256); task->sender_store=malloc(sizeof(uint32_t)*256); diff --git a/initrd/init b/initrd/init index bcc980c..05d1fc2 100755 Binary files a/initrd/init and b/initrd/init differ diff --git a/prog/main.c b/prog/main.c index 6dfd150..16bbfbc 100644 --- a/prog/main.c +++ b/prog/main.c @@ -1,4 +1,5 @@ #include "../libc/string.h" +#include "vga.h" #include int main() {