mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin Schwenke" <martin@meltin.net>
To: linux-kernel@vger.kernel.org
Subject: Accessing PCI expansion ROMs
Date: Mon, 28 Oct 2002 16:29:40 +1100	[thread overview]
Message-ID: <200210280532.QAA25547@thucydides.inspired.net.au> (raw)

I want to extract VPD (Vital Product Data) from the expansion ROMs on
PCI 2.0/2.1 devices.  The PCI specification tells me all I need to
know once I can actually access the ROM I'm after.

On ppc I can use xmon (or write a dedicated utility) to get to
expansion ROMs and extract the required part.  On i386, expansion ROMs
don't have addresses assigned and the PCI initialisation code seems to
explicitly disable and unassign them (and this seems to be recommended
by the PCI specification).

So, it looks like there might be a few options...

* Userspace.  Is there a reliable way of accessing the ROMs from
  userspace?  Does it work the same way on different architectures?

  I know I can assign an address and enable a ROM via PCI
  configuration space, but I don't know if either of these things can
  be done safely from userspace.

* Kernel.  Write some kernel code to dynamically retrieve the contents
  of expansion ROMs.

  This might involve assigning an address, enabling the ROM, reading
  data, disabling the ROM and then possibly unassigning it again.

* Kernel.  Write some kernel code that hooks into the PCI
  initialisation/hotplug to grab the contents of expansion ROMs before
  they are unassigned and disabled.  Copy the data and put it into
  /proc or /devices - yep, a bit gross, but the amount of data tends
  to be small.

Any ideas?  I'd really like it to be architecture independent,
preferably userspace.  However, it can't be done there, it'll have to
be done in the kernel...  and then possibly architecture by
architecture...

Please copy me on replies, since I'm not subscribed to linux-kernel.

Thanks...

peace & happiness,
martin

                 reply	other threads:[~2002-10-28  5:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200210280532.QAA25547@thucydides.inspired.net.au \
    --to=martin@meltin.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®