summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/firmware/pcbios/hidemem.c
diff options
context:
space:
mode:
authorMichael Brown2007-07-04 00:09:56 +0200
committerMichael Brown2007-07-04 00:09:56 +0200
commit89349d7fad252f0b36be4a764369e6dd40a2e692 (patch)
tree72b112d6152fadee77673994f1e92b82a9c506e8 /src/arch/i386/firmware/pcbios/hidemem.c
parentAdded missing line to set return status code. (diff)
downloadipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.gz
ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.xz
ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.zip
Separated out initialisation functions from startup/shutdown functions.
Diffstat (limited to 'src/arch/i386/firmware/pcbios/hidemem.c')
-rw-r--r--src/arch/i386/firmware/pcbios/hidemem.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/arch/i386/firmware/pcbios/hidemem.c b/src/arch/i386/firmware/pcbios/hidemem.c
index c372246c..9a6dab84 100644
--- a/src/arch/i386/firmware/pcbios/hidemem.c
+++ b/src/arch/i386/firmware/pcbios/hidemem.c
@@ -18,6 +18,7 @@
#include <realmode.h>
#include <biosint.h>
#include <basemem.h>
+#include <gpxe/init.h>
#include <gpxe/hidemem.h>
/** Alignment for hidden memory regions */
@@ -110,7 +111,7 @@ void hide_basemem ( void ) {
* Installs an INT 15 handler to edit Etherboot out of the memory map
* returned by the BIOS.
*/
-void hide_etherboot ( void ) {
+static void hide_etherboot ( void ) {
/* Initialise the hidden regions */
hide_text();
@@ -127,7 +128,7 @@ void hide_etherboot ( void ) {
* Uninstalls the INT 15 handler installed by hide_etherboot(), if
* possible.
*/
-void unhide_etherboot ( void ) {
+static void unhide_etherboot ( void ) {
/* If we have more than one hooked interrupt at this point, it
* means that some other vector is still hooked, in which case
@@ -147,3 +148,9 @@ void unhide_etherboot ( void ) {
unhook_bios_interrupt ( 0x15, ( unsigned int ) int15,
&int15_vector );
}
+
+/** Hide Etherboot startup function */
+struct startup_fn hide_etherboot_startup_fn __startup_fn ( EARLY_STARTUP ) = {
+ .startup = hide_etherboot,
+ .shutdown = unhide_etherboot,
+};