#include <linux/types.h>#include <linux/errno.h>#include <linux/sched.h>#include <linux/tty.h>#include <linux/timer.h>#include <linux/config.h>#include <linux/kernel.h>#include <linux/wait.h>#include <linux/string.h>#include <linux/malloc.h>#include <linux/ioport.h>#include <linux/delay.h>#include <linux/fs.h>#include <linux/ctype.h>#include <linux/proc_fs.h>#include <linux/mm.h>#include <linux/module.h>#include <asm/mtrr.h>#include <linux/init.h>#include <linux/smp.h>#include <asm/uaccess.h>#include <asm/io.h>#include <asm/processor.h>#include <asm/system.h>#include <asm/pgtable.h>#include <asm/segment.h>#include <asm/bitops.h>#include <asm/atomic.h>#include <asm/msr.h>#include <asm/hardirq.h>#include "irq.h"Include dependency graph for mtrr.c:

Go to the source code of this file.
Defines | |
| #define | MTRR_NEED_STRINGS |
| #define | MTRR_VERSION "1.35a (19990819)" |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | MTRRcap_MSR 0x0fe |
| #define | MTRRdefType_MSR 0x2ff |
| #define | MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) |
| #define | MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) |
| #define | NUM_FIXED_RANGES 88 |
| #define | MTRRfix64K_00000_MSR 0x250 |
| #define | MTRRfix16K_80000_MSR 0x258 |
| #define | MTRRfix16K_A0000_MSR 0x259 |
| #define | MTRRfix4K_C0000_MSR 0x268 |
| #define | MTRRfix4K_C8000_MSR 0x269 |
| #define | MTRRfix4K_D0000_MSR 0x26a |
| #define | MTRRfix4K_D8000_MSR 0x26b |
| #define | MTRRfix4K_E0000_MSR 0x26c |
| #define | MTRRfix4K_E8000_MSR 0x26d |
| #define | MTRRfix4K_F0000_MSR 0x26e |
| #define | MTRRfix4K_F8000_MSR 0x26f |
| #define | LINE_SIZE 80 |
| #define | JIFFIE_TIMEOUT 100 |
| #define | set_mtrr(reg, base, size, type) |
| #define | spin_lock_reschedule(lock) while (!spin_trylock(lock)) schedule (); |
| #define | compute_ascii() while (0) |
Typedefs | |
| typedef u8 | mtrr_type |
Functions | |
| static spinlock_t main_lock | __attribute ((unused)) |
| static void | set_mtrr_prepare (struct set_mtrr_context *ctxt) |
| static void | set_mtrr_done (struct set_mtrr_context *ctxt) |
| static unsigned int | get_num_var_ranges (void) |
| static int | have_wrcomb (void) |
| static void | intel_get_mtrr (unsigned int reg, unsigned long *base, unsigned long *size, mtrr_type *type) |
| static void | cyrix_get_arr (unsigned int reg, unsigned long *base, unsigned long *size, mtrr_type *type) |
| static void | amd_get_mtrr (unsigned int reg, unsigned long *base, unsigned long *size, mtrr_type *type) |
| static void | centaur_get_mcr (unsigned int reg, unsigned long *base, unsigned long *size, mtrr_type *type) |
| static void | intel_set_mtrr_up (unsigned int reg, unsigned long base, unsigned long size, mtrr_type type, int do_safe) |
| static void | cyrix_set_arr_up (unsigned int reg, unsigned long base, unsigned long size, mtrr_type type, int do_safe) |
| static void | amd_set_mtrr_up (unsigned int reg, unsigned long base, unsigned long size, mtrr_type type, int do_safe) |
| static void | centaur_set_mcr_up (unsigned int reg, unsigned long base, unsigned long size, mtrr_type type, int do_safe) |
| static char * | attrib_to_str (int x) |
| static void | init_table (void) |
| static int | generic_get_free_region (unsigned long base, unsigned long size) |
| static int | cyrix_get_free_region (unsigned long base, unsigned long size) |
| int | mtrr_add (unsigned long base, unsigned long size, unsigned int type, char increment) |
| int | mtrr_del (int reg, unsigned long base, unsigned long size) |
| EXPORT_SYMBOL (mtrr_add) | |
| EXPORT_SYMBOL (mtrr_del) | |
| __initfunc (static void cyrix_arr_init(void)) | |
| __initfunc (int mtrr_init(void)) | |
Variables | |
| static unsigned int * | usage_table = NULL |
| static struct CENTAUR_MCR_CTX * | centaur_ctx |
| static void(* | get_mtrr )(unsigned int reg, unsigned long *base, unsigned long *size, mtrr_type *type) = NULL |
| static void(* | set_mtrr_up )(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type, int do_safe) = NULL |
| static int(* | get_free_region )(unsigned long base, unsigned long size) = generic_get_free_region |
|
|
Definition at line 300 of file mtrr.c. Referenced by init_table(), mtrr_add(), and mtrr_del(). |
|
|
|
|
|
Definition at line 288 of file mtrr.c. Referenced by smp_call_function(). |
|
|
Definition at line 287 of file mtrr.c. Referenced by init_table(). |
|
|
|
|
|
|
|
|
Definition at line 258 of file mtrr.c. Referenced by get_num_var_ranges(), and have_wrcomb(). |
|
|
Definition at line 259 of file mtrr.c. Referenced by set_mtrr_done(), and set_mtrr_prepare(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 261 of file mtrr.c. Referenced by intel_get_mtrr(), and intel_set_mtrr_up(). |
|
|
Definition at line 262 of file mtrr.c. Referenced by intel_get_mtrr(), and intel_set_mtrr_up(). |
|
|
|
|
|
Value: Definition at line 293 of file mtrr.c. Referenced by mtrr_add(), and mtrr_del(). |
|
|
Definition at line 297 of file mtrr.c. Referenced by mtrr_add(), and mtrr_del(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 1870 of file mtrr.c. References boot_cpu_data, init_table(), proc_register(), proc_root, cpuinfo_x86::x86, cpuinfo_x86::x86_capability, X86_FEATURE_MTRR, cpuinfo_x86::x86_vendor, X86_VENDOR_AMD, X86_VENDOR_CENTAUR, X86_VENDOR_CYRIX, and X86_VENDOR_INTEL. Here is the call graph for this function: ![]() |
|
|
Definition at line 1625 of file mtrr.c. References set_mtrr_context::ccr3, CX86_CCR0, CX86_CCR1, CX86_CCR2, CX86_CCR4, CX86_CCR5, CX86_CCR6, cyrix_get_arr(), getCx86, printk, set_mtrr_done(), set_mtrr_prepare(), setCx86, x02, and x20. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 566 of file mtrr.c. References high(), MTRR_TYPE_UNCACHABLE, MTRR_TYPE_WRCOMB, and rdmsr. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
Definition at line 700 of file mtrr.c. References __asm__(), high(), rdmsr, set_mtrr_done(), set_mtrr_prepare(), u32, and wrmsr. Here is the call graph for this function: ![]() |
|
|
Definition at line 1018 of file mtrr.c. Referenced by mtrr_add(). |
|
||||||||||||||||||||
|
Definition at line 613 of file mtrr.c. References centaur_ctx, i, CENTAUR_MCR_CTX::mcr, MTRR_NUM_TYPES, CENTAUR_MCR_CTX::type_bits, and u32. |
|
||||||||||||||||||||||||
|
Definition at line 744 of file mtrr.c. References centaur_ctx, high(), CENTAUR_MCR_CTX::mcr, set_mtrr_done(), set_mtrr_prepare(), CENTAUR_MCR_CTX::type_bits, and wrmsr. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 514 of file mtrr.c. References __cli, __restore_flags, __save_flags, CX86_ARR_BASE, CX86_CCR3, CX86_RCR_BASE, getCx86, MTRR_TYPE_UNCACHABLE, MTRR_TYPE_WRBACK, MTRR_TYPE_WRCOMB, MTRR_TYPE_WRTHROUGH, setCx86, shift, x0f, and x10. Referenced by __initfunc(), and cyrix_get_free_region(). |
|
||||||||||||
|
Definition at line 1066 of file mtrr.c. References cyrix_get_arr(), ENOSPC, and x40000. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
Definition at line 663 of file mtrr.c. References CX86_ARR_BASE, CX86_RCR_BASE, MTRR_TYPE_UNCACHABLE, MTRR_TYPE_WRCOMB, MTRR_TYPE_WRTHROUGH, set_mtrr_done(), set_mtrr_prepare(), and setCx86. Here is the call graph for this function: ![]() |
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 1046 of file mtrr.c. References ENOSPC, get_num_var_ranges(), and max. Here is the call graph for this function: ![]() |
|
|
Definition at line 428 of file mtrr.c. References boot_cpu_data, dummy, MTRRcap_MSR, rdmsr, cpuinfo_x86::x86, cpuinfo_x86::x86_vendor, X86_VENDOR_AMD, X86_VENDOR_CENTAUR, X86_VENDOR_CYRIX, X86_VENDOR_INTEL, and xff. Referenced by generic_get_free_region(), init_table(), mtrr_add(), and mtrr_del(). |
|
|
Definition at line 460 of file mtrr.c. References boot_cpu_data, dummy, MTRRcap_MSR, rdmsr, cpuinfo_x86::x86, cpuinfo_x86::x86_vendor, X86_VENDOR_AMD, X86_VENDOR_CENTAUR, X86_VENDOR_CYRIX, and X86_VENDOR_INTEL. Referenced by mtrr_add(). |
|
|
Definition at line 1023 of file mtrr.c. References compute_ascii, get_num_var_ranges(), kmalloc(), LINE_SIZE, max, NULL, printk, and usage_table. Referenced by __initfunc(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 484 of file mtrr.c. References dummy, MTRRphysBase_MSR, MTRRphysMask_MSR, rdmsr, and x800. |
|
||||||||||||||||||||||||
|
Definition at line 634 of file mtrr.c. References MTRRphysBase_MSR, MTRRphysMask_MSR, set_mtrr_done(), set_mtrr_prepare(), wrmsr, and x800. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 1098 of file mtrr.c. References attrib_to_str(), boot_cpu_data, centaur_ctx, compute_ascii, EINVAL, ENODEV, ENOSYS, get_num_var_ranges(), have_wrcomb(), last, max, MTRR_NUM_TYPES, MTRR_TYPE_UNCACHABLE, MTRR_TYPE_WRCOMB, printk, set_mtrr, spin_lock_reschedule, spin_unlock, CENTAUR_MCR_CTX::type_bits, usage_table, x100000, cpuinfo_x86::x86, cpuinfo_x86::x86_capability, X86_FEATURE_MTRR, cpuinfo_x86::x86_mask, cpuinfo_x86::x86_model, cpuinfo_x86::x86_vendor, X86_VENDOR_AMD, X86_VENDOR_CENTAUR, X86_VENDOR_CYRIX, X86_VENDOR_INTEL, and xfff. Referenced by __initfunc(), drm_addmap(), i2o_pci_install(), mga_init(), and r128_init(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 1237 of file mtrr.c. References boot_cpu_data, compute_ascii, EINVAL, ENODEV, get_num_var_ranges(), max, printk, set_mtrr, spin_lock_reschedule, spin_unlock, usage_table, cpuinfo_x86::x86_capability, and X86_FEATURE_MTRR. Referenced by gamma_takedown(), i2o_pci_dispose(), i2o_pci_install(), i810_takedown(), mga_cleanup(), mga_takedown(), r128_takedown(), and tdfx_takedown(). Here is the call graph for this function: ![]() |
|
|
Definition at line 379 of file mtrr.c. References __restore_flags, boot_cpu_data, set_mtrr_context::ccr3, set_mtrr_context::cr4val, CX86_CCR3, set_mtrr_context::deftype_hi, set_mtrr_context::deftype_lo, set_mtrr_context::flags, MTRRdefType_MSR, setCx86, tmp, wrmsr, cpuinfo_x86::x86, cpuinfo_x86::x86_capability, X86_FEATURE_PGE, cpuinfo_x86::x86_vendor, X86_VENDOR_AMD, X86_VENDOR_CENTAUR, X86_VENDOR_CYRIX, and X86_VENDOR_INTEL. Referenced by __initfunc(), amd_set_mtrr_up(), centaur_set_mcr_up(), cyrix_set_arr_up(), and intel_set_mtrr_up(). |
|
|
Definition at line 327 of file mtrr.c. References __cli, __save_flags, boot_cpu_data, set_mtrr_context::ccr3, set_mtrr_context::cr4val, CX86_CCR3, set_mtrr_context::deftype_hi, set_mtrr_context::deftype_lo, set_mtrr_context::flags, getCx86, MTRRdefType_MSR, rdmsr, setCx86, tmp, wrmsr, x0f, x10, cpuinfo_x86::x86, cpuinfo_x86::x86_capability, X86_FEATURE_PGE, cpuinfo_x86::x86_vendor, X86_VENDOR_AMD, X86_VENDOR_CENTAUR, X86_VENDOR_CYRIX, and X86_VENDOR_INTEL. Referenced by __initfunc(), amd_set_mtrr_up(), centaur_set_mcr_up(), cyrix_set_arr_up(), and intel_set_mtrr_up(). |
|
|
Referenced by centaur_get_mcr(), centaur_set_mcr_up(), and mtrr_add(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 307 of file mtrr.c. Referenced by init_table(), mtrr_add(), and mtrr_del(). |