Commit Graph

776 Commits

Author SHA1 Message Date
Assaf Carlsbad e486ab487e Set _unknown_pch to False when the PCH DID is known. 2019-12-18 16:30:08 -08:00
Assaf Carlsbad 8a2c941f3c Fix VirtMemory base class initialization. 2019-12-18 16:29:41 -08:00
Assaf Carlsbad 9f80c67bf0 Fix compression tools build - the trailing backslash was interpreted as a multi-line definition. 2019-12-18 16:29:20 -08:00
Assaf Carlsbad af7545d27b Fix couple of issues with running chipsec_util as a standalone executable. 2019-12-18 16:28:48 -08:00
Assaf Carlsbad 5f9555bb0e Use apt format specifiers: %u for unsigned int, %ul for unsigned long and %zu for size_t. 2019-12-18 16:27:46 -08:00
Assaf Carlsbad 38fdeb0d71 Delete extra argument passed to DbgPrint not used by format string. 2019-12-18 16:27:46 -08:00
Assaf Carlsbad 0f2d02fb1d Fix typo: Traslated -> Translated. 2019-12-18 16:27:46 -08:00
Assaf Carlsbad 080f42b20f Print DEVICE_OBJECT and DRIVER_OBJECT addresses using %p. 2019-12-18 16:27:46 -08:00
Assaf Carlsbad 22e46651fe Fix input buffer length check for IOCTL_RDMSR. 2019-12-12 21:44:14 -08:00
Assaf Carlsbad 1873f36a0e Fix a minor typo in comments (detele -> delete). 2019-12-12 21:42:48 -08:00
Assaf Carlsbad 11806ead48 Fix ability to explicitly specify OS helper. 2019-12-12 21:41:55 -08:00
BrentHoltsclaw 7e357d9df4 Add log message for Windows SMI when OS and Python Arch do not match
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-09 15:17:07 -08:00
BrentHoltsclaw fe6fd7fe29 add did for c620 series
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-09 15:16:40 -08:00
BrentHoltsclaw 71bb8103b6 Update is_supported to not run if bootscript is not found
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-05 15:51:13 -08:00
NicholasArmour aa770f770f requested changes 2019-12-05 15:48:55 -08:00
NicholasArmour 81d04c5752 added comments, moved some code around 2019-12-05 15:48:55 -08:00
NicholasArmour 71a1768751 SMM communication protocol 2019-12-05 15:48:55 -08:00
Calvin Balke e10c11cd82 Added bugfix for issue 765 in msgbus HAL code
See issue 765 for more information
2019-12-05 15:48:07 -08:00
BrentHoltsclaw 95df4be1ce update print_supported_chipsets to work with defaultdict(list)
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-05 15:41:17 -08:00
BrentHoltsclaw 4b2dd0dfc5 Update to version 1.4.4
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
1.4.4
2019-11-20 16:27:16 -08:00
mbushkov 6a425e214c Do not build the driver when installing from a sdist-built package.
This PR changes sdist() command to include a special marker file that, when present, automatically sets skip_driver flag to True. This way, when installing from an sdist-produced distribution (i.e. from PyPI), no kernel driver is built. This is useful for cases when a project depends on chipsec's Python code (and thus would like to reference the dependency in its setup.py) but expects the kernel driver to be shipped separately.
2019-11-20 10:13:49 -08:00
BrentHoltsclaw 49d40e8397 Fix error messages and helper loading
Remove dependency for win32helper to find .sys file within init
Fixup logic to better display when driver file cannot be found

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-20 10:13:26 -08:00
BrentHoltsclaw fdf2c793f2 Create command and module templates
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-19 10:40:30 -08:00
BrentHoltsclaw 6be52acec2 Remove smbios bios_version module
The module is currently not stable and causing issues.  Given it is an Informational Check, it is being removed for the time being.
Similar functionality exists within chipsec util.

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:23:45 -08:00
nick 278369bd1e fixed typo and selecting data_dict if only 1 entry 2019-11-18 15:23:11 -08:00
BrentHoltsclaw 7562a21a59 Add helper/driver information to chipsec_main and chipsec_util
Add self.name and self.driverpath to Helper baseclass
Add get_info function into Helper baseclass which returns self.name and self.driverpath
Modify helpers to have proper name and driver location for driver loaded

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:22:09 -08:00
BrentHoltsclaw 6be725484f Add ability to require pch configuriation file to be loaded
Add reqs_pch to configuration attributes within template.xml
Add reqs_pch as field for WHL as example
Update logic within chipset.py to check if reqs_pch attribute exists
Update logic within chipset.py to raise error if pch is required and driver needs to be loaded
Note can still work around with the -i flag

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:17:41 -08:00
BrentHoltsclaw 0f804c588a Fix python3 utilcmd help issue
Help was not being displayed in python3 when no arguments were provided

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:16:41 -08:00
BrentHoltsclaw 88673d56ec Fix decode functionality
Fix error when cannot decode EFI_SECTION_USER_INTERFACE
Fix error in File size logic within NextFwFile functionality

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:14:27 -08:00
Erik Bjorge 40ff7cffbf Get extended BIOS R/W access information
Use the Flash Descriptor Observability registers to OR in the settings
from the flash descriptor to the existing FRAP register fields.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-11-18 15:13:59 -08:00
nick 6817e43149 remap module not applicable for atom 2019-11-18 15:12:19 -08:00
BrentHoltsclaw 81fd9d6da4 Add GLK support
Document ID: 336561-001

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:11:39 -08:00
BrentHoltsclaw ada230b839 Fix unittest errors
Updated mock_helper to use BaseHelper
Updated util harness to correctly override helper with testhelper

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:10:56 -08:00
BrentHoltsclaw db4186f9f9 Changes after adding duplicate did support
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-15 15:54:43 -08:00
BrentHoltsclaw dd82565ea6 Fixup errors with chipset dictionary
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-15 15:54:43 -08:00
BrentHoltsclaw ec063c114c Adding 10th Gen support
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-15 15:54:43 -08:00
BrentHoltsclaw da36eaaf90 Add duplicate DID support for chipset and pch
changed Chipset_Dictionary and pch_dictionary to default_dict
update logic to create chipset_code and pch_codes
add get_cpuid command to use for additional detection of chipset
updated init logic to match cpuid value if populated within Chipset_Dictionary and multiple entries exist

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-13 14:39:30 -08:00
Erik Bjorge 8a64f85db8 Fixed logger flush when redirected to a file
When flushing to a log file the handler is removed but was not added
back.  Added code to restore the handler.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-11-11 11:21:12 -08:00
Erik Bjorge 3831b1cf05 Fix zero padding when printing registers
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-11-06 20:28:37 -08:00
RageLtMan d02624bbaf valid_mmap_phys_addr_range conflicts with upstream
PaX implements valid_mmap_phys_addr_range in the kernel, and the
(return 1) hack in chipsec_km.c has a name collision with it.

