Commit Graph

1554 Commits

Author SHA1 Message Date
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
Sean McGinn 22cfbc8803 Rename GetStateMachine to GetFwuStateMachine
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-06 09:38:52 -07:00
Sean McGinn 3a6aa45abb Create FirmwareUpdateStatus header and FirmwareResiliencyLib
library

Migrates FW resiliency APIs of Stage1B.c to
FirmwareResiliencyLib
Migrates FW update status types from FirmwareUpdateLib.h and
BootloaderCommonLib.h to FirmwareUpdateStatus.h

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-06 09:38:52 -07:00
Sean McGinn b7e7b7b93b Cover IBB corruption in SBL resiliency implementation
If TS bit flipped and it does not match FWU state,
assume ACM detected corruption in SG1A or SG1B and
recover broken BP

Add WDT trigger for recovery

Add ADL-specific WDT trigger for TS

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-09-06 09:38:52 -07:00
Lakkimsetti, Subash 13f05b3e89 [ADL][RPL] Initialize TPM and Measured boot with btg profile 0
TPM is intialized by ACM with profiles 3 & 5.
This patch enables the TPM in bootloader when boot guard
is not enabled. HAVE_MEASURED_BOOT in platform
board config controls the TPM in SBL.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2022-09-06 09:28:23 -07:00
tsaikevin c3e42632ba
[ADLPS] UPD config update (#1680)
Added UPD Ddr4OneDpc in DLT file and removed hard coded value.

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

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2022-09-02 07:36:47 -04:00
Kevin Tsai aef46f64a7 [ADLPS] UPD config update
Aligned FSPM and FSPS UPD settings with BIOS

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2022-09-01 16:10:24 -07:00
Sindhura Grandhi 4293c38c77
[ADLPS] Add GPIO table for PS CRB for reference. (#1678)
Add the hard-coded GPIO table to the header file for reference purposes.
This table is currently part of the configuration.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-09-01 14:24:54 -07:00
Randy Lin f641779277 [Common] Fix Osloader hang when HAVE_ACPI_TABLE=0
Verified on EHL

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-08-31 16:25:53 -07:00
Sindhura Grandhi 073e8a9147
[ADL] Memory FSP settings cleanup (#1674)
Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-08-30 15:52:44 -07:00
Lakkimsetti, Subash 6e444ea23f [ADL] ARB SVN commit for Bootguard components
KM,BPM,ACM SVN are not commit at EOM.
End user has to perform this commit by doing
FwUpdate CMDI mode for ARB SVN commit.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2022-08-29 17:17:19 -07:00
Stanley Chang f4aeac41cc [TGL] Init EC CPU fan control
Without initializing CPU fan control, EC will stop CPU fan after default
timeout. This patch initializes CPU fan control and fail safe control.

Some scenarios are related to the case: (1) bootloader shell;
(2) unexpected hang; (3) OS with no ACPI support; and (4) OS fails to
load ACPI driver

Test methods:
1. monitor CPU fan under SBL / UEFI Payload shell: expect non-stop
2. check CPU fan status after Linux starts: expect ACPI controls it

Verified: TGL RVP

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2022-08-24 09:06:08 -07:00
Sean McGinn f7a524fa1b Add comment regarding TCO timer initialization
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-23 14:50:23 -07:00
Sean McGinn 82274c1567 Add SBL Resiliency Support to ADL-N
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-23 14:50:23 -07:00
Sindhura Grandhi 9361ac2d57
[ADLP] Fix build issue (#1667)
Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-08-19 15:01:33 -07:00
Ong Kok Tong ba6837ffb6 [ADLPS] CRB PV release update
1. Update BoardID and PlatformID for CRB board
2. Direct return after read board id from smbus to avoid boardid clashing
3. Added ddi config for CRB board
4. Update FSPM UPD due to common value across all sku

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-08-19 12:01:51 -07:00
sean-m-mcginn 70a30e791f
Resolve Klocwork alarm (#1666)
Adds a null check before dereference of a pointer
in the FW recovery flow

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

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-19 11:57:43 -07:00
Sean McGinn 5706797ad5 Remove unnecessary failed boot count retrieval
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn 6614579f1f Remove unnecessary set of BP
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn 875d4e75f7 Lower TCO Timeout
This change lowers the TCO timeout that gets
used for SBL resiliency

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn 1e677e5a4d Update full FW update status structure on recovery
This change makes sure that, during each recovery,
the FW update status structure is cleared and
repopulated

Without this change, in the event that there is
a full recovery and then an interrupted recovery,
the interrupted recovery is unable to resume

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn ffa3f9935d Remove unnecessary FWU state machine flag write
This change removes a write of the FWU state
machine flag during the recovery flow
as the exact same write occurs later on

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn 9578842cc1 Account for automatic mapping of TS region addresses
This change accounts for the automatic mapping of
the TS region addresses within the recovery flow

Before this, the TS region would not get updated
during a recovery

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn 47bb6674b5 Stop TCO timer at end of SG02
The TCO timer will be extended through the FWU
payload as part of later changes

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn bb63b27992 Remove unneccessary CPU halts
This change defaults to BP0 whenever the
BP cannot be determined instead of halting
the CPU altogether

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00
Sean McGinn eeb05a8a5e Add SBL resiliency common code
This change adds SBL resiliency-related code
to common SG1A, SG1B, SG02, and FWU code

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-08-17 11:40:43 -07:00