Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/29849
to look at the new patch set (#2).
Change subject: cheza: Add board reset via Chrome EC
......................................................................
cheza: Add board reset via Chrome EC
This patch implements board reset on the Cheza board. The real board
reset used by the operating system uses the PMIC, but unfortunately the
PMIC needs to be configured right for that to work. The PMIC
configuration currently happens in the Qualcomm blob (QcLib) that is run
from romstage, but vboot needs to be able to reboot during verstage
already. Porting all the PMIC initialization code to run in the
bootblock seems excessive (and at odds with the goal of doing as little
as possible before verification), so we'll just do a little hack and ask
the EC to perform a cold reset instead. For vboot purposes, this should
work just as well.
BUG=b:118501305
TEST=Hacked vboot code to call vboot_reboot(), confirmed that board
reset and came back up as expected.
Change-Id: I3858d95f481884a87c243d4fa3d6369c1e8a5a2c
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/mainboard/google/cheza/Kconfig
M src/mainboard/google/cheza/Makefile.inc
A src/mainboard/google/cheza/reset.c
3 files changed, 28 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/29849/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/29849
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3858d95f481884a87c243d4fa3d6369c1e8a5a2c
Gerrit-Change-Number: 29849
Gerrit-PatchSet: 2
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29851
Change subject: vendorcode/cavium: Supply bdk_pop and bdk_dpop definitions
......................................................................
vendorcode/cavium: Supply bdk_pop and bdk_dpop definitions
This is an issue found by the new builder image and needs to be fixed
before we can upgrade to the new toolchain version:
In function `bdk_dram_get_size_mbytes':
src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-size.c:198:
undefined reference to `bdk_pop'
In function `bdk_get_num_cores':
/src/vendorcode/cavium/include/bdk/libbdk-hal/bdk-utils.h:164:
undefined reference to `bdk_dpop'
In function `init_octeon3_ddr3_interface':
src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c:7550:
undefined reference to `bdk_pop'
Change-Id: Ibf71e4556014795bfedceccfe3837dc9deb29ad2
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
M src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-size.c
M src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
M src/vendorcode/cavium/include/bdk/libbdk-hal/bdk-utils.h
3 files changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/29851/1
diff --git a/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-size.c b/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-size.c
index 8cd4594..eecb348 100644
--- a/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-size.c
+++ b/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-size.c
@@ -37,6 +37,7 @@
* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
***********************license end**************************************/
#include <bdk.h>
+#include <bdk-coreboot.h>
#include <libbdk-hal/bdk-utils.h>
diff --git a/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c b/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
index 0fcc180..3a6d5ab 100644
--- a/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
+++ b/src/vendorcode/cavium/bdk/libdram/dram-init-ddr3.c
@@ -37,6 +37,7 @@
* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
***********************license end**************************************/
#include <bdk.h>
+#include <bdk-coreboot.h>
#include "libbdk-arch/bdk-csrs-l2c_tad.h"
#include "libbdk-arch/bdk-csrs-mio_fus.h"
#include "dram-internal.h"
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-hal/bdk-utils.h b/src/vendorcode/cavium/include/bdk/libbdk-hal/bdk-utils.h
index c836586..a51ab6b 100644
--- a/src/vendorcode/cavium/include/bdk/libbdk-hal/bdk-utils.h
+++ b/src/vendorcode/cavium/include/bdk/libbdk-hal/bdk-utils.h
@@ -39,6 +39,7 @@
* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
***********************license end**************************************/
#include "libbdk-arch/bdk-csrs-rst.h"
+#include <bdk-coreboot.h>
#include <string.h>
/**
--
To view, visit https://review.coreboot.org/c/coreboot/+/29851
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibf71e4556014795bfedceccfe3837dc9deb29ad2
Gerrit-Change-Number: 29851
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29850
Change subject: romcc: Increase buffer size to fit max string size
......................................................................
romcc: Increase buffer size to fit max string size
On the updated builder image, the build is failing because the system
compiler has been updated to GCC 8.2.0. It complains about the
possibility of overflow when putting one 30 character buffer plus 2
characters into another 30 character buffer. To fix this, increase
the recipient buffer size by 2.
romcc.c:3645:2: note: 'sprintf' output between 3 and 32 bytes into a destination
of size 30 [-Werror=format-overflow=]
sprintf(buf, "\"%s\"", scratch);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
romcc.c:3649:2: note: 'sprintf' output between 3 and 32 bytes into a destination
of size 30 [-Werror=format-overflow=]
sprintf(buf, "\"%s\"", scratch);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I7879a7202cc3ff52301b10118fc49fcc601f133e
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
M util/romcc/romcc.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/29850/1
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index 307fcf8..4cb2aad 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -3629,7 +3629,7 @@
static void register_builtin_macros(struct compile_state *state)
{
- char buf[30];
+ char buf[32];
char scratch[30];
time_t now;
struct tm *tm;
--
To view, visit https://review.coreboot.org/c/coreboot/+/29850
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7879a7202cc3ff52301b10118fc49fcc601f133e
Gerrit-Change-Number: 29850
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/29849 )
Change subject: cheza: Add board reset via Chrome EC
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/29849/1/src/mainboard/google/cheza/reset.c
File src/mainboard/google/cheza/reset.c:
https://review.coreboot.org/#/c/29849/1/src/mainboard/google/cheza/reset.c@…
PS1, Line 21: void do_board_reset(void) {
open brace '{' following function definitions go on the next line
--
To view, visit https://review.coreboot.org/c/coreboot/+/29849
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3858d95f481884a87c243d4fa3d6369c1e8a5a2c
Gerrit-Change-Number: 29849
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 27 Nov 2018 01:29:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Julius Werner has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29849
Change subject: cheza: Add board reset via Chrome EC
......................................................................
cheza: Add board reset via Chrome EC
This patch implements board reset on the Cheza board. The real board
reset used by the operating system uses the PMIC, but unfortunately the
PMIC needs to be configured right for that to work. The PMIC
configuration currently happens in the Qualcomm blob (QcLib) that is run
from romstage, but vboot needs to be able to reboot during verstage
already. Porting all the PMIC initialization code to run in the
bootblock seems excessive (and at odds with the goal of doing as little
as possible before verification), so we'll just do a little hack and ask
the EC to perform a cold reset instead. For vboot purposes, this should
work just as well.
BUG=b:118501305
TEST=Hacked vboot code to call vboot_reboot(), confirmed that board
reset and came back up as expected.
Change-Id: I3858d95f481884a87c243d4fa3d6369c1e8a5a2c
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/mainboard/google/cheza/Kconfig
M src/mainboard/google/cheza/Makefile.inc
A src/mainboard/google/cheza/reset.c
3 files changed, 27 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/29849/1
diff --git a/src/mainboard/google/cheza/Kconfig b/src/mainboard/google/cheza/Kconfig
index 828a1f7..392c9b1 100644
--- a/src/mainboard/google/cheza/Kconfig
+++ b/src/mainboard/google/cheza/Kconfig
@@ -16,7 +16,6 @@
select SPI_FLASH
select SPI_FLASH_WINBOND
select MAINBOARD_HAS_CHROMEOS
- select MISSING_BOARD_RESET
select MAINBOARD_HAS_TPM2
select MAINBOARD_HAS_SPI_TPM_CR50
diff --git a/src/mainboard/google/cheza/Makefile.inc b/src/mainboard/google/cheza/Makefile.inc
index 1d339c3..7655e24 100644
--- a/src/mainboard/google/cheza/Makefile.inc
+++ b/src/mainboard/google/cheza/Makefile.inc
@@ -18,18 +18,22 @@
bootblock-y += chromeos.c
bootblock-y += bootblock.c
bootblock-y += qupv3_config.c
+bootblock-y += reset.c
verstage-y += boardid.c
verstage-y += memlayout.ld
verstage-y += chromeos.c
+verstage-y += reset.c
romstage-y += boardid.c
romstage-y += memlayout.ld
romstage-y += chromeos.c
romstage-y += romstage.c
+romstage-y += reset.c
ramstage-y += boardid.c
ramstage-y += memlayout.ld
ramstage-y += chromeos.c
ramstage-y += mainboard.c
ramstage-y += qupv3_config.c
+ramstage-y += reset.c
diff --git a/src/mainboard/google/cheza/reset.c b/src/mainboard/google/cheza/reset.c
new file mode 100644
index 0000000..0a835b5
--- /dev/null
+++ b/src/mainboard/google/cheza/reset.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google LLC
+ *
+ * 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 <ec/google/chromeec/ec.h>
+#include <reset.h>
+
+/* Can't do a "real" reset before the PMIC is initialized in QcLib (romstage),
+ but this works well enough for our purposes. */
+void do_board_reset(void) {
+ google_chromeec_reboot(0, EC_REBOOT_COLD, 0);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/29849
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3858d95f481884a87c243d4fa3d6369c1e8a5a2c
Gerrit-Change-Number: 29849
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange
Hello Patrick Rudolph, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/29847
to look at the new patch set (#2).
Change subject: src: Remove duplicated round up function
......................................................................
src: Remove duplicated round up function
Fixes 7116ac8037 (src: Make use of 'CEIL_DIV(a, b)' macro across tree).
Change-Id: I9aabc3fbe7834834c92d6ba59ff0005986622a34
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/commonlib/include/commonlib/helpers.h
M src/cpu/allwinner/a10/clock.c
M src/cpu/x86/tsc/delay_tsc.c
M src/northbridge/intel/gm45/raminit.c
M src/northbridge/intel/nehalem/raminit.c
M src/northbridge/via/vx900/raminit_ddr3.c
M src/soc/nvidia/tegra124/clock.c
M src/soc/samsung/exynos5250/cpu.c
M src/soc/samsung/exynos5420/clock.c
M src/soc/samsung/exynos5420/cpu.c
10 files changed, 25 insertions(+), 27 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/29847/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/29847
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9aabc3fbe7834834c92d6ba59ff0005986622a34
Gerrit-Change-Number: 29847
Gerrit-PatchSet: 2
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newpatchset