519 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
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
Vincent Chen
05e821e518 fix: [ARL][MTL] Fix Coverity issues
ARL
- Execute32BitCode: CWE-476 Deference null return value

MTL
- EarlyPlatformDataCheck: CWE-569 Operands don't affect result
- InitializeSmbiosInfo: CWE-476 Dereference null return value
- PlatformUpdateAcpiGnvs: CWE-563 Unused value

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2025-05-21 10:12:07 -07:00
Kevin Tsai
6affe6bda8 fix: [common] Fix Coverity issues in in ElfLib
- Uninitialized scalar variable (CWE-457) on SegAlignment

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2025-04-28 07:11:20 -07: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
Guo Dong
8d32ccbcdf Enhance ELF loading
Current implementation only supports the case that ELF file doesn't reload.
If the ELF file has to be reload (e.g.: to meet alignment requirement), SBL
need copy it to a different location and run.
Recently EDKII updated universal payload ELF image link script, and the new
ELF text alignment was changed to 0x1000 from 0x40. Mostly the default file
load location could not meet this requirement. So enhancement SBL to copy
it to a new location for this case.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-03-20 13:46:34 -07: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
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
Biswas Arghya
65d0c1b00d fix:[common] Fix the Coverity issue in BuildFdtLib
fix Coverity issue in BuildFdtLib/BuildFdtLib.c.

Signed-off-by: Biswas Arghya <arghya.biswas@intel.com>
2025-02-12 13:46:45 -07:00
Haoyu Tang
7b8dce9237 fix: [common] NvmExpressPassThru handle command timeout
After timeout occurs, reset the controller and return error.

Signed-off-by: Haoyu Tang <haoyu.tang@intel.com>
2025-02-12 13:46: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
Sachin Kamat
d8bcb4fac8 fix: [Common] Handle invalid shell command gracefully
Currently an ASSERT is triggered halting the system if the
command length is greater than the argv buffer size. Handle this
error gracefully to avoid system halt.

Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2025-01-30 08:27:22 -07:00
Vincent Chen
114fb2ea02 fix: [common] Fix Coverity issues in BuildFdtLib
- NULL Pointer Dereference (CWE-476) on the PciRootBridgeInfo
- Assignment to Variable without Use (CWE-563) on Status
- The return value of AsciiSPrint should be UINTN, so remove Status

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2025-01-28 09:35:16 -07:00
Guo Dong
c1326e0ae2 Add FDT support for universal payload
New universal payload use FDT (Flat Device Tree) instead
of HOB to pass info to payload.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-01-10 13:19:29 -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
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
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
Guo Dong
fa18a8239e Fix source level debug in X64 (#2317)
In X64 build, an stack segment exception was seen when
debug timer interrupt is enabled.
Just disable interrupt to WA this issue.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-10-23 15:16:08 +08:00