RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
realmode_int.h File Reference

Definitioins supporting real mode interrupt calls. More...

#include <rtems/score/cpu.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  RTEMS_PACKED
 Used for passing and retrieving registers content to/from real mode interrupt call. More...
 

Macros

#define INTERRUPT_NO_VIDEO_SERVICES   0x10
 

Functions

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.
 

Detailed Description

Definitioins supporting real mode interrupt calls.

Interface allows calling given interrupt number with content of the registers defined. For passing or receiving higher amounts of the data there is a buffer accessible from real mode available. Real mode pointer to this buffer is passed to the interrupt in the registers.

Function Documentation

◆ 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]sizepointer to variable, where the size of buffer will be filled
Return values
pointerto buffer

◆ 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_numberinterrupt number to be called
[in]irpointer to structure containing registers to be passed to interrupt and to retrieve register content after call was made.
Return values
0call failed (GDT too small or pagin is on)
1call successful