3 This module mocks a PCI subsystem and allows mocking PCI devices. The goal is
4 to "run" a hardware driver under AROS-hosted environment with as little changes
7 "Running" of course does not meak "making it work", but "making code paths
8 execute". This king of running has a great capability to bring to surface most
9 critical problems like segmentation fauls and missing/not correclty ported or
10 written functionality.
12 The mock hardware is capable of proving all PCI config data as well as IO/MMIO
13 regions. Required memory address in those regions can be pre-filled with needed
16 The mock hardware is also capable of reacting to writes into its config space,
17 IO/MMIO regions. The reaction needs to be implemented in the
18 MemoryChangedAtAddress method. This method is automatically invoked and doing
19 writes into config space. In case of writes of to IO/MMIO this method would
20 have to be invoked from write functions in the driver itself (*).
22 Note that there always will be cases where driver's code will have to be
23 modified to allow execution in hosted environment. The goal of this mock
24 system is not to totally remove the need for driver modification, but to remove
25 the 80%-90% of cases where the modfication would be needed.
27 The configuration of the system is done in the PCIMock_InitClass.
29 (*) - in current version there is no facility to forward a call from hardware
30 driver to mock hardware's MemoryChangedAtAddress. Probably a separate dispatcher
31 HIDD object needs to be created, because the mock hardware HIDD object is hidden
32 under pci device HIDD object and pci driver hidd object.