Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45234 )
Change subject: drivers/aspeed/common: Reduce severity of `EDID not found` log message
......................................................................
drivers/aspeed/common: Reduce severity of `EDID not found` log message
Servers often run headless, so a missing EDID isn't a problem. However,
we still need to initialize a framebuffer for the BMC's KVM function.
Reduce the log level to BIOS_INFO to avoid confusion.
Change-Id: Ice17bf6fdda0ce34e686dbf8f3a1fa92ba869d7c
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/drivers/aspeed/common/ast_mode_corebootfb.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/45234/1
diff --git a/src/drivers/aspeed/common/ast_mode_corebootfb.c b/src/drivers/aspeed/common/ast_mode_corebootfb.c
index 8418b01..92c8ada 100644
--- a/src/drivers/aspeed/common/ast_mode_corebootfb.c
+++ b/src/drivers/aspeed/common/ast_mode_corebootfb.c
@@ -96,7 +96,11 @@
ast_software_i2c_read(ast, raw);
if (decode_edid(raw, sizeof(raw), edid) != EDID_CONFORMANT) {
- dev_err(dev->pdev, "Failed to decode EDID\n");
+ /*
+ * Servers often run headless, so a missing EDID is not an error.
+ * We still need to initialize a framebuffer for KVM, though.
+ */
+ dev_dbg(dev->pdev, "Failed to decode EDID\n");
printk(BIOS_DEBUG, "Assuming VGA for KVM\n");
memset(edid, 0, sizeof(*edid));
--
To view, visit https://review.coreboot.org/c/coreboot/+/45234
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ice17bf6fdda0ce34e686dbf8f3a1fa92ba869d7c
Gerrit-Change-Number: 45234
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Masanori Ogino has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/29194 )
Change subject: security/tpm: Add generalized ACPI table generation
......................................................................
Patch Set 3:
This change is ready for review.
--
To view, visit https://review.coreboot.org/c/coreboot/+/29194
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2afdf4872566353284ab7734205a3bea738a6e0e
Gerrit-Change-Number: 29194
Gerrit-PatchSet: 3
Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Masanori Ogino <mogino(a)acm.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Wed, 16 Sep 2020 07:42:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45232 )
Change subject: drivers/spi/tpm: Improve error checking
......................................................................
drivers/spi/tpm: Improve error checking
This adds error checking in paths that previously ignored TPM
communication errors. We hit this case occasionally during "Checking
cr50 for pending updates"; previously we would go down this path and
eventually time out using MAX_STATUS_TIMEOUT, which is 2 minutes.
Now, we detect the failure and return with an error indication instead
of timing out after a long time. The root cause of the communication
error is an open issue.
BUG=b:168090038
TEST=booted on volteer, observed error handling when
"Checking cr50 for pending updates" fails.
Signed-off-by: Caveh Jalali <caveh(a)chromium.org>
Change-Id: Ia8a1202000abce1857ee694b06b1478e6b045069
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45232
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Jes Klinke <jbk(a)chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
---
M src/drivers/spi/tpm/tpm.c
1 file changed, 39 insertions(+), 17 deletions(-)
Approvals:
build bot (Jenkins): Verified
Tim Wawrzynczak: Looks good to me, approved
Jes Klinke: Looks good to me, approved
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index 66db671..d65decd 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -348,7 +348,7 @@
return tpm2_read_reg(TPM_STS_REG, status, sizeof(*status));
}
-static int write_tpm_sts(uint32_t status)
+static int __must_check write_tpm_sts(uint32_t status)
{
return tpm2_write_reg(TPM_STS_REG, &status, sizeof(status));
}
@@ -688,9 +688,9 @@
* Transfer requested number of bytes to or from TPM FIFO, accounting for the
* current burst count value.
*/
-static void fifo_transfer(size_t transfer_size,
- union fifo_transfer_buffer buffer,
- enum fifo_transfer_direction direction)
+static int __must_check fifo_transfer(size_t transfer_size,
+ union fifo_transfer_buffer buffer,
+ enum fifo_transfer_direction direction)
{
size_t transaction_size;
size_t burst_count;
@@ -711,18 +711,23 @@
*/
transaction_size = MIN(transaction_size, 64);
- if (direction == fifo_receive)
- tpm2_read_reg(TPM_DATA_FIFO_REG,
- buffer.rx_buffer + handled_so_far,
- transaction_size);
- else
- tpm2_write_reg(TPM_DATA_FIFO_REG,
- buffer.tx_buffer + handled_so_far,
- transaction_size);
+ if (direction == fifo_receive) {
+ if (!tpm2_read_reg(TPM_DATA_FIFO_REG,
+ buffer.rx_buffer + handled_so_far,
+ transaction_size))
+ return 0;
+ } else {
+ if (!tpm2_write_reg(TPM_DATA_FIFO_REG,
+ buffer.tx_buffer + handled_so_far,
+ transaction_size))
+ return 0;
+ }
handled_so_far += transaction_size;
} while (handled_so_far != transfer_size);
+
+ return 1;
}
size_t tpm2_process_command(const void *tpm2_command, size_t command_size,
@@ -755,7 +760,10 @@
}
/* Let the TPM know that the command is coming. */
- write_tpm_sts(TPM_STS_COMMAND_READY);
+ if (!write_tpm_sts(TPM_STS_COMMAND_READY)) {
+ printk(BIOS_ERR, "TPM_STS_COMMAND_READY failed\n");
+ return 0;
+ }
/*
* TPM commands and responses written to and read from the FIFO
@@ -769,10 +777,17 @@
* burst count or the maximum PDU size, whatever is smaller.
*/
fifo_buffer.tx_buffer = cmd_body;
- fifo_transfer(command_size, fifo_buffer, fifo_transmit);
+ if (!fifo_transfer(command_size, fifo_buffer, fifo_transmit)) {
+ printk(BIOS_ERR, "fifo_transfer %zd command bytes failed\n",
+ command_size);
+ return 0;
+ }
/* Now tell the TPM it can start processing the command. */
- write_tpm_sts(TPM_STS_GO);
+ if (!write_tpm_sts(TPM_STS_GO)) {
+ printk(BIOS_ERR, "TPM_STS_GO failed\n");
+ return 0;
+ }
/* Now wait for it to report that the response is ready. */
expected_status_bits = TPM_STS_VALID | TPM_STS_DATA_AVAIL;
@@ -815,7 +830,11 @@
*/
bytes_to_go = payload_size - 1 - HEADER_SIZE;
fifo_buffer.rx_buffer = rsp_body + HEADER_SIZE;
- fifo_transfer(bytes_to_go, fifo_buffer, fifo_receive);
+ if (!fifo_transfer(bytes_to_go, fifo_buffer, fifo_receive)) {
+ printk(BIOS_ERR, "fifo_transfer %zd receive bytes failed\n",
+ bytes_to_go);
+ return 0;
+ }
/* Verify that there is still data to read. */
read_tpm_sts(&status);
@@ -840,7 +859,10 @@
}
/* Move the TPM back to idle state. */
- write_tpm_sts(TPM_STS_COMMAND_READY);
+ if (!write_tpm_sts(TPM_STS_COMMAND_READY)) {
+ printk(BIOS_ERR, "TPM_STS_COMMAND_READY failed\n");
+ return 0;
+ }
return payload_size;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/45232
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia8a1202000abce1857ee694b06b1478e6b045069
Gerrit-Change-Number: 45232
Gerrit-PatchSet: 4
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Jes Klinke <jbk(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Vadim Bendebury <vbendeb(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
Rob Barnes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45177 )
Change subject: soc/amd/picasso: Adjust for memory Mhz fraction
......................................................................
soc/amd/picasso: Adjust for memory Mhz fraction
Memory speed is given as an integer, but it some cases it has an
implicit fractional speed. Specifically, speeds ending in 33 are
implicitly 33.333 and speeds ending in 67 are implicitly 66.666.
So when multiplying by 2 to get MT/s, the result needs to be
rounded up or down by one to account for this implicit fraction.
BUG=b:167155849
TEST=None
Signed-off-by: Rob Barnes <robbarnes(a)google.com>
Change-Id: Icc77c21932c68ee9f0ff0b8e35ae7b1a3732b322
---
M src/soc/amd/picasso/dmi.c
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/45177/1
diff --git a/src/soc/amd/picasso/dmi.c b/src/soc/amd/picasso/dmi.c
index 5189cd6..33c9e22 100644
--- a/src/soc/amd/picasso/dmi.c
+++ b/src/soc/amd/picasso/dmi.c
@@ -30,10 +30,20 @@
/**
* TYPE17_DMI_INFO holds speed in MHz.
* Change to MT/s by multiplying by 2.
+ * Round up/down by 1 to adjust for implict clock fraction.
+ * e.g. 1333 Mhz == 1333.333 Mhz == 2666.666 MT/s == 26667 MT/s
*/
dimm->configured_speed_mts = 2 * dmi17->ConfigSpeed;
+ if (dimm->configured_speed_mts % 100 == 66)
+ dimm->configured_speed_mts += 1;
+ else if (dimm->configured_speed_mts % 100 == 34)
+ dimm->configured_speed_mts -= 1;
dimm->max_speed_mts = 2 * dmi17->Speed;
+ if (dimm->max_speed_mts % 100 == 66)
+ dimm->max_speed_mts += 1;
+ else if (dimm->max_speed_mts % 100 == 34)
+ dimm->max_speed_mts -= 1;
dimm->rank_per_dimm = dmi17->Attributes;
--
To view, visit https://review.coreboot.org/c/coreboot/+/45177
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icc77c21932c68ee9f0ff0b8e35ae7b1a3732b322
Gerrit-Change-Number: 45177
Gerrit-PatchSet: 1
Gerrit-Owner: Rob Barnes <robbarnes(a)google.com>
Gerrit-MessageType: newchange