Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
mtrr.h File Reference
#include <linux/types.h>
#include <linux/stddef.h>

Go to the source code of this file.

Data Structures

struct  mtrr_ops
 
struct  set_mtrr_context
 

Macros

#define MTRR_CHANGE_MASK_FIXED   0x01
 
#define MTRR_CHANGE_MASK_VARIABLE   0x02
 
#define MTRR_CHANGE_MASK_DEFTYPE   0x04
 
#define is_cpu(vnd)   (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
 
#define use_intel()   (mtrr_if && mtrr_if->use_intel_if == 1)
 

Functions

int generic_get_free_region (unsigned long base, unsigned long size, int replace_reg)
 
int generic_validate_add_page (unsigned long base, unsigned long size, unsigned int type)
 
int positive_have_wrcomb (void)
 
void set_mtrr_done (struct set_mtrr_context *ctxt)
 
void set_mtrr_cache_disable (struct set_mtrr_context *ctxt)
 
void set_mtrr_prepare_save (struct set_mtrr_context *ctxt)
 
void fill_mtrr_var_range (unsigned int index, u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi)
 
void get_mtrr_state (void)
 
void set_mtrr_ops (const struct mtrr_ops *ops)
 
void mtrr_state_warn (void)
 
const charmtrr_attrib_to_str (int x)
 
void mtrr_wrmsr (unsigned, unsigned, unsigned)
 
int amd_init_mtrr (void)
 
int cyrix_init_mtrr (void)
 
int centaur_init_mtrr (void)
 
int mtrr_cleanup (unsigned address_bits)
 

Variables

unsigned int mtrr_usage_table [MTRR_MAX_VAR_RANGES]
 
struct mtrr_ops generic_mtrr_ops
 
u64 size_or_mask
 
u64 size_and_mask
 
struct mtrr_opsmtrr_if
 
unsigned int num_var_ranges
 
u64 mtrr_tom2
 
struct mtrr_state_type mtrr_state
 
int changed_by_mtrr_cleanup
 

Macro Definition Documentation

#define is_cpu (   vnd)    (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)

Definition at line 61 of file mtrr.h.

#define MTRR_CHANGE_MASK_DEFTYPE   0x04

Definition at line 10 of file mtrr.h.

#define MTRR_CHANGE_MASK_FIXED   0x01

Definition at line 8 of file mtrr.h.

#define MTRR_CHANGE_MASK_VARIABLE   0x02

Definition at line 9 of file mtrr.h.

#define use_intel ( )    (mtrr_if && mtrr_if->use_intel_if == 1)

Definition at line 62 of file mtrr.h.

Function Documentation

int amd_init_mtrr ( void  )

Definition at line 120 of file amd.c.

int centaur_init_mtrr ( void  )

Definition at line 122 of file centaur.c.

int cyrix_init_mtrr ( void  )

Definition at line 278 of file cyrix.c.

void fill_mtrr_var_range ( unsigned int  index,
u32  base_lo,
u32  base_hi,
u32  mask_lo,
u32  mask_hi 
)

Definition at line 261 of file generic.c.

int generic_get_free_region ( unsigned long  base,
unsigned long  size,
int  replace_reg 
)

generic_get_free_region - Get a free MTRR. : The starting (base) address of the region. : The size (in bytes) of the region. : mtrr index to be replaced; set to invalid value if none.

Returns: The index of the region on success, else negative on error.

Definition at line 491 of file generic.c.

int generic_validate_add_page ( unsigned long  base,
unsigned long  size,
unsigned int  type 
)

Definition at line 780 of file generic.c.

void get_mtrr_state ( void  )

Definition at line 385 of file generic.c.

const char* mtrr_attrib_to_str ( int  x)

Definition at line 30 of file if.c.

int mtrr_cleanup ( unsigned  address_bits)

Definition at line 800 of file cleanup.c.

void mtrr_state_warn ( void  )

Definition at line 432 of file generic.c.

void mtrr_wrmsr ( unsigned  ,
unsigned  ,
unsigned   
)

Definition at line 454 of file generic.c.

int positive_have_wrcomb ( void  )

Definition at line 826 of file generic.c.

void set_mtrr_cache_disable ( struct set_mtrr_context ctxt)
void set_mtrr_done ( struct set_mtrr_context ctxt)
void set_mtrr_ops ( const struct mtrr_ops ops)

Definition at line 72 of file main.c.

void set_mtrr_prepare_save ( struct set_mtrr_context ctxt)

Variable Documentation

int changed_by_mtrr_cleanup

Definition at line 584 of file main.c.

struct mtrr_ops generic_mtrr_ops

Definition at line 834 of file generic.c.

struct mtrr_ops* mtrr_if

Definition at line 67 of file main.c.

struct mtrr_state_type mtrr_state

Definition at line 37 of file generic.c.

u64 mtrr_tom2

Definition at line 35 of file generic.c.

unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES]

Definition at line 59 of file main.c.

unsigned int num_var_ranges

Definition at line 57 of file main.c.

u64 size_and_mask

Definition at line 62 of file main.c.

u64 size_or_mask

Definition at line 62 of file main.c.