-
the hope is that
biefircatecan implement at least the BIOS interrupts and parts of the BIOS data area described in RBIL[3]-
intrs.
0x00—0x1f(incl.0x08—0x0ffor IRQs 0—7) -
intrs.
0x70—0x77for IRQs 8—15 -
the BIOS data area
0x40:0—0x50:0 -
maybe also intrs.
0x40(relocated diskette I/O) and0x42(relocated video output services) -
no need for
biefircateto implement MS-DOS intrs. (0x20—0x33etc.)
-
-
biefircateshould also properly initialize any option ROMs for PCI devices — PCI firmware spec.[4] says how -
we assume the PC firmware
-
some PCs — but not all — allow bootloaders to access the firmware volume protocol;[6] this can be used to discover some option ROMs
-
stage 1 is for stuff that happens before exiting UEFI boot services; stage 2 is for stuff after that
-
other than the above, there are (currently) no hard and fast rules for delineating the two
-
stage 1 passes a pointer to a linked list of boot parameters (see
bparm.h) to stage 2
-
-
stage 2
-
currently takes the form of an ELF executable[7]
-
32-bit, but can access 64-bit addr. space via PAE paging[8]
-
-
calling convention used is
-mregparm=3 -mrtd-
when calling non-variadic function: first few arguments go in
eax,edx,ecx; callee pops any stack arguments -
callee must preserve
ebx(!),esi,edi,ebp
-
-
-
☐ Screen output
-
☑ via VGA option ROM, if present
-
☐ via framebuffer from UEFI bootloader[9]
-
-
☐ Keyboard input
-
☑ via PS/2 keyboard — partially working
-
☑ via USB keyboard emulating legacy PS/2 keyboard using SMI
-
☑ EHCI — partially working
-
☑ XHCI — implemented, need testing
-
-
☐ via USB keyboard directly
-
-
☐ Storage drive I/O
-
☐ Time-keeping — useful-to-have capability for interacting with other devices e.g. keyboard and storage (!)
-
☑ via legacy PIT and/or CMOS RTC
-
☐ via time stamp counter (
rdtsc) or APIC timer, on a CPU -
☐ via HPET or ACPI timer, outside CPUs
-
-
UEFI stuff
-
note: boot services will be unavailable once bootloader calls
BS→ExitBootServices(, )-
might be possible to implement a BIOS without exiting boot services, but this is non-trivial — UEFI expects to be in control of most system resources, incl. memory, page tables, and IRQs
-
-
-
how to correctly interface with PC hardware legacy-style
-
USB stuff — possibly useful are
-
Xv6 will panic if it cannot find MP tables per Intel’s (deprecated) MultiProcessor Specification[15]
-
biefircateproduces dummy MP tables ifXV6_COMPATis defined -
other OSes probably do not need MP tables to work
-