After GenContainer script was created, there ware more changes
introduced for signing and compression. However, GenContainer
was not updated to match those new changes. This patch addressed
this issue.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
ProgramBar() routine uses 'OrgBarType' field to
determine BarType. So, if a BarType is valid, copy
it to OrgBarType for VF also.
Signed-off-by: Talamudupula <stalamudupula@gmail.com>
run_process is used several places. Sometime
the extension name is not given for windows build.
In this case, if same file without file extension
exist (e.g. fit and fit.exe), then fit will be used
for windows build. It is not expected, so this patch
will add the missing .exe extension for this case.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Python 3.4 and above have deprecated imp module in favor of
importlib. This patch removed imp module usage from SBL, and
used importlib instead.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
To avoid any dependency on non-standard python modules
it is preferred to make the binary Lz4 compression the
default flow and try the python module as a backup. Also
recommend to use a known working version of the lz4
python module, 3.1.1.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
To make SBL scripts/tools more OS-agnostic the
lz4 (de)compression module can be used instead of
relying on the BaseTools LZ4 package/executable.
Need to update the azure pipeline to install
the python lz4 module before running the builds.
TEST=Confirmed that the python lz4.block.compress
routine is compatible with Lz4DecompressLib
during SBL runtime to decompress LZ4 binaries.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
Openssl 1.1.1 is an installable and it creates
openssl.exe in a bin folder.
default slimboot path: c:\Openssl\bin\openssl.exe
Added support to populate OPENSSL_PATH
from bin dir incase its available.
Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
Print MRC status to defferentiate first flash boot and MRC fast boot.
if Debug logs print status as 'Already started', it means MRC data in
SPI flash is matched and saving is skipped.
for example,
First flash boot:
MRC data successfully cached to 0x1FF000
Save MRC Training Data (0x8D131480 0x0018E0) ...Success
MRC fast boot:
Save MRC Training Data (0x8D131398 0x0018E0) ...Already started
Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
This introduces a new PCD 'PcdPciResAllocTableBase' to allow a platform
to provide its specific PCI resource allocation pool at runtime.
PCI Enumerator will allocate required resources in the range.
If the PCD is not provided, a default range will be used.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch enabled ACPI BGRT support. It is used to pass splash
display information from bootloader to payload and OS.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
User experience improvement:
If there is no yaml found in current directory
then default to start browsing at platform directory
Signed-off-by: Chin Keong Ang <chin.keong.ang@intel.com>
Current SBL code will build pointers in E/F segment for ACPI
and SMBIOS table. On some platforms, E/F segment is not supported.
So a new configuration ENABLE_LEGACY_EF_SEG is added. When
it is enabled, SBL will not use legacy E/F segment memory.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
In current SBL BootloaderCorePkg dsc and fdf files, it contains
hard-coded INF file path for SOC or board, such as ACPI INF
file and SOC/Board init library INF file. It makes it hard for
platform to provide its own overriding using different path.
This patch addressed this issue by allowing platform to override
the default paths in BoardConfig.py.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Microcode module locates in different place.
so each platform could specify the path by
MICROCODE_INF_FILE in BoardConfig.py.
By default, it uses the same path if there
is no MICROCODE_INF_FILE defined in platform.
Signed-off-by: Guo Dong <guo.dong@intel.com>
In 64-bit operation, some PCI devices have high mmio BARs,
but 32-bit FSP can only access 32-bit memory space.
This introduces and additional PCI resource downgrade option
to downgrade all PCI devices under Bus-0.
- self._PCI_ENUM_DOWNGRADE_BUS0 = 1
Force to have 32-bit BAR for all Bus-0 devices
Signed-off-by: Aiden Park <aiden.park@intel.com>
This will report pcie config space region as a reserved memory in e820
and let Linux use the PCI MMCONFIG which has bus range information.
If it is not reserved, the pcie config space region will be freed/available
for PCI devices.
Signed-off-by: Aiden Park <aiden.park@intel.com>
Using ConfigEditor to save back DLT changes, it will produce two
PlatformId lines in DLT file. This patch removed the extra line.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Current ConfigEditor produces the same result for
"Save full cfg data" vs "save cfg changes". This patch provided
a fix for it. It fixed#882.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
In ConfigEditor, while scrolling page using mouse middle wheel,
the Combo configuration items will change its default value. It
is because Combo control will bind MouseWheel event by default.
To address it, added code to unbind it explicitly.
It fixed#878.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Since SBL could be built into either x86 or x64 mode, and the payload
can also be x86 or x64 mode. When mixed modes are used, it is required
to switch to proper mode first before calling into payload entrypoint.
This patch added this check to switch to required mode before calling
into payload entry point.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This will fix the ucode repo checkout issue on 'cfl' target.
FYI, here are simple steps to reproduce.
1) Build 'apl' target first
2) Build 'cfl' target -> fails to checkout ucode repo
Signed-off-by: Aiden Park <aiden.park@intel.com>
During X64 enabling, there was a pending task to enable 32bit
MultiBoot support. It is not implemented. This patch added the
support to allow X64 SBL to boot a 32bit MB image through thunking.
As part of this patch, the ThunkLib is separated from the FspApiLib
so that it can be shared by other component.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Different SoCs can use different versions of
Gen graphics and subsequently may use different
versions of the IGD Op Region; the OVER variable
will determine how the OS GFX driver interprets
the IGD Op Region provided in ACPI space.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
Current ConfigEditor relies on the original input data format in YAML
to determine how to represent data in GUI. For example, if the data
value is HEX in YAML, then the data will be displayed in HEX format.
This patch switched to use the specified format type to reformat the
value string so that the display is always consistent with the required
format type.
It fixed#844.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch added support to launch payload module on top of OsLoader.
Comparing with payload binary, payload module will utilize the API
services provided by OsLoader, so it will have smaller size. Other
than this, the concept is exactly same as normal payload. For payload
module, additional parameter is required to pass into the payload
module entry point.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch added SBL python setup script. It can run on either host
or target MicroPython environment. A new PCD PcdEnableSetup is added
to control if Setup feature should be supported by core.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
All child devices under a PPB must be in scope of its PPB's decode space.
Therefore, all PPB checks the decode capability and downgrades its child
devices' resources accordingly.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch added an example on how to build a HelloWorld payload
from separate DSC file.
To build a standalone HelloWorld payload, use the following command:
BuildLoader.py build_dsc -p PayloadPkg\PayloadPkg.dsc
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
CFGDATA json can be used for CFGDATA representation. This patch
enabled generating CFGDATA json file. It can be used by target
to parse CFGDATA items.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch allowed GenContainer to search for the input
component binaries from both input and output directory.
It is useful when the component binary is in build FV
directory.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The following commit 9fcb3a6be1
caused a regression on PCI bridge resource allocation. At minimum
the PCI bridge needs to have IO apperture aligned at 4KB and MMIO
apperture aligned at 1MB. The new code did not adjust the
alignment for P2P bridge following this rule. This patch fixed
this issue.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch adjusted some alignment on PCI resource allocation so
that PCI resource is more efficently utilized. It aslo adjusted
the framebuffer MTRR range to match PCI resource allocation.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch adds initial support for external public
key hash store generation in container format.
It uses layout file as input with usage and key file or id.
Common functionality available is resued for KEYH
component generation.
Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
When multiple level of PCI bridges exists on a platform, current
SBL PCI bus library could not find all devices. This issue was
caused by incorrect root bridge bus limit got from the data
structure. This patch fixed this issue.
It also fixed#800.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Add support for security version check for
config data blob update. SVN is checked
for redundant region which would be updated.
Fixed python errors in CfgDataTool and
GenCapsuleFirmware.
Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
This patch will enforce to use python 3.6 or above to build SBL.
Python 2.x is EOL, so drop the support from now.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This script is intended to be called by firmware update
application to triggere firmware update after receiving
update capsule in Linux. This script is provided as a
reference implementation and does the following:
1. Copies the capsule to a known location where SBL
will look for (/boot/efi/FwuImage.bin)
2. Signals FW update to SBL using the WMI interface
provided by SBL. The WMI interface is provided
by the ASL (https://github.com/slimbootloader/slimbootloader
/blob/master/Platform/CommonBoardPkg/AcpiTables/Dsdt/FwuWmi.asl)
and linux kernel driver (https://lkml.org/lkml/2020/4/27/1289)
Reboot command was removed from the script, need to be
included if required.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
The final generated YAML file under Build folder should include
everything required. However, current tool will not expand the
embedded binary file. This patch addressed it.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The new YAML format represented some data structure a little bit
differently from original DSC format. This patch did minor adjustment
to make the build pass on APL platform.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch modified required tools ConfigEditor, GenCfgData, etc to
support YAML CFGDATA format.
To convert existing DSC to YAML, Dsc2Yaml tool can be used.
For example, to convert QEMU DSC to YAML, the following can be used:
python Dsc2Yaml.py -i Platform\QemuBoardPkg\CfgData\CfgDataDef.dsc
It will generate all required YAML files at current directory.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>