aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-03-08 19:39:49 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-03-08 19:55:26 -0500
commit70c94dd59bb2777a8e500be72847041d811f51d0 (patch)
treef6c4ff7f644b79b5c69e51912827af76ca5803f5
parent2af52da5ad01770efeb202605ebacb23ad5108a6 (diff)
downloadseabios-70c94dd59bb2777a8e500be72847041d811f51d0.tar.gz
Use VARVERIFY32INIT on global variables that point to "tmp" memory.
Enable the recently added build check on global variables that are (or contain) pointers to memory allocated by malloc_tmp(). This helps detect cases where temporary memory is accessed after POST. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/boot.c4
-rw-r--r--src/pci.c2
-rw-r--r--src/pmm.c6
-rw-r--r--src/romfile.c2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/boot.c b/src/boot.c
index 3370c2d..c308602 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -21,7 +21,7 @@
* Boot priority ordering
****************************************************************/
-static char **Bootorder;
+static char **Bootorder VARVERIFY32INIT;
static int BootorderCount;
static void
@@ -293,7 +293,7 @@ struct bootentry_s {
const char *description;
struct bootentry_s *next;
};
-static struct bootentry_s *BootList;
+static struct bootentry_s *BootList VARVERIFY32INIT;
#define IPL_TYPE_FLOPPY 0x01
#define IPL_TYPE_HARDDISK 0x02
diff --git a/src/pci.c b/src/pci.c
index 4f6a6fa..a92fb9b 100644
--- a/src/pci.c
+++ b/src/pci.c
@@ -85,7 +85,7 @@ pci_next(int bdf, int bus)
}
}
-struct pci_device *PCIDevices;
+struct pci_device *PCIDevices VARVERIFY32INIT;
int MaxPCIBus VARFSEG;
// Check if PCI is available at all
diff --git a/src/pmm.c b/src/pmm.c
index f02cf62..c4156ba 100644
--- a/src/pmm.c
+++ b/src/pmm.c
@@ -29,9 +29,11 @@ struct zone_s {
struct allocinfo_s *info;
};
-struct zone_s ZoneLow, ZoneHigh, ZoneFSeg, ZoneTmpLow, ZoneTmpHigh;
+struct zone_s ZoneLow VARVERIFY32INIT, ZoneHigh VARVERIFY32INIT;
+struct zone_s ZoneFSeg VARVERIFY32INIT;
+struct zone_s ZoneTmpLow VARVERIFY32INIT, ZoneTmpHigh VARVERIFY32INIT;
-static struct zone_s *Zones[] = {
+static struct zone_s *Zones[] VARVERIFY32INIT = {
&ZoneTmpLow, &ZoneLow, &ZoneFSeg, &ZoneTmpHigh, &ZoneHigh
};
diff --git a/src/romfile.c b/src/romfile.c
index 93ee3d6..ea71d1f 100644
--- a/src/romfile.c
+++ b/src/romfile.c
@@ -7,7 +7,7 @@
#include "config.h" // CONFIG_*
#include "util.h" // dprintf
-static struct romfile_s *RomfileRoot;
+static struct romfile_s *RomfileRoot VARVERIFY32INIT;
void
romfile_add(struct romfile_s *file)