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
|
@ -43,8 +43,21 @@ outb:
|
|||
out %al, %dx
|
||||
ret
|
||||
|
||||
.global outl
|
||||
outl:
|
||||
mov 4(%esp), %dx
|
||||
mov 8(%esp), %eax
|
||||
out %eax, %dx
|
||||
ret
|
||||
|
||||
.global inb
|
||||
inb:
|
||||
mov 4(%esp), %dx
|
||||
in %dx, %al
|
||||
ret
|
||||
|
||||
.global inl
|
||||
inl:
|
||||
mov 4(%esp), %dx
|
||||
in %dx, %eax
|
||||
ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue