diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-24 11:06:48 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-24 11:06:48 +0100 |
commit | 91c5969cdddf2241418082998e76bdbb836ed03e (patch) | |
tree | a4597e44f36f6fc3406e0dd2671d265bce3a7d53 /src/kernel/include/sys.h | |
parent | 9ba449a6e5f9db20923fb9802eefe0f090ba5fff (diff) | |
download | kogata-91c5969cdddf2241418082998e76bdbb836ed03e.tar.gz kogata-91c5969cdddf2241418082998e76bdbb836ed03e.zip |
PCI enumeration ; rename dev:/ to io:/
Diffstat (limited to 'src/kernel/include/sys.h')
-rw-r--r-- | src/kernel/include/sys.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/include/sys.h b/src/kernel/include/sys.h index 29735fa..365e709 100644 --- a/src/kernel/include/sys.h +++ b/src/kernel/include/sys.h @@ -11,6 +11,10 @@ static inline void outw(uint16_t port, uint16_t value) { asm volatile("outw %1, %0" : : "dN"(port), "a"(value)); } +static inline void outl(uint16_t port, uint32_t value) { + asm volatile("outl %1, %0" : : "dN"(port), "a"(value)); +} + static inline uint8_t inb(uint16_t port) { uint8_t ret; asm volatile("inb %1, %0" : "=a"(ret) : "dN"(port)); @@ -23,6 +27,12 @@ static inline uint16_t inw(uint16_t port) { return ret; } +static inline uint32_t inl(uint16_t port) { + uint32_t ret; + asm volatile("inl %1, %0" : "=a"(ret) : "dN"(port)); + return ret; +} + static inline void invlpg(void* addr) { asm volatile("invlpg (%0)" : : "r"(addr) : "memory"); } |