X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FHiiConfigRouting.h;h=ceff241fe6914432609cca1d80843f4e7a5a6f10;hp=adaefb2fc6f2de49e4d989d341d34fd0c64f4194;hb=9df063a06aef048c042498e2f542fb693e93493a;hpb=44717a398fddc4df1f4aeaa70bcd7a043187ed34 diff --git a/MdePkg/Include/Protocol/HiiConfigRouting.h b/MdePkg/Include/Protocol/HiiConfigRouting.h index adaefb2fc6..ceff241fe6 100644 --- a/MdePkg/Include/Protocol/HiiConfigRouting.h +++ b/MdePkg/Include/Protocol/HiiConfigRouting.h @@ -5,14 +5,14 @@ information from configuration applications, routing the results to the appropriate drivers. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials - 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 - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -30,10 +30,10 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; This function allows the caller to request the current configuration for one or more named elements from one or more drivers. The resulting string is in the standard HII - configuration string format. If Successful Results contains an + configuration string format. If Successful, Results contains an equivalent string with "=" and the values associated with all names added in. The expected implementation is for each - substring in the Request, call the HII + substring in the Request to call the HII Configuration Routing Protocol ExtractProtocol function for the driver corresponding to the at the start of the substring. The request fails if no driver @@ -45,7 +45,7 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; They must have an additional description indicating the type of alternative configuration the string represents, "ALTCFG=". That (when converted from - Hex UNICODE to binary) is a reference to a string in the + hexadecimal (encoded as text) to binary) is a reference to a string in the associated string pack. As an example, assume that the Request string is: GUID=...&NAME=00480050&PATH=...&Fred&George&Ron&Neville A result @@ -56,29 +56,26 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; @param This Points to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param Request A null-terminated Unicode string in - format. + @param Request A null-terminated string in format. @param Progress On return, points to a character in the Request string. Points to the string's null - terminator if request was successful. Points + terminator if the request was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful - @param Results Null-terminated Unicode string in - format which has all - values filled in for the names in the - Request string. String to be allocated by - the called function. + @param Results A null-terminated string in format + which has all values filled in for the names in the + Request string. @retval EFI_SUCCESS The Results string is filled with the values corresponding to all requested names. - @retval EFI_OUT_OF_MEMORY Not enough memory to store the + @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future protocols. @@ -87,8 +84,9 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; for the Request parameter would result in this type of error. The Progress parameter - is set to NULL. EFI_NOT_FOUND - Routing data doesn't match any + is set to NULL. + + @retval EFI_NOT_FOUND Routing data doesn't match any known driver. Progress set to the "G" in "GUID" of the routing header that doesn't @@ -98,8 +96,8 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; configuration extraction. @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set - to most recent & before the - error or the beginning of the + to the most recent & before the + error, or the beginning of the string. @retval EFI_INVALID_PARAMETER Unknown name. @@ -107,7 +105,7 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ROUTING_EXTRACT_CONFIG)( +(EFIAPI * EFI_HII_EXTRACT_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, @@ -115,30 +113,28 @@ EFI_STATUS ); /** - + This function allows the caller to request the current configuration + for the entirety of the current HII database and returns the data in + a null-terminated string. + This function allows the caller to request the current configuration for all of the current HII database. The results include both the current and alternate configurations as - described in ExtractConfig() above. Implementation note: This - call has deceptively few inputs but the implementation is likely - to be somewhat complex. The requirement is to scan all IFR in - the HII database to determine the list of names and then request - the configuration using the corresponding drivers?? - EFI_HII_CONFIG_ACCESS_PROTOCOL.ExtractConfig() interfaces below. + described in ExtractConfig() above. @param This Points to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param Results A null-terminated Unicode string in - format which has all - values filled in for the names in the Request - string. String to be allocated by this - function. De-allocation is up to the caller. + @param Results A null-terminated string in + format which has all values filled in for the + names in the Request string. + String to be allocated by this function. + De-allocation is up to the caller. @retval EFI_SUCCESS The Results string is filled with the values corresponding to all requested names. - @retval EFI_OUT_OF_MEMORY Not enough memory to store the + @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future protocols. @@ -151,7 +147,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ROUTING_EXPORT_CONFIG)( +(EFIAPI * EFI_HII_EXPORT_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, OUT EFI_STRING *Results ); @@ -170,20 +166,19 @@ EFI_STATUS @param This Points to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param Configuration A null-terminated Unicode string in - format. + @param Configuration A null-terminated string in format. @param Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in - the first name / value pair) or the + the first name / value pair), or the terminating NULL if all was successful. @retval EFI_SUCCESS The results have been distributed or are awaiting distribution. - @retval EFI_OUT_OF_MEMORY Not enough memory to store the + @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future protocols. @@ -192,13 +187,13 @@ EFI_STATUS Results parameter would result in this type of error. - @retval EFI_NOT_FOUND Target for the specified routing data - was not found + @retval EFI_NOT_FOUND The target for the specified routing data + was not found. **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ROUTING_ROUTE_CONFIG)( +(EFIAPI * EFI_HII_ROUTE_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress @@ -212,37 +207,37 @@ EFI_STATUS consists of a list of formatted names. It uses the offset in the name to determine the index into the Block to start the extraction and the width of each name to determine the - number of bytes to extract. These are mapped to a UNICODE value + number of bytes to extract. These are mapped to a string using the equivalent of the C "%x" format (with optional leading spaces). The call fails if, for any (offset, width) pair in ConfigRequest, offset+value >= BlockSize. @param This Points to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param ConfigRequest A null-terminated Unicode string in - format. + @param ConfigRequest A null-terminated string in format. - @param Block Array of bytes defining the block's + @param Block An array of bytes defining the block's configuration. - @param BlockSize Length in bytes of Block. + @param BlockSize The length in bytes of Block. - @param Config Filled-in configuration string. String + @param Config The filled-in configuration string. String allocated by the function. Returned only if - call is successful. + call is successful. The null-terminated string + will be format. @param Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in - the first name / value pair) or the + the first name / value pair), or the terminating NULL if all was successful. @retval EFI_SUCCESS The request succeeded. Progress points to the null terminator at the end of the ConfigRequest string. - @retval EFI_OUT_OF_MEMORY Not enough memory to allocate + @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config. Progress points to the first character of ConfigRequest. @@ -253,11 +248,11 @@ EFI_STATUS to the first character of ConfigRequest. - @retval EFI_NOT_FOUND Target for the specified routing data + @retval EFI_NOT_FOUND The target for the specified routing data was not found. Progress points to the 'G' in "GUID" of the errant routing - data. EFI_DEVICE_ERROR Block not large - enough. Progress undefined. + data. + @retval EFI_DEVICE_ERROR The block is not large enough. Progress undefined. @retval EFI_INVALID_PARAMETER Encountered non formatted string. Block is @@ -268,7 +263,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ROUTING_BLOCK_TO_CONFIG)( +(EFIAPI * EFI_HII_BLOCK_TO_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING ConfigRequest, IN CONST UINT8 *Block, @@ -295,8 +290,7 @@ EFI_STATUS @param This Points to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param ConfigResp A null-terminated Unicode string in - format. + @param ConfigResp A null-terminated string in format. @param Block A possibly null array of bytes representing the current block. Only @@ -306,7 +300,7 @@ EFI_STATUS BlockLength parameter is (on input) shorter than required by the Configuration string, only the BlockSize - parameter is updated and an appropriate + parameter is updated, and an appropriate status (see below) is returned. @param BlockSize The length of the Block in units of UINT8. @@ -319,12 +313,12 @@ EFI_STATUS of the most recent "&" before the first failing name / value pair (or the beginning of the string if the failure is in the first - name / value pair) or the terminating NULL + name / value pair), or the terminating NULL if all was successful. @retval EFI_SUCCESS The request succeeded. Progress points to the null terminator at the end of the ConfigResp string. - @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config. Progress + @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config. Progress points to the first character of ConfigResp. @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or Block parameter would result in this type of @@ -338,7 +332,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ROUTING_CONFIG_TO_BLOCK)( +(EFIAPI * EFI_HII_CONFIG_TO_BLOCK)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING ConfigResp, IN OUT UINT8 *Block, @@ -350,8 +344,8 @@ EFI_STATUS This helper function is to be called by drivers to extract portions of a larger configuration string. - @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param Configuration A null-terminated Unicode string in format. + @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. + @param ConfigResp A null-terminated string in format. @param Guid A pointer to the GUID value to search for in the routing portion of the ConfigResp string when retrieving the requested data. If Guid is NULL, then all GUID @@ -371,18 +365,19 @@ EFI_STATUS @param AltCfgResp A pointer to a buffer which will be allocated by the function which contains the retrieved string as requested. This buffer is only allocated if the call was successful. + The null-terminated string will be format. @retval EFI_SUCCESS The request succeeded. The requested data was extracted and placed in the newly allocated AltCfgResp buffer. @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp. @retval EFI_INVALID_PARAMETER Any parameter is invalid. - @retval EFI_NOT_FOUND Target for the specified routing data was not found. + @retval EFI_NOT_FOUND The target for the specified routing data was not found. **/ typedef EFI_STATUS (EFIAPI * EFI_HII_GET_ALT_CFG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, - IN CONST EFI_STRING Configuration, + IN CONST EFI_STRING ConfigResp, IN CONST EFI_GUID *Guid, IN CONST EFI_STRING Name, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, @@ -396,12 +391,12 @@ EFI_STATUS /// instance of this protocol in the system. /// struct _EFI_HII_CONFIG_ROUTING_PROTOCOL { - EFI_HII_ROUTING_EXTRACT_CONFIG ExtractConfig; - EFI_HII_ROUTING_EXPORT_CONFIG ExportConfig; - EFI_HII_ROUTING_ROUTE_CONFIG RouteConfig; - EFI_HII_ROUTING_BLOCK_TO_CONFIG BlockToConfig; - EFI_HII_ROUTING_CONFIG_TO_BLOCK ConfigToBlock; - EFI_HII_GET_ALT_CFG GetAltConfig; + EFI_HII_EXTRACT_CONFIG ExtractConfig; + EFI_HII_EXPORT_CONFIG ExportConfig; + EFI_HII_ROUTE_CONFIG RouteConfig; + EFI_HII_BLOCK_TO_CONFIG BlockToConfig; + EFI_HII_CONFIG_TO_BLOCK ConfigToBlock; + EFI_HII_GET_ALT_CFG GetAltConfig; }; extern EFI_GUID gEfiHiiConfigRoutingProtocolGuid;