PatchworkOS
Loading...
Searching...
No Matches
pci_config.h File Reference
#include <kernel/acpi/acpi.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  pci_config_bar_t
 PCI-e Configuration Space Base Address Allocation Structure. More...
 
struct  mcfg_t
 PCI Express Memory-mapped Configuration. More...
 

Typedefs

typedef uint16_t pci_segment_group_t
 PCI Segment Group Type.
 
typedef uint8_t pci_bus_t
 PCI Bus Type.
 
typedef uint8_t pci_slot_t
 PCI Slot Type.
 
typedef uint8_t pci_function_t
 PCI Function Type.
 

Functions

uint8_t pci_config_read8 (pci_segment_group_t segmentGroup, pci_bus_t bus, pci_slot_t slot, pci_function_t function, uint16_t offset)
 Read a byte from PCI configuration space.
 
uint16_t pci_config_read16 (pci_segment_group_t segmentGroup, pci_bus_t bus, pci_slot_t slot, pci_function_t function, uint16_t offset)
 Read a word from PCI configuration space.
 
uint32_t pci_config_read32 (pci_segment_group_t segmentGroup, pci_bus_t bus, pci_slot_t slot, pci_function_t function, uint16_t offset)
 Read a dword from PCI configuration space.
 
void pci_config_write8 (pci_segment_group_t segmentGroup, pci_bus_t bus, pci_slot_t slot, pci_function_t function, uint16_t offset, uint8_t value)
 Write a byte to PCI configuration space.
 
void pci_config_write16 (pci_segment_group_t segmentGroup, pci_bus_t bus, pci_slot_t slot, pci_function_t function, uint16_t offset, uint16_t value)
 Write a word to PCI configuration space.
 
void pci_config_write32 (pci_segment_group_t segmentGroup, pci_bus_t bus, pci_slot_t slot, pci_function_t function, uint16_t offset, uint32_t value)
 Write a dword to PCI configuration space.