[syslinux:elflink] localboot: remove unnecessary real-mode call
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Tue May 29 14:57:03 PDT 2012
Commit-ID: 6bf0c8bef0d3562e7eb4bc8bbc16ccc16f191a31
Gitweb: http://www.syslinux.org/commit/6bf0c8bef0d3562e7eb4bc8bbc16ccc16f191a31
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Mon, 28 May 2012 00:31:59 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Mon, 28 May 2012 00:46:57 -0300
localboot: remove unnecessary real-mode call
syslinux_local_boot() used to call local_boot() from INT 0x22
(AX=0x0014) as it should just call local_boot() function.
The local_boot() function is now exported by core/include/localboot.h to
be used in COM32 library space so that syslinux_local_boot() can use it.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
com32/elflink/ldlinux/execute.c | 6 ++----
com32/include/syslinux/boot.h | 2 +-
com32/lib/syslinux/localboot.c | 10 +++-------
.../syslinux/idle.h => core/include/localboot.h | 15 +++++----------
4 files changed, 11 insertions(+), 22 deletions(-)
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index afe999e..e22c999 100644
--- a/com32/elflink/ldlinux/execute.c
+++ b/com32/elflink/ldlinux/execute.c
@@ -21,6 +21,7 @@
#include "menu.h"
#include "fs.h"
#include "config.h"
+#include "localboot.h"
/* Must match enum kernel_type */
const char *const kernel_types[] = {
@@ -99,10 +100,7 @@ void execute(const char *cmdline, enum kernel_type type)
start_ldlinux(argv);
} else if (type == KT_LOCALBOOT) {
- /* process the image need int 22 support */
- ireg.eax.w[0] = 0x0014; /* Local boot */
- ireg.edx.w[0] = strtoul(kernel, NULL, 0);
- __intcall(0x22, &ireg, NULL);
+ local_boot(strtoul(kernel, NULL, 0));
} else {
/* Need add one item for kernel load, as we don't use
* the assembly runkernel.inc any more */
diff --git a/com32/include/syslinux/boot.h b/com32/include/syslinux/boot.h
index 21bea01..870cff3 100644
--- a/com32/include/syslinux/boot.h
+++ b/com32/include/syslinux/boot.h
@@ -40,7 +40,7 @@
int syslinux_run_command(const char *);
__noreturn syslinux_run_default(void);
-void syslinux_local_boot(uint16_t flags);
+void syslinux_local_boot(int16_t flags);
void syslinux_final_cleanup(uint16_t flags);
diff --git a/com32/lib/syslinux/localboot.c b/com32/lib/syslinux/localboot.c
index 3b480c7..16016a9 100644
--- a/com32/lib/syslinux/localboot.c
+++ b/com32/lib/syslinux/localboot.c
@@ -28,15 +28,11 @@
#include <syslinux/boot.h>
#include <stddef.h>
#include <com32.h>
+#include <localboot.h>
/* This returns only on failure */
-void syslinux_local_boot(uint16_t flags)
+void syslinux_local_boot(int16_t flags)
{
- static com32sys_t ireg;
-
- ireg.eax.w[0] = 0x0014;
- ireg.edx.w[0] = flags;
-
- __intcall(0x22, &ireg, NULL);
+ local_boot(flags);
}
diff --git a/com32/include/syslinux/idle.h b/core/include/localboot.h
similarity index 86%
copy from com32/include/syslinux/idle.h
copy to core/include/localboot.h
index 6a45236..4bb79a6 100644
--- a/com32/include/syslinux/idle.h
+++ b/core/include/localboot.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
- * Copyright 2005-2008 H. Peter Anvin - All Rights Reserved
+ * Copyright 2012 Paulo Alcantara <pcacjr at zytor.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -25,14 +25,9 @@
*
* ----------------------------------------------------------------------- */
-/*
- * syslinux/idle.h
- */
+#ifndef LOCALBOOT_H_
+#define LOCALBOOT_H_
-#ifndef _SYSLINUX_IDLE_H
-#define _SYSLINUX_IDLE_H
+extern void local_boot(int16_t ax);
-void syslinux_idle(void);
-void syslinux_reset_idle(void);
-
-#endif
+#endif /* LOCALBOOT_H_ */
More information about the Syslinux-commits
mailing list