Commit Graph

61 Commits

Author SHA1 Message Date
skasim 33fd9573f3
feat: [EHL] Community Update FSP/UCODE for IPU2024.3 (#2184)
Signed-off-by: samihahkasim <samihah.kasim@intel.com>
2024-05-28 15:28:17 +08:00
Stanley Chang e53c365ace [EHL] trigger SMI handler in S3 resume
This commit resolves the issue where the SMI handler was not being triggered
during S3 resume. The problem was due to the functions RestoreS3RegInfo and
TriggerPayloadSwSmi not being called.

In addition, the commit also:
   1. unset the PME_B0_EN as UEFI Payload does not have its handler
   2. remove the ClearSmbuStatus() because
      - the HSTS.B_SMBUS_IO_SMBALERT_STS in SMBUS (B0:D31:F4) should be
        handled and cleared by device driver or an appropriate SMI handler.
      - the ClearSmi() will clear GPE0_STS_127_96.SMB_WAK_STS if it is set
   3. unset (FSPS) PeiGraphicsPeimInit and GraphicsConfigPtr during S3 resume
   4. narrow the var scope of mSmmBaseInfo and mS3SaveReg
   5. add required bitfield declaration

Verified with:
   1. UEFI Payload + Ubuntu on EHL CRB (release build)
   2. OSLoader (release build)
  when FEATURES_CFG_DATA.Features.S0ix = 0

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2024-05-21 10:15:20 -07:00
randylintw 02b67012c4
[EHL] Update FSP for MR7 release (#2108)
- Update FSP version to IoT EHL MR7 (09.05.20.41)
- Update platform version to 1.7

Signed-off-by: Randy <randy.lin@intel.com>
2024-01-15 09:44:12 +08:00
Stanley Chang ee2ad158df fix: [EHL] add missing GPIO definitions
add missing GPIO and PINMUX definitions

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2023-10-27 08:56:23 -07:00
Stanley Chang ca071fd9e3 feat: [EHL] add EfiResetShutdown in ResetSystemLib
The patch handles EfiResetShutdown. With the patch, one can
test "reset off" under OS Loader.

The patch also
 - fixes a wrong reference error in ResetSystemLib.inf.
 - add shutdown text in CmdReset.c

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2023-08-22 21:25:00 -07:00
randylintw 7f941e57a2
Fix Coverity issues. (#1950)
* fix: [Common] FwVendor/OemId Array compared against 0

Since it is an array the test evaluates as true and the check is
unnecessary.(CWE-398)

UINT8 FwVendor[EFI_ACPI_PSD_FW_VENDOR_SIZE];
UINT8 OemId[6];

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

* fix: [Common] Unchecked return value for HeciGetMeMode

If the function returns an error value, the error value
may be mistaken for a normal value.
In HeciSend: Value returned from a function is
not checked for errors before being used. (CWE-252)

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

---------

Signed-off-by: Randy <randy.lin@intel.com>
2023-07-10 11:52:25 -07:00
Stanley Chang 23d9187bde fix: [EHL] send EOP message
EHL FSP does not send EOP (End Of Post) message at the
Ready to Boot. The patch adds support for SBL to send
the EOP during Ready to Boot.

Verified: EHL CRB

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2023-05-24 11:23:54 -07:00
Randy 1bd9f03d34 [EHL] Update FSP and platform version since MR6 is released
- update FSP version to MR6 (09.04.51.31)
- update platform version to 1.6
Verify on EHL CRB.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2023-03-22 10:50:24 -07:00
Stanley Chang 8b68d1033a code cleanup - PchCycleDecodingLib
remove commented-out functions from PchCycleDecodingLib

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2023-03-14 16:05:23 -07:00
Stanley Chang f877b736dd feat: [EHL] support auto negotiation for Intel Gbe
Verify: EHL CRB + Windows IntelGBE 5.123.22.1221 driver

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2023-01-18 10:10:02 -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
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
Randy Lin 1db52ed784 [TGL][EHL] Fix CSME FW update hang on debug fsp build
The HPET timer address is wrong at first time invoke.
Assign to fixed value directly.

Verified on EHL TGLU.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-08-01 18:13:53 -07:00
Vincent Chen 3112989fdc [EHL] Update FSP/VBT/UCODE/platform version since MR4 is released
- update FSP version to MR4 FSP (09.04.25.11)
- update VBT version to MR4 FSP (244)
- update microcode version to 16
- update EHL platform version to 1.4

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-07-19 15:02:55 -07:00
Gavin Xue f5e230ca7c [EHL] Fix Kernel DMA driver cannot be registered issue
EHL DMA controllers are hidden at PSF level in reference code,
DMA controllers are reported as ACPI devices if ownership is Host.
So should not check DMA PCI header for DSDT table patching.
Update the change follow EHL reference code.

Signed-off-by: Gavin Xue <gavin.xue@intel.com>
2022-07-15 14:56:35 -07:00
Gavin Xue df5bd0bc2a [EHL] Fix parser warning during build
e:\sbl\Silicon\ElkhartlakePkg\Library\VTdLib\VTdLib.inf(3): warning: Unrecognized content

Signed-off-by: Gavin Xue <gavin.xue@intel.com>
2022-06-14 08:48:27 -07:00
Randy Lin b6c2ba1bac [EHL] Read SecCapability from Mbp Data HOB as priority
Found PSDS ACPI table reporting incorrect value
and fixing by referring the BIOS method to retrieve
right value. Also Enable Platform Security Discovery.

Verify on CRB platform.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-06-01 16:44:33 -07:00
Randy Lin a3eeef4e31 [EHL] Update FSP version since MR3 is released
Also set the CpuTempSensorReadEnable = 1
It was renamed from PchCpuTempSensorEnable
and removed in commit 44faa431c9

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-04-28 10:40:47 -07:00
Ong Kok Tong 12a4402ee8 [EHL] Remove FSP headers
Remove FSP headers due to the FSP download script
will check if FSP header exist. It will only replace
if there is no existing FSP headers.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-01-27 06:07:15 -08:00
kokweich 8529406967 [EHL] Microcode MR2 update
Update microcode version to MR2 in inf files

Signed-off-by: kokweich <kok.wei.chan@intel.com>
2021-12-03 07:20:12 -08:00
Subash Lakkimsetti 7a3bab7fa3
[TGL][EHL] Fix regression for Flash descriptor lock (#1425)
Add BootMediaWriteByType and use for flash descriptor
update.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2021-12-01 22:25:11 -07:00
kokweich 5a1e01d40b [EHL] Update FSP to MR2
Update FSP version to MR2 in inf file

Signed-off-by: kokweich <kok.wei.chan@intel.com>
2021-11-29 15:39:49 -08:00
Ong Kok Tong e4a00293f4 [EHL] Removed hardcoded PSE PWM pin enable
Removed hardcoded PSE PWM pin enable and adapt from
CfgData in Stage2.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-11-29 15:35:30 -08:00
Maurice Ma cccb003280 PatchCheck: Skip more files that contain non-standard whitespace
This patch added additional files to be excluded from patch check.
For example, txt, ini, app, common, template, rule, Makefile,
GNUmakefile, etc.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-10 14:28:17 -08:00
Mike Crowe 990e3e81e6 Use LF line endings in the repository
Convert the line endings stored for all text files in the repository to
LF. The majority previously used DOS-style CRLF line endings. Add a
.gitattributes file to enforce this and treat certain extensions as
never being text files.

Update PatchCheck.py to insist on LF line endings rather than CRLF.
However, its other checks fail on this commit due to lots of
pre-existing complaints that it only notices because the line endings
have changed.

Silicon/QemuSocPkg/FspBin/Patches/0001-Build-QEMU-FSP-2.0-binaries.patch
needs to be treated as binary since it contains a mixture of line
endings.

This change has implications depending on the client platform you are
using the repository from:

* Windows

The usual configuration for Git on Windows means that text files will
be checked out to the work tree with DOS-style CRLF line endings. If
that's not the case then you can configure Git to do so for the entire
machine with:

 git config --global core.autocrlf true

or for just the repository with:

 git config core.autocrlf true

Line endings will be normalised to LF when they are committed to the
repository. If you commit a text file with only LF line endings then it
will be converted to CRLF line endings in your work tree.

* Linux, MacOS and other Unices

The usual configuration for Git on such platforms is to check files out
of the repository with LF line endings. This is probably the right thing
for you. In the unlikely even that you are using Git on Unix but editing
or compiling on Windows for some reason then you may need to tweak your
configuration to force the use of CRLF line endings as described above.

* General

For more information see
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings .

Fixes: https://github.com/slimbootloader/slimbootloader/issues/1400
Signed-off-by: Mike Crowe <mac@mcrowe.com>
2021-11-10 12:46:42 -08:00
Maurice Ma 0e0eb047e3 Add UpdateMemoryInfo implementation for all open platforms
This patch implemented SOC specific hook to update the memory
map info through UpdateMemoryInfo() API.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-29 07:49:55 -07:00
kokweich 2980e182e1 [EHL] Disable USB RMRR
Disabling USB RMRR as SMI based legacy USB is not supported.

Signed-off-by: kokweich <kok.wei.chan@intel.com>
2021-10-27 21:32:52 -07:00
Maurice Ma 21917377c8 Change GetSerialPortBase() API to return 64bit address
When UART bar is alloaced to 64 bit address, the current SBL API
GetSerialPortBase() only returns the lower 32 bit address, which will
cause problem for UART access. This patch fixed this issue.

Please note the patch did not change the payload HOB interface for
UART info. That needs to be updated to 64bit base address too. But this
patch does not cover that.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-21 10:09:20 -07:00
Sai T 4d17d55a21 Move PchPcrLib to CommonSocPkg
Make PchPcrLib common. Remove redundant headers
not used by some platforms and link the new common
lib with the platforms currently using it.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-10-18 08:02:42 -07:00
Maurice Ma b61baa5a8d [EHL] Add GPIO payload selection configuration
This patch added payload selection GPIO configuration
hardcoded GPIO pin for payload selection.

It also fixed #1196.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Co-authored-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-09-22 07:20:48 -07:00
Sai T 1bb16e60c4 Remove redundant PchSbiAccessLib.h
Remove PchSbiAccessLib.h from platform-specific
folders, and use common one.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-09-17 13:50:30 -07:00
Lean Sheng Tan a7063eb30a [EHL] Rename LowPowerS0Idle to S0ix
For consistency and public understanding, rework to change
'LowPowerS0Idle' to 'S0ix'.
- rename LowPowerS0Idle to S0ix
- add s0ix variable in PlatformData.h
- add s0ix flag check in stage 1B
- move Tcc s0ix support flag from stage 2 to stage 1B

Signed-off-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
2021-09-15 08:33:30 -07:00
Ong Kok Tong 84ccab354e [EHL] Adding option to select new gpio scheme
There is a discrepancy between how Linux reads GPIO
and how bootloader is presenting it. This causes Linux
distros to crash, even in the installer,unless a kernel
module parameter has been passed:
'module_blacklist=pinctrl_elkhartlake'

The customer, Red Hat, is using RHEL 8 4.18.0-315.
There appears to be a discrepancy between how Linux reads GPIO and how
the Intel BIOS is presenting it.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-09-11 07:15:54 -07:00
Sai T 772da78bfa Move BdatLib to CommonSocPkg
This patch adds BdatLib to CommonSocPkg so that all projects
can refer to one single instance of BdatLib. Also removed the
redundant platform-specific package folders.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-09-08 16:39:56 -07:00
koktong-ong 6c50f6a5ee
[EHL] Microcode and FSP update (#1275)
Update the microcode and fsp version to MR1 in inf files

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-08-26 18:40:05 -07:00
Aiden Park 4b2e566921 Cleanup Platform/Silicon code to access LoaderGlobalData via APIs
This makes all Platform & Silicon code use APIs to access
LoaderGlobalData instead of accessing variables directly.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-08-06 12:34:36 -07:00
Talamudupula fc8a3b33ce GpioLib header clean-up
Inconsistent and redundant header files are removed.
All projects going forward

 - Use API declared in GpioLib.h
 - Provide instance of GpioSiLib.h
 - Use common defines in GpioConfig.h

[QEMU][APL][CFL][CML][CMLV]
 - Follow above header model
 - Have own instance of GpioLib

[EHL][TGL]
 - Follow above header model
 - Use common GpioLib instance

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-07-01 11:24:03 -07:00
Lean f01a5b33fb [EHL] Add TCC V2 support
Add latest Intel® Time Coordinated Computing support for EHL.

Here are the changes:
- Update the TCC subregion layout
- Use the common TCC config data
- Use the common TCC library for RTCT table
- Support TCC DSO cfg, Cache cfg and CRL binaries loading
- Rename TCC variable to follow TCC V2 naming
- Increase the stage 2 size from 0x89000 to 0x91000 to accommodate
  the new changes
- Add latest FspmUpd and FspsUpd header files for TCC v2 support
  (will be removed once FSP github updated the latest EHL FSP package)
- Change default boot options for RTCM support

TCC mode is turned off by default.

Signed-off-by: Lean Sheng <lean.sheng.tan@intel.com>
2021-06-25 12:54:40 -07:00
Ong Kok Tong 60f5423552 [EHL] Gpio common lib integration
Integrated EHL GPIO lib into common GPIO lib.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-06-04 11:16:39 -07:00
Tan Lean Sheng 218cdbcd2c
[EHL] Remove FSP UPD files from EHL Silicon package (#1181)
Remove the old FSP UPD files from EHL folder, let SBL
fetch from FSP github during build time.

Signed-off-by: LeanSheng <lean.sheng.tan@intel.com>
2021-06-02 20:33:10 -07:00
jinjhuli 46e90b83fd [EHL] Clone FSP and Microcode from open source repo
1. Clone FSP from
https://github.com/intel/FSP/tree/master/ElkhartLakeFspBinPkg
2. Clone microcode from
https://github.com/tianocore/edk2-non-osi/tree/master/Silicon/Intel/ElkhartlakeSiliconBinPkg

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-05-28 15:13:54 -07:00
stalamudupula 1320881dd9
[CFL][CML][CML-V][EHL][TGL] Use common PchSbiAccessLib (#1161)
Use the newly added PchSbiAccessLib in common package,
for all the current platfroms. Platform specific PchSbi Lib
is removed.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-05-20 11:24:26 -07:00
Ong Kok Tong f94decd222 [EHL] GpioLock update
Issue seen in Yocto RT kernel that PSE GBE0 Transmission.
Found out that GPPC_A_5.pmode=0 (RGMII0_TXCTL) which expected
to be 0x1.
override become 0x0.
After investigation these PADCFGLOCK_GPP_A_0 and PADCFGLOCKTX_GPP_A_0
registers should be 0xFFFFFF to lock the GPIO GPPC_A_x to prevent
modificaiton to the GPIO.
Implemented GpioLock function in GpioLib.c to fix this issue.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-05-14 11:15:32 -07:00
jinjhuli fd1e61f2fa [EHL] PchCycleDecoding support
1. Add missing definition for PchCycleDecoding.
2. Remove PCH H checking.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-28 16:19:15 -07:00
jinjhuli d0d99a0ac1 [EHL] Add FSP UPD in CfgData
Add FSP UPD to CfgData_Silicon.yaml so it can be
modified using Config Editor tool.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-27 07:08:34 -07:00
Ong Kok Tong 072e242afa [EHL] RTC SMI storm fix
Fix SMI/SCI storm after system wake up from S4/S5 rtc
Clear RTC_EN bit in PM1_EN_STS register

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-03-25 17:13:31 -07:00
jinjhuli eb55ede62a [EHL] RTC Initialization
RTC initialization everytime CMOS battery refresh.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-03-23 10:37:56 -07:00
leanshen b48471af82 [EHL] Fix UART init issue and set UART PCI mode as default
This CL fixes the long time issue where EHL SBL failed to init
properly and solely relies on FSP to handle the UART unit, and
hence the limitation of Hidden Mode UART only, as we observed
the UART output gone missing after PCI enumeration if we set
respective UART port into PCI mode in FSP. By hiding the UART,
OS will not be able to see the UART device as PCI device and
lose control to the UART device.

Due to hardware design, different uart could use different
LPSS_IO_MEM_PCP register offset for UART clock setup.

This CL includes dynamic configuration for clock setup by
reading the size of UART control register. Since this is pretty
generic for most of platforms, will plan to move more UART codes
to common codes in the future.

Second fix changes the default UART mode for both FSP-T and FSP-S
to skip uart init, and let SBL solely handles it and setup as a
PCI device.

Signed-off-by: LeanSheng <lean.sheng.tan@intel.com>
2021-03-19 22:18:03 -07:00
Subash Lakkimsetti aa36ae70d1
Oem Key revocation feature support (#1043)
EHL, TGL supports multiple OEM keys and their revocation
by CSE. This patch supports,
- CMDI interface to perform key revocation using
  OEMKEYREVOCATION string in cmd file.
- EHL HECI APIs for OemkeyRevoke and to get key status
- FW componets are sorted as per required order.
  CSME and BIOS should be signed with new keys and
  both components would go together with capsule update.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2021-03-08 11:04:44 -08:00
koktong-ong 89c6d7f0f9
[EHL] Fix yocto hang issue and s0ix enable (#1009)
Resolved yocto hang issue after booted into OS
for non Fusa sku.
Enabled s0ix for yocto and windows.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-02-08 09:10:40 -08:00