From 766bcd8c021a5c2c221b604b3a912cbdefe852af Mon Sep 17 00:00:00 2001 From: BrentHoltsclaw Date: Thu, 12 Dec 2019 17:45:26 -0800 Subject: [PATCH] Update to master (#784) * Add BlackArch Linux reference Adding BlackArch Linux as a distro that includes CHIPSEC by default Signed-off-by: Erik Bjorge * 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 * Fix decoding of S3 bootscript EDKCompat opcodes Signed-off-by: Evgeny Zinoviev * 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 * 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 * 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 * Adding 10th Gen support Signed-off-by: BrentHoltsclaw * Fixup errors with chipset dictionary Signed-off-by: BrentHoltsclaw * Changes after adding duplicate did support Signed-off-by: BrentHoltsclaw * Fix unittest errors Updated mock_helper to use BaseHelper Updated util harness to correctly override helper with testhelper Signed-off-by: BrentHoltsclaw * Add GLK support Document ID: 336561-001 Signed-off-by: BrentHoltsclaw * 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 * 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 * Fix python3 utilcmd help issue Help was not being displayed in python3 when no arguments were provided Signed-off-by: BrentHoltsclaw * 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 * 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 * 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 * Create command and module templates Signed-off-by: BrentHoltsclaw * 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 * 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 * update print_supported_chipsets to work with defaultdict(list) Signed-off-by: BrentHoltsclaw * 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 * add did for c620 series Signed-off-by: BrentHoltsclaw * Add log message for Windows SMI when OS and Python Arch do not match Signed-off-by: BrentHoltsclaw