Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86609?usp=email )
Change subject: include/endian.h: Add 'always aligned access' support
......................................................................
include/endian.h: Add 'always aligned access' support
RISC-V doesn't support unaligned access, so check for that before
decoding and encoding. It is not perfectly performant, but still much
better then invoking the misaligned exception handler every time there
is a misaligned access. We can't modify our whole codebase to always do
aligned access, because it is neither feasable in long term nor is fair
to add that perfomance penalty onto other architectures that do support
unaligned access. So this is the next best thing.
On architectures that do support unaligned access the compiler will just
optimize the RISCV_ENV part out and should result in the exact same
binary.
tested: identical binary on QEMU-aarch64 and QEMU-q35.
Change-Id: I4dfccfdc2b302dd30b7ce5a29520c86add13169d
---
M .gitignore
M 3rdparty/arm-trusted-firmware
M src/include/endian.h
3 files changed, 27 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/86609/1
diff --git a/.gitignore b/.gitignore
index e813493..de29581 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,4 @@
*~
*.kate-swp
*.kdev4
+.aider*
diff --git a/3rdparty/arm-trusted-firmware b/3rdparty/arm-trusted-firmware
index 15e5c6c..8fb9178 160000
--- a/3rdparty/arm-trusted-firmware
+++ b/3rdparty/arm-trusted-firmware
@@ -1 +1 @@
-Subproject commit 15e5c6c91d483aa52908154cc80e48956e234232
+Subproject commit 8fb91783ffa96343dd8ebad9773d7c2055ea4496
diff --git a/src/include/endian.h b/src/include/endian.h
index 552ce002..c9df74d 100644
--- a/src/include/endian.h
+++ b/src/include/endian.h
@@ -5,7 +5,9 @@
#include <arch/byteorder.h>
#include <stdint.h>
+#include <string.h>
#include <swab.h>
+#include <rules.h>
#if defined(__LITTLE_ENDIAN)
#define cpu_to_le64(x) ((uint64_t)(x))
@@ -67,12 +69,22 @@
#define clrsetbits_le16(addr, clear, set) __clrsetbits(le, 16, addr, clear, set)
#define clrsetbits_be16(addr, clear, set) __clrsetbits(be, 16, addr, clear, set)
-/* be16dec/be32dec/be64dec/le16dec/le32dec/le64dec family of functions. */
+/*
+ * be16dec/be32dec/be64dec/le16dec/le32dec/le64dec family of functions.
+ * RISC-V doesn't support misaligned access so decode it byte by byte.
+ */
#define DEFINE_ENDIAN_DEC(endian, width) \
static inline uint##width##_t endian##width##dec(const void *p) \
{ \
- return endian##width##_to_cpu(*(uint##width##_t *)p); \
+ if (ENV_RISCV) { \
+ uint##width##_t val; \
+ memcpy(&val, p, sizeof(val)); \
+ return endian##width##_to_cpu(val); \
+ } else { \
+ return endian##width##_to_cpu(*(uint##width##_t *)p); \
+ } \
}
+
DEFINE_ENDIAN_DEC(be, 16)
DEFINE_ENDIAN_DEC(be, 32)
DEFINE_ENDIAN_DEC(be, 64)
@@ -80,12 +92,21 @@
DEFINE_ENDIAN_DEC(le, 32)
DEFINE_ENDIAN_DEC(le, 64)
-/* be16enc/be32enc/be64enc/le16enc/le32enc/le64enc family of functions. */
+/*
+ * be16enc/be32enc/be64enc/le16enc/le32enc/le64enc family of functions.
+ * RISC-V doesn't support misaligned access so encode it byte by byte.
+ */
#define DEFINE_ENDIAN_ENC(endian, width) \
static inline void endian##width##enc(void *p, uint##width##_t u) \
{ \
- *(uint##width##_t *)p = cpu_to_##endian##width(u); \
+ if (ENV_RISCV) { \
+ uint##width##_t val = cpu_to_##endian##width(u); \
+ memcpy(p, &val, sizeof(val)); \
+ } else { \
+ *(uint##width##_t *)p = cpu_to_##endian##width(u); \
+ } \
}
+
DEFINE_ENDIAN_ENC(be, 16)
DEFINE_ENDIAN_ENC(be, 32)
DEFINE_ENDIAN_ENC(be, 64)
--
To view, visit https://review.coreboot.org/c/coreboot/+/86609?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4dfccfdc2b302dd30b7ce5a29520c86add13169d
Gerrit-Change-Number: 86609
Gerrit-PatchSet: 1
Gerrit-Owner: Maximilian Brune <maximilian.brune(a)9elements.com>
Attention is currently required from: Jason Nien, Martin Roth.
Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86608?usp=email )
Change subject: mb/{google/zork,novacustom/mtl-h}: Use true/false for boolean
......................................................................
mb/{google/zork,novacustom/mtl-h}: Use true/false for boolean
enable_power_saving is a boolean so use "true" "false".
Change-Id: I0f62fc2b0db3abd3f204951f15081b89e02a0754
Signed-off-by: Elyes Haouas <ehaouas(a)noos.fr>
---
M src/mainboard/google/zork/variants/vilboz/overridetree.cb
M src/mainboard/novacustom/mtl-h/devicetree.cb
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/86608/1
diff --git a/src/mainboard/google/zork/variants/vilboz/overridetree.cb b/src/mainboard/google/zork/variants/vilboz/overridetree.cb
index b1d0c0f..8740611 100644
--- a/src/mainboard/google/zork/variants/vilboz/overridetree.cb
+++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb
@@ -154,7 +154,7 @@
subsystemid 0x1022 0x1510 inherit
device ref gpp_bridge_2 on
chip drivers/generic/bayhub_lv2
- register "enable_power_saving" = "1"
+ register "enable_power_saving" = "true"
device pci 00.0 on end
end
end # SD
diff --git a/src/mainboard/novacustom/mtl-h/devicetree.cb b/src/mainboard/novacustom/mtl-h/devicetree.cb
index 663d694..2e5934b 100644
--- a/src/mainboard/novacustom/mtl-h/devicetree.cb
+++ b/src/mainboard/novacustom/mtl-h/devicetree.cb
@@ -250,7 +250,7 @@
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip drivers/generic/bayhub_lv2
- register "enable_power_saving" = "1"
+ register "enable_power_saving" = "true"
device pci 00.0 on end
end
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/86608?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I0f62fc2b0db3abd3f204951f15081b89e02a0754
Gerrit-Change-Number: 86608
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Attention: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Attention: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Jakub "Kuba" Czapiga has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/86606?usp=email )
Change subject: util/cbmem: Add support for CBMEM in sysfs
......................................................................
util/cbmem: Add support for CBMEM in sysfs
This commit adds support for CBMEM in sysfs. Useful for systems without
access to /dev/mem e.g. Android.
BUG=b:391874512
TEST=(devmem) cbmem -l; cbmem -x; cbmem -r 434f4e53; cbmem -t; cbmem -a 1200
TEST=modprobe cbmem; cbmem -l; cbmem -x; cbmem -r 434f4e53; cbmem -t; cbmem -a 1200
Change-Id: I527889509ffc84203be42d0160e5363c60eafd02
Signed-off-by: Jakub Czapiga <czapiga(a)google.com>
---
M util/cbmem/Makefile
M util/cbmem/cbmem.c
A util/cbmem/cbmem_drv.c
M util/cbmem/cbmem_util.h
M util/cbmem/common.c
M util/cbmem/devmem_drv.c
A util/cbmem/sysfs_drv.c
7 files changed, 592 insertions(+), 31 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/86606/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/86606?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I527889509ffc84203be42d0160e5363c60eafd02
Gerrit-Change-Number: 86606
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub "Kuba" Czapiga <czapiga(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Sean Rhodes has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/86605?usp=email )
Change subject: soc/intel/meteorlake: Add missing minimum D-state for SMBUS
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/86605?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I73f84c09bece297194813202f17666741ad33d3a
Gerrit-Change-Number: 86605
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Wed, 26 Feb 2025 14:06:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Attention is currently required from: Intel coreboot Reviewers, Name of user not set #1005756, Patrick Rudolph, Shuo Liu.
Hello Intel coreboot Reviewers, Patrick Rudolph, Shuo Liu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/86562?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by Shuo Liu, Verified+1 by build bot (Jenkins)
Change subject: src/cpu/intel/car/romstage: Refactor stack guard code in romstage
......................................................................
src/cpu/intel/car/romstage: Refactor stack guard code in romstage
Factor out stack_guard_set() and stack_guard_check().
It's just for improving readability. :)
Change-Id: I754e422c0023cd7824dd6109f031239756acff4b
Signed-off-by: melongmelong <knw0507(a)naver.com>
---
M src/cpu/intel/car/romstage.c
1 file changed, 28 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/86562/5
--
To view, visit https://review.coreboot.org/c/coreboot/+/86562?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I754e422c0023cd7824dd6109f031239756acff4b
Gerrit-Change-Number: 86562
Gerrit-PatchSet: 5
Gerrit-Owner: Name of user not set #1005756
Gerrit-Reviewer: Intel coreboot Reviewers <intel_coreboot_reviewers(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph
Gerrit-Reviewer: Shuo Liu <shuo.liu(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Intel coreboot Reviewers <intel_coreboot_reviewers(a)intel.com>
Gerrit-Attention: Shuo Liu <shuo.liu(a)intel.com>
Gerrit-Attention: Patrick Rudolph
Gerrit-Attention: Name of user not set #1005756
Attention is currently required from: Hung-Te Lin, Jarried Lin, Zhaoqing Jiu.
Yidi Lin has posted comments on this change by Jarried Lin. ( https://review.coreboot.org/c/coreboot/+/86551?usp=email )
Change subject: soc/mediatek/mt8196: Save HW protect temperature to SRAM
......................................................................
Patch Set 2:
(1 comment)
File src/soc/mediatek/mt8196/thermal_sram.c:
https://review.coreboot.org/c/coreboot/+/86551/comment/daecaa33_62be28db?us… :
PS2, Line 68: write32
> there will be compile error if use write32p
Acknowledged
--
To view, visit https://review.coreboot.org/c/coreboot/+/86551?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ib714c297871132907e286536c4b3aea1532f3869
Gerrit-Change-Number: 86551
Gerrit-PatchSet: 2
Gerrit-Owner: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Zhaoqing Jiu <zhaoqing.jiu(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Zhaoqing Jiu <zhaoqing.jiu(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Comment-Date: Wed, 26 Feb 2025 12:34:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Zhaoqing Jiu <zhaoqing.jiu(a)mediatek.corp-partner.google.com>
Comment-In-Reply-To: Yidi Lin <yidilin(a)google.com>