summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrtm <rtm>2008-08-28 00:52:05 +0000
committerrtm <rtm>2008-08-28 00:52:05 +0000
commit56082468ea935c09ab2ed89ee83f9b0869f580b1 (patch)
tree029d23f123321e3ba1fdf23b2f109baec955a6f4
parent02cc595f28f10067dcaacc7e147a3db7da277244 (diff)
downloadxv6-labs-56082468ea935c09ab2ed89ee83f9b0869f580b1.tar.gz
xv6-labs-56082468ea935c09ab2ed89ee83f9b0869f580b1.tar.bz2
xv6-labs-56082468ea935c09ab2ed89ee83f9b0869f580b1.zip
the old explanation of AP startup might have been correct, but
I understand this one.
-rw-r--r--bootother.S19
1 files 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.
#