@“Peter_Viscarola_(OSR)” said:
Hmmmm… so, you have a PCIe device, that provides TWO SPI controllers, with separate sets of registers… but ONE PCIe function? Who designed THAT device? Cuz it’s not PCIe compliant. Does the device do anything ELSE?
I am not sure if this is PCIe compliant or not but, I have seen similar posts w.r.t many UARTs being shared in the same PCIe function. Isn’t this similar to that?
Yes this device also has a I2C and UART in separate endpoints. So as a whole this is a PCIe multifunction device considering UART, I2C, SPI being present in the same endpoint but having their own config spaces.
You need to write a bus driver that enumerates each of the SPI controllers, and creates one PDO for each. As a result of reporting these PDO during normal PnP processing, the function driver for the controller will be instantiated on each PDO. Hence EvtDriverDeciceAdd in the function driver will be called twice, once for each controller.
So you mean to say its similar to using the mf.sys? Can I use mf.sys here to take care of creating the PDOs for me?
With all due respect, if your company’s major goal is for all this to work properly on Windows, I strongly suggest you hire a consultant who understands how all these pieces fit together… before you design and build hardware and try to write drivers that make life difficult. You’ll likely save yourself a ton of time and effort. You don’t know what you don’t know.
I can certainly convey this message but i think the ship sailed beyond that point.
@Pavel_A said:
Something around mf.sys with a resource map? Is this still supported on win10?
https://docs.microsoft.com/en-us/windows-hardware/drivers/multifunction/creating-varying-resource-maps
So you are saying that I can use the default mf.sys itself for my device?
The documentation regarding the resource map is not that clear. This is my understanding till now:
- Provide an inf for mf.sys which contains the actual PCIe HW IDs, MSI interrupts.
- Allocate resources to each of the child some resources of the parent in the parent inf. Like BAR0 - 0 - 200 → SPI1, BAR0 200 - 400 SPI2.
- Create two child infs for each of the SPI controller. I am not sure what to put in these INFs apart from the pointers to .sys and cat files.
here comes my doubt, we will have only one .sys file, should i create 2 INFs for 2 SPI controllers?
Is my understanding correct?
What I don’t understand at all… if SPB devices must have ACPI descriptors - who enumerates them: ACPI or PCI? Or PCI with ACPI as upper filter?
My understanding is that the enumeration will be done by the PCI driver and the logical connections between SPB controller and SPB peripherals will be maintained by the ACPI.
Thanks,
Ganesh.