Jamie Ryu has uploaded a new patch set (#53) 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 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>
---
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, 629 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/27369/53
--
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: 53
Gerrit-Owner: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
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.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: Subrata Banik <subrata.banik(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: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: Dhaval Sharma <dhaval.v.sharma(a)intel.corp-partner.google.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-CC: rushikesh s kadam <rushikesh.s.kadam(a)intel.com>
Gerrit-MessageType: newpatchset
Wim Vervoorn has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46462 )
Change subject: mb/*,soc/intel: drop the obsolete dt option `speed_shift_enable`
......................................................................
Patch Set 8: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/46462
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5ac3b8efe37aedd442962234478fcdce675bf105
Gerrit-Change-Number: 46462
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Piotr Król <piotr.krol(a)3mdeb.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Wim Vervoorn <wvervoorn(a)eltan.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 21 Oct 2020 07:40:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46567 )
Change subject: soc/intel,mb/*: get rid of legacy pad macros
......................................................................
soc/intel,mb/*: get rid of legacy pad macros
Get rid of legacy pad macros by replacing them with their newer
equivalents.
TEST: TIMELESS-built board images match
Change-Id: I078f9bb3c78f642afc6dcfd64d77be823a4485c2
Signed-off-by: Michael Niewöhner <foss(a)mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46567
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks(a)eltan.com>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
---
M src/mainboard/51nb/x210/gpio.h
M src/mainboard/asrock/h110m/include/gpio.h
M src/mainboard/facebook/monolith/gpio.h
M src/mainboard/google/eve/gpio.h
M src/mainboard/google/fizz/variants/baseboard/gpio.c
M src/mainboard/google/fizz/variants/endeavour/gpio.c
M src/mainboard/google/fizz/variants/karma/gpio.c
M src/mainboard/google/glados/variants/asuka/include/variant/gpio.h
M src/mainboard/google/glados/variants/caroline/include/variant/gpio.h
M src/mainboard/google/glados/variants/cave/include/variant/gpio.h
M src/mainboard/google/glados/variants/chell/include/variant/gpio.h
M src/mainboard/google/glados/variants/glados/include/variant/gpio.h
M src/mainboard/google/glados/variants/lars/include/variant/gpio.h
M src/mainboard/google/glados/variants/sentry/include/variant/gpio.h
M src/mainboard/google/poppy/variants/atlas/gpio.c
M src/mainboard/google/poppy/variants/baseboard/gpio.c
M src/mainboard/google/poppy/variants/nami/gpio.c
M src/mainboard/google/poppy/variants/nautilus/gpio.c
M src/mainboard/google/poppy/variants/nocturne/gpio.c
M src/mainboard/google/poppy/variants/rammus/gpio.c
M src/mainboard/google/poppy/variants/soraka/gpio.c
M src/mainboard/intel/cedarisland_crb/include/gpio.h
M src/mainboard/intel/kblrvp/variants/rvp11/include/variant/gpio.h
M src/mainboard/intel/kblrvp/variants/rvp3/include/variant/gpio.h
M src/mainboard/intel/kblrvp/variants/rvp7/include/variant/gpio.h
M src/mainboard/intel/kblrvp/variants/rvp8/include/variant/gpio.h
M src/mainboard/intel/kunimitsu/gpio.h
M src/mainboard/intel/saddlebrook/gpio.h
M src/mainboard/kontron/bsl6/gpio.h
M src/mainboard/libretrend/lt1000/gpio.h
M src/mainboard/prodrive/hermes/Kconfig
M src/mainboard/protectli/vault_kbl/gpio.h
M src/mainboard/purism/librem_skl/gpio.h
M src/mainboard/razer/blade_stealth_kbl/gpio.h
M src/mainboard/supermicro/x11-lga1151-series/variants/x11ssh-tf/include/variant/gpio.h
M src/mainboard/supermicro/x11-lga1151-series/variants/x11ssm-f/include/variant/gpio.h
M src/soc/intel/common/block/gpio/Kconfig
M src/soc/intel/common/block/include/intelblocks/gpio_defs.h
M src/soc/intel/skylake/Kconfig
M src/soc/intel/xeon_sp/Kconfig
40 files changed, 2,179 insertions(+), 2,216 deletions(-)
Approvals:
build bot (Jenkins): Verified
Furquan Shaikh: Looks good to me, approved
Frans Hendriks: Looks good to me, but someone else must approve
--
To view, visit https://review.coreboot.org/c/coreboot/+/46567
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I078f9bb3c78f642afc6dcfd64d77be823a4485c2
Gerrit-Change-Number: 46567
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: David Hendricks
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Matthew Garrett <mjg59(a)google.com>
Gerrit-Reviewer: Maxim Polyakov <max.senia.poliak(a)gmail.com>
Gerrit-Reviewer: Michal Zygowski <miczyg94(a)gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Piotr Król <piotr.krol(a)3mdeb.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Wim Vervoorn (private) <wim(a)vervoorn.org>
Gerrit-Reviewer: Wim Vervoorn <wvervoorn(a)eltan.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46531 )
Change subject: util/sconfig: allow to override chip-wrapped devices
......................................................................
Patch Set 7: Code-Review-1
> Patch Set 7:
>
> > Patch Set 7:
> >
> > > Patch Set 7:
> > >
> > > > Patch Set 7:
> > > >
> > > > > > I'm not sure if we actually want to allow changing the chip.
> > > > > > Alternatively, we could error out and fix the drivers. Some-
> > > > > > thing like CB:41745 might help.
> > > > >
> > > > > Well, when we turn it around (having the driver inside the device instead of wrapping the device) the problem should be gone. This is what CB:41745 does, right?
> > > >
> > > > It also adds another pointer to a config struct separate from
> > > > the chip's one. It wouldn't solve the problem if trees conflict,
> > > > but could avoid conflicting trees in some cases.
> > >
> > > I agree with Nico, this is, as things currently stand, just an error in whoever is writing the devicetrees. Technically, it is wrong to not have both devices wrapped with the same chip driver (sconfig assumes the hierarchy w/r/t devices & chips is the same in that respect)
> >
> > Just to be sure I get this right, you want to 1) have the devices wrapped by drivers in the chipset dt and 2) wrap them even when just disabling a device in a devtree?
>
> The PCI devices corresponding to the internal controllers must not be wrapped by any chip drivers. This is how almost all the internal chip devices are organized in coreboot. The only exception is the CNVi device which happened to be wrapped inconsistently. I have some patches that I plan to push this week to fix that.
>
> If there is a need to wrap a chip driver for the internal devices for any reason (ACPI generation, etc.), then that can be done by adding a virtual/dummy device under the controller device. This device wouldn't have to be modified by the mainboard unless it needs to override some chip config. Thus, the only cases where a mainboard would have to follow the chip wrapping to match the chipset tree is:
> 1. For SoC chip
> 2. For any virtual device chips that require chip config changes.
Thank you very much for your detailed response! Looking forward to your patches :-)
--
To view, visit https://review.coreboot.org/c/coreboot/+/46531
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6364b3a6e1804a23503f42c66c5001e42f911270
Gerrit-Change-Number: 46531
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 21 Oct 2020 00:25:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment