Maulik V Vaghela has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/40288 )
Change subject: [TEMP]: NVME Free running Clock
......................................................................
Abandoned
Not needed now
--
To view, visit https://review.coreboot.org/c/coreboot/+/40288
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib7ff83ad7d01ad9be9ade5d4f63d5ee882829221
Gerrit-Change-Number: 40288
Gerrit-PatchSet: 18
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Krishna P Bhat D <krishna.p.bhat.d(a)intel.com>
Gerrit-Reviewer: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya(a)intel.com>
Gerrit-MessageType: abandon
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Edward O'Callaghan, Kane Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40415
to look at the new patch set (#5).
Change subject: mb/google/puff: add a region to cache SPD data
......................................................................
mb/google/puff: add a region to cache SPD data
This patch adds a SPI rom region RW_SPD_CACHE on Puff and it can be used
on spd_cache to reduce reading SPD data from SODIMM by smbus. It's for
saving the boot time and it can be used to trigger MRC retraining when
memory DIMM is changed.
BUG=b:146457985
BRANCH=None
TEST=Build puff successfully and verified below two items.
1. To change memory DIMM can trigger retraining.
2. one DIMM save the boot time : 158ms
two DIMM save the boot time : 265ms
Change-Id: I8d07fddf113a767d62394cb31e33b56f22f74351
Signed-off-by: Jamie Chen <jamie.chen(a)intel.com>
---
M src/mainboard/google/hatch/Kconfig
A src/mainboard/google/hatch/chromeos-16MiB-spd.fmd
A src/mainboard/google/hatch/chromeos-spd.fmd
M src/mainboard/google/hatch/romstage_spd_smbus.c
4 files changed, 133 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/40415/5
--
To view, visit https://review.coreboot.org/c/coreboot/+/40415
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8d07fddf113a767d62394cb31e33b56f22f74351
Gerrit-Change-Number: 40415
Gerrit-PatchSet: 5
Gerrit-Owner: Jamie Chen <jamie.chen(a)intel.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Kane Chen <kane.chen(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Edward O'Callaghan, Angel Pons, Arthur Heymans, Kane Chen, Aaron Durbin, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40414
to look at the new patch set (#4).
Change subject: lib/spd_bin: add get_spd_sn function
......................................................................
lib/spd_bin: add get_spd_sn function
This patch adds the get_spd_sn function. It's for reading SODIMM serial
number. In spd_cache implementation it can use to get serial number
before reading whole SPD by smbus.
BUG=b:146457985
BRANCH=None
TEST=Wrote sample code to get the serial number and ran on puff.
It can get the serial number correctly.
Change-Id: I406bba7cc56debbd9851d430f069e4fb96ec937c
Signed-off-by: Jamie Chen <jamie.chen(a)intel.com>
---
M src/include/spd_bin.h
M src/soc/intel/common/block/smbus/smbuslib.c
2 files changed, 47 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/40414/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/40414
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I406bba7cc56debbd9851d430f069e4fb96ec937c
Gerrit-Change-Number: 40414
Gerrit-PatchSet: 4
Gerrit-Owner: Jamie Chen <jamie.chen(a)intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Kane Chen <kane.chen(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Name of user not set #1002873 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40539 )
Change subject: tests: Add device/i2c-test test case
......................................................................
tests: Add device/i2c-test test case
Add unit test for src/device/i2c.c module.
This patch is also used as an example for incorporating Cmocka mocking
feature (-wrap linker flag).
Signed-off-by: Jan Dabros <jsd(a)semihalf.com>
Change-Id: I2eeb565aacc724ae3b9f5c76ef4b98ef695416d6
---
A tests/device/Makefile.inc
A tests/device/i2c-test.c
2 files changed, 203 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/40539/1
diff --git a/tests/device/Makefile.inc b/tests/device/Makefile.inc
new file mode 100644
index 0000000..ec421af
--- /dev/null
+++ b/tests/device/Makefile.inc
@@ -0,0 +1,18 @@
+##
+## This file is part of the coreboot project.
+##
+## 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.
+##
+
+tests += i2c-test
+
+i2c-test-srcs += tests/device/i2c-test.c
+i2c-test-srcs += src/device/i2c.c
+i2c-test-mocks += platform_i2c_transfer
diff --git a/tests/device/i2c-test.c b/tests/device/i2c-test.c
new file mode 100644
index 0000000..6233f78
--- /dev/null
+++ b/tests/device/i2c-test.c
@@ -0,0 +1,185 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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.
+ */
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+#include <device/i2c_simple.h>
+
+/* Simulate two i2c devices, both on bus 0, each with three uint8_t regs
+ * implemented.
+ */
+typedef struct {
+ uint8_t reg;
+ uint8_t data;
+} i2c_ex_regs_t;
+
+typedef struct {
+ unsigned int bus;
+ uint8_t slave;
+ i2c_ex_regs_t regs[3];
+} i2c_ex_devs_t;
+
+i2c_ex_devs_t i2c_ex_devs[] = {
+ {0, 0xA, { /* bus, slave */
+ {0x0, 0xB}, /* reg, data */
+ {0x1, 0x6},
+ {0x2, 0xF},
+ } },
+ {0, 0x3, {
+ {0x0, 0xDE},
+ {0x1, 0xAD},
+ {0x2, 0xBE},
+ } },
+};
+
+int __wrap_platform_i2c_transfer(unsigned int bus, struct i2c_msg *segments,
+ int count)
+{
+ int i;
+ int reg;
+ struct i2c_msg *tmp = segments;
+ i2c_ex_devs_t *i2c_dev = NULL;
+
+ for (i = 0; i < count; i++, segments++) {
+ check_expected_ptr(segments->buf);
+ check_expected(segments->flags);
+ }
+
+ reg = tmp->buf[0];
+
+ /* Find object for requested device */
+ for (i = 0; i < ARRAY_SIZE(i2c_ex_devs); i++, i2c_dev++)
+ if (i2c_ex_devs[i].slave == tmp->slave) {
+ i2c_dev = &i2c_ex_devs[i];
+ break;
+ }
+
+ if (i2c_dev == NULL)
+ return -1;
+
+ /* Write commands */
+ if (tmp->len > 1) {
+ i2c_dev->regs[reg].data = tmp->buf[1];
+ };
+
+ /* Read commands */
+ for (i = 0; i < count; i++, tmp++)
+ if (tmp->flags & I2C_M_RD) {
+ *(tmp->buf) = i2c_dev->regs[reg].data;
+ };
+}
+
+static void mock_check_params(void)
+{
+ unsigned long int expected_flags[] = {0, I2C_M_RD, I2C_M_TEN,
+ I2C_M_RECV_LEN, I2C_M_NOSTART};
+
+ /* Flags should always be only within supported range */
+ expect_in_set_count(__wrap_platform_i2c_transfer, segments->flags,
+ expected_flags, -1);
+
+ expect_not_value_count(__wrap_platform_i2c_transfer, segments->buf,
+ NULL, -1);
+}
+
+#define MASK 0x3
+#define SHIFT 0x1
+
+static void i2c_read_field_test(void **state)
+{
+ int bus, slave, reg;
+ int i, j;
+ uint8_t buf;
+
+ mock_check_params();
+
+ /* Read particular bits in all registers in all devices, then compare
+ * with expected value.
+ */
+ for (i = 0; i < ARRAY_SIZE(i2c_ex_devs); i++)
+ for (j = 0; j < ARRAY_SIZE(i2c_ex_devs[0].regs); j++) {
+ i2c_read_field(i2c_ex_devs[i].bus,
+ i2c_ex_devs[i].slave,
+ i2c_ex_devs[i].regs[j].reg,
+ &buf, MASK, SHIFT);
+ assert_int_equal((i2c_ex_devs[i].regs[j].data &
+ (MASK << SHIFT)) >> SHIFT, buf);
+ };
+
+ /* Read whole registers */
+ for (i = 0; i < ARRAY_SIZE(i2c_ex_devs); i++)
+ for (j = 0; j < ARRAY_SIZE(i2c_ex_devs[0].regs); j++) {
+ i2c_read_field(i2c_ex_devs[i].bus,
+ i2c_ex_devs[i].slave,
+ i2c_ex_devs[i].regs[j].reg,
+ &buf, 0xFF, 0);
+ assert_int_equal(i2c_ex_devs[i].regs[j].data, buf);
+ };
+}
+
+static void i2c_write_field_test(void **state)
+{
+ int bus, slave, reg;
+ int i, j;
+ uint8_t buf, tmp;
+
+ mock_check_params();
+
+ /* Clear particular bits in all registers in all devices, then compare
+ * with expected value.
+ */
+ for (i = 0; i < ARRAY_SIZE(i2c_ex_devs); i++)
+ for (j = 0; j < ARRAY_SIZE(i2c_ex_devs[0].regs); j++) {
+ buf = 0x0;
+ tmp = i2c_ex_devs[i].regs[j].data;
+ i2c_write_field(i2c_ex_devs[i].bus,
+ i2c_ex_devs[i].slave,
+ i2c_ex_devs[i].regs[j].reg,
+ buf, MASK, SHIFT);
+ assert_int_equal(i2c_ex_devs[i].regs[j].data,
+ (tmp & ~(MASK << SHIFT)) | (buf << SHIFT));
+ i2c_read_field(i2c_ex_devs[i].bus,
+ i2c_ex_devs[i].slave,
+ i2c_ex_devs[i].regs[j].reg,
+ &buf, MASK, SHIFT);
+ };
+
+ /* Set all bits in all registers, this time verify using
+ * i2c_read_field() accessor.
+ */
+ for (i = 0; i < ARRAY_SIZE(i2c_ex_devs); i++)
+ for (j = 0; j < ARRAY_SIZE(i2c_ex_devs[0].regs); j++) {
+ i2c_write_field(i2c_ex_devs[i].bus,
+ i2c_ex_devs[i].slave,
+ i2c_ex_devs[i].regs[j].reg,
+ 0xFF, 0xFF, 0);
+ i2c_read_field(i2c_ex_devs[i].bus,
+ i2c_ex_devs[i].slave,
+ i2c_ex_devs[i].regs[j].reg,
+ &buf, 0xFF, 0);
+ assert_int_equal(buf, 0xFF);
+ };
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(i2c_read_field_test),
+ cmocka_unit_test(i2c_write_field_test)
+ };
+
+ return cmocka_run_group_tests(tests, NULL, NULL);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/40539
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2eeb565aacc724ae3b9f5c76ef4b98ef695416d6
Gerrit-Change-Number: 40539
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002873
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Johnny Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40308 )
Change subject: drivers/ocp/dmi: Add OCP_DMI driver for populating SMBIOS from IPMI FRU data
......................................................................
Patch Set 26:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40308/23/src/drivers/ocp/dmi/Kconf…
File src/drivers/ocp/dmi/Kconfig:
https://review.coreboot.org/c/coreboot/+/40308/23/src/drivers/ocp/dmi/Kconf…
PS23, Line 14: config BMC_KCS_BASE
> I noticed this so I added define BMC_KCS_BASE to ocp_dmi. […]
For ramstage maybe I can add a global variable for it and sets it during ipmi_kcs_init() from dev->path.pnp.port, so all functions will use this global variable directly?
--
To view, visit https://review.coreboot.org/c/coreboot/+/40308
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I08c958dfad83216cd12545760a19d205efc2515b
Gerrit-Change-Number: 40308
Gerrit-PatchSet: 26
Gerrit-Owner: Johnny Lin
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Jingle Hsu
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Maxim Polyakov <max.senia.poliak(a)gmail.com>
Gerrit-Reviewer: Morgan Jang
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Andrey Petrov <andrey.petrov(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Mon, 04 May 2020 09:53:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Comment-In-Reply-To: Johnny Lin
Gerrit-MessageType: comment