27 Commits

Author SHA1 Message Date
Sachin Kamat
12b482e407 feat: [Common] Display file name on Config Editor GUI
Display the file name of the opened file in GUI (top and bottom)
for better user experience.

Signed-off-by: Sachin Kamat <sachin.kamat@intel.com>
2025-06-30 06:27:41 -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
Randy Lin
f590717e93 Fix condition fields may disappear in Config Editor tool
When enable TGL IBECC, the IbeccProtectedRegionMask should be visible
too in the Config Editor but its not happening this way.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-02-08 20:01:52 -08: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
a4be3518b2 Add new Constant type for CFGDATA
There are CFGDATA item that needs to be generated into DLT file,
but not to be displayed in ConfigEditor. The current "Reserved"
type prevents the item from being displayed in ConfigEditor,
but also prevents it from being generated in a DLT file. The new
"Constant" type is introduced here to resolve this issue. Item
with "Constant" type will not be displayed in ConfigEditor, but
will be generated in the DLT file.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-04 10:49:30 -07:00
Maurice Ma
d031072e9c Enable search bar in ConfigEditor
This patch added a search bar in ConfigEditor so that it
is easier to locate a configuration item.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-21 10:14:15 -07:00
Maurice Ma
126a2c5f03 Enhance ConfigEditor to handle error condition
This patch enhanced ConfigEditor to handle the case that the app
will crash when "Value" is not provided in YAML. It also fixed
an hide/show issue for Table type widget.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-05-14 11:15:19 -07:00
Chin Keong Ang
d6d21f507e Config Editor: Update default yaml file search dir
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>
2020-12-01 20:55:00 -08:00
Maurice Ma
5eb9ae3d46 Fix save full delta file issue in ConfigEditor
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>
2020-10-16 13:20:33 -07:00
Maurice Ma
eb43c7e8f4 Fix default value change issue in ConfigEditor
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>
2020-10-14 15:07:53 -07:00
Maurice Ma
5f5cbaebaa Represent data in required format in ConfigEditor
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>
2020-09-15 07:33:14 -07:00
Maurice Ma
7822e69364 Updated tools to support CFGDATA yaml format
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>
2020-08-03 10:43:35 -07:00
Maurice Ma
d7f43dfe3a Fix ConfigEditor mouse scroll issue with Python3
Scrolling mouse in ConfigEditor with Python3 will trigger some
error message. During the scroll unit calculation, it is required
to convert float into int type. This patch fixed it.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-04-20 09:40:49 -07:00
Aiden Park
b24fd2759c Cosmetic: Convert LF to CRLF
This will fully support PatchCheck.py.
- Remove all trailing whitespace
- Convert LF to CRLF by default
- Update EFI_D_* to DEBUG_*
- Re-enable CRLF check in PatchCheck.py

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-12-02 16:21:19 -08:00
Maurice Ma
533dbed5a0 Enhance CFGDATA tools to support generating DLT from IFWI
This patch enhanced the CFGDATA script to extract CFGDATA BIN
files from IFWI and further generate DLT using default DSC.
In this way, the default CFGDATA binaries and DLT files are no
longer requried to be provided in the release package in order
to customize the CFGDATA in an existing IFWI image.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-12-02 10:02:43 -08:00
Maurice Ma
2cd3739bde Minor fixes for ConfigEditor tool
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>
2019-10-10 09:42:03 -07:00
Maurice Ma
c49be1603e Use Treeview widget to display table in ConfigEditor
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>
2019-10-09 15:52:37 -07:00
Maurice Ma
e375cf8d07 Add mouse scroll event handler for ConfigEditor
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>
2019-10-09 12:04:19 -07:00
Maurice Ma
0adfc94027 Display multiline help string in ConfigEditor
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>
2019-10-09 09:54:51 -07:00
Maurice Ma
fb33d7dbf0 Format the CFGDATA values in generated DLT file
This patch formats the CFGDATA value string into a standard format
for the generated DLT file. It will format the array string using
its structure type including UINT8/16/32/64.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-09-30 17:07:26 -07:00
Maurice Ma
615ad7e65b Enable DLT file loading through ConfigEditor command line
This patch added support to load CfgData DLT file through
ConfigEditor command line interface. It makes it easy to
run ConfigEditor. It requires DLT file to be in the same
folder as the CfgDataDef.dsc file.
EX: python ConfigEditor.py  Brd1.dlt

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-09-30 17:07:26 -07:00
Maurice Ma
e2d1d73684 Add support for variable cell width in ConfigEditor
Current ConfigEditor only supports UINT8 format cell in table.
This patch added support for variable cell width including UINT8,
UINT16, UINT32 in table widget. Test configuration items were
also added in QEMU to test these format.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-09-30 17:07:26 -07:00
Maurice Ma
ea38da7599 [TOOLS] Add python3 build support
EDK II build has enabled python3 support. Since SBL has its own scripts,
it is required to port them accordingly to support python3. This patch
added python3 build support for SBL.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-08-22 09:18:52 -07:00
Maurice Ma
6b45c53c54 Filter out include DSC files in ConfigEditor open dialog
In ConfigEditor, when open DSC files, many files will show up. It
is expected to only open the CfgDataDef.dsc. This patch changed
the file match pattern to only list *Def.dsc file.  In this way,
user will not make mistake to open some include DSC file.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-06-19 15:39:47 -07:00
Guo Dong
5e10bd1e07 Update BSD license to BSD+Patent license
To align with EDK2, update file license
to use BSD+Patent license

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-06-13 10:46:49 -07:00