Commit Graph

1066 Commits

Author SHA1 Message Date
Talamudupula e6d73eb55b [TGL] Use common GpioLib
Point TGL project to use common GpioLib and fix build errors.
GpioPlatformLib instance for TGL platform is also provided
as a reference for other platforms. Also remove TGL specific
Gpio Library related files.

Usage:

    To configure Gpio pins provided by GPIO CFG DATA:
        ConfigureGpio(Gpio_Cfg_Data_Tag, 0, NULL);

    To configure Gpio pins provided by GPIO_INIT_CONFIG array:
        ConfigureGpio(0, Num_entries, Ptr_to_Array);

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-02-01 19:24:26 -07:00
jinjhuli 8fe45093d4 [EHL] Get SVN ver from capsule during firmware update
ported changes from commit 46e4a98cd1
to EHL.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-02-01 10:01:30 -08:00
leanshen cf6663c996 Add silicon common IgdOpRegion library
This adds a common IgdOpRegion library for the same APIs on TGL
and EHL platforms. Plan to include older platforms support in the v2
patch.

Signed-off-by: Lean Sheng <lean.sheng.tan@intel.com>
2021-01-28 08:56:27 -08:00
Ong Kok Tong d988a8cc81 [EHL] ECLITE support
Enable ECLITE support in SBL EHL

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-01-27 08:01:37 -07:00
Praveen Hp b982bb3df8 [CFL] Fix audio record issue
This patches fixes the audio record issue using onboard 3mm jack.

TEST= booted to windows on both CFL-S & CFL-H board and verified
      Audio playback and record is working using onboard 3mm jack.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-27 07:57:41 -07:00
Praveen Hp 89bb7b2b5b [CFL] Add TPM2 ACPI table
similar to CML, CFL also uses both IOB2 & IOB3 ports to pass the info
and generate an SMI. where as common code ACPI implementation uses
only IOB2, hence TPM2 ACPI tables are ported from CML platforms.
This patch fixes physical presence query and TPM clear issue on windows.

TEST: boot to windows on CFL-H platform and verified TPM physical
      presence and TPM clear command is successfull.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-27 07:56:22 -07:00
leanshen a9b4a48ed3 [EHL] Update Fadt from v5 to v6.1
Update EHL ACPI FADT (FACP) from acpi v5.0 to v6.1.

