Minor code enhancement.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9686 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24 2010-01-07 09:17:03 +00:00
parent ce9b1e3ae0
commit 8e8ae2daec
4 changed files with 41 additions and 41 deletions

View File

@ -4,7 +4,7 @@
2) BDS boot device connect interface 2) BDS boot device connect interface
3) BDS Misc interfaces for mainting boot variable, ouput string. 3) BDS Misc interfaces for mainting boot variable, ouput string.
Copyright (c) 2004 - 2009, Intel Corporation. <BR> Copyright (c) 2004 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -566,10 +566,17 @@ typedef struct {
UINTN Maxlen; UINTN Maxlen;
} POOL_PRINT; } POOL_PRINT;
typedef
VOID
(*DEV_PATH_FUNCTION) (
IN OUT POOL_PRINT *Str,
IN VOID *DevPath
);
typedef struct { typedef struct {
UINT8 Type; UINT8 Type;
UINT8 SubType; UINT8 SubType;
VOID (*Function) (POOL_PRINT *, VOID *); DEV_PATH_FUNCTION Function;
} DEVICE_PATH_STRING_TABLE; } DEVICE_PATH_STRING_TABLE;
extern EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid; extern EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid;

View File

@ -1,7 +1,7 @@
/** @file /** @file
Shadow all option rom Shadow all option rom
Copyright (c) 2004 - 2008, Intel Corporation. <BR> Copyright (c) 2004 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -20,6 +20,7 @@ UINT8 mShadowRomFlag = 0;
Shadow all opton ROM if the it is not done. Shadow all opton ROM if the it is not done.
**/ **/
VOID VOID
EFIAPI
ShadowAllOptionRom( ShadowAllOptionRom(
VOID VOID
) )

View File

