diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2011-04-25 20:08:32 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2011-04-25 20:25:02 -0700 |
| commit | 3953ca3532ca3281cc248f9985d9276c6f8486f0 (patch) | |
| tree | a03065fdb9d42e0d60867136b7abe25bbea99732 /com32/lib | |
| parent | 57b7af7df6599a8cdb318d7adeda1cd6fb981626 (diff) | |
| download | syslinux-3953ca3532ca3281cc248f9985d9276c6f8486f0.tar.gz | |
Generalize ipappend handling as "sysappend", and move to PM code
Generalize the ipappend handling to cover all the derivatives, and
rename it "sysappend" ("ipappend" is a valid alias for all
derivatives.) Move all the string handling to protected mode.
Currently only pxelinux exports strings, but the plan is to change
that in the future.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib')
| -rw-r--r-- | com32/lib/syslinux/ipappend.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/com32/lib/syslinux/ipappend.c b/com32/lib/syslinux/ipappend.c index bd000920..678a343b 100644 --- a/com32/lib/syslinux/ipappend.c +++ b/com32/lib/syslinux/ipappend.c @@ -1,6 +1,7 @@ /* ----------------------------------------------------------------------- * * * Copyright 2008 H. Peter Anvin - All Rights Reserved + * Copyright 2011 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 @@ -31,28 +32,16 @@ * Get ipappend strings */ +#include <syslinux/sysappend.h> #include <syslinux/config.h> +#include <syslinux/pmapi.h> #include <klibc/compiler.h> #include <com32.h> struct syslinux_ipappend_strings __syslinux_ipappend_strings; -static const char *syslinux_ipappend_string_list[32]; void __constructor __syslinux_get_ipappend_strings(void) { - static com32sys_t reg; - int i; - - reg.eax.w[0] = 0x000f; - __intcall(0x22, ®, ®); - - if (!(reg.eflags.l & EFLAGS_CF)) { - __syslinux_ipappend_strings.count = reg.ecx.w[0]; - __syslinux_ipappend_strings.ptr = syslinux_ipappend_string_list; - for (i = 0; i < reg.ecx.w[0]; i++) { - syslinux_ipappend_string_list[i] = - MK_PTR(reg.es, - *(uint16_t *) MK_PTR(reg.es, reg.ebx.w[0] + i * 2)); - } - } + __syslinux_ipappend_strings.count = __com32.cs_pm->sysappend_count; + __syslinux_ipappend_strings.ptr = __com32.cs_pm->sysappend_strings; } |
