PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/WindSLIC_EFI/include/efiDriverConfiguration.h

https://github.com/untermensch/WindSLIC
C Header | 210 lines | 49 code | 13 blank | 148 comment | 0 complexity | a9e4debbb5198169f9d01f50ec4a1495 MD5 | raw file
  1. /*++
  2. Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
  3. This software and associated documentation (if any) is furnished
  4. under a license and may only be used or copied in accordance
  5. with the terms of the license. Except as permitted by such
  6. license, no part of this software or documentation may be
  7. reproduced, stored in a retrieval system, or transmitted in any
  8. form or by any means without the express written consent of
  9. Intel Corporation.
  10. Module Name:
  11. DriverConfiguration.h
  12. Abstract:
  13. EFI Driver Configuration Protocol
  14. Revision History
  15. --*/
  16. #ifndef _EFI_DRIVER_CONFIGURATION_H_
  17. #define _EFI_DRIVER_CONFIGURATION_H_
  18. //
  19. // Global ID for the Driver Configuration Protocol
  20. //
  21. #define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
  22. { 0x107a772b, 0xd5e1, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
  23. EFI_INTERFACE_DECL(_EFI_DRIVER_CONFIGURATION_PROTOCOL);
  24. typedef enum {
  25. EfiDriverConfigurationActionNone = 0,
  26. EfiDriverConfigurationActionStopController = 1,
  27. EfiDriverConfigurationActionRestartController = 2,
  28. EfiDriverConfigurationActionRestartPlatform = 3,
  29. EfiDriverConfigurationActionMaximum
  30. } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
  31. #define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
  32. #define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
  33. #define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
  34. #define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
  35. typedef
  36. EFI_STATUS
  37. (EFIAPI *EFI_DRIVER_CONFIGURATION_SET_OPTIONS) (
  38. IN struct _EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
  39. IN EFI_HANDLE ControllerHandle,
  40. IN EFI_HANDLE ChildHandle OPTIONAL,
  41. IN CHAR8 *Language,
  42. OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
  43. );
  44. /*++
  45. Routine Description:
  46. Allows the user to set controller specific options for a controller that a
  47. driver is currently managing.
  48. Arguments:
  49. This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
  50. ControllerHandle - The handle of the controller to set options on.
  51. ChildHandle - The handle of the child controller to set options on. This
  52. is an optional parameter that may be NULL. It will be NULL
  53. for device drivers, and for a bus drivers that wish to set
  54. options for the bus controller. It will not be NULL for a
  55. bus driver that wishes to set options for one of its child
  56. controllers.
  57. Language - A pointer to a three character ISO 639-2 language identifier.
  58. This is the language of the user interface that should be
  59. presented to the user, and it must match one of the languages
  60. specified in SupportedLanguages. The number of languages
  61. supported by a driver is up to the driver writer.
  62. ActionRequired - A pointer to the action that the calling agent is required
  63. to perform when this function returns. See "Related
  64. Definitions" for a list of the actions that the calling
  65. agent is required to perform prior to accessing
  66. ControllerHandle again.
  67. Returns:
  68. EFI_SUCCESS - The driver specified by This successfully set the
  69. configuration options for the controller specified
  70. by ControllerHandle..
  71. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
  72. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
  73. EFI_INVALID_PARAMETER - ActionRequired is NULL.
  74. EFI_UNSUPPORTED - The driver specified by This does not support setting
  75. configuration options for the controller specified by
  76. ControllerHandle and ChildHandle.
  77. EFI_UNSUPPORTED - The driver specified by This does not support the
  78. language specified by Language.
  79. EFI_DEVICE_ERROR - A device error occurred while attempt to set the
  80. configuration options for the controller specified
  81. by ControllerHandle and ChildHandle.
  82. EFI_OUT_RESOURCES - There are not enough resources available to set the
  83. configuration options for the controller specified
  84. by ControllerHandle and ChildHandle.
  85. --*/
  86. typedef
  87. EFI_STATUS
  88. (EFIAPI *EFI_DRIVER_CONFIGURATION_OPTIONS_VALID) (
  89. IN struct _EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
  90. IN EFI_HANDLE ControllerHandle,
  91. IN EFI_HANDLE ChildHandle OPTIONAL
  92. );
  93. /*++
  94. Routine Description:
  95. Tests to see if a controller's current configuration options are valid.
  96. Arguments:
  97. This - A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
  98. ControllerHandle - The handle of the controller to test if it's current
  99. configuration options are valid.
  100. ChildHandle - The handle of the child controller to test if it's current
  101. configuration options are valid. This is an optional
  102. parameter that may be NULL. It will be NULL for device
  103. drivers. It will also be NULL for a bus drivers that wish
  104. to test the configuration options for the bus controller.
  105. It will not be NULL for a bus driver that wishes to test
  106. configuration options for one of its child controllers.
  107. Returns:
  108. EFI_SUCCESS - The controller specified by ControllerHandle and
  109. ChildHandle that is being managed by the driver
  110. specified by This has a valid set of configuration
  111. options.
  112. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
  113. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
  114. EFI_UNSUPPORTED - The driver specified by This is not currently
  115. managing the controller specified by ControllerHandle
  116. and ChildHandle.
  117. EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
  118. ChildHandle that is being managed by the driver
  119. specified by This has an invalid set of configuration
  120. options.
  121. --*/
  122. typedef
  123. EFI_STATUS
  124. (EFIAPI *EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS) (
  125. IN struct _EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
  126. IN EFI_HANDLE ControllerHandle,
  127. IN EFI_HANDLE ChildHandle OPTIONAL,
  128. IN UINT32 DefaultType,
  129. OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
  130. );
  131. /*++
  132. Routine Description:
  133. Forces a driver to set the default configuration options for a controller.
  134. Arguments:
  135. This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
  136. ControllerHandle - The handle of the controller to force default configuration options on.
  137. ChildHandle - The handle of the child controller to force default configuration options on This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller. It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.
  138. DefaultType - The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle. See Table 9-1 for legal values. A DefaultType of 0x00000000 must be supported by this protocol.
  139. ActionRequired - A pointer to the action that the calling agent is required to perform when this function returns. See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.
  140. Returns:
  141. EFI_SUCCESS - The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
  142. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
  143. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
  144. EFI_INVALID_PARAMETER - ActionRequired is NULL.
  145. EFI_UNSUPPORTED - The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
  146. EFI_UNSUPPORTED - The driver specified by This does not support the configuration type specified by DefaultType.
  147. EFI_DEVICE_ERROR - A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
  148. EFI_OUT_RESOURCES - There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
  149. --*/
  150. //
  151. // Interface structure for the Driver Configuration Protocol
  152. //
  153. typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL {
  154. EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions;
  155. EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid;
  156. EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults;
  157. CHAR8 *SupportedLanguages;
  158. } EFI_DRIVER_CONFIGURATION_PROTOCOL;
  159. /*++
  160. Protocol Description:
  161. Used to set configuration options for a controller that an EFI Driver is managing.
  162. Parameters:
  163. SetOptions - Allows the use to set drivers specific configuration
  164. options for a controller that the driver is currently
  165. managing.
  166. OptionsValid - Tests to see if a controller's current configuration
  167. options are valid.
  168. ForceDefaults - Forces a driver to set the default configuration options
  169. for a controller.
  170. SupportedLanguages - A Null-terminated ASCII string that contains one or more
  171. ISO 639-2 language codes. This is the list of language
  172. codes that this protocol supports.
  173. --*/
  174. extern EFI_GUID DriverConfigurationProtocol;
  175. #endif