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
exported spinlocks
[tpg/acess2.git]
/
Kernel
/
arch
/
x86
/
start.asm
diff --git
a/Kernel/arch/x86/start.asm
b/Kernel/arch/x86/start.asm
index
f79c647
..
0988a77
100644
(file)
--- a/
Kernel/arch/x86/start.asm
+++ b/
Kernel/arch/x86/start.asm
@@
-145,26
+145,30
@@
APStartup:
lidt [gIDTPtr]
mov ebp, [gpMP_LocalAPIC]
lidt [gIDTPtr]
mov ebp, [gpMP_LocalAPIC]
- mov e
si, [eax
+0x20] ; Read ID
- shr e
si
, 24
+ mov e
bx, [ebp
+0x20] ; Read ID
+ shr e
bx
, 24
;xchg bx, bx ; MAGIC BREAK
; CL is now local APIC ID
;xchg bx, bx ; MAGIC BREAK
; CL is now local APIC ID
- mov cl, BYTE [gaAPIC_to_CPU+esi]
- ; CL is now the CPU ID
- mov BYTE [gaCPUs+esi*8+1], 1
+ mov cl, BYTE [gaAPIC_to_CPU+ebx]
+ xor ebx, ebx
+ mov bl, cl
+ ; BL is now the CPU ID
+ mov BYTE [gaCPUs+ebx*8+1], 1
; Decrement the remaining CPU count
dec DWORD [giNumInitingCPUs]
; Create a stack
; Decrement the remaining CPU count
dec DWORD [giNumInitingCPUs]
; Create a stack
- lea edx, [e
si
+1]
+ lea edx, [e
bx
+1]
shl edx, 5+2 ; *32 *4
lea esp, [gInitAPStacks+edx]
call MM_NewKStack
mov esp, eax
; Set TSS
shl edx, 5+2 ; *32 *4
lea esp, [gInitAPStacks+edx]
call MM_NewKStack
mov esp, eax
; Set TSS
- lea ecx, [e
si
*8+0x30]
+ lea ecx, [e
bx
*8+0x30]
ltr cx
ltr cx
+ ; Save the CPU number to a debug register
+ mov dr1, ebx
;xchg bx, bx ; MAGIC_BREAK
; Enable Local APIC
;xchg bx, bx ; MAGIC_BREAK
; Enable Local APIC
UCC
git Repository :: git.ucc.asn.au