[Zion][Yellowstone] First pass at adding PCI ioport access.
This commit is contained in:
parent
f2c2cff98a
commit
b677633248
16 changed files with 337 additions and 199 deletions
|
|
@ -11,3 +11,13 @@ static inline uint8_t inb(uint16_t port) {
|
|||
static inline void outb(uint16_t port, uint8_t value) {
|
||||
asm volatile("outb %0, %1" ::"a"(value), "Nd"(port));
|
||||
}
|
||||
|
||||
static inline uint32_t inl(uint16_t port) {
|
||||
uint32_t result;
|
||||
asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port));
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline void outl(uint16_t port, uint32_t value) {
|
||||
asm volatile("outl %0, %1" ::"a"(value), "Nd"(port));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue