Casper Chang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36766 )
Change subject: TEST ONLY: DO NOT MERGE
......................................................................
TEST ONLY: DO NOT MERGE
Change-Id: I53ef63261537acdaf74edc13047a3e5e499e749f
---
A src/mainboard/google/kukui/TESTONLY
1 file changed, 0 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/36766/1
diff --git a/src/mainboard/google/kukui/TESTONLY b/src/mainboard/google/kukui/TESTONLY
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/google/kukui/TESTONLY
--
To view, visit https://review.coreboot.org/c/coreboot/+/36766
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I53ef63261537acdaf74edc13047a3e5e499e749f
Gerrit-Change-Number: 36766
Gerrit-PatchSet: 1
Gerrit-Owner: Casper Chang <casper.chang(a)bitland.corp-partner.google.com>
Gerrit-MessageType: newchange
huayang duan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36906 )
Change subject: soc/mediatek/mt8183: Always run full calibration for debug DRAM issue [DONOT MERGE] Disable fast calibration, that is always run full calibration for debug DRAM bitfilp issue.
......................................................................
soc/mediatek/mt8183: Always run full calibration for debug DRAM issue [DONOT MERGE]
Disable fast calibration, that is always run full calibration for
debug DRAM bitfilp issue.
BUG=b:80501386,b:142358843
BRANCH=kukui
TEST=Boots correctly on Kukui
Change-Id: I693cfe98ea4317c4b856e9bb1f18046a10fe72f8
---
M src/soc/mediatek/mt8183/memory.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/36906/1
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c
index 13c3d9a..fafe2a6 100644
--- a/src/soc/mediatek/mt8183/memory.c
+++ b/src/soc/mediatek/mt8183/memory.c
@@ -170,6 +170,11 @@
if (CONFIG(MT8183_DRAM_DVFS) && !recovery_mode)
config |= DRAMC_CONFIG_DVFS;
+
+printk(BIOS_ERR, "DRAM-K: Force disable Fast Calibration for debug DRAM issue\n");
+
+// disable fast calibration for debug DRAM issue
+if (0) {
/* Load calibration params from flash and run fast calibration */
if (recovery_mode) {
printk(BIOS_WARNING, "Skip loading cached calibration data\n");
@@ -195,6 +200,7 @@
printk(BIOS_WARNING,
"Failed to read calibration data from flash\n");
}
+}
/* Run full calibration */
printk(BIOS_INFO, "DRAM-K: Full Calibration\n");
--
To view, visit https://review.coreboot.org/c/coreboot/+/36906
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I693cfe98ea4317c4b856e9bb1f18046a10fe72f8
Gerrit-Change-Number: 36906
Gerrit-PatchSet: 1
Gerrit-Owner: huayang duan <huayangduan(a)gmail.com>
Gerrit-MessageType: newchange
Name of user not set #1002701 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37551 )
Change subject: New PCI ID for FCH SATA Controller (AHCI Mode) for AMD driver.
......................................................................
New PCI ID for FCH SATA Controller (AHCI Mode) for AMD driver.
The 1022:7904 FCH SATA Controller is found in the AMD Bettong board.
Support is added to configure properly the SATA device in initialization.
SATA Controller has different device IDs for different drivers. They
are renamed accordingly.
Change-Id: Icdede188c82bfe8964c32fe81bdf6a3a6a17096c
Signed-off-by: Jorge Fernandez <jorgefm(a)cirsa.com>
---
M src/include/device/pci_ids.h
M src/soc/amd/common/block/sata/sata.c
M src/southbridge/amd/pi/hudson/sata.c
3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/37551/1
diff --git a/src/include/device/pci_ids.h b/src/include/device/pci_ids.h
index 1276994..853e910 100644
--- a/src/include/device/pci_ids.h
+++ b/src/include/device/pci_ids.h
@@ -447,8 +447,8 @@
#define PCI_DEVICE_ID_AMD_CZ_HDA 0x157A
#define PCI_DEVICE_ID_AMD_CZ_LPC 0x790E
-#define PCI_DEVICE_ID_AMD_CZ_SATA 0x7900
-#define PCI_DEVICE_ID_AMD_CZ_SATA_AHCI 0x7901
+#define PCI_DEVICE_ID_AMD_CZ_SATA_IDE 0x7900
+#define PCI_DEVICE_ID_AMD_CZ_SATA_AHCI_MS 0x7901
#define PCI_DEVICE_ID_AMD_CZ_SATA_AHCI_AMD 0x7904
#define PCI_DEVICE_ID_AMD_CZ_USB_0 0x7907
#define PCI_DEVICE_ID_AMD_CZ_USB_1 0x7908
diff --git a/src/soc/amd/common/block/sata/sata.c b/src/soc/amd/common/block/sata/sata.c
index 1cd342e..b276809 100644
--- a/src/soc/amd/common/block/sata/sata.c
+++ b/src/soc/amd/common/block/sata/sata.c
@@ -28,8 +28,8 @@
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_CZ_SATA,
- PCI_DEVICE_ID_AMD_CZ_SATA_AHCI,
+ PCI_DEVICE_ID_AMD_CZ_SATA_IDE,
+ PCI_DEVICE_ID_AMD_CZ_SATA_AHCI_MS,
PCI_DEVICE_ID_AMD_CZ_SATA_AHCI_AMD,
0
};
diff --git a/src/southbridge/amd/pi/hudson/sata.c b/src/southbridge/amd/pi/hudson/sata.c
index 77365ef..5846a45 100644
--- a/src/southbridge/amd/pi/hudson/sata.c
+++ b/src/southbridge/amd/pi/hudson/sata.c
@@ -68,8 +68,8 @@
static const unsigned short pci_device_ids[] = {
PCI_DEVICE_ID_AMD_SB900_SATA,
PCI_DEVICE_ID_AMD_SB900_SATA_AHCI,
- PCI_DEVICE_ID_AMD_CZ_SATA,
- PCI_DEVICE_ID_AMD_CZ_SATA_AHCI,
+ PCI_DEVICE_ID_AMD_CZ_SATA_IDE,
+ PCI_DEVICE_ID_AMD_CZ_SATA_AHCI_MS,
PCI_DEVICE_ID_AMD_CZ_SATA_AHCI_AMD,
0
};
--
To view, visit https://review.coreboot.org/c/coreboot/+/37551
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icdede188c82bfe8964c32fe81bdf6a3a6a17096c
Gerrit-Change-Number: 37551
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002701
Gerrit-MessageType: newchange
Hello Andrey Petrov,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/37858
to review the following change.
Change subject: soc/fsp_broadwell_de: read SPD 3 times and pick the majority element
......................................................................
soc/fsp_broadwell_de: read SPD 3 times and pick the majority element
On the platform we consistently observe errneous reads of SPD data over
IMC's SMBus. Since DDR4 SPD does not include CRC checksum for
"Manufacturing Information" we can not determine serial/part numbers
reliable.
The root cause for SMBus errors is unknown.
The corruption happens in 1 byte only with 3-4 bits flipped.
Interestingly this happens after fixed amount of time, in case of
tight-loop reads about every 3 seconds with almost exactly same number
of CPU cycles, or multiples of that number.
The stop-gap solution is to read data 3 times and pick out the prevalent
member
TEST=tested on OCP monolake
Signed-off-by: Andrey Petrov <anpetrov(a)fb.com>
Change-Id: If145cec2766f03412e33c98befb1d98b87306615
---
M src/soc/intel/fsp_broadwell_de/smbus-imc.c
1 file changed, 44 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/37858/1
diff --git a/src/soc/intel/fsp_broadwell_de/smbus-imc.c b/src/soc/intel/fsp_broadwell_de/smbus-imc.c
index 61dc080..f483aae 100644
--- a/src/soc/intel/fsp_broadwell_de/smbus-imc.c
+++ b/src/soc/intel/fsp_broadwell_de/smbus-imc.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <console/console.h>
#include <stddef.h>
#include <device/pci_def.h>
#include <device/early_smbus.h>
@@ -20,6 +21,33 @@
#include <soc/pci_devs.h>
#include <spd.h>
+#define VOTE_ELEMENTS 3
+
+static bool vote(uint16_t *arr, uint8_t n, uint8_t *res_idx)
+{
+ int maxcount = 0;
+ int index = -1;
+
+ for(int i = 0; i < n; i++) {
+ int count = 0;
+ for(int j = 0; j < n; j++) {
+ if(arr[i] == arr[j])
+ count++;
+ }
+ if(count > maxcount) {
+ maxcount = count;
+ index = i;
+ }
+ }
+
+ if (maxcount > n/2) {
+ *res_idx = index;
+ return true;
+ }
+
+ return false;
+}
+
/* read word, return value on success */
uint16_t smbus_read_word(u32 smbus_dev, u8 addr, u8 offset)
{
@@ -36,13 +64,24 @@
/* read byte, return value on success */
uint8_t smbus_read_byte(u32 smbus_dev, u8 addr, u8 offset)
{
- uint16_t res = 0;
+ uint16_t res[VOTE_ELEMENTS] = {0};
+ uint8_t idx = 0;
- if (imc_smbus_spd_xfer(IMC_DEV, addr, offset, IMC_DEVICE_EEPROM, IMC_DATA_BYTE,
- IMC_CONTROLLER_ID0, IMC_READ, &res)
- == 0) {
- return res;
+ for (int i = 0; i < ARRAY_SIZE(res); i++) {
+ if (imc_smbus_spd_xfer(IMC_DEV,
+ addr, offset, IMC_DEVICE_EEPROM, IMC_DATA_BYTE,
+ IMC_CONTROLLER_ID0, IMC_READ, &res[i]) != 0) {
+ return 0;
+ }
}
+
+ /* vote for majority element, pick 1 out of 3 */
+ if (vote(res, ARRAY_SIZE(res), &idx)) {
+ return res[idx];
+ }
+
+ printk(BIOS_ALERT, "IMC: read failure, couldn't vote for correct byte\n");
+
return 0;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/37858
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: 4.11_branch
Gerrit-Change-Id: If145cec2766f03412e33c98befb1d98b87306615
Gerrit-Change-Number: 37858
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-MessageType: newchange