diff options
author | Marvin Borner | 2020-07-23 21:06:44 +0200 |
---|---|---|
committer | Marvin Borner | 2020-07-23 21:06:44 +0200 |
commit | 6becbff5724d79cb3a958db297b5c3310200daea (patch) | |
tree | 295a5b4bf7ee2234fdc56c24fec28f936927de21 /src/drivers/cpu.c | |
parent | a0b8c61b09200aa3f9e27878cb866648a7d26502 (diff) |
Added *very* simple ide and ext2 support
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)); |