diff options
Diffstat (limited to 'src/drivers/cpu.c')
-rw-r--r-- | src/drivers/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/cpu.c b/src/drivers/cpu.c index 22691fb..d6a1760 100644 --- a/src/drivers/cpu.c +++ b/src/drivers/cpu.c @@ -24,6 +24,14 @@ u32 inl(u16 port) return value; } +void insl(u16 port, void *addr, int n) +{ + __asm__("cld; rep insl" + : "=D"(addr), "=c"(n) + : "d"(port), "0"(addr), "1"(n) + : "memory", "cc"); +} + void outb(u16 port, u8 data) { __asm__("outb %0, %1" ::"a"(data), "Nd"(port)); |