From owner-freebsd-hackers Sat Nov 4 10:51:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id 7F47337B4C5; Sat, 4 Nov 2000 10:51:46 -0800 (PST) Received: from [212.238.54.101] (helo=freebie.demon.nl) by post.mail.nl.demon.net with smtp (Exim 3.14 #4) id 13s8Po-0009Mf-00; Sat, 04 Nov 2000 18:51:44 +0000 Received: (from wkb@localhost) by freebie.demon.nl (8.11.0/8.11.0) id eA4Ht1P12951; Sat, 4 Nov 2000 18:55:01 +0100 (CET) (envelope-from wkb) Date: Sat, 4 Nov 2000 18:55:01 +0100 From: Wilko Bulte To: Mike Smith Cc: hackers@freebsd.org Subject: Re: user-space resource information... Message-ID: <20001104185501.A12863@freebie.demon.nl> References: <200011041143.eA4BhSF08392@mass.osd.bsdi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200011041143.eA4BhSF08392@mass.osd.bsdi.com>; from msmith@freebsd.org on Sat, Nov 04, 2000 at 03:43:28AM -0800 X-OS: FreeBSD 4.1-STABLE X-PGP: finger wilko@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Nov 04, 2000 at 03:43:28AM -0800, Mike Smith wrote: > > Well, I'm really sick of people complaining about not being able to get > at the things the resource manager knows from userspace. So I've done > something about it. > > Please review: > > http://ziplok.dyndns.org/msmith/rman.diff > http://ziplok.dyndns.org/msmith/iostat.diff > > which adds the new '-r' flag to iostat which will print the current > resource manager ownership database. I have similar interfaces underway > to access the devclass and device trees, so that an enterprising > user-space hacker could trivially construct a complete map of the system > bus and resource structure using any of several different organisations. > > I may write a small user-space library to sit on top of these interfaces > to make life easier. sysctl is not the cleanest of interfaces for this > application, but it does the job. > > Comments? Here's some sample output; the leading index numbers are Just 2: why are the irqs displayed in hex? And: will it work on alphas? ;-) I really like it, don't misinterpret me please! > possibly misleading and I was considering removing them. I haven't I'd remove it if I were you. > decided yet what to do about formatting conventions; they may end up > going into the rman initialisation. > > 0: Interrupt request lines 0x0-0xf > 0: attimer0 0x0 > 1: atkbd0 0x1 active shareable > 2: atpic0 0x2 > 3: sio1 0x3 active > 4: sio0 0x4 active > 6: ppc0 0x7 active shareable > 7: attimer1 0x8 > 9: uhci0 0xa active shareable > 11: nomatch 0xc > 12: npxisa0 0xd > 13: ata0 0xe active > 14: ata1 0xf active > 1: DMA request lines 0x0-0x7 > 1: ppc0 0x3 active > 2: atdma0 0x4 > 2: I/O ports 0x0-0xffff > 0: atdma0 0x0-0xf > 2: atpic0 0x20-0x21 > 4: attimer0 0x40-0x43 > 6: atkbdc0 0x60 active > 7: nomatch 0x61 > 9: atkbdc0 0x64 active > 11: attimer1 0x70-0x71 > 13: atdma0 0x80-0x90 > 15: atdma0 0x94-0x9f > 16: atpic0 0xa0-0xa1 > 18: atdma0 0xc0-0xde > 20: npxisa0 0xf0 > 22: ata1 0x170-0x177 active > 24: ata0 0x1f0-0x1f7 active > 26: sysresource1 0x290-0x297 > 28: sio1 0x2f8-0x2ff active > 3: I/O memory addresses 0x0-0xffffffff > 0: sysresource0 0x0-0x9ffff > 1: vga0 0xa0000-0xbffff active shareable > 3: sysresource0 0xcd000-0xcffff > 5: sysresource0 0xe8000-0xeffff > 6: sysresource0 0xf0000-0xf3fff > 7: sysresource0 0xf4000-0xf7fff > 8: sysresource0 0xf8000-0xfffff > 9: sysresource0 0x100000-0x7ffffff > 11: fxp0 0xe3000000-0xe3000fff active > 13: sysresource0 0xfffe0000-0xffffffff -- Wilko Bulte Arnhem, the Netherlands wilko@freebsd.org http://www.freebsd.org http://www.nlfug.nl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message