summaryrefslogtreecommitdiff
path: root/com32/elflink/ldlinux
diff options
context:
space:
mode:
authorChandramouli Narayanan <chandramouli.narayanan@intel.com>2012-02-02 15:19:17 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-02-02 16:13:12 +0000
commite5b9b7e91515ecf01fa4d6df06e6408ec48da0d2 (patch)
tree00571db8f413719a7c5ee4823ead495aedb57483 /com32/elflink/ldlinux
parent98bf45127946c563b08c847591b583e86c89ecc0 (diff)
downloadsyslinux-e5b9b7e91515ecf01fa4d6df06e6408ec48da0d2.tar.gz
efi: Add Auxiliary Data Vector support
Including deleting some ADV code that found its way into core/elflink. Also, move the __syslinux_adv_ptr and __syslinux_adv_size symbols out of ldlinux.c32 and into the core. Normally we don't want to move symbols into the core (as it increases the size), but we do in this case because the values for these symbols are firmware dependent. Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux')
-rw-r--r--com32/elflink/ldlinux/adv.c19
-rw-r--r--com32/elflink/ldlinux/advwrite.c9
2 files changed, 4 insertions, 24 deletions
diff --git a/com32/elflink/ldlinux/adv.c b/com32/elflink/ldlinux/adv.c
index 78695471..cf02d129 100644
--- a/com32/elflink/ldlinux/adv.c
+++ b/com32/elflink/ldlinux/adv.c
@@ -32,24 +32,9 @@
*/
#include <syslinux/adv.h>
-#include <klibc/compiler.h>
-#include <inttypes.h>
-#include <com32.h>
+#include <syslinux/firmware.h>
-void *__syslinux_adv_ptr;
-size_t __syslinux_adv_size;
-
-extern void adv_init(void);
void __syslinux_init(void)
{
- static com32sys_t reg;
-
- /* Initialize the ADV structure */
- reg.eax.w[0] = 0x0025;
- __intcall(0x22, &reg, NULL);
-
- reg.eax.w[0] = 0x001c;
- __intcall(0x22, &reg, &reg);
- __syslinux_adv_ptr = MK_PTR(reg.es, reg.ebx.w[0]);
- __syslinux_adv_size = reg.ecx.w[0];
+ firmware->adv_ops->init();
}
diff --git a/com32/elflink/ldlinux/advwrite.c b/com32/elflink/ldlinux/advwrite.c
index 4152eea5..95a311a8 100644
--- a/com32/elflink/ldlinux/advwrite.c
+++ b/com32/elflink/ldlinux/advwrite.c
@@ -32,14 +32,9 @@
*/
#include <syslinux/adv.h>
-#include <klibc/compiler.h>
-#include <com32.h>
+#include <syslinux/firmware.h>
int syslinux_adv_write(void)
{
- static com32sys_t reg;
-
- reg.eax.w[0] = 0x001d;
- __intcall(0x22, &reg, &reg);
- return (reg.eflags.l & EFLAGS_CF) ? -1 : 0;
+ return firmware->adv_ops->write();
}