Ode to Real Mode Setup Code

Composed for: CPSC 457 Principles of Operating Systems (Winter 2012)
Professor Michael E. Locasto [last update: 24 Jan 2012]
oh real mode setup code
with only IDT and GDT around
virtual memory can't be found
when z-compressed, the kernel lies
in low memory, not high.
I'm seeing double startup_32
can you please reset my FPU?

oh real mode setup code
you bootstrap your ability to self-load
with a tiny little jump...
bye bye GRUB; don't come back
only...the A20 pin seems like a hack
settle on that PAGE_OFFSET
4K blocks have life left yet

hey! real mode setup code
with BIOS POST in your dim dark past
we will set the PE bit at last
protected mode is just ahead --
you had better be prepared for init_sched().
when /sbin/init was only a kernel thread
there was no need to reap the zombies dead

dear real mode setup code
your lack of a PG bit in cr0
means you're still my hero
a call to kernel_thread seems to me
to help kernel_execve root the process tree
after this run_init_process you are only distant memory
until another CPU RESET brings you back to me