Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/asm
File: mtrr.h
/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/* Generic MTRR (Memory Type Range Register) ioctls.
[1] Fix | Delete
[2] Fix | Delete
Copyright (C) 1997-1999 Richard Gooch
[3] Fix | Delete
[4] Fix | Delete
This library is free software; you can redistribute it and/or
[5] Fix | Delete
modify it under the terms of the GNU Library General Public
[6] Fix | Delete
License as published by the Free Software Foundation; either
[7] Fix | Delete
version 2 of the License, or (at your option) any later version.
[8] Fix | Delete
[9] Fix | Delete
This library is distributed in the hope that it will be useful,
[10] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[11] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[12] Fix | Delete
Library General Public License for more details.
[13] Fix | Delete
[14] Fix | Delete
You should have received a copy of the GNU Library General Public
[15] Fix | Delete
License along with this library; if not, write to the Free
[16] Fix | Delete
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
[17] Fix | Delete
[18] Fix | Delete
Richard Gooch may be reached by email at rgooch@atnf.csiro.au
[19] Fix | Delete
The postal address is:
[20] Fix | Delete
Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
[21] Fix | Delete
*/
[22] Fix | Delete
#ifndef _ASM_X86_MTRR_H
[23] Fix | Delete
#define _ASM_X86_MTRR_H
[24] Fix | Delete
[25] Fix | Delete
#include <linux/types.h>
[26] Fix | Delete
#include <linux/ioctl.h>
[27] Fix | Delete
#include <linux/errno.h>
[28] Fix | Delete
[29] Fix | Delete
#define MTRR_IOCTL_BASE 'M'
[30] Fix | Delete
[31] Fix | Delete
/* Warning: this structure has a different order from i386
[32] Fix | Delete
on x86-64. The 32bit emulation code takes care of that.
[33] Fix | Delete
But you need to use this for 64bit, otherwise your X server
[34] Fix | Delete
will break. */
[35] Fix | Delete
[36] Fix | Delete
#ifdef __i386__
[37] Fix | Delete
struct mtrr_sentry {
[38] Fix | Delete
unsigned long base; /* Base address */
[39] Fix | Delete
unsigned int size; /* Size of region */
[40] Fix | Delete
unsigned int type; /* Type of region */
[41] Fix | Delete
};
[42] Fix | Delete
[43] Fix | Delete
struct mtrr_gentry {
[44] Fix | Delete
unsigned int regnum; /* Register number */
[45] Fix | Delete
unsigned long base; /* Base address */
[46] Fix | Delete
unsigned int size; /* Size of region */
[47] Fix | Delete
unsigned int type; /* Type of region */
[48] Fix | Delete
};
[49] Fix | Delete
[50] Fix | Delete
#else /* __i386__ */
[51] Fix | Delete
[52] Fix | Delete
struct mtrr_sentry {
[53] Fix | Delete
__u64 base; /* Base address */
[54] Fix | Delete
__u32 size; /* Size of region */
[55] Fix | Delete
__u32 type; /* Type of region */
[56] Fix | Delete
};
[57] Fix | Delete
[58] Fix | Delete
struct mtrr_gentry {
[59] Fix | Delete
__u64 base; /* Base address */
[60] Fix | Delete
__u32 size; /* Size of region */
[61] Fix | Delete
__u32 regnum; /* Register number */
[62] Fix | Delete
__u32 type; /* Type of region */
[63] Fix | Delete
__u32 _pad; /* Unused */
[64] Fix | Delete
};
[65] Fix | Delete
[66] Fix | Delete
#endif /* !__i386__ */
[67] Fix | Delete
[68] Fix | Delete
struct mtrr_var_range {
[69] Fix | Delete
__u32 base_lo;
[70] Fix | Delete
__u32 base_hi;
[71] Fix | Delete
__u32 mask_lo;
[72] Fix | Delete
__u32 mask_hi;
[73] Fix | Delete
};
[74] Fix | Delete
[75] Fix | Delete
/* In the Intel processor's MTRR interface, the MTRR type is always held in
[76] Fix | Delete
an 8 bit field: */
[77] Fix | Delete
typedef __u8 mtrr_type;
[78] Fix | Delete
[79] Fix | Delete
#define MTRR_NUM_FIXED_RANGES 88
[80] Fix | Delete
#define MTRR_MAX_VAR_RANGES 256
[81] Fix | Delete
[82] Fix | Delete
struct mtrr_state_type {
[83] Fix | Delete
struct mtrr_var_range var_ranges[MTRR_MAX_VAR_RANGES];
[84] Fix | Delete
mtrr_type fixed_ranges[MTRR_NUM_FIXED_RANGES];
[85] Fix | Delete
unsigned char enabled;
[86] Fix | Delete
unsigned char have_fixed;
[87] Fix | Delete
mtrr_type def_type;
[88] Fix | Delete
};
[89] Fix | Delete
[90] Fix | Delete
#define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
[91] Fix | Delete
#define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)
[92] Fix | Delete
[93] Fix | Delete
/* These are the various ioctls */
[94] Fix | Delete
#define MTRRIOC_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry)
[95] Fix | Delete
#define MTRRIOC_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry)
[96] Fix | Delete
#define MTRRIOC_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry)
[97] Fix | Delete
#define MTRRIOC_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry)
[98] Fix | Delete
#define MTRRIOC_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry)
[99] Fix | Delete
#define MTRRIOC_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry)
[100] Fix | Delete
#define MTRRIOC_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry)
[101] Fix | Delete
#define MTRRIOC_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry)
[102] Fix | Delete
#define MTRRIOC_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry)
[103] Fix | Delete
#define MTRRIOC_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry)
[104] Fix | Delete
[105] Fix | Delete
/* MTRR memory types, which are defined in SDM */
[106] Fix | Delete
#define MTRR_TYPE_UNCACHABLE 0
[107] Fix | Delete
#define MTRR_TYPE_WRCOMB 1
[108] Fix | Delete
/*#define MTRR_TYPE_ 2*/
[109] Fix | Delete
/*#define MTRR_TYPE_ 3*/
[110] Fix | Delete
#define MTRR_TYPE_WRTHROUGH 4
[111] Fix | Delete
#define MTRR_TYPE_WRPROT 5
[112] Fix | Delete
#define MTRR_TYPE_WRBACK 6
[113] Fix | Delete
#define MTRR_NUM_TYPES 7
[114] Fix | Delete
[115] Fix | Delete
/*
[116] Fix | Delete
* Invalid MTRR memory type. mtrr_type_lookup() returns this value when
[117] Fix | Delete
* MTRRs are disabled. Note, this value is allocated from the reserved
[118] Fix | Delete
* values (0x7-0xff) of the MTRR memory types.
[119] Fix | Delete
*/
[120] Fix | Delete
#define MTRR_TYPE_INVALID 0xff
[121] Fix | Delete
[122] Fix | Delete
#endif /* _ASM_X86_MTRR_H */
[123] Fix | Delete
[124] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function