This commit refines the UpdateResetReason for ADL with the following improvements:
1. Replacing IsRebootByWdt with WasBootCausedByTcoTimeout. Previously, ADL utilized
IsRebootByWdt, which was incorrect and redundant. The incorrect aspect involved
checking a non-existent bit field (TCO_STS_NO_REBOOT), while the redundancy lay
in its functionality being identical to WasBootCausedByTcoTimeout(). Consequently,
this commit removes IsRebootByWdt and substitutes IsRebootByWdt with
WasBootCausedByTcoTimeout.
2. Prioritizing S3/S4 for RstCause assignment in UpdateResetReason. The original code
assigned ResetWakeS3 or ResetWakeS4 or S3/S4 resume at the end of the check logic.
However, ResetWakeS3 and ResetWakeS4 already imply a successful resume, allowing us
to move these checks to the beginning of the function.
3. Setting ResetUnknown for MMIO failure.
4. Setting ResetUnknown for B_PMC_PWRM_GEN_PMCON_A_PWR_FLR. This should be an independent
check, rather than an "else-if" check as in the original code.
5. Simplifying the check for ResetWarm and ResetCold, as both are held when
B_PMC_PWRM_GEN_PMCON_A_HOST_RST_STS is set.
Additionally, the commit skips ResetWakeS4 for crash mode in GetCurrentBootOption.
Finally, it removes the UpdateResetReason from TGL and EHL as it is unused.
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
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>
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>
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>
* 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>
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>
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>
MULTIBOOT_MODULE container is handled in a similar way as modules in
MULTIBOOT container when loading and parsing. If the normal image is
multiboot/multiboot2 format, these modules in extra images will be
appended to it in SetupBootImages().
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
Adds A/B support for GetBootImageFromFs(), the behavior is the same as
GetBootImageFromRawPartition(). When loading from B partition, it will
load the container file at the sampe path from next SwPart.
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
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>
Move the initialization process of SwPart to support loading extra
images from other partitions in future.
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
Required by multiboot spec (*1), a mod string is a zero-terminated
ASCII string. The patch introduces LoadMultibootModString to load
mod string from a IMAGE_DATA (allocating a new buffer when requiring
to append zero-terminated char).
The patch does not reuse GetFromConfigFile because GetFromConfigFile
was designed to be compatible with legacy format (e.g., EOF signature)
and truncates newline chars (which is not required by multiboot mod).
For performance, the patch does not run "isascii" check.
Minor changes:
- Fix typo error (InitMultibootMmap)
- Declare FreeImageData in Library/IasImageLib.h
- Dump mod string for debug build
Reference:
1. https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
Verify: EHL CRB
Acked-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Adds SBL boot performance data (Stage1 time, Stage 2 time, OsLoader time)
to the FPDT with type 0x3000 (Reserved for platform firmware Vendor usage)
Other fixes:
- Move logging of measure point 40F0 inside the condition for measured boot
- Add missing call to log measure point 40E0 used to log kernel setup print
time
Signed-off-by: Atharva Lele <atharva.lele@intel.com>