Real mode interrupt call implementation.
More...
#include <bsp/realmode_int.h>
#include <string.h>
#include <rtems/score/cpu.h>
|
struct | RTEMS_PACKED |
| Used for passing and retrieving registers content to/from real mode interrupt call. More...
|
|
|
#define | IR_EAX_OFF "0x00" |
|
#define | IR_EBX_OFF "0x04" |
|
#define | IR_ECX_OFF "0x08" |
|
#define | IR_EDX_OFF "0x0C" |
|
#define | IR_ESI_OFF "0x10" |
|
#define | IR_EDI_OFF "0x14" |
|
#define | IR_DS_OFF "0x18" |
|
#define | IR_ES_OFF "0x1A" |
|
#define | IR_FS_OFF "0x1C" |
|
#define | IR_GS_OFF "0x1E" |
|
#define | BKP_ESP_OFF "0x20" |
|
#define | BKP_SS_OFF "0x24" |
|
#define | BKP_DS_OFF "0x26" |
|
#define | RM_ENTRY "0x28" |
|
#define | PM_ENTRY "0x2C" |
|
#define | BKP_IDTR_LIM "0x00" |
|
#define | BKP_IDTR_BASE "0x02" |
|
#define | BKP_ES_OFF "0x06" |
|
#define | BKP_FS_OFF "0x08" |
|
#define | BKP_GS_OFF "0x0A" |
|
#define | RML_ENTRY "0x0C" |
|
#define | RML_D_SEL "0x12" |
|
#define | RM_SS "0x14" |
|
#define | RM_SP "0x16" |
|
#define | RM_DS "0x18" |
|
#define | REAL_MODE_SPOT 0x12000 |
|
#define | DEFAULT_BUFFER_SIZE 512 |
|
#define | STACK_SIZE 8192 |
|
#define | INT_STACK_TOP REAL_MODE_SPOT |
|
#define | __DP_TYPE uint8_t |
|
#define | __DP_YES ((__DP_TYPE)1) |
|
#define | __DP_NO ((__DP_TYPE)-1) |
|
#define | __DP_FAIL ((__DP_TYPE)0) |
|
#define | rml_limit 0xFFFF |
|
|
void * | i386_get_default_rm_buffer (uint16_t *size) |
| Returns buffer and its size usable with real mode interrupt call.
|
|
int | i386_real_interrupt_call (uint8_t interrupt_number, i386_realmode_interrupt_registers *ir) |
| Call to real mode interrupt with specified int NO and processor registers.
|
|
Real mode interrupt call implementation.
◆ i386_get_default_rm_buffer()
void * i386_get_default_rm_buffer |
( |
uint16_t * |
size | ) |
|
Returns buffer and its size usable with real mode interrupt call.
Provides position to real mode buffer. It is buffer accessible from real mode context - it is located below address ~0x100000 in order for it to be accessible This buffer is meant to be pointed to by segReg:GenPurpReg and through this get bigger portion of an information to/from interrupt service routine than just by using register.
- Parameters
-
[out] | size | pointer to variable, where the size of buffer will be filled |
- Return values
-
◆ i386_real_interrupt_call()
int i386_real_interrupt_call |
( |
uint8_t |
interrupt_number, |
|
|
i386_realmode_interrupt_registers * |
ir |
|
) |
| |
Call to real mode interrupt with specified int NO and processor registers.
This function allows calling interrupts in real mode and to set processor registers as desired before interrupt call is made and to retrieve the registers content after call was made.
- Parameters
-
[in] | interrupt_number | interrupt number to be called |
[in] | ir | pointer to structure containing registers to be passed to interrupt and to retrieve register content after call was made. |
- Return values
-
0 | call failed (GDT too small or pagin is on) |
1 | call successful |