42,7 → 42,6 |
extern __u16 inw(int port); |
extern __u32 inl(int port); |
|
extern void outb(int port, __u8 b); |
extern void outw(int port, __u16 w); |
extern void outl(int port, __u32 l); |
|
84,6 → 83,16 |
*/ |
static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0\n" : "=r" (v)); return v; } |
|
/** Byte to port |
* |
* Output byte to port |
* |
* @param port Port to write to |
* @param val Value to write |
*/ |
static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); } |
|
|
/** Set priority level low |
* |
* Enable interrupts and return previous |
166,4 → 175,5 |
return v; |
} |
|
|
#endif |