The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/xen/xenhvm_mod.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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);

Cache object: 93c3390db9cd2bf9505a474841dc8c96


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.