Skip to content

Commit 4c19ca1

Browse files
committed
Fix some unit tests from running in Windows
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
1 parent 4877f96 commit 4c19ca1

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

chipsec/cfg/8086/kbl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ chipsec@intel.com
4242
</msr>
4343

4444
<memory>
45-
<range name="TPM" access="mmio" address="0xFED40000" size="0x10000" config="TPM.tpm12.xml" />
45+
<range name="TPM" access="mmio" address="0xFED40000" limit="0xFED4FFFF" config="TPM.tpm12.xml" />
4646
</memory>
4747

4848
</configuration>

chipsec/cfg/8086/mtl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ chipsec@intel.com
5757
<!-- -->
5858
<!-- #################################### -->
5959
<memory>
60-
<range name="TPM" access="mmio" address="0xFED40000" size="0x10000" config="TPM.tpm12.xml" />
60+
<range name="TPM" access="mmio" address="0xFED40000" limit="0xFED4FFFF" config="TPM.tpm12.xml" />
6161
</memory>
6262

6363
</configuration>

chipsec/hal/common/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def dump_range(self, range_base: int, range_size: int, size: int = 1) -> None:
8585
logger().log(f"[io] I/O register range [0x{range_base:04X}:0x{range_base:04X}+{range_size:04X}]:")
8686
read_ranges = self.read_range(range_base, range_size, size)
8787
for i, read_val in enumerate(read_ranges):
88-
logger().log(f'+{size * i:04X}: {read_val:{f'0{size * 2:d}X'}}')
88+
logger().log(f'+{size * i:04X}: {read_val:{f"0{size * 2:d}X"}}')
8989

9090
def read_port_byte(self, io_port: int) -> int:
9191
return self.read(io_port, 1)

chipsec/hal/common/msr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, cs):
6868
def get_cpu_thread_count(self) -> int:
6969
if not self.topo:
7070
self.topo = self.cs.hals.CPU.get_cpu_topology()
71-
self.logger.log_hal(f'[Msr] # of logical CPUs: {self.topo['threads']:d}')
71+
self.logger.log_hal(f'[Msr] # of logical CPUs: {self.topo["threads"]:d}')
7272
return self.topo['threads']
7373

7474

chipsec/hal/hals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def update_available_hals(self) -> Dict[str, Any]:
105105
for hal_dir in hal_dirs:
106106
hals += ([f'{hal_dir}.{i[:-3]}' for i in os.listdir(os.path.join(hal_base_dir, hal_dir)) if i[-3:] == ".py" and not i[:2] == "__"])
107107
logger().log_debug('[CHIPSEC] Loaded HALs:')
108-
logger().log_debug(f' {"\n".join(hals)}')
108+
logger().log_debug(f' {os.linesep.join(hals)}')
109109
module = None
110110
halsdata = []
111111
for hal in hals:

tests/modules/tgl/enumeration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,23 @@
8282
},
8383
"read_pci_reg": {
8484
"(0,0,0,0,4)": [
85+
"1493467270",
8586
"1493467270"
8687
],
8788
"(0,0,0,8,1)": [
89+
"1",
8890
"1"
8991
],
9092
"(0,0,1,0,4)": [
93+
"67174402",
9194
"67174402"
9295
],
9396
"(0,0,1,8,1)": [
97+
"0",
9498
"0"
9599
],
96100
"(0,0,2,0,4)": [
101+
"4294967295",
97102
"4294967295"
98103
],
99104
"(0,0,3,0,4)": [

0 commit comments

Comments
 (0)