mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +03:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user