X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86_64%2Fstart64.asm;h=d0cc503fc1cbf8a2760aa85b4aad65987667bab3;hb=9e5348670e92edab24c034bd69793200eeb21847;hp=04bac26918e35e35576286b5a622b1dcca5a91ce;hpb=d8b11d2074b48f17f999d44c75b1f76fdffd970b;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86_64/start64.asm b/Kernel/arch/x86_64/start64.asm index 04bac269..d0cc503f 100644 --- a/Kernel/arch/x86_64/start64.asm +++ b/Kernel/arch/x86_64/start64.asm @@ -2,7 +2,8 @@ ; Acess2 x86_64 Port ; [bits 64] -KERNEL_BASE equ 0xFFFF800000000000 +;KERNEL_BASE equ 0xFFFF800000000000 +KERNEL_BASE equ 0xFFFFFFFF80000000 [extern kmain] @@ -24,6 +25,9 @@ start64: jmp rax .himem: + xor rax, rax + mov dr0, rax ; Set CPU0 + ; Clear the screen mov rax, 0x1F201F201F201F20 ; Set the screen to White on blue, space (4 characters) mov edi, 0xB8000 @@ -50,10 +54,10 @@ GetRIP: [global GetCPUNum] GetCPUNum: - str ax - mov gs, ax xor rax, rax - mov al, [gs:104] ; End of TSS + str ax + sub ax, 0x38 ; TSS Base + shr ax, 4 ; One 16-byte TSS per CPU ret KSTACK_USERSTATE_SIZE equ (16+1+5)*8 ; GPRegs, CPU, IRET