in here I found how to work with a PCI device which have no driver.
I read that
Different buses have different mechanisms for determining which resources have been assigned to the device. On some buses, such as the ISA bus, there's no such mechanism. How do you determine whether an ISA device is present in the system and how it's configured? The answer is card-dependent (with the exception of "PnP" ISA devices).
so my question is: there is a similar guide but referencing to ISA busses?
In referencing ISA buses, if it is not a PnP device, then there must be a memory location in the ISA card which you can read and write to. It is this memory address (which should be in the ISA bus memory address range) that you need to map using mmap_device_io() and the pointer returned by this function is used in the in() or out() function to communicate with the device. Hope this help.
in/out instructions provide access to a different space then using normal address. This is not a QNX concept, this is x86 stuff. One could argue that today in/out are not necessary anymore. In the “old” days, the in/out were very usefull, given CPU could only access 1Meg of ram These IO instruction provide another set of address space outside of normal memory space.
but there is a way, knowing only the base address, to know the port registers? (or maybe, just the offset for tx and rx or something?)…
in the user manual there’s no references to something similar…
ok…the documentation I can use don’t have othing similar…I contact the technical support and they sayd that is useful to use the API function for load the board.
I sayd that I’ve already do this but it not work (“Board not found” error);
they replyes:
The CEI-x20 API communicates with the hardware exclusively via direct pointer access relative to the base board address. None of the CEI-x20 boards use i/o ports.
All that the low-level implementation needs to do is pass the mapped address of the board back to the API (via vbtMapBoardAddresses). All board accesses are performed by the API relative to that address, so no API modifications should be necessary.
but I’ve already try to do this mmapping the real address and passing it to the function but the result is the same (“board not found”)
Here is sample code for doing mmap_io. you need to do ThreadCtl() first for permission purpose.
ok = ThreadCtl(_NTO_TCTL_IO, 0);
if (ok==-1)
{
printf(“You do not have permission to start this process\n”);
exit(1);
}
io_ptr=mmap_device_io(2,0x1EA);
out8(io_ptr,0x0F);
I solved Everything!! chenging every mmap with mmap_device_memory (with right args) and forcing some addresses at my address (0xD0000)…
now I’ve got only one problem(I don’t know the size of the mappe area, so I can’t correctly manage the addresses) but the technichal support will help me (I hope)