Commit Graph

108 Commits

Author SHA1 Message Date
BrentHoltsclaw 513fa89384 dev/chipsec2 hal.cpu hal.spi registers.mm_msgbus fixes (#2520)
* dev/chipsec2 hal.cpu hal.spi registers.mm_msgbus fixes

Found the following updates needed when using the framework

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

* Fix test_cpu unit test

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>

---------

Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
Co-authored-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-07-09 09:18:08 -07:00
Dan Scott 36ce4687b1 Add varstore unit tests
Signed-off-by: Dan Scott <dan.scott@intel.com>
2025-05-23 09:06:58 -07:00
Nathaniel Mitchell 772caed91c Fix txt unit test by updating json
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-05-08 01:07:54 +08:00
Nathaniel Mitchell 14bda6657d Update iommu unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-05-08 01:07:54 +08:00
Nathaniel Mitchell b817cbad82 WIP - dev/chipsec2 - varstore unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-04-28 09:09:13 -07:00
Nathaniel Mitchell 439c1a4d09 General update to chipsec2
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-04-18 12:00:31 -07:00
Sara Batllori 40c60dce69 Add archiving status for modules
Signed-off-by: Sara Batllori <sara.batllori@intel.com>
2025-03-18 16:45:27 -07:00
Nathaniel Mitchell bea2860e8e Update device functions and port register.read*/write* functions
Updated the device.get_obj/objlist functions to match the other types e.g. "get_list_by_name" and "get_instance_by_name".

Updated register.read/read_field/write/write_field functions to first get the register objects, then read*/write* from there.

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-18 16:29:21 -07:00
Nathaniel Mitchell de6ffa0409 Update smbus hal, cmd and unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-17 09:07:19 -07:00
Nathaniel Mitchell 088a2ca69c Fixup spi HAL and additional unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-11 20:45:54 -07:00
Nathaniel Mitchell 947f67a6e1 Fix acpi tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-11 20:45:54 -07:00
Nathaniel Mitchell 4b65243d9c Fix more unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-10 09:06:35 -07:00
Nathaniel Mitchell db92baec59 Fix up unit tests part 1
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-10 09:06:35 -07:00
Nathaniel Mitchell 74818ec960 Fix up more modules. Adl now matching legacy run
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-07 21:08:24 -08:00
Nathaniel Mitchell d5345ad8c1 mmio update, unit tests, additional fixes
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-04 22:15:21 -08:00
Nathaniel Mitchell f0fb769d70 Move acpi_tables to library from hal
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-04 22:15:21 -08:00
Nathaniel Mitchell 29d1a2a364 Update to hals
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-03-04 22:15:21 -08:00
Nathaniel Mitchell 831841ff1a Update some of the unit tests to run
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-02-25 11:01:06 -08:00
Nathaniel Mitchell 89488d514e Fix up rtclock and smm_dma modules and cpu hal+unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-02-25 10:37:52 -08:00
Nathaniel Mitchell 0b07dcd9b6 Update haldata and msr hal/cmd/tests
Change haldata to use cpuid mfgstr
Update MSR hal/cmd/tests

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-02-18 13:19:38 -08:00
Nathaniel Mitchell 3b33e590ed Add cpuid enumeration data to util test recording
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-02-18 12:53:30 -08:00
Nathaniel Mitchell a032f04630 Update haldata and msr hal/cmd/tests
Change haldata to use cpuid mfgstr
Update MSR hal/cmd/tests

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2025-02-18 12:53:25 -08:00
Dan Scott ac1966ec85 Add hal/smbus.py unit tests
Signed-off-by: Dan Scott <dan.scott@intel.com>
2025-02-18 10:37:41 -08:00
Dan Scott e3b2ccccdd Add utilcmd unit tests
Remove last remaining python 3.7 reference.

Signed-off-by: Dan Scott <dan.scott@intel.com>
2025-02-18 10:37:07 -08:00
Dan Scott 263934f79e Sgx_sample_check 2025-02-18 10:37:06 -08:00
Sara Batllori c4be346ac0 Add util to decode tests' name/id
Signed-off-by: Sara Batllori <sara.batllori@intel.com>
2025-02-18 10:36:35 -08:00
Nathaniel Mitchell aaaa9e58a2 Update hal references to use cs.hals
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-12-10 12:22:31 -08:00
Nathaniel Mitchell f7409804b4 HAL Update - Enable multitenant HALs
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-12-03 12:50:36 -08:00
Nathaniel Mitchell 847f02daa1 initial commit of cfg changes
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-12-03 12:50:34 -08:00
Dan Scott 9095a9bb59 Add unit tests for acpi_tables.py
Signed-off-by: Dan Scott <dan.scott@intel.com>
2024-10-30 12:54:57 -07:00
Nathaniel Mitchell 0fd651aad8 Add test data to txt_cmd json for ut
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-09-25 17:08:04 -07:00
Sara Batllori c71090acff WIP: Add unit tests for igd, interrupts, io, iommu utilcmds
Signed-off-by: Sara Batllori <sara.batllori@intel.com>
2024-09-25 09:01:56 -07:00
Nathaniel Mitchell be074e9d7c Update distro check in test_generic
platform.linux_distribution was deprecated in 3.5 and removed in 3.7.

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-09-19 23:58:49 -07:00
Nathaniel Mitchell 7aedf7ebdf Use more generic 'codename' for mSystem in test_generic
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-09-09 16:37:01 -07:00
jun2zhou d619c5f746 Update linux distro api (#2282)
* Update linux distro api

Signed-off-by: Jason Zhou <jun2.zhou@intel.com>
2024-09-09 16:35:45 -07:00
Nathaniel Mitchell 6e43a6edae Fix record/replay helpers to capture exceptions
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-08-26 16:38:52 -07:00
Nathaniel Mitchell aedaa7531f Fix bug when msgbus_cmd returns wrong value type in windows
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-07-30 14:12:32 -07:00
Nathaniel Mitchell cb2da0145f Add more tests for windows helper
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-06-17 16:35:52 -07:00
Nathaniel Mitchell 39cf4bb620 Add UTs for ec_cmd and config_cmd
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-05-28 16:42:16 -07:00
Nathaniel Mitchell ed9c6e2896 Update how ACPI Tables are found
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2024-04-17 15:27:21 -07:00
Dan Scott 2a412e0cc0 Enumerate modules in modules folder using '-lm' 2024-03-28 13:49:05 -07:00
Sae86 4a7afd23cb Add unit testing for msr_cmd, mmcfg_cmd, mmcfg_base_cmd, desc_cmd and cpu_cmd
Signed-off-by: Sae86 <sara.batllori@intel.com>
2024-03-28 11:06:56 -07:00
Dan Scott 0e8192cfd0 Move files to library folder 2024-03-22 14:26:59 -07:00
Dan Scott a933b1337d Update references to functions in new library files 2024-03-22 14:26:59 -07:00
Sae86 6adf3dfae0 Add unit tests for acpi_cmd, chipset_cmd, cmos_cmd
Signed-off-by: Sae86 <sara.batllori@intel.com>
2023-12-11 13:35:11 -08:00
Nathaniel Mitchell 05805dd1f6 Set the logger.HAL flag to false for unit tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2023-12-11 10:46:46 -08:00
Nathaniel Mitchell bf69ab9391 Fix tgl debugenabled unit test replay
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2023-12-01 13:39:59 -08:00
Nathaniel Mitchell 0e44e6ae19 Remove mistakenly added log filters from tgl tests
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2023-11-20 16:37:42 -08:00
Nathaniel Mitchell f005fba0c6 Make sure DID/VID is printed when platform is unknown
And fixes unit tests

Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2023-11-13 16:36:49 -08:00
Nathaniel Mitchell a198b99b41 Add _logger.disable() to tests to reduce prints
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2023-11-09 16:17:50 -08:00