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.

177 lines
7.0 KiB

  1. /*
  2. *
  3. * Modifications: $Header: J:/Archives/preboot/lsa2/inc/pxe_api.h_v 1.0 May 02 1997 17:01:00 MJOHNSOX $
  4. *
  5. * Copyright(c) 1997 by Intel Corporation. All Rights Reserved.
  6. *
  7. */
  8. #ifndef _PXENV_API_H
  9. #define _PXENV_API_H
  10. /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
  11. /* Parameter structure and type definitions for PXENV API version 2.x
  12. *
  13. * PXENV.H needs to be #included before this file.
  14. *
  15. * None of the PXENV API services are available after the stack
  16. * has been unloaded.
  17. */
  18. #include "bootp.h" /* Defines BOOTPLAYER */
  19. /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
  20. /* Format of PXENV entry point structure.
  21. */
  22. typedef struct s_PXENV_ENTRY {
  23. UINT8 signature[6]; /* 'PXENV+' */
  24. UINT16 version; /* MSB=major, LSB=minor */
  25. UINT8 length; /* sizeof(struct s_PXENV_ENTRY) */
  26. UINT8 checksum; /* 8-bit checksum off structure, */
  27. /* including this bytes should */
  28. /* be 0. */
  29. UINT16 rm_entry_off; /* 16-bit real-mode offset and */
  30. UINT16 rm_entry_seg; /* segment of the PXENV API entry */
  31. /* point. */
  32. UINT16 pm_entry_off; /* 16-bit protected-mode offset */
  33. UINT32 pm_entry_seg; /* and segment base address of */
  34. /* the PXENV API entry point. */
  35. /* The PROM stack, base code and data segment selectors are only */
  36. /* required until the base code (TFTP API) layer is removed from */
  37. /* memory (this can only be done in real mode). */
  38. UINT16 stack_sel; /* PROM stack segment. Will be set */
  39. UINT16 stack_size; /* to 0 when removed from memory. */
  40. UINT16 base_cs_sel; /* Base code segment. Will be set */
  41. UINT16 base_cs_size; /* to 0 when removed from memory. */
  42. UINT16 base_ds_sel; /* Base data segment. Will be set */
  43. UINT16 base_ds_size; /* to 0 when removed from memory. */
  44. UINT16 mlid_ds_sel; /* MLID data segment. Will be set */
  45. UINT16 mlid_ds_size; /* to 0 when removed from memory. */
  46. UINT16 mlid_cs_sel; /* MLID code segment. Will be set */
  47. UINT16 mlid_cs_size; /* to 0 when removed from memory. */
  48. #if 0
  49. UINT16 unknown1; /* The V1.0 beta ROM added two extra unknown fields. */
  50. UINT16 unknown2; /* They are not included in the definition here in */
  51. /* order to allow startrom\main.c\PxenvVerifyEntry */
  52. /* to work with older ROMs. */
  53. #endif
  54. } t_PXENV_ENTRY;
  55. #define PXENV_ENTRY_SIG "PXENV+"
  56. /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
  57. /* One of the following command op-codes needs to be loaded into the
  58. * op-code register (BX) before making a call a PXENV API service.
  59. */
  60. #define PXENV_UNLOAD_STACK 0x70
  61. #define PXENV_GET_BINL_INFO 0x71
  62. #define PXENV_RESTART_DHCP 0x72
  63. #define PXENV_RESTART_TFTP 0x73
  64. #define PXENV_GET_RAMD_INFO 0x74
  65. /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
  66. /* PXENV API parameter structure typedefs.
  67. */
  68. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  69. typedef struct s_PXENV_UNLOAD_STACK {
  70. UINT16 status; /* Out: See PXENV_STATUS_xxx */
  71. /* constants. */
  72. UINT16 rm_entry_off; /* Out: 16-bit real-mode segment and */
  73. UINT16 rm_entry_seg; /* offset of PXENV Entry Point */
  74. /* structure. */
  75. UINT16 pm_entry_off; /* Out: 16-bit protected-mode offset */
  76. UINT32 pm_entry_base; /* and segment base address of */
  77. /* PXENV Entry Point structure. */
  78. } t_PXENV_UNLOAD_STACK;
  79. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  80. /* Packet types that can be requested in the s_PXENV_GET_BINL_INFO structure. */
  81. #define PXENV_PACKET_TYPE_DHCP_DISCOVER 1
  82. #define PXENV_PACKET_TYPE_DHCP_ACK 2
  83. #define PXENV_PACKET_TYPE_BINL_REPLY 3
  84. /* Three packets are preserved and available through this interface: 1) The
  85. * DHCP Discover packet sent by the client, 2) the DHCP acknowledgement
  86. * packet returned by the DHCP server, and 3) the reply packet from the BINL
  87. * server. If the DHCP server provided the image bootfile name, the
  88. * DHCP_ACK and BINL_REPLY packets will identical.
  89. */
  90. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  91. typedef struct s_PXENV_GET_BINL_INFO {
  92. UINT16 status; /* Out: See PXENV_STATUS_xxx */
  93. /* constants. */
  94. UINT16 packet_type; /* In: See PXENV_PACKET_TYPE_xxx */
  95. /* constants */
  96. UINT16 buffer_size; /* In: Size of the buffer in */
  97. /* bytes. Specifies the maximum */
  98. /* amount of data that will be */
  99. /* copied by the service. A size */
  100. /* of zero is valid. */
  101. /* Out: Amount of BINL data, in */
  102. /* bytes, that was copied into */
  103. /* the buffer. For an input */
  104. /* size of zero, no data will be */
  105. /* copied and buffer_size will */
  106. /* be set to the maximum amount */
  107. /* of data available to be */
  108. /* copied. */
  109. UINT16 buffer_offset; /* In: 16-bit offset and segment */
  110. UINT16 buffer_segment; /* selector of a buffer where the */
  111. /* requested packet will be */
  112. /* copied. */
  113. } t_PXENV_GET_BINL_INFO;
  114. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  115. typedef struct s_PXENV_RESTART_DHCP {
  116. UINT16 status; /* Out: See PXENV_STATUS_xxx */
  117. /* constants. */
  118. } t_PXENV_RESTART_DHCP;
  119. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  120. #define s_PXENV_RESTART_TFTP s_PXENV_TFTP_READ_FILE
  121. #define t_PXENV_RESTART_TFTP t_PXENV_TFTP_READ_FILE
  122. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  123. typedef struct s_PXENV_GET_RAMD_INFO {
  124. UINT16 status; /* Out: See PXENV_STATUS_xxx */
  125. /* constants. */
  126. UINT32 ramd_info; /* Out: Far pointer to RAMDisk */
  127. /* information structure. */
  128. } t_PXENV_GET_RAMD_INFO;
  129. typedef struct s_PXENV_RAMD_INFO {
  130. UINT16 orig_fbms; /* Original free base memory size. */
  131. UINT32 ramd_addr; /* RAMDisk physical address. */
  132. UINT32 orig_int13; /* Original Int 13h ISR. */
  133. UINT32 orig_int1A; /* Original Int 1Ah ISR. */
  134. UINT32 orig_pxenv;
  135. UINT16 dhcp_discover_seg; /* Segment address & length of */
  136. UINT16 dhcp_discover_len; /* DHCP discover packet. */
  137. UINT16 dhcp_ack_seg; /* Segment address & length of */
  138. UINT16 dhcp_ack_len; /* DHCP ack packet. */
  139. UINT16 binl_reply_seg; /* Segment address & length of */
  140. UINT16 binl_reply_len; /* BINL reply packet. */
  141. UINT16 flags; /* RAMDisk operation flags. */
  142. UINT16 xms_page; /* XMS page number of relocated */
  143. /* RAMDisk image. 0 == use Int 87h. */
  144. UINT32 xms_entry; /* XMS API entry point. */
  145. } t_PXENV_RAMD_INFO;
  146. #define PXENV_RAMD_FLAG_DISABLE 0x0001
  147. #define PXENV_RAMD_FLAG_PROTECTED 0x0002
  148. #endif /* _PXENV_API_H */
  149. /* EOF - $Workfile: pxe_api.h $ */