79 Commits

Author SHA1 Message Date
Michał Żygowski
0b63e5ae1a Add project patch version to version info
Add project patch version to match Dasharo versioning scheme.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-08-04 16:07:39 +02:00
Yugendran Sreetharan
8927195db2 Added support for VS2022 Compiler
Make sure your VS2022 , has following directory:

C:\Program Files (x86)\Microsoft Visual Studio\2022\Professional

Signed-off-by: Yugendran Sreetharan <yugendran.sreetharan@intel.com>
2025-07-08 20:00:12 -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
Bejean Mosher
0bcefec921 feat: Support calling into x64 FSP
FSP 2.4 introduces the possibility of FSP built for x64 architecture.
This adds support for x64 FSP calling conventions based on the header x64
support attribute. Support for x64 FSP-T requires entering long mode
prior to FSP-T execution.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
2025-02-06 10:08:15 -07: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
aborwank
6875a3bdc9 feat: creating actm binary to be copied in build folder (#2141)
For platforms with seperate actm binary added code to
copy actm binary to build fv folder

Signed-off-by: Antara Borwankar <antara.borwankar@intel.com>
2024-03-21 21:21:13 -07:00
Guo Dong
caefea4df3 * feat: Fix the build failure with Python 3.12
distutils is deprecated in Python 3.10 and 3.11.
And it is removed in Python 3.12. So remove the
dependency.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2023-11-03 13:03:23 -07:00
Guo Dong
60c2df3de3 [TOOL]: Enhance build tool for CFG data
Currently the build tool always find the config data yaml file
from the brd_name path.
With this update, it will first search yaml file from
brd_name_override path,  if yaml file could not be found, then
it will search yaml file from brd_name path.
And currently it would generate ConfigDataStruct.h and
ConfigDataDynamic.h in brd_name path. With this change, generate
them in board common path.

With this change, full config data could be in brd_name or in
brd_name_override path.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2023-08-29 10:47:43 -07:00
Vincent Chen
ec5c39e35a feat: [ADL] separate CfgDataDef.yaml for different PCH series
ADL groups GPIO pins into different sets for different PCH series.
The current CfgData uses ADLS's GPIO group sets as the base, and
overwrites the GrpIdx fields via DLT files for other PCH series.
This results in two issues:
1. "CfgDataTool.py export" command failed to extract DLT files
   from SBL image, since it cannot identify the proper group
   index in CfgDataExt.bin from the base table in CfgDataInt.bin
2. When using ConfigEditor.py to configure the PadGroup field of
   GPIO Payload Selection, it will map to a wrong group index.

This patch separates CfgDataDef.yaml for each of PCH series
- add _CFGDATA_DEF_FILE in BoardConfig.py
- add board extension yaml files for Adln, Adlp, Adls
  * CfgDataDef*.yaml
  * CfgData_Gpio_*.yaml
  * CfgData_PayloadSelection_*.yaml
- assign an invalid/unique GrpIdx for the unused GPIO group
  * e.g. 1F, 1E, ..
- adjust GrpIdx of CfgDataExt_Upx12.dlt based on Adlp
- revise the payload selection information in DLT files

This patch also fixes the issue:
- When ConfigEditor opens CfgDataDef.yaml more than once, the
  config changes will not be caught by "Save Config Changes to
  Delta File"
It is because the "info" argument of build_cfg_list() in
GenCfgData.py will retain its value in the lifetime of
ConfigEditor, and the offset will overflow. So need to reset
the offset for a fresh load_yaml().

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2023-08-24 09:52:21 -07:00
Guo Dong
977450bae8 Add platform name (#1540)
* Generate platform build name definition

Same code could be shared by different platforms. At same time,
some platform might need do minor change to the shared code.
In order to support this case, this patch updated the build tool
to generate a macro definition for current build platform name
in a header file. so the shared code could have platform specific
code change with this macro definition.
e.g. add "#define #define PLATFORM_ADLS 1" for ADLS.

Signed-off-by: Guo Dong <guo.dong@intel.com>

* [ADLS] update

FspsUpdUpdateLib could be shared by different platform,
use ADLS macro definition instead of PcdAdlLpSupport for
ADLS specific change.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-01 11:55:11 -07:00
Maurice Ma
c2e634c5c9 Add support for PCI expansion rom resource allocation
Current SBL PCI enumeration does not allocate resource for PCI ROM
bar because SBL does not deal with option ROM at all. However, the
Linux kernel might expect the ROM bar resource to be allocated.
This patch introduces a static build configuration to allow support
PCI resource allocation for PCI ROM bar.

To enable this feature, please add following into the project
BoardConfig.py file:
  self._PCI_ENUM_FLAG_ALLOC_ROM_BAR = 1

By default, it will be disabled to keep the same behavior as before.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-02-28 13:08:54 -08:00
Mike Crowe
43001d0625 BuildUtility: Support GCC5_BIN prefix
The EDK II build tools support applying a prefix for GCC from an
environment variable (e.g. GCC5_BIN). For this to work correctly with
Slimbootloader it's also necessary to use the prefix for the version
check too.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
2022-01-18 08:37:11 -08:00
James Gutbub
4b82461065 Update IASL to version 20190509
For Azure and toolchain check we
can update to using IASL version
20190509 since some of the newer
SBL platforms require a newer
IASL version.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2022-01-05 12:01:15 -08:00
Guo Dong
d0fac9b442 Enhance the tool
When BOARD_PKG_NAME_OVERRIDE is configured, the tool will firstly
search from BOARD_PKG_NAME_OVERRIDE, then search BOARD_PKG_NAME
for dlt and vbt files. It also uses BOARD_PKG_NAME_OVERRIDE for the
VerInfo file.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-12-13 16:13:04 -07:00
Mike Crowe
990e3e81e6 Use LF line endings in the repository
Convert the line endings stored for all text files in the repository to
LF. The majority previously used DOS-style CRLF line endings. Add a
.gitattributes file to enforce this and treat certain extensions as
never being text files.

Update PatchCheck.py to insist on LF line endings rather than CRLF.
However, its other checks fail on this commit due to lots of
pre-existing complaints that it only notices because the line endings
have changed.

Silicon/QemuSocPkg/FspBin/Patches/0001-Build-QEMU-FSP-2.0-binaries.patch
needs to be treated as binary since it contains a mixture of line
endings.

This change has implications depending on the client platform you are
using the repository from:

* Windows

The usual configuration for Git on Windows means that text files will
be checked out to the work tree with DOS-style CRLF line endings. If
that's not the case then you can configure Git to do so for the entire
machine with:

 git config --global core.autocrlf true

or for just the repository with:

 git config core.autocrlf true

Line endings will be normalised to LF when they are committed to the
repository. If you commit a text file with only LF line endings then it
will be converted to CRLF line endings in your work tree.

* Linux, MacOS and other Unices

The usual configuration for Git on such platforms is to check files out
of the repository with LF line endings. This is probably the right thing
for you. In the unlikely even that you are using Git on Unix but editing
or compiling on Windows for some reason then you may need to tweak your
configuration to force the use of CRLF line endings as described above.

* General

For more information see
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings .

Fixes: https://github.com/slimbootloader/slimbootloader/issues/1400
Signed-off-by: Mike Crowe <mac@mcrowe.com>
2021-11-10 12:46:42 -08:00
Maurice Ma
c03faf59c3 Enhance PCI enumeration policy for resource downgrade
On TGL platform, when enable SR_IOV for PCI enumeration, system
hung due to insufficient PCI resource. GFX VF needs lots of MMIO
resource and it cannot be satisfied by SBL in 32 bit mode.

To address this issue, this patch extends the bus 0 downgrade
policy to further allow downgrading PCI bus 0 devices except for
GFX. Now the DowngradeBus0 policy has following values:
  0: Do not downgrade PCI devices on bus 0
  1: Downgrade all PCI devices on bus 0
  2: Downgrade all PCI devices on bus 0 but GFX
  3: Reserved
By default, it has the same behavior as before. If platform needs
to download bus 0 devices but GFX, the new value 2 can be used.

This has been tested on TGL, and it worked as expected.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-18 09:14:52 -07:00
Aiden Park
bea07fdc60 [Tool] Allow each platforms to override min tool versions
This allows each platforms to override its own minimum tool versions.

Current SBL default minimum tool versions:
    'python'    : '3.6.0'
    'nasm'      : '2.12.02'
    'iasl'      : '20160422'
    'openssl'   : '1.1.0g'
    'git'       : '2.20.0'
    'vs'        : '2015'
    'gcc'       : '7.3'
    'clang'     : '9.0.0'

If a board needs to use VS2008 and nasm2.14,
In BoardConfig.py,
    def GetPlatformToolchainVersions(self):
        version_dict = {
            'nasm'      : '2.14',
            'vs'        : '2008',
        }
        return version_dict

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-10-08 20:05:10 -07:00
Guo Dong
64dca520ef [TGL] Make TCC setting consistent
Add a separate cfgdata dlt file to enable TCC config data.
The TCC dlt file will be appended to board dlt file when
ENABLE_TCC is set in BoardConfig.py.

Removed RTCM subregion and update boot option for RTCM support
TCC is disabled by default.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-06-10 13:30:58 -07:00
Guo Dong
aa034dd72c Enhance gen_config_file in BuildUtility script
It will first check the dlt file from source code, it the
dlt file could not be found, then check the build folder.
This enhancement supports the generated dlt file from
build folder.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-06-10 13:30:58 -07:00
Maurice Ma
97124b133f Patch FSP-T UPD microcode base
When redundant partition is enabled, the FSP-T microcode base UPD
always points to the microcode region in 1st partition. Instead,
it should points to the microcode rgion in its own partition. This
patch fixed this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-05-28 15:07:15 -07:00
Aiden Park
a1298c8f3b [Build] Make 'git' version checking optional
The build system is using 'git', it doesn't require the latest git.
This will show 'git' recommend version if not met,
and will address issue#1136.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-04-27 09:12:56 -07:00
Aiden Park
bc5584d176 [Build] Verify toolchain versions
This will check the minimum required toolchain versions
before starting build process.
If any of these toolchains does not meet the required version,
the build process will stop immediately.

Here are the initial minimum toolchain versions.
- python : 3.6.0
- nasm   : 2.12.02
- iasl   : 20160422
- openssl: 1.1.0g
- git    : 2.20.0
- vs     : 2015
- gcc    : 7.3
- clang  : 9.0.0

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-04-26 09:07:04 -07:00
Maurice Ma
fda951e10a Add image ARCH type into SBL version info
SBL can support IA32 and X64 build. But this info is not indicated
in the SBL version info. This patch added one bit to indicate the
SBL is IA32 or X64.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-11 20:32:21 -07:00
Maurice Ma
454efdda2e Add CLANG toolchain build support
This patch will enable CLANG toolchain build on Linux and Windows.
Currently CLANG toolchain build still needs Visual Studio to provide
nmake utility in Windows.
To build with CLANG, please add build option "-t clang". It assume
CLANG is installed at default path. It has been tested with SBL
QEMU x86 build.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-02 09:07:57 -07:00
Maurice Ma
040ab276b8 Add Visual Studio toolchain version select option
Current SBL always uses the latest VS toolchain detected to build
SBL. However, sometimes a different verion might be preferred.
This patch added a build option "-t" to specify the perferred VS
toolchain version. It is useful when mulitple VS toolchain versions
are installed.

For example, add '-t vs2015' to use VS2015 as the toolchain for
SBL build.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-03-25 17:14:15 -07:00