]> CyberLeo.Net >> Repos - FreeBSD/releng/9.3.git/blob - sys/xen/xenhvm_mod.c
Fix typo: s/ata/ichsmb/
[FreeBSD/releng/9.3.git] / sys / xen / xenhvm_mod.c
1 #include <sys/cdefs.h>
2 __FBSDID("$FreeBSD$");
3
4 #include <sys/param.h>
5 #include <sys/kernel.h>
6 #include <sys/module.h>
7 #include <sys/systm.h>
8
9 static int
10 xenhvm_modevent(module_t mod, int type, void *arg)
11 {
12
13         switch (type) {
14         case MOD_LOAD:
15                 if (inw(0x10) == 0x49d2) {
16                         if (bootverbose)
17                                 printf("Xen detected: disabling emulated block and network devices\n");
18                         outw(0x10, 3);
19                 }
20                 return (0);
21         }
22
23         return (EOPNOTSUPP);
24 }
25
26 static moduledata_t xenhvm_mod = {
27         "xenhvm",
28         xenhvm_modevent,
29         0
30 };
31
32 DECLARE_MODULE(xenhvm, xenhvm_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);