aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/include/sys.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/include/sys.h')
-rw-r--r--src/kernel/include/sys.h10
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");
}