Fix warnings
This commit is contained in:
parent
2497befcea
commit
68b6a77a65
@ -4,7 +4,7 @@ void address_spaces_copy_data(void* cr3, void* data,uint32_t size,void* virt_add
|
|||||||
uint32_t old_cr3;
|
uint32_t old_cr3;
|
||||||
asm volatile("movl %%cr3, %%eax; movl %%eax, %0;":"=m"(old_cr3)::"%eax");
|
asm volatile("movl %%cr3, %%eax; movl %%eax, %0;":"=m"(old_cr3)::"%eax");
|
||||||
void* phys_addr=virt_to_phys(data);
|
void* phys_addr=virt_to_phys(data);
|
||||||
load_address_space(cr3);
|
load_address_space((uint32_t)cr3);
|
||||||
map_pages(virt_addr,phys_addr,(size/4096)+1,1,1);
|
map_pages(virt_addr,phys_addr,(size/4096)+1,1,1);
|
||||||
load_address_space(old_cr3);
|
load_address_space(old_cr3);
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,13 @@
|
|||||||
#include "../cpu/cpu_init.h"
|
|
||||||
#include "../drivers/vga.h"
|
|
||||||
// #include "../drivers/pci.h"
|
|
||||||
// #include "../drivers/serial.h"
|
|
||||||
// #include "../cpu/i386/ports.h"
|
|
||||||
// #include "vfs.h"
|
|
||||||
// #include "../fs/devfs.h"
|
|
||||||
// #include "../fs/initrd.h"
|
|
||||||
#include <grub/text_fb_info.h>
|
#include <grub/text_fb_info.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
// #include <tasking.h>
|
#include <tasking.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <grub/multiboot2.h>
|
#include <grub/multiboot2.h>
|
||||||
// #include "klog.h"
|
|
||||||
#include "elf.h"
|
|
||||||
// #include <errno.h>
|
|
||||||
// #include "../drivers/ide.h"
|
|
||||||
// #include "parts.h"
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "../cpu/cpu_init.h"
|
||||||
|
#include "../drivers/vga.h"
|
||||||
|
#include "elf.h"
|
||||||
|
|
||||||
static long initrd_sz;
|
static long initrd_sz;
|
||||||
static char* initrd;
|
static char* initrd;
|
||||||
@ -112,9 +102,9 @@ void kmain(struct multiboot_boot_header_tag* hdr) {
|
|||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
copy_data(cr3,ptr,pheader.memsz,pheader.vaddr);
|
copy_data(cr3,ptr,pheader.memsz,(void*)pheader.vaddr);
|
||||||
}
|
}
|
||||||
createTaskCr3(header.entry,cr3);
|
createTaskCr3((void*)header.entry,cr3);
|
||||||
for(;;) {
|
for(;;) {
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user