win-pvdrivers

changeset 304:5a7bfc1827a7

yup, all that stuff needed to be there. revert my changes.
author Andy Grover <andy.grover@oracle.com>
date Tue Jun 10 21:09:56 2008 -0700 (2008-06-10)
parents 47ec69c1046c
children f3c839dbc58f 6b85686a16c0
files xenpci/xenpci.h
line diff
     1.1 --- a/xenpci/xenpci.h	Tue Jun 10 20:18:05 2008 -0700
     1.2 +++ b/xenpci/xenpci.h	Tue Jun 10 21:09:56 2008 -0700
     1.3 @@ -248,29 +248,52 @@ typedef struct
     1.4    PXENPCI_PDO_DEVICE_DATA context;
     1.5  } XEN_CHILD, *PXEN_CHILD;
     1.6  
     1.7 +#define SWINT(x) case x: __asm { int x } break;
     1.8 +
     1.9  #if defined(_X86_)
    1.10  static __inline VOID
    1.11  sw_interrupt(UCHAR intno)
    1.12  {
    1.13    //KdPrint((__DRIVER_NAME "     Calling interrupt %02X\n", intno));
    1.14 -  if (intno >= 0x10)
    1.15 +  switch (intno)
    1.16    {
    1.17 -#ifdef __GNUC__
    1.18 -    /* TODO this gcc asm is wrong, need to use gcc asm extended template :( */
    1.19 -    __asm__("int $intno");
    1.20 -#elif defined (_MSC_VER)
    1.21 -    /* James, would this work? */
    1.22 -    __asm {int intno}
    1.23 -#else
    1.24 -  #error unknown compiler, what inline asm format to use?
    1.25 -#endif
    1.26 -  }
    1.27 -  else
    1.28 -  {
    1.29 +  SWINT(0x10) SWINT(0x11) SWINT(0x12) SWINT(0x13) SWINT(0x14) SWINT(0x15) SWINT(0x16) SWINT(0x17)
    1.30 +  SWINT(0x18) SWINT(0x19) SWINT(0x1A) SWINT(0x1B) SWINT(0x1C) SWINT(0x1D) SWINT(0x1E) SWINT(0x1F)
    1.31 +  SWINT(0x20) SWINT(0x21) SWINT(0x22) SWINT(0x23) SWINT(0x24) SWINT(0x25) SWINT(0x26) SWINT(0x27)
    1.32 +  SWINT(0x28) SWINT(0x29) SWINT(0x2A) SWINT(0x2B) SWINT(0x2C) SWINT(0x2D) SWINT(0x2E) SWINT(0x2F)
    1.33 +  SWINT(0x30) SWINT(0x31) SWINT(0x32) SWINT(0x33) SWINT(0x34) SWINT(0x35) SWINT(0x36) SWINT(0x37)
    1.34 +  SWINT(0x38) SWINT(0x39) SWINT(0x3A) SWINT(0x3B) SWINT(0x3C) SWINT(0x3D) SWINT(0x3E) SWINT(0x3F)
    1.35 +  SWINT(0x40) SWINT(0x41) SWINT(0x42) SWINT(0x43) SWINT(0x44) SWINT(0x45) SWINT(0x46) SWINT(0x47)
    1.36 +  SWINT(0x48) SWINT(0x49) SWINT(0x4A) SWINT(0x4B) SWINT(0x4C) SWINT(0x4D) SWINT(0x4E) SWINT(0x4F)
    1.37 +  SWINT(0x50) SWINT(0x51) SWINT(0x52) SWINT(0x53) SWINT(0x54) SWINT(0x55) SWINT(0x56) SWINT(0x57)
    1.38 +  SWINT(0x58) SWINT(0x59) SWINT(0x5A) SWINT(0x5B) SWINT(0x5C) SWINT(0x5D) SWINT(0x5E) SWINT(0x5F)
    1.39 +  SWINT(0x60) SWINT(0x61) SWINT(0x62) SWINT(0x63) SWINT(0x64) SWINT(0x65) SWINT(0x66) SWINT(0x67)
    1.40 +  SWINT(0x68) SWINT(0x69) SWINT(0x6A) SWINT(0x6B) SWINT(0x6C) SWINT(0x6D) SWINT(0x6E) SWINT(0x6F)
    1.41 +  SWINT(0x70) SWINT(0x71) SWINT(0x72) SWINT(0x73) SWINT(0x74) SWINT(0x75) SWINT(0x76) SWINT(0x77)
    1.42 +  SWINT(0x78) SWINT(0x79) SWINT(0x7A) SWINT(0x7B) SWINT(0x7C) SWINT(0x7D) SWINT(0x7E) SWINT(0x7F)
    1.43 +  SWINT(0x80) SWINT(0x81) SWINT(0x82) SWINT(0x83) SWINT(0x84) SWINT(0x85) SWINT(0x86) SWINT(0x87)
    1.44 +  SWINT(0x88) SWINT(0x89) SWINT(0x8A) SWINT(0x8B) SWINT(0x8C) SWINT(0x8D) SWINT(0x8E) SWINT(0x8F)
    1.45 +  SWINT(0x90) SWINT(0x91) SWINT(0x92) SWINT(0x93) SWINT(0x94) SWINT(0x95) SWINT(0x96) SWINT(0x97)
    1.46 +  SWINT(0x98) SWINT(0x99) SWINT(0x9A) SWINT(0x9B) SWINT(0x9C) SWINT(0x9D) SWINT(0x9E) SWINT(0x9F)
    1.47 +  SWINT(0xA0) SWINT(0xA1) SWINT(0xA2) SWINT(0xA3) SWINT(0xA4) SWINT(0xA5) SWINT(0xA6) SWINT(0xA7)
    1.48 +  SWINT(0xA8) SWINT(0xA9) SWINT(0xAA) SWINT(0xAB) SWINT(0xAC) SWINT(0xAD) SWINT(0xAE) SWINT(0xAF)
    1.49 +  SWINT(0xB0) SWINT(0xB1) SWINT(0xB2) SWINT(0xB3) SWINT(0xB4) SWINT(0xB5) SWINT(0xB6) SWINT(0xB7)
    1.50 +  SWINT(0xB8) SWINT(0xB9) SWINT(0xBA) SWINT(0xBB) SWINT(0xBC) SWINT(0xBD) SWINT(0xBE) SWINT(0xBF)
    1.51 +  SWINT(0xC0) SWINT(0xC1) SWINT(0xC2) SWINT(0xC3) SWINT(0xC4) SWINT(0xC5) SWINT(0xC6) SWINT(0xC7)
    1.52 +  SWINT(0xC8) SWINT(0xC9) SWINT(0xCA) SWINT(0xCB) SWINT(0xCC) SWINT(0xCD) SWINT(0xCE) SWINT(0xCF)
    1.53 +  SWINT(0xD0) SWINT(0xD1) SWINT(0xD2) SWINT(0xD3) SWINT(0xD4) SWINT(0xD5) SWINT(0xD6) SWINT(0xD7)
    1.54 +  SWINT(0xD8) SWINT(0xD9) SWINT(0xDA) SWINT(0xDB) SWINT(0xDC) SWINT(0xDD) SWINT(0xDE) SWINT(0xDF)
    1.55 +  SWINT(0xE0) SWINT(0xE1) SWINT(0xE2) SWINT(0xE3) SWINT(0xE4) SWINT(0xE5) SWINT(0xE6) SWINT(0xE7)
    1.56 +  SWINT(0xE8) SWINT(0xE9) SWINT(0xEA) SWINT(0xEB) SWINT(0xEC) SWINT(0xED) SWINT(0xEE) SWINT(0xEF)
    1.57 +  SWINT(0xF0) SWINT(0xF1) SWINT(0xF2) SWINT(0xF3) SWINT(0xF4) SWINT(0xF5) SWINT(0xF6) SWINT(0xF7)
    1.58 +  SWINT(0xF8) SWINT(0xF9) SWINT(0xFA) SWINT(0xFB) SWINT(0xFC) SWINT(0xFD) SWINT(0xFE) SWINT(0xFF)
    1.59 +
    1.60 +  default:
    1.61      KdPrint((__DRIVER_NAME "     interrupt %02X not set up. Blame James.\n", intno));
    1.62      KeBugCheckEx(('X' << 16)|('E' << 8)|('N'), 0x00000002, (ULONG)intno, 0x00000000, 0x00000000);
    1.63 +    break;
    1.64    }
    1.65 -}    
    1.66 +}
    1.67  #else
    1.68  VOID _sw_interrupt(UCHAR);
    1.69