Source code of Windows XP (NT5)
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.

193 lines
5.8 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1993 ACER America Corporation
  3. Module Name:
  4. acer.h
  5. Abstract:
  6. This header file defines the unique interfaces, defines and structures
  7. for the ACER product line
  8. Revision History:
  9. 1.0b - plm initial release
  10. 1.1b - acer.c: halpacereisa: handle scrabled eisa data gracefully.
  11. --*/
  12. #define ACER_HAL_VERSION_NUMBER "Acer HAL Version 1.1b for October Windows NT Beta.\n"
  13. /* ACER Special I/O Port defintions
  14. * I/O Port Address 0xcc4h
  15. * |
  16. * 0: cpu0 & cpu1
  17. * c: cpu2 & cpu3
  18. *
  19. * bits < 7 6 5 4 3 2 1 0 > (WRITE-ONLY)
  20. * 0 0 | 0 0 | 0 |
  21. * | | BIOS Shadow Control
  22. * | | 0: ROM BIOS
  23. * | | 1: RAM BIOS
  24. * | |
  25. * | |
  26. * | Write-Back Cache Control
  27. * | 0: write-thru ( write-back disabled)
  28. * | 1: write-back enabled
  29. * |
  30. * 15Mb to 16Mb Memory Setup
  31. * 0: Ram
  32. * 1: EISA
  33. *
  34. */
  35. // where do i find the CSR which controls the write-back enabling?
  36. #define ACER_PORT_CPU01 0xcc4 // write only - setup reg. cpu 0,1
  37. #define ACER_PORT_CPU23 0xccc4 // write onlY - setup reg. cpu 2,3
  38. #define WRITE_BALLOC_ON 0x04 // bit<2> - enable write-back cache bit
  39. #define WRITE_BALLOC_OFF 0x00 // bit<2> - disable write-back cache bit
  40. /* ACER RT/CMOS contents
  41. *
  42. * index 35h bit<1>: 15Mb to 16Mb Memory Setup
  43. * 0: EISA
  44. * 1: Ram
  45. * all other bits RESERVED
  46. *
  47. * index 39h bit<0>: BIOS Shadow Control
  48. * 0: ROM BIOS
  49. * 1: RAM BIOS
  50. * all other bits RESERVED
  51. *
  52. */
  53. // RT/CMOS indexes where special Acer machine config info is kept
  54. // where is the information kept that tells me if bios shadowing is eabled?
  55. #define ACER_SHADOW_IDX 0x39 // RT/CMOS index for shadow bios control
  56. #define RAM_ROM_MASK 0x01 // bit<0>, 0:RAM BIOS 1:ROM BIOS
  57. // where is the information kept that tells me if 15M-16M is EISA or RAM?
  58. #define ACER_15M_16M_IDX 0x35 // RT/CMOS index for 15Mb-16Mb mem cntrl
  59. #define DRAM_EISA_MASK 0x02 // bit<1>, 0:EISA 1:RAM
  60. // EISA ID base addresses for cpu0
  61. #define ACER_CPU0_EISA_ID0 0x0c80 /* 1 digit + part of digit 2 */
  62. #define ACER_CPU0_EISA_ID1 0x0c81 /* rest of digit 2 + digit 3 */
  63. #define ACER_CPU0_EISA_ID2 0x0c82 /* msw id */
  64. #define ACER_CPU0_EISA_ID3 0x0c83 /* msw id */
  65. // ACER EISA ID's
  66. #define ACER_ID0 0x04 /* acr32xx */
  67. #define ACER_ID1 0x72
  68. #define ACER_ID2 0x32
  69. // ALTOS EISA ID's
  70. #define ALTOS_ID0 0x04 /* acs32xx */
  71. #define ALTOS_ID1 0x73
  72. #define ALTOS_ID2 0x32
  73. // ICL EISA ID's
  74. #define ICL_ID0 0x24 /* icl00xx */
  75. #define ICL_ID1 0x6c
  76. #define ICL_ID2 0x00
  77. // EISA IDs of ACER/ALTOS machines which support a write-back secondary cache
  78. #define ACER_EISA_ID_WB_CPU0 0x61
  79. // EISA IDs of ICL machine (acer oem) which supports write-back scndry cache
  80. // NOTE: THESE IDS ARE STILL TBD!!!
  81. #define ICL_EISA_ID_WB_CPU0 0x61
  82. // EISA constants
  83. #define MAX_IRQS_PER_EISABUS 16 // how many irq to search for
  84. #define MAX_EISA_SLOTS 16 // number of eisa slots
  85. // magic number for kefindconfigurationentry
  86. //#define EISA_DATA_OFFSET 24 // offset to data portion of eisa pointer
  87. // cpu0's i/o address space for cpu1's pic's
  88. //
  89. // NOTE: These defines MUST MATCH EXACTLY the equ's found in spirql.asm
  90. //
  91. #define CPU1_PIC1_PORT0 0xc024
  92. #define CPU1_PIC1_PORT1 0xc0a4
  93. #define CPU1_PIC2_PORT0 0xc025
  94. #define CPU1_PIC2_PORT1 0xc0a5
  95. #define CPU0_PIC1_PORT0 0x020
  96. #define CPU0_PIC1_PORT1 0x0a0
  97. // cpu0's eisa level/edge register
  98. #define EISA_LEVEL_EDGE_PIC1 0x04d0
  99. #define EISA_LEVEL_EDGE_PIC2 0x04d1
  100. #define SET_TO_EDGE ((UCHAR) 0x0000)
  101. #define SET_TO_LEVEL ((UCHAR) -1)
  102. // eisa level/edge register bit which MUST BE edges
  103. #define EISA_LEVEL_EDGE_PIC1_INIT 0xb8
  104. #define EISA_LEVEL_EDGE_PIC2_INIT 0xde
  105. // eisa 8259
  106. #define READ_IRR 0x0a
  107. #define READ_ISR 0x0b
  108. // a safe eisa i/o location that can be read to force any caches
  109. // to flush any pending i/o writes. This just happens to be
  110. // the eisa manufacturer i.d. location
  111. #define EISA_FLUSH_ADDR 0x0c80
  112. // This define MUST EXACTLY MATCH asm equ located in file spmp.inc
  113. #define SMP_ACER 3
  114. #define MAX_ACER_CPUS 4 // maximum number of cpus a acer can hold
  115. //
  116. // acer_irq_distribution callback data structure
  117. //
  118. typedef struct _ACER_IRQ_DISTRIBUTION {
  119. BOOLEAN distribte_irqs; // shall i try to distribute irqs across cpus
  120. // cpu x pics can handle level irqs?
  121. BOOLEAN px_set_to_level_irqs[ MAX_ACER_CPUS ];
  122. // number of irqs which have been assigned, used for load balancing
  123. SHORT px_numb_irqs_assigned[ MAX_ACER_CPUS ];
  124. // only a certain number of irqs per pic pair can handle level triggerring
  125. BOOLEAN eisa_level_compatable[ MAX_IRQS_PER_EISABUS ];
  126. } ACER_IRQ_DISTRIBUTION, *PACER_IRQ_DISTRIBUTION;
  127. // default number of irq's assinged
  128. #define ACER_IRQS_ASSIGED_CPU0 1 // stay away from 0 for init case
  129. #define ACER_IRQS_ASSIGED_CPU1 0
  130. #define ACER_IRQS_ASSIGED_CPU2 0
  131. #define ACER_IRQS_ASSIGED_CPU3 0
  132. // what irqs can be level distriubted?
  133. #define ACER_DISTRIBUTE_LEVEL_IRQ0 FALSE
  134. #define ACER_DISTRIBUTE_LEVEL_IRQ1 FALSE
  135. #define ACER_DISTRIBUTE_LEVEL_IRQ2 FALSE
  136. #define ACER_DISTRIBUTE_LEVEL_IRQ3 TRUE
  137. #define ACER_DISTRIBUTE_LEVEL_IRQ4 TRUE
  138. #define ACER_DISTRIBUTE_LEVEL_IRQ5 TRUE
  139. #define ACER_DISTRIBUTE_LEVEL_IRQ6 FALSE
  140. #define ACER_DISTRIBUTE_LEVEL_IRQ7 TRUE
  141. #define ACER_DISTRIBUTE_LEVEL_IRQ8 FALSE
  142. #define ACER_DISTRIBUTE_LEVEL_IRQ9 TRUE
  143. #define ACER_DISTRIBUTE_LEVEL_IRQ10 TRUE
  144. #define ACER_DISTRIBUTE_LEVEL_IRQ11 TRUE
  145. #define ACER_DISTRIBUTE_LEVEL_IRQ12 TRUE
  146. #define ACER_DISTRIBUTE_LEVEL_IRQ13 FALSE
  147. #define ACER_DISTRIBUTE_LEVEL_IRQ14 TRUE
  148. #define ACER_DISTRIBUTE_LEVEL_IRQ15 TRUE