--- /dev/null
+/** @file\r
+ EFI Driver Family Protocol\r
+\r
+ Copyright (c) 2007, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+**/\r
+\r
+#ifndef __EFI_DRIVER_FAMILY_OVERRIDE_H__\r
+#define __EFI_DRIVER_FAMILY_OVERRIDE_H__\r
+\r
+#define EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID \\r
+ { \\r
+ 0xb1ee129e, 0xda36, 0x4181, { 0x91, 0xf8, 0x4, 0xa4, 0x92, 0x37, 0x66, 0xa7 } \\r
+ }\r
+ \r
+typedef struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL;\r
+\r
+//\r
+// Prototypes for the Driver Family Override Protocol\r
+//\r
+// \r
+/** \r
+ This function returns the version value associated with the driver specified by This.\r
+\r
+ Retrieves the version of the driver that is used by the EFI Boot Service ConnectController()\r
+ to sort the set of Driver Binding Protocols in order from highest priority to lowest priority.\r
+ For drivers that support the Driver Family Override Protocol, those drivers are sorted so that\r
+ the drivers with higher values returned by GetVersion() are high priority that drivers that\r
+ return lower values from GetVersion().\r
+\r
+ @param This A pointer to the EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL instance. \r
+ \r
+ @return The version value associated with the driver specified by This. \r
+ \r
+**/\r
+typedef\r
+UINT32\r
+(EFIAPI *EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION) (\r
+ IN EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL *This\r
+ );\r
+\r
+/**\r
+ When installed, the Driver Family Override Protocol produces a GUID that represets \r
+ a family of drivers. Drivers with the same GUID are members of the same family \r
+ When drivers are connected to controllers, drivers with a higher revision value \r
+ in the same driver family are connected with a higher priority than drivers \r
+ with a lower revision value in the same driver family. The EFI Boot Service\r
+ Connect Controller uses five rules to build a prioritied list of drivers when \r
+ a request is made to connect a driver to a controller. The Driver Family Protocol\r
+ rule is between the Platform Specific Driver Override Protocol and above the \r
+ Bus Specific Driver Override Protocol \r
+\r
+ @param FamilyGuid A pointer to the GUID that represnets the family of drivers\r
+ that the driver producing this protocol is a member.\r
+\r
+**/\r
+struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL {\r
+ EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION GetVersion;\r
+};\r
+\r
+extern EFI_GUID gEfiDriverFamilyOverrideProtocolGuid;\r
+\r
+#endif\r
--- /dev/null
+/** @file\r
+ EFI Driver Health Protocol\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+**/\r
+\r
+#ifndef __EFI_DRIVER_HEALTH_H__\r
+#define __EFI_DRIVER_HEALTH_H__\r
+\r
+#define EFI_DRIVER_HEALTH_PROTOCOL_GUID \\r
+ { \\r
+ 0x2a534210, 0x9280, 0x41d8, { 0xae, 0x79, 0xca, 0xda, 0x1, 0xa2, 0xb1, 0x27 } \\r
+ }\r
+ \r
+typedef struct _EFI_DRIVER_HEALTH_PROTOCOL EFI_DRIVER_HEALTH_PROTOCOL;\r
+\r
+//\r
+// EFI_DRIVER_HEALTH_HEALTH_STATUS\r
+//\r
+typedef enum {\r
+ EfiDriverHealthStatusHealthy,\r
+ EfiDriverHealthStatusRepairRequired,\r
+ EfiDriverHealthStatusConfigurationRequired,\r
+ EfiDriverHealthStatusFailed,\r
+ EfiDriverHealthStatusReconnectRequired,\r
+ EfiDriverHealthStatusRebootRequired\r
+} EFI_DRIVER_HEALTH_HEALTH_STATUS;\r
+\r
+//\r
+// EFI_DRIVER_HEALTH_HII_MESSAGE\r
+//\r
+typedef struct {\r
+ EFI_HII_HANDLE HiiHandle;\r
+ EFI_STRING_ID StringId;\r
+ UINT64 Reserved;\r
+} EFI_DRIVER_HEALTH_HII_MESSAGE;\r
+\r
+/**\r
+ Reports the progress of a repair operation\r
+\r
+ @param Value A value between 0 and Limit that identifies the current \r
+ progress of the repair operation.\r
+ \r
+ @param Limit The maximum value of Value for the current repair operation.\r
+ For example, a driver that wants to specify progress in \r
+ percent would use a Limit value of 100.\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_DRIVER_HEALTH_REPAIR_PROGRESS_NOTIFY) (\r
+ IN UINTN Value,\r
+ IN UINTN Limit\r
+ );\r
+\r
+/**\r
+ Retrieves the health status of a controller in the platform. This function can also \r
+ optionally return warning messages, error messages, and a set of HII Forms that may \r
+ be repair a controller that is not proper configured. \r
+ \r
+ @param This A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r
+\r
+ @param ControllerHandle The handle of the controller to retrieve the health status \r
+ on. This is an optional parameter that may be NULL. If \r
+ this parameter is NULL, then the value of ChildHandle is \r
+ ignored, and the combined health status of all the devices \r
+ that the driver is managing is returned.\r
+\r
+ @param ChildHandle The handle of the child controller to retrieve the health \r
+ status on. This is an optional parameter that may be NULL. \r
+ This parameter is ignored of ControllerHandle is NULL. It \r
+ will be NULL for device drivers. It will also be NULL for \r
+ bus drivers when an attempt is made to collect the health \r
+ status of the bus controller. If will not be NULL when an \r
+ attempt is made to collect the health status for a child \r
+ controller produced by the driver.\r
+\r
+ @param HealthStatus A pointer to the health status that is returned by this \r
+ function. This is an optional parameter that may be NULL. \r
+ This parameter is ignored of ControllerHandle is NULL. \r
+ The health status for the controller specified by \r
+ ControllerHandle and ChildHandle is returned. \r
+\r
+ @param MessageList A pointer to an array of warning or error messages associated \r
+ with the controller specified by ControllerHandle and \r
+ ChildHandle. This is an optional parameter that may be NULL. \r
+ MessageList is allocated by this function with the EFI Boot \r
+ Service AllocatePool(), and it is the caller's responsibility \r
+ to free MessageList with the EFI Boot Service FreePool(). \r
+ Each message is specified by tuple of an EFI_HII_HANDLE and \r
+ an EFI_STRING_ID. The array of messages is terminated by tuple \r
+ containing a EFI_HII_HANDLE with a value of NULL. The \r
+ EFI_HII_STRING_PROTOCOL.GetString() function can be used to \r
+ retrieve the warning or error message as a Null-terminated \r
+ Unicode string in a specific language. Messages may be \r
+ returned for any of the HealthStatus values except \r
+ EfiDriverHealthStatusReconnectRequired and \r
+ EfiDriverHealthStatusRebootRequired.\r
+\r
+ @param FormHiiHandle A pointer to the HII handle for an HII form associated with the \r
+ controller specified by ControllerHandle and ChildHandle. \r
+ This is an optional parameter that may be NULL. An HII form \r
+ is specified by a combination of an EFI_HII_HANDLE and an \r
+ EFI_GUID that identifies the Form Set GUID. The \r
+ EFI_FORM_BROWSER2_PROTOCOL.SendForm() function can be used \r
+ to display and allow the user to make configuration changes \r
+ to the HII Form. An HII form may only be returned with a \r
+ HealthStatus value of EfiDriverHealthStatusConfigurationRequired.\r
+\r
+ @param FormSetGuid A pointer to the GUID for an HII form associated with the \r
+ controller specified by ControllerHandle and ChildHandle. \r
+ This is an optional parameter that may be NULL. An HII form \r
+ is specified by a combination of an EFI_HII_HANDLE and an \r
+ EFI_GUID that identifies the Form Set GUID. The \r
+ EFI_FORM_BROWSER2_PROTOCOL.SendForm() function can be used \r
+ to display and allow the user to make configuration changes \r
+ to the HII Form. An HII form may only be returned with a \r
+ HealthStatus value of EfiDriverHealthStatusConfigurationRequired.\r
+\r
+ @retval EFI_SUCCESS ControllerHandle is NULL, and all the controllers \r
+ managed by this driver specified by This have a health \r
+ status of EfiDriverHealthStatusHealthy with no warning \r
+ messages to be returned. The ChildHandle, HealthStatus, \r
+ MessageList, and FormList parameters are ignored.\r
+\r
+ @retval EFI_DEVICE_ERROR ControllerHandle is NULL, and one or more of the \r
+ controllers managed by this driver specified by This \r
+ do not have a health status of EfiDriverHealthStatusHealthy. \r
+ The ChildHandle, HealthStatus, MessageList, and \r
+ FormList parameters are ignored.\r
+\r
+ @retval EFI_DEVICE_ERROR ControllerHandle is NULL, and one or more of the \r
+ controllers managed by this driver specified by This \r
+ have one or more warning and/or error messages. \r
+ The ChildHandle, HealthStatus, MessageList, and \r
+ FormList parameters are ignored.\r
+\r
+ @retval EFI_SUCCESS ControllerHandle is not NULL and the health status \r
+ of the controller specified by ControllerHandle and \r
+ ChildHandle was returned in HealthStatus. A list \r
+ of warning and error messages may be optionally \r
+ returned in MessageList, and a list of HII Forms \r
+ may be optionally returned in FormList.\r
+\r
+ @retval EFI_UNSUPPORTED ControllerHandle is not NULL, and the controller \r
+ specified by ControllerHandle and ChildHandle is not \r
+ currently being managed by the driver specified by This.\r
+\r
+ @retval EFI_INVALID_PARAMETER HealthStatus is NULL.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES MessageList is not NULL, and there are not enough \r
+ resource available to allocate memory for MessageList.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_HEALTH_GET_HEALTH_STATUS) (\r
+ IN EFI_DRIVER_HEALTH_PROTOCOL *This,\r
+ IN EFI_HANDLE ControllerHandle OPTIONAL,\r
+ IN EFI_HANDLE ChildHandle OPTIONAL,\r
+ OUT EFI_DRIVER_HEALTH_HEALTH_STATUS *HealthStatus,\r
+ OUT EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList OPTIONAL,\r
+ OUT EFI_HII_HANDLE *FormHiiHandle OPTIONAL,\r
+ OUT EFI_GUID **FormSetGuid OPTIONAL\r
+ );\r
+\r
+/**\r
+ Performs a repair operation on a controller in the platform. This function can \r
+ optionally report repair progress information back to the platform. \r
+ \r
+ @param This A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r
+ @param ControllerHandle The handle of the controller to repair.\r
+ @param ChildHandle The handle of the child controller to repair. This is \r
+ an optional parameter that may be NULL. It will be NULL \r
+ for device drivers. It will also be NULL for bus \r
+ drivers when an attempt is made to repair a bus controller.\r
+ If will not be NULL when an attempt is made to repair a \r
+ child controller produced by the driver.\r
+ @param RepairNotify A notification function that may be used by a driver to \r
+ report the progress of the repair operation. This is \r
+ an optional parameter that may be NULL. \r
+\r
+\r
+ @retval EFI_SUCCESS An attempt to repair the controller specified by \r
+ ControllerHandle and ChildHandle was performed. \r
+ The result of the repair operation can bet \r
+ determined by calling GetHealthStatus().\r
+ @retval EFI_UNSUPPORTED The driver specified by This is not currently \r
+ managing the controller specified by ControllerHandle \r
+ and ChildHandle.\r
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources to perform the \r
+ repair operation.\r
+\r
+*/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_HEALTH_REPAIR) (\r
+ IN EFI_DRIVER_HEALTH_PROTOCOL *This,\r
+ IN EFI_HANDLE ControllerHandle,\r
+ IN EFI_HANDLE ChildHandle OPTIONAL,\r
+ IN EFI_DRIVER_HEALTH_REPAIR_PROGRESS_NOTIFY ProgressNotification OPTIONAL\r
+ );\r
+\r
+/**\r
+ When installed, the Driver Health Protocol produces a collection of services \r
+ that allow the health status for a controller to be retrieved. If a controller \r
+ is not in a usable state, status messages may be reported to the user, repair \r
+ operations can be invoked, and the user may be asked to make software and/or \r
+ hardware configuration changes. \r
+\r
+ @par Protocol Description:\r
+ The Driver Health Protocol is optionally produced by a driver that follows the \r
+ EFI Driver Model. If an EFI Driver needs to report health status to the platform, \r
+ provide warning or error messages to the user, perform length repair operations, \r
+ or request the user to make hardware or software configuration changes, then the \r
+ Driver Health Protocol must be produced.\r
+ \r
+ A controller that is managed by driver that follows the EFI Driver Model and \r
+ produces the Driver Health Protocol must report the current health of the \r
+ controllers that the driver is currently managing. The controller can initially \r
+ be healthy, failed, require repair, or require configuration. If a controller \r
+ requires configuration, and the user make configuration changes, the controller \r
+ may then need to be reconnected or the system may need to be rebooted for the \r
+ configuration changes to take affect. Figure 2-1 below shows all the possible \r
+ health states of a controller and the legal transitions between the health states. \r
+\r
+ @param GetHealthStatus Retrieves the health status of a controller in the \r
+ platform. This function can also optionally return \r
+ warning messages, error messages, and a set of HII \r
+ Forms that may be repair a controller that is not \r
+ properly configured.\r
+ @param Repair Performs a repair operation on a controller in the \r
+ platform. This function can optionally report repair \r
+ progress information back to the platform.\r
+\r
+**/\r
+struct _EFI_DRIVER_HEALTH_PROTOCOL {\r
+ EFI_DRIVER_HEALTH_GET_HEALTH_STATUS GetHealthStatus;\r
+ EFI_DRIVER_HEALTH_REPAIR Repair;\r
+};\r
+\r
+extern EFI_GUID gEfiDriverHealthProtocolGuid;\r
+\r
+#endif\r
+\r
+\r
+\r
+\r
gEfiDevicePathUtilitiesProtocolGuid = { 0x0379BE4E, 0xD706, 0x437D, { 0xB0, 0x37, 0xED, 0xB8, 0x2F, 0xB7, 0x72, 0xA4 }}\r
gEfiDriverBindingProtocolGuid = { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71 }}\r
gEfiPlatformDriverOverrideProtocolGuid = { 0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }\r
+ gEfiDriverFamilyOverrideProtocolGuid = {0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }}\r
gEfiBusSpecificDriverOverrideProtocolGuid = { 0x3BC1B285, 0x8A15, 0x4A82, { 0xAA, 0xBF, 0x4D, 0x7D, 0x13, 0xFB, 0x32, 0x65 }}\r
+ gEfiDriverHealthProtocolGuid = {0x2a534210, 0x9280, 0x41d8, { 0xae, 0x79, 0xca, 0xda, 0x1, 0xa2, 0xb1, 0x27 }}\r
gEfiDriverDiagnostics2ProtocolGuid = { 0x4D330321, 0x025F, 0x4AAC, { 0x90, 0xD8, 0x5E, 0xD9, 0x00, 0x17, 0x3B, 0x63 }}\r
gEfiDriverDiagnosticsProtocolGuid = { 0x0784924F, 0xE296, 0x11D4, { 0x9A, 0x49, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }}\r
gEfiComponentName2ProtocolGuid = { 0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14 }}\r
gEfiUgaDrawProtocolGuid = { 0x982C298B, 0xF4FA, 0x41CB, { 0xB8, 0x38, 0x77, 0xAA, 0x68, 0x8F, 0xB8, 0x39 }}\r
gEfiUgaIoProtocolGuid = { 0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0x0b, 0x07, 0xa2 }}\r
gEfiLoadedImageProtocolGuid = { 0x5B1B31A1, 0x9562, 0x11D2, { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}\r
+ gEfiLoadedImageDevicePathProtocolGuid = { 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf }}\r
gEfiLoadFileProtocolGuid = { 0x56EC3091, 0x954C, 0x11D2, { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}\r
gEfiSimpleFileSystemProtocolGuid = { 0x964E5B22, 0x6459, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}\r
gEfiTapeIoProtocolGuid = { 0x1E93E633, 0xD65A, 0x459E, { 0xAB, 0x84, 0x93, 0xD9, 0xEC, 0x26, 0x6D, 0x18 }}\r