iPXE
Macros | Functions | Variables
efi_uaccess.h File Reference

iPXE user access API for EFI More...

Go to the source code of this file.

Macros

#define UACCESS_PREFIX_efi   __efi_
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __always_inline userptr_t UACCESS_INLINE (efi, phys_to_user)(unsigned long phys_addr)
 Convert physical address to user pointer. More...
 
static __always_inline unsigned long UACCESS_INLINE (efi, user_to_phys)(userptr_t userptr
 Convert user buffer to physical address. More...
 
static __always_inline userptr_t UACCESS_INLINE (efi, virt_to_user)(volatile const void *addr)
 
static __always_inline void * UACCESS_INLINE (efi, user_to_virt)(userptr_t userptr
 
static __always_inline userptr_t UACCESS_INLINE (efi, userptr_add)(userptr_t userptr
 
static __always_inline off_t UACCESS_INLINE (efi, userptr_sub)(userptr_t userptr
 
static __always_inline void UACCESS_INLINE (efi, memcpy_user)(userptr_t dest
 
static __always_inline void UACCESS_INLINE (efi, memmove_user)(userptr_t dest
 
static __always_inline int UACCESS_INLINE (efi, memcmp_user)(userptr_t first
 
static __always_inline void UACCESS_INLINE (efi, memset_user)(userptr_t buffer
 
static __always_inline size_t UACCESS_INLINE (efi, strlen_user)(userptr_t buffer
 
static __always_inline off_t UACCESS_INLINE (efi, memchr_user)(userptr_t buffer
 

Variables

static __always_inline unsigned long off_t offset
 
static __always_inline off_t userptr_t subtrahend
 
static __always_inline void off_t dest_off
 
static __always_inline void off_t userptr_t src
 
static __always_inline void off_t userptr_t off_t src_off
 
static __always_inline void off_t userptr_t off_t size_t len
 
static __always_inline int off_t first_off
 
static __always_inline int off_t userptr_t second
 
static __always_inline int off_t userptr_t off_t second_off
 
static __always_inline void off_t int c
 

Detailed Description

iPXE user access API for EFI

EFI runs with flat physical addressing, so the various mappings between virtual addresses, I/O addresses and bus addresses are all no-ops.

Definition in file efi_uaccess.h.

Macro Definition Documentation

◆ UACCESS_PREFIX_efi

#define UACCESS_PREFIX_efi   __efi_

Definition at line 18 of file efi_uaccess.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ UACCESS_INLINE() [1/12]

static __always_inline userptr_t UACCESS_INLINE ( efi  ,
phys_to_user   
)
inlinestatic

Convert physical address to user pointer.

Parameters
phys_addrPhysical address
Return values
userptrUser pointer

Definition at line 28 of file efi_uaccess.h.

28  {
29  return phys_addr;
30 }

◆ UACCESS_INLINE() [2/12]

static __always_inline unsigned long UACCESS_INLINE ( efi  ,
user_to_phys   
)
inlinestatic

Convert user buffer to physical address.

Parameters
userptrUser pointer
offsetOffset from user pointer
Return values
phys_addrPhysical address

◆ UACCESS_INLINE() [3/12]

static __always_inline userptr_t UACCESS_INLINE ( efi  ,
virt_to_user   
) const volatile
inlinestatic

Definition at line 45 of file efi_uaccess.h.

45  {
46  return trivial_virt_to_user ( addr );
47 }
u32 addr
Definition: sky2.h:8
static __always_inline userptr_t trivial_virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.
Definition: uaccess.h:55

References addr, and trivial_virt_to_user().

◆ UACCESS_INLINE() [4/12]

static __always_inline void* UACCESS_INLINE ( efi  ,
user_to_virt   
)
inlinestatic

◆ UACCESS_INLINE() [5/12]

static __always_inline userptr_t UACCESS_INLINE ( efi  ,
userptr_add   
)
inlinestatic

◆ UACCESS_INLINE() [6/12]

static __always_inline off_t UACCESS_INLINE ( efi  ,
userptr_sub   
)
inlinestatic

◆ UACCESS_INLINE() [7/12]

static __always_inline void UACCESS_INLINE ( efi  ,
memcpy_user   
)
inlinestatic

◆ UACCESS_INLINE() [8/12]

static __always_inline void UACCESS_INLINE ( efi  ,
memmove_user   
)
inlinestatic

◆ UACCESS_INLINE() [9/12]

static __always_inline int UACCESS_INLINE ( efi  ,
memcmp_user   
)
inlinestatic

◆ UACCESS_INLINE() [10/12]

static __always_inline void UACCESS_INLINE ( efi  ,
memset_user   
)
inlinestatic

◆ UACCESS_INLINE() [11/12]

static __always_inline size_t UACCESS_INLINE ( efi  ,
strlen_user   
)
inlinestatic

◆ UACCESS_INLINE() [12/12]

static __always_inline off_t UACCESS_INLINE ( efi  ,
memchr_user   
)
inlinestatic

Variable Documentation

◆ offset

Initial value:
{
return ( userptr + offset )
static __always_inline unsigned long off_t offset
Definition: efi_uaccess.h:40

Definition at line 40 of file efi_uaccess.h.

◆ subtrahend

Initial value:
{
return trivial_userptr_sub ( userptr, subtrahend )
static __always_inline off_t userptr_t subtrahend
Definition: efi_uaccess.h:61
static __always_inline off_t trivial_userptr_sub(userptr_t userptr, userptr_t subtrahend)
Subtract user pointers.
Definition: uaccess.h:93

Definition at line 61 of file efi_uaccess.h.

Referenced by bigint_subtract_sample(), and trivial_userptr_sub().

◆ dest_off

static __always_inline void off_t dest_off

◆ src

static __always_inline void off_t userptr_t src

Definition at line 66 of file efi_uaccess.h.

Referenced by __attribute__(), __memmove(), aes_decrypt(), aes_encrypt(), aes_unwrap(), aes_wrap(), arc4_skip(), arc4_xor(), bnxt_add_vlan(), bnxt_get_pkt_vlan(), bzimage_parse_header(), cbc_decrypt(), cbc_encrypt(), cbc_xor(), ccmp_ctr_xor(), cipher_decrypt(), cipher_encrypt(), cipher_null_decrypt(), cipher_null_encrypt(), copy_from_user(), copy_to_real(), copy_to_user(), crc32_le(), dhcpv6_rx(), dns_copy(), ecb_decrypt(), ecb_encrypt(), efi_paths(), efi_pxe_udp_write(), efi_undi_fill_header(), efi_undi_receive(), eth_pio_read(), eth_pio_write(), exanic_transmit(), fbcon_draw(), fc_els_rx(), fc_xchg_rx(), gcc_implicit_memcpy(), gdbstub_from_hex_buf(), gdbstub_to_hex_buf(), generic_memcpy(), generic_memcpy_reverse(), generic_memmove(), hv_wait_for_message(), ipv4_rx(), ipv6_route_okx(), ipv6_rx(), ipv6_tx(), memchr(), memcpy_0(), memcpy_1(), memcpy_10(), memcpy_11(), memcpy_12(), memcpy_13(), memcpy_14(), memcpy_15(), memcpy_16(), memcpy_17(), memcpy_18(), memcpy_19(), memcpy_2(), memcpy_20(), memcpy_21(), memcpy_22(), memcpy_23(), memcpy_24(), memcpy_25(), memcpy_26(), memcpy_27(), memcpy_28(), memcpy_29(), memcpy_3(), memcpy_30(), memcpy_31(), memcpy_4(), memcpy_5(), memcpy_6(), memcpy_7(), memcpy_8(), memcpy_9(), memcpy_test_speed(), memcpy_var(), nii_sync(), shuffle(), strcat(), strchr(), strcpy(), strdup(), string_copy(), string_test_exec(), strlen(), strncpy(), strndup(), strnlen(), strrchr(), trivial_memcpy_user(), trivial_memmove_user(), udp_tx(), and uri_copy_fields().

◆ src_off

static __always_inline void off_t userptr_t off_t src_off

◆ len

Initial value:
{
static __always_inline void off_t userptr_t off_t src_off
Definition: efi_uaccess.h:66
static __always_inline void off_t dest_off
Definition: efi_uaccess.h:66
static __always_inline void off_t userptr_t off_t size_t len
Definition: efi_uaccess.h:68
static void * dest
Definition: strings.h:176
static __always_inline void off_t userptr_t src
Definition: efi_uaccess.h:66
static __always_inline void trivial_memcpy_user(userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
Copy data between user buffers.
Definition: uaccess.h:107

Definition at line 68 of file efi_uaccess.h.

◆ first_off

__always_inline int off_t first_off

Definition at line 80 of file efi_uaccess.h.

Referenced by trivial_memcmp_user().

◆ second

◆ second_off

Definition at line 80 of file efi_uaccess.h.

Referenced by trivial_memcmp_user().

◆ c

Definition at line 87 of file efi_uaccess.h.