@ -1,7 +1,7 @@
/** @file /** @file
The platform device manager reference implementation The platform device manager reference implementation
Copyright (c) 2004 - 2009, Intel Corporation. <BR> Copyright (c) 2004 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -978,22 +978,19 @@ CallDriverHealth (
} }
/* /**
Check the Driver Health status of a single controller and try to process it if not healthy. Check the Driver Health status of a single controller and try to process it if not healthy.
This function called by CheckAllControllersHealthStatus () function in order to process a specify This function called by CheckAllControllersHealthStatus () function in order to process a specify
contoller's health state. contoller's health state.
@param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. @param DriverHealthList A Pointer to the list contain all of the platform driver health information.
@param DriverHandle The handle of driver.
@param ControllerHandle The class guid specifies which form set will be displayed. @param ControllerHandle The class guid specifies which form set will be displayed.
@param ChildHandle The handle of the child controller to retrieve the health @param ChildHandle The handle of the child controller to retrieve the health
status on. This is an optional parameter that may be NULL. status on. This is an optional parameter that may be NULL.
@param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.
@param HealthStatus The health status of the controller. @param HealthStatus The health status of the controller.
@param MessageList An array of warning or error messages associated
with the controller specified by ControllerHandle and
ChildHandle. This is an optional parameter that may be NULL.
@param FormHiiHandle The HII handle for an HII form associated with the
controller specified by ControllerHandle and ChildHandle.
@retval EFI_INVALID_PARAMETER HealthStatus or DriverHealth is NULL. @retval EFI_INVALID_PARAMETER HealthStatus or DriverHealth is NULL.
@retval HealthStatus The Health status of specify controller. @retval HealthStatus The Health status of specify controller.
@ -1001,7 +998,7 @@ CallDriverHealth (
@retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol. @retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol.
@retval EFI_SUCCESS The Health related operation has been taken successfully. @retval EFI_SUCCESS The Health related operation has been taken successfully.
*/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
GetSingleControllerHealthStatus ( GetSingleControllerHealthStatus (
@ -1306,14 +1303,14 @@ Done:
} }
/* /**
Check the healthy status of the platform, this function will return immediately while found one driver Check the healthy status of the platform, this function will return immediately while found one driver
in the platform are not healthy. in the platform are not healthy.
@retval FALSE at least one driver in the platform are not healthy. @retval FALSE at least one driver in the platform are not healthy.
@retval TRUE No controller install Driver Health Protocol, @retval TRUE No controller install Driver Health Protocol,
or all controllers in the platform are in healthy status. or all controllers in the platform are in healthy status.
*/ **/
BOOLEAN BOOLEAN
PlaformHealthStatusCheck ( PlaformHealthStatusCheck (
VOID VOID
@ -1570,7 +1567,7 @@ ProcessMessages (
} }
/* /**
Repair the whole platform. Repair the whole platform.
This function is the main entry for user choose "Repair All" in the front page. This function is the main entry for user choose "Repair All" in the front page.
@ -1580,7 +1577,7 @@ ProcessMessages (
@param DriverHealthList A Pointer to the list contain all of the platform driver health @param DriverHealthList A Pointer to the list contain all of the platform driver health
information. information.
*/ **/
VOID VOID
PlatformRepairAll ( PlatformRepairAll (
IN LIST_ENTRY *DriverHealthList IN LIST_ENTRY *DriverHealthList
@ -1671,10 +1668,10 @@ DriverHealthSelectBestLanguage (
@param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the
located Component Name (2) instance. located Component Name (2) instance.
@param EFI_SUCCESS The Component Name (2) protocol instance is successfully located and we find @retval EFI_SUCCESS The Component Name (2) protocol instance is successfully located and we find
the best matching language it support. the best matching language it support.
@param EFI_UNSUPPORTED The input Language is not supported by the Component Name (2) protocol. @retval EFI_UNSUPPORTED The input Language is not supported by the Component Name (2) protocol.
@param Other Some error occurs when locating Component Name (2) protocol instance or finding @retval Other Some error occurs when locating Component Name (2) protocol instance or finding
the supported language. the supported language.
**/ **/
@ -1893,7 +1890,6 @@ GetControllerNameWorker (
It will also be NULL for bus drivers that attempt to retrieve the name It will also be NULL for bus drivers that attempt to retrieve the name
of the bus controller. It will not be NULL for a bus driver that attempts of the bus controller. It will not be NULL for a bus driver that attempts
to retrieve the name of a child controller. to retrieve the name of a child controller.
@param Language An ASCII string that represents the language command line option.
@param ControllerName A pointer to the Unicode string to return. This Unicode string @param ControllerName A pointer to the Unicode string to return. This Unicode string
is the name of the controller specified by ControllerHandle and ChildHandle. is the name of the controller specified by ControllerHandle and ChildHandle.

View File

@ -1,7 +1,7 @@
/** @file /** @file
The platform device manager reference implement The platform device manager reference implement
Copyright (c) 2004 - 2009, Intel Corporation. <BR> Copyright (c) 2004 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -232,22 +232,19 @@ CallDeviceManager (
); );
/* /**
Check the Driver Health status of a single controller and try to process it if not healthy. Check the Driver Health status of a single controller and try to process it if not healthy.
This function called by CheckAllControllersHealthStatus () function in order to process a specify This function called by CheckAllControllersHealthStatus () function in order to process a specify
contoller's health state. contoller's health state.
@param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. @param DriverHealthList A Pointer to the list contain all of the platform driver health information.
@param DriverHandle The handle of driver.
@param ControllerHandle The class guid specifies which form set will be displayed. @param ControllerHandle The class guid specifies which form set will be displayed.
@param ChildHandle The handle of the child controller to retrieve the health @param ChildHandle The handle of the child controller to retrieve the health
status on. This is an optional parameter that may be NULL. status on. This is an optional parameter that may be NULL.
@param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.
@param HealthStatus The health status of the controller. @param HealthStatus The health status of the controller.
@param MessageList An array of warning or error messages associated
with the controller specified by ControllerHandle and
ChildHandle. This is an optional parameter that may be NULL.
@param FormHiiHandle The HII handle for an HII form associated with the
controller specified by ControllerHandle and ChildHandle.
@retval EFI_INVALID_PARAMETER HealthStatus or DriverHealth is NULL. @retval EFI_INVALID_PARAMETER HealthStatus or DriverHealth is NULL.
@retval HealthStatus The Health status of specify controller. @retval HealthStatus The Health status of specify controller.
@ -255,7 +252,7 @@ CallDeviceManager (
@retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol. @retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol.
@retval EFI_SUCCESS The Health related operation has been taken successfully. @retval EFI_SUCCESS The Health related operation has been taken successfully.
*/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
GetSingleControllerHealthStatus ( GetSingleControllerHealthStatus (
@ -285,20 +282,20 @@ GetAllControllersHealthStatus (
IN OUT LIST_ENTRY *DriverHealthList IN OUT LIST_ENTRY *DriverHealthList
); );
/* /**
Check the healthy status of the platform, this function will return immediately while found one driver Check the healthy status of the platform, this function will return immediately while found one driver
in the platform are not healthy. in the platform are not healthy.
@retval FALSE at least one driver in the platform are not healthy. @retval FALSE at least one driver in the platform are not healthy.
@retval TRUE No controller install Driver Health Protocol, @retval TRUE No controller install Driver Health Protocol,
or all controllers in the platform are in healthy status. or all controllers in the platform are in healthy status.
*/ **/
BOOLEAN BOOLEAN
PlaformHealthStatusCheck ( PlaformHealthStatusCheck (
VOID VOID
); );
/* /**
Repair the whole platform. Repair the whole platform.
This function is the main entry for user choose "Repair All" in the front page. This function is the main entry for user choose "Repair All" in the front page.
@ -308,7 +305,7 @@ PlaformHealthStatusCheck (
@param DriverHealthList A Pointer to the list contain all of the platform driver health @param DriverHealthList A Pointer to the list contain all of the platform driver health
information. information.
*/ **/
VOID VOID
PlatformRepairAll ( PlatformRepairAll (
IN LIST_ENTRY *DriverHealthList IN LIST_ENTRY *DriverHealthList
@ -420,10 +417,10 @@ DriverHealthSelectBestLanguage (
@param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the
located Component Name (2) instance. located Component Name (2) instance.
@param EFI_SUCCESS The Component Name (2) protocol instance is successfully located and we find @retval EFI_SUCCESS The Component Name (2) protocol instance is successfully located and we find
the best matching language it support. the best matching language it support.
@param EFI_UNSUPPORTED The input Language is not supported by the Component Name (2) protocol. @retval EFI_UNSUPPORTED The input Language is not supported by the Component Name (2) protocol.
@param Other Some error occurs when locating Component Name (2) protocol instance or finding @retval Other Some error occurs when locating Component Name (2) protocol instance or finding
the supported language. the supported language.
**/ **/
@ -504,7 +501,6 @@ DriverHealthGetDriverName (
@retval Other The controller name cannot be retrieved from Component Name (2) protocol. @retval Other The controller name cannot be retrieved from Component Name (2) protocol.
**/ **/
EFI_STATUS EFI_STATUS
GetControllerNameWorker ( GetControllerNameWorker (
IN EFI_GUID *ProtocolGuid, IN EFI_GUID *ProtocolGuid,