From 56082468ea935c09ab2ed89ee83f9b0869f580b1 Mon Sep 17 00:00:00 2001 From: rtm Date: Thu, 28 Aug 2008 00:52:05 +0000 Subject: [PATCH] the old explanation of AP startup might have been correct, but I understand this one. --- bootother.S | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bootother.S b/bootother.S index 029e0ef..39b284d 100644 --- a/bootother.S +++ b/bootother.S @@ -1,15 +1,16 @@ #include "asm.h" -# Start an Application Processor. This must be placed on a 4KB boundary -# somewhere in the 1st MB of conventional memory (APBOOTSTRAP). However, -# due to some shortcuts below it's restricted further to within the 1st -# 64KB. The AP starts in real-mode, with -# CS selector set to the startup memory address/16; -# CS base set to startup memory address; -# CS limit set to 64KB; -# CPL and IP set to 0. +# Each non-boot CPU ("AP") is started up in response to a STARTUP +# IPI from the boot CPU. Section B.4.2 of the Multi-Processor +# Specification says that the AP will start in real mode with CS:IP +# set to XY00:0000, where XY is an 8-bit value sent with the +# STARTUP. Thus this code must start at a 4096-byte boundary. # -# Bootothers (in main.c) starts each non-boot CPU in turn. +# Because this code sets DS to zero, it must sit +# at an address in the low 2^16 bytes. +# +# Bootothers (in main.c) sends the STARTUPs, one at a time. +# It puts this code (start) at 0x7000. # It puts the correct %esp in start-4, # and the place to jump to in start-8. #