230 Commits

Author SHA1 Message Date
Michał Żygowski
0b63e5ae1a Add project patch version to version info
Add project patch version to match Dasharo versioning scheme.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-08-04 16:07:39 +02:00
Guo Dong
d48ada5da2 Add SMM rebase HOB
New UEFI payload depends on SBL to rebase SMM and reports SMM rebase information.
This patch build SMM rebase related HOB for UEFI payload.

SMM rebase memory is located at the end of SMRAM. and this patch also updated
SMM memory HOB.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-04-14 21:36:08 -07:00
Guo Dong
317c43386c Update SMM rebase support
Currently SBL supports SMM REBASE based on configuration.
1) When payload doesn't support SMM, SBL need enable SMM rebase.
   So SBL will rebase SMM to SMRAM and set SMRR to prevent SMRAM
   access out of SMM and prevent payload SMM driver dispatch.
2) When payload support SMM, SBL need disable SMM rebase.
   In this case SBL do nothing for SMM. Payload will do SMM
   rebase.

In new UEFI payload (after stable branch 202311), SMM relocation
was removed CPU SMM driver. To work with new UEFI payload, SMM
relocation is expected in SBL, but SMRR should not be set so that
SMM drivers in UEFI payload could be dispatched into SMRAM.

This patch adds a new SMM rebase configuration that it rebase SMM
but it doesn't set SMRR.
Currently SBL supports rebase AUTO setting based on payload. This
patch also add auto support.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-04-14 21:36:08 -07:00
Antara Borwankar
df944f5298 feat: Add FIPS self test support
Added fips_selftest run before any crypto use in Stage1A.
updated IppCrypto to 1.0.1 version

Signed-off-by: Antara Borwankar <antara.borwankar@intel.com>
2025-03-23 22:09:28 -07:00
Chirag Vijay Kolhe
314625254a fix: [Common] Remove IAS header
Removed unused IAS header file.

Signed-off-by: Chirag Vijay Kolhe <chirag.vijay.kolhe@intel.com>
2025-02-18 18:57:28 -07:00
Sachin Kamat
71ebc9a812 fix: [Common] Remove Clear Linux support
Clear Linux support code is not used. Clean it up.

Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2025-02-12 13:49:03 -07:00
Chirag Vijay Kolhe
a41dc0aad4 fix: [Common] Remove IAS boot image support
IAS boot image format is deprecated; it is recommended to use container
boot image.

 - Removed references,files related to IAS image.
 - Replaced IAS image boot options with container type image.

Signed-off-by: Chirag Vijay Kolhe <chirag.vijay.kolhe@intel.com>
2025-02-11 13:45:09 -07:00
Sachin Kamat
268248986a fix: [Common] Remove Android OS support
Android OS support code is not used. Clean it up.

Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2025-02-11 13:37:50 -07:00
Sachin Kamat
13997bd3f2 fix: [Common] Remove Trusty OS support
Trusty OS is not used. Clean up the code.

Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2025-02-10 15:50:54 -07:00
Kevin Tsai
6f42710192 fix: remove clear FSP hob from Uefi payload boot path
Remove clear FSP hob from Uefi payload boot path because Fsp NotifyPhase needs FSP hob to work.
Fixed 32bit address FspHotList in FSP INFO. UEFI payload consumes ths info to clear FSP hob.
Move clear FSP hob at EndOfFirmware for Osloader.

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2025-02-10 15:43:12 -07:00
Sachin Kamat
5beedb6ee6 fix: [Common] Remove ACRN support
ACRN is not used. Clean up the code.

Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2025-02-06 10:13:26 -07:00
Guo Dong
927f60e884 Add BuildFdtLib for universal payload support
New universal payload uses FDT instead HOB to pass information
from bootloader to payload. This BuildFdtLib could help build
the required FDT nodes.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-01-10 13:19:29 -07:00
Antara Borwankar
7328aa169f feat: [IPPCRYPTO]Added perf lib for ipp-crypto
Signed-off-by: Antara Borwankar <antara.borwankar@intel.com>
2024-10-15 07:48:18 -07:00
Guo Dong
b3f07cce9c ARL: Update platform code to use GPIOV2Lib
Simplify GPIO programming in Stage1A
Add P2SB devices and remove unused GPIO code in Stage1B.
Use GPIO config data instead of static GPIO table in Stage2.
Update PCH P2SB SMREG_BAR using FSP HOB.
Update ACPI NVS GEIx for SOC and PCH

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-09-29 16:26:50 -07:00
Sindhura Grandhi
472586d1cd feat:[ARLS] Update HeciMeExt Library to accomodate all ARL SKUs
- Update Common MeChipsetLib to account for ARLS Me Bus.
  Now,the bus number comes from Platform code:
  if ARLS bus = 0x80, else bus = 0x0
