diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-07-03 08:50:13 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-07-20 10:20:19 +0100 |
commit | 8486142cf30499e1d53d7faf3a168c8ed3163ab2 (patch) | |
tree | d8e4e835da8f577d28f847fdd4a25090cdbf340e /com32/lib/syslinux/runimage.c | |
parent | 373a42433c4bea38d4d93ee749bd4d7f19bded51 (diff) | |
download | syslinux-8486142cf30499e1d53d7faf3a168c8ed3163ab2.tar.gz |
elflink: Replace __intcall() with direct function calls
There's no reason to use the COMBOOT API at all now that we can have
any undefined symbols resolved at runtime - we can just access
functions directly.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/lib/syslinux/runimage.c')
-rw-r--r-- | com32/lib/syslinux/runimage.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/com32/lib/syslinux/runimage.c b/com32/lib/syslinux/runimage.c index d5cdbc62..4391114c 100644 --- a/com32/lib/syslinux/runimage.c +++ b/com32/lib/syslinux/runimage.c @@ -34,15 +34,18 @@ #include <stdlib.h> #include <string.h> #include <syslinux/boot.h> -#include <com32.h> +#include <syslinux/config.h> +#include <core.h> + +extern unsigned int ipappend; void syslinux_run_kernel_image(const char *filename, const char *cmdline, uint32_t ipappend_flags, uint32_t type) { - static com32sys_t ireg; char *bbfilename = NULL; char *bbcmdline = NULL; + bbfilename = lstrdup(filename); if (!bbfilename) goto fail; @@ -51,16 +54,10 @@ void syslinux_run_kernel_image(const char *filename, const char *cmdline, if (!bbcmdline) goto fail; + if (syslinux_filesystem() == SYSLINUX_FS_PXELINUX) + ipappend = ipappend_flags; - ireg.eax.w[0] = 0x0016; - ireg.ds = SEG(bbfilename); - /* ireg.esi.w[0] = OFFS(bbfilename); */ - ireg.es = SEG(bbcmdline); - /* ireg.ebx.w[0] = OFFS(bbcmdline); */ - ireg.ecx.l = ipappend_flags; - ireg.edx.l = type; - - __intcall(0x22, &ireg, 0); + execute(bbfilename, type); fail: if (bbcmdline) |