summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/firmware/pcbios/hidemem.c
diff options
context:
space:
mode:
authorMichael Brown2013-03-08 13:22:56 +0100
committerMichael Brown2013-03-08 18:40:46 +0100
commitb33082a52b093ad91d2de55be5fe258630985562 (patch)
treea5731ca845eaeacf944991c555b5eeeccd44c752 /src/arch/i386/firmware/pcbios/hidemem.c
parent[build] Add vmware build target (diff)
downloadipxe-b33082a52b093ad91d2de55be5fe258630985562.tar.gz
ipxe-b33082a52b093ad91d2de55be5fe258630985562.tar.xz
ipxe-b33082a52b093ad91d2de55be5fe258630985562.zip
[pcbios] Add extra debugging messages when unhiding iPXE from memory
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/firmware/pcbios/hidemem.c')
-rw-r--r--src/arch/i386/firmware/pcbios/hidemem.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/arch/i386/firmware/pcbios/hidemem.c b/src/arch/i386/firmware/pcbios/hidemem.c
index c1788b3a..8f3069e1 100644
--- a/src/arch/i386/firmware/pcbios/hidemem.c
+++ b/src/arch/i386/firmware/pcbios/hidemem.c
@@ -190,6 +190,8 @@ static void hide_etherboot ( void ) {
* possible.
*/
static void unhide_etherboot ( int flags __unused ) {
+ struct memory_map memmap;
+ int rc;
/* If we have more than one hooked interrupt at this point, it
* means that some other vector is still hooked, in which case
@@ -203,15 +205,23 @@ static void unhide_etherboot ( int flags __unused ) {
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 );
+ /* Try to unhook INT 15 */
+ if ( ( rc = unhook_bios_interrupt ( 0x15, ( unsigned int ) int15,
+ &int15_vector ) ) != 0 ) {
+ DBG ( "Cannot unhook INT15: %s\n", strerror ( rc ) );
+ /* Leave it hooked; there's nothing else we can do,
+ * and it should be intrinsically safe (though
+ * wasteful of RAM).
+ */
+ }
/* Unhook fake E820 map, if used */
if ( FAKE_E820 )
unfake_e820();
+
+ /* Dump memory map after unhiding */
+ DBG ( "Unhidden iPXE from system memory map\n" );
+ get_memmap ( &memmap );
}
/** Hide Etherboot startup function */