84 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
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
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
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
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
tsaikevin
e40e8679be fix: [Common] Fix coverity issues for x64 build (#2276)
Address following coverity issues
1. Integer Overflow or Wraparound (CWE 190)
2. Unexpected Sign Extension (CWD 194)

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2024-08-27 11:54:51 -07:00
Jiaqing Zhao
8a670266fd ShellLib: Assign BootOption->SwPart on editing boot option
When editing a boot option entry, new SwPart value is only assgined to
FileImage or LbaImage struct, while BootOption->SwPart is cleared,
breaking traditional linux boot as it uses SwPart there. Assign the
new value to BootOption->SwPart to keep compatibility.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2024-07-08 11:05:25 -07:00
Biswas Arghya
f8bfe71c06 feat:[Common] boot from an image from memory
Add a new entry in CfgData_BootOption.yaml to boot from memory. The boot
device must be 7 (MEMORY), and the address of the container boot image
(CONTAINER_BOOT_SIGNATURE) can be placed at an address specified by
LBA format (i.e., use HEX prefix. EX: #0x12345678).

Example entry of CfgData_BootOption.yaml:
!expand { BOOT_OPTION_TMPL : [ 0 , 0,  0,  7,   0 ,   0 ,   0xFF ,   1 , '#0x47A31000'] }

If the address is not predefined then it can be updated in run time from
SBL shell boot option table.

Validated by loading a container image to the memory by using 'fs load'
command in SBL shell and update the load image address in boot option table.

Signed-off-by: Biswas Arghya <arghya.biswas@intel.com>
2024-03-18 10:04:41 -07:00
Guo Dong
b4c1b6b36c Add "acpi" shell command (#2041)
It could help debug ACPI related issues.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2023-10-07 23:14:39 -07:00
Jiaqing Zhao
338ba840bf OsLoader: Print misc image info in Shell
Add support to print misc image info in shell. Misc image will only be
printed when BOOT_FLAGS_MISC is set.

Also fixes some minor bugs in 5968cfa919 ("OsLoader: Print all extra
images")

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-19 17:58:18 -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
5968cfa919 OsLoader: Shell support for FILE_IMAGE_LOCATION
Support printing and modifying boot file info in FILE_IMAGE_LOCATION
struct in OsLoader shell.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-12 13:55:06 -07:00
Jiaqing Zhao
b17d6f8c2f Fix typo EnumImageTypeAdroid
"Adroid" should be "Android".

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-05 20:36:54 -07:00
Jiaqing Zhao
68da867e71 ShellLib: Allow editing ImageType in boot command
Allow ImageType to be edited in boot command in shell.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-09-05 20:36:54 -07:00
Stanley Chang
ca071fd9e3 feat: [EHL] add EfiResetShutdown in ResetSystemLib
The patch handles EfiResetShutdown. With the patch, one can
test "reset off" under OS Loader.

The patch also
 - fixes a wrong reference error in ResetSystemLib.inf.
 - add shutdown text in CmdReset.c

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2023-08-22 21:25:00 -07:00
tsaikevin
d952b1487c fix: [Common] Fix Coverity issues (#1978)
Fixed Untrusted loop bound (CWE 606)

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2023-07-31 16:06:00 -07:00
Jiaqing Zhao
b1bf6bf6d6 ShellLib: Fix type mismatch warning in MmRead()
Change the data type of Width to UINT32 of MmRead() declared in
CmdPci.h to match its definition in CmdMm.c.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2023-07-31 14:47:43 -07:00
tsaikevin
0d45c3e60a fix: [Common] Fix Coverity issues (#1958)
Fixed dead default in switch and logically dead code (CWE 561)

Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
2023-07-19 14:03:41 -07:00
Sean McGinn
637f4b26b6 Remove PCD for OSL corruption tool
Removes PCD for OSL corruption tool so that it
doesn't accidentally get enabled in production code

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2023-06-12 21:38:12 -07:00
Guo Dong
474fb76f1d feat: Update the lite variable usage
Since lite variable API change, this patch Update
the caller to align with variable library.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2023-05-10 12:16:57 -07:00
Arghya Biswas
224e75fbf6 fix: enumerate all USB instances to search devices (#1818)
instance 0 was hardcoded, so not able to read the devices from other
instances. Now read the instances number from the device table and
enumerate all USB instances one by one.

Signed-off-by: Biswas Arghya <arghya.biswas@intel.com>
2023-02-03 10:54:33 -08:00