[i386] Free allocated base memory on exit, if possible
Code paths that automatically allocate memory from the FBMS at 40:13 should also free it, if possible. Freeing this memory will not be possible if either 1. The FBMS has been modified since our allocation, or 2. We have not been able to unhook one or more BIOS interrupt vectors.
This commit is contained in:
@@ -318,7 +318,7 @@ print_free_basemem:
|
||||
*****************************************************************************
|
||||
*/
|
||||
finished:
|
||||
jmp run_etherboot
|
||||
jmp run_gpxe
|
||||
|
||||
/*****************************************************************************
|
||||
* Subroutine: print segment:offset address
|
||||
@@ -554,11 +554,11 @@ flags: .word UNDI_FL_STARTED
|
||||
.equ undi_device_size, ( . - undi_device )
|
||||
|
||||
/*****************************************************************************
|
||||
* Run Etherboot main code
|
||||
* Run gPXE main code
|
||||
*****************************************************************************
|
||||
*/
|
||||
run_etherboot:
|
||||
/* Install Etherboot */
|
||||
run_gpxe:
|
||||
/* Install gPXE */
|
||||
call install
|
||||
|
||||
/* Set up real-mode stack */
|
||||
@@ -585,7 +585,10 @@ run_etherboot:
|
||||
pushl $main
|
||||
pushw %cs
|
||||
call prot_call
|
||||
popl %eax /* discard */
|
||||
popl %ecx /* discard */
|
||||
|
||||
/* Uninstall gPXE */
|
||||
call uninstall
|
||||
|
||||
/* Boot next device */
|
||||
int $0x18
|
||||
|
||||
Reference in New Issue
Block a user