mirror of
				https://gitlab.com/qemu-project/edk2.git
				synced 2025-10-30 07:56:39 +08:00 
			
		
		
		
	MdeModulePkg: Deprecate EFI_UNICODE_COLLATION_PROTOCOL_GUID
Adding to the previous commit deprecating EFI_UNICODE_COLLATION_PROTOCOL_GUID in MdeModulePkg. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
This commit is contained in:
		| @ -802,12 +802,6 @@ | ||||
|   # @Prompt Enable variable statistics collection. | ||||
|   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|FALSE|BOOLEAN|0x0001003f | ||||
|  | ||||
|   ## Indicates if Unicode Collation Protocol will be installed.<BR><BR> | ||||
|   #   TRUE  - Installs Unicode Collation Protocol.<BR> | ||||
|   #   FALSE - Does not install Unicode Collation Protocol.<BR> | ||||
|   # @Prompt Enable Unicode Collation support. | ||||
|   gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollationSupport|TRUE|BOOLEAN|0x00010040 | ||||
|  | ||||
|   ## Indicates if Unicode Collation 2 Protocol will be installed.<BR><BR> | ||||
|   #   TRUE  - Installs Unicode Collation 2 Protocol.<BR> | ||||
|   #   FALSE - Does not install Unicode Collation 2 Protocol.<BR> | ||||
|  | ||||
| @ -691,12 +691,6 @@ | ||||
|                                                                                               "TRUE  - Statistics about variable usage will be collected.<BR>\n" | ||||
|                                                                                               "FALSE - Statistics about variable usage will not be collected.<BR>" | ||||
|  | ||||
| #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdUnicodeCollationSupport_PROMPT  #language en-US "Enable Unicode Collation support" | ||||
|  | ||||
| #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdUnicodeCollationSupport_HELP  #language en-US "Indicates if Unicode Collation Protocol will be installed.<BR><BR>\n" | ||||
|                                                                                             "TRUE  - Installs Unicode Collation Protocol.<BR>\n" | ||||
|                                                                                             "FALSE - Does not install Unicode Collation Protocol.<BR>" | ||||
|  | ||||
| #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdUnicodeCollation2Support_PROMPT  #language en-US "Enable Unicode Collation 2 support" | ||||
|  | ||||
| #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdUnicodeCollation2Support_HELP  #language en-US "Indicates if Unicode Collation 2 Protocol will be installed.<BR><BR>\n" | ||||
|  | ||||
| @ -2,8 +2,8 @@ | ||||
| #  English module that provides Unicode Collation supports. | ||||
| # | ||||
| #  This driver installs Unicode ISO 639-2 Collation and | ||||
| #  RFC 4646 Unicode Collation 2 protocols based on feature flags | ||||
| #  PcdUnicodeCollationSupport & PcdUnicodeCollation2Support respectively. | ||||
| #  RFC 4646 Unicode Collation 2 protocols based on feature flag | ||||
| #  PcdUnicodeCollation2Support. | ||||
| #  It allows code running in the boot services environment to perform lexical | ||||
| #  comparison functions on Unicode strings for English languages. | ||||
| # | ||||
| @ -43,11 +43,9 @@ | ||||
|   PcdLib | ||||
|  | ||||
| [FeaturePcd] | ||||
|   gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollationSupport     ## CONSUMES | ||||
|   gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollation2Support    ## CONSUMES | ||||
|  | ||||
| [Protocols] | ||||
|   gEfiUnicodeCollationProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollationSupport      ## SOMETIMES_PRODUCES | ||||
|   gEfiUnicodeCollation2ProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollation2Support    ## PRODUCES | ||||
|  | ||||
| [UserExtensions.TianoCore."ExtraFiles"] | ||||
|  | ||||
| @ -2,8 +2,8 @@ | ||||
| // English module that provides Unicode Collation supports. | ||||
| // | ||||
| // This driver installs Unicode ISO 639-2 Collation and | ||||
| // RFC 4646 Unicode Collation 2 protocols based on feature flags | ||||
| // PcdUnicodeCollationSupport & PcdUnicodeCollation2Support respectively. | ||||
| // RFC 4646 Unicode Collation 2 protocols based on feature flag | ||||
| // PcdUnicodeCollation2Support respectively. | ||||
| // It allows code running in the boot services environment to perform lexical | ||||
| // comparison functions on Unicode strings for English languages. | ||||
| // | ||||
| @ -16,5 +16,5 @@ | ||||
|  | ||||
| #string STR_MODULE_ABSTRACT             #language en-US "Provides Unicode Collation support" | ||||
|  | ||||
| #string STR_MODULE_DESCRIPTION          #language en-US "This driver installs Unicode ISO 639-2 Collation and RFC 4646 Unicode Collation 2 protocols based on feature flags PcdUnicodeCollationSupport & PcdUnicodeCollation2Support respectively. It allows code running in the boot services environment to perform lexical comparison functions on Unicode strings for English languages." | ||||
| #string STR_MODULE_DESCRIPTION          #language en-US "This driver installs Unicode ISO 639-2 Collation and RFC 4646 Unicode Collation 2 protocols based on feature flag PcdUnicodeCollation2Support. It allows code running in the boot services environment to perform lexical comparison functions on Unicode strings for English languages." | ||||
|  | ||||
|  | ||||
| @ -120,42 +120,13 @@ InitializeUnicodeCollationEng ( | ||||
|   } | ||||
|  | ||||
|   if (FeaturePcdGet (PcdUnicodeCollation2Support)) { | ||||
|     if (FeaturePcdGet (PcdUnicodeCollationSupport)) { | ||||
|       Status = gBS->InstallMultipleProtocolInterfaces ( | ||||
|                       &mHandle, | ||||
|                       &gEfiUnicodeCollationProtocolGuid, | ||||
|                       &UnicodeEng, | ||||
|                       &gEfiUnicodeCollation2ProtocolGuid, | ||||
|                       &Unicode2Eng, | ||||
|                       NULL | ||||
|                       ); | ||||
|       ASSERT_EFI_ERROR (Status); | ||||
|     } else { | ||||
|       Status = gBS->InstallMultipleProtocolInterfaces ( | ||||
|                       &mHandle, | ||||
|                       &gEfiUnicodeCollation2ProtocolGuid, | ||||
|                       &Unicode2Eng, | ||||
|                       NULL | ||||
|                       ); | ||||
|       ASSERT_EFI_ERROR (Status); | ||||
|     } | ||||
|   } else { | ||||
|     if (FeaturePcdGet (PcdUnicodeCollationSupport)) { | ||||
|       Status = gBS->InstallMultipleProtocolInterfaces ( | ||||
|                       &mHandle, | ||||
|                       &gEfiUnicodeCollationProtocolGuid, | ||||
|                       &UnicodeEng, | ||||
|                       NULL | ||||
|                       ); | ||||
|       ASSERT_EFI_ERROR (Status); | ||||
|     } else { | ||||
|       // | ||||
|       // This module must support to produce at least one of Unicode Collation Protocol | ||||
|       // and Unicode Collation 2 Protocol. | ||||
|       // | ||||
|       ASSERT (FALSE); | ||||
|       Status = EFI_UNSUPPORTED; | ||||
|     } | ||||
|     Status = gBS->InstallMultipleProtocolInterfaces ( | ||||
|                     &mHandle, | ||||
|                     &gEfiUnicodeCollation2ProtocolGuid, | ||||
|                     &Unicode2Eng, | ||||
|                     NULL | ||||
|                     ); | ||||
|     ASSERT_EFI_ERROR (Status); | ||||
|   } | ||||
|  | ||||
|   return Status; | ||||
|  | ||||
| @ -60,7 +60,6 @@ | ||||
| [Protocols] | ||||
|   gEfiDevicePathProtocolGuid                                               ## TO_START | ||||
|   gEfiFirmwareVolume2ProtocolGuid                                          ## TO_START | ||||
|   gEfiUnicodeCollationProtocolGuid                                         ## TO_START | ||||
|   gEfiUnicodeCollation2ProtocolGuid                                        ## TO_START | ||||
|   gEfiSimpleFileSystemProtocolGuid                                         ## BY_START | ||||
|  | ||||
|  | ||||
| @ -271,7 +271,7 @@ InitializeUnicodeCollationSupportWorker ( | ||||
|     return Status; | ||||
|   } | ||||
|  | ||||
|   Iso639Language = (BOOLEAN)(ProtocolGuid == &gEfiUnicodeCollationProtocolGuid); | ||||
|   Iso639Language = (BOOLEAN)(ProtocolGuid == &gEfiUnicodeCollation2ProtocolGuid); | ||||
|   GetEfiGlobalVariable2 (VariableName, (VOID **)&Language, NULL); | ||||
|  | ||||
|   ReturnStatus = EFI_UNSUPPORTED; | ||||
| @ -350,18 +350,6 @@ InitializeUnicodeCollationSupport ( | ||||
|              L"PlatformLang", | ||||
|              (CONST CHAR8 *)PcdGetPtr (PcdUefiVariableDefaultPlatformLang) | ||||
|              ); | ||||
|   // | ||||
|   // If the attempt to use Unicode Collation 2 Protocol fails, then we fall back | ||||
|   // on the ISO 639-2 Unicode Collation Protocol. | ||||
|   // | ||||
|   if (EFI_ERROR (Status)) { | ||||
|     Status = InitializeUnicodeCollationSupportWorker ( | ||||
|                AgentHandle, | ||||
|                &gEfiUnicodeCollationProtocolGuid, | ||||
|                L"Lang", | ||||
|                (CONST CHAR8 *)PcdGetPtr (PcdUefiVariableDefaultLang) | ||||
|                ); | ||||
|   } | ||||
|  | ||||
|   return Status; | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Gowtham M
					Gowtham M