xref: /netbsd/lib/libarch/x86_64/x86_64_mtrr.c (revision c4a72b64)
1 /*	$NetBSD: x86_64_mtrr.c,v 1.1 2002/06/18 08:29:36 fvdl Exp $	*/
2 
3 #include <sys/cdefs.h>
4 #include <sys/types.h>
5 
6 #include <machine/sysarch.h>
7 
8 int
9 x86_64_get_mtrr(struct mtrr *mtrrp, int *n)
10 {
11 	struct x86_64_get_mtrr_args a;
12 
13 	a.mtrrp = mtrrp;
14 	a.n = n;
15 	return sysarch(X86_64_GET_MTRR, (void *)&a);
16 }
17 
18 int
19 x86_64_set_mtrr(struct mtrr *mtrrp, int *n)
20 {
21 	struct x86_64_set_mtrr_args a;
22 
23 	a.mtrrp = mtrrp;
24 	a.n = n;
25 	return sysarch(X86_64_SET_MTRR, (void *)&a);
26 }
27