Commit Graph

1086 Commits

Author SHA1 Message Date
James Gutbub 738f946aac Allow Ext23Lib symbolic links to have longer paths
In the Ext23Lib support for symbolic links was recently enabled
but there was a limitation imposed to use the CFG data boot
option filepath limit of 16 bytes which does not need to be also
be imposed on symbolic link paths. This will allow symbolic link
paths to be up to 260 characters long.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-04-29 19:33:09 -07:00
Ong Kok Tong fe116c43ed [EHL] Update FIVR settings in CfgData
1. Copy the FIVR settings in CfgData for user to configure
the desire value.
2. Removed fsp upd PmSupport for Fusa sku

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-04-28 16:28:08 -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
Aiden Park a1298c8f3b [Build] Make 'git' version checking optional
The build system is using 'git', it doesn't require the latest git.
This will show 'git' recommend version if not met,
and will address issue#1136.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-04-27 09:12:56 -07:00
Maurice Ma 7deab616aa Add ELF image support for OsLoader
This patch enhanced OsLoader to support ELF image boot on top of
PE, FV, Multiboot and Kernel. As a result, a new image flag
LOADED_IMAGE_ELF is added to indicate ELF image type.

Verified SBL can boot uboot ELF image (non-Multiboot) on QEMU.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-27 09:12:17 -07:00
leanshen cab7898372 [EHL] Enable SMRR programming in SMM rebasing flow
This CL is a follow up on these CL to enable SMRR programming:
https://github.com/slimbootloader/slimbootloader/pull/1106
https://github.com/slimbootloader/slimbootloader/pull/1114

In normal UEFI payload case, the UEFI will handle SMM rebasing.
If SMM rebasing is handled by SBL, SBL will put a dummy SMI handler
at the new SMBASE to prevent SMM hang. Beyond SMM rebasing, it
is also required to program SMRR registers.

This patch added this support for EHL by setting ENABLE_SMM_REBASE
flag to auto mode.

Signed-off-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
2021-04-27 07:08:57 -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 078643f4c0 [EHL] fix s0ix issue for pcie attach
S0ix failed to enter when pcie card is attaching.
The _OFF method of RP01 power resource didnt get
called upon entering s0ix.
Workaround by performing the action in _OFF and _ON
method in low power idle entering callback.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-04-26 09:07:23 -07:00
Aiden Park bc5584d176 [Build] Verify toolchain versions
This will check the minimum required toolchain versions
before starting build process.
If any of these toolchains does not meet the required version,
the build process will stop immediately.

Here are the initial minimum toolchain versions.
- python : 3.6.0
- nasm   : 2.12.02
- iasl   : 20160422
- openssl: 1.1.0g
- git    : 2.20.0
- vs     : 2015
- gcc    : 7.3
- clang  : 9.0.0

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-04-26 09:07:04 -07:00
Subash Lakkimsetti e778825d28 [TGL] Operational region for ACPI Control SMI_EN access
This is an regression introduced with platform asl updates.
SMIE is checked in Tpm asl before SMI is triggered.
Removal of this definition causes physical presence
usecases failure.

