diff options
-rw-r--r-- | src/arch/i386/interface/pcbios/pcibios.c | 10 | ||||
-rw-r--r-- | src/arch/x86/core/pcidirect.c | 2 | ||||
-rw-r--r-- | src/arch/x86/include/ipxe/pcidirect.h | 8 | ||||
-rw-r--r-- | src/drivers/bus/pci.c | 2 | ||||
-rw-r--r-- | src/include/ipxe/efi/efi_pci.h | 8 | ||||
-rw-r--r-- | src/include/ipxe/pci_io.h | 6 | ||||
-rw-r--r-- | src/interface/efi/efi_pci.c | 2 |
7 files changed, 19 insertions, 19 deletions
diff --git a/src/arch/i386/interface/pcbios/pcibios.c b/src/arch/i386/interface/pcbios/pcibios.c index 9f69fe6..511ec62 100644 --- a/src/arch/i386/interface/pcbios/pcibios.c +++ b/src/arch/i386/interface/pcbios/pcibios.c @@ -29,11 +29,11 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ /** - * Determine maximum PCI bus number within system + * Determine number of PCI buses within system * - * @ret max_bus Maximum bus number + * @ret num_bus Number of buses */ -static int pcibios_max_bus ( void ) { +static int pcibios_num_bus ( void ) { int discard_a, discard_D; uint8_t max_bus; @@ -48,7 +48,7 @@ static int pcibios_max_bus ( void ) { "D" ( 0 ) : "ebx", "edx" ); - return max_bus; + return ( max_bus + 1 ); } /** @@ -105,7 +105,7 @@ int pcibios_write ( struct pci_device *pci, uint32_t command, uint32_t value ){ return ( ( status >> 8 ) & 0xff ); } -PROVIDE_PCIAPI ( pcbios, pci_max_bus, pcibios_max_bus ); +PROVIDE_PCIAPI ( pcbios, pci_num_bus, pcibios_num_bus ); PROVIDE_PCIAPI_INLINE ( pcbios, pci_read_config_byte ); PROVIDE_PCIAPI_INLINE ( pcbios, pci_read_config_word ); PROVIDE_PCIAPI_INLINE ( pcbios, pci_read_config_dword ); diff --git a/src/arch/x86/core/pcidirect.c b/src/arch/x86/core/pcidirect.c index ae74b7f..a07f7d4 100644 --- a/src/arch/x86/core/pcidirect.c +++ b/src/arch/x86/core/pcidirect.c @@ -38,7 +38,7 @@ void pcidirect_prepare ( struct pci_device *pci, int where ) { PCIDIRECT_CONFIG_ADDRESS ); } -PROVIDE_PCIAPI_INLINE ( direct, pci_max_bus ); +PROVIDE_PCIAPI_INLINE ( direct, pci_num_bus ); PROVIDE_PCIAPI_INLINE ( direct, pci_read_config_byte ); PROVIDE_PCIAPI_INLINE ( direct, pci_read_config_word ); PROVIDE_PCIAPI_INLINE ( direct, pci_read_config_dword ); diff --git a/src/arch/x86/include/ipxe/pcidirect.h b/src/arch/x86/include/ipxe/pcidirect.h index 4e933c4..7fa7c4f 100644 --- a/src/arch/x86/include/ipxe/pcidirect.h +++ b/src/arch/x86/include/ipxe/pcidirect.h @@ -26,14 +26,14 @@ struct pci_device; extern void pcidirect_prepare ( struct pci_device *pci, int where ); /** - * Determine maximum PCI bus number within system + * Determine number of PCI buses within system * - * @ret max_bus Maximum bus number + * @ret num_bus Number of buses */ static inline __always_inline int -PCIAPI_INLINE ( direct, pci_max_bus ) ( void ) { +PCIAPI_INLINE ( direct, pci_num_bus ) ( void ) { /* No way to work this out via Type 1 accesses */ - return 0xff; + return 0x100; } /** diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c index e92f11b..a30fcc7 100644 --- a/src/drivers/bus/pci.c +++ b/src/drivers/bus/pci.c @@ -234,7 +234,7 @@ static int pcibus_probe ( struct root_device *rootdev ) { uint32_t tmp; int rc; - num_bus = ( pci_max_bus() + 1 ); + num_bus = pci_num_bus(); for ( busdevfn = 0 ; busdevfn < PCI_BUSDEVFN ( num_bus, 0, 0 ) ; busdevfn++ ) { diff --git a/src/include/ipxe/efi/efi_pci.h b/src/include/ipxe/efi/efi_pci.h index b280d80..e06473d 100644 --- a/src/include/ipxe/efi/efi_pci.h +++ b/src/include/ipxe/efi/efi_pci.h @@ -33,14 +33,14 @@ extern int efipci_write ( struct pci_device *pci, unsigned long location, unsigned long value ); /** - * Determine maximum PCI bus number within system + * Determine number of PCI buses within system * - * @ret max_bus Maximum bus number + * @ret num_bus Number of buses */ static inline __always_inline int -PCIAPI_INLINE ( efi, pci_max_bus ) ( void ) { +PCIAPI_INLINE ( efi, pci_num_bus ) ( void ) { /* No way to work this out via EFI */ - return 0xff; + return 0x100; } /** diff --git a/src/include/ipxe/pci_io.h b/src/include/ipxe/pci_io.h index 1188090..dab5b78 100644 --- a/src/include/ipxe/pci_io.h +++ b/src/include/ipxe/pci_io.h @@ -49,11 +49,11 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <bits/pci_io.h> /** - * Determine maximum PCI bus number within system + * Determine number of PCI buses within system * - * @ret max_bus Maximum bus number + * @ret num_bus Number of buses */ -int pci_max_bus ( void ); +int pci_num_bus ( void ); /** * Read byte from PCI configuration space diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c index c240d4c..eb334b6 100644 --- a/src/interface/efi/efi_pci.c +++ b/src/interface/efi/efi_pci.c @@ -73,7 +73,7 @@ int efipci_write ( struct pci_device *pci, unsigned long location, return 0; } -PROVIDE_PCIAPI_INLINE ( efi, pci_max_bus ); +PROVIDE_PCIAPI_INLINE ( efi, pci_num_bus ); PROVIDE_PCIAPI_INLINE ( efi, pci_read_config_byte ); PROVIDE_PCIAPI_INLINE ( efi, pci_read_config_word ); PROVIDE_PCIAPI_INLINE ( efi, pci_read_config_dword ); |