5 # Each non-boot CPU ("AP") is started up in response to a STARTUP
6 # IPI from the boot CPU. Section B.4.2 of the Multi-Processor
7 # Specification says that the AP will start in real mode with CS:IP
8 # set to XY00:0000, where XY is an 8-bit value sent with the
9 # STARTUP. Thus this code must start at a 4096-byte boundary.
11 # Because this code sets DS to zero, it must sit
12 # at an address in the low 2^16 bytes.
14 # Startothers (in main.c) sends the STARTUPs one at a time.
15 # It copies this code (start) at 0x7000. It puts the address of
16 # a newly allocated per-core stack in start-4,the address of the
17 # place to jump to (mpenter) in start-8, and the physical address
18 # of entrypgdir in start-12.
20 # This code is identical to bootasm.S except:
21 # - it does not need to enable A20
22 # - it uses the address at start-4, start-8, and start-12
40 ljmpl $(SEG_KCODE<<3), $(start32)
44 movw $(SEG_KDATA<<3), %ax
52 # Turn on page size extension for 4Mbyte pages
56 # Use enterpgdir as our initial page table
61 orl $(CR0_PE|CR0_PG|CR0_WP), %eax
64 # Switch to the stack allocated by startothers()
80 SEG_ASM(STA_X|STA_R, 0, 0xffffffff)
81 SEG_ASM(STA_W, 0, 0xffffffff)
85 .word (gdtdesc - gdt - 1)