This patch sorts the CPU info entry according to their thread distances.
It is required to list CPU thread with furthest distance first in MADT
so as to better utilize CPU resources.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
SBL depends on flash map to locate all component info. It is
mandatory to keep flash map. HAVE_FLASH_MAP config option should
be removed. This patch removed this config option and the related
PcdFlashMapEnabled PCD.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
UEFIPayload uses SMM dispatch for Physical Presence (Tcg2SMM) SMI.
Updated SMI port usage in asl to trigger SMI registered for
Physical Presence operation
Signed-off-by: Subash Lakkimsetti <subashx.lakkimsetti@intel.com>
GenGpioData.py is a utility that converts
GPIO pin data from one format to other.
The formats currently supported are [h, csv, txt, dsc, dlt].
[h, csv, txt] formats are external to SBL and [dsc, dlt] formats
are known to SBL. So, this tool provides a way to convert one
of the [h, csv, txt] to [dsc, dlt] and vice-versa.
Example usage:
python GenGpioData.py -if GpioInput.csv -of dsc
python GenGpioData.py -if GpioInput.dsc -of txt
Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
PatchCheck was using 'TRAVIS_COMMIT_RANGE' travis variable to get commit
range, but it lost tracks when doing force push or rebase. There are many
issue reports about this variable.
To avoid potential issue, let's get the range from git command directly
instead of TRAVIS_COMMIT_RANGE variable.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This will run PatchCheck.py in travis before building a target.
If the format is invalid, travis will exit immediately.
Signed-off-by: Aiden Park <aiden.park@intel.com>
ConfigEditor.py tool reports a warning regarding the
incorrect Interrupt Configuration for pins on Upx boards.
Certain board's default PAD CFG values may have none of
NMI/SMI/SCI/IOAPIC set and also RXEVCFG set to Disable,
so add a corresponding option in the drop-down for IntConfig.
Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
SHA512_384 and SM3 crypto functions were referenced from
https://github.com/intel/ipp-crypto.git
Selectively taken Ipp Hash methods
Signed-off-by: Subash Lakkimsetti <subashx.lakkimsetti@intel.com>
It should use local variable ResetReason instead of OsBootOptionList
in case of OS boot option is not available.
Signed-off-by: Guo Dong <guo.dong@intel.com>
This allows 'fs ls' command to print directory or file lists to both serial
and display console according to CONSOLE_OUT_DEVICE_MASK.
Signed-off-by: Aiden Park <aiden.park@intel.com>
Klocwork has issue to handle the CR macro in SBL code and it reported
false positives such as unused variables, uninitialized variables, etc.
This patch added special handling to resolve the issues reported by
Klocwork scanning.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch will print a filename with 16 chars aligned size.
- left justified filename with padding up to 16 chars
- length of filename > 16 chars, full filename is printed as it is
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch updates function/APIs definition and comment syntax
with EDK coding convention.
- No functional changes
- Remove unused funtions
Signed-off-by: Aiden Park <aiden.park@intel.com>
This 'fs' shell command can be used for basic file system check.
Usage: fs init [device no.] [hwpart no.] [swpart no.]
fs close
fs info
fs ls [dir or file path]
- 'device no.' is from Platform Device Table.
- all 0s by default if 'fs init' has no parameters
- root dir by default if 'fs ls' has no dir or file path
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch replace the standard ASSERT macro with klocwork specific
implementation as indicated on:
https://docs.roguewave.com/en/klocwork/current/tuningccanalysis
This can provide hints to klocwork scanning on the ASSERT() statement
so as to avoid false positives.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
"MM" SBL Shell command can be used to dump PCI configuration space
registers. On the other side, "PCI" command can be used to list all
PCI devices. This patch enhanced "PCI" command to support PCI
configuration space dump by redirecting it to "MM" command internally.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The 'mm' (formely 'mem') command is being
updated to handle PCI device formatted
addresses and also to support IO device
interfacing. Removing the 'io' command too
since it has been intergrated into the 'mm'
command.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
Currently, only absolute path is allowed in '-w' stitch_dir and '-s'
stitch_zip file. In addition, if stitch_dir is not absolute path, the
stitch tool looks for 'SBL_SOURCE' which does not exist in OS environment.
This patch allows the StitchIfwi.py tool to use relative path as well.
Signed-off-by: Aiden Park <aiden.park@intel.com>
Container parse logic cannot handle NORMAL (default) case
currently. So, if -t option is not used while generating a
Container, unsupported image type is reported during runtime.
Change the default type to CLASSIC, and end-user can use
-t option to switch to MULTIBOOT if needed.
Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
Added a option in CFL StitchIfwi script to pass the TPM type to
be selected for Intel FIT tool stitching.
[TEST] = Run StitchIfwi.py with -tpm=dtpm for WHL
and verify use of dTPM.
Signed-off-by: Subash Lakkimsetti <subashx.lakkimsetti@intel.com>
Current OsLoader used many "goto" to enforce the flow, and it also
used RestartOsLoader() to allow OsLoader re-entry. This patch cleaned
these and produce a linear boot flow for PayloadMain().
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The 'boot' command is making use of a global
variable declared in the OS Loader but it might
not always be available if the Shell lib is
used with other code. This patch removes the
dependency on the global variable.
Also fixes a small issue with not providing a
value at the prompt; instead prompt the user
with a error message when no valid value has
been provided.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
This patch allows OsLoader to handle all Boot Options without restarting.
Currently, OsLoader restarts to handle next Boot Option from the beginning.
This behavior does not preserve allocated memories from Payload heap,
so it makes hardware/software states hard to be maintained.
Signed-off-by: Aiden Park <aiden.park@intel.com>
Since SBL shell added support for command line history. It is required
to support it from USB keyboard console as well. This patch added USB
keyboard arrow key handling to convert arrow key scan code into ANSI
escape sequence so that Shell can recognize the arrow key from keyboard.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
BootPolicyManifest are required when a IFWI is
stitched with Intel BootGuard enabled. FlashMap maintains a pointer to
it so that SBL code can reach to them during execution.
This patch removes the check for its presence from IFWI images.
Test : Stitches Ok. Boots Ok.
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
This patch is a follow-up patch of #380. If a platform disables HS400 mode,
silicon init code will configure eMMC in HS200. Other modes not in scope.
This will also fix#406.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch allows a board to configure XDCI mode.
By default, keep XDCI mode as PCI mode which is default value in FSP.
The mode can be controlled by Config Data.
- Silicon Setting > Device Enable/Disable > Control 2 > Enable XDCI
If XDCI mode needs to be overrided, put new value in .dlt(delta) file.
- DEV_EN_CFG_DATA.DevEnControl2.XdciEnable | 0x0 (Disabled)
- DEV_EN_CFG_DATA.DevEnControl2.XdciEnable | 0x2 (ACPI mode)
It will fix#397 with the override value in a delta file.
Signed-off-by: Aiden Park <aiden.park@intel.com>
There is an issue with Vbt.bin in MR5; MR6 has this fixed.
Test: compiles OK, boots Linux OK.
Signed-off-by: Ursula Maplehurst <ursula@kangatronix.co.uk>
This patch adds IPC1 device to DSDT and exposes it to OS.
The behavior can be controlled by Config Data.
- Silicon Setting > Device Enable/Disable > Control 1 > IPC1 Enable/Disable
It also fixed#390.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch added command line history upport in SBL Shell. It makes
it easy to run a previous command using Up/Down arrow key.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Split PreOsChecker in a separate file and add minimum APIs
- IsPreOsCheckerLoaded ()
- LoadPreOsChecker ()
- StartPreOsChecker ()
Token space has been changed for PcdPreOsCheckerEnabled
- gPlatformModuleTokenSpaceGuid to gPlatformCommonLibTokenSpaceGuid
- Include/Excluded PreOsChecker according to FeaturePcd
Signed-off-by: Aiden Park <aiden.park@intel.com>
The 'boot' command is resetting the current
boot option to be option zero any time the
command is invoked which conflicts with the
'c' command which allows a user to select the
next boot option that should be tried. Remove
the resetting to resolve the issue when doing
'c' sub-command in the 'boot' command.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
DEBUG_OUTPUT_DEVICE_MASK can be used to control debug output devices.
When frame buffer is enabled as debug output devices, it will only
work after GFX init. However, the code will still be linked into Stage
1A/1B/2 binary and increase the size. GFX debug device should only be
enabled in payloads. This patch used separated PCD values for stages and
payloads to optimize the binary size.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
After trying out all boot options, if it still fails to boot,
current SBL code will do CpuHalt(). A better approach is to boot
into Shell and reset the current boot option to 0. In this way,
it allows user to try boot option again after modifying boot
option parameters. However, for release build, it does not change
the original behavior. System will still halt in this condition.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The 'boot' command has been updated to add
an option to update the current boot option
to be booted next, e.g. mCurrentBoot. To
change the current boot option just need to
run 'boot' and then select 'c' and the
index to change the current boot option to.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
The OS Loader 'boot' shell command does
not allow a user to skip data entry for
a given input field which can be tedious.
To make it easier allow users to press
enter to re-use the current value for
the boot option being modified to skip
to the options that they actually want
to update.
Also remove the '-a' option, no one will
typically re-enter all of the boot options.
Signed-off-by: James Gutbub <james.gutbub@intel.com>