x86: Add PCI support
This patch adds the pci.c and pci.h files, which support access to PCI configuration registers through a function interface. It defines the PCI configuration register access I/O port addresses and the pci_config_addr union and structure to assist in specifying addresses of PCI configuration registers. It also defines the PCI configuration register identifier for PCI BAR0. This patch also adds wrappers for 32-bit 'in' and 'out' port I/O instructions. They were placed in helpers.S, since they may be useful to other modules besides just the PCI support module.
This commit is contained in:
parent
62fc195d0f
commit
2dccb55e15
5 changed files with 143 additions and 7 deletions
|
@ -37,13 +37,12 @@
|
|||
|
||||
void halt(void) __attribute__((__noreturn__));
|
||||
|
||||
/**
|
||||
* Wrapper for the assembly 'out' instruction.
|
||||
*
|
||||
*/
|
||||
void outb(uint16_t port, uint8_t byte);
|
||||
/** Wrappers for the assembly 'out' instruction. */
|
||||
void outb(uint16_t port, uint8_t val);
|
||||
void outl(uint16_t port, uint32_t val);
|
||||
|
||||
/* Wrapper for the assembly 'in' instruction */
|
||||
/** Wrappers for the assembly 'in' instruction */
|
||||
uint8_t inb(uint16_t port);
|
||||
uint32_t inl(uint16_t port);
|
||||
|
||||
#endif /* HELPERS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue