#include <io/kio.h>
#include <types/nums.h>
Go to the source code of this file.
|
void | Outb (u16 port, u8 val) |
| Write a byte to the specified I/O port.
|
u8 | Inb (u16 port) |
| Read a byte from the specified I/O port.
|
void | Outw (u16 port, u16 val) |
| Write a 16-bit word to the specified I/O port.
|
u16 | Inw (u16 port) |
| Read a 16-bit word from the specified I/O port.
|
void | Outl (u16 port, u32 val) |
| Write a 32-bit value to the specified I/O port.
|
u32 | Inl (u16 port) |
| Read a 32-bit value from the specified I/O port.
|
void | Cli () |
| Disable CPU interrupts (clear interrupt flag).
|
void | Sti () |
| Enable CPU interrupts (set interrupt flag).
|
◆ Cli()
Disable CPU interrupts (clear interrupt flag).
This is often used before critical sections to prevent preemption by interrupt handlers.
Definition at line 96 of file asm.c.
◆ Inb()
Read a byte from the specified I/O port.
- Parameters
-
port | I/O port to read from |
- Returns
- Byte value read
Definition at line 40 of file asm.c.
◆ Inl()
Read a 32-bit value from the specified I/O port.
- Parameters
-
port | I/O port to read from |
- Returns
- 32-bit value read
Definition at line 84 of file asm.c.
◆ Inw()
Read a 16-bit word from the specified I/O port.
- Parameters
-
port | I/O port to read from |
- Returns
- 16-bit value read
Definition at line 62 of file asm.c.
◆ Outb()
void Outb |
( |
u16 | port, |
|
|
u8 | val ) |
|
inline |
Write a byte to the specified I/O port.
- Parameters
-
port | I/O port to write to |
val | Byte value to write |
Definition at line 30 of file asm.c.
◆ Outl()
void Outl |
( |
u16 | port, |
|
|
u32 | val ) |
|
inline |
Write a 32-bit value to the specified I/O port.
- Parameters
-
port | I/O port to write to |
val | 32-bit value to write |
Definition at line 74 of file asm.c.
◆ Outw()
void Outw |
( |
u16 | port, |
|
|
u16 | val ) |
|
inline |
Write a 16-bit word to the specified I/O port.
- Parameters
-
port | I/O port to write to |
val | 16-bit value to write |
Definition at line 52 of file asm.c.
◆ Sti()
Enable CPU interrupts (set interrupt flag).
This is used after a critical section to re-enable interrupts. NOPs are added for minor instruction delay.
Definition at line 104 of file asm.c.