Posts

Showing posts from October, 2026

Plan 9: Poking PCI Hardware

Image
  Poking the VGA card  term% cat /dev/pci/*ctl 06.00.00 8086/29c0   0 03.00.00 1234/1111    0 0:fd000008 16777216 2:feb94000 4096 02.00.00 8086/10d3  11 0:feb40000 131072 1:feb60000 131072 2:0000c041 32 3:feb90000 16384 00.ff.00 1234/11e8  11 0:fea00000 1048576 06.01.00 8086/2918   0 01.06.01 8086/2922  10 4:0000c061 32 5:feb95000 4096 0c.05.00 8086/2930  10 4:00000701 64 term% cat /dev/vgactl type vesa size 1280x720x32 x8r8g8b8 tilt none hwgc soft hwaccel off hwblank on addr p 0xfd000000 v 0xfffffe80fd000000 size 0x1000000 softscreen on term% echo 1280*4 | bc 5120 term% grep -l  1234/1111 /dev/pci/*ctl /dev/pci/0.1.0ctl term% dd -if /dev/pci/0.1.0 bar0 -of /dev/pci/0.1.0 bar0 -bs 5120 -count 64 -oseek 200 64+0 records in 64+0 records out Code devpnp.c and archacpi.c