aboutsummaryrefslogtreecommitdiffstats
path: root/src/fw/biostables.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-04-09 11:57:44 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-04-10 00:38:06 -0400
commit9d3c06336ec443b6763c92f929013afcfce70c4a (patch)
tree9046386d360738a004d9f2768e968bfea8af1c46 /src/fw/biostables.c
parentb4581224824871ad2909f84fc4a9e067cda663f2 (diff)
downloadseabios-9d3c06336ec443b6763c92f929013afcfce70c4a.tar.gz
smbios: Use integer signature instead of string signature
Change the smbios structure to use a 4 byte u32 signature field instead of a 4 byte character string field. In practice, this allows the compiler to place the signature in the initialize code segment and thus makes it less likely the signature would be found in the f-segment. (If the smbios signature is found in the f-segment it can confuse some table scans.) Reviewed-by: Bruce Rogers <brogers@suse.com> Tested-by: Bruce Rogers <brogers@suse.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/fw/biostables.c')
-rw-r--r--src/fw/biostables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fw/biostables.c b/src/fw/biostables.c
index 50a891be..450aca28 100644
--- a/src/fw/biostables.c
+++ b/src/fw/biostables.c
@@ -271,7 +271,7 @@ copy_smbios(void *pos)
if (SMBiosAddr)
return;
struct smbios_entry_point *p = pos;
- if (memcmp(p->anchor_string, "_SM_", 4))
+ if (p->signature != SMBIOS_SIGNATURE)
return;
if (checksum(pos, 0x10) != 0)
return;