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.

107 lines
3.7 KiB

  1. /*****************************************************************************
  2. *
  3. * (C) Copyright MICROSOFT Corp., 1994
  4. *
  5. * Title: BIOS.H - PnP BIOS Enumerator VxD
  6. *
  7. * Version: 4.00
  8. *
  9. * Date: 6-Feb-1994
  10. *
  11. * Author: MSq
  12. *
  13. *------------------------------------------------------------------------------
  14. *
  15. * Change log:
  16. *
  17. * DATE REV DESCRIPTION
  18. * ----------- --- -----------------------------------------------------------
  19. * 6-Feb-1994 MSq Original
  20. *****************************************************************************/
  21. /*XLATOFF*/
  22. #define BIOS_Service Declare_Service
  23. /*XLATON*/
  24. /*MACROS*/
  25. Begin_Service_Table(BIOS, VxD)
  26. BIOS_Service (_BIOSGetVersion, VxD_CODE)
  27. BIOS_Service (_BIOSSoftUndock, VxD_CODE)
  28. BIOS_Service (_BIOSGetCapabilities, VxD_CODE)
  29. BIOS_Service (_BIOSGetAPMTable, VxD_CODE)
  30. End_Service_Table(BIOS, VxD)
  31. /*ENDMACROS*/
  32. /*
  33. * One can add a VxD to fix a broken BIOS. This VxD must have
  34. * BIOS_EXT_DEVICE_ID as device ID and must export three services, in that
  35. * order:
  36. *
  37. * GetVersion: must return in eax 0x00000100 for this release and carry
  38. * clear (ie standard version code).
  39. *
  40. * GetHeader: must return in eax the linear address to an installation
  41. * structure, this need not be in BIOS space, but need to have the correct
  42. * values for building BIOS selectors. The structure will be used instead of
  43. * the one found by the scan. Also, the BIOS EXT VxD must use this time to
  44. * initialize. If initialization failed, the value 0 must be return.
  45. *
  46. * CallBIOS: will be called instead of calling the BIOS entry point. The
  47. * stack will be the exact same as if we were calling the BIOS except that
  48. * the return address is a 32-bit ret to BIOS.VxD. Also CS=DS=ES=SS=Flat
  49. * segment. Thus the BIOS_EXT VxD can pop the return address in a local
  50. * variable (this API will never be reentered) and do stack munging before
  51. * calling its internal function or call BIOS even. All registers except
  52. * eax, which is the return value, must be preserved. The high word of eax
  53. * is discarded by BIOS.VxD.
  54. */
  55. /*XLATOFF*/
  56. #define BIOS_EXT_Service Declare_Service
  57. /*XLATON*/
  58. /*MACROS*/
  59. Begin_Service_Table(BIOS_EXT, VxD)
  60. BIOS_EXT_Service (_BIOSEXTGetVersion, VxD_CODE)
  61. BIOS_EXT_Service (_BIOSEXTGetHeader, VxD_CODE)
  62. BIOS_EXT_Service (_BIOSEXTCallBIOS, VxD_CODE)
  63. End_Service_Table(BIOS_EXT, VxD)
  64. /*ENDMACROS*/
  65. #define PNPBIOS_SERVICE_GETVERSION 0x000
  66. #define PNPBIOS_SERVICE_SOFTUNDOCK 0x100
  67. #define PNPBIOS_SERVICE_GETDOCKCAPABILITIES 0x200
  68. #define PNPBIOS_SERVICE_GETAPMTABLE 0x300
  69. struct BIOSPARAMSTAG {
  70. DWORD bp_ret;
  71. WORD *bp_pTableSize;
  72. char *bp_pTable;
  73. };
  74. typedef struct BIOSPARAMSTAG BIOSPARAMS;
  75. typedef struct BIOSPARAMSTAG *PBIOSPARAMS;
  76. #define PNPBIOS_ERR_NONE 0x00
  77. #define PNPBIOS_ERR_SUCCESS PNPBIOS_ERR_NONE
  78. #define PNPBIOS_WARN_NOT_SET_STATICALLY 0x7F
  79. #define PNPBIOS_ERR_UNKNOWN_FUNCTION 0x81
  80. #define PNPBIOS_ERR_FUNCTION_NOT_SUPPORTED 0x82
  81. #define PNPBIOS_ERR_INVALID_HANDLE 0x83
  82. #define PNPBIOS_ERR_BAD_PARAMETER 0x84
  83. #define PNPBIOS_ERR_SET_FAILED 0x85
  84. #define PNPBIOS_ERR_EVENTS_NOT_PENDING 0x86
  85. #define PNPBIOS_ERR_SYSTEM_NOT_DOCKED 0x87
  86. #define PNPBIOS_ERR_NO_ISA_PNP_CARDS 0x88
  87. #define PNPBIOS_ERR_CANT_DETERMINE_DOCKING 0x89
  88. #define PNPBIOS_ERR_CHANGE_FAILED_NO_BATTERY 0x8A
  89. #define PNPBIOS_ERR_CHANGE_FAILED_CONFLICT 0x8B
  90. #define PNPBIOS_ERR_BUFFER_TOO_SMALL 0x8C
  91. #define PNPBIOS_ERR_USE_ESCD_SUPPORT 0x8D
  92. #define PNPBIOS_ERR_MS_INTERNAL 0xFE
  93. #define PNPBIOS_DOCK_CAPABILITY_VCR 0x0001
  94. #define PNPBIOS_DOCK_CAPABILITY_TEMPERATURE 0x0006
  95. #define PNPBIOS_DOCK_CAPABILITY_COLD 0x0000
  96. #define PNPBIOS_DOCK_CAPABILITY_WARM 0x0002
  97. #define PNPBIOS_DOCK_CAPABILITY_HOT 0x0004