Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
efi.c File Reference
#include <linux/module.h>
#include <linux/bootmem.h>
#include <linux/crash_dump.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/efi.h>
#include <linux/kexec.h>
#include <linux/mm.h>
#include <asm/io.h>
#include <asm/kregs.h>
#include <asm/meminit.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/mca.h>
#include <asm/setup.h>
#include <asm/tlbflush.h>

Go to the source code of this file.

Data Structures

struct  kern_memdesc
 

Macros

#define EFI_DEBUG   0
 
#define efi_call_virt(f, args...)   (*(f))(args)
 
#define STUB_GET_TIME(prefix, adjust_arg)
 
#define STUB_SET_TIME(prefix, adjust_arg)
 
#define STUB_GET_WAKEUP_TIME(prefix, adjust_arg)
 
#define STUB_SET_WAKEUP_TIME(prefix, adjust_arg)
 
#define STUB_GET_VARIABLE(prefix, adjust_arg)
 
#define STUB_GET_NEXT_VARIABLE(prefix, adjust_arg)
 
#define STUB_SET_VARIABLE(prefix, adjust_arg)
 
#define STUB_GET_NEXT_HIGH_MONO_COUNT(prefix, adjust_arg)
 
#define STUB_RESET_SYSTEM(prefix, adjust_arg)
 
#define phys_ptr(arg)   ((__typeof__(arg)) ia64_tpa(arg))
 
#define id(arg)   arg
 
#define efi_md_size(md)   (md->num_pages << EFI_PAGE_SHIFT)
 

Typedefs

typedef struct kern_memdesc kern_memdesc_t
 

Functions

efi_status_t efi_call_phys (void *,...)
 
 EXPORT_SYMBOL (efi)
 
void efi_gettimeofday (struct timespec *ts)
 
void efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
 
void efi_memmap_walk_uc (efi_freemem_callback_t callback, void *arg)
 
voidefi_get_pal_addr (void)
 
void efi_map_pal_code (void)
 
void __init efi_init (void)
 
void efi_enter_virtual_mode (void)
 
u64 efi_get_iobase (void)
 
u32 efi_mem_type (unsigned long phys_addr)
 
u64 efi_mem_attributes (unsigned long phys_addr)
 
 EXPORT_SYMBOL (efi_mem_attributes)
 
u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size)
 
u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size)
 
 EXPORT_SYMBOL (kern_mem_attribute)
 
int valid_phys_addr_range (unsigned long phys_addr, unsigned long size)
 
int valid_mmap_phys_addr_range (unsigned long pfn, unsigned long size)
 
pgprot_t phys_mem_access_prot (struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot)
 
int __init efi_uart_console_only (void)
 
struct kern_memdescfind_memmap_space (void)
 
unsigned long efi_memmap_init (u64 *s, u64 *e)
 
void efi_initialize_iomem_resources (struct resource *code_resource, struct resource *data_resource, struct resource *bss_resource)
 

Variables

struct efi efi
 

Macro Definition Documentation

#define efi_call_virt (   f,
  args... 
)    (*(f))(args)

Definition at line 54 of file efi.c.

#define EFI_DEBUG   0

Definition at line 45 of file efi.c.

#define efi_md_size (   md)    (md->num_pages << EFI_PAGE_SHIFT)

Definition at line 273 of file efi.c.

#define id (   arg)    arg

Definition at line 221 of file efi.c.

#define phys_ptr (   arg)    ((__typeof__(arg)) ia64_tpa(arg))

Definition at line 209 of file efi.c.

#define STUB_GET_NEXT_HIGH_MONO_COUNT (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_get_next_high_mono_count (u32 *count) \
{ \
ret = efi_call_##prefix((efi_get_next_high_mono_count_t *) \
adjust_arg(count)); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 175 of file efi.c.

#define STUB_GET_NEXT_VARIABLE (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_get_next_variable (unsigned long *name_size, efi_char16_t *name, \
{ \
ret = efi_call_##prefix( \
adjust_arg(name_size), adjust_arg(name), adjust_arg(vendor)); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 141 of file efi.c.

#define STUB_GET_TIME (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc) \
{ \
if (tc) \
atc = adjust_arg(tc); \
ia64_save_scratch_fpregs(fr); \
ret = efi_call_##prefix((efi_get_time_t *) __va(runtime->get_time), \
adjust_arg(tm), atc); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 56 of file efi.c.

