* Add firmware data retrieval
* Apply suggestions from code review
* Remove FW info native versions from linux/win helpers and added results to info module
---------
Signed-off-by: Dan Scott <dan.scott@intel.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
* Initial submission of AMD common modules
* Corrected Copyright and Email for AMD modules. Major fixes to spectre module. Timeout added to PSP. Added rom_armor.
* Corrected Copyright and Email for AMD modules. Major fixes to spectre module. Timeout added to PSP. Added rom_armor.
* Corrected Platform Configuration. Corrected cpu_info for Intel.
* Corrected register checks in spectre module
* Comestic changes to strix.xml. Code quality improvements to psp and smm_addr. smm_base is redundant and removed
* Corrected smm_addr use of SMMMASK. Added PATCH_LEVEL. Added psp to chipset.
* Cleaned up results.id smm_addr.py
* <sku code> now matches <configuration> in strix.xml
When loading the kernel module fails on Linux, `chipsec_util.py`
raises an error in
logger().log_debug(traceback.format_exc())
because `traceback` was not imported.
Fix this issue by importing the missing modules `traceback` and `errno`.
While at it, import `traceback` too in other files where it was missing.
Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
On AMD, the "PCH" is the LPC device on PCI 0:14.3. According to "PPR for
AMD Family 17h Model 18h B1. 55570-B1 Rev 3.16 - Apr 14, 2021."
available on
https://www.amd.com/en/support/tech-docs/processor-programming-reference-ppr-for-amd-family-17h-model-18h-revision-b1
the low byte at D14F3x008 (bus 0 device 14 function 3 offset 8) is the
RevisionID of this device.
Using 0:1F.0 to read the RID in `Chipset.detect_platform` is likely to
be a bug from commit 2691f50bae ("Detect PCH based on platform vendor
ID"), which introduced AMD support in this function. Fix this by using
`bus, dev, fun` to read `pch_rid`.
Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
`Chipset.set_control` calls:
self.write_register_field(reg, field, control_value, cpu_thread)
But `write_register_field` is defined as:
def write_register_field(self, reg_name, field_name, field_value, preserve_field_position=False, cpu_thread=0):
So variable `cpu_thread` is given to parameter `preserve_field_position`
instead of parameter `cpu_thread`.
Fix this by using `cpu_thread=cpu_thread` syntax in the call.
This bug was found while adding type hints to `chipset`. Mypy reported:
Argument 4 to "write_register_field" of "Chipset" has incompatible type "int"; expected "bool"
Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
If the vendor ID or the device ID returned by `detect_platform()` is not
known in `chipset_dictionary`, accessing
`self.chipset_dictionary[vid][did]` raises a `KeyError` exception. To
prevent this, use the variables `vid_found` and `did_found` before
accessing `self.chipset_dictionary[vid][did]`.
Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
add cpuid detection debug mode print, cmdline para "-d" show cpuid detection value as below,
sudo python3.6 chipsec_util.py -d cpu info
Signed-off-by: Zhou Jun, jun2.zhou@intel.com