diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-15 02:34:33 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-15 02:34:33 +0200 |
| commit | 9b152b773d40d40abf41a46be2ddae8905170fdf (patch) | |
| tree | 7e6ee94e0af8804e11a2725028e8566cb2387c89 /kernel/kernel.c | |
| parent | 0365bbb5c58912fd24b3d33b90477d3de5d46d96 (diff) | |
using ramimage position and correct kernel pages count
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index bdadd45..7b29730 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -31,6 +31,7 @@ void kernel_main(uint32_t eax,uint32_t ebx) { + // // Init Console // @@ -57,12 +58,12 @@ void kernel_main(uint32_t eax,uint32_t ebx) // after this is set up we will be able to allocate and deallocate // blocks of physical memory :) // - mem_init(info); + uint32_t kernel_blocks=mem_init(info); // // Activate Virtual Memory (paging) // - pdirectory *dir=vmem_new_space_dir(NULL); + pdirectory *dir=vmem_init(kernel_blocks); // // Setup Interrupts (code segment: 0x08) @@ -100,15 +101,23 @@ void kernel_main(uint32_t eax,uint32_t ebx) // // Mount Root EXT2 ramimage // - fs_mount(0x945000); + + fs_mount(info); // // Initialize Multitasking // - task_init(dir); //; this will never return! + + task_init(dir); + // + // Abvoe should never return + // + + panic(FOOLOS_MODULE_NAME,"reached end of kernel.c !!"); } + |
