grub-devel
[Top][All Lists]
Advanced

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

pci support


From: vincent guffens
Subject: pci support
Date: Sat, 06 May 2006 14:36:06 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

Hi!

I was wondering if there was still an interest in pci support as
discussed previously. That is a general interface exported by a module
such as

struct grub_pci_support
{
  /* My name.  */
  const char *name;

  void (*init)(void);
  void (*fini)(void);

  void (*adjust) (grub_pci_device_t p);

  /* Base Address Register helper functions. There are up to 6 BARs
     PCI_BASE_ADDRESS_{[0-5]} in the configuration space of each device */
  unsigned long (*bar_start) (grub_pci_device_t, unsigned int bar);
  unsigned long (*bar_size) (grub_pci_device_t, unsigned int bar);

  int (*find_capability) (grub_pci_device_t, int cap);

  /* Call HOOK with each pci device.  */
  grub_err_t (*iterate) (int (*hook) (grub_pci_device_t));

  /* Fill the pci device structure (romaddr, ioaddr, membase, irq)*/
  grub_err_t (*init_pdev) (grub_pci_device_t);

  /* Low level io functions.  */
  struct grub_pci_io_support *io;
};

which allows multiple implementations such as one for instance from
etherboot which I have now.

It was written original with the idea of importing the etherboot drivers
so I don't know if it would still be usefull. The implementation that I
have uses direct pci access which maybe does not fit very well with the
idea of using pxe later on as it will require dealing with some bios
stuff anyway. It is basically usefull now for the lspci command which
could be made to print some nice text just like the Linux lspci command.

If so, I can prepare a separated patch for it and prepare the changelog.

Cheers,

--
    Vincent Guffens




reply via email to

[Prev in Thread] Current Thread [Next in Thread]