aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-06-08 14:07:37 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-06-08 14:07:37 +0100
commitb1b44de1264c40f806f672012bac590cf87eca92 (patch)
tree158a0f5b18260e65e6a68a24afc667786a0e37f8 /com32/modules
parente33c487c3930357a4f53455e019c72be0477ef98 (diff)
downloadsyslinux-b1b44de1264c40f806f672012bac590cf87eca92.tar.gz
syslinux-b1b44de1264c40f806f672012bac590cf87eca92.tar.xz
syslinux-b1b44de1264c40f806f672012bac590cf87eca92.zip
Delete all references to __com32.cs_bounce
The COM32 cs_bounce buffer is not usable with ELF modules, as we're trying to move to an environment where memory is dynamically allocated. All users of __com32.cs_bounce have been converted to using lmalloc() to allocate low memory. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/gpxecmd.c5
-rw-r--r--com32/modules/pxechn.c8
-rw-r--r--com32/modules/sanboot.c5
3 files changed, 10 insertions, 8 deletions
diff --git a/com32/modules/gpxecmd.c b/com32/modules/gpxecmd.c
index fe414b9a..9d4f4561 100644
--- a/com32/modules/gpxecmd.c
+++ b/com32/modules/gpxecmd.c
@@ -43,7 +43,10 @@ static void gpxecmd(const char **args)
memset(&reg, 0, sizeof reg);
- fx = __com32.cs_bounce;
+ fx = lmalloc(sizeof *fx);
+ if (!fx)
+ return;
+
q = (char *)(fx + 1);
fx->Status = 1;
diff --git a/com32/modules/pxechn.c b/com32/modules/pxechn.c
index 3f9ebd32..1902d4ef 100644
--- a/com32/modules/pxechn.c
+++ b/com32/modules/pxechn.c
@@ -1031,10 +1031,7 @@ int pxe_restart(char *ifn)
}
printf(" Attempting to boot '%s'...\n\n", pxe.fn);
memset(&reg, 0, sizeof reg);
- if (sizeof(t_PXENV_TFTP_READ_FILE) <= __com32.cs_bounce_size) {
- pxep = __com32.cs_bounce;
- memset(pxep, 0, sizeof(t_PXENV_RESTART_TFTP));
- } else if (!(pxep = lzalloc(sizeof(t_PXENV_RESTART_TFTP)))){
+ if (!(pxep = lzalloc(sizeof(t_PXENV_RESTART_TFTP)))){
dprintf("Unable to lzalloc() for PXE call structure\n");
goto ret;
}
@@ -1055,8 +1052,7 @@ int pxe_restart(char *ifn)
__intcall(0x22, &reg, &reg);
printf("PXENV_RESTART_TFTP returned %d\n", pxep->Status);
- if (pxep != __com32.cs_bounce)
- lfree(pxep);
+ lfree(pxep);
ret:
return rv;
diff --git a/com32/modules/sanboot.c b/com32/modules/sanboot.c
index a2fbbd6a..d55fbc08 100644
--- a/com32/modules/sanboot.c
+++ b/com32/modules/sanboot.c
@@ -43,7 +43,10 @@ static void sanboot(const char **args)
memset(&reg, 0, sizeof reg);
- fx = __com32.cs_bounce;
+ fx = lmalloc(sizeof *fx);
+ if (!fx)
+ return;
+
q = (char *)(fx + 1);
fx->Status = 1;