Re: misc questions about the device&driver arch



william wallace wrote this message on Tue, May 23, 2006 at 09:16 +0800:
In order to keep the API as consistent as possible between classic
interrupt sources and MSI sources, I'd like to add a new bus method:

int
bus_reserve_resource(device_t, int *start, int *end, int *count, int flags);

start, end, and count would be passed is as the desired range and would
map to the per-function interrupt index in MSI. On return, the range
supported and negotiated by the OS, bus, and function would be filled
into these values. flags would be something like SYS_RES_MESSAGE.
Internal failure of the function would be given in the return value.
Whether failure to support MSI should be given as an error code return
value can be debated. This function will also program the MSI
configuration registers on the device to use the correct message cookie
and number of messages.

Why not create a wrapper, and start at the highest requested, and slowly
work your way down as the requests are rejected.. since the number of
messages must be a power of two, it isn't than many rounds..

--
John-Mark Gurney Voice: +1 415 225 5579

"All that I will do, has been done, All that I have, has not."
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: misc questions about the device&driver arch
    ... interrupt sources and MSI sources, I'd like to add a new bus method: ... start, end, and count would be passed is as the desired range and would ... map to the per-function interrupt index in MSI. ...
    (freebsd-hackers)
  • Re: PCI-Express support
    ... : interrupt sources and MSI sources, I'd like to add a new bus method: ... map to the per-function interrupt index in MSI. ... flags would be something like SYS_RES_MESSAGE. ... Internal failure of the function would be given in the return value. ...
    (freebsd-arch)