Re: Problems with reading ROMs in Kernel sysfs PCI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 Dec 2008, Rolf Eike Beer wrote:

Timothy S. Nelson wrote:
 	Quick question.

On Wed, 10 Dec 2008, Timothy S. Nelson wrote:
01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX
440] (rev a3) (prog-if 00
[VGA controller])
       Subsystem: Micro-Star International Co., Ltd. Device 8470
       Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
       Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
       Interrupt: pin A routed to IRQ 10
       Region 0: Memory at f0000000 (32-bit, non-prefetchable) [disabled]
[size=16M]
       Region 1: Memory at e0000000 (32-bit, prefetchable) [disabled]
[size=128M]
       Region 2: Memory at e8000000 (32-bit, prefetchable) [disabled]
[size=512K]
       [virtual] Expansion ROM at e8080000 [disabled] [size=128K]

 	Under what conditions should the [disabled] in the line above
disappear?  If I echo 1 to /sys/bus/pci/devices/0000:01:00.0/rom should the
[disabled] part go away?  Because it doesn't.

 	However, it's having some effect.

[root@rhys ~]# echo 1 > /sys/bus/pci/devices/0000:01:00.0/rom
[root@rhys ~]# cat /sys/bus/pci/devices/0000:01:00.0/rom
[root@rhys ~]# echo 0 > /sys/bus/pci/devices/0000:01:00.0/rom
[root@rhys ~]# cat /sys/bus/pci/devices/0000:01:00.0/rom
cat: /sys/bus/pci/devices/0000:01:00.0/rom: Invalid argument

 	I would've expected more, though, from the first "cat".

I'm not sure if it matches for the ROM, but the PCI address ranges (BARs) can
only be mmapped, not read.

Thanks; the link below leads me to believe that attempting to read rather than mmap is the correct procedure.

http://www.mjmwired.net/kernel/Documentation/filesystems/sysfs-pci.txt

	But I'm flailling around out of my depth here.

	:)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayland@xxxxxxxxxxxxx    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux