explorasi /proc/bus

Direktori ini memiliki informasi spesifik mengenai berbagai bus yang
terdapat pada system. sebagai contoh suatu system yang standard mengandung
bus PCI dan USB. Data-data mengenai bus yang digunakan tersebut tersedia
didalam directory /proc/bus. Sebagai contoh /proc/bus/pci atau
/proc/bus/usb.

Subdirectory dan file yang terdapat didalam /proc/bus sangat beragam,
tergantung pada piranti yang terhubung ke sistem. Bagaimanapun, setiap
tipe bus akan memiliki paling kurang sebuah direktori. Di dalam
subdirectory tersebut biasanya akan terdapat paling kurang sebuah
subdirectory dengan nama numeric, sebagai contoh 0 9 8, yang mengandung
data-data biner.

Sebagai contoh, subdirectory /proc/bus/usb memiliki files yang akan
mengecheck berbagai peralatan/piranti yang terhubung pada bus USB. Serta
juga akan memiliki informasi mengenai driver yang dibutuhkan untuk
peralatan tersebut.

Sebagai contoh :
d3ptzz-suse:/proc/bus # ls
input pccard pci usb

Jika di list, /proc/bus memiliki hirarki sebagai berikut:
/proc/bus
- input
Devices
handlers
-PCCard
Drivers
-PCi
[00]
[03]
[0a]
Devices
-USB
Devices

Nantinya, subdirectory /proc/bus/usb/001 akan menyimpan semua informasi
pada bus USB dan file devices (yang berada pada subdir .../bus/usb/ ) akan
mengidentifikasi USB root hub nya ke motherboard....
Berikut contoh pencuplikan isi dari file devices yang berada pada subdir usb:
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms

Untuk subdirektori /proc/bus/input akan membaca semua device input (e.g
mouse, keyboard, graphic tablet, dsb) yang terhubung ke motherboard.
Setiap log informasi disimpan di folder yang diberi ID sesuai dengan
prioritas device nya. Untuk informasi mengenai konektifitas input device
pada bus, dapat diakses pada file device yang berada didalam subdirektori
/proc/bus/input.

berikut contoh cuplikan isi dari file device pada subdir input:
d3ptzz-suse:/proc/bus/input # cat devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f870d401 feffffdf ffefffff ffffffff ffffffff
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input2
U: Uniq=
H: Handlers=mouse0 event2
B: EV=b
B: KEY=6420 0 7000f 0 0 0 0 0 0 0 0
B: ABS=11000003

I: Bus=0019 Vendor=0000 Product=0002 Version=0000
N: Name="Power Button (FF)"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/class/input/input3
U: Uniq=
H: Handlers=kbd event3
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/class/input/input4
U: Uniq=
H: Handlers=event4
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button (CM)"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=3
B: KEY=4000 0 0 0 0

Dari cuplikan isi file device pada input itu, dapat dilihat ada enam
piranti yang terdeteksi oleh sistem operasi sebagai input device, yakni AT
Translated Set 2 keyboard, Sleep Button (CM), Lid Switch, Power Button
(FF), SynPS/2 Synaptics TouchPad, dan PC Speaker. Masing-masing device
tersebut memiliki log nya masing-masing di subdirektori /proc/bus/input.

/proc/bus/pci/ digunakan sebagai salah satu elemen PCILIB (PCI Library)
yakni sebagai portable library yang menyediakan sistem berbagai informasi
dan fungsi untuk konfigurasi piranti yang terhubung dengan bus PCI / PCI
slot.
Semua device (piranti) yang terhubung dengan PCI slot akan terdaftar pada
file 'devices' pada subdirektori /proc/bus/pci.

