summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Murphy <jpmurphy@google.com>2022-03-16 07:26:01 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-03-17 17:38:54 +0000
commit2e1d16828a1f05c0386d94737a086416a0c30471 (patch)
tree14a579374b7979020302c4bc5687a32ec373bb39
parentaf92d07503600695df44f59aa7c8f9c19b4e462d (diff)
soc/amd/sabrina: Add counter initializers
Some counters are not being initialized and are relying on mainboards to set their values. If the mainboards have not implemented these functions it leads to indeterminate behavior. BUG=b:224987813 TEST=builds Signed-off-by: Jon Murphy <jpmurphy@google.com> Change-Id: I8d4f5b1124d4017b04bcaf7044216fd696dce63d Reviewed-on: https://review.coreboot.org/c/coreboot/+/62863 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Raul Rangel <rrangel@chromium.org>
-rw-r--r--src/soc/amd/sabrina/fsp_m_params.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/amd/sabrina/fsp_m_params.c b/src/soc/amd/sabrina/fsp_m_params.c
index f069ba8f61..8a8300841d 100644
--- a/src/soc/amd/sabrina/fsp_m_params.c
+++ b/src/soc/amd/sabrina/fsp_m_params.c
@@ -47,10 +47,10 @@ static void fill_ddi_descriptors(FSP_M_CONFIG *mcfg,
static void fsp_fill_pcie_ddi_descriptors(FSP_M_CONFIG *mcfg)
{
- const fsp_dxio_descriptor *fsp_dxio;
- const fsp_ddi_descriptor *fsp_ddi;
- size_t num_dxio;
- size_t num_ddi;
+ const fsp_dxio_descriptor *fsp_dxio = NULL;
+ const fsp_ddi_descriptor *fsp_ddi = NULL;
+ size_t num_dxio = 0;
+ size_t num_ddi = 0;
mainboard_get_dxio_ddi_descriptors(&fsp_dxio, &num_dxio,
&fsp_ddi, &num_ddi);