summaryrefslogtreecommitdiff
path: root/src/pnpbios.c
Commit message (Collapse)AuthorAgeFilesLines
* Move pnpbios definition to new file std/pnpbios.h.Kevin O'Connor2013-09-181-18/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Move function definitions for output.c from util.h to new file output.h.Kevin O'Connor2013-09-181-1/+2
| | | | | | Also, sort the order of include files in the c files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Rename util.c to string.c and introduce string.h.Kevin O'Connor2013-09-181-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Convert VAR16VISIBLE, VAR16EXPORT, and VAR32VISIBLE to VARFSEG.Kevin O'Connor2013-02-181-2/+2
| | | | | | | | | | | Convert all users of the alternative variable exports to VARFSEG. There isn't a significant distinction between the existing types of exports, so it's simpler to just use one type going forward. The new VARFSEG declaration is only emitting when in 32bit mode, so update and move some variables as needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Normalize POST initialization function name suffixes.Kevin O'Connor2013-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The POST phase has to invoke many initialization functions, and these functions can have complex inter-dependencies. Try to categorize the functions into 4 classes: preinit - functions called very early in POST where function ordering is very important and the code has limited access to other interfaces. init - functions that initialize internal interfaces and standard external interfaces. This code is generally not dependent on particular hardware and typically does not communicate directly with any hardware devices. setup - functions which access hardware or are dependent on particular hardware or platform devices. prepboot - functions that finalize internal interfaces and that prepare for the boot phase. This patch attempts to normalize the suffixes - functions that used _init(), _setup(), _finalize(), or similar that did not follow the above pattern were renamed. Other than function name changes, there should be no code impact to this patch. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Be sure to add "void" to all function prototypes that take no args.Kevin O'Connor2010-01-031-4/+4
| | | | Omitting "void" leads to a K&R style declaration which was not intended.
* Rename VAR16_32 to VAR16VISIBLE.Kevin O'Connor2009-09-091-1/+1
| | | | | Sometimes VAR16_32 is used to export a definition to assembler, so clarify its naming.
* Use "p->sum -= checksum()" style for setting checksums.Kevin O'Connor2009-07-041-1/+1
| | | | | | | Some code cleared the original checksum and then calculated a new one, others manipulated the checksum range to not include the old checksum. However, this was error prone - use the "-=" syntax consistently to reduce possible errors.
* Do garbage collection of unused sections.Kevin O'Connor2009-06-101-1/+1
| | | | | | | | | | | Implement -ffunction-sections and -fdata-sections in both 32bit and 16bit code. Make sure all sections have unique names (even asm and discarded sections). Enhance tools/layoutrom.py script to find all sections reachable from exported 16bit code - prune all other sections. Mark sections with "export" if they can be visible outside of code - these sections wont be dropped when pruning unused sections.
* Minor - change checksum functions to take a (void *).Kevin O'Connor2009-02-151-1/+1
| | | | This reduces the casts in calling code.
* Misc fixes.Kevin O'Connor2009-01-171-2/+2
| | | | | The pnp bios string can't be const and VAR16_32. Show ps2 port status when discarding data.
* Change license from GPLv3 to LGPLv3.Kevin O'Connor2009-01-151-1/+1
| | | | | | | | Change license of contributions from Kevin O'Connor from GPLv3 to LGPLv3 (or later). Since the work as a whole is based on Kevin's contributions and the "bochs bios" which has a license of LGPL (v2 or later), this effectively makes the work as a whole available under LGPLv3 (or later).
* Add more linker protections around variables accessed from 16bit mode.Kevin O'Connor2008-12-291-2/+2
| | | | | | | Rename VAR16 to VAR16_32 -- that macro supports accesses from both 16bit and 32bit mode. Introduce a new macro VAR16 that must be present on all global variables accessed from 16bit mode.
* Add linker magic to ensure 16bit variables aren't repeated in 32bit code.Kevin O'Connor2008-12-281-6/+4
| | | | | | Add VAR16 macro to enable a variable to be available in both 32bit and 16bit code. This reduces the occurrences of "#if MODE16". Also add ASM16 macro to reduce occurrences of "#if MODE16".
* Initial PnP bios call support.Kevin O'Connor2008-12-211-0/+105
This commit provides just enough PnP support for gPXE to not hook int19.