Re: Exposing ROM's though sysfs

From: Matthew Wilcox (willy_at_debian.org)
Date: 07/30/04

  • Next message: Roger Luethi: "Re: List of pending v2.4 kernel bugs"
    Date:	Fri, 30 Jul 2004 19:12:06 +0100
    To: Jesse Barnes <jbarnes@engr.sgi.com>
    
    

    On Fri, Jul 30, 2004 at 10:57:12AM -0700, Jesse Barnes wrote:
    > willy brings up a good point though, we may want to disable the rom file
    > entirely after its been read, since it can be a source of trouble. Here's
    > the latest patch.

    My problem is with this is the following passage from PCI 2.2 and PCI 2.3:

      In order to minimize the number of address decoders needed, a device
      may share a decoder between the Expansion ROM Base Address register and
      other Base Address registers. When expansion ROM decode is enabled,
      the decoder is used for accesses to the expansion ROM and device
      independent software must not access the device through any other Base
      Address registers.

    ie while we're reading the ROM, we have to prevent any other accesses
    to the contents of the BARs. This patch is a loaded gun, pointed right
    at your face. Sure, we can say it's root's fault for pulling the trigger,
    but it'd be nice to have some kind of safety lock.

    I don't see a good way of doing this, unfortunately. It'd probably be
    enough to call ->suspend on the driver while you read the contents of
    the ROM, but that's pretty ugly.

    How about reading the contents of the ROM at pci_scan_bus() time? It'd
    waste a bunch of memory, but hey, people love sysfs.

    -- 
    "Next the statesmen will invent cheap lies, putting the blame upon 
    the nation that is attacked, and every man will be glad of those
    conscience-soothing falsities, and will diligently study them, and refuse
    to examine any refutations of them; and thus he will by and by convince 
    himself that the war is just, and will thank God for the better sleep 
    he enjoys after this process of grotesque self-deception." -- Mark Twain
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Roger Luethi: "Re: List of pending v2.4 kernel bugs"

    Relevant Pages

    • Re: Ignore disabled ROM resources at setup
      ... > we might need to keep a cached copy of the ROM content (due to cards ... spec allows for the ROM address decoder to be reused and the PCI ... ROM API for disabling sysfs access, if we identify one of these cards ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Latest version of Robotron 2084???
      ... Does anyone know where I can find the latest rom version of Robotron ... I'm referring to the one with the decoder .4 and decoder .6 ...
      (alt.games.mame)
    • Re: Exposing ROMs though sysfs
      ... > My problem is with this is the following passage from PCI 2.2 and PCI ... > device may share a decoder between the Expansion ROM Base Address ... > register and other Base Address registers. ...
      (Linux-Kernel)
    • Re: Where is a static variable stored?
      ... of the time in RAM, ROM, or registers is not specified -- they ... have only to behave as if they were there the whole time. ...
      (comp.lang.c)
    • Re: Super Serial Card help
      ... in the expansion rom space for the rom on the card. ... Check if the decoding for the expansion rom is working.You should be ... The likely faulty component would be the 74LS32 as this would be used ... to force the 3 most significant address lines high to the card rom ...
      (comp.sys.apple2)