420 Commits

Author SHA1 Message Date
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
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
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
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
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
Bruno Achauer
b7a31e9594 fix: [IPPCRYPTO] Fix Coverity issue
Initialize the TimeStamp1 variable to prevent a Coverity issue (CWE-457).

Signed-off-by: Bruno Achauer <bruno.achauer@intel.com>
2024-10-22 07:13:17 -07:00
Randy
240ff8df7c fix: osloader can't boot on new yocto build
Ext2Fs->Ext2FsFeaturesIncompat report EXT2F_INCOMPAT_CSUM_SEED
so that fail into not support.

boot tested with old/new yocto image, ubuntu.

Signed-off-by: Randy <randy.lin@intel.com>
2024-10-16 14:03:13 -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
6410a9bf78 Enhance OsLoader shell perf command
Add a parameter to show the boot performance data
in MicroSecond. By default it uses MilliSecond as-is.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2024-10-11 09:23:25 -07:00
costel-ignat
f86ad8ba4b fix:[common] Extend Ufs devices waiting for fDeviceInit.
- UFS device would clear fDeviceInit flag once the device initialization
   is completed.
 - This change is polling to check the flag is cleared or not with
   specific timeout (UFS_INIT_COMPLETION_TIMEOUT - 600ms).

Signed-off-by: costel-ignat <costel.ignat@intel.com>
2024-10-08 10:34:30 -07:00
Vincent Chen
a63818df94 fix: [Common] correct the free memory function for fs load command
When OsLoader shell "fs load" tried to free memory, the
assertion happened with the message "CR has Bad Signature".
It's caused when FreePool() tried to free the memory allocated
by AllocatePages(), and the memory signature is not as expected.
So modify the free memory function to FreePages()

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2024-09-26 11:38:31 -07:00