Fix more warnings
This commit is contained in:
parent
21a395de3b
commit
630769065d
@ -180,7 +180,7 @@ void isr_handler(registers_t r) {
|
|||||||
} else if (r.eax==5) {
|
} else if (r.eax==5) {
|
||||||
r.ebx=(uint32_t)tasking_get_errno_address();
|
r.ebx=(uint32_t)tasking_get_errno_address();
|
||||||
} else if (r.eax==6) {
|
} 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) {
|
} else if (r.eax==7) {
|
||||||
tasking_send_msg(r.ebx,(void*)r.ecx,r.edx);
|
tasking_send_msg(r.ebx,(void*)r.ecx,r.edx);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <grub/multiboot2.h>
|
#include <grub/multiboot2.h>
|
||||||
#include "../halt.h"
|
#include "../halt.h"
|
||||||
|
#include "../../drivers/vga.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <klog.h>
|
#include <klog.h>
|
||||||
@ -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);
|
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++) {
|
for (struct multiboot_mmap_entry* ptr=orig_ptr;(char*)ptr<((char*)orig_ptr)+tag->size;ptr++) {
|
||||||
if (ptr->type!=MULTIBOOT_MEMORY_AVAILABLE) continue;
|
if (ptr->type!=MULTIBOOT_MEMORY_AVAILABLE) continue;
|
||||||
uint32_t size=ptr->len;
|
|
||||||
uint32_t start=ptr->addr;
|
uint32_t start=ptr->addr;
|
||||||
if (start<0x100000) continue;
|
if (start<0x100000) continue;
|
||||||
uint32_t end=start+ptr->len-1;
|
uint32_t end=start+ptr->len-1;
|
||||||
@ -51,7 +51,6 @@ void pmem_init(struct multiboot_boot_header_tag* tags) {
|
|||||||
clear_bmap_bit(i);
|
clear_bmap_bit(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
char str[256];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ void tasking_send_msg(uint32_t pid,void* msg,uint32_t size) {
|
|||||||
void* phys_addr=virt_to_phys(msg);
|
void* phys_addr=virt_to_phys(msg);
|
||||||
load_address_space(task->regs.cr3);
|
load_address_space(task->regs.cr3);
|
||||||
uint32_t page=find_free_pages((size/4096)+1);
|
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) {
|
if (task->msg_store==NULL) {
|
||||||
task->msg_store=malloc(sizeof(void*)*256);
|
task->msg_store=malloc(sizeof(void*)*256);
|
||||||
task->sender_store=malloc(sizeof(uint32_t)*256);
|
task->sender_store=malloc(sizeof(uint32_t)*256);
|
||||||
|
BIN
initrd/init
BIN
initrd/init
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
#include "../libc/string.h"
|
#include "../libc/string.h"
|
||||||
|
#include "vga.h"
|
||||||
#include <grub/text_fb_info.h>
|
#include <grub/text_fb_info.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user