Attention is currently required from: Martin L Roth, Maximilian Brune, Patrick Georgi, Philipp Hug.
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81410?usp=email )
Change subject: arch/riscv: add Kconfig variable RISCV_HAS_MENVCFG
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
makes no changes to any build
--
To view, visit https://review.coreboot.org/c/coreboot/+/81410?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I627dde377708cde2491d4abe625c482d64f7aa87
Gerrit-Change-Number: 81410
Gerrit-PatchSet: 1
Gerrit-Owner: ron minnich <rminnich(a)gmail.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Philipp Hug <philipp(a)hug.cx>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Attention: Philipp Hug <philipp(a)hug.cx>
Gerrit-Attention: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:37:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
ron minnich has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81410?usp=email )
Change subject: arch/riscv: add Kconfig variable RISCV_HAS_MENVCFG
......................................................................
arch/riscv: add Kconfig variable RISCV_HAS_MENVCFG
Older parts do not have the menvcfg csr.
Provide a Kconfig variable, default y, to enable it.
Check the variable in the payload code, when coreboot SBI
is used, and print out if it is enabled.
Add constants for this new CSR.
Signed-off-by: Ronald G Minnich <rminnich(a)gmail.com>
Change-Id: I627dde377708cde2491d4abe625c482d64f7aa87
---
M src/arch/riscv/Kconfig
M src/arch/riscv/include/arch/encoding.h
M src/arch/riscv/payload.c
3 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/81410/1
diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig
index 971dda3..e564480 100644
--- a/src/arch/riscv/Kconfig
+++ b/src/arch/riscv/Kconfig
@@ -110,4 +110,12 @@
config RISCV_WORKING_HARTID
int
+# Newer SoC have the menvconfig register.
+# Older SoC, such as the SiFive FU[57]40, that
+# do not have this register, should set this
+# to n.
+config RISCV_HAS_MENVCONFIG
+ bool
+ default y
+
endif # if ARCH_RISCV
diff --git a/src/arch/riscv/include/arch/encoding.h b/src/arch/riscv/include/arch/encoding.h
index 4f01e5c..6ab38bb 100644
--- a/src/arch/riscv/include/arch/encoding.h
+++ b/src/arch/riscv/include/arch/encoding.h
@@ -800,6 +800,8 @@
#define CSR_MIE 0x304
#define CSR_MTVEC 0x305
#define CSR_MCOUNTEREN 0x306
+#define CSR_MENVCFG 0x30a
+#define CSR_MENVCFGH 0x31a
#define CSR_MSCRATCH 0x340
#define CSR_MEPC 0x341
#define CSR_MCAUSE 0x342
@@ -1292,6 +1294,8 @@
DECLARE_CSR(mie, CSR_MIE)
DECLARE_CSR(mtvec, CSR_MTVEC)
DECLARE_CSR(mcounteren, CSR_MCOUNTEREN)
+DECLARE_CSR(menvcfg, CSR_MENVCFG)
+DECLARE_CSR(menvcfgh, CSR_MENVCFGH)
DECLARE_CSR(mscratch, CSR_MSCRATCH)
DECLARE_CSR(mepc, CSR_MEPC)
DECLARE_CSR(mcause, CSR_MCAUSE)
diff --git a/src/arch/riscv/payload.c b/src/arch/riscv/payload.c
index 7c6e0f4..8a5ae80 100644
--- a/src/arch/riscv/payload.c
+++ b/src/arch/riscv/payload.c
@@ -68,6 +68,9 @@
*/
close_pmp();
+ if (CONFIG(RISCV_HAS_MENVCONFIG)) {
+ printk(BIOS_DEBUG, "This part has menvconfig\n");
+ }
status = INSERT_FIELD(status, MSTATUS_MPP, PRV_S);
/* Trap vector base address point to the payload */
write_csr(stvec, doit);
--
To view, visit https://review.coreboot.org/c/coreboot/+/81410?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I627dde377708cde2491d4abe625c482d64f7aa87
Gerrit-Change-Number: 81410
Gerrit-PatchSet: 1
Gerrit-Owner: ron minnich <rminnich(a)gmail.com>
Gerrit-MessageType: newchange
Sean Rhodes has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/80462?usp=email )
Change subject: mb/starlabs/starbook/{kbl,cml}: Remove libgfxinit code
......................................................................
Abandoned
--
To view, visit https://review.coreboot.org/c/coreboot/+/80462?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I86af51f07f29971070bdccc3a589e807425cb83a
Gerrit-Change-Number: 80462
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-MessageType: abandon
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81408?usp=email )
Change subject: ec/starlabs/merlin/battery: Calculate unknown values
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81408?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I310555ff913c2e492bbaec4d77281ac32c0de7a3
Gerrit-Change-Number: 81408
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81407?usp=email )
Change subject: ec/starlabs/merlin/battery: Check values are valid before using them
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81407?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I559aca98044b7f0e6b08c475b5383c014bb4cd3f
Gerrit-Change-Number: 81407
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81406?usp=email )
Change subject: ec/starlabs/merlin: Rename BRPR to B1RP
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81406?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I64a744d78180156e16dbd483a35c7f97ac84bcba
Gerrit-Change-Number: 81406
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81405?usp=email )
Change subject: ec/starlabs/merlin: Report the battery cycle count to ACPI
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81405?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Iccb60d3530227fb71a3ce5a3ab1421627cc86611
Gerrit-Change-Number: 81405
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81404?usp=email )
Change subject: ec/starlabs/merlin/*: Remove temperature and control variables
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81404?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie6e85042ec59851bcfb4c88a2e04181c3c39f89c
Gerrit-Change-Number: 81404
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81403?usp=email )
Change subject: ec/starlabs/merlin/*: Fix the size of the battery soc
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81403?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I56a0ae8199a95c9722e9bcb4c0739f4ef1d6ab05
Gerrit-Change-Number: 81403
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Sean Rhodes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81402?usp=email )
Change subject: ec/starlabs/merlin/battery: Add extended battery information
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81402?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie5baecb20c7d4600e0cf1d19ff5f67ce2003fa1d
Gerrit-Change-Number: 81402
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Thu, 21 Mar 2024 15:31:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment