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.

147 lines
3.5 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. ixfwhal.h
  5. Abstract:
  6. This header file defines the private Hardware Architecture Layer (HAL)
  7. Intel x86 specific interfaces, defines and structures.
  8. Author:
  9. Jeff Havens (jhavens) 20-Jun-91
  10. Revision History:
  11. --*/
  12. #ifndef _IXHALP_
  13. #define _IXHALP_
  14. //
  15. // The MAXIMUM_MAP_BUFFER_SIZE defines the maximum map buffers which the system
  16. // will allocate for devices which require phyically contigous buffers.
  17. //
  18. #define MAXIMUM_MAP_BUFFER_SIZE 0x1000000
  19. //
  20. // Define the initial buffer allocation size for a map buffers.
  21. //
  22. #define INITIAL_MAP_BUFFER_SIZE 0x20000
  23. //
  24. // Define the incremental buffer allocation for a map buffers.
  25. //
  26. #define INCREMENT_MAP_BUFFER_SIZE 0x10000
  27. //
  28. // Define the maximum number of map registers that can be requested at one time
  29. // if actual map registers are required for the transfer.
  30. //
  31. #define MAXIMUM_ISA_MAP_REGISTER 16
  32. //
  33. // Define the maximum physical address which can be handled by an Isa card.
  34. //
  35. #define MAXIMUM_PHYSICAL_ADDRESS 0x01000000
  36. //
  37. // Define adapter object structure.
  38. //
  39. typedef struct _ADAPTER_OBJECT {
  40. CSHORT Type;
  41. CSHORT Size;
  42. ULONG MapRegistersPerChannel;
  43. PVOID AdapterBaseVa;
  44. PVOID MapRegisterBase;
  45. ULONG NumberOfMapRegisters;
  46. UCHAR ChannelNumber;
  47. UCHAR AdapterNumber;
  48. UCHAR AdapterMode;
  49. UCHAR ExtendedModeFlags;
  50. USHORT DmaPortAddress;
  51. BOOLEAN NeedsMapRegisters;
  52. BOOLEAN IsaDevice;
  53. BOOLEAN MasterDevice;
  54. BOOLEAN Width16Bits;
  55. BOOLEAN AdapterInUse;
  56. PUCHAR PagePort;
  57. } ADAPTER_OBJECT;
  58. //
  59. // Define map register translation entry structure.
  60. //
  61. typedef struct _TRANSLATION_ENTRY {
  62. PVOID VirtualAddress;
  63. ULONG PhysicalAddress;
  64. ULONG Index;
  65. } TRANSLATION_ENTRY, *PTRANSLATION_ENTRY;
  66. //
  67. // Define External data structures.
  68. //
  69. //
  70. // Some devices require a phyicially contiguous data buffers for DMA transfers.
  71. // Map registers are used give the appearance that all data buffers are
  72. // contiguous. In order to pool all of the map registers a master
  73. // adapter object is used. This object is allocated and saved internal to this
  74. // file. It contains a bit map for allocation of the registers and a queue
  75. // for requests which are waiting for more map registers. This object is
  76. // allocated during the first request to allocate an adapter which requires
  77. // map registers.
  78. //
  79. // In this system, the map registers are translation entries which point to
  80. // map buffers. Map buffers are physically contiguous and have physical memory
  81. // addresses less than 0x01000000. All of the map registers are allocated
  82. // initialially; however, the map buffers are allocated base in the number of
  83. // adapters which are allocated.
  84. //
  85. // If the master adapter is NULL in the adapter object then device does not
  86. // require any map registers.
  87. //
  88. extern PADAPTER_OBJECT MasterAdapterObject;
  89. extern POBJECT_TYPE IoAdapterObjectType;
  90. extern BOOLEAN LessThan16Mb;
  91. //
  92. // Define function prototypes.
  93. //
  94. BOOLEAN
  95. HalpGrowMapBuffers(
  96. PADAPTER_OBJECT AdapterObject,
  97. ULONG Amount
  98. );
  99. PADAPTER_OBJECT
  100. IopAllocateAdapter(
  101. IN ULONG MapRegistersPerChannel,
  102. IN PVOID AdapterBaseVa,
  103. IN PVOID MapRegisterBase
  104. );
  105. VOID
  106. HalpInitializeDisplay(
  107. IN PUSHORT VideoBufferAddress
  108. );
  109. #endif // _IXHALP_