Fix elf build; rename target file rom.bin to bios.bin.
[seabios.git] / README
diff --git a/README b/README
index 0ca5f1b469063817315cd406c67153a57337aa4a..fe5f601dd6bc1c0215db1240580dd30f9548b53c 100644 (file)
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ This code implements an X86 legacy bios.  It is intended to be
 compiled using standard gnu tools (eg, gas and gcc).
 
 To build, one should be able to run "make" in the main directory.  The
-resulting file "out/rom.bin" contains the processed bios image.
+resulting file "out/bios.bin" contains the processed bios image.
 
 The build requires gcc v4.1 or later.  Some buggy versions of gcc have
 issues with the '-combine' compiler option - in particular, recent
@@ -15,13 +15,13 @@ Testing of images:
 To test the bios under bochs, one will need to instruct bochs to use
 the new bios image.  Use the 'romimage' option - for example:
 
-bochs -q 'floppya: 1_44=myfdimage.img' 'romimage: file=out/rom.bin'
+bochs -q 'floppya: 1_44=myfdimage.img' 'romimage: file=out/bios.bin'
 
 To test under qemu, one will need to create a directory with all the
 bios images and then overwrite the main bios image.  For example:
 
 cp /usr/share/qemu/*.bin mybiosdir/
-cp out/rom.bin mybiosdir/bios.bin
+cp out/bios.bin mybiosdir/
 
 Once this is setup, one can instruct qemu to use the newly created
 directory for rom images.  For example:
@@ -51,10 +51,8 @@ Overview of files:
 
 The src/ directory contains the bios source code.  Several of the
 files are compiled twice - once for 16bit mode and once for 32bit
-mode.  The gcc compile option '-fwhole-program' is used to remove code
-that is not needed for a particular mode.  (In the code, one can use
-the macros 'VISIBLE16' and 'VISIBLE32' to instruct a symbol to be
-outputted in 16bit and 32bit mode respectively.)
+mode.  (The gcc compile option '-fwhole-program' is used to remove
+code that is not needed for a particular mode.)
 
 The tools/ directory contains helper utilities for manipulating and
 building the final rom.
@@ -67,7 +65,9 @@ Build overview:
 
 The 16bit code is compiled via gcc to assembler (file out/blob.16.s).
 The gcc "-fwhole-program" option is used to optimize the process so
-that gcc can efficiently compile and discard unneeded code.
+that gcc can efficiently compile and discard unneeded code.  (In the
+code, one can use the macros 'VISIBLE16' and 'VISIBLE32' to instruct a
+symbol to be outputted in 16bit and 32bit mode respectively.)
 
 This resulting assembler code is pulled into romlayout.S.  The gas
 option ".code16gcc" is used prior to including the gcc generated
@@ -133,8 +133,7 @@ much stack space can break old DOS applications.
 
 There does not appear to be explicit documentation on the minimum
 stack space available for bios calls.  However, Freedos has been
-observed to call into the bios with less than 150 bytes of stack space
-available.
+observed to call into the bios with less than 150 bytes available.
 
 Note that the post code and boot code (irq 18/19) do not have a stack
 limitation because the entry points for these functions reset the
@@ -147,6 +146,12 @@ to functions often helps, sometimes reordering variable declarations
 helps, inlining of functions can sometimes help, and passing of packed
 structures can also help.
 
+Some useful stats: the overhead for the entry to a bios handler that
+takes a 'struct bregs' is 38 bytes of stack space (6 bytes from
+interrupt insn, 28 bytes to store registers, and 4 bytes for call
+insn).  An entry to an ISR handler without args takes 30 bytes (6 + 20
++ 4).
+
 
 Debugging the bios: