summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-10-05 11:05:16 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-10-10 08:54:58 +0200
commit60fccdc3d2ab5a3b0265f1a411d02b8504407e1c (patch)
tree1fac7c35979e9a23485fe87096ed70bf2fc5ee4c
parent762d53d41897b3b2b13e47623c50cc94b5113333 (diff)
downloadcoreboot-60fccdc3d2ab5a3b0265f1a411d02b8504407e1c.tar.xz
acpi_create_mcfg_mmconfig: Zero-out the structure before filling.
Otherwise "reserved" fields end up with a garbage instead of predictable value. Change-Id: I8a036769a8f86f1d6752651601de2800f4f1bd00 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7014 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
-rw-r--r--src/arch/x86/boot/acpi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 3bfa3bdaaf..3a30d31b71 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -118,6 +118,7 @@ void acpi_add_table(acpi_rsdp_t *rsdp, void *table)
int acpi_create_mcfg_mmconfig(acpi_mcfg_mmconfig_t *mmconfig, u32 base,
u16 seg_nr, u8 start, u8 end)
{
+ memset(mmconfig, 0, sizeof(*mmconfig));
mmconfig->base_address = base;
mmconfig->base_reserved = 0;
mmconfig->pci_segment_group_number = seg_nr;