aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/syslinux/cleanup.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-07-12 13:34:06 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-07-20 10:20:19 +0100
commitf0bbf9dd40f37f8c4870a33784996efd56955a75 (patch)
tree2a50425df977a28bee4304437daf008a93893624 /com32/lib/syslinux/cleanup.c
parent8486142cf30499e1d53d7faf3a168c8ed3163ab2 (diff)
downloadsyslinux-f0bbf9dd40f37f8c4870a33784996efd56955a75.tar.gz
syslinux-f0bbf9dd40f37f8c4870a33784996efd56955a75.tar.xz
syslinux-f0bbf9dd40f37f8c4870a33784996efd56955a75.zip
Use pxe_call() instead of COMBOOT API
This involved some other changes, such as passing flags to unload_pxe() now that we only call it from C code, and hence don't need to update KeepPXE. We also needed to move some of the pxe function prototypes to com32/include/syslinux/pxe_api.h because they are now referenced outside of the core. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/lib/syslinux/cleanup.c')
-rw-r--r--com32/lib/syslinux/cleanup.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/com32/lib/syslinux/cleanup.c b/com32/lib/syslinux/cleanup.c
index 12140e55..066f174f 100644
--- a/com32/lib/syslinux/cleanup.c
+++ b/com32/lib/syslinux/cleanup.c
@@ -26,15 +26,17 @@
* ----------------------------------------------------------------------- */
#include <syslinux/boot.h>
+#include <syslinux/config.h>
+#include <syslinux/pxe_api.h>
#include <stddef.h>
+#include <bios.h>
#include <com32.h>
+#include <core.h>
void syslinux_final_cleanup(uint16_t flags)
{
- static com32sys_t ireg;
+ if (syslinux_filesystem() == SYSLINUX_FS_PXELINUX)
+ unload_pxe(flags);
- ireg.eax.w[0] = 0x000c;
- ireg.edx.w[0] = flags;
-
- __intcall(0x22, &ireg, NULL);
+ cleanup_hardware();
}