|
@@ -190,6 +190,8 @@ static void hide_etherboot ( void ) {
|
190
|
190
|
* possible.
|
191
|
191
|
*/
|
192
|
192
|
static void unhide_etherboot ( int flags __unused ) {
|
|
193
|
+ struct memory_map memmap;
|
|
194
|
+ int rc;
|
193
|
195
|
|
194
|
196
|
/* If we have more than one hooked interrupt at this point, it
|
195
|
197
|
* means that some other vector is still hooked, in which case
|
|
@@ -203,15 +205,23 @@ static void unhide_etherboot ( int flags __unused ) {
|
203
|
205
|
return;
|
204
|
206
|
}
|
205
|
207
|
|
206
|
|
- /* Try to unhook INT 15. If it fails, then just leave it
|
207
|
|
- * hooked; it takes care of protecting itself. :)
|
208
|
|
- */
|
209
|
|
- unhook_bios_interrupt ( 0x15, ( unsigned int ) int15,
|
210
|
|
- &int15_vector );
|
|
208
|
+ /* Try to unhook INT 15 */
|
|
209
|
+ if ( ( rc = unhook_bios_interrupt ( 0x15, ( unsigned int ) int15,
|
|
210
|
+ &int15_vector ) ) != 0 ) {
|
|
211
|
+ DBG ( "Cannot unhook INT15: %s\n", strerror ( rc ) );
|
|
212
|
+ /* Leave it hooked; there's nothing else we can do,
|
|
213
|
+ * and it should be intrinsically safe (though
|
|
214
|
+ * wasteful of RAM).
|
|
215
|
+ */
|
|
216
|
+ }
|
211
|
217
|
|
212
|
218
|
/* Unhook fake E820 map, if used */
|
213
|
219
|
if ( FAKE_E820 )
|
214
|
220
|
unfake_e820();
|
|
221
|
+
|
|
222
|
+ /* Dump memory map after unhiding */
|
|
223
|
+ DBG ( "Unhidden iPXE from system memory map\n" );
|
|
224
|
+ get_memmap ( &memmap );
|
215
|
225
|
}
|
216
|
226
|
|
217
|
227
|
/** Hide Etherboot startup function */
|