Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Restructured PCI subsystem to fit the new device model.
Generic PCI code now handles 64-bit BARs correctly when setting
"membase"; drivers should need to call pci_bar_start() only if they want
to use BARs other than the first memory or I/O BAR.

Split rarely-used PCI functions out into pciextra.c.

Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4).
284 bytes of this saving comes from the pci/pciextra split.

Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to
match the names used in Linux).
  • Loading branch information
Michael Brown committed May 16, 2006
1 parent fcdab62 commit 15ee09e
Show file tree
Hide file tree
Showing 35 changed files with 544 additions and 534 deletions.
10 changes: 6 additions & 4 deletions src/arch/i386/core/pci_io.c
Expand Up @@ -21,8 +21,9 @@
/* Macros for direct PCI access */
#define CONFIG_ADDRESS 0xcf8
#define CONFIG_DATA 0xcfc
#define CONFIG_CMD( pci, where ) \
( 0x80000000 | (pci->busdevfn << 8) | (where & ~3) )
#define CONFIG_CMD( pci, where ) \
( 0x80000000 | ( pci->bus << 16 ) | ( pci->devfn << 8 ) | \
( where & ~3 ) )

/* Signatures for PCI BIOS */
#define BIOS_SIG(a,b,c,d) ( ( a<<0 ) + ( b<<8 ) + ( c<<16 ) + ( d<<24 ) )
Expand Down Expand Up @@ -343,8 +344,9 @@ INIT_FN ( INIT_PCIBIOS, find_pcibios32, NULL, NULL );
"=S" ( discard_S ), "=D" ( discard_D ) \
: "a" ( ( PCIBIOS_PCI_FUNCTION_ID << 8 ) \
+ command ), \
"b" ( pci->busdevfn ), "c" ( value ), \
"D" ( where ), "S" ( pcibios32_entry ) \
"b" ( ( pci->bus << 8 ) | pci->devfn ), \
"c" ( value ), "D" ( where ), \
"S" ( pcibios32_entry ) \
: "edx", "ebp" ); \
\
( ret >> 8 ); \
Expand Down
28 changes: 0 additions & 28 deletions src/arch/i386/prefix/select_pci.c

This file was deleted.

2 changes: 1 addition & 1 deletion src/core/btext.c
Expand Up @@ -408,7 +408,7 @@ static void btext_init(void)

#warning "pci_find_device_x no longer exists; use find_pci_device instead"
/* pci_find_device_x(0x1002, 0x4752, 0, &dev); */
if(dev.vendor_id==0) return; // no fb
if(dev.vendor==0) return; // no fb

frame_buffer = (uint32_t)dev.membase;
#else
Expand Down

0 comments on commit 15ee09e

Please sign in to comment.