Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
IA-32 specific kernel interface header This header contains the IA-32 specific kernel interface. More...
#include "sys_io.h"
#include <stdbool.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/arch/common/ffs.h>
#include <zephyr/sys/util.h>
#include <zephyr/arch/x86/ia32/exception.h>
#include <zephyr/arch/x86/ia32/gdbstub.h>
#include <zephyr/arch/x86/ia32/thread.h>
#include <zephyr/arch/x86/ia32/syscall.h>
#include <stddef.h>
#include <zephyr/arch/common/addr_types.h>
#include <zephyr/arch/x86/ia32/segmentation.h>
#include <zephyr/pm/pm.h>
Go to the source code of this file.
Data Structures | |
struct | s_isrList |
Macros | |
#define | CODE_SEG 0x08 |
#define | DATA_SEG 0x10 |
#define | MAIN_TSS 0x18 |
#define | DF_TSS 0x20 |
#define | GS_TLS_SEG (0x38 | 0x03) |
#define | MK_ISR_NAME(x) __isr__##x |
Macro used internally by NANO_CPU_INT_REGISTER and NANO_CPU_INT_REGISTER_ASM. | |
#define | NANO_CPU_INT_REGISTER(r, n, p, v, d) |
Connect a routine to an interrupt vector. | |
#define | IRQSTUBS_TEXT_SECTION ".text.irqstubs" |
#define | ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) |
#define | ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) |
#define | ARCH_ISR_DIRECT_PM() do { } while (false) |
#define | ARCH_ISR_DIRECT_HEADER() arch_isr_direct_header() |
#define | ARCH_ISR_DIRECT_FOOTER(swap) arch_isr_direct_footer(swap) |
#define | ARCH_ISR_DIRECT_DECLARE(name) |
#define | NANO_SOFT_IRQ ((unsigned int) (-1)) |
The NANO_SOFT_IRQ macro must be used as the value for the irq parameter to NANO_CPU_INT_REGISTER when connecting to an interrupt that does not correspond to any IRQ line (such as spurious vector or SW IRQ) | |
#define | ARCH_EXCEPT(reason_p) |
#define | ARCH_DYNAMIC_OBJ_K_THREAD_ALIGNMENT (sizeof(void *)) |
Typedefs | |
typedef struct s_isrList | ISR_LIST |
Functions | |
static void | arch_isr_direct_header (void) |
void | arch_isr_direct_footer_swap (unsigned int key) |
static void | arch_isr_direct_footer (int swap) |
static ALWAYS_INLINE unsigned int | arch_irq_lock (void) |
IA-32 specific kernel interface header This header contains the IA-32 specific kernel interface.
It is included by the generic kernel interface header (include/arch/cpu.h)
#define ARCH_DYNAMIC_OBJ_K_THREAD_ALIGNMENT (sizeof(void *)) |
#define ARCH_EXCEPT | ( | reason_p | ) |
#define ARCH_IRQ_CONNECT | ( | irq_p, | |
priority_p, | |||
isr_p, | |||
isr_param_p, | |||
flags_p | |||
) |
#define ARCH_IRQ_DIRECT_CONNECT | ( | irq_p, | |
priority_p, | |||
isr_p, | |||
flags_p | |||
) |
#define ARCH_ISR_DIRECT_DECLARE | ( | name | ) |
#define ARCH_ISR_DIRECT_FOOTER | ( | swap | ) | arch_isr_direct_footer(swap) |
#define ARCH_ISR_DIRECT_HEADER | ( | ) | arch_isr_direct_header() |
#define ARCH_ISR_DIRECT_PM | ( | ) | do { } while (false) |
#define CODE_SEG 0x08 |
#define DATA_SEG 0x10 |
#define DF_TSS 0x20 |
#define GS_TLS_SEG (0x38 | 0x03) |
#define IRQSTUBS_TEXT_SECTION ".text.irqstubs" |
#define MAIN_TSS 0x18 |
#define MK_ISR_NAME | ( | x | ) | __isr__##x |
Macro used internally by NANO_CPU_INT_REGISTER and NANO_CPU_INT_REGISTER_ASM.
Not meant to be used explicitly by platform, driver or application code.
Connect a routine to an interrupt vector.
This macro "connects" the specified routine, r, to the specified interrupt vector, v using the descriptor privilege level d. On the IA-32 architecture, an interrupt vector is a value from 0 to 255. This macro populates the special intList section with the address of the routine, the vector number and the descriptor privilege level. The genIdt tool then picks up this information and generates an actual IDT entry with this information properly encoded.
The d argument specifies the privilege level for the interrupt-gate descriptor; (hardware) interrupts and exceptions should specify a level of 0, whereas handlers for user-mode software generated interrupts should specify 3.
r | Routine to be connected |
n | IRQ number |
p | IRQ priority |
v | Interrupt Vector |
d | Descriptor Privilege Level |
#define NANO_SOFT_IRQ ((unsigned int) (-1)) |
The NANO_SOFT_IRQ macro must be used as the value for the irq parameter to NANO_CPU_INT_REGISTER when connecting to an interrupt that does not correspond to any IRQ line (such as spurious vector or SW IRQ)
|
static |
|
inlinestatic |
void arch_isr_direct_footer_swap | ( | unsigned int | key | ) |
|
inlinestatic |