Commit Graph

793 Commits

Author SHA1 Message Date
Assaf Carlsbad 87b48aef5b Strip terminating NULL bytes from the CPU brand. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 82fef642e1 Correctly handle the case where the CPU already has microcode updates. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 0cb69ef891 Set failure status when pool allocation fails. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 073d015361 Fix input buffer length check for IOCTL_LOAD_UCODE_PATCH.
Fix traces.
2020-02-05 23:55:30 -08:00
Assaf Carlsbad ce3d928edc Fix input buffer length check for IOCTL_WRMSR. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 37c224f550 Add support for the Intel Core i7-8565U CPU, whose CPUID signature is 0x806EB. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad f763cb0de7 Add some Windows related entries to gitignore. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 8906011512 Consistent handling of the case new_cpu_thread_id >= _num_active_cpus. 2020-02-05 23:55:30 -08:00
BrentHoltsclaw b7bac4fa45 Updating to 1.4.5
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw 7d1be986be Win helper efi variable fixes for py3
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw ca8adc8d5c Fixup fake guid creation
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw bce3a542a3 Fixup spi_uefi File/Section parsing
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw 3265bb2be1 Cleanup sgx_check
Add is_supported funciton
cleanup imports
check register field name not bits where applicable
modify prmrr config lock check

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw 76f379d860 Remove PCH data from SKX and require PCH to be loaded
Add req_pch="True" in configuration tag
Diff c620.xml and skx.xml to remove pch registers

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw dcae48aa6d fixup some lgtm_errors
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw 7751c1d468 Remove duplicate DID 5918 entry
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
Assaf Carlsbad 09f5cdd239 Set _unknown_pch to False when the PCH DID is known. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 6e413bbd28 Fix VirtMemory base class initialization. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 5254145ff0 Fix compression tools build - the trailing backslash was interpreted as a multi-line definition. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad d6abbe1813 Fix couple of issues with running chipsec_util as a standalone executable. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 0ab91e2486 Use apt format specifiers: %u for unsigned int, %ul for unsigned long and %zu for size_t. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad e226b5ae71 Delete extra argument passed to DbgPrint not used by format string. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad ba5ddb2320 Fix typo: Traslated -> Translated. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad e64fac344c Print DEVICE_OBJECT and DRIVER_OBJECT addresses using %p. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 39360928b2 Fix input buffer length check for IOCTL_RDMSR. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 21b00ceef6 Fix a minor typo in comments (detele -> delete). 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 1c68fe7e28 Fix ability to explicitly specify OS helper. 2020-02-05 23:55:30 -08:00
BrentHoltsclaw 766bcd8c02 Update to master (#784)
* 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>

* 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>

* Fix decoding of S3 bootscript EDKCompat opcodes

Signed-off-by: Evgeny Zinoviev <me@ch1p.io>

* 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.

* Fix zero padding when printing registers

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

* 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>

* 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>

* Adding 10th Gen support

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* Fixup errors with chipset dictionary

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* Changes after adding duplicate did support

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* 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>

* Add GLK support

Document ID: 336561-001

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* remap module not applicable for atom

* 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>

* 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>

* 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>

* 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>

* 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>

* fixed typo and selecting data_dict if only 1 entry

* 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>

* Create command and module templates

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* 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>

* 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.

* Update to version 1.4.4

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* update print_supported_chipsets to work with defaultdict(list)

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* Added bugfix for issue 765 in msgbus HAL code

See issue 765 for more information

* SMM communication protocol

* added comments, moved some code around

* requested changes

* Update is_supported to not run if bootscript is not found

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* add did for c620 series

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>

* Add log message for Windows SMI when OS and Python Arch do not match

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-12 17:45:26 -08:00
BrentHoltsclaw 59ef917da8 Add log message for Windows SMI when OS and Python Arch do not match
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
BrentHoltsclaw 5d18227fc4 add did for c620 series
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
BrentHoltsclaw fbc1328599 Update is_supported to not run if bootscript is not found
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
NicholasArmour 1e52d94456 requested changes 2019-12-11 09:43:03 -08:00
NicholasArmour 3b4297673e added comments, moved some code around 2019-12-11 09:43:03 -08:00
NicholasArmour 1a5dfd9c8d SMM communication protocol 2019-12-11 09:43:03 -08:00
Calvin Balke d04923625e Added bugfix for issue 765 in msgbus HAL code
See issue 765 for more information
2019-12-11 09:43:03 -08:00
BrentHoltsclaw 15601cc391 update print_supported_chipsets to work with defaultdict(list)
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
BrentHoltsclaw eb30b6f9bc Update to version 1.4.4
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
mbushkov b291d8ce42 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-12-11 09:43:03 -08:00
BrentHoltsclaw 23b27baff6 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-12-11 09:43:03 -08:00
BrentHoltsclaw cc337e85df Create command and module templates
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
BrentHoltsclaw b9a03312e6 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-12-11 09:43:03 -08:00
nick fed5cdd10e fixed typo and selecting data_dict if only 1 entry 2019-12-11 09:43:03 -08:00
BrentHoltsclaw 51a1de1a7e 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-12-11 09:43:03 -08:00
BrentHoltsclaw 63189c29ba 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-12-11 09:43:03 -08:00
BrentHoltsclaw ee81702de0 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-12-11 09:43:03 -08:00
BrentHoltsclaw 4afc0e88e8 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-12-11 09:43:03 -08:00
Erik Bjorge c8ad9d163e 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-12-11 09:43:03 -08:00
nick bde6472171 remap module not applicable for atom 2019-12-11 09:43:03 -08:00
BrentHoltsclaw e7680eb3d2 Add GLK support
Document ID: 336561-001

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-12-11 09:43:03 -08:00
BrentHoltsclaw d1c5494777 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-12-11 09:43:03 -08:00