aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/adv.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-05-25 08:39:47 +0100
committerMatt Fleming <matt.fleming@linux.intel.com>2011-05-25 08:44:48 +0100
commit565952b9d86d769471d500caab5ebba9bc36c363 (patch)
tree46ca624afd1d6997d4ebfb91345613b42deb5e70 /com32/elflink/ldlinux/adv.c
parenteecc876ef99deb4cf753db5b31d5eb1f83600b6c (diff)
downloadsyslinux-565952b9d86d769471d500caab5ebba9bc36c363.tar.gz
syslinux-565952b9d86d769471d500caab5ebba9bc36c363.tar.xz
syslinux-565952b9d86d769471d500caab5ebba9bc36c363.zip
ldlinux: Add support for Auxillary Data Vector
Move all the code for the ADV into ldlinux so that it doesn't have any dependencies on other modules. We also need a way to initialize the ADV from ldlinux, so add another vector to the comboot API. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/adv.c')
-rw-r--r--com32/elflink/ldlinux/adv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/adv.c b/com32/elflink/ldlinux/adv.c
index be38e89d..b81361f2 100644
--- a/com32/elflink/ldlinux/adv.c
+++ b/com32/elflink/ldlinux/adv.c
@@ -33,15 +33,21 @@
#include <syslinux/adv.h>
#include <klibc/compiler.h>
+#include <inttypes.h>
#include <com32.h>
void *__syslinux_adv_ptr;
size_t __syslinux_adv_size;
-void __constructor __syslinux_get_adv(void)
+extern void adv_init(void);
+void __constructor __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]);