minor correction for kernel end addr
This commit is contained in:
parent
43da9c40c4
commit
c0ded6f3a7
|
@ -170,6 +170,7 @@ _loader64:
|
||||||
call write
|
call write
|
||||||
|
|
||||||
mov qword [newKernelEnd], KERNEL_STACK
|
mov qword [newKernelEnd], KERNEL_STACK
|
||||||
|
mov qword [realKernelEnd], realKernelEnd
|
||||||
mov rdi, [mbInfo]
|
mov rdi, [mbInfo]
|
||||||
mov rsi, [mbMagic]
|
mov rsi, [mbMagic]
|
||||||
mov rdx, GDT64.code
|
mov rdx, GDT64.code
|
||||||
|
|
|
@ -26,11 +26,12 @@
|
||||||
[BITS 32]
|
[BITS 32]
|
||||||
extern kernelEnd
|
extern kernelEnd
|
||||||
global newKernelEnd
|
global newKernelEnd
|
||||||
|
global realKernelEnd
|
||||||
|
|
||||||
[section .text]
|
[section .text]
|
||||||
KERNEL_STACK equ kernelEnd + 4096 * 2 * 1024 ; 8MB of stack
|
KERNEL_STACK equ kernelEnd + 4096 * 2 * 1024 ; 8MB of stack
|
||||||
newKernelEnd dq 0x0
|
newKernelEnd dq 0x0
|
||||||
|
realKernelEnd dq 0x0
|
||||||
[section .rodata]
|
[section .rodata]
|
||||||
;; GDT WITH DOC
|
;; GDT WITH DOC
|
||||||
ALIGN 4096
|
ALIGN 4096
|
||||||
|
|
|
@ -22,5 +22,10 @@
|
||||||
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
|
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
|
||||||
;=----------------------------------------------------------------------------=;
|
;=----------------------------------------------------------------------------=;
|
||||||
|
|
||||||
|
%include "kaleid/kernel/cpu/cpuf.inc"
|
||||||
|
|
||||||
CpuCpuid:
|
CpuCpuid:
|
||||||
|
pushAll
|
||||||
|
mov rax, rsi
|
||||||
|
cpuid
|
||||||
|
popAll
|
||||||
|
|
|
@ -62,6 +62,8 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
|
||||||
IoGetRtcTimeChar();
|
IoGetRtcTimeChar();
|
||||||
IoPrintRtcTime();
|
IoPrintRtcTime();
|
||||||
|
|
||||||
|
KernLog("%d\n",realKernelEnd);
|
||||||
|
|
||||||
KeStartShell();
|
KeStartShell();
|
||||||
|
|
||||||
KernLog("End of input reached\n");
|
KernLog("End of input reached\n");
|
||||||
|
|
Loading…
Reference in New Issue