Add another conditional for exposing the definition predicated on
whether __HAVE_ARCH_PAX_OPEN_USERLAND is defined in the kernel
headers. If it is, dont redefine the original function.
2019-11-06 20:26:22 -08:00
Evgeny Zinoviev b77607a0e4 Fix decoding of S3 bootscript EDKCompat opcodes
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
2019-11-06 20:25:49 -08:00
Evgeny Zinoviev 89e5a6a6ef Fix broken s3script_modify
S3 bootscript patching was broken because of incorrect format string
used in __str__ method of class op_io_pci_mem, which was raising KeyError.

Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
2019-11-06 20:25:20 -08:00
Erik Bjorge 5d728ad6ae Add BlackArch Linux reference
Adding BlackArch Linux as a distro that includes CHIPSEC by default

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-11-06 20:24:15 -08:00
Frinzell 6e35771cea Update Windows pywin32 requirements 2019-10-31 14:29:52 -07:00
p-state 17da5461cf More varstore parsing fixes (#728)
* No need to convert to bytes

This led to creation of b'' characters in the file names.

* Correct get_nvar_name (was wrong on python 3)

* Fix NVAR variable store parsing

Fixes wrong guids and python3 compatibility. Working with bytes using python 2/3 compatible `_ord` function.

* Really fix python3 EVSA variable issue

* Fix blank header check (python 3)
2019-10-31 14:24:40 -07:00
BrentHoltsclaw 7f929901bf Add logic to iobar fixed address fallback
Also fallback to fixed address if base address is 0

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-10-31 14:23:55 -07:00
Erik Bjorge 736871e5f9 Adding initial SMBIOS support (#722)
* Initial SMBIOS HAL and Command

- Only searches for the Entry Point structure
- Currently only detects 2.x structures correctly

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Added support for 64bit 3.x entry point

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Updated command processing

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Added ability to parse structures based on header

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Updated command processing

- Made command processing a bit more flexible
- Improved logging messages
- Added place holders for future functionality

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Added ability to get structures by type

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Added string extraction support

- Also added some initial code for decoding type 0 structure information
- Updated interface to make things cleaner

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Added decode support

- Only supports partial decode of Type 0 (2.0) structure

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Removed unused variable

- Also fixed tool name in timing string

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Adding basic BIOS Information module

- Adding module to get the BIOS Information SMBIOS data

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>

* Python 3 updates

- Requires additional Python 3 UEFI HAL changes

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-10-31 14:17:47 -07:00
Erik Bjorge 3354a4e729 Additional Python 3 updates
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-10-24 14:11:50 -07:00
Erik Bjorge c2f13379e7 Fixing Python 3 bug
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-10-24 14:11:06 -07:00
Erik Bjorge af7fdb6d37 Fixing imports and __init__ function
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-10-24 14:11:06 -07:00