summaryrefslogtreecommitdiff
path: root/gpxe/src/arch/x86/include/gpxe/pcidirect.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
committerH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
commitf2f897a1762fab84d2905f32b1c15dd7b42abb56 (patch)
treea38f51d3f1fcbf44afddb4736d549c12eaf491be /gpxe/src/arch/x86/include/gpxe/pcidirect.h
parent72d2959272b4616f17a97667e6dfa9d06bf109a3 (diff)
downloadsyslinux-f2f897a1762fab84d2905f32b1c15dd7b42abb56.tar.gz
gpxe: delete long since obsolete snapshot of gPXE
gPXE has been deprecated in favor of iPXE for many, many years now. It is much better than users get it directly from the iPXE project, since we should no longer need any special modifications for Syslinux use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/arch/x86/include/gpxe/pcidirect.h')
-rw-r--r--gpxe/src/arch/x86/include/gpxe/pcidirect.h141
1 files changed, 0 insertions, 141 deletions
diff --git a/gpxe/src/arch/x86/include/gpxe/pcidirect.h b/gpxe/src/arch/x86/include/gpxe/pcidirect.h
deleted file mode 100644
index 8b705fb2..00000000
--- a/gpxe/src/arch/x86/include/gpxe/pcidirect.h
+++ /dev/null
@@ -1,141 +0,0 @@
-#ifndef _PCIDIRECT_H
-#define _PCIDIRECT_H
-
-FILE_LICENCE ( GPL2_OR_LATER );
-
-#include <stdint.h>
-#include <gpxe/io.h>
-
-#ifdef PCIAPI_DIRECT
-#define PCIAPI_PREFIX_direct
-#else
-#define PCIAPI_PREFIX_direct __direct_
-#endif
-
-/** @file
- *
- * PCI configuration space access via Type 1 accesses
- *
- */
-
-#define PCIDIRECT_CONFIG_ADDRESS 0xcf8
-#define PCIDIRECT_CONFIG_DATA 0xcfc
-
-struct pci_device;
-
-extern void pcidirect_prepare ( struct pci_device *pci, int where );
-
-/**
- * Determine maximum PCI bus number within system
- *
- * @ret max_bus Maximum bus number
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_max_bus ) ( void ) {
- /* No way to work this out via Type 1 accesses */
- return 0xff;
-}
-
-/**
- * Read byte from PCI configuration space via Type 1 access
- *
- * @v pci PCI device
- * @v where Location within PCI configuration space
- * @v value Value read
- * @ret rc Return status code
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_read_config_byte ) ( struct pci_device *pci,
- unsigned int where,
- uint8_t *value ) {
- pcidirect_prepare ( pci, where );
- *value = inb ( PCIDIRECT_CONFIG_DATA + ( where & 3 ) );
- return 0;
-}
-
-/**
- * Read word from PCI configuration space via Type 1 access
- *
- * @v pci PCI device
- * @v where Location within PCI configuration space
- * @v value Value read
- * @ret rc Return status code
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_read_config_word ) ( struct pci_device *pci,
- unsigned int where,
- uint16_t *value ) {
- pcidirect_prepare ( pci, where );
- *value = inw ( PCIDIRECT_CONFIG_DATA + ( where & 2 ) );
- return 0;
-}
-
-/**
- * Read dword from PCI configuration space via Type 1 access
- *
- * @v pci PCI device
- * @v where Location within PCI configuration space
- * @v value Value read
- * @ret rc Return status code
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_read_config_dword ) ( struct pci_device *pci,
- unsigned int where,
- uint32_t *value ) {
- pcidirect_prepare ( pci, where );
- *value = inl ( PCIDIRECT_CONFIG_DATA );
- return 0;
-}
-
-/**
- * Write byte to PCI configuration space via Type 1 access
- *
- * @v pci PCI device
- * @v where Location within PCI configuration space
- * @v value Value to be written
- * @ret rc Return status code
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_write_config_byte ) ( struct pci_device *pci,
- unsigned int where,
- uint8_t value ) {
- pcidirect_prepare ( pci, where );
- outb ( value, PCIDIRECT_CONFIG_DATA + ( where & 3 ) );
- return 0;
-}
-
-/**
- * Write word to PCI configuration space via Type 1 access
- *
- * @v pci PCI device
- * @v where Location within PCI configuration space
- * @v value Value to be written
- * @ret rc Return status code
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_write_config_word ) ( struct pci_device *pci,
- unsigned int where,
- uint16_t value ) {
- pcidirect_prepare ( pci, where );
- outw ( value, PCIDIRECT_CONFIG_DATA + ( where & 2 ) );
- return 0;
-}
-
-/**
- * Write dword to PCI configuration space via Type 1 access
- *
- * @v pci PCI device
- * @v where Location within PCI configuration space
- * @v value Value to be written
- * @ret rc Return status code
- */
-static inline __always_inline int
-PCIAPI_INLINE ( direct, pci_write_config_dword ) ( struct pci_device *pci,
- unsigned int where,
- uint32_t value ) {
- pcidirect_prepare ( pci, where );
- outl ( value, PCIDIRECT_CONFIG_DATA );
- return 0;
-}
-
-#endif /* _PCIDIRECT_H */