Fix boot sectors; cleanup_hardware must preserve registers syslinux-3.53-pre4
authorH. Peter Anvin <hpa@zytor.com>
Wed, 14 Nov 2007 05:51:27 +0000 (21:51 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 14 Nov 2007 05:51:27 +0000 (21:51 -0800)
cleanup_hardware has registers live across it when called from the
boot sector code; it must preserve all registers.

cleanup.inc

index 45ef920..1025705 100644 (file)
@@ -24,7 +24,7 @@
 ;      Can trash any registers.
 ;
 cleanup_hardware:
-
+               pushad
 ;
 ; Linux wants the floppy motor shut off before starting the kernel,
 ; at least bootsect.S seems to imply so.  If we don't load the floppy
@@ -50,4 +50,5 @@ cleanup_hardware:
 .no_vmware:
 %endif
 
+               popad
                ret