Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Nov 2000 03:43:28 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        hackers@freebsd.org
Subject:   user-space resource information...
Message-ID:  <200011041143.eA4BhSF08392@mass.osd.bsdi.com>

next in thread | raw e-mail | index | archive | help

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 
possibly misleading and I was considering removing them.  I haven't 
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 




-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011041143.eA4BhSF08392>