Commit Graph

1679 Commits

Author SHA1 Message Date
Lennert Buytenhek 5bb0cd48bb
[ICXD] Fix stitching process by getting rid of SblOpen remnants (#1737)
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
2022-11-02 14:05:54 -07:00
sean-m-mcginn 9d6a794169
Create tool to generate uCode outside of full SBL build (#1716)
* Create tool to generate uCode outside of full SBL build

Create a standalone tool that generates a full
uCode region binary separate from a full SBL build

This tool will  be used to generate a uCode region
binary for incorporation into a FWU capsule

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>

* Make region size optional parameter in uCode utility

When region size not is given explicitly to the uCode
utility, it aligns the combined uCode binaries up
to the nearest multiple of 4KB

The uCode utility also checks slot size and region size
are not exceeded

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>

* Remove region size argument on uCode utility

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-25 18:35:42 -07:00
Guo Dong 505209d9c3 Enhance multiboot support
Currently SBL would return when preferred graphics mode is set
in the multiboot image. This patch would continue boot and print
the preferred graphics mode information.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-10-24 10:52:03 -07:00
Sean McGinn 876f68fa4f Prevent erroneous update of BP1 from being retried on BP0
It was noticed that, if there is an error
updating a redundant component on BP1, it
gets retried on BP0

This change prevents that retry from happening as
identical boot partitions are desired

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-24 10:51:36 -07:00
Sean McGinn 0a19cd4842 Allow multiple redundant SBL components to be updated in the same session
Currently, only a single redundant SBL component, the configuration data
component, is allowed per update session. However, with support added for
ACM and uCode component updates, the user might desire to update multiple
redundant SBL components in the same session. This change allows this to
happen.

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-24 10:51:36 -07:00
ldevathu 3eb00df31f [EHL] support multi VBT
Currently, Slim Bootloader support for multiple VBT files doesn't work on EHL.
Support for multiple VBT files, which works on other platform, does not work
correctly for EHL. However, this change can fix it locally by adding the support
from another platform into the EHL support once integrated into the public SBL

Signed-off-by: ldevathu <linggeis.daran.devathurai@intel.com>
2022-10-20 08:01:44 -07:00
Bruno Achauer aac41f89ea [QEMU] Allow building with the debug FSP
Fix two errors that prevent building QEMU SBL with the debug FSP on Linux:
- 0001-Build-QEMU-FSP-2.0-binaries.patch adds a variable "RegMask8" to
  FspmInitEntryPoint() that is written but not read; GCC treats this as
  an error;
- the resulting STAGE2 binary is larger than the 0x18000 bytes allocated
  for it.

Signed-off-by: Bruno Achauer <bruno.achauer@intel.com>
2022-10-20 07:49:21 -07:00
Bejean Mosher bac196577b fix: [RPL-P] Combined ADL-P and RPL-P RVP board IDs so either can boot.
RPL-P and ADL-P RVPs are essentially identical except for BoardID FRU.
Both need to work with SBL with RPL-P Silicon. To avoid duplicating
config data, this change will treat both as the same board.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-10-19 12:47:10 -07:00
Guo Dong b4ce187026
[ADL] enable TCO timer by default (#1727)
TCO timer could be enabled regardless resiliency feature.
So just remove the resiliency conditional.

Signed-off-by: Guo Dong <guo.dong@intel.com>

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-10-19 12:31:04 -04:00
Sean McGinn 38a3c2e799 Consider Simultaneous SG02 Corruptions in BP0 and BP1 for Resiliency
Before this change, whenever SG02 is corrupted
in both BP0 and BP1, SBL will continuously loop
trying to recover BP0 via BP1 and vice versa

This change makes it so that, if a failure is
detected on a recovery flow, the CPU halts

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-18 14:49:32 -07:00
cshur 0372e199d2
[ICXD] Move Tcc binaries to Utilities (#1726)
Update Script files to move tcc binaries.

Signed-off-by: cshur <cs.hur@intel.com>

Signed-off-by: cshur <cs.hur@intel.com>
2022-10-18 13:29:28 -07:00
Guo Dong e81a4872a9 [RPL] Add a new RPL CPU support
Adding RAPTORLAKE 2 DT HALO support

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-10-17 14:13:02 -07:00
Sean McGinn ceea7d1d03 Rename PCD for SBL component corruption command
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-17 11:59:04 -07:00
Sean McGinn 44b332d609 Add more examples for corruptcomp tool
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-17 11:59:04 -07:00
Sean McGinn b82dcd344f Add PCD for enablement of corruptcomp tool
Adds build-time PCD that hides corruptcomp
tool by default
Renames corruptcomponent to corruptcomp
Enhances error checking/logs

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-17 11:59:04 -07:00
Sean McGinn f7c6cc599e Create OS loader shell tool for SBL component corruption
Create a tool that corrupts SBL components so that
the SBL resiliency feature can more easily be tested
and demonstrated

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-17 11:59:04 -07:00
Leon Theunissen 192e8a568a Interrupt packet length is maximum 8, not exclusively 8
Accomodate USB interrupt transfers that require less than 8 bytes per packet.

Signed-off-by: Leon Theunissen <leon.theunissen@etion.co.za>
2022-10-17 11:55:10 -07:00
Leon Theunissen 861f587b63 USB fix descriptor parsing
While iterating over a USB descriptor in GetExpectedDescriptor(),
the "Len" variable always uses the 1st byte in the buffer,
This is only true for the 1st iteration, thereafter the variable should
advance as the descriptor advances.

Signed-off-by: Leon Theunissen <leon.theunissen@etion.co.za>
2022-10-17 11:55:10 -07:00
Vincent Chen 19f84ffea2 [EHL] Update FSP/UCODE/platform version since MR5 is released
- update FSP version to MR5 FSP (09.04.30.51)
- update microcode version to 17
- update platform version to 1.5

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-10-17 11:49:34 -07:00
Kalp Parikh 4aa2ac2915 feat: [ADLPS] FSP update for pre-MR1 release
FSP update for pre MR1 release

Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>
2022-10-17 11:46:43 -07:00
cshur 94ab839eab [ICXD] Upstream ICX-D LCC/HCC after PV
Tested to boot Yocto and Windows.

Signed-off-by: cshur <cs.hur@intel.com>
2022-10-12 14:45:35 -07:00
sean-m-mcginn ad6da2876a
Fix erroneous uCode base offset in BP1 SG1A (#1712)
During the build process, SG1A is built
for BP0 and a copy is made for BP1. Then,
the parameters of the BP1 SG1A are adjusted
to reflect that it is in BP1. One of the
parameters that gets adjusted during this
process is the uCode base. It was noticed
that this uCode base does not get updated
at all for platforms using FSP spec 2.2, but
another parameter gets updated instead.

Specifically, the error is in the FSP-T UPD
struct. The offset of the uCode base in
the FSP-T UPD struct is 0x40 for platforms using
FSP spec 2.2. However, the offset that actually
gets updated for platforms using FSP spec 2.2 is
0x20. This change corrects this offset for the
relevant platforms.

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-10-11 15:57:02 -04:00
bejeanmo 2d73d46d09
fix: Check for possible NULL dereference introduced in #1695. (#1717)
PR #1695 possible NULL deregerence was triggering static analyzer failure.
Added a NULL check before dereferencing.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-10-11 09:52:45 -07:00
bejeanmo 15f365d774
fix: [ADL] TCC was never getting enabled via the board config option. (#1715)
PcdTccEnabled was declared as a FeaturePcd which evaluates to a code symbol
and can't be used in a #if. From the preprocessor perspective it is always
undefined. Changed this pcd to a FixedPcd instead.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-10-10 16:42:22 -04:00
Karuppa-samy 107fabbebd
[ADL] GPIO shell command Klocwork issue fix (#1693)
This patch fixes initialization issue identified
by Klocwork in function GpioPadcalc.

Signed-off-by: M Karuppasamy <karuppasamy.m@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
Signed-off-by: Akshatha Thekkade <akshatha.thekkade@intel.com>

Signed-off-by: M Karuppasamy <karuppasamy.m@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
Signed-off-by: Akshatha Thekkade <akshatha.thekkade@intel.com>
2022-10-07 12:34:22 -04:00
stanley 1d9dc54502
[EHL] Enable SIO UART in COM mode (#1706)
The patch fixes SIO UART in COM mode by providing Acpi Gns
correct values.

Test method: grep 16550A /proc/tty/driver/serial
  If a SIO UART run in COM mode, its MMIO should be in
  FE020000 ~ FE035FFF (EHL serial IO in ACPI mode).

Verfiied: EHL CRB

Signed-off-by: Stanley Chang <stanley.chang@intel.com>

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2022-10-07 12:32:24 -04:00
Subash Lakkimsetti 0eceb0cfe7
Update Universal payload hob for secure boot. (#1695)
Universal paayload hobs are updated for secure boot
and measured boot. Event logs Hobs are created to consume
by TCG2Dxe in uefi payload.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2022-10-06 08:48:06 -07:00
tsaikevin 064caf9156
[ADLPS] Resolve CATERR issue from Windows shutdown (#1709)
Change USB4 CM Mode to 0. This value is consumed by FSP and UEFI BIOS but not by SBL.
Different setting causes issue with TBT device in Windows which might result in CATERR.

Tested to boot Windows and Yocto.

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2022-10-06 11:04:15 -04:00
bejeanmo 526dc9d074
[RPL-P] COM-HPC CRB platform ID, detection, and board specific porting. (#1704)
Added new platform ID for RPLP DDR5 CRB (COM-HPC board). This board has
no EC or board ID FRU, but it is so far the only board in the ADL/RPL
family like this so it is used as a board identification criterion.
Added DdiConfig table as well.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-10-06 10:05:38 -04:00
Kalp Parikh 95c79226cb
[EHL] Fix build error (#1708)
Increase payload size to fix build issues.

Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>

Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>
2022-10-04 17:41:30 -04:00
Kalp Parikh 9c2df9337e
[ADL] Fix KW issue (#1707)
Fixing 2 Klocwork issues for ADL.

Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>

Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>
2022-10-04 16:54:00 -04:00
jinjhuli 6a647a424e
[ADLN] Update ACPI table and NVS value (#1692)
1. Update ADLN related ACPI tables
2. Update ADLN NVS value

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-10-04 11:08:19 -07:00
ckolhe 0ad56ef2dd
Update mm shell command description (#1700)
Updated the help section of mm shell command.

Signed-off-by: Chirag Vijay Kolhe <chirag.vijay.kolhe@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>

Signed-off-by: Chirag Vijay Kolhe <chirag.vijay.kolhe@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2022-10-03 09:43:09 -04:00
randylintw 53cb43d817
[EHL] Fix build break on non-Optimize build (#1701)
Resolve the build break when remove the O1b2 CC flag.
  error LNK2001: unresolved external symbol __allshl

Signed-off-by: Randy Lin <randy.lin@intel.com>

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-10-03 09:41:26 -04:00
Syahirah Sabryna 33df10a03d
[EHL] Add MemTestOnWarmBoot UPD to Config Editor (#1698)
MemTestOnWarmBoot UPD added into Config Editor. This UPD is enabled to ensure Base Memory Test is running in SBL.

Signed-off-by: Syahirah Sabryna <nur.syahirah.sabryna.mohmad@intel.com>

Signed-off-by: Syahirah Sabryna <nur.syahirah.sabryna.mohmad@intel.com>
2022-10-03 09:40:35 -04:00
Subash Lakkimsetti 7224b22977
TPM: Continue boot platform when TPM is not present (#1705)
Plaform is halted when TPM is not detected.TPM support is
enabled with BTG 0 and boot halted when PTT is not enabled
in straps.

TPM should be able to boot when TPM is not present and this
patch fixes this issue.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2022-10-02 21:52:57 -07:00
Karuppa-samy 90406ffbac
[LiteVariable] Added Data NULL conditional check in InternalGetVariable() (#1699)
Argument DataLen of function InternalGetVariable() inside Reclaim()
function is not initialized. This uninitialized value is assigned
to another variable and compared, resulting in EFI_BUFFER_TOO_SMALL
error when Data is NULL. Hence added Data NULL conditional check with
DataLen to overcome EFI_BUFFER_TOO_SMALL error when Data is NULL.

Signed-off-by: M Karuppasamy <karuppasamy.m@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>

Signed-off-by: M Karuppasamy <karuppasamy.m@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2022-09-30 09:06:47 -04:00
Sean McGinn b44ef69ca4 Enhance argument descriptions for CorruptComponentUtility
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-26 11:20:39 -07:00
Sean McGinn 94053251fd Create Python tool for SBL component corruption
Create a tool that corrupts SBL components so that
the SBL resiliency feature can more easily be tested
and demonstrated

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-25 19:48:09 -07:00
Ong Kok Tong fcbc331af4 [ADL] ME FIPS Mode Enablement
Implement a function to support FIPS mode enablement in ADL

Test: Booted with Windows and Yocto
Verified with FIPS enablement support in ADLN

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-09-25 19:23:31 -07:00
M Karuppasamy 77846dc3c1 GPIO shell command enhancement for ADL platform
Updated the GPIO shell command to take GPIO group and pin number as inputs.

Signed-off-by: M Karuppasamy <karuppasamy.m@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
Signed-off-by: Akshatha Thekkade <akshatha.thekkade@intel.com>
2022-09-21 08:28:27 -07:00
bejeanmo 02a186200e
[Tools] Automatically pad CFGDATA regions to 4 byte boundary. (#1688)
CFGDATA regions (each CFG tag) needs to be 4-byte aligned since this
CFGDATA header field uses the low two bytes of the length for ConditionNum.
Without this change, unaligned CFG region yaml files will cause a build
error and need to be manually padded. This change adds a field "__reserved"
to each CFG structure that requires padding.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-09-20 13:28:38 -04:00
Lennert Buytenhek 7fcab220ed Align the Ia32 Stage1B/Stage2 stack to 16 bytes
Much like the corresponding Stage1A patch, this patch aligns the
Ia32 Stage1B and Stage2 stacks to 16 bytes, like what is already the
case for X64, so that we follow Version 1.0 of the System V Intel386
ABI supplement, and satisfy any expectations our compiler may have
regarding stack alignment.

A nice side effect of this change is that it allows building an Ia32
Slimbootloader with -msse which can run on real hardware, which requires
16-byte stack alignment.  Slimbootloader currently already enables SSE
in XCR0 early on in Stage1A, and it has SSE versions of various helper
functions written in assembly, in other words, it already makes use of
SSE, but allowing the compiler to emit SSE instructions requires 16-byte
stack alignment, because access to unaligned on-stack SSE variables
will throw #GP on real hardware.  (QEMU doesn't seem to enforce the
requirement for natural alignment of SSE memory arguments.)

Suggested-by: Peter Edwards <peadar@arista.com>
Signed-off-by: Lennert Buytenhek <buytenh@arista.com>
2022-09-19 11:27:03 -07:00
Atharva Lele bbcf03be6b
[ADLN] Update FSP UPD Parameters (#1686)
Updated FSP-M and FSP-S parameters to match with BIOS

Signed-off-by: Atharva Lele <atharva.lele@intel.com>

Signed-off-by: Atharva Lele <atharva.lele@intel.com>
2022-09-16 13:13:44 -04:00
koktong-ong 470cec62d4
[ADLPS] Add PlatformNvs for CRB (#1682)
Added M.2 related PlatformNvs GPIO value for CRB board

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-09-12 09:40:06 -07:00
Akshatha Thekkade 0b55c4b254 [ADL] Set Payload Id of LINX Payload
If Payload Id is read from generic config data then
set Payload Id of LINX Payload to 0.

Signed-off-by: Akshatha Thekkade <akshatha.thekkade@intel.com>
2022-09-09 08:47:38 -07:00
Akshatha Thekkade 9ca881bb91 [ADL] Protect TCC with a feature flag
Include TCC specific code inside TCC feature flag to avoid
build issues on unsupported platforms.

Signed-off-by: Akshatha Thekkade <akshatha.thekkade@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2022-09-09 08:47:38 -07:00
tsaikevin f1cd68c221
[ADLPS] resolve ACPI error from yocto dmesg (#1681)
Check EC UPD flag prior to publish ECDT table and send EC cmd.
On Ecless board, EC ACPI object will not be invoked.

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2022-09-09 11:28:18 -04:00
Sean McGinn 4ff926f317 Stop TCO Timer in S3 Resume Path, Regardless of Boot Mode
Always stop TCO timer in S3 resume path as no payload is
executed

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-07 15:47:25 -07:00
Sean McGinn 6013284753 Stop TCO Timer in Beginning of FWU PLD
Stop TCO timer in beginning of FWU PLD
to ensure it is started without error

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-07 15:47:25 -07:00