summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-01-16 19:59:52 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-01-21 08:51:19 +0100
commit104074994d741646016e431a30b8966b3fdfe439 (patch)
treebb6df001bdb6d3bd82c163bcfdc28e2eef384e37 /src
parentc27df8787801dac421b98c4dbb447e519065ae95 (diff)
pcengines/apu2: Add SKU in SMBIOS
Installed memory only, PCB revision cannot be detected. Change-Id: Ib6224018db3de4a7ddd9e6f7f30edc438c3f0702 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/18153 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/pcengines/apu2/Makefile.inc1
-rw-r--r--src/mainboard/pcengines/apu2/mainboard.c20
2 files changed, 20 insertions, 1 deletions
diff --git a/src/mainboard/pcengines/apu2/Makefile.inc b/src/mainboard/pcengines/apu2/Makefile.inc
index e1a5f8d018..77c6d789c3 100644
--- a/src/mainboard/pcengines/apu2/Makefile.inc
+++ b/src/mainboard/pcengines/apu2/Makefile.inc
@@ -19,6 +19,7 @@ romstage-y += gpio_ftns.c
ramstage-y += BiosCallOuts.c
ramstage-y += OemCustomize.c
+ramstage-y += gpio_ftns.c
## DIMM SPD for on-board memory
SPD_BIN = $(obj)/spd.bin
diff --git a/src/mainboard/pcengines/apu2/mainboard.c b/src/mainboard/pcengines/apu2/mainboard.c
index 98fe8ddf4a..742135571a 100644
--- a/src/mainboard/pcengines/apu2/mainboard.c
+++ b/src/mainboard/pcengines/apu2/mainboard.c
@@ -28,9 +28,11 @@
#include <northbridge/amd/pi/00730F01/pci_devs.h>
#include <southbridge/amd/common/amd_pci_util.h>
#include <superio/nuvoton/nct5104d/nct5104d.h>
-
+#include <smbios.h>
+#include <string.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/mtrr.h>
+#include "gpio_ftns.h"
#define SPD_SIZE 128
#define PM_RTC_CONTROL 0x56
@@ -188,6 +190,22 @@ static void mainboard_enable(device_t dev)
pirq_setup();
}
+/*
+ * We will stuff the memory size into the smbios sku location.
+ */
+const char *smbios_mainboard_sku(void)
+{
+ static char sku[5];
+ if (sku[0] != 0)
+ return sku;
+
+ if (!get_spd_offset())
+ snprintf(sku, sizeof(sku), "2 GB");
+ else
+ snprintf(sku, sizeof(sku), "4 GB");
+ return sku;
+}
+
struct chip_operations mainboard_ops = {
.enable_dev = mainboard_enable,
};