summaryrefslogtreecommitdiff
path: root/com32/lib/syslinux
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-03-03 10:18:09 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-03-03 10:18:09 -0800
commit908c3fa1c3ea57e2bba148a590ebb788b453af09 (patch)
treec1980e79f4c3d63524fcb282bd6ad4df89121de9 /com32/lib/syslinux
parenta562f1c87424a58daea16dc0bd8801211817c116 (diff)
parent4c8fbb20ad6f612a9fe8022c3a14b402a07b8f33 (diff)
downloadsyslinux-908c3fa1c3ea57e2bba148a590ebb788b453af09.tar.gz
Merge branch 'nocomapi'syslinux-6.03-pre7
Diffstat (limited to 'com32/lib/syslinux')
-rw-r--r--com32/lib/syslinux/biosboot.c39
-rw-r--r--com32/lib/syslinux/shuffle.c11
2 files changed, 42 insertions, 8 deletions
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 dcc4afa4..4f9c22b7 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;
@@ -68,7 +69,6 @@ int syslinux_do_shuffle(struct syslinux_movelist *fraglist,
int need_ptrs;
addr_t desczone, descfree, descaddr;
int nmoves, nzero;
- com32sys_t ireg;
#ifndef __FIRMWARE_BIOS__
errno = ENOSYS;
@@ -219,13 +219,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,
+ (size_t)dp - (size_t)dbuf);
return -1; /* Shouldn't have returned! */
}