diff options
Diffstat (limited to 'mubios/include')
| -rw-r--r-- | mubios/include/bios.h | 2 | ||||
| -rw-r--r-- | mubios/include/io.h | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mubios/include/bios.h b/mubios/include/bios.h index eee22e8..7d2d447 100644 --- a/mubios/include/bios.h +++ b/mubios/include/bios.h @@ -50,4 +50,6 @@ void ioapic_init (void); void ivt_init (void); +u8 ata_read_sector28 (u32 lba, u16 *buffer); + #endif // MUBIOS_BIOS_H diff --git a/mubios/include/io.h b/mubios/include/io.h index 8b50508..cedd1c1 100644 --- a/mubios/include/io.h +++ b/mubios/include/io.h @@ -40,4 +40,14 @@ io_in8 (u16 port) return value; } +static inline u16 +io_in16 (u16 port) +{ + u16 value; + + __asm__ volatile ("inw %1, %0" : "=a"(value) : "dN"(port)); + + return value; +} + #endif // MUBIOS_IO_H |
