-
the hope is that
biefircate
can implement at least the BIOS interrupts and parts of the BIOS data area described in RBIL[3]-
intrs.
0x00
—0x1f
(incl.0x08
—0x0f
for IRQs 0—7) -
intrs.
0x70
—0x77
for 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
biefircate
to implement MS-DOS intrs. (0x20
—0x33
etc.)
-
-
biefircate
should 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
-
-
-
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
-
Xv6 will panic if it cannot find MP tables per Intel’s (deprecated) MultiProcessor Specification[11]
-
biefircate
produces dummy MP tables ifXV6_COMPAT
is defined -
other OSes probably do not need MP tables to work
-