git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - Changed Threads_CloneTCB (removed Err ptr)
[tpg/acess2.git]
/
Kernel
/
arch
/
x86
/
start.asm
diff --git
a/Kernel/arch/x86/start.asm
b/Kernel/arch/x86/start.asm
index
4be4130
..
d504a5d
100644
(file)
--- a/
Kernel/arch/x86/start.asm
+++ b/
Kernel/arch/x86/start.asm
@@
-70,7
+70,7
@@
start:
mov cr3, ecx
mov ecx, cr0
mov cr3, ecx
mov ecx, cr0
- or
ecx, 0x80010000
; PG and WP
+ or
ecx, 0x80010000
; PG and WP
mov cr0, ecx
mov WORD [0xB8002], 0x0763 ; 'c'
mov cr0, ecx
mov WORD [0xB8002], 0x0763 ; 'c'
@@
-96,7
+96,7
@@
start:
jmp .hlt
;
jmp .hlt
;
-; Multiprocessing AP Startup Code (Must be within 0x10FFF0)
+; Multiprocessing AP Startup Code (Must be within 0
- 0
x10FFF0)
;
%if USE_MP
[extern gGDT]
;
%if USE_MP
[extern gGDT]
@@
-123,12
+123,15
@@
APWait:
[global APStartup]
APStartup:
;xchg bx, bx ; MAGIC BREAK!
[global APStartup]
APStartup:
;xchg bx, bx ; MAGIC BREAK!
+ ; Load initial GDT
mov ax, 0xFFFF
mov ds, ax
lgdt [DWORD ds:lGDTPtr-KERNEL_BASE-0xFFFF0]
mov ax, 0xFFFF
mov ds, ax
lgdt [DWORD ds:lGDTPtr-KERNEL_BASE-0xFFFF0]
+ ; Enable PMode in CR0
mov eax, cr0
or al, 1
mov cr0, eax
mov eax, cr0
or al, 1
mov cr0, eax
+ ; Jump into PMode
jmp 08h:DWORD .ProtectedMode-KERNEL_BASE
[bits 32]
.ProtectedMode:
jmp 08h:DWORD .ProtectedMode-KERNEL_BASE
[bits 32]
.ProtectedMode:
@@
-228,7
+231,7
@@
CallWithArgArray:
[section .initpd]
[global gaInitPageDir]
[global gaInitPageTable]
[section .initpd]
[global gaInitPageDir]
[global gaInitPageTable]
-align
0x1000
+align
4096
gaInitPageDir:
dd gaInitPageTable-KERNEL_BASE+3 ; 0x000 - Low kernel
times 0x300-0x000-1 dd 0
gaInitPageDir:
dd gaInitPageTable-KERNEL_BASE+3 ; 0x000 - Low kernel
times 0x300-0x000-1 dd 0
@@
-236,7
+239,7
@@
gaInitPageDir:
times 0x3F0-0x300-1 dd 0
dd gaInitPageDir-KERNEL_BASE+3 ; 0xFC0 - Fractal
times 0x400-0x3F0-1 dd 0
times 0x3F0-0x300-1 dd 0
dd gaInitPageDir-KERNEL_BASE+3 ; 0xFC0 - Fractal
times 0x400-0x3F0-1 dd 0
-align
0x1000
+align
4096
gaInitPageTable:
%assign i 0
%rep 1024
gaInitPageTable:
%assign i 0
%rep 1024
@@
-244,7
+247,7
@@
gaInitPageTable:
%assign i i+1
%endrep
[global Kernel_Stack_Top]
%assign i i+1
%endrep
[global Kernel_Stack_Top]
-ALIGN
0x1000
+ALIGN
4096
times 1024 dd 0
Kernel_Stack_Top:
gInitAPStacks:
times 1024 dd 0
Kernel_Stack_Top:
gInitAPStacks:
UCC
git Repository :: git.ucc.asn.au