summaryrefslogtreecommitdiff
path: root/bootother.S
diff options
context:
space:
mode:
authorRuss Cox <[email protected]>2009-08-08 01:07:30 -0700
committerRuss Cox <[email protected]>2009-08-08 01:07:30 -0700
commit0aef8914959af9e472852611eb6352c211093d35 (patch)
tree0658cf47dcb134b79e5311209c2a2840d1a79650 /bootother.S
parentb3bebfce8a790975ba941d346e6bcff1b5afecf9 (diff)
downloadxv6-labs-0aef8914959af9e472852611eb6352c211093d35.tar.gz
xv6-labs-0aef8914959af9e472852611eb6352c211093d35.tar.bz2
xv6-labs-0aef8914959af9e472852611eb6352c211093d35.zip
shuffle and tweak for formatting.
pdf has very good page breaks now. would be a good copy for fall 2009.
Diffstat (limited to 'bootother.S')
-rw-r--r--bootother.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/bootother.S b/bootother.S
index 47f547e..9005d48 100644
--- a/bootother.S
+++ b/bootother.S
@@ -38,7 +38,7 @@ start:
//PAGEBREAK!
# Switch from real to protected mode, using a bootstrap GDT
# and segment translation that makes virtual addresses
- # identical to their physical addresses, so that the
+ # identical to physical addresses, so that the
# effective memory map does not change during the switch.
lgdt gdtdesc
movl %cr0, %eax
@@ -47,10 +47,10 @@ start:
# Jump to next instruction, but in 32-bit code segment.
# Switches processor into 32-bit mode.
- ljmp $(SEG_KCODE<<3), $protcseg
+ ljmp $(SEG_KCODE<<3), $start32
- .code32 # Assemble for 32-bit mode
-protcseg:
+.code32 # Assemble for 32-bit mode
+start32:
# Set up the protected-mode data segment registers
movw $(SEG_KDATA<<3), %ax # Our data segment selector
movw %ax, %ds # -> DS: Data Segment
@@ -60,11 +60,11 @@ protcseg:
movw %ax, %fs # -> FS
movw %ax, %gs # -> GS
+ # Set up the stack pointer and call into C.
movl start-4, %esp
- movl start-8, %eax
- call *%eax
+ call *(start-8)
- # If bootmain returns (it shouldn't), trigger a Bochs
+ # If the call returns (it shouldn't), trigger a Bochs
# breakpoint if running under Bochs, then loop.
movw $0x8a00, %ax # 0x8a00 -> port 0x8a00
movw %ax, %dx