I compiled the following 16bit code for the APs in the system, that start in real mode.. Well I was trying to debug the code, so went line by line..
Code: Select all
section .text
global AP_startup
;*************************************************
;* Bootloader Entry Point *
;*************************************************
AP_startup:
bits 16
xor eax, eax
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov esp, 0x1000
;************************************************
; Incrementing processor count to acknowledge
; presence. The location of the counter is 0x500
;************************************************
lock inc byte [COUNTER]
cli
hlt
Code: Select all
apboot.o: file format elf32-i386
Disassembly of section .text:
00000000 <AP_startup>:
0: 66 31 c0 xor %ax,%ax
3: 8e d8 mov %eax,%ds
5: 8e c0 mov %eax,%es
7: 8e e0 mov %eax,%fs
9: 8e e8 mov %eax,%gs
b: 8e d0 mov %eax,%ss
d: 66 bc 00 10 mov $0x1000,%sp
11: 00 00 add %al,(%eax) **** WAT IS THIS??
13: f0 fe 06 lock incb (%esi)
16: 00 .byte 0x0 **** AND THIS??
17: 05 .byte 0x5
18: fa cli
19: f4 hlt
David.