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/x86-smp - Fixing SMP support
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
arch
/
x86
/
start.asm
diff --git
a/KernelLand/Kernel/arch/x86/start.asm
b/KernelLand/Kernel/arch/x86/start.asm
index
b6026de
..
7602b9b
100644
(file)
--- a/
KernelLand/Kernel/arch/x86/start.asm
+++ b/
KernelLand/Kernel/arch/x86/start.asm
@@
-55,8
+55,9
@@
mboot:
; dd 8
;mboot2_end:
; dd 8
;mboot2_end:
-[section .text]
+[section .
init
text]
[extern kmain]
[extern kmain]
+[extern Desctab_Install]
[global start]
start:
; Just show we're here
[global start]
start:
; Just show we're here
@@
-87,11
+88,15
@@
start:
.higher_half:
mov WORD [0xB8006], 0x0773 ; 's'
.higher_half:
mov WORD [0xB8006], 0x0773 ; 's'
+
+ push ebx ; Multiboot Info
+ push eax ; Multiboot Magic Value
+ ; NOTE: These are actually for kmain
+
+ call Desctab_Install
mov WORD [0xB8008], 0x0773 ; 's'
; Call the kernel
mov WORD [0xB8008], 0x0773 ; 's'
; Call the kernel
- push ebx ; Multiboot Info
- push eax ; Multiboot Magic Value
mov WORD [0xB800A], 0x0732 ; '2'
call kmain
mov WORD [0xB800A], 0x0732 ; '2'
call kmain
@@
-132,13
+137,13
@@
APStartup:
; Load initial GDT
mov ax, 0xFFFF
mov ds, ax
; Load initial GDT
mov ax, 0xFFFF
mov ds, ax
- lgdt [DWORD ds:lGDTPtr-
KERNEL_BASE-
0xFFFF0]
+ lgdt [DWORD ds:lGDTPtr-0xFFFF0]
; Enable PMode in CR0
mov eax, cr0
or al, 1
mov cr0, eax
; Jump into PMode
; Enable PMode in CR0
mov eax, cr0
or al, 1
mov cr0, eax
; Jump into PMode
- jmp 08h:DWORD .ProtectedMode
-KERNEL_BASE
+ jmp 08h:DWORD .ProtectedMode
[bits 32]
.ProtectedMode:
; Load segment registers
[bits 32]
.ProtectedMode:
; Load segment registers
@@
-213,6
+218,10
@@
APStartup:
jmp .hlt
%endif
jmp .hlt
%endif
+;
+;
+;
+[section .text]
[global GetEIP]
GetEIP:
mov eax, [esp]
[global GetEIP]
GetEIP:
mov eax, [esp]
UCC
git Repository :: git.ucc.asn.au