#include <stdint.h>
#include <registers.h>
#include <ipxe/uaccess.h>
Go to the source code of this file.
|
#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. More...
|
|
#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. More...
|
|
◆ put_real
Write a single variable to base memory.
- Parameters
-
var | Variable to write |
dest_seg | Destination segment |
dest_off | Destination offset |
Definition at line 114 of file realmode.h.
◆ get_real
Read a single variable from base memory.
- Parameters
-
var | Variable to read |
src_seg | Source segment |
src_off | Source offset |
Definition at line 124 of file realmode.h.
◆ FILE_LICENCE()
FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL |
| ) |
|
◆ real_to_user()
Convert segment:offset address to user buffer.
- Parameters
-
segment | Real-mode segment |
offset | Real-mode offset |
- Return values
-
Definition at line 75 of file realmode.h.
uint16_t segment
Code segment.
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
uint16_t offset
Offset to command line.
References offset, phys_to_user(), and segment.
Referenced by bios_find_smbios2(), bios_find_smbios3(), bzimage_parse_header(), com32_prepare_bounce_buffer(), comboot_exec_loop(), comboot_prepare_segment(), copy_from_real(), copy_to_real(), copy_user_to_rm_stack(), int13_extended_rw(), int13_rw_sectors(), int22(), nbi_process_segments(), print_user_string(), pxe_api_call(), pxe_exec(), pxe_loader_call(), pxenv_file_cmdline(), pxenv_file_exec(), pxenv_file_open(), pxenv_file_read(), pxenv_get_cached_info(), pxenv_tftp_read(), pxenv_udp_read(), pxenv_udp_write(), remove_user_from_rm_stack(), rsdp_find_rsdt(), sdi_exec(), shuffle(), and vesafb_mode_list().
◆ copy_to_real()
static __always_inline void copy_to_real |
( |
unsigned int |
dest_seg, |
|
|
unsigned int |
dest_off, |
|
|
void * |
src, |
|
|
size_t |
n |
|
) |
| |
|
inlinestatic |
Copy data to base memory.
- Parameters
-
dest_seg | Destination segment |
dest_off | Destination offset |
src | Source |
len | Length |
Definition at line 88 of file realmode.h.
static __always_inline void copy_to_user(userptr_t dest, off_t dest_off, const void *src, size_t len)
Copy data to user buffer.
static __always_inline void off_t dest_off
static __always_inline userptr_t real_to_user(unsigned int segment, unsigned int offset)
Convert segment:offset address to user buffer.
References copy_to_user(), dest_off, real_to_user(), and src.
◆ copy_from_real()
static __always_inline void copy_from_real |
( |
void * |
dest, |
|
|
unsigned int |
src_seg, |
|
|
unsigned int |
src_off, |
|
|
size_t |
n |
|
) |
| |
|
inlinestatic |
Copy data to base memory.
- Parameters
-
dest | Destination |
src_seg | Source segment |
src_off | Source offset |
len | Length |
Definition at line 102 of file realmode.h.
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
static __always_inline void off_t userptr_t off_t src_off
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
static __always_inline userptr_t real_to_user(unsigned int segment, unsigned int offset)
Convert segment:offset address to user buffer.
References copy_from_user(), dest, real_to_user(), and src_off.