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.

95 lines
3.6 KiB

  1. //
  2. // LOCAL PERIPHERAL BUS REGISTERS
  3. //
  4. // These values are used as offsets to the memory mapped IO base stored in
  5. // the HW device extension.
  6. //
  7. #define LPB_MODE_MM 0x0FF00 // LPB mode
  8. #define SERIAL_PORT_MM 0x0FF20 // Serial Communications Port
  9. #define UNLOCK_SEQREG 0x08 // Unlock Extended Sequencer
  10. #define UNLOCK_SEQ 0x06 // unlock accessing to all S3 extensions to
  11. // the standard VGA sequencer register set
  12. #define SR9_SEQREG 0x09 // Extended Sequencer 9 register
  13. #define SRA_SEQREG 0x0A // Extended Sequencer A register
  14. #define SRD_SEQREG 0x0D // Extended Sequencer D register
  15. #define LPB_ENAB_BIT 0x01 // bit 0 of SRD is LPB enable (pin control)
  16. // on some chips (M65).
  17. #define DISAB_FEATURE_BITS 0xFC // AND mask to turn off LPB/Feature Connector
  18. // on ViRGE (NOT ViRGE GX).
  19. #define SYS_CONFIG_S3EXTREG 0x40 // System Configuration
  20. //
  21. // Bit masks for System Configuration register (CR40)
  22. //
  23. #define ENABLE_ENH_REG_ACCESS 0x01 // bit 0 set = enhanced reg access enabled
  24. #define EXT_MEM_CTRL1_S3EXTREG 0x53 // Extended Memory Control 1
  25. //
  26. // Bit masks for the Extended Memory Control 1 register (CR53)
  27. //
  28. #define ENABLE_OLDMMIO 0x10 // bit 4 set = enable Trio64-type MMIO
  29. #define ENABLE_NEWMMIO 0x08 // bit 3 set = New MMIO (relocatable) enabled
  30. #define GENERAL_OUT_S3EXTREG 0x5C // General Out Port
  31. #define EXT_DAC_S3EXTREG 0x55 // Extended DAC Control
  32. #define ENABLE_GEN_INPORT_READ 0x04 // On the 764, CR55 bit 2 set enables
  33. // General Input Port read
  34. //
  35. // defines for return information for CheckDDCType & Configure_Chip_DDC_Caps
  36. //
  37. #define NO_DDC 0
  38. #define DDC1 1
  39. #define DDC2 2
  40. //
  41. // Bit mask for Backward Compatibility Register 2 (CR33, BWD_COMPAT2_S3EXTREG)
  42. //
  43. #define DISPLAY_MODE_INACTIVE 0x01 // bit 1 set = controller is not in
  44. // active display area. (M3, M5, GX2)
  45. #define VSYNC_ACTIVE_BIT 0x04 // bit 2 set = controller is in vertical
  46. // retrace area (M3, M5, GX2). Paired
  47. // with 3?Ah bit 3 for IGA1.
  48. //
  49. // Bit masks for SYSTEM_CONTROL_REGISTER (3?A)
  50. //
  51. #define VSSL_BIT 0x08 // Bit 3 of Feature Control Register (3?A,
  52. // write-only 3CA) is Vertical Sync Type Select
  53. #define VSYNC_ACTIVE 0x08 // Bit 3 of Input Status 1 Register (3CA in
  54. // read-only) is Vertical Sync Active. If set,
  55. // then display is in the vertical retrace mode;
  56. // if clear, then display is in display mode.
  57. #define CLEAR_VSYNC 0x3F // AND mask to clear VSYNC Control bits
  58. // (setting normal operation).
  59. #define SET_VSYNC0 0x40 // OR mask to set VSYNC Control to VSYNC = 0
  60. #define SET_VSYNC1 0x80 // OR mask to set VSYNC Control to VSYNC = 1
  61. #define CLK_MODE_SEQREG 0x01 // Clocking Mode Register
  62. //
  63. // Bit mask for Clocking Mode Register (SR1)
  64. //
  65. #define SCREEN_OFF_BIT 0x20 // bit 5 set turns the screen off.
  66. #define SEL_POS_VSYNC 0x7F // AND mask to clear bit 7 of 3C2, selecting
  67. // positive vertical retrace sync pulse
  68. //
  69. // Macro to access the serial port
  70. //
  71. #define MMFF20 (PVOID) ((ULONG_PTR)(HwDeviceExtension->MmIoBase) + SERIAL_PORT_MM)