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.

94 lines
3.0 KiB

  1. #if defined(NEC_98)
  2. //
  3. // use for GetRomBlocks routine
  4. //
  5. #define N_LIMIT 0x20 // N mode XROM area limit ; 4c0h+20h -> E8000H(E7FFFh)
  6. #define H_LIMIT 0x30 // H mode XROM area limit ; 4c0h+30h -> F0000H(EFFFFh)
  7. #define XROM_ID_SIZE(a) (a ? H_LIMIT : N_LIMIT) // XROM Control ID Table Size
  8. #define XROM_ID_MASK 0xC0 // CHECK FOR XROM Control ID Table bit7,6
  9. #define XROM_SIZE 0x1000 // XROM 1Block Size = 4k
  10. #define XROM_USED 0xC0 // XROM Control ID Table bit7=on ,bit6=on
  11. #define XROM_UNUSED 0x00 // XROM Control ID Table bit7=off,bit6=off
  12. #define XROM_BELONG 0x80 // XROM Control ID Table bit7=on ,bit6=off
  13. #define XROM_START 0xC0000L // XROM Start Address
  14. #define ID_TABLE_ADDR 0x04C0 // XROM Control ID Table Start Address
  15. #define N_MODE_ROM_ADDR 0xE8000L
  16. #define H_MODE_ROM_ADDR 0xF0000L
  17. #define N_MODE_ROM_SIZE 0x18000L
  18. #define H_MODE_ROM_SIZE 0x10000L
  19. #else // PC98
  20. //
  21. // Defines for machine models
  22. //
  23. #define PS2_AT 0xF819 // PS/2 non-micro channel
  24. #define PS2_L40 0xF823 // PS/2 non-micro channel
  25. #define PS1_386 0xF830 // 386 non-microchannel // 6.13
  26. #define PS2_PORT 0x0001 // PS/2 specific port
  27. #define ISA_PORT 0x0002 // AT specific port
  28. #define HYBRID_PORT 0x0004 // PS/2 non-micro channel specific port
  29. //
  30. // Bios int 15h C0h buffer definition
  31. //
  32. struct BIOS_INT15_C0_BUFFER {
  33. USHORT Size;
  34. USHORT Model;
  35. UCHAR BiosRevision;
  36. UCHAR ConfigurationFlags;
  37. UCHAR Reserved[4];
  38. } BiosSystemEnvironment;
  39. typedef struct _TEMPORARY_ROM_BLOCK {
  40. ROM_BLOCK RomBlock;
  41. struct _TEMPORARY_ROM_BLOCK far *Next;
  42. } TEMPORARY_ROM_BLOCK, far * FPTEMPORARY_ROM_BLOCK;
  43. #define POS_MAX_SLOT 8
  44. #define ROMBIOS_START 0xF0000
  45. #define ROMBIOS_LEN 0x10000
  46. #define PS2BIOS_START 0xE0000
  47. #define PS2BIOS_LEN 0x20000
  48. #define EXTROM_START 0xC0000 // where and how far to
  49. #define EXTROM_LEN 0x40000 // search for external adapter ROMs
  50. #define EBIOSDATA_START 0x9FC00
  51. #define EBIOSDATA_LEN 0x00400
  52. #define NUMBER_VECTORS 0x80
  53. #define VGA_PARAMETER_POINTER 0x4A8
  54. #define ALIGN_DOWN(address,amt) ((ULONG)(address) & ~(( amt ) - 1))
  55. #define ALIGN_UP(address,amt) (ALIGN_DOWN( (address + (amt) - 1), (amt) ))
  56. //
  57. // ROM format
  58. //
  59. #define ROM_HEADER_SIGNATURE 0xAA55
  60. #define ROM_HEADER_INCREMENT 0x800
  61. #define BLOCKSIZE 512
  62. typedef struct _ROM_HEADER {
  63. USHORT Signature; // should be ROMHDR_SIGNATURE
  64. UCHAR NumberBlocks; // # of ROM blocks
  65. UCHAR Filler[ROM_HEADER_INCREMENT - 3];
  66. } ROM_HEADER, far *FPROM_HEADER;
  67. //
  68. // External References
  69. //
  70. extern
  71. BOOLEAN
  72. HwRomCompare (
  73. ULONG Source,
  74. ULONG Destination,
  75. ULONG Size
  76. );
  77. #endif // PC98