3 # Each non-boot CPU ("AP") is started up in response to a STARTUP
4 # IPI from the boot CPU. Section B.4.2 of the Multi-Processor
5 # Specification says that the AP will start in real mode with CS:IP
6 # set to XY00:0000, where XY is an 8-bit value sent with the
7 # STARTUP. Thus this code must start at a 4096-byte boundary.
9 # Because this code sets DS to zero, it must sit
10 # at an address in the low 2^16 bytes.
12 # Bootothers (in main.c) sends the STARTUPs one at a time.
13 # It copies this code (start) at 0x7000.
14 # It puts the address of a newly allocated per-core stack in start-4,
15 # and the address of the place to jump to (mpmain) in start-8.
17 # This code is identical to bootasm.S except:
18 # - it does not need to enable A20
19 # - it uses the address at start-4 for the %esp
20 # - it jumps to the address at start-8 instead of calling bootmain
42 ljmp $(SEG_KCODE<<3), $start32
46 movw $(SEG_KDATA<<3), %ax
54 # switch to the stack allocated by bootothers()
71 SEG_ASM(STA_X|STA_R, 0x0, 0xffffffff)
72 SEG_ASM(STA_W, 0x0, 0xffffffff)
75 .word (gdtdesc - gdt - 1)