Commit Graph

132 Commits

Author SHA1 Message Date
Assaf Carlsbad 7bf8ef6a4b Fix TPM's _send_command method to be compatible with Python 3. 2020-02-05 23:55:30 -08:00
Assaf Carlsbad 3daa7029de Fix logging of the Flash Descriptor signature. 2020-02-05 23:55:30 -08:00
Nathaniel Mitchell 85d99264f2 Fixed copy right year and removed enterprise verbiage.
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2020-02-05 23:55:30 -08:00
Nathaniel Mitchell 31328a1ab5 Fixed errors caused by list_EFI_variables in Windows.
Fixing issues in helper/modules that are caused by some versions of windows blocking runtime access to UEFI varialbes. Also fixed issue print_buffer issue when using --hal.

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2020-02-05 23:55:30 -08:00
BrentHoltsclaw 2c66083510 Update SDFP commit
Moved sfdp to common configuration
updated spi hal to use register functions opposed to xml parsing

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-02-05 23:55:30 -08:00
Sushmith Hiremath 0849635b15 - SFDP module to parse JDEC parameter table
- Bug fixes in spi_util

Signed-off-by: Sushmith Hiremath <sushmith.m.hiremath@intel.com>
2020-02-05 23:55:30 -08:00
nha 45d61877d0 a more elegant solution 2020-02-05 23:55:30 -08:00
nick ae2f3857b5 remove debug 2020-02-05 23:55:30 -08:00
nick 054ab4f089 ACPI SMI py2/3 fix 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
Assaf Carlsbad 6e413bbd28 Fix VirtMemory base class initialization. 2020-02-05 23:55:30 -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 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
Evgeny Zinoviev d924645ea1 Fix decoding of S3 bootscript EDKCompat opcodes
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
2019-12-11 09:43:03 -08:00
Evgeny Zinoviev b75c2fb8d1 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-12-11 09:43:03 -08: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 dcaa9e1548 Only display when HAL logging enabled
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-10-21 14:48:40 -07:00
Erik Bjorge f924595fd6 Updated UEFI Configuration Table detection.
If the VA in the UEFI System Table is not mapped the UEFI Runtime
Serivices Table PA and VA will be used to compute the UEFI Configuration
Table address using its VA.

This is a final attempt to get a valid address.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-10-21 14:48:00 -07:00
BrentHoltsclaw 5ea7200d28 Edit acpi_smi hal functions
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-10-21 14:47:30 -07:00
BrentHoltsclaw 076b9a9b0c Fixup windows output errors within decode
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-10-21 14:17:39 -07:00
BrentHoltsclaw 02657ef53b Fix conversion of modulo to format
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-10-21 13:10:32 -07:00
BrentHoltsclaw fdac78506d Fix python3 evsa variable issue
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-24 12:22:47 -07:00
BrentHoltsclaw b1bfb491a7 Satisfy unittest errors
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-24 12:22:28 -07:00
BrentHoltsclaw ae9b3f411e Fixup suggested lgtm hal errors
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-24 12:22:28 -07:00
BrentHoltsclaw 91e76245f9 Handle unicode variable decode within uefi hal
fix failure within decode_EFI_variables and print_efi_variable where characters are not ascii

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-17 16:03:10 -07:00
BrentHoltsclaw de9501711b vss string issue within hal.uefi_platform
Python3 failing `nvram_start = nvram_buf.find( sign )` within py3 because sign is defined as a string in else condition line 619
Reference #681

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-17 15:26:51 -07:00
BrentHoltsclaw b3f4205998 Fixup logic for uefi decode NextFwFile file size calcualtion
Try to use Extended header logic is used and the filesize causes an error, fall back the filesize within version1 header
Remove whitespace within file

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-03 10:08:33 -07:00
Daniel Schaefer ea7d64da75 Convert bytestostring before finding substring
Like in line 275 we need to convert to string before finding.
In Python3 bytes and strings are not the same and thus it would break.
2019-09-03 10:07:12 -07:00
BrentHoltsclaw 73485556d7 Cleanup bugs - Division compliant with python3
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-08-16 14:19:02 -07:00
BrentHoltsclaw 18827a8574 Cleanup use is for None type compare
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-08-16 14:18:47 -07:00
BrentHoltsclaw 2efeda4345 Merge python3-rc2 branch into master (#656) 2019-08-15 14:11:20 -07:00
BrentHoltsclaw 7e95c0e546 Fixes for EFI_SECTION_COMPRESSION logic within decompress routine
added COMPRESSION_ALGORITHMS within chipsec/defines
modified logic witin spi_uefi to rotate through valid algorithms until one is found
modified error within helpers where a list was put inside a list
modified linux helper to use subprocess.call opposed to subprocess.check_output
fixes issues #609, #610, #611

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-07-17 10:10:12 -07:00
BrentHoltsclaw f5d08081e0 fixup evsa guid
address issue #603

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-07-17 10:04:36 -07:00
BrentHoltsclaw 2d1d96b5cb Util_cmd cpu fixup info command
Changed find_EFI_Configuration_Table to not log error and only log if HAL logging is enabled
Changed get_number_threads_from_APIC_table to utilize return structure from get_parse_ACPI_table

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-07-16 09:47:17 -07:00
Eli 84f470eff1 Removed workaround for RwEverything over Hyper-V
A workaround for RWE driver causing CHIPSEC over Hyper-V to report SMRR is not supported regardless of used driver.
Since CHIPSEC manual states that it no longer supprts RwEverything driver on Windows, that workaround should be removed.
If this workaround is still needed for some reason, better tell RWE driver from CHIPSEC driver, and act accordingly.
2019-07-03 10:42:52 -07:00
Erik Bjorge ab829befd5 Add ability to reset the SMBus controller
Added code to use the Soft SMBjs Reset and wait for the reset to complete.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-06-24 11:28:57 -07:00
Erik Bjorge 27166207c8 Handle case where DIMM can't type is unknown
If the DIMM type is unknown don't attempt to print uninitialized data.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-06-24 11:28:57 -07:00
nha ef255afe10 requested changes. print DIMMS in util cmd instead 2019-06-10 13:44:28 -07:00
nha 5ac4f2a8af print out detected dimms in non verbose mode too 2019-06-10 13:44:28 -07:00
BrentHoltsclaw 66cfc642cb Fix Comments within EFI_SECTION class, fix guid format strings 2019-05-30 09:33:15 -07:00
BrentHoltsclaw d8a0ddb0d4 Decompress will return data not boolean when called through HAL 2019-05-23 14:51:38 -07:00
BrentHoltsclaw da06ee1d61 Add signed guid Certificate RSA2048/SHA256 support to UEFI decompress 2019-05-22 17:21:53 -07:00