Commit Graph

22 Commits

Author SHA1 Message Date
Randy Lin 500300c537 [CMLV] Fix wrong value of PchMaxPciePort
According to H410 PCH EDS data, it should be 20.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2021-12-23 10:04:36 -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
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
Stanley Chang 53496b3423 [CML] Fix RTC S3 wake hang
This patch clears RTC alarm when RTC is the S3 wake-up source.
Without clearing it, SMI# will be triggered once SMI_EN is set
by RestoreS3RegInfo, but no handler to clear it which results
in hang.

In addition to clearing RTC SMI#, this patch also clears other
SMI# as UEFI BIOS does.

Test method: rtcwake -m -s 15

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-10-04 06:18:23 -07:00
Maurice Ma 3db9baca8d Add PciSegmentLib implementation
This patch added PciSegmentLib implementation from EDK2 MdePkg.
This library can be used by silicon libraries to access PCI
device with multiple segments. As part of this change, the
duplicated files were removed for CML and CMLV.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-09-22 08:32:58 -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
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
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
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
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
Raghava Gudla ca738786cc
Fix firmware update failure during sbl svn check (#999)
This patch fixed a failure in firmware update that
occur during SBL version check. Current code assume
that the SBL layout does not change between the existing
firmware and the capsule, when the layout change, stage1A
address change and this is causing error while obtaining
the firmware version.

Code is modified to use the last 4 bytes of the SBL region
which contain Stage1A FV address and this is used to obtain
the version information.

Signed-off-by: Raghava <raghava.gudla@intel.com>
2021-02-05 09:01:26 -08:00
Raghava Gudla c9be70efd2
Fix failure during csme firmware update (#982)
This patch fixed a failure occured during CSME firmware
update. CSME firmware update library expects PCI read buffer
with a specific format, there is mismatch with input and output
parameter with the current code. Added a wrapper function
with the expected format to fix the failure.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2021-01-25 15:46:54 -08:00
Praveen Hp eeb5e1ac10 Fix Secureboot status in PSD
CFL, CML, EHL, TGL platforms are using PSD version 0.3.
as per PSD Spec v0.3 secureboot status indication as ber below,

000 – Secure boot is Disabled
001 – UEFI Secure boot is enabled
010 – Boot Guard is Enabled
100 – Bootloader Verified boot is Enabled

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-21 16:47:38 -08:00
Raghava Gudla 46e4a98cd1 Get SVN ver from capsule during firmware update
During firmware update svn check for SBL region, Current code
assumes that Stage1A base does not change, because of this when
Stage1A base changed in capsule image, getting svn version from
the capsule fails and firmware update is failing.

This patch addressed above issue by reading stage1A base from
capsule image, this way even if stage1A base changes, code will
be able to read it and get svn version from capsule.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2021-01-16 09:41:04 -07:00
jinjhuli 7bbc273c1b
Revert "[CMLV] Fix PMC register offset value (#887)" (#951)
This reverts commit b53de73b53.
Revert the particular commit to solve Gpio error.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-12 14:04:00 -08:00
jinjhuli b53de73b53
[CMLV] Fix PMC register offset value (#887)
Fix register R_PMC_PWRM_GPIO_CFG to the correct
value: 0x1920.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-10-24 08:22:34 -07:00
jinjhuli f87c9a7d2c [CMLV] Code clean-up
Removed empty lines, unused defines, comments,
empty files and empty #ifdef with clean-up tool.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-10-09 15:18:44 -07:00
jinjhuli f088f629c8 [CML] Fix travis build fail
1. Fix payload size.
2. Fix microcode clone command.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-09-18 06:42:02 -07:00
jinjhuli e5673c48a4 [CMLV] Initial baseline for CMLV platform support
- Build command
  python BuildLoader.py build cmlv

- Stitch command
  python Platform/CometlakevBoardPkg/Script/StitchLoader.py
  -i <EXISTING_IFWI_IMAGE>
  -o <SBL_IFWI_IMAGE>
  -s Outputs/cmlv/SlimBootloader.bin

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-09-15 09:17:48 -07:00