1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
$NetBSD: patch-aa,v 1.1.1.1 2003/08/13 05:23:00 mrg Exp $
--- atitvout.c.orig 2002-09-17 05:37:08.000000000 +1000
+++ atitvout.c 2003-08-13 14:58:15.000000000 +1000
@@ -17,7 +17,13 @@
*/
#include <stdio.h>
+#ifdef __linux__
#include <sys/io.h>
+#endif
+#ifdef __NetBSD__
+#include <sys/types.h>
+#include <machine/sysarch.h>
+#endif
#include <string.h>
#include <assert.h>
@@ -98,8 +104,21 @@
return 0;
}
+#ifdef __linux__
ioperm(0, 1024, 1);
iopl(3);
+#endif
+#ifdef __NetBSD__
+ {
+#define FF 0xFFFFFFFF
+#define FF8 FF, FF, FF, FF, FF, FF, FF, FF
+ u_long map[] = { FF8, FF8, FF8, FF8 };
+#undef FF
+#undef FF8
+ i386_set_ioperm(map);
+ }
+ i386_iopl(3);
+#endif
if (!LRMI_init()) {
fprintf(stderr, "Could not initialise LRMI.\n");
|