aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/mtrr.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/mtrr.txt')
-rw-r--r--Documentation/mtrr.txt23
1 files changed, 21 insertions, 2 deletions
diff --git a/Documentation/mtrr.txt b/Documentation/mtrr.txt
index b78af1c32996..c39ac395970e 100644
--- a/Documentation/mtrr.txt
+++ b/Documentation/mtrr.txt
@@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioctl()'s:
138 138
139*/ 139*/
140#include <stdio.h> 140#include <stdio.h>
141#include <stdlib.h>
141#include <string.h> 142#include <string.h>
142#include <sys/types.h> 143#include <sys/types.h>
143#include <sys/stat.h> 144#include <sys/stat.h>
144#include <fcntl.h> 145#include <fcntl.h>
145#include <sys/ioctl.h> 146#include <sys/ioctl.h>
146#include <errno.h> 147#include <errno.h>
147#define MTRR_NEED_STRINGS
148#include <asm/mtrr.h> 148#include <asm/mtrr.h>
149 149
150#define TRUE 1 150#define TRUE 1
151#define FALSE 0 151#define FALSE 0
152#define ERRSTRING strerror (errno) 152#define ERRSTRING strerror (errno)
153 153
154static char *mtrr_strings[MTRR_NUM_TYPES] =
155{
156 "uncachable", /* 0 */
157 "write-combining", /* 1 */
158 "?", /* 2 */
159 "?", /* 3 */
160 "write-through", /* 4 */
161 "write-protect", /* 5 */
162 "write-back", /* 6 */
163};
154 164
155int main () 165int main ()
156{ 166{
@@ -232,13 +242,22 @@ Creating MTRRs from a C programme using ioctl()'s:
232#include <fcntl.h> 242#include <fcntl.h>
233#include <sys/ioctl.h> 243#include <sys/ioctl.h>
234#include <errno.h> 244#include <errno.h>
235#define MTRR_NEED_STRINGS
236#include <asm/mtrr.h> 245#include <asm/mtrr.h>
237 246
238#define TRUE 1 247#define TRUE 1
239#define FALSE 0 248#define FALSE 0
240#define ERRSTRING strerror (errno) 249#define ERRSTRING strerror (errno)
241 250
251static char *mtrr_strings[MTRR_NUM_TYPES] =
252{
253 "uncachable", /* 0 */
254 "write-combining", /* 1 */
255 "?", /* 2 */
256 "?", /* 3 */
257 "write-through", /* 4 */
258 "write-protect", /* 5 */
259 "write-back", /* 6 */
260};
242 261
243int main (int argc, char **argv) 262int main (int argc, char **argv)
244{ 263{