TEST=Verified TPM clear usecases with windows boots

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2021-04-21 20:30:03 -07:00
jinjhuli 13588159be [TGL] Fix KW issue
Add NULL checking for FeaturesCfgData.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-20 20:10:31 -07:00
James Gutbub 810a0b1c54 Resolve issue with MpInitLib VS2015 compiling
Need to add some typecasting to resolve a build
issue with MpInitLib when using VS2015 compiler.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-04-19 16:49:38 -07:00
Maurice Ma cf5293c55c Restruct MpInit NASM code
This patch restructed MP init library so that more code can be
common between 32bit and 64bit. It is much easier to maintain the
code after the restructure.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-19 08:53:55 -07:00
Maurice Ma fb1e05a51c Enable QEMU SMM rebasing
This patch enables QEMU SMM TSEG programming in FSP. And it also
enables SBL QEMU SMM rebasing. It can be used to test many SMM
related flow.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-19 08:53:55 -07:00
Maurice Ma 62532aa7fa
Set PayloadId earlier in Stage2 (#1125)
QEMU currently set PayloadId in Post PCI enumeration. To be in
sync with other platform, this patch moves it to PreSiliconInit
hook point.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-19 08:49:34 -07:00
stanley d05938d579
Fix NVMe failure because of bus master not enabled (#1124)
With recent code change of disabling all PCI bus master
by default, NVMe may not work in some platform (e.g., Qemu).
This patch set/clear bus master during NVMe init/deinit.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-04-19 08:48:34 -07:00
Maurice Ma 625947617c
[EHL] Fix CFGDATA issues on EHL (#1123)
EHL CFGDATA has missing options for Combo type configuration. And
it will cause ConfigEditor exception. This patch added the missing
options. And it also fixed typos.

It fixed issue #1122.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-19 08:47:14 -07:00
Maurice Ma 4e47d2ed74
[WHL] Clear power button status on normal boot flow (#1113)
When S3 resume fails for some reason, the power button status will
be not be cleared on next boot. It might trigger shutdown event in
payload. This patch will clear power button status bit on normal
boot flow so that system can still boot properly.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-19 08:46:27 -07:00
James Gutbub 10b1685dc5 Add support for symbolic links to Ext23Lib
Some of the boot option file paths used when
booting with OS Loader payload are failing
because the Ext23Lib does not support symbolic
soft links (e.g. ln -s <file> <link>). This
patch adds support for loading the soft link
succesfully.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-04-15 08:32:34 -07:00
Talamudupula 85826d40f2 Fix buffer overflow for copy in S3SaveRestore lib
For appending Save/Restore structs in TSEG area,
bootloader should reserve space for TotalSize and
for certain structs, only header info should be
actually populated. Rest should be all Zeros.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-04-14 11:16:13 -07:00
Stanley Chang 4603bc0611 [CML] enable SMM rebase
Set SMM related PCD early and update platform
to enable SMM rebase

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-04-14 11:15:22 -07:00
James Gutbub e21afb2368 Resolve SmmRebaseMode klocwork issue
Need to set an initial value for SmmRebaseMode in
order to resolve a klocwork issue regarding
unitialized usage.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-04-14 11:14:40 -07:00
Guo Dong d14b67caff [TGL] Fix boot issue and enable SMM rebase
With latest core code change, it would boot hang.
So need set SMM related PCD early and update platform
to enable SMM rebase.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-04-13 17:19:48 -07:00
Maurice Ma 8659c29ac0 Enhance SMM rebase check condition
Current SBL SMM rebasing check is only performed when PcdSmmRebaseMode
is enabled. It does not cover the case to boot UEFI payload. This patch
enhaced the check to cover UEFI payload S3 path as well.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-13 16:00:32 -07:00
Maurice Ma ded75d8859 Enable SBL call into extra module in boot option
SBL allows extra module to be called before tranfering into the main
boot option. For example, RTCM module can be called for boot option
with TCC feature support. This patch enabled this support.  Since the
extra module might have different ARCH mode from current SBL mode,
thunk will be provided if mismatching is detected.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-13 14:05:48 -07:00
Maurice Ma a73d37fa91 Delay SMRR enabling
When SMRR is enabled too early, it blocked TSEG access in Stage2.
And it caused S3 related issues. This patch delays the SMRR enabling
to be after PrePayloadLoading BoardInit().

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-12 16:52:46 -07:00
Maurice Ma fda951e10a Add image ARCH type into SBL version info
SBL can support IA32 and X64 build. But this info is not indicated
in the SBL version info. This patch added one bit to indicate the
SBL is IA32 or X64.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-11 20:32:21 -07:00
jinjhuli 4d22480b49 [EHL] Modify boot option to support non-FuSa SKU
Modify boot option dynamically to support non-FuSa SKU

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-11 11:37:25 -07:00
Maurice Ma 94d22382bd [APL/CFL] Enable SMM rebase for mon UEFI payload
For non UEFI payload, SBL will install dummy SMI handler for
security concern. For UEFI payload, SMM rebasing is expected
to be done itself. This patch enabled this feature for APL and
CFL platform.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-10 15:28:07 -07:00
Maurice Ma af807ee2d0 Enable SMRR programming in SMM rebasing flow
In normal UEFI payload case, the UEFI will handle SMM rebasing.
If SMM rebasing is handled by SBL, SBL will put a dummy SMI handler
at the new SMBASE to prevent SMM hang.  Beyond SMM rebasing, it
is also required to program SMRR registers. This patch added this
support for core code. It also added TSEG PCD init for CFL.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-10 15:28:07 -07:00
Ong Kok Tong 036c3da1bd [EHL] FSP UPD and stitchifwi update
Update stitchIfwi script with below softstraps settings:
|Offset | Start Bit | Strap Size | Value | Comment      |
0x183    0x1          0x2         0x0     DMI/OPD_LVO
0x1cc    0x4          0x4         0x0     FIA/LOSL8
Update fsp upd below:
PchFivrExtV1p05RailCtrlRampTmr -> 0x1
TdcTimeWindow -> {0x00, 0x00, 0x00, 0x00, 0x01}

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-04-10 14:45:25 -07:00
Guo Dong 6c418f47f0 Update boot option Template
Update Boot Flags to list PreOs and Extra image.
Hide other options when preOS or Extra Image is selected.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-04-10 14:44:13 -07:00
jinjhuli d746444ac8 [TGL-U] S0ix Support for TGL-U
Updated ACPI Tables, NVS data and FSP UPDs for S0ix support
S0ix is working on yocto through USB boot and windows through CPU M.2 NVME

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-09 13:54:18 -07:00
leanshen e8e37ff79f [EHL] Rework flash map
Rework flash map to prepare extra empty size for FW update and
future growth.

Here are related changes:
1. Expand the SBL size to 13MB
2. Hardcode and increase Redundant size to 0x360000
3. Allocate the remaining space for Non-Redundant space

Signed-off-by: leanshen <lean.sheng.tan@intel.com>
2021-04-08 19:10:43 -07:00
leanshen 943341f3d8 [EHL] Rework DebugConsent related code part 1
DebugConsent related UPD configs should be able to updated via
YAML configs, hence restore to the intended design which allows
user to update these configs via YAML/SBL config editor tool.
This CL also add debug print for these configs.

When DebugConsent is set to manual, DebugInterfaceEnable should
be set to 0 to disable CPU run control.

Part 2 will bring changes to YAML to properly reflect the right
setup combo for Debug Settings and a separate Debug CfgData.

In the end, DebugConsent configs are pretty standard across most
of platforms and should be moved to common codes.

Signed-off-by: leanshen <lean.sheng.tan@intel.com>
2021-04-08 19:10:26 -07:00
Ong Kok Tong 6ee1622210 [EHL] FSP UPD update
Enabled IBECC by default and for all sku
Changed IbeccOperationMode to 0x2
Enabled WoL

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-04-08 12:55:20 -07:00
Guo Dong f058ea7941 Update TCC config data strings
Update TCC config data strings to use the formal names.
And change the default value to make TCC disabled by default.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-04-08 07:30:23 -07:00
Ravi Rangarajan 8e6dfe1670
Update README.md
Include comment about use of other open source sw.
2021-04-06 13:53:28 -07:00
Aiden Park 209a159176 [PCI] Disable PCI devices bus master by default
This will disable all PCI bus master by default, and enable it only if
- the original bus master was enabled before PCI enumeration
- Or the device is PCI Bridge

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-04-06 13:30:59 -07:00
Adithya Baglody fec4f039f6
csmeupdatedriver: Fix incorrect typecasting. (#1100)
This patch fixes the default 32bit typecasting of a pointer.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2021-04-06 10:47:55 -07:00
Maurice Ma ae3ffa3ee8 Print Payload ID in human readable format
This patch printed Playload ID in human readable string format
instead of HEX string.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-05 17:04:20 -07:00
Maurice Ma 631489e1e4 [QEMU] Allow to run specific test case
This patch added argument support for qemu_test.py so that a
specified test case can be launched separately. Wilecard chars
are supported for the test case name.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-05 09:41:37 -07:00
Maurice Ma c423d5a06d Fix thunk build issue for some environment
On some build environment, NASM will fail to compile Thrun32To64.nasm.
It is because of "BITS 64" usage in WIN32. This patch removed the BITS
64 usage and used opcode prefix instead to resolve this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-05 09:41:25 -07:00
Maurice Ma 13733b12bf Add thunk support from 32bit to 64bit
This patch added thunk support from 32bit to 64bit. It allows SBL
to call 64bit API entry from 32 bit compatible mode. It is useful
when the payload mode is different from SBL mode.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-04 10:59:46 -07:00
Maurice Ma 41ccfcca7c Clean up release build debug output
Current SBL release debug output has more than what is expected.
This patch reset some of the debug message to proper level to limit
debug message for release build.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-04 07:59:03 -07:00
Ong Kok Tong b14d149bb4 [EHL] Softstrap override WA
SBL EHL softstrap override WA due to bug in FIT 2252
1. Offset 0xc1c-> Bit 0x1 to value 0x1
(pmc_smip/RSVD_2A_DIS_STRAP_PSEGBe0)
2. Offset 0xc1c-> Bit 0x2 to value 0x1
(pmc_smip/RSVD_2A_DIS_STRAP_PSEGBe1)
3. Offset 0x1d5-> Bit 0x4 to value 0x1
(MGBE/mgbe_soc_specific)
4. Synced other FIT values

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-04-02 09:17:30 -07:00
Maurice Ma 454efdda2e Add CLANG toolchain build support
This patch will enable CLANG toolchain build on Linux and Windows.
Currently CLANG toolchain build still needs Visual Studio to provide
nmake utility in Windows.
To build with CLANG, please add build option "-t clang". It assume
CLANG is installed at default path. It has been tested with SBL
QEMU x86 build.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-02 09:07:57 -07:00
jinjhuli c4a26d9489 [EHL] Boot option for PreOS support
Modify boot option in EHL for PreOS support.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-02 07:59:55 -07:00
Guo Dong d4f1efd8d6 Fix the boot option
When PreOS is configured from OS boot option data, the common function
FillBootOptionListFromCfgData () need update it to correct boot option
image LoadImageTypePreOs. Similarly when extra image is specified, need
update to extra image.
Update ImageType value and fix an image load issue for RTCM.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-04-01 17:02:25 -07:00
jinjhuli 923d27ac81 Enable Azure Pipeline build for EHL
This patch enabled auto build for EHL Azure Pipelines.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-04-01 11:03:56 -07:00