cut bootmain to 1 sheet

This commit is contained in:
rsc 2007-08-27 12:48:03 +00:00
parent 8d2e9a4867
commit 8e67005320

View file

@ -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.
// 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.
//PAGEBREAK!
#include "types.h"
#include "elf.h"
#include "x86.h"