Leroy P Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14113
-gerrit
commit e3fe47ed9d828198c6dbe0c27c5c9b1d2d3f8d5c
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sun Jan 31 12:19:13 2016 -0800
Documentation: x86 MTRR setup, TempRamExit and MTRR loading
Document how to test TempRamExit and verify the MTRR setup and loading.
TEST=None
Change-Id: I57a604fa139edac4b05453547d3caf185db491e0
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
---
Documentation/Intel/development.html | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/Documentation/Intel/development.html b/Documentation/Intel/development.html
index a36acaa..a2ba278 100644
--- a/Documentation/Intel/development.html
+++ b/Documentation/Intel/development.html
@@ -97,6 +97,7 @@
<li>Disable the
<a target="_blank" href="SoC/soc.html#DisableShadowRom">Shadow ROM</a>
</li>
+ <li>Enable CONFIG_DISPLAY_MTRRS to verify the MTRR configuration</li>
<li>
Implement the .init routine for the
<a target="_blank" href="SoC/soc.html#ChipOperations">chip operations</a>
@@ -115,6 +116,7 @@
Implement the
<a target="_blank" href="SoC/soc.html#MemoryMap">memory map</a>
</li>
+ <li>coreboot should now attempt to load the payload</li>
</ol>
@@ -185,6 +187,20 @@
<td>coreboot displays the memory map correctly during the BS_WRITE_TABLES state</td>
</tr>
<tr>
+ <td>MTRRs</td>
+ <td>
+ Set values: src/drivers/intel/fsp1_1/stack.c/<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/inte…">setup_stack_and_mtrrs</a><br>
+ Load values: src/drivers/intel/fsp1_1/<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/inte…">after_raminit.S</a>
+ </td>
+ <td>Set: Post code 0x91
+ (<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/cons…">POST_FSP_TEMP_RAM_EXIT</a>)
+ is displayed by
+ <a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/inte…">after_raminit.S</a><br>
+ Load: Post code 0x3C is displayed by
+ <a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/inte…">after_raminit.S</a><br>
+ and CONFIG_DISPLAY_MTRRS=y displays the correct memory regions</td>
+ </tr>
+ <tr>
<td>PCI Device Support</td>
<td>Implement a PCI <a target="_blank" href="SoC/soc.html#DeviceDrivers">device driver</a></td>
<td>The device is detected by coreboot and usable by the payload</td>
Leroy P Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14112
-gerrit
commit c55a0cb91caf68b3f4d5cf1a53ac346017ef037c
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sun Jan 31 11:28:06 2016 -0800
Documentation: x86 shadow ROM disable
Add documentation on disabling the SPI flash which is mapped (shadowed)
into the x86 address space at 0x000e0000 - 0x000fffff.
TEST=None
Change-Id: I1d94d84c6cade97886a3274a7e7403f7b3275c5a
Signed-off-by: Lee Leahy <Leroy.P.Leahy(a)intel.com>
---
Documentation/Intel/SoC/soc.html | 14 +++++++++++++-
Documentation/Intel/development.html | 12 +++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/Documentation/Intel/SoC/soc.html b/Documentation/Intel/SoC/soc.html
index 2380cdf..8f1d75c 100644
--- a/Documentation/Intel/SoC/soc.html
+++ b/Documentation/Intel/SoC/soc.html
@@ -24,6 +24,7 @@
<li>Enable <a href="#SerialOutput">Serial Output"</a></li>
<li>Get the <a href="#PreviousSleepState">Previous Sleep State</a></li>
<li>Add the <a href="#MemoryInit">MemoryInit</a> Support</li>
+ <li>Disable the <a href="#DisableShadowRom">Shadow ROM</a></li>
</ol>
</li>
<li><a href="#Ramstage">Ramstage</a>
@@ -389,6 +390,17 @@ Use the following steps to debug the call to TempRamInit:
</ol>
+<h2><a name="DisableShadowRom">Disable Shadow ROM</a></h2>
+<p>
+ A shadow of the SPI flash part is mapped from 0x000e0000 to 0x000fffff.
+ This shadow needs to be disabled to allow RAM to properly respond to
+ this address range.
+</p>
+<ol>
+ <li>Edit romstage/romstage.c and add the soc_after_ram_init routine</li>
+</ol>
+
+
<hr>
<h1><a name="Ramstage">Ramstage</a></h1>
@@ -717,6 +729,6 @@ Use the following steps to debug the call to TempRamInit:
</table>
<hr>
-<p>Modified: 28 February 2016</p>
+<p>Modified: 4 March 2016</p>
</body>
</html>
\ No newline at end of file
diff --git a/Documentation/Intel/development.html b/Documentation/Intel/development.html
index 7b82321..a36acaa 100644
--- a/Documentation/Intel/development.html
+++ b/Documentation/Intel/development.html
@@ -94,6 +94,9 @@
</li>
</ol>
</li>
+ <li>Disable the
+ <a target="_blank" href="SoC/soc.html#DisableShadowRom">Shadow ROM</a>
+ </li>
<li>
Implement the .init routine for the
<a target="_blank" href="SoC/soc.html#ChipOperations">chip operations</a>
@@ -198,6 +201,13 @@
for the PCI devices on the bus.
</td>
</tr>
+ <tr>
+ <td>ROM Shadow<br>0x000E0000 - 0x000FFFFF</td>
+ <td>
+ Disable: src/soc/<Vendor>/<Chip Family>/romstage/romstage.c/<a target="_blank" href="SoC/soc.html#DisableShadowRom">soc_after_ram_init routine</a>
+ </td>
+ <td>Operates as RAM: Writes followed by a read to the 0x000E0000 - 0x000FFFFF region returns the value written</td>
+ </tr>
<tr bgcolor="#c0ffc0">
@@ -346,6 +356,6 @@
<hr>
-<p>Modified: 24 February 2016</p>
+<p>Modified: 4 March 2016</p>
</body>
</html>
\ No newline at end of file
Leroy P Leahy (leroy.p.leahy(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14109
-gerrit
commit 9c219dce6ad58fff9452a15c08dbd9ac09f66c4f
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Thu Mar 3 15:30:48 2016 -0800
mainboard/intel/galileo: Enable SPI controllers
Enable the SPI controllers on the Quark SoC.
Testing on Galileo:
* Edit the src/mainboard/intel/galileo/Makefile.inc file:
* Add "select ADD_FSP_PDAT_FILE"
* Add "select ADD_FSP_RAW_BIN"
* Add "select ADD_RMU_FILE"
* Place the FSP.bin file in the location specified by CONFIG_FSP_FILE
* Place the pdat.bin files in the location specified by
CONFIG_FSP_PDAT_FILE
* Place the rmu.bin file in the location specified by CONFIG_RMU_FILE
* Build EDK2 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc to generate
UEFIPAYLOAD.fd
* Load the SPI driver stack
* Testing is successful when the time is able to be displayed on a
set of seven-segment displays controlled by a Maxim MAX6950 SPI
display controller.
Change-Id: Ic9c4575730c5a9a27cf9a38a41e82d8462467f3f
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
---
src/mainboard/intel/galileo/devicetree.cb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/intel/galileo/devicetree.cb b/src/mainboard/intel/galileo/devicetree.cb
index c171aa0..05edffc 100644
--- a/src/mainboard/intel/galileo/devicetree.cb
+++ b/src/mainboard/intel/galileo/devicetree.cb
@@ -37,8 +37,8 @@ chip soc/intel/quark
device pci 14.5 on end # 8086 0936 - HSUART 1
device pci 14.6 off end # 8086 0937 - 10/100 Ethernet MAC 0
device pci 14.7 off end # 8086 0937 - 10/100 Ethernet MAC 1
- device pci 15.0 off end # 8086 0935 - SPI controller 0
- device pci 15.1 off end # 8086 0935 - SPI controller 1
+ device pci 15.0 on end # 8086 0935 - SPI controller 0
+ device pci 15.1 on end # 8086 0935 - SPI controller 1
device pci 15.2 off end # 8086 0934 - I2C/GPIO controller
device pci 17.0 on end # 8086 11C3 - PCIe Root Port 0
device pci 17.1 off end # 8086 11C4 - PCIe Root Port 1
the following patch was just integrated into master:
commit b4e5c5eb1efd9eb6141e2996845236e154a6ec0d
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Sun Mar 13 16:01:04 2016 -0700
cpu/x86: compile earlymtrr.c code for romstage as well
In order to make this work earlymtrr.c needed to be removed
from intel/truxton/romstage.c. It's not a ROMCC board so
there's no reason to be including .c files.
Change-Id: If4f5494a53773454b97b90fb856f7e52cadb3f44
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
Reviewed-on: https://review.coreboot.org/14094
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
See https://review.coreboot.org/14094 for details.
-gerrit
the following patch was just integrated into master:
commit 5fa5da1083d064e533b570e67370a7a477f02965
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Mar 15 09:08:34 2016 -0500
cpu/x86/mtrr: remove early_mtrr_* functions
I see no user of any of this code. Remove it.
Change-Id: I776cd3d9ac6578ecb0fe6d98f15611e4463afb7a
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://review.coreboot.org/14098
Tested-by: build bot (Jenkins)
Reviewed-by: Andrey Petrov <andrey.petrov(a)intel.com>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
See https://review.coreboot.org/14098 for details.
-gerrit
the following patch was just integrated into master:
commit 264bf0b27e6202dfca27c285c9dde10d08b8f023
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Mar 15 09:05:54 2016 -0500
cpu/x86/mtrr: move cache_ramstage() to its only user
The Intel i3100 northbridge code is the only user of
cache_ramstage(). Therefore, place it next to the sole
consumer.
Change-Id: If15fb8d84f98dce7f4de9e089ec33035622d8f74
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://review.coreboot.org/14097
Tested-by: build bot (Jenkins)
Reviewed-by: Andrey Petrov <andrey.petrov(a)intel.com>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
See https://review.coreboot.org/14097 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14107
-gerrit
commit 15438fc5450a31863a233f8d53f158b497abee3d
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Mon Mar 14 09:32:08 2016 -0700
vboot: Handle S3 resume path for TPM initialization
When doing verification of memory init code in verstage vboot
should issue a TPM_Startup(ST_STATE) instead of TPM_Startup(ST_CLEAR)
in order to preserve the flags in TPM_STCLEAR_FLAGS which include
things like physical presence. In doing so we can also skip the rest
of the TPM init work in this function in the S3 resume path.
BUG=chrome-os-partner:50633
BRANCH=glados
TEST=S3 resume on chell and ensure TPM is resumed instead of being
cleared and that 'tpmc getvf|getpf|getf' does not show any difference
in flags between boot and resume.
Change-Id: I7a48eaf7f57d2bc6ebc182178cbe60ceb2ad8863
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: f059f39a0f5c2f21e564b9554efacf26a41ad794
Original-Change-Id: I647869202d2f04328764155d3de4cad9edf10ae4
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Previous-Reviewed-on: https://chromium-review.googlesource.com/332434
Original-(cherry picked from commit 5fc7792e4104523569140cd84ce313da721ec34b)
Original-Reviewed-on: https://chromium-review.googlesource.com/332542
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/vendorcode/google/chromeos/vboot2/antirollback.c | 8 ++++++++
src/vendorcode/google/chromeos/vboot2/vboot_logic.c | 14 +++++++-------
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/vendorcode/google/chromeos/vboot2/antirollback.c b/src/vendorcode/google/chromeos/vboot2/antirollback.c
index 654fd34..fbc6d42 100644
--- a/src/vendorcode/google/chromeos/vboot2/antirollback.c
+++ b/src/vendorcode/google/chromeos/vboot2/antirollback.c
@@ -249,6 +249,14 @@ uint32_t setup_tpm(struct vb2_context *ctx)
RETURN_ON_FAILURE(tlcl_lib_init());
+ /* Handle special init for S3 resume path */
+ if (ctx->flags & VB2_CONTEXT_S3_RESUME) {
+ result = tlcl_resume();
+ if (result == TPM_E_INVALID_POSTINIT)
+ printk(BIOS_DEBUG, "TPM: Already initialized.\n");
+ return TPM_SUCCESS;
+ }
+
#ifdef TEGRA_SOFT_REBOOT_WORKAROUND
result = tlcl_startup();
if (result == TPM_E_INVALID_POSTINIT) {
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_logic.c b/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
index d43fb27..a81a9c2 100644
--- a/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
+++ b/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
@@ -304,13 +304,6 @@ void verstage_main(void)
/* Read nvdata from a non-volatile storage */
read_vbnv(ctx.nvdata);
- /* Read secdata from TPM. Initialize TPM if secdata not found. We don't
- * check the return value here because vb2api_fw_phase1 will catch
- * invalid secdata and tell us what to do (=reboot). */
- timestamp_add_now(TS_START_TPMINIT);
- antirollback_read_space_firmware(&ctx);
- timestamp_add_now(TS_END_TPMINIT);
-
/* Set S3 resume flag if vboot should behave differently when selecting
* which slot to boot. This is only relevant to vboot if the platform
* does verification of memory init and thus must ensure it resumes with
@@ -320,6 +313,13 @@ void verstage_main(void)
vboot_platform_is_resuming())
ctx.flags |= VB2_CONTEXT_S3_RESUME;
+ /* Read secdata from TPM. Initialize TPM if secdata not found. We don't
+ * check the return value here because vb2api_fw_phase1 will catch
+ * invalid secdata and tell us what to do (=reboot). */
+ timestamp_add_now(TS_START_TPMINIT);
+ antirollback_read_space_firmware(&ctx);
+ timestamp_add_now(TS_END_TPMINIT);
+
if (!IS_ENABLED(CONFIG_VIRTUAL_DEV_SWITCH) &&
get_developer_mode_switch())
ctx.flags |= VB2_CONTEXT_FORCE_DEVELOPER_MODE;