diff --git a/boot/loader/loader.asm b/boot/loader/loader.asm index 001d524..c3b47dd 100644 --- a/boot/loader/loader.asm +++ b/boot/loader/loader.asm @@ -170,6 +170,7 @@ _loader64: call write mov qword [newKernelEnd], KERNEL_STACK + mov qword [realKernelEnd], realKernelEnd mov rdi, [mbInfo] mov rsi, [mbMagic] mov rdx, GDT64.code diff --git a/boot/loader/mem/structures.inc b/boot/loader/mem/structures.inc index b5ba719..55ed82c 100644 --- a/boot/loader/mem/structures.inc +++ b/boot/loader/mem/structures.inc @@ -26,11 +26,12 @@ [BITS 32] extern kernelEnd global newKernelEnd +global realKernelEnd [section .text] KERNEL_STACK equ kernelEnd + 4096 * 2 * 1024 ; 8MB of stack newKernelEnd dq 0x0 - +realKernelEnd dq 0x0 [section .rodata] ;; GDT WITH DOC ALIGN 4096 diff --git a/kaleid/kernel/cpu/cpuf.asm b/kaleid/kernel/cpu/cpuf.asm index 4315752..232f145 100644 --- a/kaleid/kernel/cpu/cpuf.asm +++ b/kaleid/kernel/cpu/cpuf.asm @@ -22,5 +22,10 @@ ; along with OS/K. If not, see . ; ;=----------------------------------------------------------------------------=; +%include "kaleid/kernel/cpu/cpuf.inc" + CpuCpuid: - + pushAll + mov rax, rsi + cpuid + popAll diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 5c7bcd9..5a8be24 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -62,6 +62,8 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) IoGetRtcTimeChar(); IoPrintRtcTime(); + KernLog("%d\n",realKernelEnd); + KeStartShell(); KernLog("End of input reached\n");