Hi,
I am new to windows driver development.
In my project we are using PCA-6029 (i7 with H110 chipset) SBC. It supports windows 10 IOT enterprise LTSC, we have to develop a ISA device driver to access custom ISA board (slave). ISA board is a memory module, we need to access the memory (0xcc000 - 0xcc799) from SBC (PCA 6029) through ISA bus.
I have developed basic driver by referring Microsoft site. I can able to create driver object and device object. Now I have faced issue in memory mapping section (EvtDevicePrepareHardware ()).
In driver source:
DriverEntry()
{
WdfDriverCreate(); â driver obj created successfully.
}
isaEvtDeviceAdd()
{
WDF_PNPPOWER_EVENT_CALLBACKS_INIT(&pnppowercallback);
pnppowercallback.evtdevicepreparehardware = isaEvtdevicepreparehardware; ->set callback functions
WdfDeviceInitSetPnpPowerEventCallbacks (DeviceInit, &pnppowercallback) ->register the pnp callbacks.
WdfDeviceCreate(); â device obj created successfully.
}
NTSTATUS isaEvtdevicepreparehardware (WDFDEVICE Device,
WDFCMRESLIST Resources,
WDFCMRESLIST ResourcesTranslated)
{
KdPrint((âWdfCmResourceListGetCount=%d\nâ, WdfCmResourceListGetCount(ResourcesTranslated)));
for (i = 0; i < WdfCmResourceListGetCount(ResourcesTranslated); i++)
{
desc = WdfCmResourceListGetDescriptor(ResourcesTranslated, i);
switch (desc->Type)
{
case CmResourceTypeMemory:
desc->u.Port.Start.LowPart,
desc->u.Port.Length));
DevExt->RegsBase = MmMapIoSpace(desc->u.Memory.Start, desc->u.Memory.Length, MmNonCached);
break;
case CmResourceTypePort:
desc->u.Port.Start.LowPart,
desc->u.Port.Length));
break;
default:
KdPrint(("default!!\n"));
break;
}
}
}
Here, isaEvtdevicepreparehardware is getting triggered, but WdfCmResourceListGetCount = 0, that means PNP manager couldnât find any resources.
My doubts:
-
since our custom ISA board is non PNP device, then how to specify hardware resources to PNPmanager ?
-
How our driver can identify the ISA board ?, Which hardware ID need to use in our INF file. (custom board doesnât have vendor ID and device ID). ?
-
In SBC (pca 6029) ISA bus is connected through LPC interface ( processor - LPC - - ISA). In Device manager I can see the "System devices > Intel(R) 100 Series/C230 Series Chipset Family LPC Controller (H110) - A143â device, it has msisadrv.sys driver. Shall we consider this as ISA bus driver ?
whether our driver (function driver) need to talk with bus driver for resource allocation ? -
How to conform our ISA board has connected and bus driver has started?
I have bit confused, Please help me to solve this issue.
Thanks in Advance,
Mohan.
.