Sugnan Prabhu S has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/27369 )
Change subject: soc/intel/basecode: Add support for updating ucode loaded via FIT
......................................................................
Patch Set 68:
(7 comments)
https://review.coreboot.org/c/coreboot/+/27369/67//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/coreboot/+/27369/67//COMMIT_MSG@27
PS67, Line 27: register
> nit: PCR register
Done
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
File src/soc/intel/common/basecode/fw_update/Kconfig:
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
PS67, Line 6: select
> maybe depends on is better? That way you are a bit more aware in the soc code which dependency you p […]
Done
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
File src/soc/intel/common/basecode/fw_update/ucode_update.c:
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
PS67, Line 111: if (rdev_writeat(staging_rdev, cbfs_microcode, 0,
: get_microcode_size(cbfs_microcode)) < 0) {
: printk(BIOS_ERR, "ucode: Failed to write microcode to staging area\n");
: return UCODE_FWU_STAGING_WRITE_ERROR;
: }
> If the MCU is bigger than the staging area this will fail but it might be a good idea to be more ver […]
Done
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
PS67, Line 162: tatic int
> use the return type enum ucode_fwu_failure_reason (Add success to the enum?)?
Done
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
PS67, Line 211: stagin
> staging
Done
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
PS67, Line 260: BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, ucode_fw_sync, NULL);
> Can this be done as part of coreboot_init_cpus() and somehow avoid calling intel_microcode_find() tw […]
This will be moved as part of intel_fw_update where coreboot triggers CSE FW Update and UCODE Update.
https://review.coreboot.org/c/coreboot/+/46819/6/src/soc/intel/common/basec…
This is required to consolidate number of resets required as part of FW Update.
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
File src/soc/intel/common/basecode/include/intelbasecode/ucode_update.h:
https://review.coreboot.org/c/coreboot/+/27369/67/src/soc/intel/common/base…
PS67, Line 6: /*
: * This is a weak implementation to reboot after ucode update is finished.
: * This can be overridden by mainboard/SoC specific implementation.
: */
: void ucode_reboot_platform(void);
:
: /*
: * This is a weak implementation for the ucode update module to know if receovery mdoe is
: * enabled. This returns non-zero if recovery mode enabled and can be overridden by
: * mainboard/SoC specific implementation.
: */
: int ucode_update_rec_mode_enabled(void);
> What kind of override do you plan to implement? Maybe keep it non weak for now and change that when […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/27369
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iab6ba36a2eb587f331fe522c778e2c430c8eb655
Gerrit-Change-Number: 27369
Gerrit-PatchSet: 68
Gerrit-Owner: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Reviewer: Jamie Ryu <jamie.m.ryu(a)intel.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Sugnan Prabhu S <sugnan.prabhu.s(a)intel.com>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: dhaval v sharma <dhaval.v.sharma(a)intel.com>
Gerrit-CC: Dhaval Sharma <dhaval.v.sharma(a)intel.corp-partner.google.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-CC: rushikesh s kadam <rushikesh.s.kadam(a)intel.com>
Gerrit-Comment-Date: Wed, 09 Dec 2020 17:17:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: comment
Sugnan Prabhu S has uploaded a new patch set (#68) to the change originally created by Rizwan Qureshi. ( https://review.coreboot.org/c/coreboot/+/27369 )
Change subject: soc/intel/basecode: Add support for updating ucode loaded via FIT
......................................................................
soc/intel/basecode: Add support for updating ucode loaded via FIT
Intel’s FIT (Firmware Interface Table) based MCU (microcode/pcode patch)
loading mechanism patches the microcode before CPU reset. In the current
Chromebooks, field updatable FW has to be first verified by vboot. Since
the MCU is loaded before reset, vboot cannot verify the same and hence
we end up restricting FIT based MCU update only from RO.
This patch implements a scheme which will allow chromebooks to update
MCU in the field.
Create 2 bootblocks (use INTEL_ADD_TOP_SWAP_BOOTBLOCK) each containing
their own FIT table. First bootblock FIT has pointers to MCUs
(in microcode_blob.bin) which resides in RO section. This will be used
in the recovery scenario and also when booting with top-swap disabled
i.e, RTC reset. Second bootblock (Normal mode) is identical to the first
one except the FIT. Insert an additional pointer to a MCU that will
reside in a staging area. Use the
CONFIG_INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG config to insert the address
of the staging area into FIT.
Top swap control bit in RTC (BUC) PCR register (0x3414) is used to
switch between the two bootblocks.
Reserve a region in the FMAP which is equal to or greater than the MCU
size specified in the BWG for a particular SoC (e.g., for Skylake/Kaby
Lake it is 192K). This is a RW region just like the RW_MRC_CACHE. MCU
from RW-A/RW-B will be copied to this region during boot. Protect this
staging area with a FPR.
Basic update flow:
In non-recovery mode, Once a slot has been selected and loaded, check if
the current slot MCU and RW staging MCU are same. If not, update the
staging area with the MCU found in the current slot and reset the
system.
Also, make sure that the top-swap is enabled in normal/developer mode
and disabled in recovery mode.
In order to enable the update feature:
* The mainboard chromeos.fmd should include a new region for staging MCU
e.g, RW_UCODE_STAGED.
* Select config INTEL_TOP_SWAP_MULTI_FIT_UCODE_UPDATE.
* Implement a call to check_and_update_ucode() and handle the failure
appropriately.
Add documentation to describing the MCU update procedure.
Update config name and Makefile.inc
TODO: Since this update mechanism is dealing mostly with a single MCU
it is best suited for systems where the CPU is soldered down and not
replaceable (socketed). Extend the update mechanism to systems where the
CPU is replaceable, by including multiple MCU for different CPUs.
TEST=Create an FW image for soraka and flash, create a
chromeos-firmwareupdate shellball with a newer MCU and perform an
update. Make sure that the currently loaded microcode version
matches the one in firmwareupdate.
Change-Id: Iab6ba36a2eb587f331fe522c778e2c430c8eb655
Signed-off-by: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Signed-off-by: dhaval v sharma <dhaval.v.sharma(a)intel.com>
Signed-off-by: Pandya, Varshit B <varshit.b.pandya(a)intel.com>
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s(a)intel.com>
---
M Documentation/soc/intel/index.md
A Documentation/soc/intel/ucode_update/flash_layout.svg
A Documentation/soc/intel/ucode_update/microcode_update_model.md
M Makefile.inc
A src/soc/intel/common/basecode/fw_update/Kconfig
A src/soc/intel/common/basecode/fw_update/Makefile.inc
A src/soc/intel/common/basecode/fw_update/ucode_update.c
A src/soc/intel/common/basecode/include/intelbasecode/ucode_update.h
8 files changed, 705 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/27369/68
--
To view, visit https://review.coreboot.org/c/coreboot/+/27369
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iab6ba36a2eb587f331fe522c778e2c430c8eb655
Gerrit-Change-Number: 27369
Gerrit-PatchSet: 68
Gerrit-Owner: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Reviewer: Jamie Ryu <jamie.m.ryu(a)intel.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Sugnan Prabhu S <sugnan.prabhu.s(a)intel.com>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: dhaval v sharma <dhaval.v.sharma(a)intel.com>
Gerrit-CC: Dhaval Sharma <dhaval.v.sharma(a)intel.corp-partner.google.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-CC: rushikesh s kadam <rushikesh.s.kadam(a)intel.com>
Gerrit-MessageType: newpatchset
Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48470 )
Change subject: soc/amd/picasso,stoneyridge: drop unused BIOSRAM offset defines
......................................................................
soc/amd/picasso,stoneyridge: drop unused BIOSRAM offset defines
The two Socs don't use this functionality and biosram.c in the common
code is the only place where those defines are used, but it doesn't
include soc/iomap.h and has its own definitions instead.
Change-Id: I973df4ab39a94e89ea2ed6ffb639c5a85b8df456
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
M src/soc/amd/picasso/include/soc/iomap.h
M src/soc/amd/stoneyridge/include/soc/iomap.h
2 files changed, 0 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/48470/1
diff --git a/src/soc/amd/picasso/include/soc/iomap.h b/src/soc/amd/picasso/include/soc/iomap.h
index a49768f..cec3aaf 100644
--- a/src/soc/amd/picasso/include/soc/iomap.h
+++ b/src/soc/amd/picasso/include/soc/iomap.h
@@ -85,9 +85,4 @@
#define AB_DATA (AB_INDX+4)
#define SYS_RESET 0xcf9
-/* BiosRam Ranges at 0xfed80500 or I/O 0xcd4/0xcd5 */
-#define BIOSRAM_CBMEM_TOP 0xf0 /* 4 bytes */
-#define BIOSRAM_UMA_SIZE 0xf4 /* 4 bytes */
-#define BIOSRAM_UMA_BASE 0xf8 /* 8 bytes */
-
#endif /* AMD_PICASSO_IOMAP_H */
diff --git a/src/soc/amd/stoneyridge/include/soc/iomap.h b/src/soc/amd/stoneyridge/include/soc/iomap.h
index 4328880..f39200f 100644
--- a/src/soc/amd/stoneyridge/include/soc/iomap.h
+++ b/src/soc/amd/stoneyridge/include/soc/iomap.h
@@ -46,9 +46,4 @@
#define AB_DATA (AB_INDX+4)
#define SYS_RESET 0xcf9
-/* BiosRam Ranges at 0xfed80500 or I/O 0xcd4/0xcd5 */
-#define BIOSRAM_CBMEM_TOP 0xf0 /* 4 bytes */
-#define BIOSRAM_UMA_SIZE 0xf4 /* 4 bytes */
-#define BIOSRAM_UMA_BASE 0xf8 /* 8 bytes */
-
#endif /* AMD_STONEYRIDGE_IOMAP_H */
--
To view, visit https://review.coreboot.org/c/coreboot/+/48470
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I973df4ab39a94e89ea2ed6ffb639c5a85b8df456
Gerrit-Change-Number: 48470
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newchange
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48405 )
Change subject: [WIP] soc/amd: Remove Kconfig X86_RESET_VECTOR
......................................................................
[WIP] soc/amd: Remove Kconfig X86_RESET_VECTOR
The architectural requirement is for the address to be
located at the end of bootblock -0x10 bytes, so the
definition was redundant with other Kconfig variables.
Change-Id: Ia014470cfadf0b401a12a2de6dce3b1fc1862137
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/soc/amd/common/block/cpu/noncar/memlayout_x86.ld
M src/soc/amd/picasso/Kconfig
2 files changed, 3 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/48405/1
diff --git a/src/soc/amd/common/block/cpu/noncar/memlayout_x86.ld b/src/soc/amd/common/block/cpu/noncar/memlayout_x86.ld
index 2ae72e3..e595065 100644
--- a/src/soc/amd/common/block/cpu/noncar/memlayout_x86.ld
+++ b/src/soc/amd/common/block/cpu/noncar/memlayout_x86.ld
@@ -84,7 +84,6 @@
#if CONFIG(VBOOT)
PSP_SHAREDMEM_DRAM_END(CONFIG_PSP_SHAREDMEM_BASE + CONFIG_PSP_SHAREDMEM_SIZE)
#endif
- _ = ASSERT((CONFIG_BOOTBLOCK_ADDR + CONFIG_C_ENV_BOOTBLOCK_SIZE - 0x10) == CONFIG_X86_RESET_VECTOR, "Reset vector should be -0x10 from end of bootblock");
_ = ASSERT(CONFIG_BOOTBLOCK_ADDR == ((CONFIG_BOOTBLOCK_ADDR + 0xFFFF) & 0xFFFF0000), "Bootblock must be 16 bit aligned");
BOOTBLOCK(CONFIG_BOOTBLOCK_ADDR, CONFIG_C_ENV_BOOTBLOCK_SIZE)
ROMSTAGE(CONFIG_ROMSTAGE_ADDR, CONFIG_ROMSTAGE_SIZE)
@@ -105,10 +104,11 @@
SECTIONS {
/* Trigger an error if I have an unusable start address */
- _TOO_LOW = CONFIG_X86_RESET_VECTOR - 0xfff0;
+ _TOO_LOW = _X86_RESET_VECTOR - 0xfff0;
_bogus = ASSERT(_start16bit >= _TOO_LOW, "_start16bit too low. Please report.");
- . = CONFIG_X86_RESET_VECTOR;
+ . = CONFIG_BOOTBLOCK_ADDR + CONFIG_C_ENV_BOOTBLOCK_SIZE - 0x10;
+ _X86_RESET_VECTOR = .;
.reset . : {
*(.reset);
. = 15;
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index 79fc3be..fcb7ddb 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -134,15 +134,6 @@
This variable controls the DRAM allocation size in linker script
for bootblock stage.
-config X86_RESET_VECTOR
- hex
- depends on ARCH_X86
- default 0x203fff0
- help
- Sets the reset vector within bootblock where x86 starts execution.
- Reset vector is supposed to live at offset -0x10 from end of
- bootblock i.e. BOOTBLOCK_ADDR + C_ENV_BOOTBLOCK_SIZE - 0x10.
-
config ROMSTAGE_ADDR
hex
default 0x2040000
--
To view, visit https://review.coreboot.org/c/coreboot/+/48405
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia014470cfadf0b401a12a2de6dce3b1fc1862137
Gerrit-Change-Number: 48405
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-MessageType: newchange