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>
This patch allows platform to degrade eMMC HS400 to HS200 using
static configuration. To do this, please add the following into
BoardConfig.py:
self.ENABLE_EMMC_HS400 = 0
This is useful when platform has hardware issue to run at eMMC
HS400 mode.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch changes the default behavior of gpio pin for payload
selection, currently user configured GPIO pin being high boots
to uefi payload, modified code will boot to OS loader when GPIO pin
is high.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
power button 4 second press will cause power button override
bit to set in PM1 status register, this bit is not cleared on
reset and is causing SMI storm during booting to OS.
Power button override bit if set is cleared now in stage1b and
this fixed the SMI storm issue.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
Current code set payload id depending on the gpio settings
and user selection from configuration data. When UEFI payload is
selected using GPIO or config data, payload id is being set to
UEFI irrespective of boot mode, which cause notification function
to get called, this locks the spi which inturn fails firmware update
Modified code to set payload id only in non-firmware update boot mode.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
This patch added csme wrapper driver for csme update library.
following functionality is added in this patch
1. Boardconfig PCD option ENABLE_CSME_UPDATE is added to
enable/disable csme update support
2. Boardconfig PCD option BUILD_CSME_UPDATE_DRIVER is added
to enable/disable building csme update driver
3. If BUILD_CSME_UPDATE_DRIVER is 1, user need to create
library that inludes csme update library
this newly created library will get linked to csme update
wrapper driver providing csme update driver
4. By default ENABLE_CSME_UPDATE is set to 0
5. Revision control for input and output data structure to
update driver is not implemented and will be avaiable
in further patches.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
This patch added basic deinit support in the media DevInit() interface.
It uses a special DevDeinit phase to inform the media driver to do
device de-initialization. This de-initialization flow will be called
before OsLoader restarting and OS booting.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
UPX board has different memory configurations indicated by GPIO pins.
This patch added GPIO detections for these pins and set it as BomID.
It can be used to decide which SPD data to use later on.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
When USB keybaord input console is enabled, current code will keep
sending interrupt transfers to poll the USB keyboard state. However,
according to USB spec, it needs to be polled at certain interval
returned by the device. If the polling rate is too high, sometime,
host will fail to schedule the SPLIT transfer. This patch adjusted
the polling rate to the required interval.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch will skip TAB check in all python files for now.
THis change will be reverted after cleanup all TABs.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch fixed the pointer check before de-allocating memory
previously allocated for AHCI controller.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch adjusted power related UPD settings to BIOS
UPD values are configurable through configuration data
After these changes, CPU maximum operating frequency
increased from 3.7GHZ to 4.2GHZ on WHL.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
Current SBL code assumes the image to load on raw partition follows
IAS format. Since container format is added recently, the code should
support both. This patch added support for container format as well.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This is to fit the size of the latest Debug UEFI Payload.
Increase the size from 0x00180000 to 0x00190000.
Signed-off-by: Aiden Park <aiden.park@intel.com>
ConfigEditor can load binary into Table widget. It has a boundary
check issue which results in the last byte left out. This patch
fixed this and also added code to roll back invalid inputs to its
last known good value for Table widget cell.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
StitchIfwi.py supports '-q' parameter to enable SPI QUAD mode.
However, it does not work as expected. When the script tries to
modify the XML file, it used 'yes' and 'no' as option values.
But it is case sensitive, and should use 'Yes' and 'No' instead.
This patch fixed this issue.
Test was done on LeafHill board and it enabled SPI QUAD mode
in IFWI after the fix. It fixed#370.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch allows APL and WHL(CFL) to use common header file for SPI
register access.
APL and CFL are using common SpiFlashLib and PchSpiLib, but Platform
code still refering to its own SPI registers header file.
- Remove duplicated header file
- Add common one to Silicon/CommonSocPkg
- Use SPI registers from common one in each Platform code
Signed-off-by: Aiden Park <aiden.park@intel.com>
Current ConfigEditor does not run well with PY3. The generated DLT
file has invalid strings. It was caused by the incompability between
PY2 and PY3. This patch rewrote some code with compatibility for both
PY2 and PY3.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Current ConfigEditor uses multiple Entry widgets to build a Table
widget since Tkinter does not support Table widget. However, when
the table is big, the loading performance is very slow because of
large mount of Entry widgets. This patch switched to use Treeview
widget to build a table widget, and it is much more faster than the
original implementation.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch added mouse wheel scroll event handler so that mouse can
be used to scroll the configuration items on the page.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The EXT library has some unused code that
we can remove to help reduce the size and
to clean things up some more. Also add a
routine for dumping the group descriptor
table which can be helpful for debugging
issues.
Signed-off-by: James Gutbub <james.gutbub@intel.com>
Current SBL display long help string in single line in ConfigEditor.
If the line is too long, only part of the line is visible on screen.
By change widget from Label to Message, it allows multiple lines
help string display.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
EXT2/3 library has some limiatation to support
hardware block sizes larger than 512 (e.g. 4KB)
and also does not currently support the flag
INCOMPAT_64BIT which indicates larger group
descriptor sizes. This patch adds flexibility
to support 512 and 4KB block sizes as well as
64bit EXT file systems.
Signed-off-by: James Gutbub <james.gutbub@intel.com>