aboutsummaryrefslogtreecommitdiffstats
path: root/com32
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 /com32
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 'com32')
-rw-r--r--com32/include/syslinux/boot.h3
-rw-r--r--com32/lib/syslinux/biosboot.c39
-rw-r--r--com32/lib/syslinux/shuffle.c11
3 files changed, 45 insertions, 8 deletions
diff --git a/com32/include/syslinux/boot.h b/com32/include/syslinux/boot.h
index 74a311df..6079e7c1 100644
--- a/com32/include/syslinux/boot.h
+++ b/com32/include/syslinux/boot.h
@@ -48,6 +48,9 @@ void syslinux_chain_bootstrap(uint16_t flags, const void *bootstrap,
uint32_t bootstrap_len, uint32_t edx,
uint32_t esi, uint16_t ds);
+void bios_do_shuffle_and_boot(uint16_t bootflags, uint32_t descaddr,
+ const void *descbuf, uint32_t dsize);
+
struct image_types {
const char *name;
uint32_t type;
diff --git a/com32/lib/syslinux/biosboot.c b/com32/lib/syslinux/biosboot.c
new file mode 100644
index 00000000..9bdf84fb
--- /dev/null
+++ b/com32/lib/syslinux/biosboot.c
@@ -0,0 +1,39 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2014 Intel Corporation; author: H. Peter Anvin
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall
+ * be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * ----------------------------------------------------------------------- */
+
+#include <syslinux/boot.h>
+#include <syslinux/movebits.h>
+
+void bios_do_shuffle_and_boot(uint16_t bootflags, uint32_t descaddr,
+ const void *descbuf, uint32_t dsize)
+{
+ extern void do_raw_shuffle_and_boot(addr_t, const void *, addr_t);
+
+ syslinux_final_cleanup(bootflags);
+ do_raw_shuffle_and_boot(descaddr, descbuf, dsize);
+ /* Should not return */
+}
diff --git a/com32/lib/syslinux/shuffle.c b/com32/lib/syslinux/shuffle.c
index ce85a5c4..2752c881 100644
--- a/com32/lib/syslinux/shuffle.c
+++ b/com32/lib/syslinux/shuffle.c
@@ -43,6 +43,7 @@
#include <dprintf.h>
#include <syslinux/movebits.h>
#include <klibc/compiler.h>
+#include <syslinux/boot.h>
struct shuffle_descriptor {
uint32_t dst, src, len;
@@ -78,7 +79,6 @@ int syslinux_do_shuffle(struct syslinux_movelist *fraglist,
int need_ptrs;
addr_t desczone, descfree, descaddr;
int nmoves, nzero;
- com32sys_t ireg;
descaddr = 0;
dp = dbuf = NULL;
@@ -224,13 +224,8 @@ bail:
return rv;
/* Actually do it... */
- memset(&ireg, 0, sizeof ireg);
- ireg.edi.l = descaddr;
- ireg.esi.l = (addr_t) dbuf;
- ireg.ecx.l = (addr_t) dp - (addr_t) dbuf;
- ireg.edx.w[0] = bootflags;
- ireg.eax.w[0] = 0x0024;
- __intcall(0x22, &ireg, NULL);
+ bios_do_shuffle_and_boot(bootflags, descaddr, dbuf,
+ (addr_t)dp - (addr_t)dbuf);
return -1; /* Shouldn't have returned! */
}