realmode.h File Reference

#include <stdint.h>
#include <registers.h>
#include <gpxe/uaccess.h>

Go to the source code of this file.

Defines

#define put_real(var, dest_seg, dest_off)   copy_to_real ( (dest_seg), (dest_off), &(var), sizeof (var) )
 Write a single variable to base memory.
#define get_real(var, src_seg, src_off)   copy_from_real ( &(var), (src_seg), (src_off), sizeof (var) )
 Read a single variable from base memory.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static __always_inline void copy_to_real (unsigned int dest_seg, unsigned int dest_off, void *src, size_t n)
 Copy data to base memory.
static __always_inline void copy_from_real (void *dest, unsigned int src_seg, unsigned int src_off, size_t n)
 Copy data to base memory.


Define Documentation

#define put_real ( var,
dest_seg,
dest_off   )     copy_to_real ( (dest_seg), (dest_off), &(var), sizeof (var) )

Write a single variable to base memory.

Parameters:
var Variable to write
dest_seg Destination segment
dest_off Destination offset

Definition at line 102 of file realmode.h.

#define get_real ( var,
src_seg,
src_off   )     copy_from_real ( &(var), (src_seg), (src_off), sizeof (var) )

Read a single variable from base memory.

Parameters:
var Variable to read
src_seg Source segment
src_off Source offset

Definition at line 112 of file realmode.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

static __always_inline void copy_to_real ( unsigned int  dest_seg,
unsigned int  dest_off,
void *  src,
size_t  n 
) [inline, static]

Copy data to base memory.

Parameters:
dest_seg Destination segment
dest_off Destination offset
src Source
len Length

Definition at line 76 of file realmode.h.

References copy_to_user(), and real_to_user().

00077                                      {
00078         copy_to_user ( real_to_user ( dest_seg, dest_off ), 0, src, n );
00079 }

static __always_inline void copy_from_real ( void *  dest,
unsigned int  src_seg,
unsigned int  src_off,
size_t  n 
) [inline, static]

Copy data to base memory.

Parameters:
dest Destination
src_seg Source segment
src_off Source offset
len Length

Definition at line 90 of file realmode.h.

References copy_from_user(), and real_to_user().

00091                                                   {
00092         copy_from_user ( dest, real_to_user ( src_seg, src_off ), 0, n );
00093 }


Generated on Tue Apr 6 20:01:13 2010 for gPXE by  doxygen 1.5.7.1