diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-06-22 23:22:19 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-06-23 21:59:49 +0000 |
commit | 56167c5757e0551a7b03c5109d21a243da932f24 (patch) | |
tree | b401d30b67e8ca894d7a328070fae0c96971cd76 /src/soc/amd/common | |
parent | 534cce3ba6d20e0cdc30270dd4e74e9deecb654a (diff) |
soc/amd/common/block/acpi/ivrs: zero-initialize ivhd_hpet struct
Zero-initialize the ivhd_hpet struct right at the beginning of the
ivhd_describe_hpet function to make sure that the whole struct is in a
defined state.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If4d3563c485eed4a7cb0526a62f7b6c80f763bfd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76074
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/acpi/ivrs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/soc/amd/common/block/acpi/ivrs.c b/src/soc/amd/common/block/acpi/ivrs.c index 7afabf828d..d2080e9f36 100644 --- a/src/soc/amd/common/block/acpi/ivrs.c +++ b/src/soc/amd/common/block/acpi/ivrs.c @@ -36,10 +36,9 @@ static unsigned long acpi_fill_ivrs_ioapic(unsigned long current, void *ioapic_b static unsigned long ivhd_describe_hpet(unsigned long current, uint8_t hndl, uint16_t src_devid) { ivrs_ivhd_special_t *ivhd_hpet = (ivrs_ivhd_special_t *)current; + memset(ivhd_hpet, 0, sizeof(*ivhd_hpet)); ivhd_hpet->type = IVHD_DEV_8_BYTE_EXT_SPECIAL_DEV; - ivhd_hpet->reserved = 0x0000; - ivhd_hpet->dte_setting = 0x00; ivhd_hpet->handle = hndl; ivhd_hpet->source_dev_id = src_devid; /* function 0 of FCH PCI device */ ivhd_hpet->variety = IVHD_SPECIAL_DEV_HPET; |