58 Commits
Author SHA1 Message Date
Bejean Mosher d888673acd fix: [ADL/RPL/BTL] Build error with VS2022
Explicit cast added to resolve a build error with VS2022 caused by
bitwise ORing different enum types.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-07-11 12:08:54 -05:00
Bejean Mosher be0cf0bf32 fix: [BTLS] 12P CPUID detection support
BTL-S Hybrid shares its CPUID with ADL-S, but 12P parts introduce a
new CPUID. Added support to GetCpuSkuInfo() to detect this new ID.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-07-02 14:24:38 -07:00
Bejean Mosher e66eec142e fix: OSLoader shell boot command doesn't set Valid status of RAW LBA
When changing a boot option from a non-RAW type to RAW, the boot command
does not set the valid field of the LbaImage.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-06-16 09:55:15 +08:00
Bejean Mosher b72f0d3c80 [ADL/RPL/BTL/TWL] Set SMI lock bit for Osloader
Set SMI lock bit at ReadyToBoot for Osloader.

Test info: Confirmed SMI_LOCK setting in OSLoader Ubuntu with
devmem2 MMIO read.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-05-19 15:50:40 -04:00
Bejean Mosher 39d0ea8c19 fix: [BTL-S] Remove TCC ACPI Platform code for BTL-S to match RPL-S
BTL-S TCC design matches RPL-S so there is no RTCT and no TCC tuning table.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-05-01 14:15:07 -04:00
Bejean Mosher 51269276f4 fix: [BTL-S] Change SmmRebase mode to "Auto NoSmrr" for edk2 202411
edk2-stable202411 based UEFI payload requires Smm Rebase without setting
SMRR. Set this new auto mode for compatibility with this and newer uefi
payload.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-04-29 06:56:23 -04:00
Bejean Mosher 903c9ba566 fix: [RPL-S/BTL-S] Fix x64 build failure in Ubuntu 20.04
OS Loader hitting FD space limitation on linux x64 Ubuntu 20.04
build on these two platforms.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-04-28 10:19:59 -04:00
Bejean Mosher a85faaabf3 feat: [BTL-S] Add BTL-S builds to Azure CI pipelines
Add BTL-S build targets to azure build tests for pre-commit check.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-04-28 10:19:59 -04:00
Bejean Mosher 6686cc47d8 fix: [BTL-S] Build error from bad VBT path in CopyList
Wrong VBT path in FSP INF copy list was causing a build failure.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-04-24 10:27:28 -04:00
Bejean Mosher e227c8ca9d [BTL-S] Upstream BTL-S Hybrid platform.
Add support for BTL-S Hybrid platform and collateral.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-04-23 12:29:55 +08:00
Bejean Mosher 49190cf578 fix: Setup Payload incorrectly handles config data with the refer flag
CfgDataTool de-dupes config data in some circumstances when using the
"merge" command. In such a case, the CDATA_FLAG_TYPE_REFER flag is set
in the header, and a special REFERENCE_CFG_DATA struct is added after the
conditions that points to the reference Config Data. ConfigDataLib's
BuildConfigData() triggers a config data corruption when handling these
that needed to be fixed. Instead, the setup payload will expand these
de-duped configs using the reference data so they can be modified
independently. This will cause an increase in Config Data size when
saving data from setup in these cases.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-03-05 19:56:47 -05:00
Bejean Mosher 7f169cb0a5 fix: PayloadMod stack base alignment in x64.
RSP must be 16 byte aligned in x64.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-02-18 18:56:50 -07:00
Bejean Mosher e188e887a4 fix: Gracefully handle value conversion error from bad YAML in Setup
Mismatch between YAML config type and value was causing setup to crash.
Handle it gracefully and print an error instead.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-02-18 18:56:50 -07:00
Bejean Mosher 3b14c69f67 fix: SblSetup payload issues with loading and saving data.
Fix loading and saving issues with SblSetup payload when Config Data
layout differs from ConfigDataDef.json file. ConfigDataDef.json used
by setup payload has config data order based on defaults, while actual
binary config values retrieved from ConfigLib can have order changes
triggered by board deltas.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-02-10 11:31:55 -07:00
Bejean Mosher 0bcefec921 feat: Support calling into x64 FSP
FSP 2.4 introduces the possibility of FSP built for x64 architecture.
This adds support for x64 FSP calling conventions based on the header x64
support attribute. Support for x64 FSP-T requires entering long mode
prior to FSP-T execution.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-02-06 10:08:15 -07:00
Bejean Mosher 4d4d5a6fa3 fix: Allocate FSPM UPD from heap instead of stack
FSP 2.4 with MultiPhase support expects FSP UPD buffer to stay accessible
after CallFspMemoryInit() returns, so FSP must be allocated from the heap
instead of stack.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-02-06 10:08:15 -07:00
Bejean Mosher 870bd54c68 fix: [APL,ADL-PS] Linux CI build failure from payload size increase
ContainerLib fix causes payload size overflow on APL and ADL-PS linux
builds.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-01-10 13:46:03 -05:00
Bejean Mosher cc1ce07651 fix: Prevent creation or authentication of containers with no comp auth
Prevent GenContainer.py from creating monolithic signed containers with
no component authorization data. Prevent ContainerLib from
authenticating such containers when verified boot is enabled.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-01-10 13:46:03 -05:00
Bejean Mosher e90446f8b4 fix: [ARL] DmiAspm value "4" no longer supported by FSP
FSP no longer supports value of 4 (Auto) for DmiAspm. Setting this breaks
Package C10 and S0ix. Fallback to YAML config value (currently 2 for "L1").

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-12-11 17:33:14 -05:00
Bejean Mosher 5b7fed0f68 feat: Add FIPS compliant IppCryptoLib instance.
Latest ipp-crytpo code is FIPS compliant. Need to add it as a submodule
to maintain FIPS compliance. This requires adding each ASM optimized
implementation as a separate .inf file and selecting at the platform
level. Old IppCryptoLib instance needs to be kept for backwards
compatibility.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-11-26 10:52:35 -05:00
Bejean Mosher e69378bc2d feat: Add Board flag for AP Init Wait time
Some silicon requires longer than provided for all APs to enter the wakeup
routine. This change makes this platform configurable. The default wait
time is none and can be increased for platforms with higher core count Si.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-11-21 14:22:48 -07:00
bejeanmo 631278e656 fix: [ARL-S] Workaround for windows boot delay (#2314)
Adding a 3ms delay before any EC Read from ACPI resolves the windows boot
delay. Still following up on root cause.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-10-23 10:57:01 +08:00
bejeanmo 00ee49b494 Update azure-pipelines.yml for Azure Pipelines
Enable recursive submodule checkout for CI build
2024-10-17 11:35:36 -04:00
bejeanmo 2e9df8355b fix: [ARL] Update GfxDeviceInfo after PCI Enumeration. (#2303)
Update the GfxInfo HOB FrameBufferBase after the IGD BAR is reallocated
during PCI enumeration. This resolves an issue where video output doesn't
work for the UEFI payload with newer FSP versions.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-10-10 08:04:03 +08:00
bejeanmo 407cca9e68 fix: Source Level Debug breaks in X64. (#2283)
DebugAgentLib was using its own IDT Entry structure definition that
didn't adjust for x64. Removed this definition and switched to built
in definition from ProcessorBind.h which does adjust for architecture
correctly.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-09-04 16:52:35 +08:00
bejeanmo e3dfb721bb fix: GenContainer.py not setting default auth type correctly (#2250)
When no auth parameter is specified on the command line, gen_layout
chooses auth type based on provided key, but this does not get correctly
applied to the monolithic signing component because of an order of
operations issue.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-08-15 13:02:37 -04:00
bejeanmo 6782c945b4 feat: [RPL-PS] Upstream RPL-PS code. (#2231)
Add RPL-PS Platform code to public repo.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-07-24 11:59:49 -07:00
bejeanmo 203e62ef95 fix: Reload segment selectors after GDT Load in Stage1a (#2224)
If ResetVector GDT is different from that loaded in Stage1A SecStartup()
then segment selectors need to be reloaded after GDT is updated.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-07-10 15:47:51 -04:00
Bejean Mosher d6fdbca903 fix: Remove deprecated python imp module
Python imp module is removed in 3.12+ and will cause a build error.
Replace with importlib.machinery.SourceFileLoader.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-06-17 08:11:02 -07:00
Bejean Mosher 04132381bd feat: Add BoardConfig field to control Stage1B remap
Adding new Board Config item REMAP_STAGE1B to control remapping Stage1B
into permanent memory after FSP-M. Decouple this from ENABLE_FAST_BOOT
and STAGE1B_XIP. This makes it simpler to enable this remap when the
slight performance boost may be needed, and leave it disabled by default.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-06-04 13:07:16 -07:00
Bejean Mosher 1d38f8e69f feat: Validate BMP headers to protect against LogoFAIL.
The SBL logo is verified as part of Stage2 verification, so untrusted
logos won't be parsed, but it's still good to prevent dereferencing BMP
header pointers that may fall outside of BMP file.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2024-01-08 15:04:47 -07:00
Bejean Mosher cd460908ec fix: [ADL/RPL] ITE8659 HwMon initialization fails.
As part of ITE8659 SIO init, HwMon device is enabled, but eSPI decode was
not enabled for the IO address range.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-12-11 17:00:56 -07:00
Bejean Mosher 29a3aa82fc fix: [ADL/RPL] fill in 64bit MMIO resources in ACPI when enabled.
When 64bit MMIO above 4GB is enabled, ACPI resource descriptor needs
to be filled in to describe it.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-11-13 18:05:56 -07:00
Bejean Mosher 028087e30d fix: Container header parsing failure in some cases.
GetContainerHeaderSize() parses header component entries to find the
offset of the end of the last component entry and checks this against
ContainerHdr->DataOffset. However, there is a valid case where this can
exactly equal to ContainerHdr->DataOffset, when the component alignment is
small enough and there is no component auth data (AuthType is none). This
check is changed to fail on greater than instead of greater or equal to
cover this case.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-11-02 14:47:36 -07:00
Bejean Mosher 67a5c4d458 fix: [ADL/RPL] Fix up flash map memory map entry when flash size > 16MB.
When PcdFlashSize is > 16MB, the corresponding memory map entry will be
incorrect since on ADL/RPL only the top 16MB of flash is mapped into memory
by the PCH.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-06-23 13:53:46 -07:00
Bejean Mosher 35c72b8db1 fix: [ADL/RPL] Correct typos and display issues in FuSa YAML file.
FuSa Configuration YAML file introduced some description typos and display
issues in the Configuration Editor.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-06-21 09:54:17 -07:00
Bejean Mosher 1b987b2f5f feat: [RPL-P] Remove FuSa feature delta file from AlderlakeBoardPkg.
FuSa feature delta file will be part of RaptorlakeBoardPkg for RPL-P when
it is upstreamed to avoid confusion.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-06-16 11:09:38 -07:00
Bejean Mosher e922842e08 feat: [ADL/RPL] FuSa updates based on latest FSP and specification.
- MC and CMF Parity combined into one FSP UPD.

- Added SBL Config items for IehMode, TCSS D3Hot and D3Cold, CPU PCIe
Power gating, VccSt, TCSS Cstate limit. These are all needed for the FuSa
specific dlt file. ADL-S dlt files updated so D3Hot and VccSt defaults are
unchanged, since these defaults were previously set by PCH sku.

- FuSa diagnostic mode PCD to track Diagnostic mode across stages. Crash
Log Data PCD will not be used and has been removed.

- GSPI example driver header file added.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-05-23 15:52:20 -07:00
Bejean Mosher 96f72c39b8 feat: FuSa Configuration library template, and ADL/RPL FuSa Cfg Data.
Added Null template for FusaConfigLib. Platforms supporting FuSa should
follow this template for enabling FuSa configuration prior to FSP-M and
FSP-S.

Added ADL/RPL CfgData fields for FuSa according to SBL FuSa software
requirements, and dlt file for enabling FuSa and related configuration.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-04-26 14:54:21 -07:00
Bejean Mosher 72cb5df4ab feat: [ADL/RPL] Update CrashLog support implementation for latest FSP.
New CrashLog support design is for FSP to collect CrashLog info and report
in HOB. Bootloader responsibility is just to populate ACPI BERT with FSP
collected CrashLog Data now. That way bootloader has no Silicon code.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-04-12 15:49:52 -07:00
Bejean Mosher 1186dc0712 fix: [ADL/RPL] SBL image larger than 16MB hangs after TempRamInit.
The PCH decodes MMIO accesses to the top of 4GB to SPI flash for a maximum
window size of 16MB. For SBL images larger than 16MB, this PostTempRamInit
hook was causing the MTRR to overlap with NEM stack set up by FSP-T,
causing a hang.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-04-03 15:18:12 -07:00
Bejean Mosher 2c81ff2e71 fix: [RPL-P] Build error when ENABLE_SOURCE_DEBUG=1.
On platforms where only serial console input is enabled, enabling
source debug will lead to an infinite loop in ConsoleRead(). Newer
compilers detect this and generate a build error.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-03-07 14:16:13 -07:00
Bejean Mosher 7942790d76 fix: [ADL/RPL] Move NVME boot option update to PCI Enumeration hook.
Re-scanning PCI devices to find NVME controllers was adding an additional
~20ms to the end of Stage 2. Moving this to the existing PCI scan that
is part of PCI enumeration saves this time. However, this
EfiPciBeforeResourceCollection phase was not actually getting called and
needed to be added.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-02-22 15:19:56 -07:00
Bejean Mosher a7107db92f fix: [ADL/RPL] Force CPU Root Port MultiVC to disabled for S0ix.
This is a silicon requirement for S0ix support.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-02-03 14:29:46 -07:00
Bejean Mosher ab37b4737d fix: [ADL/RPL] VTD not getting disabled in FSPM when PcdVtdEnabled=0.
When PcdVtdEnabled or MemCfgData->VtdDisable were disabled,
Fspmcfg->VtdDisable was being left at default value.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2023-02-02 16:54:30 -07:00
Bejean Mosher 112a722b8d fix: [RPL-S] Fix for TSN build error caused by FSP UPD updates.
RPL-S FSP UPD was updated so PchTsnEnable is now a 2-byte array with a
separate byte for each port. This is now different from the ADL platforms
and needs to be included selectively at build time.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-12-14 13:35:52 -07:00
Bejean Mosher 3cf8c298f4 feat: Enforce newlines at the end of all text files in PatchCheck.py.
PatchCheck.py currently checks for files without terminating newlines
but takes no action. This change will report this as a code format error.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-12-13 16:07:54 -07:00
Bejean Mosher e66994015b fix: [ADL/RPL] Replaced CrashLog HOB with PCD.
The RPL CrashLog platform implementation has changed to use a PCD to store
the crashlog data address so this definition is no longer needed. The
PCD definition for the buffer address is added instead.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-12-02 10:44:46 -07:00
Bejean Mosher 3ce1b070fc fix: [ADL-P/RPL-P] remove RPLP #if encapsulation for eDP fix.
This fix should apply to ADL-P also. For now we will avoid using #if's here
and address any ADL-P issues that come up.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-11-22 15:59:14 -07:00
Bejean Mosher 9f1f8264d2 fix: [RPL-P] eDP output not working on DDR5 RVP board.
Needed to set DdiPortAConfig to eDP for DDR5 RVP.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-11-22 15:59:14 -07:00
Bejean Mosher bd4e688468 fix: Revert PcdDebugPrintErrorLevel change made mistakenly in #1760.
PR #1760 mistakenly included a debug change to increase the default debug
print level. Reverting that one change.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-11-21 13:59:25 -07:00
Bejean Mosher 631279c61f feat: [RPL-P] Add support for enabling FSP FuSa features.
FSP UPD FuSa toggles will be set based on new config data fields where
applicable or to predefined values when called for by the FuSa spec.
This requires setting PcdFusaSupport at build time in case platform FSP
doesn't support FuSa.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-11-16 14:11:40 -07:00
Bejean Mosher 31fe742339 [RPL/ADL] L2 CAT not getting enabled when TCC enabled.
FspsUpdUpdateLIb was not enabling FspsUpd->FspsConfig.L2QosEnumerationEn
based on PLATFORM_ADLS, which is no longer used. L2QosEnumerationEn is
present in ADL-P,S,PS, and RPL-S,P FSP UPD, just not ADL-N, so need to
prevent compiling this code for that platform only.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-11-02 16:37:46 -07:00
Bejean Mosher bac196577b fix: [RPL-P] Combined ADL-P and RPL-P RVP board IDs so either can boot.
RPL-P and ADL-P RVPs are essentially identical except for BoardID FRU.
Both need to work with SBL with RPL-P Silicon. To avoid duplicating
config data, this change will treat both as the same board.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-10-19 12:47:10 -07:00
Bejean Mosher 5b451b6fca [RPL-P] RPL-P DDR5 RVP Board/Platform ID support.
Added support for RPL-P DDR5 RVP board ID from EC.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-08-07 17:21:57 -07:00
Bejean Mosher 5fe393da46 [ADL] Fix for THC1 PEP constraints appearing when device is disabled.
FSP-S UPD format for THC port assignment was updated, but PEP logic
was using the old format, and causing the PEP constraint to always be
enabled. This issue didn't seem to be causing a problem, but resulted
in noncompliant low power idle constraints.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-07-29 12:09:08 -07:00
Bejean Mosher 3fe4087e70 [ADL-P] Revert USB4 CM mode to FW CM only.
Previous setting of SW-first CM mode was causing a hang during S3/S4 entry. Likely this setting requires additional ACPI/driver support which is missing.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-07-27 10:56:43 -07:00
Bejean Mosher 15d7abd016 [ADL-N/P/PS] Workaround for S4 resume when S0ix disabled.
Remove OS version check in PEPD _STA method. This is a change to the intelpep.sys ASL device (PEPD) for low power idle support. Previously, _STA would always return present/enabled for Win10 even if S0ix config flag was disabled. Changed version always returns status based on S0ix flag. Without this workaround, S4 resume was failing on ADL-N/P/PS.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2022-07-27 10:55:05 -07:00