Note: this is not an attempt to structure code. It is an attempt to
outline the basic steps that the platforms we have need to do, based on
current experience. The goal here is to arrive at a common understanding,
and with luck that helps us structure main()

Each item on the list is marked as M (mandatory), R (recommended),
O (optional), A (architecture dependent, not needed on all systems),
C (chipset dependent), B (board dependent)

Assembly startup:
M       Reset jump to start of LinuxBIOS
M       Ensure CPU is in sane state (e.g. Purge I Pipeline, etc.)
A       Put CPU into protected virtual memory mode
B       Do basic init so that DRAM will work
O       Enable serial port debugging print
O       Enable debugging prints to console graphics
O       Memory test
M       Set up C environment
M       Jump to C code

Hardware startup:
A       Configure Cache. Needed here for speed.
A       Processor-dependent steps that are required, e.g. microcode patch
M       Init C display variables. Required before printk()
        Note that printk CAN NOT BE USED before this step.
M       Init malloc memory pool
O       Display processor internal details of value (e.g. intel cpuid)
O       Pick a PCI method if you need to init PCI
O       Size memory so you can tell Linux
A       Re-config the cache so that it caches all of memory
        (Depends on the previous step, or knowing for sure your memory
        size)
O       Configure PCI bus
B       Mainboard fixup
O       enable extended NVRAM access
A       Handle extended machine state (e.g. MTRR)
O       Enable keyboard
O       Enable floppy
A       Enable tables that Linux uses on startup (e.g. SMPBLOCK)
O       Set up IRQ tables for Linux
R       Enable interrupts
O       Final Mainboard Fixup
A       Final  L2 Configure

Kernel startup:
O       Banner
O       Check for keypress, requires that some sort of input device
        be set up

Either:
M       gunzip setup
M       gunzip
M       Linux parameter setup
(mistake! move me!)      APIC setup
M       Jump to Linux

Or:
M       Find kernel image
M       kernel_exec the image

Reply via email to