diff options
author | Michael Brown | 2007-01-14 01:53:56 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-14 01:53:56 +0100 |
commit | dca369ddc33d5a7b068182a3ef6f1ca71fbf4960 (patch) | |
tree | 4af7aea56ba10175bb39c1964a144abf7875e1c5 /src/arch/i386/firmware/pcbios/hidemem.c | |
parent | Make shutdown functions callable by OS image's exec methods. (diff) | |
download | ipxe-dca369ddc33d5a7b068182a3ef6f1ca71fbf4960.tar.gz ipxe-dca369ddc33d5a7b068182a3ef6f1ca71fbf4960.tar.xz ipxe-dca369ddc33d5a7b068182a3ef6f1ca71fbf4960.zip |
Call hide_etherboot() from startup(), rather than requiring the prefix to
do it.
Diffstat (limited to 'src/arch/i386/firmware/pcbios/hidemem.c')
-rw-r--r-- | src/arch/i386/firmware/pcbios/hidemem.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arch/i386/firmware/pcbios/hidemem.c b/src/arch/i386/firmware/pcbios/hidemem.c index fa58135e..c372246c 100644 --- a/src/arch/i386/firmware/pcbios/hidemem.c +++ b/src/arch/i386/firmware/pcbios/hidemem.c @@ -128,6 +128,22 @@ void hide_etherboot ( void ) { * possible. */ 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 + * we can't safely unhook INT 15 because we need to keep our + * memory protected. (We expect there to be at least one + * hooked interrupt, because INT 15 itself is still hooked). + */ + if ( hooked_bios_interrupts > 1 ) { + DBG ( "Cannot unhide: %d interrupt vectors still hooked\n", + hooked_bios_interrupts ); + return; + } + + /* Try to unhook INT 15. If it fails, then just leave it + * hooked; it takes care of protecting itself. :) + */ unhook_bios_interrupt ( 0x15, ( unsigned int ) int15, &int15_vector ); } |