gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport and gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport
(based on FatPkg commit d865610b1f37a1ab84982151c1b1255cd51d1489) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
committed by
Jordan Justen
parent
2cd1716d61
commit
5779282da5
@@ -63,7 +63,6 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
FatPkg/FatPkg.dec
|
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiRuntimeServicesTableLib
|
UefiRuntimeServicesTableLib
|
||||||
@@ -88,10 +87,6 @@
|
|||||||
gEfiUnicodeCollationProtocolGuid
|
gEfiUnicodeCollationProtocolGuid
|
||||||
gEfiUnicodeCollation2ProtocolGuid
|
gEfiUnicodeCollation2ProtocolGuid
|
||||||
|
|
||||||
[FeaturePcd]
|
|
||||||
gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport
|
|
||||||
gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollation2Support
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
|
||||||
|
@@ -20,11 +20,8 @@ EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollationInterface = NULL;
|
|||||||
/**
|
/**
|
||||||
Worker function to initialize Unicode Collation support.
|
Worker function to initialize Unicode Collation support.
|
||||||
|
|
||||||
This function searches Initialized Unicode Collation support based on PCDs:
|
It tries to locate Unicode Collation (2) protocol and matches it with current
|
||||||
PcdUnicodeCollation2Support and PcdUnicodeCollationSupport.
|
platform language code.
|
||||||
It first tries to locate Unicode Collation 2 protocol and matches it with current
|
|
||||||
platform language code. If for any reason the first attempt fails, it then tries to
|
|
||||||
use Unicode Collation Protocol.
|
|
||||||
|
|
||||||
@param AgentHandle The handle used to open Unicode Collation (2) protocol.
|
@param AgentHandle The handle used to open Unicode Collation (2) protocol.
|
||||||
@param ProtocolGuid The pointer to Unicode Collation (2) protocol GUID.
|
@param ProtocolGuid The pointer to Unicode Collation (2) protocol GUID.
|
||||||
@@ -114,9 +111,7 @@ InitializeUnicodeCollationSupportWorker (
|
|||||||
/**
|
/**
|
||||||
Initialize Unicode Collation support.
|
Initialize Unicode Collation support.
|
||||||
|
|
||||||
This function searches Initialized Unicode Collation support based on PCDs:
|
It tries to locate Unicode Collation 2 protocol and matches it with current
|
||||||
PcdUnicodeCollation2Support and PcdUnicodeCollationSupport.
|
|
||||||
It first tries to locate Unicode Collation 2 protocol and matches it with current
|
|
||||||
platform language code. If for any reason the first attempt fails, it then tries to
|
platform language code. If for any reason the first attempt fails, it then tries to
|
||||||
use Unicode Collation Protocol.
|
use Unicode Collation Protocol.
|
||||||
|
|
||||||
@@ -139,20 +134,17 @@ InitializeUnicodeCollationSupport (
|
|||||||
//
|
//
|
||||||
// First try to use RFC 4646 Unicode Collation 2 Protocol.
|
// First try to use RFC 4646 Unicode Collation 2 Protocol.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdUnicodeCollation2Support)) {
|
Status = InitializeUnicodeCollationSupportWorker (
|
||||||
Status = InitializeUnicodeCollationSupportWorker (
|
AgentHandle,
|
||||||
AgentHandle,
|
&gEfiUnicodeCollation2ProtocolGuid,
|
||||||
&gEfiUnicodeCollation2ProtocolGuid,
|
L"PlatformLang",
|
||||||
L"PlatformLang",
|
(CONST CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang)
|
||||||
(CONST CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang)
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the attempt to use Unicode Collation 2 Protocol fails, then we fall back
|
// If the attempt to use Unicode Collation 2 Protocol fails, then we fall back
|
||||||
// on the ISO 639-2 Unicode Collation Protocol.
|
// on the ISO 639-2 Unicode Collation Protocol.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdUnicodeCollationSupport) && EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Status = InitializeUnicodeCollationSupportWorker (
|
Status = InitializeUnicodeCollationSupportWorker (
|
||||||
AgentHandle,
|
AgentHandle,
|
||||||
&gEfiUnicodeCollationProtocolGuid,
|
&gEfiUnicodeCollationProtocolGuid,
|
||||||
|
@@ -19,11 +19,3 @@
|
|||||||
DEC_VERSION = 0x00010005
|
DEC_VERSION = 0x00010005
|
||||||
PACKAGE_NAME = FatPkg
|
PACKAGE_NAME = FatPkg
|
||||||
PACKAGE_GUID = 8EA68A2C-99CB-4332-85C6-DD5864EAA674
|
PACKAGE_GUID = 8EA68A2C-99CB-4332-85C6-DD5864EAA674
|
||||||
|
|
||||||
[PcdsFeatureFlag.common]
|
|
||||||
gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollationSupport|TRUE|BOOLEAN|0x00010001
|
|
||||||
gEfiFatPkgTokenSpaceGuid.PcdUnicodeCollation2Support|TRUE|BOOLEAN|0x00010002
|
|
||||||
|
|
||||||
[Guids.common]
|
|
||||||
gEfiFatPkgTokenSpaceGuid = {0xc8e92dba, 0x1d92, 0x411f, {0xae, 0xa, 0x1d, 0xbe, 0xd8, 0xf1, 0x32, 0x99}}
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user