Strip down i386 PCI configuration space I/O to the bare minimum. A

typical build will now include 880 bytes of PCI support code, compared to
2327 bytes in Etherboot 5.4.

(There is a slight cost of around 5 extra bytes per access to a
non-constant config space address; this should be an overall win.
Driver-specific accesses will usually be to constant addresses, for
which there is no additional cost.)
This commit is contained in:
Michael Brown
2006-05-17 01:12:11 +00:00
parent 15ee09ed10
commit 6b6096d28b
8 changed files with 435 additions and 493 deletions

View File

@@ -19,6 +19,7 @@
#include <stdint.h>
#include <gpxe/device.h>
#include <gpxe/tables.h>
#include <pci_io.h>
#include "pci_ids.h"
/*
@@ -318,19 +319,6 @@ struct pci_driver {
.name = _name, \
}
extern unsigned int pci_max_bus;
extern int pci_read_config_byte ( struct pci_device *pci, unsigned int where,
uint8_t *value );
extern int pci_write_config_byte ( struct pci_device *pci, unsigned int where,
uint8_t value );
extern int pci_read_config_word ( struct pci_device *pci, unsigned int where,
uint16_t *value );
extern int pci_write_config_word ( struct pci_device *pci, unsigned int where,
uint16_t value );
extern int pci_read_config_dword ( struct pci_device *pci, unsigned int where,
uint32_t *value );
extern int pci_write_config_dword ( struct pci_device *pci, unsigned int where,
uint32_t value );
extern void adjust_pci_device ( struct pci_device *pci );
extern unsigned long pci_bar_start ( struct pci_device *pci,
unsigned int reg );