Skip to content

Commit a8e13b2

Browse files
committed
Update smp.asm
1 parent c1f7f04 commit a8e13b2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/init/smp.asm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ smp_send_INIT_skipcore:
6060

6161
smp_send_INIT_done:
6262

63-
; Wait 500 microseconds
64-
mov eax, 500
63+
; Wait
64+
mov eax, 500 ; 500 microseconds (0.5ms)
6565
call timer_delay
6666

6767
mov esi, IM_DetectedCoreIDs
@@ -97,9 +97,9 @@ smp_send_SIPI_verify:
9797
smp_send_SIPI_x2APIC:
9898
; Send 'Startup' IPI to destination using vector 0x08 to specify entry-point is at the memory-address 0x00008000
9999
push rcx
100-
mov ecx, APIC_ICR ; Interrupt Command Register (ICR); bits 63-0
100+
mov ecx, APIC_ICR ; Interrupt Command Register (ICR); bits 63-0
101101
shl rax, 32
102-
mov ax, 0x4608 ; Vector 0x08
102+
mov ax, 0x4608 ; Vector 0x08
103103
call apic_write
104104
pop rcx
105105

@@ -111,8 +111,8 @@ smp_send_SIPI_skipcore:
111111

112112
smp_send_SIPI_done:
113113

114-
; Wait 10000 microseconds for the AP's to finish
115-
mov eax, 10000
114+
; Wait for the AP's to finish
115+
mov eax, 10000 ; 10000 microseconds (10ms)
116116
call timer_delay
117117

118118
noMP:
@@ -123,7 +123,7 @@ noMP:
123123
xor eax, eax
124124
rdtsc
125125
push rax
126-
mov rax, 1024
126+
mov rax, 1024 ; 1024 microseconds (1ms)
127127
call timer_delay
128128
rdtsc
129129
pop rdx

0 commit comments

Comments
 (0)