clib: Expose libpci access structure to individual tools

This commit is contained in:
RichardG867
2024-10-25 15:44:38 -03:00
parent e120b47de0
commit 08ced8392c
2 changed files with 5 additions and 4 deletions

View File

@@ -30,7 +30,7 @@
uint8_t pci_mechanism = 0, pci_device_count = 0;
#ifdef PCI_LIB_VERSION
static struct pci_access *pacc;
struct pci_access *pacc;
static struct pci_dev *pdev = NULL;
# if defined(_WIN32) && (PCI_LIB_VERSION >= 0x030800)
# define DUMMY_CONFIG_SPACE

View File

@@ -20,11 +20,12 @@
#include "clib.h"
#if defined(__GNUC__) && !defined(__POSIX_UEFI__)
#include <pci/pci.h>
# include <pci/pci.h>
static inline void libpci_init(struct pci_access *pacc) { pci_init(pacc); }
static inline void libpci_scan_bus(struct pci_access *pacc) { pci_scan_bus(pacc); }
#define pci_init pci_init_
#define pci_scan_bus pci_scan_bus_
# define pci_init pci_init_
# define pci_scan_bus pci_scan_bus_
extern struct pci_access *pacc;
#endif
/* Global variables. */