* Add Name field to IMAGE_DATA structure
Add a name field to the structure to be used by container parsing
functions. It will be useful to determine the name of the container
component when dealing with special files like ACPI blobs.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* OsLoader: save the name of the component when creating array of components
Saving the name will help us deal with special files like ACPI blobs
more easily
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* OsLoader: streamline container types
Update container functionality to streamline container types:
- Normal: PE32, FV, ELF images. Supports ACPI table update.
- Classic (Linux): Used for a traditional Linux boot setup.
(cmdline, bzImage, initrd). Additionally supports ACPI table update.
- Multiboot: Used for Multiboot/Multiboot-2 compliant ELF images.
Supports ACPI table update.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* Rename CLASSIC container to CLASSIC_LINUX
This type of container is to be used for a traditional Linux
boot setup consisting of a cmdline, bzImage, initrd(optional),
and other binary blobs or ACPI blobs.
Rename it to CLASSIC_LINUX to make the purpose of the container
clearer.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* OsLoader: copy Linux ExtraBlobs to reserved mem and add to cmdline
Until now, SBL loaded the Extra blobs with the Linux kernel
into memory. However, there was no way for the OS to know where
these blobs resided in memory. The blobs were also loaded in
memory that was not marked as reserved.
This patch copies the blobs to reserved memory and adds the
blob addresses into an expected placeholder in the Linux cmdline.
If the placeholder is not present, nothing related to that blob
will be added to the cmdline.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
---------
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
During S3 resume, bootloader must not set VBT pointer.
Otherwise the i915 driver in newer kernel will fail to load GuC.
Test method:
1. S3 suspend, says 5 seconds: rtcwake -m mem -s 5
2. check the display and dmesg
Verify: ADLS and TGLU RVP + Linux kernel 5.15.71
Signed-off-by: Vincent Chen <vincent.chen@intel.com>
* Fix bound range exception thrown in HECI call for FW capabilities
Currently, whenever a HOB is not available containing FW
capabilities, a HECI call is made for the same. However,
whenever this HECI call is made, it throws a bound range
exception. This is because the ACK message struct used
has a data member but not a MKHI header member,
and the HECI call expects a struct with both members.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
* Prioritize use of HOBs for population of PSD ACPI table
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
---------
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
0x03 is ACPI Reclaim Memory
0x04 is ACPI NVS Memory
As defined in BootloaderCommonPkg/Include/Guid/MemoryMapInfoGuid.h
and ACPI Specification Chapter 15.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
When SioInit code configures the COM portsin stage 2, it might have settings conflict
with debug interface. Remove it from FSP config to resolve potential boot issue.
Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
* fix: [RPL-P] TCC/TSN not being enabled correctly on RPL-P.
TCC and TSN enabling code was being platform limited to exclude RPL-P.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
* fix: [RPL-P] remove PCH checks prior to enabling TCC/TSN.
Enabling TCC/TSN should be dependent on the PCDs and config data, not PCH
SKU.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
During S3 resume, bootloader must not set VBT pointer.
Otherwise the i915 driver in newer kernel will fail to load GuC.
Test method:
1. S3 suspend, says 5 seconds: rtcwake -m mem -s 5
2. check the display and dmesg
Verify: EHL CRB + Linux kernel 5.15.49 and 5.15.71
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Getting FIPS might take long time since CSME could be busy.
And FIPS is disabled by default in CSME. So update the code
just enable it when it is configured to enable it.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
- update FSP version to IoT FSP 5505_01_MR7 (0A.00.7D.72)
- update TGLU microcode version to A6
- update TGLH microcode version to 42
- update TGL platform version to 1.7
Signed-off-by: Vincent <vincent.chen@intel.com>
This patch adds ACPI DMAR table for CFL.
Some VT-d init code are ported from EDK2.
Test method:
1. dump acpi tables: acpidump -b
2. check the dmar table: iasl -d dmar.dat
Verify: CFL-s RVP
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
This change converts a shutdown to a TCO timer stop and
CPU halt as shutdown was discovered to be empty (and thus
the same as CPU halt).
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
When SG02 is failing on both partitions, a shutdown is supposed
to occur after trying to boot from each partition 3 times. However,
it was noticed that this was not occurring as the shutdown function
was left empty. This caused dead loops and further ACM active timer
expirations.
This change resolves this issue by moving the TCO timer check and start
until after the ACM active timer has been stopped. This change also converts
the shutdown to a CPU halt for further clarity.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
CFL does not have Linux-native stitch tools.
This patch uses 'wine' as a wrapper to support stitching
SBL under Linux env.
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
On ECless platforms, Sio is initalized by default.
However, when S0ix is enabled, Sio need not be
initialized.
Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>
Implemeted DTT feature for ADL:
Created new CfgData_Feature for DTT
Created associated ACPI folder and files (DPTF)
Signed-off-by: Kobe <kok.tong.ong@intel.com>
Signed-off-by: Kobe <kok.tong.ong@intel.com>
This patch updated SBL BaseTools to be in sync with EDK2 stable tag 202211.
Preserve previous changes made in GNUmakefile, Makefile, RunTest, and
PatchCheck to prevent compiling issue.
Add condition to match last line when reporting "No newline at end of file"
Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
Added SgxLeWr and the hashes as configurable parameters in
sgxconfig.yaml.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
RPL-S FSP UPD was updated so PchTsnEnable is now a 2-byte array with a
separate byte for each port. This is now different from the ADL platforms
and needs to be included selectively at build time.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
When running "perf" command from OsLoader shell, it would
print the performance data but it is difficult to know what
they are mean. The patch adds the description to performance
data.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
PatchCheck.py currently checks for files without terminating newlines
but takes no action. This change will report this as a code format error.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
To align with universal payload ID,
a new file for Universal Payload is added.
Updating the test case to the new file in repo.
Signed-off-by: Kalp Parikh <kalp.parikh@intel.com>
* OsLoader: remove references to IAS images
Change IAS references to 'Boot Image' since IAS support is deprecated.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* ContainerLib: add container type defines
Add comments to indicate the use cases of each container type
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* OsLoader: Use container defines instead of IAS defines
This commit also changes some comments referencing IAS instead of a container.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* OsLoader: remove ParseIasImage() since it is deprecated
Remove deprecated functionality and header include.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
Signed-off-by: Chirag Vijay Kolhe <chirag.vijay.kolhe@intel.com>
* OsLoader: add check for normal container type and fix comment
NORMAL type of container is usually used with FV, regular ELF images, etc.
This commit adds the check for it and removes the "non valid use case" comment.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* GenContainer: add comments explaining container types
Add comments explaining use cases of each container type
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* OsLoader: add a check for number of files in classic container
Classic Container needs to have the boot file in it. According
to the fixed order, this is the second file in the container.
Add a check to make sure there are atleast 2 files before attempting
boot.
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
* QEMU: replace IAS references in boot options with container
Clean up IAS reference from boot options list
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
Signed-off-by: Atharva Lele <atharva.lele@intel.com>
Signed-off-by: Chirag Vijay Kolhe <chirag.vijay.kolhe@intel.com>
The FIT allows for some empty uCode slots to be defined
in anticipation of future uCode updates. This change adds
as many empty slots as possible after the non-empty slots
in the uCode region.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
This patch fixes 2 issues related to symbolic links:
1. when "fs ls" a directory, symbolic links are not shown.
It is because Ext2fsLs() only shows regular files and directories.
2. when "fs ls <symbolic_link>" the output is incorrect.
It is because File->FileNamePtr points to a local variable,
"NameBuf" in Ext2fsOpen(), if the file is a symbolic link
This patch replaces File->FileNamePtr with FileNameBuf.
It slightly increases Ext2fsLs/Ext2fsOpen/SearchDirectory time,
because of the use of strcpy and strcat.
Test method:
1. create a regular file, "a", in directory "x"
2. create a symbolic link file, "b", pointing to "a".
3. under the shell of OSLoader,
"fs ls x"
- expected result: a, b (symbolic link)
"fs ls x/a"
- expected result: a and its file size is shown
"fs ls x/b"
- expected result: b -> a, and the file size of a is shown
Verify: TGL-UP3 RVP
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Previously, the reload of the TCO timer blocked the
initialization of the platform ID via the SM Bus in-use
status. Thus, we explicitly cleared it. However, now
that the reload of the TCO timer occurs after the
initialization of the platform ID, this clear is no
longer necessary.
This change removes it.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
There is no way to recover from failure in the following scenarios:
1) Both BP0 and BP1 are corrupted
2) The configured PLD is not found
A CPU halt does not prevent the TCO timer from rebooting.
This change makes it so that the SUT shuts down whenever a
unrecoverable failure occurs, so that it does not incorrectly enter
the recovert loop.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
FW_UPDATE_SM_PART_AB state occurs when we have successfully updated
both BP0 and BP1. It signifies that that we need to flip the TS
and set FW_UPDATE_SM_DONE state.
It is possible for SBL to get stuck in a FW_UPDATE_SM_PART_AB state if
power failure occurs when its in this state.
This change prevents this from happening.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
It was discovered that the ACM active timer monitors
boot progress across all of SG1A and the beginning of
SG1B (through FSP-M), flipping the TS if it times out.
This change makes it so that the 2 timers have less
overlap.
This change also consolidates the set and start TCO timer
APIs as well as renames the TCO status check API.
Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
This patch open source ADLPS project to be able to build
and stitch MR1 release from open source repo.
Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
The RPL CrashLog platform implementation has changed to use a PCD to store
the crashlog data address so this definition is no longer needed. The
PCD definition for the buffer address is added instead.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
This patch fixes an issue that SBL fails to load a file in Ext4 partition,
when
1. the ext4 partition uses Extent
2. the inode's first extent block is an internal node
3. the node has only one entry (i.e., eh_entries = 1)
Under the above conditions, the data block may point to the child of
first ei_block when accessing the data within the range of child node.
Test method:
1. Install Ubuntu 20.04.5 LTS/(min install) in an eMMC disk
Note: this issue is only reproducible when loading a file
satisfying all conditions mentioned above (i.e., eh_entries = 1).
So far, the /boot/initrd.img after installing Ubuntu in an eMMC
(where part table: 500MB(FAT), 20GB (EXT4), 4GB (Swap)) satisfies
the conditions. However, for some reasons, when using USB SATA disk,
it will not generate a /boot/initr.rd meeting the conditions.
2. Boot to OSLoader
3. "fs init 2:0 0 1" the eMMC disk (assume the HW:SW-part is 0 1)
4. "fs load boot/initrd.img"
Expected result:
1. With this patch: successfully load the file.
2. Without this patch: ASSERT [OsLoader] ..
Verified: EHL CRB
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Setup FSPM stack base and size based on the car size and
SBL stack and heap size.
This change could avoid the boot issue caused by FSP stack
overflow.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
This fix should apply to ADL-P also. For now we will avoid using #if's here
and address any ADL-P issues that come up.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
- update FSP version to IoT ADL-S MR3 (0C.00.73.10)
- update Microcode version to 25
- update platform version to 1.3
Signed-off-by: Vincent Chen <vincent.chen@intel.com>
Signed-off-by: Vincent Chen <vincent.chen@intel.com>
- update FSP version to IoT ADL-P MR2 (0C.01.73.10)
- update Microcode version to 423
- update platform version to 1.2
Signed-off-by: Vincent Chen <vincent.chen@intel.com>
PR #1760 mistakenly included a debug change to increase the default debug
print level. Reverting that one change.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
This patch fixes the issue that OS Loader appends an unwanted
mender setting (i.e., root=PARTLABEL=primary/secondary) to Linux
kernel command line when the mender setting already exists.
With the patch, the mender setting is appended to kernel command line
only if BOOT_FLAGS_MENDER AND no existing mender setting.
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
When loading capsule from raw partition, some check prevent capsules
signed by a RSA3072 from being recognized as a valid capsule. Remove
obsolete checks which expect RSA2048, signature type is already checked
at a later stage from AuthenticateCapsule.
Signed-off-by: Artur Kowalski <artur.kowalski@3mdeb.com>
Code are shared for AlderLake and RaptorLake.
Just update the SMBIOS strings to reflect it.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
FSP UPD FuSa toggles will be set based on new config data fields where
applicable or to predefined values when called for by the FuSa spec.
This requires setting PcdFusaSupport at build time in case platform FSP
doesn't support FuSa.
Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>