Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.7 KiB

  1. //***************************************************************************
  2. //
  3. // Module Name:
  4. //
  5. // interupt.h
  6. //
  7. // Abstract:
  8. //
  9. // This module contains the definitions for the shared memory used by
  10. // the interrupt control routines.
  11. //
  12. // Environment:
  13. //
  14. // Kernel mode
  15. //
  16. //
  17. // Copyright (c) 1994-1998 3Dlabs Inc. Ltd. All rights reserved.
  18. // Copyright (c) 1995-1999 Microsoft Corporation. All Rights Reserved.
  19. //
  20. //***************************************************************************
  21. // interrupt status bits
  22. typedef enum {
  23. DMA_INTERRUPT_AVAILABLE = 0x01, // can use DMA interrupts
  24. VBLANK_INTERRUPT_AVAILABLE = 0x02, // can use VBLANK interrupts
  25. } INTERRUPT_CONTROL;
  26. //
  27. // The display driver will only use the interrupt handler
  28. // if we set this magic number. Increment it if the
  29. // data structure changes
  30. //
  31. #define P2_ICB_MAGICNUMBER 0xbadabe01
  32. //
  33. // This data structure is shared between the Permedia 2 Display
  34. // Driver and the miniport
  35. //
  36. // Do not change the data structures without updating the DD
  37. //
  38. typedef struct INTERRUPT_CONTROL_BLOCK {
  39. ULONG ulMagicNo; // The dd will search for
  40. // this magic number and only
  41. // use the interupt handler
  42. // if the magic no is the same
  43. // as in the display driver
  44. volatile ULONG ulControl; // flags mark DMA/VS IRQs
  45. volatile ULONG ulIRQCounter; // counter for total number of IRQs
  46. LARGE_INTEGER liDMAPhysAddress; // physical address of DMA Buffer
  47. ULONG * pDMABufferStart; // virtual address of DMA buffer
  48. ULONG * pDMABufferEnd; // full size in DWORDs of DMA Buffer
  49. volatile ULONG *pDMAActualBufferEnd;
  50. // size in DWORDs of DMA Buffer
  51. volatile ULONG *pDMAWriteEnd; // end of buffer
  52. volatile ULONG *pDMAPrevStart; // last start address of a DMA
  53. volatile ULONG *pDMANextStart; // next start address of a DMA
  54. volatile ULONG *pDMAWritePos; // current write Index pointer
  55. volatile ULONG ulICBLock; // this lock is set by the display driver
  56. volatile ULONG ulVSIRQCounter; // counter for VS IRQs
  57. volatile ULONG ulLastErrorFlags;
  58. volatile ULONG ulErrorCounter;
  59. } INTERRUPT_CONTROL_BLOCK, *PINTERRUPT_CONTROL_BLOCK;
  60. //
  61. // structure containing information about the interrupt control block
  62. //
  63. typedef struct _interrupt_control_buffer_ {
  64. PVOID ControlBlock;
  65. ULONG Size;
  66. } P2_INTERRUPT_CTRLBUF, *PP2_INTERRUPT_CTRLBUF;