Jonathon Hall has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78346?usp=email )
Change subject: mb/purism/librem_cnl: Support Comet Lake v1 and v2 for Librem 14
......................................................................
mb/purism/librem_cnl: Support Comet Lake v1 and v2 for Librem 14
New Librem 14s have a newer CPU stepping, which changes them from CML
v1 to v2. The product is not significantly different and remains v1,
specifically "v1-02".
Select SOC_INTEL_COMETLAKE_1_2 to support all CPU steppings.
Change-Id: Iab37208b81e973714a2c088d2346eda518bf1214
Signed-off-by: Jonathon Hall <jonathon.hall(a)puri.sm>
---
M src/mainboard/purism/librem_cnl/Kconfig
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/78346/1
diff --git a/src/mainboard/purism/librem_cnl/Kconfig b/src/mainboard/purism/librem_cnl/Kconfig
index ef05a3e..f75f316 100644
--- a/src/mainboard/purism/librem_cnl/Kconfig
+++ b/src/mainboard/purism/librem_cnl/Kconfig
@@ -33,7 +33,7 @@
select EC_LIBREM_EC
select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
- select SOC_INTEL_COMETLAKE_1
+ select SOC_INTEL_COMETLAKE_1_2
select SYSTEM_TYPE_LAPTOP
if BOARD_PURISM_BASEBOARD_LIBREM_CNL
--
To view, visit https://review.coreboot.org/c/coreboot/+/78346?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: Iab37208b81e973714a2c088d2346eda518bf1214
Gerrit-Change-Number: 78346
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-MessageType: newchange
Jonathon Hall has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78345?usp=email )
Change subject: soc/intel/cannonlake: Support Comet Lake v1 and v2 in one build
......................................................................
soc/intel/cannonlake: Support Comet Lake v1 and v2 in one build
Define SOC_INTEL_COMETLAKE_1_2, which creates a build supporting both
Comet Lake v1 and v2 by including both sets of FSP binaries and
selecting one based on the CPUID.
A mainboard can select this instead of SOC_INTEL_COMETLAKE_1 or ..._2
to support all CML-U steppings in one build.
Change-Id: Ic8bf444560fd6b57064c47faf038643fabde010e
Signed-off-by: Jonathon Hall <jonathon.hall(a)puri.sm>
---
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/cannonlake/Makefile.inc
A src/soc/intel/cannonlake/cometlake_1_2.c
3 files changed, 64 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/78345/1
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index 80237f9..bd5082c 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -102,6 +102,17 @@
bool
select SOC_INTEL_COMETLAKE
+config SOC_INTEL_COMETLAKE_1_2
+ bool
+ select SOC_INTEL_COMETLAKE
+ select PLATFORM_USES_SECOND_FSP
+ help
+ Support both CML v1 and v2, for boards that may have either stepping.
+ Embeds both FSPs and selects the correct one at runtime. The second
+ FSP consumes about 800 KiB of flash space.
+
+ The first FSP is for CML v1, the second is for CML v2.
+
config SOC_INTEL_COMETLAKE_S
bool
select SOC_INTEL_COMETLAKE
@@ -289,17 +300,22 @@
config FSP_HEADER_PATH
default "3rdparty/fsp/CoffeeLakeFspBinPkg/Include/" if SOC_INTEL_COFFEELAKE || SOC_INTEL_WHISKEYLAKE
default "3rdparty/fsp/CometLakeFspBinPkg/CometLake1/Include/" if SOC_INTEL_COMETLAKE_1
- default "3rdparty/fsp/CometLakeFspBinPkg/CometLake2/Include/" if SOC_INTEL_COMETLAKE_2
+ # CML v1/v2 headers are equivalent (differ only in comments) so build
+ # against v2 arbitrarily.
+ default "3rdparty/fsp/CometLakeFspBinPkg/CometLake2/Include/" if SOC_INTEL_COMETLAKE_2 || SOC_INTEL_COMETLAKE_1_2
default "3rdparty/fsp/CometLakeFspBinPkg/CometLakeS/Include/" if SOC_INTEL_COMETLAKE_S
default "3rdparty/fsp/CometLakeFspBinPkg/CometLakeV/Include/" if SOC_INTEL_COMETLAKE_V
config FSP_FD_PATH
default "3rdparty/fsp/CoffeeLakeFspBinPkg/Fsp.fd" if SOC_INTEL_COFFEELAKE || SOC_INTEL_WHISKEYLAKE
- default "3rdparty/fsp/CometLakeFspBinPkg/CometLake1/Fsp.fd" if SOC_INTEL_COMETLAKE_1
+ default "3rdparty/fsp/CometLakeFspBinPkg/CometLake1/Fsp.fd" if SOC_INTEL_COMETLAKE_1 || SOC_INTEL_COMETLAKE_1_2
default "3rdparty/fsp/CometLakeFspBinPkg/CometLake2/Fsp.fd" if SOC_INTEL_COMETLAKE_2
default "3rdparty/fsp/CometLakeFspBinPkg/CometLakeS/Fsp.fd" if SOC_INTEL_COMETLAKE_S
default "3rdparty/fsp/CometLakeFspBinPkg/CometLakeV/Fsp.fd" if SOC_INTEL_COMETLAKE_V
+config FSP_FD_PATH_2
+ default "3rdparty/fsp/CometLakeFspBinPkg/CometLake2/Fsp.fd" if SOC_INTEL_COMETLAKE_1_2
+
config SOC_INTEL_CANNONLAKE_DEBUG_CONSENT
int "Debug Consent for CNL"
# USB DBC is more common for developers so make this default to 3 if
diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc
index 2a1fcee..5ae0099 100644
--- a/src/soc/intel/cannonlake/Makefile.inc
+++ b/src/soc/intel/cannonlake/Makefile.inc
@@ -85,6 +85,9 @@
bootblock-y += gpio_common.c
ramstage-y += gpio_common.c
+romstage-$(CONFIG_SOC_INTEL_COMETLAKE_1_2) += cometlake_1_2.c
+ramstage-$(CONFIG_SOC_INTEL_COMETLAKE_1_2) += cometlake_1_2.c
+
ifeq ($(CONFIG_SOC_INTEL_COFFEELAKE),y)
ifeq ($(CONFIG_SOC_INTEL_CANNONLAKE_PCH_H),y)
cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-9e-0a
diff --git a/src/soc/intel/cannonlake/cometlake_1_2.c b/src/soc/intel/cannonlake/cometlake_1_2.c
new file mode 100644
index 0000000..924b963
--- /dev/null
+++ b/src/soc/intel/cannonlake/cometlake_1_2.c
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <arch/cpu.h>
+#include <console/console.h>
+#include <fsp/util.h>
+
+static bool use_fsp_v1(void)
+{
+ /*
+ * Per the Comet Lake FSP documentation, differentiate Comet Lake v1/v2
+ * by CPUID. CML v1 has eax 0x000A0660 or 0x000806EC, CML v2 has
+ * 0x000A0661.
+ */
+ uint32_t cpuid = cpu_get_cpuid();
+ switch (cpuid) {
+ case 0x000A0660:
+ case 0x000806EC:
+ printk(BIOS_INFO, "CPUID %08X is Comet Lake v1\n", cpuid);
+ return true;
+ case 0x000A0661:
+ printk(BIOS_INFO, "CPUID %08X is Comet Lake v2\n", cpuid);
+ return false;
+ default:
+ /*
+ * It's unlikely any new Comet Lake SKUs would be added
+ * at this point, but guess CML v2 rather than failing
+ * to boot entirely.
+ */
+ printk(BIOS_ERR, "CPUID %08X is unknown, guessing Comet Lake v2\n",
+ cpuid);
+ return false;
+ }
+}
+
+const char *soc_select_fsp_m_cbfs(void)
+{
+ return use_fsp_v1() ? CONFIG_FSP_M_CBFS : CONFIG_FSP_M_CBFS_2;
+}
+
+const char *soc_select_fsp_s_cbfs(void)
+{
+ return use_fsp_v1() ? CONFIG_FSP_S_CBFS : CONFIG_FSP_S_CBFS_2;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/78345?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: Ic8bf444560fd6b57064c47faf038643fabde010e
Gerrit-Change-Number: 78345
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-MessageType: newchange
Jonathon Hall has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78344?usp=email )
Change subject: drivers/intel/fsp2_0: Support embedding a second FSP-M/FSP-S
......................................................................
drivers/intel/fsp2_0: Support embedding a second FSP-M/FSP-S
Support embedding a second FSP-M/FSP-S binary for an SoC that can
select one at runtime.
Comet Lake v1 and v2 are different steppings of the same SKUs, but they
require different FSP binaries. Supporting both in a single build
requires embedding both FSPs and selecting one at runtime based on the
CPUID. This is desirable for a product that may have different CPU
steppings but is not otherwise differentiated enough for a separate
firmware build.
An SoC can select PLATFORM_USES_SECOND_FSP to indicate that two FSP-M/
FSP-S binaries are required. Implement soc_select_fsp_m_cbfs() and
soc_select_fsp_s_cbfs() to choose one based on platform-specific
criteria. For Comet Lake, the first FSP is CML v1 and the second is
CML v2, but in principle a platform could define any meaning for the
first and second FSP.
FSP-T is not affected, only one FSP-T can be embedded if FSP_CAR is
used.
Only one set of FSP headers is used, which is sufficient for Comet Lake
v1/v2; their headers are equivalent.
ADD_FSP_BINARIES, FSP_USE_REPO, and FSP_FULL_FD are supported for both
sets of FSP-S/FSP-M but cannot be configured separately, both use the
same configuration.
Change-Id: Ied4c6c49a6bdf278238272edd47a2006258be8e5
Signed-off-by: Jonathon Hall <jonathon.hall(a)puri.sm>
---
M src/drivers/intel/fsp2_0/Kconfig
M src/drivers/intel/fsp2_0/Makefile.inc
M src/drivers/intel/fsp2_0/include/fsp/util.h
M src/drivers/intel/fsp2_0/memory_init.c
M src/drivers/intel/fsp2_0/silicon_init.c
5 files changed, 106 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/78344/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index ca17bc7..e27249f 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -79,6 +79,16 @@
help
Add the FSP-M and FSP-S binaries to CBFS.
+config PLATFORM_USES_SECOND_FSP
+ bool
+ default n
+ help
+ The platform uses two sets of FSP-M/FSP-S binaries and selects the
+ appropriate one at runtime. At least one platform requires different
+ binaries depending on CPU stepping, so supporting any stepping
+ requires embedding two FSPs. The platform indicates which is the
+ "first" and "second" FSP.
+
config FSP_T_CBFS
string "Name of FSP-T in CBFS"
depends on FSP_CAR
@@ -133,6 +143,40 @@
help
The path and filename of the Intel FSP-S binary for this platform.
+if PLATFORM_USES_SECOND_FSP
+
+config FSP_S_CBFS_2
+ string "Name of the second FSP-S in CBFS"
+ default "fsps_2.bin"
+
+config FSP_M_CBFS_2
+ string "Name of the second FSP-M in CBFS"
+ default "fspm_2.bin"
+
+config FSP_FD_PATH_2
+ string "Location of the second FSP FD file" if FSP_FULL_FD && !FSP_USE_REPO
+ help
+ Path to the FSP FD file that contains the individual FSP-M and FSP-S
+ binaries. The file gets split at build-time.
+
+config FSP_M_FILE_2
+ string "Intel FSP-M (memory init) second binary path and filename" if !FSP_FULL_FD
+ depends on ADD_FSP_BINARIES
+ default "\$(obj)/Fsp_2_M.fd" if FSP_FULL_FD
+ help
+ The path and filename of the second Intel FSP-M binary for this
+ platform.
+
+config FSP_S_FILE_2
+ string "Intel FSP-S (silicon init) second binary path and filename" if !FSP_FULL_FD
+ depends on ADD_FSP_BINARIES
+ default "\$(obj)/Fsp_2_S.fd" if FSP_FULL_FD
+ help
+ The path and filename of the second Intel FSP-S binary for this
+ platform.
+
+endif
+
config FSP_CAR
bool
default n
diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc
index 16742fd..4af4158 100644
--- a/src/drivers/intel/fsp2_0/Makefile.inc
+++ b/src/drivers/intel/fsp2_0/Makefile.inc
@@ -47,7 +47,9 @@
FSP_T_CBFS = $(call strip_quotes,$(CONFIG_FSP_T_CBFS))
FSP_M_CBFS = $(call strip_quotes,$(CONFIG_FSP_M_CBFS))
+FSP_M_CBFS_2 = $(call strip_quotes,$(CONFIG_FSP_M_CBFS_2))
FSP_S_CBFS = $(call strip_quotes,$(CONFIG_FSP_S_CBFS))
+FSP_S_CBFS_2 = $(call strip_quotes,$(CONFIG_FSP_S_CBFS_2))
# Add FSP blobs into cbfs. SoC code may supply additional options with
# -options, e.g --xip or -b
@@ -62,30 +64,47 @@
endif # CONFIG_ADD_FSP_BINARIES && CONFIG_FSP_CAR
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_M_CBFS)
+ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP)$(CONFIG_ADD_FSP_BINARIES),yy)
+cbfs-files-y += $(FSP_M_CBFS_2)
+endif
$(FSP_M_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE))
+$(FSP_M_CBFS_2)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE_2))
$(FSP_M_CBFS)-type := fsp
+$(FSP_M_CBFS_2)-type := fsp
ifeq ($(CONFIG_FSP_M_XIP),y)
$(FSP_M_CBFS)-options := --xip $(TXTIBB)
+$(FSP_M_CBFS_2)-options := --xip $(TXTIBB)
endif
ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZMA),y)
$(FSP_M_CBFS)-compression := LZMA
+$(FSP_M_CBFS_2)-compression := LZMA
else ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZ4),y)
$(FSP_M_CBFS)-compression := LZ4
+$(FSP_M_CBFS_2)-compression := LZ4
endif
ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_M),)
$(FSP_M_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_M)
+$(FSP_M_CBFS_2)-align := $(CONFIG_FSP_ALIGNMENT_FSP_M)
endif
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_S_CBFS)
+ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP)$(CONFIG_ADD_FSP_BINARIES),yy)
+cbfs-files-y += $(FSP_S_CBFS_2)
+endif
$(FSP_S_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE))
+$(FSP_S_CBFS_2)-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE_2))
$(FSP_S_CBFS)-type := fsp
+$(FSP_S_CBFS_2)-type := fsp
ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZMA),y)
$(FSP_S_CBFS)-compression := LZMA
+$(FSP_S_CBFS_2)-compression := LZMA
else ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZ4),y)
$(FSP_S_CBFS)-compression := LZ4
+$(FSP_S_CBFS_2)-compression := LZ4
endif
ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_S),)
$(FSP_S_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_S)
+$(FSP_S_CBFS_2)-align := $(CONFIG_FSP_ALIGNMENT_FSP_S)
endif
ifeq ($(CONFIG_FSP_FULL_FD),y)
@@ -99,6 +118,14 @@
true
endif
+ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP)$(CONFIG_FSP_FULL_FD),yy)
+$(obj)/Fsp_2_M.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH_2)) $(DOTCONFIG)
+ python 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH_2) -o "$(obj)" -n "Fsp_2.fd"
+
+$(obj)/Fsp_2_S.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH_2)) $(obj)/Fsp_M.fd
+ true
+endif
+
# Add logo to the cbfs image
cbfs-files-$(CONFIG_BMP_LOGO) += logo.bmp
logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME))
@@ -126,6 +153,14 @@
ifeq ($(call strip_quotes,$(CONFIG_FSP_S_FILE)),)
$(error No FSP-S binary file specified.)
endif # CONFIG_FSP_S_FILE
+ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP),y)
+ifeq ($(call strip_quotes,$(CONFIG_FSP_M_FILE_2)),)
+$(error No second FSP-M binary file specified.)
+endif # CONFIG_FSP_M_FILE_2
+ifeq ($(call strip_quotes,$(CONFIG_FSP_S_FILE_2)),)
+$(error No second FSP-S binary file specified.)
+endif # CONFIG_FSP_S_FILE_2
+endif # CONFIG_PLATFORM_USES_SECOND_FSP
else # CONFIG_ADD_FSP_BINARIES
build_complete:: warn_no_fsp_binaries
endif # CONFIG_ADD_FSP_BINARIES
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h
index 75b9ad8..acf337f 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/util.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/util.h
@@ -179,6 +179,21 @@
/* SoC/chipset must provide this to handle platform-specific reset codes */
void chipset_handle_reset(uint32_t status);
+#if CONFIG(PLATFORM_USES_SECOND_FSP)
+/* The SoC must implement these to choose the appropriate FSP-M/FSP-S binary. */
+const char *soc_select_fsp_m_cbfs(void);
+const char *soc_select_fsp_s_cbfs(void);
+#else
+static inline const char *soc_select_fsp_m_cbfs(void)
+{
+ return CONFIG_FSP_M_CBFS;
+}
+static inline const char *soc_select_fsp_s_cbfs(void)
+{
+ return CONFIG_FSP_S_CBFS;
+}
+#endif
+
typedef asmlinkage uint32_t (*temp_ram_exit_fn)(void *param);
typedef asmlinkage uint32_t (*fsp_memory_init_fn)
(void *raminit_upd, void **hob_list);
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index c592086..d0ddeaf 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -238,7 +238,8 @@
uint32_t ver = 0;
#if CONFIG(MRC_CACHE_USING_MRC_VERSION)
size_t fspm_blob_size;
- void *fspm_blob_file = cbfs_map(CONFIG_FSP_M_CBFS, &fspm_blob_size);
+ const char *fspm_cbfs = soc_select_fsp_m_cbfs();
+ void *fspm_blob_file = cbfs_map(fspm_cbfs, &fspm_blob_size);
if (!fspm_blob_file)
return 0;
@@ -386,16 +387,18 @@
if (!CONFIG(CBFS_PRELOAD))
return;
- printk(BIOS_DEBUG, "Preloading %s\n", CONFIG_FSP_M_CBFS);
- cbfs_preload(CONFIG_FSP_M_CBFS);
+ const char *fspm_cbfs = soc_select_fsp_m_cbfs();
+ printk(BIOS_DEBUG, "Preloading %s\n", fspm_cbfs);
+ cbfs_preload(fspm_cbfs);
}
void fsp_memory_init(bool s3wake)
{
struct range_entry prog_ranges[2];
struct fspm_context context;
+ const char *fspm_cbfs = soc_select_fsp_m_cbfs();
struct fsp_load_descriptor fspld = {
- .fsp_prog = PROG_INIT(PROG_REFCODE, CONFIG_FSP_M_CBFS),
+ .fsp_prog = PROG_INIT(PROG_REFCODE, fspm_cbfs),
.arg = &context,
};
struct fsp_header *hdr = &context.header;
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index 094eed4..e543628 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -211,8 +211,9 @@
void fsps_load(void)
{
+ const char *fsps_cbfs = soc_select_fsp_s_cbfs();
struct fsp_load_descriptor fspld = {
- .fsp_prog = PROG_INIT(PROG_REFCODE, CONFIG_FSP_S_CBFS),
+ .fsp_prog = PROG_INIT(PROG_REFCODE, fsps_cbfs),
.alloc = fsps_allocator,
};
struct prog *fsps = &fspld.fsp_prog;
@@ -245,8 +246,9 @@
if (!CONFIG(CBFS_PRELOAD))
return;
- printk(BIOS_DEBUG, "Preloading %s\n", CONFIG_FSP_S_CBFS);
- cbfs_preload(CONFIG_FSP_S_CBFS);
+ const char *fsps_cbfs = soc_select_fsp_s_cbfs();
+ printk(BIOS_DEBUG, "Preloading %s\n", fsps_cbfs);
+ cbfs_preload(fsps_cbfs);
}
void fsp_silicon_init(void)
--
To view, visit https://review.coreboot.org/c/coreboot/+/78344?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: Ied4c6c49a6bdf278238272edd47a2006258be8e5
Gerrit-Change-Number: 78344
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-MessageType: newchange
Attention is currently required from: Brandon Breitenstein, Eran Mitrani, Hannah Williams, Jamie Ryu, Kapil Porwal, Sukumar Ghorai, Tarun.
Caveh Jalali has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78322?usp=email )
Change subject: mb/google/rex/var/rex: Configure PL4 to 64W if battery status is invalid
......................................................................
Patch Set 5:
(1 comment)
File src/mainboard/google/rex/variants/baseboard/rex/ramstage.c:
https://review.coreboot.org/c/coreboot/+/78322/comment/b2be3dd2_9b15ce87 :
PS5, Line 48: battery_status
this is not a good test.
there are multiple bits here that would suggest using the LP profile:
EC_BATT_FLAG_LEVEL_CRITICAL
EC_BATT_FLAG_INVALID_DATA
EC_BATT_FLAG_CUT_OFF
please add a helper function that decodes these and returns a simple
value that suggests which profile to use.
also, the status bits are specific to the EC API so using them should
ideally be limited to the chromeec subsystem.
--
To view, visit https://review.coreboot.org/c/coreboot/+/78322?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: I12fd40abda76c8e7522b06a5aee72665f32ddec8
Gerrit-Change-Number: 78322
Gerrit-PatchSet: 5
Gerrit-Owner: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Reviewer: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Eran Mitrani <mitrani(a)google.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Sukumar Ghorai <sukumar.ghorai(a)intel.com>
Gerrit-Reviewer: Tarun <tstuli(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Attention: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Attention: Eran Mitrani <mitrani(a)google.com>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Sukumar Ghorai <sukumar.ghorai(a)intel.com>
Gerrit-Attention: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Attention: Tarun <tstuli(a)gmail.com>
Gerrit-Comment-Date: Thu, 12 Oct 2023 20:13:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons, Felix Held, Jonathon Hall, Martin L Roth, Matt DeVillier.
Hello Angel Pons, Felix Held, Martin L Roth, Matt DeVillier, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/78343?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by build bot (Jenkins)
Change subject: mb/purism/librem_jsl: Add support for Librem 11
......................................................................
mb/purism/librem_jsl: Add support for Librem 11
This adds support for the Librem 11 tablet, using the ME binary from
the original BIOS and FSP binaries from a Jasper Lake Chromebook.
The following features were tested with PureOS:
* Audio (speakers, microphone, headset jack)
* Cameras
* Display
* Touchscreen and pen
* Keyboard cover, with tablet/laptop mode switch indicated via ACPI
* Power and volume buttons
* USB-C ports (USB 2/3, DP alt mode, PD charging)
* SD card reader
* WLAN
* Bluetooth
* NVMe SSD (socketed)
* Battery state information from EC
* Accelerometer
A UART is accessible with soldering via test points on the mainboard,
documented in the mainboard Kconfig with a toggle to enable it for
coreboot logging.
Change-Id: I545994889ddfb41f56de09b3a42840bccbd7c4aa
Signed-off-by: Jonathon Hall <jonathon.hall(a)puri.sm>
---
A src/mainboard/purism/librem_jsl/Kconfig
A src/mainboard/purism/librem_jsl/Kconfig.name
A src/mainboard/purism/librem_jsl/Makefile.inc
A src/mainboard/purism/librem_jsl/acpi/ac.asl
A src/mainboard/purism/librem_jsl/acpi/battery.asl
A src/mainboard/purism/librem_jsl/acpi/button.asl
A src/mainboard/purism/librem_jsl/acpi/ec.asl
A src/mainboard/purism/librem_jsl/acpi/gpe.asl
A src/mainboard/purism/librem_jsl/acpi/mainboard.asl
A src/mainboard/purism/librem_jsl/acpi/vbtn.asl
A src/mainboard/purism/librem_jsl/board_info.txt
A src/mainboard/purism/librem_jsl/bootblock.c
A src/mainboard/purism/librem_jsl/data.vbt
A src/mainboard/purism/librem_jsl/devicetree.cb
A src/mainboard/purism/librem_jsl/dsdt.asl
A src/mainboard/purism/librem_jsl/gpio.h
A src/mainboard/purism/librem_jsl/hda_verb.c
A src/mainboard/purism/librem_jsl/ramstage.c
A src/mainboard/purism/librem_jsl/romstage.c
A src/mainboard/purism/librem_jsl/spd/isocon8gb.spd.hex
20 files changed, 1,171 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/78343/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/78343?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: I545994889ddfb41f56de09b3a42840bccbd7c4aa
Gerrit-Change-Number: 78343
Gerrit-PatchSet: 2
Gerrit-Owner: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Angel Pons, Felix Held, Jonathon Hall, Martin L Roth, Matt DeVillier.
Jonathon Hall has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78343?usp=email )
Change subject: mb/purism/librem_jsl: Add support for Librem 11
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Write-up about how the memory info was extracted from UEFI firmware: https://puri.sm/posts/librem-11-memory-adventures/
--
To view, visit https://review.coreboot.org/c/coreboot/+/78343?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: I545994889ddfb41f56de09b3a42840bccbd7c4aa
Gerrit-Change-Number: 78343
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 12 Oct 2023 19:56:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Brandon Breitenstein, Caveh Jalali, Eran Mitrani, Hannah Williams, Jamie Ryu, Kapil Porwal, Sukumar Ghorai, Tarun.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78322?usp=email )
Change subject: mb/google/rex/var/rex: Configure PL4 to 64W if battery status is invalid
......................................................................
Patch Set 5:
(4 comments)
File src/mainboard/google/rex/variants/baseboard/rex/ramstage.c:
https://review.coreboot.org/c/coreboot/+/78322/comment/b9f72708_08ab35d9 :
PS5, Line 13: limits
rename this to `performance_efficient_limits`` in one CL
https://review.coreboot.org/c/coreboot/+/78322/comment/bbb5bfa2_d13a1b84 :
PS5, Line 25: p
what is lp ? low_power ?
nit: `power_optimized_limits`
https://review.coreboot.org/c/coreboot/+/78322/comment/09554a2b_3c7e77ae :
PS5, Line 41: google_chromeec_read_battery_status
shouldn't this be < 0 ??
btw, how does google_chromeec_read_battery_status() functionality help you to take the correct decision ?
I assume, what u need is an API to tell you to override PL4 limits if no battery present or dead battery should it named as `google_chromeec_is_battery_enabled()`
```
struct cpu_tdp_power_limits *limits = performance_efficient_limits;
size_t limits_size = ARRAY_SIZE(performance_efficient_limits);
if (google_chromeec_is_battery_enabled(&battery_status) == 0) {
limits = power_optimized_limits;
limits_size = ARRAY_SIZE(power_optimized_limits);
}
variant_update_cpu_power_limits(imits, ARRAY_SIZE(limits_size));
```
https://review.coreboot.org/c/coreboot/+/78322/comment/96b8716f_d38e4fae :
PS5, Line 42: printk(BIOS_ERR, "Failed to read EC battery info\n");
what is the fallback when battery info check is failing ? just continue ?
--
To view, visit https://review.coreboot.org/c/coreboot/+/78322?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: I12fd40abda76c8e7522b06a5aee72665f32ddec8
Gerrit-Change-Number: 78322
Gerrit-PatchSet: 5
Gerrit-Owner: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Reviewer: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Eran Mitrani <mitrani(a)google.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Sukumar Ghorai <sukumar.ghorai(a)intel.com>
Gerrit-Reviewer: Tarun <tstuli(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Attention: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Attention: Eran Mitrani <mitrani(a)google.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Sukumar Ghorai <sukumar.ghorai(a)intel.com>
Gerrit-Attention: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Attention: Tarun <tstuli(a)gmail.com>
Gerrit-Comment-Date: Thu, 12 Oct 2023 19:17:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Nicholas Chin.
Martin L Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78184?usp=email )
Change subject: util/scripts: Add a script to find new users' commits on gerrit
......................................................................
Patch Set 2:
(3 comments)
Patchset:
PS1:
> Needs an entry in `util/scripts/description. […]
Done
File util/scripts/find_new_user_commits.sh:
https://review.coreboot.org/c/coreboot/+/78184/comment/aa118cb8_0ce25a95 :
PS1, Line 74: uploader.name + ", " + .currentPatchSet.uploader
> Here we are using uploader, but the rest of the code implies we are using the owner field. […]
My effort here is really to make sure that people not experienced with coreboot and Gerrit are getting help. I figure the owner is really the important person here. If there's an experienced owner, an inexperienced author is already getting help.
https://review.coreboot.org/c/coreboot/+/78184/comment/ac022ac9_bad38215 :
PS1, Line 100: commit_count="$(ssh -p 29418 "${GERRIT_USER}@${GERRIT_REPO}" gerrit query --format=JSON "limit:6 AND repo:coreboot AND owner:${owner_email} and status:merged" |
: jq -Mr '.owner.name + ", " + .owner.email' |
: grep -v "null\|^," |
: wc -l)"
> I suppose the local git repo could be queried instead to get this information, though that ideally w […]
You're absolutely right - I just reused the query to gerrit since I was already using it to find the new open patches.
--
To view, visit https://review.coreboot.org/c/coreboot/+/78184?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: Ic698798f3fddc77900c8c4e6f8427991bda3f2d1
Gerrit-Change-Number: 78184
Gerrit-PatchSet: 2
Gerrit-Owner: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Attention: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Comment-Date: Thu, 12 Oct 2023 19:08:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-MessageType: comment