Marshall Dawson (marshalldawson3rd(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17219
-gerrit
commit 040ba5d75acdf37b4377e3382e206fc17dfdd8f7
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Sat Oct 8 09:53:58 2016 -0600
amd/gardenia: Correct SPD AGESA callout
Gardenia makes no special considerations for a board_id regarding
SPD access and addressing. Remove this from the source and use
the standard AGESA call.
Make SPD address changes to devicetree.cb. Note that Gardenia is
designed to be a two channel, single DIMM/channel system (some SKUs
with two DIMMs on the second channel). However, this port is for
the Stoney processor which is a single channel. As a result, the
second DIMM slot is not usable. A future improvement could involve
a port using a different processor, with unique devicetree files
for each.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Reviewed-by: Marc Jones <marcj303(a)gmail.com>
(cherry picked from commit 77511f98f819dfe08c3ed16ebc11e1b328bdca15)
Change-Id: Id00c2be83340ceeec043ec86e96779e6bf46ae7b
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/gardenia/BiosCallOuts.c | 46 ++-----------------------------
src/mainboard/amd/gardenia/devicetree.cb | 7 ++---
2 files changed, 5 insertions(+), 48 deletions(-)
diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c
index 380c3f4..44644ce 100644
--- a/src/mainboard/amd/gardenia/BiosCallOuts.c
+++ b/src/mainboard/amd/gardenia/BiosCallOuts.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ * Copyright (C) 2015-2016 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
@@ -35,14 +35,13 @@
#include <boardid.h>
static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr);
-static AGESA_STATUS board_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr);
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{AGESA_ALLOCATE_BUFFER, agesa_AllocateBuffer },
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
- {AGESA_READ_SPD, board_ReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_DO_RESET, agesa_Reset },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
@@ -104,43 +103,6 @@ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-static AGESA_STATUS board_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr)
-{
-#ifdef __PRE_RAM__
- int spdAddress;
- AGESA_READ_SPD_PARAMS *info = ConfigPtr;
-
- ROMSTAGE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));
- ROMSTAGE_CONST struct northbridge_amd_pi_00670F00_config *config = dev->chip_info;
- UINT8 spdAddrLookup_rev_F [2][2][4]= {
- { {0xA0, 0xA2}, {0xA4, 0xAC}, }, /* socket 0 - Channel 0 & 1 - 8-bit SPD addresses */
- { {0x00, 0x00}, {0x00, 0x00}, }, /* socket 1 - Channel 0 & 1 - 8-bit SPD addresses */
- };
-
- if ((dev == 0) || (config == 0))
- return AGESA_ERROR;
- if (info->SocketId >= ARRAY_SIZE(config->spdAddrLookup))
- return AGESA_ERROR;
- if (info->MemChannelId >= ARRAY_SIZE(config->spdAddrLookup[0]))
- return AGESA_ERROR;
- if (info->DimmId >= ARRAY_SIZE(config->spdAddrLookup[0][0]))
- return AGESA_ERROR;
- if (board_id() == 'F')
- spdAddress = spdAddrLookup_rev_F
- [info->SocketId] [info->MemChannelId] [info->DimmId];
- else
- spdAddress = config->spdAddrLookup
- [info->SocketId] [info->MemChannelId] [info->DimmId];
-
- if (spdAddress == 0)
- return AGESA_ERROR;
- int err = hudson_readSpd(spdAddress, (void *) info->Buffer, 128);
- if (err)
- return AGESA_ERROR;
-#endif
- return AGESA_SUCCESS;
-}
-
#ifdef __PRE_RAM__
const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {
@@ -157,8 +119,6 @@ const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {
void OemPostParams(AMD_POST_PARAMS *PostParams)
{
- if (board_id() == 'F') {
- PostParams->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;
- }
+ PostParams->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;
}
#endif
diff --git a/src/mainboard/amd/gardenia/devicetree.cb b/src/mainboard/amd/gardenia/devicetree.cb
index 946aae9..a7573b1 100644
--- a/src/mainboard/amd/gardenia/devicetree.cb
+++ b/src/mainboard/amd/gardenia/devicetree.cb
@@ -1,7 +1,7 @@
#
# This file is part of the coreboot project.
#
-# Copyright (C) 2015 Advanced Micro Devices, Inc.
+# Copyright (C) 2015-2016 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
@@ -42,10 +42,7 @@ chip northbridge/amd/pi/00670F00/root_complex
device pci 11.0 on end # SATA
device pci 12.0 on end # EHCI
device pci 14.0 on # SM
- chip drivers/generic/generic #dimm 0-0-0
- device i2c 50 on end
- end
- chip drivers/generic/generic #dimm 0-0-1
+ chip drivers/generic/generic # dimm 0-0-0
device i2c 51 on end
end
end # SM
Nico Huber (nico.h(a)gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17873
-gerrit
commit c49df4927df0a56ab46446dd2b3d66bc4d2cfab2
Author: Nico Huber <nico.h(a)gmx.de>
Date: Wed Dec 14 23:48:09 2016 +0100
Revert "arch/x86/smbios: Correct manufacturer ID"
This reverts commit c86da67436827c25919a2f5966049485a58fc984.
Alas, I have to disagree with this in every single line. The comment
added to the top of the file only applies to a single function therein
which sits over a hundred lines below. That's not much helpful. More-
over, the link in the comment is already down ofc.
The comment is also irritating as it doesn't state in which way (enco-
ding!) it applies to the code, which presumably led to the wrong in-
terpretation of the IDs.
At last, if anything should have changed it is the strings, the IDs
are resolved to. `smbios_fill_dimm_manufacturer_from_id()` has to
resolve the IDs it gets actually fed and not a random selection from
any spec.
Since I digged into it, here's why the numbers are correct: The func-
tion started with the SPD encoding of DDR3 in mind. There, the lower
byte is the number of a "bank" of IDs with an odd-parity in the upper
most bit. The upper byte is the ID within the bank. The "correction"
was to clear the parity bit for naught. The function was later exten-
ded with IDs in the DDR2-SPD encoding (which is actually 64-bit not
16). There, a byte, starting from the lowest, is either an ID below
127 plus odd-parity, or 127 which means look in the next byte/bank.
Unused bytes seem to be filled with 0xff, I guess from the 0xff2c.
Change-Id: Icdb48e4f2c102f619fbdca856e938e85135cfb18
---
src/arch/x86/smbios.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 0c7f3ac..8640200 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -15,13 +15,6 @@
* GNU General Public License for more details.
*/
-/*
- * Standard Manufacturer's Identification Code
- * JEP106AS (Revision of JEP106AR, October 2015)
- * MAY 2016
- * http://www.jedec.org/standards-documents/results/JEP106AS
- */
-
#include <stdlib.h>
#include <string.h>
#include <smbios.h>
@@ -134,7 +127,7 @@ static int smbios_processor_name(char *start)
void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17 *t)
{
switch (mod_id) {
- case 0x9b05:
+ case 0x2c80:
t->manufacturer = smbios_add_string(t->eos,
"Crucial");
break;
@@ -150,7 +143,7 @@ void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17
t->manufacturer = smbios_add_string(t->eos,
"Kingston");
break;
- case 0xad00:
+ case 0x987f:
t->manufacturer = smbios_add_string(t->eos,
"Hynix");
break;
@@ -162,7 +155,11 @@ void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17
t->manufacturer = smbios_add_string(t->eos,
"OCZ");
break;
- case 0x3406:
+ case 0xad80:
+ t->manufacturer = smbios_add_string(t->eos,
+ "Hynix/Hyundai");
+ break;
+ case 0xb502:
t->manufacturer = smbios_add_string(t->eos,
"SuperTalent");
break;
@@ -170,7 +167,7 @@ void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17
t->manufacturer = smbios_add_string(t->eos,
"GSkill");
break;
- case 0xce00:
+ case 0xce80:
t->manufacturer = smbios_add_string(t->eos,
"Samsung");
break;
@@ -178,7 +175,7 @@ void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17
t->manufacturer = smbios_add_string(t->eos,
"Elpida");
break;
- case 0x2c00:
+ case 0xff2c:
t->manufacturer = smbios_add_string(t->eos,
"Micron");
break;
Marshall Dawson (marshalldawson3rd(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17872
-gerrit
commit c8b42dbfdca696ff998dd31a9e34071a8182f1c2
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Wed Dec 14 16:12:40 2016 -0700
3rdparty/blobs: Update for AMD Stoney Ridge
Update the blobs submodule to bring in the binaries for 00670F00.
This also corrects some formatting in the various license.txt files.
Change-Id: I7a70d1168734d06ef6919d83dd73bc8f2bc4173c
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
3rdparty/blobs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/3rdparty/blobs b/3rdparty/blobs
index 8ad2d63..8090bdd 160000
--- a/3rdparty/blobs
+++ b/3rdparty/blobs
@@ -1 +1 @@
-Subproject commit 8ad2d6385652e14b6f0d35ab9b474c31ddeb1773
+Subproject commit 8090bdd59853599e469b7503ea473ca12e8c681b
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17871
-gerrit
commit c2044ebd39329303e8dbb5e8f20f3bbb4d80d14c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Dec 14 15:41:45 2016 -0600
mainboard/google/reef: clear normal MRC cache on recovery retrain
For Chrome OS the normal MRC cache should be cleared when a hardware
retrain recovery request is observed. The reason is that since there
are 2 different MRC cache slots there needs to be a mechanism which
allows an end user make a system bootable again if the MRC settings
happen to not allow the system to boot any longer. Therefore, one
just needs to enter recovery with the hardware retrain flag and
the system normal MRC cache slot will be invalidated.
BUG=chrome-os-partner:60592
BRANCH=reef
Change-Id: I6ad32ed0dd217d66404b77467a88689a06044544
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/mainboard/google/reef/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index 2cc391e..c5625b6 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -35,6 +35,7 @@ config DRIVER_TPM_I2C_IRQ
config CHROMEOS
select EC_GOOGLE_CHROMEEC_SWITCHES
select HAS_RECOVERY_MRC_CACHE
+ select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
select LID_SWITCH if BASEBOARD_REEF_LAPTOP
config DRIVERS_I2C_DA7219
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17869
-gerrit
commit 8f3ccdcf08bc5490898f4926e5f6ff32e1deba6f
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Dec 14 14:46:20 2016 -0600
ec/google/chromeec: query cbmem for retrain status
The EC switches, including the hardware retrain flag, are
cleared when handing off the vboot state in romstage. However,
one may still want to query the state of the hardware retrain
flag. Thus, add a method to get the flag from cbmem.
BUG=chrome-os-partner:60592
BRANCH=reef
Change-Id: Ic76cfb3255a8d3c179d5f8b13fa13c518f79faa2
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/ec/google/chromeec/switches.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/ec/google/chromeec/switches.c b/src/ec/google/chromeec/switches.c
index 74f7210..7ed4bfd 100644
--- a/src/ec/google/chromeec/switches.c
+++ b/src/ec/google/chromeec/switches.c
@@ -14,6 +14,7 @@
*/
#include <bootmode.h>
+#include <cbmem.h>
#include <ec/google/chromeec/ec.h>
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_LPC)
@@ -41,12 +42,25 @@ int get_recovery_mode_switch(void)
int get_recovery_mode_retrain_switch(void)
{
+ uint32_t events;
+ const uint32_t mask =
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY_HW_REINIT);
+
/*
* Check if the EC has posted the keyboard recovery event with memory
* retrain.
*/
- return !!(google_chromeec_get_events_b() &
- EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY_HW_REINIT));
+ events = google_chromeec_get_events_b();
+
+ if (cbmem_possibly_online()) {
+ const uint32_t *events_save;
+
+ events_save = cbmem_find(CBMEM_ID_EC_HOSTEVENT);
+ if (events_save != NULL)
+ events |= *events_save;
+ }
+
+ return !!(events & mask);
}
int clear_recovery_mode_switch(void)
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17868
-gerrit
commit 7d48bc9a12ab8655829e1bd1a88a23ada4c5a374
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Dec 14 14:40:43 2016 -0600
lib/cbmem: allow anyone to use cbmem_possibly_online()
The cbmem_possibly_online() is a helpful construct. Therefore,
push it into cbmem.h so other users can take advantage of it.
BUG=chrome-os-partner:60592
BRANCH=reef
Change-Id: If5a1c7815ed03874dcf141014b8ffefb82b7cc92
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/cbmem.h | 16 ++++++++++++++++
src/vboot/bootmode.c | 17 +----------------
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 5c4b7c7..c13fe92 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -158,4 +158,20 @@ void set_top_of_ram(uint64_t ramtop);
void backup_top_of_ram(uint64_t ramtop);
#endif
+/*
+ * Returns 0 for the stages where we know that cbmem does not come online.
+ * Even if this function returns 1 for romstage, depending upon the point in
+ * bootup, cbmem might not actually be online.
+ */
+static inline int cbmem_possibly_online(void)
+{
+ if (ENV_BOOTBLOCK)
+ return 0;
+
+ if (ENV_VERSTAGE && IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK))
+ return 0;
+
+ return 1;
+}
+
#endif /* _CBMEM_H_ */
diff --git a/src/vboot/bootmode.c b/src/vboot/bootmode.c
index 5bb7040..46b78e1 100644
--- a/src/vboot/bootmode.c
+++ b/src/vboot/bootmode.c
@@ -16,6 +16,7 @@
#include <assert.h>
#include <bootmode.h>
#include <bootstate.h>
+#include <cbmem.h>
#include <rules.h>
#include <string.h>
#include <vb2_api.h>
@@ -68,22 +69,6 @@ BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT,
vb2_clear_recovery_reason_vbnv, NULL);
/*
- * Returns 0 for the stages where we know that cbmem does not come online.
- * Even if this function returns 1 for romstage, depending upon the point in
- * bootup, cbmem might not actually be online.
- */
-static int cbmem_possibly_online(void)
-{
- if (ENV_BOOTBLOCK)
- return 0;
-
- if (ENV_VERSTAGE && IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK))
- return 0;
-
- return 1;
-}
-
-/*
* Returns 1 if vboot is being used and currently in a stage which might have
* already executed vboot verification.
*/