Code shared by i386 and x86_64: ports, interrupts, exceptions, paging.
More...
|
| using | port_t = igros_word_t |
| | Define port data type which is 16bit word.
|
| using | isr_t = std::add_pointer_t<void(const register_t* const)> |
| | Interrupt service routine handler type.
|
|
| enum class | CR0 : igros_usize_t {
PE = 0x00000001
, MP = 0x00000002
, EM = 0x00000004
, TS = 0x00000008
,
ET = 0x00000010
, NE = 0x00000020
, WP = 0x00010000
, AM = 0x00040000
,
NW = 0x20000000
, CD = 0x40000000
, PG = 0x80000000
} |
| | CR0 register bits. More...
|
| enum class | irq_t : igros_dword_t {
PIT = 0_u32
, KEYBOARD = 1_u32
, CASCADE = 2_u32
, UART2 = 3_u32
,
UART1 = 4_u32
, LPT2 = 5_u32
, FLOPPY = 6_u32
, LPT1 = 7_u32
,
RTC = 8_u32
, ACPI = 9_u32
, FREE_10 = 10_u32
, FREE_11 = 11_u32
,
MOUSE = 12_u32
, FPU = 13_u32
, ATA_PRIMARY = 14_u32
, ATA_SECONDARY = 15_u32
} |
| | Interrupts number enumeration (PIC lines). More...
|
Code shared by i386 and x86_64: ports, interrupts, exceptions, paging.
◆ isr_t
Interrupt service routine handler type.
Definition at line 35 of file isr.hpp.
◆ port_t
Define port data type which is 16bit word.
Definition at line 25 of file io.hpp.
◆ CR0
CR0 register bits.
| Enumerator |
|---|
| PE | Protected mode enable.
|
| MP | Monitor coprocessor.
|
| EM | x87 emulation
|
| TS | Task switched.
|
| ET | Extension type.
|
| NE | Native x87 errors.
|
| WP | Write protect (kernel can't write to read-only pages).
|
| AM | Alignment mask.
|
| NW | Not write-through.
|
| CD | Cache disable.
|
| PG | Paging enable.
|
Definition at line 25 of file cr.hpp.
◆ irq_t
Interrupts number enumeration (PIC lines).
| Enumerator |
|---|
| CASCADE | Slave PIC.
|
| LPT1 | Master PIC spurious.
|
| ATA_SECONDARY | Slave PIC spurious.
|
Definition at line 62 of file irq.hpp.
◆ flag()
|
|
staticnodiscardconstexprnoexcept |
Entry flag value.
- Parameters
-
- Returns
- Flag bits in entry
Definition at line 60 of file paging.cpp.
◆ hasFlag()
|
|
staticnodiscardconstexprnoexcept |
Is flag set in entry.
- Parameters
-
| entry | Table entry |
| value | Flag |
- Returns
- true if flag is set in entry
Definition at line 69 of file paging.cpp.
◆ irqFromVector()
|
|
nodiscardconstexprnoexcept |
IRQ line of interrupt vector (vector must be IRQ vector).
- Parameters
-
| vector | IRQ interrupt vector |
- Returns
- IRQ line
Definition at line 105 of file irq.hpp.
◆ irqVector()
|
|
nodiscardconstexprnoexcept |
Interrupt vector of IRQ line.
- Parameters
-
- Returns
- Interrupt vector
Definition at line 89 of file irq.hpp.
◆ isIrqVector()
| auto igros::x86::isIrqVector |
( |
const igros_usize_t | vector | ) |
->bool |
|
nodiscardconstexprnoexcept |
Check if interrupt vector belongs to IRQ line.
- Parameters
-
- Returns
- true if vector is an IRQ vector
Definition at line 97 of file irq.hpp.
◆ isrHandlerInstall()
Install interrupt service routine handler.
- Parameters
-
| number | Interrupt vector |
| handle | Handler |
Definition at line 31 of file isr.cpp.
◆ isrHandlerUninstall()
| void igros::x86::isrHandlerUninstall |
( |
const igros_usize_t | number | ) |
|
|
noexcept |
Uninstall interrupt service routine handler.
- Parameters
-
Definition at line 37 of file isr.cpp.
◆ platformFinalize()
| void igros::x86::platformFinalize |
( |
| ) |
|
|
staticnoexcept |
◆ platformInit()
| void igros::x86::platformInit |
( |
| ) |
|
|
staticnoexcept |
◆ platformReboot()
| void igros::x86::platformReboot |
( |
| ) |
|
|
staticnoexcept |
◆ platformShutdown()
| void igros::x86::platformShutdown |
( |
| ) |
|
|
staticnoexcept |
◆ platformSuspend()
| void igros::x86::platformSuspend |
( |
| ) |
|
|
staticnoexcept |
◆ platformWakeup()
| void igros::x86::platformWakeup |
( |
| ) |
|
|
staticnoexcept |
◆ ARCH_NAME
| auto igros::x86::ARCH_NAME {"x86_64"} |
|
constexpr |
Current architecture.
Current architecture name
Definition at line 51 of file native.hpp.
◆ IRQ_LINES
| auto igros::x86::IRQ_LINES {16_usize} |
|
constexpr |
Number of PIC interrupt lines.
Definition at line 82 of file irq.hpp.
◆ IRQ_OFFSET
| auto igros::x86::IRQ_OFFSET {32_usize} |
|
constexpr |
IRQ offset in ISR list.
Definition at line 30 of file isr.hpp.
◆ ISR_SIZE
| auto igros::x86::ISR_SIZE {256_usize} |
|
constexpr |
ISR list size.
Definition at line 32 of file isr.hpp.
◆ isrList
Interrupt handlers.
Definition at line 27 of file isr.cpp.
◆ PIC_MASTER_CONTROL
| auto igros::x86::PIC_MASTER_CONTROL {static_cast<port_t>(0x0020_u16)} |
|
constexpr |
Master PIC command port.
Definition at line 54 of file irq.hpp.
◆ PIC_MASTER_DATA
Master PIC data (mask) port.
Definition at line 55 of file irq.hpp.
◆ PIC_SLAVE_CONTROL
| auto igros::x86::PIC_SLAVE_CONTROL {static_cast<port_t>(0x00A0_u16)} |
|
constexpr |
Slave PIC command port.
Definition at line 57 of file irq.hpp.
◆ PIC_SLAVE_DATA
Slave PIC data (mask) port.
Definition at line 58 of file irq.hpp.