aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/meminfo.c2
-rw-r--r--com32/modules/poweroff.c3
-rw-r--r--com32/modules/pxechn.c1
-rw-r--r--com32/modules/vesainfo.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/com32/modules/meminfo.c b/com32/modules/meminfo.c
index 34b3e91d..fc04792f 100644
--- a/com32/modules/meminfo.c
+++ b/com32/modules/meminfo.c
@@ -110,11 +110,13 @@ static void dump_legacy(void)
ivt[0x15].seg, ivt[0x15].offs, dosram, dosram << 10, oreg.eax.w[0],
oreg.eax.w[0] << 10);
+ memset(&ireg, 0, sizeof ireg);
ireg.eax.b[1] = 0x88;
__intcall(0x15, &ireg, &oreg);
printf("INT 15 88: 0x%04x (%uK) ", oreg.eax.w[0], oreg.eax.w[0]);
+ memset(&ireg, 0, sizeof ireg);
ireg.eax.w[0] = 0xe801;
__intcall(0x15, &ireg, &oreg);
diff --git a/com32/modules/poweroff.c b/com32/modules/poweroff.c
index 8b656ad4..3255ac26 100644
--- a/com32/modules/poweroff.c
+++ b/com32/modules/poweroff.c
@@ -50,6 +50,7 @@ int main()
return 1;
}
+ memset(&inregs, 0, sizeof inregs);
inregs.eax.l = 0x5301; /* APM Real Mode Interface Connect (01h) */
inregs.ebx.l = 0; /* APM BIOS (0000h) */
__intcall(0x15, &inregs, &outregs);
@@ -59,6 +60,7 @@ int main()
return 1;
}
+ memset(&inregs, 0, sizeof inregs);
inregs.eax.l = 0x530e; /* APM Driver Version (0Eh) */
inregs.ebx.l = 0; /* APM BIOS (0000h) */
inregs.ecx.l = 0x101; /* APM Driver version 1.1 */
@@ -74,6 +76,7 @@ int main()
return 1;
}
+ memset(&inregs, 0, sizeof inregs);
inregs.eax.l = 0x5307; /* Set Power State (07h) */
inregs.ebx.l = 1; /* All devices power managed by the APM BIOS */
inregs.ecx.l = 3; /* Power state off */
diff --git a/com32/modules/pxechn.c b/com32/modules/pxechn.c
index 7f2002db..bd614aa9 100644
--- a/com32/modules/pxechn.c
+++ b/com32/modules/pxechn.c
@@ -328,6 +328,7 @@ void pxe_set_regs(struct syslinux_rm_regs *regs)
{
com32sys_t tregs;
+ memset(&tregs,0,sizeof(tregs));
regs->ip = 0x7C00;
/* Plan A uses SS:[SP + 4] */
/* sdi->pxe.stack is a usable pointer, not something that can be nicely
diff --git a/com32/modules/vesainfo.c b/com32/modules/vesainfo.c
index 66b121d7..a65d02c1 100644
--- a/com32/modules/vesainfo.c
+++ b/com32/modules/vesainfo.c
@@ -36,6 +36,7 @@ static void print_modes(void)
gi = &vesa->gi;
mi = &vesa->mi;
+ memset(&rm, 0, sizeof rm);
gi->signature = VBE2_MAGIC; /* Get VBE2 extended data */
rm.eax.w[0] = 0x4F00; /* Get SVGA general information */
rm.edi.w[0] = OFFS(gi);
@@ -63,6 +64,7 @@ static void print_modes(void)
lines = 0;
}
+ memset(&rm, 0, sizeof rm);
rm.eax.w[0] = 0x4F01; /* Get SVGA mode information */
rm.ecx.w[0] = mode;
rm.edi.w[0] = OFFS(mi);