Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43870 )
Change subject: [TESTONLY] build with TRACE=y
......................................................................
[TESTONLY] build with TRACE=y
Change-Id: Iee20e3c1fc31aba704d813f909c39986df3e2c29
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/Kconfig
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/43870/1
diff --git a/src/Kconfig b/src/Kconfig
index a4c2fa6..fb7cd2d 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -1055,7 +1055,7 @@
config TRACE
bool "Trace function calls"
- default n
+ default y
help
If enabled, every function will print information to console once
the function is entered. The syntax is ~0xaaaabbbb(0xccccdddd)
--
To view, visit https://review.coreboot.org/c/coreboot/+/43870
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iee20e3c1fc31aba704d813f909c39986df3e2c29
Gerrit-Change-Number: 43870
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange
Meera Ravindranath has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38682 )
Change subject: src/soc/tigerlake: Define and use a Kconfig for no of USB ports.
......................................................................
src/soc/tigerlake: Define and use a Kconfig for no of USB ports.
BUG=None
BRANCH=None
TEST=Compilation for jasper lake board is working
Change-Id: Ia8e88e92989fe40d7bd1c28942e005cb0d862fcb
Signed-off-by: Meera Ravindranath <meera.ravindranath(a)intel.com>
---
M src/soc/intel/tigerlake/Kconfig
M src/soc/intel/tigerlake/fsp_params_jsl.c
M src/soc/intel/tigerlake/fsp_params_tgl.c
3 files changed, 14 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/38682/1
diff --git a/src/soc/intel/tigerlake/Kconfig b/src/soc/intel/tigerlake/Kconfig
index cef1fd0..f50e40e 100644
--- a/src/soc/intel/tigerlake/Kconfig
+++ b/src/soc/intel/tigerlake/Kconfig
@@ -156,6 +156,16 @@
default 3 if SOC_INTEL_JASPERLAKE
default 4 if SOC_INTEL_TIGERLAKE
+config SOC_INTEL_USB2_DEV_MAX
+ int
+ default 8 if SOC_INTEL_JASPERLAKE
+ default 10 if SOC_INTEL_TIGERLAKE
+
+config SOC_INTEL_USB3_DEV_MAX
+ int
+ default 6 if SOC_INTEL_JASPERLAKE
+ default 4 if SOC_INTEL_TIGERLAKE
+
config SOC_INTEL_I2C_DEV_MAX
int
default 6
diff --git a/src/soc/intel/tigerlake/fsp_params_jsl.c b/src/soc/intel/tigerlake/fsp_params_jsl.c
index 8046b2e..d5d623b 100644
--- a/src/soc/intel/tigerlake/fsp_params_jsl.c
+++ b/src/soc/intel/tigerlake/fsp_params_jsl.c
@@ -106,7 +106,7 @@
memset(params->PcieRpPmSci, 0, sizeof(params->PcieRpPmSci));
/* USB configuration */
- for (i = 0; i < ARRAY_SIZE(config->usb2_ports); i++) {
+ for (i = 0; i < CONFIG_SOC_INTEL_USB2_DEV_MAX; i++) {
params->PortUsb20Enable[i] = config->usb2_ports[i].enable;
params->Usb2OverCurrentPin[i] = config->usb2_ports[i].ocpin;
@@ -116,7 +116,7 @@
params->Usb2PhyPehalfbit[i] = config->usb2_ports[i].pre_emp_bit;
}
- for (i = 0; i < ARRAY_SIZE(config->usb3_ports); i++) {
+ for (i = 0; i < CONFIG_SOC_INTEL_USB3_DEV_MAX; i++) {
params->PortUsb30Enable[i] = config->usb3_ports[i].enable;
params->Usb3OverCurrentPin[i] = config->usb3_ports[i].ocpin;
diff --git a/src/soc/intel/tigerlake/fsp_params_tgl.c b/src/soc/intel/tigerlake/fsp_params_tgl.c
index 305748e..f027ee0 100644
--- a/src/soc/intel/tigerlake/fsp_params_tgl.c
+++ b/src/soc/intel/tigerlake/fsp_params_tgl.c
@@ -89,7 +89,7 @@
params->IomTypeCPortPadCfg[i] = 0x09000000;
/* USB */
- for (i = 0; i < ARRAY_SIZE(config->usb2_ports); i++) {
+ for (i = 0; i < CONFIG_SOC_INTEL_USB2_DEV_MAX; i++) {
params->PortUsb20Enable[i] = config->usb2_ports[i].enable;
params->Usb2OverCurrentPin[i] = config->usb2_ports[i].ocpin;
params->Usb2PhyPetxiset[i] = config->usb2_ports[i].pre_emp_bias;
@@ -98,7 +98,7 @@
params->Usb2PhyPehalfbit[i] = config->usb2_ports[i].pre_emp_bit;
}
- for (i = 0; i < ARRAY_SIZE(config->usb3_ports); i++) {
+ for (i = 0; i < CONFIG_SOC_INTEL_USB3_DEV_MAX; i++) {
params->PortUsb30Enable[i] = config->usb3_ports[i].enable;
params->Usb3OverCurrentPin[i] = config->usb3_ports[i].ocpin;
if (config->usb3_ports[i].tx_de_emp) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/38682
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia8e88e92989fe40d7bd1c28942e005cb0d862fcb
Gerrit-Change-Number: 38682
Gerrit-PatchSet: 1
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-MessageType: newchange
Hello Aaron Durbin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/46834
to review the following change.
Change subject: x86: Put bootblock startup code into .text._start section
......................................................................
x86: Put bootblock startup code into .text._start section
The initial bootblock assembly code on x86 is just put into the .text
section, which just happens to come before all the individual .text.*
function sections in the program.ld script. So it tends to be at the
start of the image, bit if you inserted another linker script section
with contents before .text, it would cause a problem. (I'm not sure if
it's an architectural requirement for _start16bit to come at the start
of the image, but at least its 4K alignment requirement would waste a
lot of space if it didn't.)
This patch moves the section to .text._start which is the name other
architectures use for the code they want in the very front of the image
and which is listed first in program.ld.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: Ia84e6e33ec29584d356e226e8fdcb8c9334d49af
---
M src/arch/x86/bootblock_crt0.S
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/46834/1
diff --git a/src/arch/x86/bootblock_crt0.S b/src/arch/x86/bootblock_crt0.S
index 3f41464..82ae97f 100644
--- a/src/arch/x86/bootblock_crt0.S
+++ b/src/arch/x86/bootblock_crt0.S
@@ -10,7 +10,7 @@
#include <cpu/x86/cr.h>
-.section .text
+.section .text._start
/*
* Include the old code for reset vector and protected mode entry. That code has
--
To view, visit https://review.coreboot.org/c/coreboot/+/46834
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia84e6e33ec29584d356e226e8fdcb8c9334d49af
Gerrit-Change-Number: 46834
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-MessageType: newchange
Hello Patrick Georgi, Aaron Durbin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/41119
to review the following change.
Change subject: cbfstool: Hide hash printing behind -v and add to parseable output
......................................................................
cbfstool: Hide hash printing behind -v and add to parseable output
With the upcoming introduction of CBFS verification, a lot more CBFS
files will have hashes. The current cbfstool default of always printing
hash attributes when they exist will make cbfstool print very messy.
Therefore, hide hash attribute output unless the user passed -v.
It would also be useful to be able to get file attributes like hashes in
machine parseable output. Unfortunately, our machine parseable format
(-k) doesn't really seem designed to be extensible. To avoid breaking
older parsers, this patch adds new attribute output behind -v (which
hopefully no current users pass since it doesn't change anything for -k
at the moment). With this patch cbfstool print -k -v may print an
arbitrary amount of extra tokens behind the predefined ones on a file
line. Tokens always begin with an identifying string (e.g. 'hash'),
followed by extra fields that should be separated by colons. Multiple
tokens are separated by the normal separator character (tab).
cbfstool print -k -v may also print additional information that applies
to the whole CBFS on separate lines. These lines will always begin with
a '[' (which hopefully nobody would use as a CBFS filename character
although we technically have no restrictions at the moment).
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I9e16cda393fa0bc1d8734d4b699e30e2ae99a36d
---
M util/cbfstool/cbfs_image.c
M util/cbfstool/cbfs_image.h
M util/cbfstool/cbfstool.c
3 files changed, 41 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/41119/1
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 7942b27..3a83694 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -1503,6 +1503,9 @@
decompressed_size
);
+ if (!verbose)
+ return 0;
+
struct cbfs_file_attr_hash *attr = NULL;
while ((attr = cbfs_file_get_next_hash(entry, attr)) != NULL) {
size_t hash_len = vb2_digest_size(attr->hash.algo);
@@ -1522,9 +1525,6 @@
free(hash_str);
}
- if (!verbose)
- return 0;
-
DEBUG(" cbfs_file=0x%x, offset=0x%x, content_address=0x%x+0x%x\n",
cbfs_get_entry_addr(image, entry), ntohl(entry->offset),
cbfs_get_entry_addr(image, entry) + ntohl(entry->offset),
@@ -1587,21 +1587,45 @@
fprintf(fp, "%s%s", type, sep);
fprintf(fp, "0x%zx%s", metadata_size, sep);
fprintf(fp, "0x%zx%s", data_size, sep);
- fprintf(fp, "0x%zx\n", metadata_size + data_size);
+ fprintf(fp, "0x%zx", metadata_size + data_size);
+
+ if (verbose) {
+ unsigned int decompressed_size = 0;
+ unsigned int compression = cbfs_file_get_compression_info(entry,
+ &decompressed_size);
+ if (compression != CBFS_COMPRESS_NONE)
+ fprintf(fp, "%scomp:%s:0x%x", sep, lookup_name_by_type(
+ types_cbfs_compression, compression, "????"),
+ decompressed_size);
+
+ struct cbfs_file_attr_hash *attr = NULL;
+ while ((attr = cbfs_file_get_next_hash(entry, attr)) != NULL) {
+ size_t hash_len = vb2_digest_size(attr->hash.algo);
+ if (!hash_len)
+ continue;
+ char *hash_str = bintohex(attr->hash.raw, hash_len);
+ int valid = vb2_hash_verify(CBFS_SUBHEADER(entry),
+ ntohl(entry->len), &attr->hash) == VB2_SUCCESS;
+ fprintf(fp, "%shash:%s:%s:%s", sep,
+ vb2_get_hash_algorithm_name(attr->hash.algo),
+ hash_str, valid ? "valid" : "invalid");
+ free(hash_str);
+ }
+ }
+ fprintf(fp, "\n");
return 0;
}
-int cbfs_print_directory(struct cbfs_image *image)
+void cbfs_print_directory(struct cbfs_image *image)
{
if (cbfs_is_legacy_cbfs(image))
cbfs_print_header_info(image);
printf("%-30s %-10s %-12s Size Comp\n", "Name", "Offset", "Type");
cbfs_legacy_walk(image, cbfs_print_entry_info, NULL);
- return 0;
}
-int cbfs_print_parseable_directory(struct cbfs_image *image)
+void cbfs_print_parseable_directory(struct cbfs_image *image)
{
size_t i;
const char *header[] = {
@@ -1618,7 +1642,6 @@
fprintf(stdout, "%s%s", header[i], sep);
fprintf(stdout, "%s\n", header[i]);
cbfs_legacy_walk(image, cbfs_print_parseable_entry_info, stdout);
- return 0;
}
int cbfs_merge_empty_entry(struct cbfs_image *image, struct cbfs_file *entry,
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h
index a3a6fb9..d633fee 100644
--- a/util/cbfstool/cbfs_image.h
+++ b/util/cbfstool/cbfs_image.h
@@ -174,8 +174,8 @@
int cbfs_is_valid_entry(struct cbfs_image *image, struct cbfs_file *entry);
/* Print CBFS component information. */
-int cbfs_print_directory(struct cbfs_image *image);
-int cbfs_print_parseable_directory(struct cbfs_image *image);
+void cbfs_print_directory(struct cbfs_image *image);
+void cbfs_print_parseable_directory(struct cbfs_image *image);
int cbfs_print_header_info(struct cbfs_image *image);
int cbfs_print_entry_info(struct cbfs_image *image, struct cbfs_file *entry,
void *arg);
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index f97745e..6015603 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -1087,12 +1087,16 @@
if (cbfs_image_from_buffer(&image, param.image_region,
param.headeroffset))
return 1;
- if (param.machine_parseable)
- return cbfs_print_parseable_directory(&image);
- else {
+ if (param.machine_parseable) {
+ if (verbose)
+ printf("[FMAP REGION]\t%s\n", param.region_name);
+ cbfs_print_parseable_directory(&image);
+ } else {
printf("FMAP REGION: %s\n", param.region_name);
- return cbfs_print_directory(&image);
+ cbfs_print_directory(&image);
}
+
+ return 0;
}
static int cbfs_extract(void)
--
To view, visit https://review.coreboot.org/c/coreboot/+/41119
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9e16cda393fa0bc1d8734d4b699e30e2ae99a36d
Gerrit-Change-Number: 41119
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Hello Patrick Georgi, Aaron Durbin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/41118
to review the following change.
Change subject: cbfstool: Rename cbfs_walk() to cbfs_legacy_walk()
......................................................................
cbfstool: Rename cbfs_walk() to cbfs_legacy_walk()
This function name clashes with cbfs_walk() in the new commonlib CBFS
stack, so rename it to cbfs_legacy_walk(). While we could replace it
with the new commonlib implementation, it still has support for certain
features in the deprecated pre-FMAP CBFSes (such as non-standard header
alignment), which are needed to handle old files but probably not
something we'd want to burden the commonlib implementation with. So
until we decide to deprecate support for those files from cbfstool as
well, it seems easier to just keep the existing implementation here.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I37c7e7aa9a206372817d8d0b8f66d72bafb4f346
---
M util/cbfstool/cbfs_image.c
M util/cbfstool/cbfs_image.h
2 files changed, 13 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/41118/1
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 035b196..7942b27 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -469,7 +469,7 @@
cbfs_create_empty_entry(entry, CBFS_TYPE_NULL,
last_entry_size, "");
/* If the last entry was an empty file, merge them. */
- cbfs_walk(&image, cbfs_merge_empty_entry, NULL);
+ cbfs_legacy_walk(&image, cbfs_merge_empty_entry, NULL);
}
return 0;
@@ -621,7 +621,7 @@
prev_size, "");
/* Merge any potential empty entries together. */
- cbfs_walk(image, cbfs_merge_empty_entry, NULL);
+ cbfs_legacy_walk(image, cbfs_merge_empty_entry, NULL);
/*
* Since current switched to an empty file keep track of it.
@@ -760,7 +760,7 @@
// Merge empty entries.
DEBUG("(trying to merge empty entries...)\n");
- cbfs_walk(image, cbfs_merge_empty_entry, NULL);
+ cbfs_legacy_walk(image, cbfs_merge_empty_entry, NULL);
for (entry = cbfs_find_first_entry(image);
entry && cbfs_is_valid_entry(image, entry);
@@ -1380,7 +1380,7 @@
DEBUG("cbfs_remove_entry: Removed %s @ 0x%x\n",
entry->filename, cbfs_get_entry_addr(image, entry));
entry->type = htonl(CBFS_TYPE_DELETED);
- cbfs_walk(image, cbfs_merge_empty_entry, NULL);
+ cbfs_legacy_walk(image, cbfs_merge_empty_entry, NULL);
return 0;
}
@@ -1597,7 +1597,7 @@
if (cbfs_is_legacy_cbfs(image))
cbfs_print_header_info(image);
printf("%-30s %-10s %-12s Size Comp\n", "Name", "Offset", "Type");
- cbfs_walk(image, cbfs_print_entry_info, NULL);
+ cbfs_legacy_walk(image, cbfs_print_entry_info, NULL);
return 0;
}
@@ -1617,7 +1617,7 @@
for (i = 0; i < ARRAY_SIZE(header) - 1; i++)
fprintf(stdout, "%s%s", header[i], sep);
fprintf(stdout, "%s\n", header[i]);
- cbfs_walk(image, cbfs_print_parseable_entry_info, stdout);
+ cbfs_legacy_walk(image, cbfs_print_parseable_entry_info, stdout);
return 0;
}
@@ -1660,7 +1660,7 @@
return 0;
}
-int cbfs_walk(struct cbfs_image *image, cbfs_entry_callback callback,
+int cbfs_legacy_walk(struct cbfs_image *image, cbfs_entry_callback callback,
void *arg)
{
int count = 0;
@@ -1970,7 +1970,7 @@
need_len = metadata_size + size;
// Merge empty entries to build get max available space.
- cbfs_walk(image, cbfs_merge_empty_entry, NULL);
+ cbfs_legacy_walk(image, cbfs_merge_empty_entry, NULL);
/* Three cases of content location on memory page:
* case 1.
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h
index 6ff0746..a3a6fb9 100644
--- a/util/cbfstool/cbfs_image.h
+++ b/util/cbfstool/cbfs_image.h
@@ -129,16 +129,18 @@
int32_t cbfs_locate_entry(struct cbfs_image *image, size_t size,
size_t page_size, size_t align, size_t metadata_size);
-/* Callback function used by cbfs_walk.
+/* Callback function used by cbfs_legacy_walk.
* Returns 0 on success, or non-zero to stop further iteration. */
typedef int (*cbfs_entry_callback)(struct cbfs_image *image,
struct cbfs_file *file,
void *arg);
/* Iterates through all entries in CBFS image, and invoke with callback.
- * Stops if callback returns non-zero values.
+ * Stops if callback returns non-zero values. Unlike the commonlib cbfs_walk(),
+ * this can deal with different alignments in legacy CBFS (with master header).
* Returns number of entries invoked. */
-int cbfs_walk(struct cbfs_image *image, cbfs_entry_callback callback, void *arg);
+int cbfs_legacy_walk(struct cbfs_image *image, cbfs_entry_callback callback,
+ void *arg);
/* Primitive CBFS utilities */
--
To view, visit https://review.coreboot.org/c/coreboot/+/41118
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I37c7e7aa9a206372817d8d0b8f66d72bafb4f346
Gerrit-Change-Number: 41118
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange