From owner-freebsd-arch Mon Aug 13 21:54:17 2001 Delivered-To: freebsd-arch@freebsd.org Received: from hotmail.com (f200.pav2.hotmail.com [64.4.37.200]) by hub.freebsd.org (Postfix) with ESMTP id 1178237B40E for ; Mon, 13 Aug 2001 21:54:14 -0700 (PDT) (envelope-from sumanth_vi@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 13 Aug 2001 21:54:13 -0700 Received: from 202.177.132.140 by pv2fd.pav2.hotmail.msn.com with HTTP; Tue, 14 Aug 2001 04:54:13 GMT X-Originating-IP: [202.177.132.140] From: "sumanth vidyadhara" To: freebsd-arch@FreeBSD.org Subject: the call to resource_int_value how does it work Date: Tue, 14 Aug 2001 04:54:13 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 14 Aug 2001 04:54:13.0984 (UTC) FILETIME=[2A27AE00:01C1247D] Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 /* * 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