Date: Tue, 14 Aug 2001 04:54:13 +0000 From: "sumanth vidyadhara" <sumanth_vi@hotmail.com> To: freebsd-arch@FreeBSD.org Subject: the call to resource_int_value how does it work Message-ID: <F2001kF7cRXO0rSfH8U00009828@hotmail.com>
next in thread | raw e-mail | index | archive | help
Hi,
I would like to know how does resource_int_value works because there in no
man page for that in freebsd 4.3.
I would like to use this call to read tunable paramters at run time in the
network card driver, since if_fxp driver is already doing that with the
latest source.
Can someone tell me how it works and how to use the device hints to set
those arguments in resource_int_value.
The below code is na extract from if_fxp.c network driver
The parameter prefer_iomap he says populate using hints.
hint.fxp.0.prefer_iomap="1"
How do we get the hints for this device.
and is the tunable populated after kldload at the prompt or before kldload
<module_name>
/*
* Figure out which we should try first - memory mapping or i/o mapping?
* We default to memory mapping. Then we accept an override from the
* command line. Then we check to see which one is enabled.
*/
m1 = PCIM_CMD_MEMEN;
m2 = PCIM_CMD_PORTEN;
prefer_iomap = 0;
if (resource_int_value(device_get_name(dev), device_get_unit(dev),
"prefer_iomap", &prefer_iomap) == 0 && prefer_iomap != 0) {
m1 = PCIM_CMD_PORTEN;
m2 = PCIM_CMD_MEMEN;
}
The OS version of freebsd is 4.3.
Any help is greatly appreciated.
Regards,
Sumanth
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F2001kF7cRXO0rSfH8U00009828>
