aboutsummaryrefslogtreecommitdiffstats
path: root/core/cleanup.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2011-11-10 10:23:27 +0000
committerMatt Fleming <matt.fleming@intel.com>2011-12-16 16:31:18 +0000
commita941bb474f0c7044edb66eaed3199501215081a0 (patch)
tree4b00e7149d5343aa9bd52ba6c01938a0d16290d5 /core/cleanup.c
parent89dc4795d95247b36a4dd85cbcd11ca52371c57c (diff)
downloadsyslinux-a941bb474f0c7044edb66eaed3199501215081a0.tar.gz
syslinux-a941bb474f0c7044edb66eaed3199501215081a0.tar.xz
syslinux-a941bb474f0c7044edb66eaed3199501215081a0.zip
core: Add firmware backend support
In an upcoming patch series we're going to need to abstract the firmware operations because they will be provided by both BIOS and EFI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core/cleanup.c')
-rw-r--r--core/cleanup.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/core/cleanup.c b/core/cleanup.c
index 7bf1df2e..4abefcd0 100644
--- a/core/cleanup.c
+++ b/core/cleanup.c
@@ -12,9 +12,11 @@
*/
#include <com32.h>
#include <core.h>
+#include <syslinux/memscan.h>
+#include <syslinux/firmware.h>
-extern void timer_cleanup(void);
extern void comboot_cleanup_api(void);
+extern void bios_timer_cleanup(void);
/*
* cleanup.c
@@ -22,12 +24,7 @@ extern void comboot_cleanup_api(void);
* Some final tidying before jumping to a kernel or bootsector
*/
-/*
- * cleanup_hardware:
- *
- * Shut down anything transient.
- */
-void cleanup_hardware(void)
+void bios_cleanup_hardware(void)
{
/*
* TODO
@@ -39,8 +36,18 @@ void cleanup_hardware(void)
__intcall(0x13, &zero_regs, NULL);
call16(comboot_cleanup_api, &zero_regs, NULL);
- call16(timer_cleanup, &zero_regs, NULL);
+ call16(bios_timer_cleanup, &zero_regs, NULL);
/* If we enabled serial port interrupts, clean them up now */
sirq_cleanup();
}
+
+/*
+ * cleanup_hardware:
+ *
+ * Shut down anything transient.
+ */
+void cleanup_hardware(void)
+{
+ firmware->cleanup();
+}