aboutsummaryrefslogtreecommitdiffstats
path: root/core/bios.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-02-13 16:09:13 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-02-13 16:09:13 -0800
commita5727651bb78e7cd1bd90046e24fbcedf4f7dfb9 (patch)
tree6cf28a5896cd1c71841b7bb3e713c257ed86af69 /core/bios.c
parent636504f7bb6f9e86cc65addbfb36aed14dc1ecb4 (diff)
downloadsyslinux-a5727651bb78e7cd1bd90046e24fbcedf4f7dfb9.tar.gz
syslinux-a5727651bb78e7cd1bd90046e24fbcedf4f7dfb9.tar.xz
syslinux-a5727651bb78e7cd1bd90046e24fbcedf4f7dfb9.zip
bios: Remove shuffle and boot comapi call
Remove the shuffle and boot comapi call. This is the last of the comapi calls left; we should now be able to completely remove the comapi support. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core/bios.c')
-rw-r--r--core/bios.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/bios.c b/core/bios.c
index ac1f48bc..9cfb94be 100644
--- a/core/bios.c
+++ b/core/bios.c
@@ -665,6 +665,31 @@ void bios_init(void)
dmi_init();
}
+extern void comboot_cleanup_api(void);
+extern void bios_timer_cleanup(void);
+
+extern uint32_t OrigFDCTabPtr;
+
+static void bios_cleanup_hardware(void)
+{
+ /* Restore the original pointer to the floppy descriptor table */
+ if (OrigFDCTabPtr)
+ *((uint32_t *)(4 * 0x1e)) = OrigFDCTabPtr;
+
+ /*
+ * 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 driver, this is *definitely* so!
+ */
+ __intcall(0x13, &zero_regs, NULL);
+
+ call16(comboot_cleanup_api, &zero_regs, NULL);
+ call16(bios_timer_cleanup, &zero_regs, NULL);
+
+ /* If we enabled serial port interrupts, clean them up now */
+ sirq_cleanup();
+}
+
extern void *bios_malloc(size_t, enum heap, size_t);
extern void *bios_realloc(void *, size_t);
extern void bios_free(void *);