Signed-off-by: LeanSheng <lean.sheng.tan@intel.com>
2021-01-26 21:43:58 -07:00
Guo Dong c1025b99fd [TGL] Enlarge Payload region Size
Since image form Linux build is a little bigger,
so enlarge the payload region size to fix linux build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-26 21:19:38 -07:00
jinjhuli db12787c8c [EHL] Fix Jenkins build and stitch error
1. Fix jenkins build causes by some binaries
2. Fix Stitchifwi script

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-26 21:17:43 -07:00
jinjhuli b8cc3a43ae [EHL] Fix S4 issue in Windows
Fixes an issue where S4 is not working in
Windows when a PCIE card is attached.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-26 21:15:19 -07:00
jinjhuli 1faaabcd54
[EHL] Set SPI flash EISS and LE (#983)
Set SPI flash EISS and LE in EHL.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-25 17:23:04 -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
Maurice Ma 1771e3a35e
Change PCI resource PCD to patchable type (#979)
Current PCI resource PCD bases are defined as fixed type. It
makes it impossible to dynamically adjust the base at runtime.
This patch changed it to be module patchable so that platform
can update when required.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-25 09:54:32 -08:00
Guo Dong 1ca2058a95 [TGL] Add TCC GPIO support
Add SBL configuration data for TCC GPIO.
Update TCC GPIO UPD and ACPI NVS data based
on SBL configuration data.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-25 09:29:30 -07:00
Guo Dong 5782673871 [TGL] Fix linux stitch using StitchIfwi.py
This patch will fix the linux stitch error
using StitchIfwi.py

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-24 21:26:40 -07:00
Maurice Ma 06d3c531c9 Enable Azure Pipelines with Ubuntu-20.04
This patch moves the Linux build environment into latest Ubuntu
20.04 and updated to use latest ACPICA. All GCC build now is
enabled.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-24 19:47:54 -08:00
Aiden Park 2e9d97de20 Fix a bug in PAE 2MB paging
This will fix invalid PDP/PDE generation with PAE 2MB Pages,
and high bit calculation at PayloadEntry additionally.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-01-23 07:42:19 -08:00
jinjhuli 09f7f879d8 [EHL] Fix EHL Build issue
Fix build issue that cause by missing
HASH_USAGE and ACPI register

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-23 07:42:06 -08:00
Maurice Ma b520f9561c Enable Azure Pipeline build for TGL
This patch enabled auto build for TGL Azure Pipelines.
Only Windows build is enabled. GCC build has IASL issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-22 10:01:37 -08:00
jinjhuli 3b51628a0d Enable/Disable EISS in CommonSocPkg
1. Disable EISS if BLE is not set in DisableBiosWriteProtect()
2. Enable EISS if BLE is not set in EnableBiosWriteProtect()

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-22 08:19:11 -07:00
James Gutbub a018d21694 [TGL] Add TCC mode DLT files
To ease the process of configuring CFG settings to
enable TCC mode, 2 additional DLT files have been
added for TGL-U DDR4 & LPDDR4 boards that can be
copied over the default files (or updated in the
BoardConfig.py) to set TCC mode settings. There
are 2 expectations currently (subject to change
later on):

1. UEFI PLD will be used
2. NVMe media is used for capsule update location

Also, remove TGL-H DLT file since it is not used
currently and update BoardConfig.py accordingly.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-01-21 18:02:12 -07: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
Maurice Ma 5d573cf55e Fix paging issue when PCI PMEM64 resource exists
In 32 bit SBL, when PCI PMEM64 exists, the OsLoader will hang
during boot in CreateIdentityMappingPageTables().  The function
is inteneded to be used in X64 mode only, and cannot handle
32bit well. So OsLoader should not call it for 32 bit build.

This patch also zeroed the allcated memory to ensure the unused
entries are all 0.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-21 14:08:53 -08:00
Aiden Park ba39f788cf [BoardConfig] Support Inherited BoardConfig
This will allow inherited BoardConfig from the existing one
in the same BoardPkg. It will be useful when a new BoardConfig
has very minimum difference from the existing one.

See Platform/QemuBoardPkg/BoardConfigOverride.py as a reference.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-01-21 08:27:42 -07:00
jinjhuli b22ae3c147 [EHL] Initial silicon package baseline for EHL platform support
Build command
python BuildLoader.py build ehl

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

*Both command will only works after adding Elkhartlake platform
package in upcoming patch.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-21 08:19:50 -07:00
Maurice Ma ee92586656 Fix 32bit payload calling convention
Current Execute32BitCode() passes in 64bit arguments into stack.
It should use 32bit arguments instead according to 32bit calling
convention. This patch fixed this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-20 13:58:12 -08:00
jinjhuli 0d91f28053 [EHL] Initial platform package baseline for EHL platform support
Build command
python BuildLoader.py build ehl

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

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-19 22:04:24 -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
Guo Dong 78cce60ce8 Enhance PreOS support
SBL support to load PreOS and normal OS in a single boot option.
This patch tries to standardize the PreOS support.
The PreOS could be TrustyOS, PreOsChecker or others.
As long as PreOS flag is set in boot option, SBL will load and
boot PreOS before normal OS. If the preOS has specific requirement,
it could be addressed using PreOS image type.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-15 21:29:43 -07:00
Jim Pelner b233392924 Corrected invalid octal constant declarations TGL ASL
Corrected declaration of _PSD methods (ApPsd.asl) and _TPC, _PTC,
_TSS and _TSD methods (ApTst.asl) under index 10. Indexes 8 and 9
were declared 08 and 09, respectively, which represent invalid
"octal" constants. These were not flagged as errors in the currently
supported ASL compiler, but these the ACPI specification clearly
indicates these were invalid, and they would actually flag an error
when the recommended ASL compiler is updated to a newer version.

Signed-off-by: Jim Pelner <jim.pelner@intel.com>
2021-01-15 14:10:01 -07:00
Subash Lakkimsetti 1f0b99cf3b Update get_openssl_path to return absoulte path
Tools as MEU used for signing and generating key manifests
expects to pass abosulte openssl paths. Updating
get_openssl_path to return paths for linux cases.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2021-01-15 13:24:07 -07:00
Guo Dong c408c94737 use different workspace to prepare binaries
Different projects might use different repo to get binaries.
or different project might be built at same time. so change
to use different workspace for different project to avoid
potential conflict.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-14 10:47:02 -08:00
Maurice Ma a85f327ad8 Enhance BGRT BMP support for logo display
BGRT can be used by bootloader to pass logo to OS. But BGRT can
only support 24bit or 32bit BMP format. If the bootloader uses
other bit format or indexed color format, the image has to be
converted before passing it to BGRT. This patch added support
to convert other BMP image format into 32bit format required by
BGRT.

This has been tested with Windows on Leafhill board. The SBL
logo was dispalyed properly while booting Windows.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-14 09:52:36 -08:00
Talamudupula 4f981f69ae Add missing EFIAPI in GpioSocLib.h
Adding the EFIAPI modifier to make sure all lib
function calls follow correct calling convention.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-01-13 17:23:28 -07:00
Sai Talamudupula d3f601b67d Add common GpioLib
This patch adds a common GpioLib that all platforms
can link to. Common GpioLib requires platforms to
implement the GpioInfoLib to provide platform-specific
information like GroupInfo etc.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2021-01-13 10:56:15 -07:00
Praveen Hp b111c8f75e [CFL]Fix payload selection GPIO issue
WHL CRB board is configured to boot different payload based on GPIO pin
status, which is not working currenly.
this patch ensures to boot to Osloader payload when PayloadSelGpioData=1
otherwise boot to UEFI payload.

TEST= Boot test on WHL CRB and verified board able to switch between
OSloader & UEFI payload based on DIP switch R4H1B_4 status.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-12 14:41:06 -08:00
jinjhuli f3076fbb60 [TGL] Update flags to align with UEFI BIOS
Updated flags that missed out from baseline patch
and to align with UEFI BIOS.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-12 15:12:56 -07:00
Maurice Ma 86a24b8171 Fix GenContainer python scripts
After GenContainer script was created, there ware more changes
introduced for signing and compression. However, GenContainer
was not updated to match those new changes. This patch addressed
this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-12 15:06:58 -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
Sachin Agrawal e3cedba233 Handle TPMStartup error during S3 resume
As per TCG spec, if a Tpm2Startup(TPM_SU_STATE) fails during
S3 resume, a host reset should be done.

When BootGuard is enabled, ACM will notify of this failure via Bit46 in
BootGuardBootStatus register.


Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
2021-01-11 12:43:11 -08:00
Guo Dong 12067aac3f [TGL] Add missing binary files
Added missing SPD config files.
And removed TsnMacAddr.bin requirement from build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-11 12:41:33 -08:00
jinjhuli 94aa044b1a [TGL] Initial platform package baseline for TGL platform support
- Build command
  python BuildLoader.py build tgl

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

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-11 08:37:11 -07:00
Guo Dong 89c7b82b84 Fix the HelloWord build failure
Add required library for HelloWorld build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-11 08:20:30 -07:00
Talamudupula c62c995e49 Update correct BarType field for VF Bar program
ProgramBar() routine uses 'OrgBarType' field to
determine BarType. So, if a BarType is valid, copy
it to OrgBarType for VF also.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-01-07 20:22:54 -08:00
Guo Dong 5873b52d6b Add '.exe' extension if missing for windows build
run_process is used several places. Sometime
the extension name is not given for windows build.
In this case, if same file without file extension
exist (e.g. fit and fit.exe), then fit will be used
for windows build. It is not expected, so this patch
will add the missing .exe extension for this case.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-07 08:55:17 -07:00
Maurice Ma a2725951ad Removed deprecated python imp module usage
Python 3.4 and above have deprecated imp module in favor of
importlib.  This patch removed imp module usage from SBL, and
used importlib instead.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-06 11:16:59 -08:00
Divneil Rai Wadhawan e028de5c4a [CommonSocPkg]: Remove ME BIOS Payload (MBP) handling from HeciLib
o MBP is platform specific data which may be different for derivative
  platforms, so, the handling is moved back to platform code

Signed-off-by: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com>
2021-01-06 11:11:45 -08:00
James Gutbub 6a1ad8f5e3 Make Python lz4 module optional
To avoid any dependency on non-standard python modules
it is preferred to make the binary Lz4 compression the
default flow and try the python module as a backup. Also
recommend to use a known working version of the lz4
python module, 3.1.1.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-01-04 15:05:50 -08:00
James Gutbub ab49d6c9a0 Use Python lz4 module for LZ4
To make SBL scripts/tools more OS-agnostic the
lz4 (de)compression module can be used instead of
relying on the BaseTools LZ4 package/executable.

Need to update the azure pipeline to install
the python lz4 module before running the builds.

TEST=Confirmed that the python lz4.block.compress
     routine is compatible with Lz4DecompressLib
     during SBL runtime to decompress LZ4 binaries.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2020-12-22 13:19:52 -08:00
jinjhuli 99fe66faf8 [TGL] Initial silicon PCH package baseline for TGL platform support
Build command
python BuildLoader.py build tgl

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

*Both command will only works after adding Tigerlake platform
package in upcoming patch.

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