[coreboot] New patch to review for coreboot: b8b58e0 ASRock E350M1: Add `dimmSpd.h` with declaration of `AmdMemoryReadSPD`
Paul Menzel (paulepanter@users.sourceforge.net)
gerrit at coreboot.org
Wed Mar 6 12:20:18 CET 2013
Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2586
-gerrit
commit b8b58e0a5e8ccc8b808c13d2c0f91ccecd209ab3
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date: Mon Mar 4 18:57:28 2013 +0100
ASRock E350M1: Add `dimmSpd.h` with declaration of `AmdMemoryReadSPD`
The warning
[…]
CC mainboard/asrock/e350m1/BiosCallOuts.ramstage.o
src/mainboard/asrock/e350m1/BiosCallOuts.c: In function 'BiosReadSpd':
src/mainboard/asrock/e350m1/BiosCallOuts.c:424:3: warning: implicit declaration of function 'AmdMemoryReadSPD' [-Wimplicit-function-declaration]
[…]
is present since merging the ASRock E350M1 port. Though this
could only be verified with commit
“bypass the "Do not use global variables in romstage"” (52ffb2b6).
Commit »Add the AMD Torpedo mainboard« (770b8777) added the header
file `dimmSpd.h` which was integrated for AMD Persimmon in commit
»Persimmon updates for AMD F14 rev C0« (d7a696d0). Copying this
header file to the ASRock E350M1 and adding that to `BioCallOuts.c`
fixes the GCC warning.
Note that currently the `dimmSpd.h` header file could also be used
in `dimmSpd.c`, which uses the function `AmdMemoryReadSPD` too, but
declares it in the file. This is not changed, as currently it does
not cause a warning and SPD functions will be moved to the
Fam14 AGESA wrapper code [1]. The ASRock E350M1 code will be
adapted to use that code then.
[1] http://review.coreboot.org/#/c/2497/
Change-Id: I4cdb1c5633561864a9d729918d1d1bcd8dbce18e
Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
src/mainboard/asrock/e350m1/BiosCallOuts.c | 1 +
src/mainboard/asrock/e350m1/dimmSpd.h | 63 ++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.c b/src/mainboard/asrock/e350m1/BiosCallOuts.c
index 1f1aa06..e2bf7ba 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.c
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.c
@@ -19,6 +19,7 @@
#include "agesawrapper.h"
#include "amdlib.h"
+#include "dimmSpd.h"
#include "BiosCallOuts.h"
#include "heapManager.h"
#include "SB800.h"
diff --git a/src/mainboard/asrock/e350m1/dimmSpd.h b/src/mainboard/asrock/e350m1/dimmSpd.h
new file mode 100644
index 0000000..9ff397d
--- /dev/null
+++ b/src/mainboard/asrock/e350m1/dimmSpd.h
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*----------------------------------------------------------------------------------------
+ * M O D U L E S U S E D
+ *----------------------------------------------------------------------------------------
+ */
+
+#ifndef _DIMMSPD_H_
+#define _DIMMSPD_H_
+
+#include "Porting.h"
+#include "AGESA.h"
+
+/*----------------------------------------------------------------------------------------
+ * D E F I N I T I O N S A N D M A C R O S
+ *----------------------------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------------------------
+ * T Y P E D E F S A N D S T R U C T U R E S
+ *----------------------------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------------------------
+ * P R O T O T Y P E S O F L O C A L F U N C T I O N S
+ *----------------------------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------------------------
+ * E X P O R T E D F U N C T I O N S
+ *----------------------------------------------------------------------------------------
+ */
+
+AGESA_STATUS
+AmdMemoryReadSPD (
+ IN UINT32 Func,
+ IN UINT32 Data,
+ IN OUT AGESA_READ_SPD_PARAMS *SpdData
+ );
+
+/*---------------------------------------------------------------------------------------
+ * L O C A L F U N C T I O N S
+ *---------------------------------------------------------------------------------------
+ */
+
+#endif
More information about the coreboot
mailing list