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.

122 lines
3.3 KiB

  1. /*++
  2. Copyright Microsoft Corporation, 1996-7, All Rights Reserved.
  3. Module Name:
  4. mkupdate.h
  5. Abstract:
  6. Defines for application to create the update database from
  7. appropriately structured input update file and to maintain driver
  8. revisions
  9. Author:
  10. Shivnandan Kaushik
  11. Environment:
  12. User mode
  13. Revision History:
  14. --*/
  15. #ifndef MKUPDATE_H
  16. #define MKUPDATE_H
  17. //
  18. // Signature field returned by CPUID
  19. //
  20. #include "pshpack1.h"
  21. typedef struct _CPU_SIGNATURE {
  22. union {
  23. ULONG LongPart;
  24. struct {
  25. ULONG Stepping:4;
  26. ULONG Model:4;
  27. ULONG Family:4;
  28. ULONG ProcessorType:2;
  29. ULONG Reserved:18;
  30. } hw;
  31. } u;
  32. } CPU_SIGNATURE, *PCPU_SIGNATURE;
  33. typedef struct _PROCESSOR_FLAGS {
  34. union {
  35. ULONG LongPart;
  36. struct {
  37. ULONG Slot1:1;
  38. ULONG Mobile:1;
  39. ULONG Slot2:1;
  40. ULONG MobileModule:1;
  41. ULONG Reserved1:1;
  42. ULONG Reserved2:1;
  43. ULONG Reserved3:1;
  44. ULONG Reserved4:1;
  45. ULONG Reserved:24;
  46. } hw;
  47. } u;
  48. } PROCESSOR_FLAGS, *PPROCESSOR_FLAGS;
  49. #define FLAG_SLOT1 0x1
  50. #define FLAG_MOBILE 0x2
  51. #define FLAG_SLOT2 0x4
  52. #define FLAG_MODULE 0x8
  53. #define FLAG_RESERVED1 0x10
  54. #define FLAG_RESERVED2 0x20
  55. #define FLAG_RESERVED3 0x40
  56. #define FLAG_RESERVED4 0x80
  57. #define MASK_SLOT1 ~(FLAG_SLOT1)
  58. #define MASK_MOBILE ~(FLAG_MOBILE)
  59. #define MASK_SLOT2 ~(FLAG_SLOT2)
  60. #define MASK_MODULE ~(FLAG_MODULE)
  61. #define MASK_RESERVED1 ~(FLAG_RESERVED1)
  62. #define MASK_RESERVED2 ~(FLAG_RESERVED2)
  63. #define MASK_RESERVED3 ~(FLAG_RESERVED3)
  64. #define MASK_RESERVED4 ~(FLAG_RESERVED4)
  65. // Structure defining a Pentium (R) Pro Processor Update
  66. // This structure is also defined in nt\private\ntos\dd\update\update.h
  67. #define UPDATE_VER_1_HEADER_SIZE 0x30
  68. #define UPDATE_VER_1_DATA_SIZE 500
  69. typedef struct _UPDATE {
  70. ULONG HeaderVersion; // Update Header Version
  71. ULONG UpdateRevision; // Revision number
  72. ULONG Date; // Date of update release
  73. CPU_SIGNATURE Processor; // Target processor signature
  74. ULONG Checksum; // Checksum of entire update
  75. // including header
  76. ULONG LoaderRevision; // Loader revision for loading
  77. // update to processor
  78. PROCESSOR_FLAGS ProcessorFlags; // Processor Slot Information
  79. ULONG Reserved[5]; // Reserved by Intel Corp.
  80. ULONG Data[UPDATE_VER_1_DATA_SIZE]; // Update data
  81. } UPDATE, *PUPDATE;
  82. #include "poppack.h"
  83. typedef struct _UPDATE_ENTRY{
  84. ULONG CpuSignature;
  85. ULONG UpdateRevision;
  86. ULONG ProcessorFlags;
  87. CHAR CpuSigStr[32];
  88. CHAR UpdateRevStr[32];
  89. CHAR FlagsStr[32];
  90. } UPDATE_ENTRY, *PUPDATE_ENTRY;
  91. #define MAX_LINE 512
  92. #define UPDATE_VER_SIZE 13 // Max. characters per patch version
  93. #define UPDATE_DATA_FILE "updtdata.c"
  94. #define UPDATE_VERSION_FILE "update.ver"
  95. #endif //MKUPDATE_H