Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/61380 )
Change subject: soc/intel/common: Add support to control coreboot and Intel SoC features
......................................................................
soc/intel/common: Add support to control coreboot and Intel SoC features
The patch adds a framework to control coreboot and Intel SoC features
dynamically. BIOS reads control information from OEM Section in the
Descriptor Region and control the developer selected features.
With the feature, debug team can control the selected SoC and coreboot
features without rebuilding coreboot.
In order to enable the feature, SOC_INTEL_COMMON_BLOCK_DEBUG_FEATURE has
to be selcted from mainboard.
The OEM section starts from offset:0xf00 till end of the Descriptor
Region(0xfff).
BUG=b:153410586
BRANCH=None
TEST=Verified CSE firmware update functionality on brya
Signed-off-by: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Change-Id: I5ba40926bd9ad909654f152e48cdd648b28afd62
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61380
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar(a)intel.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
---
M src/soc/intel/common/basecode/Kconfig
A src/soc/intel/common/basecode/debug/Kconfig
A src/soc/intel/common/basecode/debug/Makefile.inc
A src/soc/intel/common/basecode/debug/debug_feature.c
A src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h
5 files changed, 71 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Maulik V Vaghela: Looks good to me, approved
Ronak Kanabar: Looks good to me, but someone else must approve
diff --git a/src/soc/intel/common/basecode/Kconfig b/src/soc/intel/common/basecode/Kconfig
index 9e0f788..9730985 100644
--- a/src/soc/intel/common/basecode/Kconfig
+++ b/src/soc/intel/common/basecode/Kconfig
@@ -2,3 +2,9 @@
bool
help
Common coreboot stages and non-IP block for Intel platform
+
+if SOC_INTEL_COMMON_BASECODE
+
+source "src/soc/intel/common/basecode/*/Kconfig"
+
+endif
diff --git a/src/soc/intel/common/basecode/debug/Kconfig b/src/soc/intel/common/basecode/debug/Kconfig
new file mode 100644
index 0000000..f72055b
--- /dev/null
+++ b/src/soc/intel/common/basecode/debug/Kconfig
@@ -0,0 +1,6 @@
+config SOC_INTEL_COMMON_BASECODE_DEBUG_FEATURE
+ bool
+ default n
+ help
+ Driver to control runtime features of Intel SoC & coreboot. For example, controlling
+ the CSE firmware update feature without rebuilding the code.
diff --git a/src/soc/intel/common/basecode/debug/Makefile.inc b/src/soc/intel/common/basecode/debug/Makefile.inc
new file mode 100644
index 0000000..f783c8d
--- /dev/null
+++ b/src/soc/intel/common/basecode/debug/Makefile.inc
@@ -0,0 +1 @@
+romstage-$(CONFIG_SOC_INTEL_COMMON_BASECODE_DEBUG_FEATURE) += debug_feature.c
diff --git a/src/soc/intel/common/basecode/debug/debug_feature.c b/src/soc/intel/common/basecode/debug/debug_feature.c
new file mode 100644
index 0000000..5cdbaf7
--- /dev/null
+++ b/src/soc/intel/common/basecode/debug/debug_feature.c
@@ -0,0 +1,44 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <boot_device.h>
+#include <commonlib/region.h>
+#include <intelbasecode/debug_feature.h>
+#include <console/console.h>
+#include <fmap.h>
+
+#define SI_DESC_OEM_SECTION_OFFSET 0xF00
+#define PRE_MEM_FEATURE_CTRL_OFFSET SI_DESC_OEM_SECTION_OFFSET
+#define PRE_MEM_FEATURE_CTRL_SZ 64
+#define SI_DESC_REGION_SZ 4096
+
+struct pre_mem_ft {
+ uint8_t reserved[64];
+};
+
+static struct pre_mem_ft pre_mem_debug;
+
+_Static_assert(sizeof(struct pre_mem_ft) % 64 == 0 && sizeof(struct pre_mem_ft) <= 256,
+ "sizeof(struct pre_mem_ft) must be a multiple of 64 bytes and up to 256 bytes");
+
+uint8_t pre_mem_debug_init(void)
+{
+ struct region_device desc_rdev;
+ const struct region_device *boot_device = boot_device_ro();
+
+ if (!boot_device) {
+ printk(BIOS_ERR, "Failed to get RW boot device\n");
+ return 1;
+ }
+
+ if (rdev_chain(&desc_rdev, boot_device, 0, SI_DESC_REGION_SZ)) {
+ printk(BIOS_ERR, "Failed to get description region device\n");
+ return 1;
+ }
+
+ if (rdev_readat(&desc_rdev, &pre_mem_debug, PRE_MEM_FEATURE_CTRL_OFFSET,
+ PRE_MEM_FEATURE_CTRL_SZ) != PRE_MEM_FEATURE_CTRL_SZ) {
+ printk(BIOS_ERR, "Failed to read Descriptor Region from SPI Flash\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h b/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h
new file mode 100644
index 0000000..fabf27d
--- /dev/null
+++ b/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef SOC_INTEL_COMMON_BASECODE_DEBUG_FEATURE_H
+#define SOC_INTEL_COMMON_BASECODE_DEBUG_FEATURE_H
+
+#include <types.h>
+
+/*
+ * Reads OEM Section area in the Descriptor Region and
+ * populates pre_mem_debug structure.
+ */
+uint8_t pre_mem_debug_init(void);
+
+#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/61380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5ba40926bd9ad909654f152e48cdd648b28afd62
Gerrit-Change-Number: 61380
Gerrit-PatchSet: 18
Gerrit-Owner: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Krishna P Bhat D <krishna.p.bhat.d(a)intel.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: merged
Attention is currently required from: Nico Huber, Subrata Banik, Sridhar Siricilla, Arthur Heymans, Patrick Rudolph.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61380 )
Change subject: soc/intel/common: Add support to control coreboot and Intel SoC features
......................................................................
Patch Set 17:
(1 comment)
File src/soc/intel/common/basecode/debug/debug_feature.c:
https://review.coreboot.org/c/coreboot/+/61380/comment/9ddc4d0d_f9fda44e
PS17, Line 23: uint8_t
> I will let this patch train get up streamed first. I will push separate CL to use cb_err.
sounds good to me
--
To view, visit https://review.coreboot.org/c/coreboot/+/61380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5ba40926bd9ad909654f152e48cdd648b28afd62
Gerrit-Change-Number: 61380
Gerrit-PatchSet: 17
Gerrit-Owner: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Krishna P Bhat D <krishna.p.bhat.d(a)intel.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Wed, 06 Apr 2022 17:32:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Subrata Banik, Arthur Heymans, Patrick Rudolph, Felix Held.
Sridhar Siricilla has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61380 )
Change subject: soc/intel/common: Add support to control coreboot and Intel SoC features
......................................................................
Patch Set 17:
(1 comment)
File src/soc/intel/common/basecode/debug/debug_feature.c:
https://review.coreboot.org/c/coreboot/+/61380/comment/f493f50e_c1417876
PS17, Line 23: uint8_t
> i'd use enum cb_err instead of uint8_t as return value and return CB_SUCCESS/CB_ERR
I will let this patch train get up streamed first. I will push separate CL to use cb_err.
--
To view, visit https://review.coreboot.org/c/coreboot/+/61380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5ba40926bd9ad909654f152e48cdd648b28afd62
Gerrit-Change-Number: 61380
Gerrit-PatchSet: 17
Gerrit-Owner: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Krishna P Bhat D <krishna.p.bhat.d(a)intel.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Wed, 06 Apr 2022 16:59:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment
Attention is currently required from: Subrata Banik, Wonkyu Kim, Kangheui Won, Tim Wawrzynczak, Paul Menzel, Rizwan Qureshi, Angel Pons, Lean Sheng Tan, Eric Lai.
Meera Ravindranath has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62856 )
Change subject: soc/intel/alderlake: Add support for UFS controller
......................................................................
Patch Set 7:
(1 comment)
File src/soc/intel/alderlake/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/62856/comment/6def8631_7d2604d0
PS6, Line 641: s_cfg->UfsEnable[0] = 0; /* UFS Controller 0 is fuse disabled */
> Oh yeah that is right, UFS is working for ADL-P too, will need to move this out of ADL-N kconfig
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/62856
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I92f024ded64e1eaef41a7807133361d74b5009d4
Gerrit-Change-Number: 62856
Gerrit-PatchSet: 7
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Kangheui Won <khwon(a)chromium.org>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Daniil Lunev <dlunev(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Subrata Banik <subratabanik(a)google.com>
Gerrit-CC: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Attention: Kangheui Won <khwon(a)chromium.org>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Comment-Date: Wed, 06 Apr 2022 16:42:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Lean Sheng Tan <sheng.tan(a)9elements.com>
Comment-In-Reply-To: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-MessageType: comment
Attention is currently required from: Subrata Banik, Wonkyu Kim, Kangheui Won, Tim Wawrzynczak, Paul Menzel, Rizwan Qureshi, Meera Ravindranath, Angel Pons, Eric Lai.
Hello build bot (Jenkins), Kangheui Won, Tim Wawrzynczak, Rizwan Qureshi, Angel Pons, Eric Lai, Lean Sheng Tan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/62856
to look at the new patch set (#7).
Change subject: soc/intel/alderlake: Add support for UFS controller
......................................................................
soc/intel/alderlake: Add support for UFS controller
UFS (Universal Flash Storage) is the next generation storage
standard and a SCSI storage technology. It is also a successor
of eMMC.
Following changes are needed to add support for UFS -
1) Add UFS controller to chipset.cb and keep it off by default
2) Hook up FSP enable UPD for UFS #1 to the device from chipset.cb
Signed-off-by: Meera Ravindranath <meera.ravindranath(a)intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Change-Id: I92f024ded64e1eaef41a7807133361d74b5009d4
---
M src/soc/intel/alderlake/chipset.cb
M src/soc/intel/alderlake/fsp_params.c
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/62856/7
--
To view, visit https://review.coreboot.org/c/coreboot/+/62856
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I92f024ded64e1eaef41a7807133361d74b5009d4
Gerrit-Change-Number: 62856
Gerrit-PatchSet: 7
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Kangheui Won <khwon(a)chromium.org>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Daniil Lunev <dlunev(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Subrata Banik <subratabanik(a)google.com>
Gerrit-CC: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Attention: Kangheui Won <khwon(a)chromium.org>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Attention: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-MessageType: newpatchset