- Update Heci Pci read calls in HeciMeExtLib to account for
  both ARLS and ARL U/H  BDF differences.
- Delete ARL specific MeChipset header files as it now uses
  common header files from Common Package.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2024-07-31 08:39:22 -07:00
Ong Ee Lim
60db358849 fix: [ARL] Fixing 64-bit build with ENABLE_SOURCE_DEBUG
Adding 64-bit DebugAgentLib source files, header files and nasm files to
build SBL image with ENABLE_SOURCE_DEBUG=1

Signed-off-by: Ong Ee Lim <ee.lim.ong@intel.com>
2024-07-18 08:17:43 -07:00
Jiaqing Zhao
33060efdc6 OsLoader: Handle module align flag for multiboot images in ELF format
There is a flag in both multiboot and multiboot2 image indicating
modules must be loaded to page boundaries. Currently this flag is not
handled when loading multiboot images in ELF format. Check this flag
and move the loaded modules if needed before SetupMultibootInfo().

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2024-06-24 06:54:21 -07:00
Guo Dong
c781b14a03 feat: Add FIT image support
New universal payload used FIT image format.
The spec defined https://universalpayload.github.io/spec/chapter2-payload-image-format.html
This change could boot FIT universal payload.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-04-24 09:32:51 -07:00
Guo Dong
49a213d77e feat: Add FitLib
Add FitLib which is required to support FIT image.
New universal payload used FIT image format.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-04-24 09:32:51 -07:00
Guo Dong
416f2d95da Sync edk2 basetool mdepkg (#2121)
* Sync BaseTools to align with edk2-stable202311

Keep the SBL specific change (e.g. Lz4).

Signed-off-by: Guo Dong <guo.dong@intel.com>

* feat: Sync MdePkg from EDK2 edk2-stable202311 branch

Only sync required file without any changes to EDK2 files.

Signed-off-by: Guo Dong <guo.dong@intel.com>

* feat: Update MdePkg for SBL after sync from EDK2

Signed-off-by: Guo Dong <guo.dong@intel.com>

* Update SBL after updating Basetool and MdePkg

After Sync BaseTool and MdePkg to edk2-stable202311,
Need update SBL code to align with this change.

Signed-off-by: Guo Dong <guo.dong@intel.com>

* feat: rollback some changes after mdepkg sync

New change from MdePkg requires new NASM version.
To make sure NASM 2.14.02 still works, just rollback
few changes.

Signed-off-by: Guo Dong <guo.dong@intel.com>

* feat: Update component size to fix build failure

After syncing BaseTool and MdePkg, some components would
have a little bigger size. So update the config to fix the
build failure.

Signed-off-by: Guo Dong <guo.dong@intel.com>

* feat: Remove unused asl code

Some ASL files don't exist but they are included in other asl files.
It would cause build failure with new build BaseTool. So just remove
them to fix the build failure.

Signed-off-by: Guo Dong <guo.dong@intel.com>

---------

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-03-08 13:43:46 -05: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
Guo Dong
7db779439b [ADL/RPL] Update reset reason
Add reset reason caused by S4.
Update ADL to set reset reason.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2023-09-26 09:18:00 -07:00
Jiaqing Zhao
c65cd572d2 OsLoader: Print all extra images
Currently only PreOs and Extra0 image info is printed in boot options
list, this patch prints all of them.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-12 13:55:06 -07:00
Jiaqing Zhao
ebc9ae0625 Container: Add new container type MULTIBOOT_MODULE
The MULTIBOOT_MODULE type indicates the container contains only
multiboot modules and their string without a bootable kernel. Similar
to the MULTIBOOT container type, the files in container should be
organized in pairs which contains a zero-teminated text for string
and the a module binary.

This type should only be used in Extra images when Normal image is in
multiboot/multiboot2 format.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-12 13:55:06 -07:00
Jiaqing Zhao
49f5ae55ea OsLoader: Support loading extra images from other partitions
This patch adds a new struct FILE_IMAGE_LOCATION in BOOT_IMAGE to store
the SwPart and FsType of image file. This enables loading extra images
from a partition different than normal image.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-12 13:55:06 -07:00