Berikut cuplikan dari informasi yang terdapat di dalam devices pada subdir
/proc/bus/pci :
d3ptzz-suse:/proc/bus/pci # cat devices
0000 808627a0 0 0 0
0 0 0
0 0 0
0 0 0
0 0 0 agpgart-intel
0010 808627a2 11 dc100000 1801
c0000008 dc200000 0
0 2 80000
8 10000000 40000
0 0 0
0011 808627a6 0 dc180000 0
0 0 0
0 0 80000
0 0 0
0 0 0
00d8 808627d8 13 dc240004 0
0 0 0
0 0 4000
0 0 0
0 0 0 HDA Intel
00e0 808627d0 df 0 0
0 0 0
0 0 0
0 0 0
0 0 0
pcieport-driver
00e1 808627d2 de 0 0
0 0 0
0 0 0
0 0 0
0 0 0
pcieport-driver
00e2 808627d4 dd 0 0
0 0 0
0 0 0
0 0 0
0 0 0
pcieport-driver
00e8 808627c8 15 0 0
0 0 1821
0 0 0
0 0 0
20 0 0 uhci_hcd
00e9 808627c9 14 0 0
0 0 1841
0 0 0
0 0 0
20 0 0 uhci_hcd
00ea 808627ca 12 0 0
0 0 1861
0 0 0
0 0 0
20 0 0 uhci_hcd
00eb 808627cb 11 0 0
0 0 1881
0 0 0
0 0 0
20 0 0 uhci_hcd
00ef 808627cc 15 dc444000 0
0 0 0
0 0 400
0 0 0
0 0 0 ehci_hcd
00f0 80862448 0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
00f8 808627b9 0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
00fa 808627c4 14 1f0 3f6
170 376 18b1
0 0 8
0 8 0
10 0 0 ata_piix
00fb 808627da 14 0 0
0 0 18c1
0 0 0
0 0 0
20 0 0 i801_smbus
0300 80864222 10 d8000000 0
0 0 0
0 0 1000
0 0 0
0 0 0 ipw3945
0a08 11800832 10 dc000000 0
0 0 0
0 0 800
0 0 0
0 0 0 ohci1394
0a09 11800822 16 dc000800 0
0 0 0
0 0 100
0 0 0
0 0 0 sdhci
0a0a 11800843 a dc000c00 0
0 0 0
0 0 100
0 0 0
0 0 0
0a0b 11800592 a dc001000 0
0 0 0
0 0 100
0 0 0
0 0 0
0a0c 11800852 a dc001400 0
0 0 0
0 0 100
0 0 0
0 0 0
0a38 10ec8139 15 4001 dc001800
0 0 0
0 0 100
100 0 0
0 0 0 8139too
0a48 15241410 13 dc002000 0
0 0 0
0 0 1000
0 0 0
0 0 0 yenta_cardbus

Pada cuplikan diatas dapat dilihat bahwa semua device yang terhubung pada
PCI slot menempati beberapa alokasi memory yang didsekripsikan oleh sistem
operasi itu sendiri. Sebagai contoh, pada sistem ini terkoneksi piranti
berikut pada slot PCI:
agpgart-intel, HDA Intel, pcieport-driver, ata_piix dan lain sebagainya.

Bagian /proc/bus/pccard digunakan untuk menampilkan berbagai informasi dan
konfigurasi mengenai PCMIA card yang terhubung ke sistem operasi. PCMIA
ini sendiri digunakan untuk berbagai applet yang dapat disertakan pada
sistem. sebagai contoh dapat digunakan sebagai modem external. Namun,
berhubung sistem kami tidak terhubung / memiliki PCMIA card maka pada saat
kami melakukan pengecheckan (ls, cat) subdirektori tersebut tidak memiliki
informasi apapun.

Akan tetapi setelah kami mencari berbagai informasi mengenai fungsi ini
pada sistem linux, kami mendapatkan referensi sebagai berikut:

1. /proc/bus/pccard/{irq,ioport,memory} - Jika ada, file ini akan berisi
informasi mengenai table konfigurasi penggunaan resource yang nantinya
akan mensuplement table kernel yang normal.

2. /proc/bus/pccard/drivers - File ini akan memuat list yang berisi semua
driver PCMIA yang telah di load.

3. /proc/bus/pccard/*/info - File ini menjelaskan mengenai host controller
socket dan kapabilitasnya.

4. /proc/bus/pccard/*/{pci,cardbus} - Apabila PCCard nya berupa cardBus
bridges, maka file ini akan berisi informasi dump dari konfigurasi PCI dan
dump dari konfigurasi registry CardBus bridge.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.