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.

74 lines
1.9 KiB

  1. //
  2. // Defines for machine models
  3. //
  4. #define PS2_AT 0xF819 // PS/2 non-micro channel
  5. #define PS2_L40 0xF823 // PS/2 non-micro channel
  6. #define PS1_386 0xF830 // 386 non-microchannel // 6.13
  7. #define PS2_PORT 0x0001 // PS/2 specific port
  8. #define ISA_PORT 0x0002 // AT specific port
  9. #define HYBRID_PORT 0x0004 // PS/2 non-micro channel specific port
  10. //
  11. // Bios int 15h C0h buffer definition
  12. //
  13. struct BIOS_INT15_C0_BUFFER {
  14. USHORT Size;
  15. USHORT Model;
  16. UCHAR BiosRevision;
  17. UCHAR ConfigurationFlags;
  18. UCHAR Reserved[4];
  19. } BiosSystemEnvironment;
  20. typedef struct _TEMPORARY_ROM_BLOCK {
  21. ROM_BLOCK RomBlock;
  22. struct _TEMPORARY_ROM_BLOCK far *Next;
  23. } TEMPORARY_ROM_BLOCK, far * FPTEMPORARY_ROM_BLOCK;
  24. #define POS_MAX_SLOT 8
  25. #define ROMBIOS_START 0xF0000
  26. #define ROMBIOS_LEN 0x10000
  27. #define PS2BIOS_START 0xE0000
  28. #define PS2BIOS_LEN 0x20000
  29. #define EXTROM_START 0xC0000 // where and how far to
  30. #define EXTROM_LEN 0x40000 // search for external adapter ROMs
  31. #define EBIOSDATA_START 0x9FC00
  32. #define EBIOSDATA_LEN 0x00400
  33. #define NUMBER_VECTORS 0x80
  34. #define VGA_PARAMETER_POINTER 0x4A8
  35. #define ALIGN_DOWN(address,amt) ((ULONG)(address) & ~(( amt ) - 1))
  36. #define ALIGN_UP(address,amt) (ALIGN_DOWN( (address + (amt) - 1), (amt) ))
  37. //
  38. // ROM format
  39. //
  40. #define ROM_HEADER_SIGNATURE 0xAA55
  41. #define ROM_HEADER_INCREMENT 0x800
  42. #define BLOCKSIZE 512
  43. typedef struct _ROM_HEADER {
  44. USHORT Signature; // should be ROMHDR_SIGNATURE
  45. UCHAR NumberBlocks; // # of ROM blocks
  46. UCHAR Filler[ROM_HEADER_INCREMENT - 3];
  47. } ROM_HEADER, far *FPROM_HEADER;
  48. //
  49. // External References
  50. //
  51. extern
  52. BOOLEAN
  53. HwRomCompare (
  54. ULONG Source,
  55. ULONG Destination,
  56. ULONG Size
  57. );