summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-27 12:48:03 +0000
committerrsc <rsc>2007-08-27 12:48:03 +0000
commit8e67005320c56cac63654bcf61a8128bd89e4ff9 (patch)
treef3e8733f066a06be0d76de5fbc1189eddaa9b020
parent8d2e9a4867c21f1ff84b78cd82f386394d768b3a (diff)
downloadxv6-labs-8e67005320c56cac63654bcf61a8128bd89e4ff9.tar.gz
xv6-labs-8e67005320c56cac63654bcf61a8128bd89e4ff9.tar.bz2
xv6-labs-8e67005320c56cac63654bcf61a8128bd89e4ff9.zip
cut bootmain to 1 sheet
-rw-r--r--bootmain.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/bootmain.c b/bootmain.c
index 45b4e53..fe95fa3 100644
--- a/bootmain.c
+++ b/bootmain.c
@@ -1,31 +1,11 @@
-// This a dirt simple boot loader, whose sole job is to boot
-// an elf kernel image from the first IDE hard disk.
-//
-// DISK LAYOUT
-// * This program(boot.S and main.c) is the bootloader. It should
-// be stored in the first sector of the disk.
-//
-// * The 2nd sector onward holds the kernel image.
-//
-// * The kernel image must be in ELF format.
-//
-// BOOT UP STEPS
-// * when the CPU boots it loads the BIOS into memory and executes it
-//
-// * the BIOS intializes devices, sets up the interrupt routines, and
-// reads the first sector of the boot device(e.g., hard-drive)
-// into memory and jumps to it.
-//
-// * Assuming this boot loader is stored in the first sector of the
-// hard-drive, this code takes over...
-//
-// * control starts in bootloader.S -- which sets up protected mode,
-// and a stack so C code then run, then calls cmain()
-//
-// * cmain() in this file takes over,
-// reads in the kernel and jumps to it.
-
-//PAGEBREAK!
+// Boot loader.
+//
+// The BIOS loads boot sector (bootasm.S) from sector 1 of the disk
+// into memory and executes it. The boot sector puts the processor
+// in 32-bit mode and calls cmain below, which loads an ELF kernel
+// image from the disk starting at sector 2 and then jumps to the
+// kernel entry routine.
+
#include "types.h"
#include "elf.h"
#include "x86.h"