#define STUB_GET_VARIABLE (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr, \
unsigned long *data_size, void *data) \
{ \
u32 *aattr = NULL; \
if (attr) \
aattr = adjust_arg(attr); \
ia64_save_scratch_fpregs(fr); \
ret = efi_call_##prefix( \
adjust_arg(name), adjust_arg(vendor), aattr, \
adjust_arg(data_size), adjust_arg(data)); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 121 of file efi.c.

#define STUB_GET_WAKEUP_TIME (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_get_wakeup_time (efi_bool_t *enabled, efi_bool_t *pending, \
{ \
ret = efi_call_##prefix( \
adjust_arg(enabled), adjust_arg(pending), adjust_arg(tm)); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 87 of file efi.c.

#define STUB_RESET_SYSTEM (   prefix,
  adjust_arg 
)
Value:
static void \
prefix##_reset_system (int reset_type, efi_status_t status, \
unsigned long data_size, efi_char16_t *data) \
{ \
efi_char16_t *adata = NULL; \
if (data) \
adata = adjust_arg(data); \
efi_call_##prefix( \
/* should not return, but just in case... */ \
ia64_load_scratch_fpregs(fr); \
}

Definition at line 190 of file efi.c.

#define STUB_SET_TIME (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_set_time (efi_time_t *tm) \
{ \
ret = efi_call_##prefix((efi_set_time_t *) __va(runtime->set_time), \
adjust_arg(tm)); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 73 of file efi.c.

#define STUB_SET_VARIABLE (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor, \
u32 attr, unsigned long data_size, \
void *data) \
{ \
ret = efi_call_##prefix( \
adjust_arg(name), adjust_arg(vendor), attr, data_size, \
adjust_arg(data)); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 157 of file efi.c.

#define STUB_SET_WAKEUP_TIME (   prefix,
  adjust_arg 
)
Value:
static efi_status_t \
prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm) \
{ \
if (tm) \
atm = adjust_arg(tm); \
ia64_save_scratch_fpregs(fr); \
ret = efi_call_##prefix( \
enabled, atm); \
ia64_load_scratch_fpregs(fr); \
return ret; \
}

Definition at line 103 of file efi.c.

Typedef Documentation

Function Documentation

efi_status_t efi_call_phys ( void ,
  ... 
)
void efi_enter_virtual_mode ( void  )

Definition at line 629 of file efi.c.

u64 efi_get_iobase ( void  )

Definition at line 712 of file efi.c.

void* efi_get_pal_addr ( void  )

Definition at line 343 of file efi.c.

void efi_gettimeofday ( struct timespec ts)

Definition at line 234 of file efi.c.

void __init efi_init ( void  )

Definition at line 467 of file efi.c.

void efi_initialize_iomem_resources ( struct resource code_resource,
struct resource data_resource,
struct resource bss_resource 
)

Definition at line 1201 of file efi.c.

void efi_map_pal_code ( void  )

Definition at line 446 of file efi.c.

u64 efi_mem_attribute ( unsigned long  phys_addr,
unsigned long  size 
)

Definition at line 808 of file efi.c.

u64 efi_mem_attributes ( unsigned long  phys_addr)

Definition at line 797 of file efi.c.

u32 efi_mem_type ( unsigned long  phys_addr)

Definition at line 787 of file efi.c.

unsigned long efi_memmap_init ( u64 s,
u64 e 
)

Definition at line 1072 of file efi.c.

void efi_memmap_walk ( efi_freemem_callback_t  callback,
void arg 
)

Definition at line 322 of file efi.c.

void efi_memmap_walk_uc ( efi_freemem_callback_t  callback,
void arg 
)

Definition at line 332 of file efi.c.

int __init efi_uart_console_only ( void  )

Definition at line 946 of file efi.c.

EXPORT_SYMBOL ( efi  )
EXPORT_SYMBOL ( efi_mem_attributes  )
EXPORT_SYMBOL ( kern_mem_attribute  )
struct kern_memdesc* find_memmap_space ( void  )
read

Definition at line 996 of file efi.c.

u64 kern_mem_attribute ( unsigned long  phys_addr,
unsigned long  size 
)

Definition at line 836 of file efi.c.

pgprot_t phys_mem_access_prot ( struct file file,
unsigned long  pfn,
unsigned long  size,
pgprot_t  vma_prot 
)

Definition at line 918 of file efi.c.

int valid_mmap_phys_addr_range ( unsigned long  pfn,
unsigned long  size 
)

Definition at line 890 of file efi.c.

int valid_phys_addr_range ( unsigned long  phys_addr,
unsigned long  size 
)

Definition at line 873 of file efi.c.

Variable Documentation

Definition at line 49 of file efi.c.