/* Generic MTRR (Memory Type Range Register) ioctls.
Copyright (C) 1997-1999 Richard Gooch
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Richard Gooch may be reached by email at rgooch@atnf.csiro.au The postal address is: Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
*/ #ifndef _ASM_X86_MTRR_H #define _ASM_X86_MTRR_H
/* * The following functions are for use by other drivers that cannot use * arch_phys_wc_add and arch_phys_wc_del.
*/ # ifdef CONFIG_MTRR void mtrr_bp_init(void); void guest_force_mtrr_state(struct mtrr_var_range *var, unsignedint num_var,
mtrr_type def_type); extern u8 mtrr_type_lookup(u64 addr, u64 end, u8 *uniform); externvoid mtrr_save_fixed_ranges(void *); externvoid mtrr_save_state(void); externint mtrr_add(unsignedlong base, unsignedlong size, unsignedint type, bool increment); externint mtrr_add_page(unsignedlong base, unsignedlong size, unsignedint type, bool increment); externint mtrr_del(int reg, unsignedlong base, unsignedlong size); externint mtrr_del_page(int reg, unsignedlong base, unsignedlong size); externint mtrr_trim_uncached_memory(unsignedlong end_pfn); externint amd_special_default_mtrr(void); void mtrr_disable(void); void mtrr_enable(void); void mtrr_generic_set_state(void); # else staticinlinevoid guest_force_mtrr_state(struct mtrr_var_range *var, unsignedint num_var,
mtrr_type def_type)
{
}
staticinline u8 mtrr_type_lookup(u64 addr, u64 end, u8 *uniform)
{ /* * Return the default MTRR type, without any known other types in * that range.
*/
*uniform = 1;
return MTRR_TYPE_UNCACHABLE;
} #define mtrr_save_fixed_ranges(arg) do {} while (0) #define mtrr_save_state() do {} while (0) staticinlineint mtrr_add(unsignedlong base, unsignedlong size, unsignedint type, bool increment)
{ return -ENODEV;
} staticinlineint mtrr_add_page(unsignedlong base, unsignedlong size, unsignedint type, bool increment)
{ return -ENODEV;
} staticinlineint mtrr_del(int reg, unsignedlong base, unsignedlong size)
{ return -ENODEV;
} staticinlineint mtrr_del_page(int reg, unsignedlong base, unsignedlong size)
{ return -ENODEV;
} staticinlineint mtrr_trim_uncached_memory(unsignedlong end_pfn)
{ return 0;
} #define mtrr_bp_init() do {} while (0) #define mtrr_disable() do {} while (0) #define mtrr_enable() do {} while (0) #define mtrr_generic_set_state() do {} while (0) # endif
#ifdef CONFIG_COMPAT #include <linux/compat.h>
struct mtrr_sentry32 {
compat_ulong_t base; /* Base address */
compat_uint_t size; /* Size of region */
compat_uint_t type; /* Type of region */
};
struct mtrr_gentry32 {
compat_ulong_t regnum; /* Register number */
compat_uint_t base; /* Base address */
compat_uint_t size; /* Size of region */
compat_uint_t type; /* Type of region */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.