[coreboot-gerrit] New patch to review for coreboot: ca46fae acpi_create_mcfg_mmconfig: Zero-out the structure before filling.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Sun Oct 5 11:12:05 CEST 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7014

-gerrit

commit ca46faeca4454bb6fbf49a8f33ca2ff964f7afef
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Sun Oct 5 11:05:16 2014 +0200

    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 at gmail.com>
---
 src/arch/x86/boot/acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 3bfa3bd..3a30d31 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;



More information about the coreboot-gerrit mailing list