aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi/system.tests.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-11-23 12:43:50 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-11-23 12:43:50 +0100
commit9232d36e9d4bf1329602ca5f6460eff699f24764 (patch)
treee7c1f586bc80529ee76d3806813acdb4600bd8ff /kernel/kapi/system.tests.cpp
parent3a628ca1fcc1799c55de2635024ac178961cf702 (diff)
downloadkernel-9232d36e9d4bf1329602ca5f6460eff699f24764.tar.xz
kernel-9232d36e9d4bf1329602ca5f6460eff699f24764.zip
tests: introduce ecam_fixture for PCI scan tests
This change introduces the ecam_fixture to support and simplify writing of PCI scan tests. The ecam_fixture ensures that every leaf starts out with an empty ECAM space by filling the MMIO space with 0xff to ensure all vendor IDs read as 0xffff (the invalid vendor ID). The fixture uses the new kernel::tests::memory::fill_mmio seam function, via simulated_memory::fill, to fill the MMIO space. Clearing four buses per leaf through the builder made the scan scenario take about 3.2 s. Filling the backing memory brings it to about 38 ms. In support of the new fixture type, this change also introduces the following vocabulary additions in kernel::tests::devices::pci: - function_spec - ecam_fixture::place - ecam_fixture::endpoint - ecam_fixture::bridge - ecam_fixture::multifunction - ecam_fixture::make_descriptor - function_location - addresses - addresses_of The existing scan tests now use the ecam_fixture and the new vocabulary additions in their implementation. The function factories of the test suite now return function_spec objects to describe the PCI functions and allow them to be adjusted inside a test case using the new vocabulary functions.
Diffstat (limited to 'kernel/kapi/system.tests.cpp')
0 files changed, 0 insertions, 0 deletions