]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add protocol defintions for DriverConfiguration2, DriverDiagnostic2 & Unicode Collcat...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 8 Jul 2008 07:04:59 +0000 (07:04 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 8 Jul 2008 07:04:59 +0000 (07:04 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5417 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Foundation/Efi/Protocol/ComponentName2/ComponentName2.c
EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h [new file with mode: 0644]

index fee053effbf83c56097ba280bda0686f594631a0..a1aedca6589d7ca06c65f808b1c9913c035e0d85 100644 (file)
@@ -11,11 +11,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 Module Name:\r
 \r
-    ComponentName.c\r
+    ComponentName2.c\r
     \r
 Abstract:\r
 \r
-    EFI Component Name Protocol\r
+    EFI Component Name2 Protocol\r
 \r
 Revision History\r
 \r
@@ -26,4 +26,4 @@ Revision History
 \r
 EFI_GUID  gEfiComponentName2ProtocolGuid = EFI_COMPONENT_NAME2_PROTOCOL_GUID;\r
 \r
-EFI_GUID_STRING(&gEfiComponentName2ProtocolGuid, "Component Name2 Protocol", "EFI 2.0 Component Name2 Protocol");\r
+EFI_GUID_STRING(&gEfiComponentName2ProtocolGuid, "Component Name2 Protocol", "UEFI 2.0 Component Name2 Protocol");\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.c
new file mode 100644 (file)
index 0000000..8cbc4a6
--- /dev/null
@@ -0,0 +1,30 @@
+/*++\r
+\r
+Copyright (c) 2008, 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
+Module Name:\r
+\r
+    DriverConfiguration.c\r
+\r
+Abstract:\r
+\r
+    EFI Driver Configuration Protocol\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#include "EfiSpec.h"\r
+#include EFI_PROTOCOL_DEFINITION (DriverConfiguration2)\r
+\r
+EFI_GUID  gEfiDriverConfiguration2ProtocolGuid = EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID;\r
+\r
+EFI_GUID_STRING\r
+  (&gEfiDriverConfiguration2ProtocolGuid, "Driver Configuration2 Protocol", "UEFI 2.0 Driver Configuration2 Protocol");\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverConfiguration2/DriverConfiguration2.h
new file mode 100644 (file)
index 0000000..62156bb
--- /dev/null
@@ -0,0 +1,201 @@
+/*++\r
+\r
+Copyright (c) 2008, 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
+Module Name:\r
+\r
+    DriverConfiguration2.h\r
+\r
+Abstract:\r
+\r
+    EFI Driver Configuration2 Protocol\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#ifndef _EFI_DRIVER_CONFIGURATION2_H_\r
+#define _EFI_DRIVER_CONFIGURATION2_H_\r
+\r
+#include EFI_PROTOCOL_DEFINITION (DriverConfiguration)\r
+\r
+//\r
+// Global ID for the Driver Configuration Protocol\r
+//\r
+#define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \\r
+  { \\r
+    0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe} \\r
+  }\r
+\r
+EFI_FORWARD_DECLARATION (EFI_DRIVER_CONFIGURATION2_PROTOCOL);\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS) (\r
+  IN EFI_DRIVER_CONFIGURATION2_PROTOCOL                       * This,\r
+  IN  EFI_HANDLE                                              ControllerHandle,\r
+  IN  EFI_HANDLE                                              ChildHandle  OPTIONAL,\r
+  IN  CHAR8                                                   *Language,\r
+  OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED                * ActionRequired\r
+  );\r
+\r
+/*++\r
+\r
+  Routine Description:\r
+    Allows the user to set controller specific options for a controller that a\r
+    driver is currently managing.\r
+\r
+  Arguments:\r
+    This             - A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
+    ControllerHandle - The handle of the controller to set options on.\r
+    ChildHandle      - The handle of the child controller to set options on.  This\r
+                       is an optional parameter that may be NULL.  It will be NULL\r
+                       for device drivers, and for a bus drivers that wish to set\r
+                       options for the bus controller.  It will not be NULL for a\r
+                       bus driver that wishes to set options for one of its child\r
+                       controllers.\r
+    Language         - A pointer to a three character RFC 3066 language identifier.\r
+                       This is the language of the user interface that should be\r
+                       presented to the user, and it must match one of the languages\r
+                       specified in SupportedLanguages.  The number of languages\r
+                       supported by a driver is up to the driver writer.\r
+    ActionRequired   - A pointer to the action that the calling agent is required\r
+                       to perform when this function returns.  See "Related\r
+                       Definitions" for a list of the actions that the calling\r
+                       agent is required to perform prior to accessing\r
+                       ControllerHandle again.\r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The driver specified by This successfully set the\r
+                            configuration options for the controller specified\r
+                            by ControllerHandle..\r
+    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ActionRequired is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support setting\r
+                            configuration options for the controller specified by\r
+                            ControllerHandle and ChildHandle.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the\r
+                            language specified by Language.\r
+    EFI_DEVICE_ERROR      - A device error occurred while attempt to set the\r
+                            configuration options for the controller specified\r
+                            by ControllerHandle and ChildHandle.\r
+    EFI_OUT_RESOURCES     - There are not enough resources available to set the\r
+                            configuration options for the controller specified\r
+                            by ControllerHandle and ChildHandle.\r
+\r
+--*/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID) (\r
+  IN EFI_DRIVER_CONFIGURATION2_PROTOCOL                       * This,\r
+  IN  EFI_HANDLE                                              ControllerHandle,\r
+  IN  EFI_HANDLE                                              ChildHandle  OPTIONAL\r
+  );\r
+\r
+/*++\r
+\r
+  Routine Description:\r
+    Tests to see if a controller's current configuration options are valid.\r
+\r
+  Arguments:\r
+    This             - A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
+    ControllerHandle - The handle of the controller to test if it's current\r
+                       configuration options are valid.\r
+    ChildHandle      - The handle of the child controller to test if it's current\r
+                       configuration options are valid.  This is an optional\r
+                       parameter that may be NULL.  It will be NULL for device\r
+                       drivers.  It will also be NULL for a bus drivers that wish\r
+                       to test the configuration options for the bus controller.\r
+                       It will not be NULL for a bus driver that wishes to test\r
+                       configuration options for one of its child controllers.\r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The controller specified by ControllerHandle and\r
+                            ChildHandle that is being managed by the driver\r
+                            specified by This has a valid set of  configuration\r
+                            options.\r
+    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
+    EFI_UNSUPPORTED       - The driver specified by This is not currently\r
+                            managing the controller specified by ControllerHandle\r
+                            and ChildHandle.\r
+    EFI_DEVICE_ERROR      - The controller specified by ControllerHandle and\r
+                            ChildHandle that is being managed by the driver\r
+                            specified by This has an invalid set of configuration\r
+                            options.\r
+\r
+--*/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS) (\r
+  IN EFI_DRIVER_CONFIGURATION2_PROTOCOL                       * This,\r
+  IN  EFI_HANDLE                                              ControllerHandle,\r
+  IN  EFI_HANDLE                                              ChildHandle  OPTIONAL,\r
+  IN  UINT32                                                  DefaultType,\r
+  OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED                * ActionRequired\r
+  );\r
+\r
+/*++\r
+\r
+  Routine Description:\r
+    Forces a driver to set the default configuration options for a controller.\r
+\r
+  Arguments:\r
+    This             - A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
+    ControllerHandle - The handle of the controller to force default configuration options on.\r
+    ChildHandle      - The handle of the child controller to force default configuration options on  This is an optional parameter that may be NULL.  It will be NULL for device drivers.  It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller.  It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.\r
+    DefaultType      - The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle.  See Table 9-1 for legal values.  A DefaultType of 0x00000000 must be supported by this protocol.\r
+    ActionRequired   - A pointer to the action that the calling agent is required to perform when this function returns.  See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.\r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.\r
+    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ActionRequired is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the configuration type specified by DefaultType.\r
+    EFI_DEVICE_ERROR      - A device error occurred while attempt to force the default configuration options on the controller specified by  ControllerHandle and ChildHandle.\r
+    EFI_OUT_RESOURCES     - There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.\r
+\r
+--*/\r
+\r
+//\r
+// Interface structure for the Driver Configuration Protocol\r
+//\r
+typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {\r
+  EFI_DRIVER_CONFIGURATION2_SET_OPTIONS    SetOptions;\r
+  EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID  OptionsValid;\r
+  EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;\r
+  CHAR8                                   *SupportedLanguages;\r
+} EFI_DRIVER_CONFIGURATION2_PROTOCOL;\r
+\r
+/*++\r
+\r
+  Protocol Description:\r
+    Used to set configuration options for a controller that an EFI Driver is managing.\r
+\r
+  Parameters:\r
+    SetOptions         - Allows the use to set drivers specific configuration\r
+                         options for a controller that the driver is currently\r
+                         managing.\r
+    OptionsValid       - Tests to see if a controller's current configuration\r
+                         options are valid.\r
+    ForceDefaults      - Forces a driver to set the default configuration options\r
+                         for a controller.\r
+    SupportedLanguages - A Null-terminated ASCII string that contains one or more\r
+                         RFC 3066 language codes.  This is the list of language\r
+                         codes that this protocol supports.\r
+\r
+--*/\r
+\r
+extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;\r
+\r
+#endif\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.c
new file mode 100644 (file)
index 0000000..87c6813
--- /dev/null
@@ -0,0 +1,30 @@
+/*++\r
+\r
+Copyright (c) 2008, 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
+Module Name:\r
+\r
+    DriverDiagnostics2.c\r
+\r
+Abstract:\r
+\r
+    EFI Driver Diagnostics2 Protocol\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#include "EfiSpec.h"\r
+#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics2)\r
+\r
+EFI_GUID  gEfiDriverDiagnostics2ProtocolGuid = EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID;\r
+\r
+EFI_GUID_STRING\r
+  (&gEfiDriverDiagnostics2ProtocolGuid, "Driver Diagnostics Protocol", "UEFI 2.0 Driver Diagnostics2 Protocol");\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics2/DriverDiagnostics2.h
new file mode 100644 (file)
index 0000000..83bc864
--- /dev/null
@@ -0,0 +1,135 @@
+/*++\r
+\r
+Copyright (c) 2008, 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
+Module Name:\r
+\r
+    DriverDiagnostics2.h\r
+\r
+Abstract:\r
+\r
+    EFI Driver Diagnostics2 Protocol\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#ifndef _EFI_DRIVER_DIAGNOSTICS2_H_\r
+#define _EFI_DRIVER_DIAGNOSTICS2_H_\r
+\r
+#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)\r
+\r
+//\r
+// Global ID for the Driver Diagnostics Protocol\r
+//\r
+#define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \\r
+  { \\r
+    0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x0, 0x17, 0x3b, 0x63} \\r
+  }\r
+\r
+EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS2_PROTOCOL);\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS) (\r
+  IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL                       * This,\r
+  IN  EFI_HANDLE                                            ControllerHandle,\r
+  IN  EFI_HANDLE                                            ChildHandle  OPTIONAL,\r
+  IN  EFI_DRIVER_DIAGNOSTIC_TYPE                            DiagnosticType,\r
+  IN  CHAR8                                                 *Language,\r
+  OUT EFI_GUID                                              **ErrorType,\r
+  OUT UINTN                                                 *BufferSize,\r
+  OUT CHAR16                                                **Buffer\r
+  );\r
+\r
+/*++\r
+\r
+  Routine Description:\r
+    Runs diagnostics on a controller.\r
+\r
+  Arguments:\r
+    This             - A pointer to the EFI_DRIVER_DIAGNOSTICS2_PROTOCOL instance.\r
+    ControllerHandle - The handle of the controller to run diagnostics on.\r
+    ChildHandle      - The handle of the child controller to run diagnostics on\r
+                       This is an optional parameter that may be NULL.  It will\r
+                       be NULL for device drivers.  It will also be NULL for a\r
+                       bus drivers that wish to run diagnostics on the bus\r
+                       controller.  It will not be NULL for a bus driver that\r
+                       wishes to run diagnostics on one of its child controllers.\r
+    DiagnosticType   - Indicates type of diagnostics to perform on the controller\r
+                       specified by ControllerHandle and ChildHandle.   See\r
+                       "Related Definitions" for the list of supported types.\r
+    Language         - A pointer to a NULL-terminated ASCII string array indicating\r
+                       the language. This is the language in which the optional\r
+                       error message should be returned in Buffer, and it must\r
+                       match one of the languages specified in SupportedLanguages.\r
+                       The number of languages supported by a driver is up to\r
+                       the driver writer. Language is specified in RFC 3066\r
+                       language code format.\r
+    ErrorType        - A GUID that defines the format of the data returned in\r
+                       Buffer.\r
+    BufferSize       - The size, in bytes, of the data returned in Buffer.\r
+    Buffer           - A buffer that contains a Null-terminated Unicode string\r
+                       plus some additional data whose format is defined by\r
+                       ErrorType.  Buffer is allocated by this function with\r
+                       AllocatePool(), and it is the caller's responsibility\r
+                       to free it with a call to FreePool().\r
+\r
+  Returns:\r
+    EFI_SUCCESS           - The controller specified by ControllerHandle and\r
+                            ChildHandle passed the diagnostic.\r
+    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid\r
+                            EFI_HANDLE.\r
+    EFI_INVALID_PARAMETER - Language is NULL.\r
+    EFI_INVALID_PARAMETER - ErrorType is NULL.\r
+    EFI_INVALID_PARAMETER - BufferType is NULL.\r
+    EFI_INVALID_PARAMETER - Buffer is NULL.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support\r
+                            running diagnostics for the controller specified\r
+                            by ControllerHandle and ChildHandle.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the\r
+                            type of diagnostic specified by DiagnosticType.\r
+    EFI_UNSUPPORTED       - The driver specified by This does not support the\r
+                            language specified by Language.\r
+    EFI_OUT_OF_RESOURCES  - There are not enough resources available to complete\r
+                            the diagnostics.\r
+    EFI_OUT_OF_RESOURCES  - There are not enough resources available to return\r
+                            the status information in ErrorType, BufferSize,\r
+                            and Buffer.\r
+    EFI_DEVICE_ERROR      - The controller specified by ControllerHandle and\r
+                            ChildHandle did not pass the diagnostic.\r
+\r
+--*/\r
+\r
+//\r
+// Interface structure for the Driver Diagnostics Protocol\r
+//\r
+typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL {\r
+  EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS  RunDiagnostics;\r
+  CHAR8                                    *SupportedLanguages;\r
+} EFI_DRIVER_DIAGNOSTICS2_PROTOCOL;\r
+\r
+/*++\r
+\r
+  Protocol Description:\r
+    Used to perform diagnostics on a controller that an EFI Driver is managing.\r
+\r
+  Parameters:\r
+    RunDiagnostics     - Runs diagnostics on a controller.\r
+    SupportedLanguages - A Null-terminated ASCII string that contains one or more\r
+                         RFC 3066 language codes.  This is the list of language\r
+                         codes that this protocol supports.\r
+\r
+--*/\r
+\r
+extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid;\r
+\r
+#endif\r
index 24f7212d174f0d2d3e3f7454d7642c0b5b7179aa..c075675ed74ac999ec9c50b560c5196a33555f2e 100644 (file)
@@ -77,8 +77,12 @@ COMPONENT_TYPE=   LIBRARY
   DriverBinding/DriverBinding.c\r
   DriverConfiguration/DriverConfiguration.h\r
   DriverConfiguration/DriverConfiguration.c\r
+  DriverConfiguration2/DriverConfiguration2.h\r
+  DriverConfiguration2/DriverConfiguration2.c\r
   DriverDiagnostics/DriverDiagnostics.h\r
   DriverDiagnostics/DriverDiagnostics.c\r
+  DriverDiagnostics2/DriverDiagnostics2.h\r
+  DriverDiagnostics2/DriverDiagnostics2.c\r
   Ebc/Ebc.h\r
   Ebc/Ebc.c\r
   EdidActive/EdidActive.h\r
@@ -157,6 +161,8 @@ COMPONENT_TYPE=   LIBRARY
   UgaIo/UgaIo.c\r
   UnicodeCollation/UnicodeCollation.h\r
   UnicodeCollation/UnicodeCollation.c\r
+  UnicodeCollation2/UnicodeCollation2.h\r
+  UnicodeCollation2/UnicodeCollation2.c\r
   UsbHostController/UsbHostController.h\r
   UsbHostController/UsbHostController.c\r
   UsbIo/UsbIo.h\r
index 6484a768db9c272f1012bcafd4a4963bd2d76ea6..cb6b98bbfba9973710ccbc853c6a54db17d428de 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2008, 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
@@ -23,7 +23,5 @@ Abstract:
 #include EFI_PROTOCOL_DEFINITION (UnicodeCollation)\r
 \r
 EFI_GUID  gEfiUnicodeCollationProtocolGuid = EFI_UNICODE_COLLATION_PROTOCOL_GUID;\r
-EFI_GUID  gEfiUnicodeCollation2ProtocolGuid = EFI_UNICODE_COLLATION2_PROTOCOL_GUID;\r
 \r
 EFI_GUID_STRING(&gEfiUnicodeCollationProtocolGuid, "Unicode Collation Protocol", "EFI 1.0 Unicode Collation Protocol");\r
-EFI_GUID_STRING(&gEfiUnicodeCollation2ProtocolGuid, "Unicode Collation Protocol", "UEFI 2.10 Unicode Collation Protocol");\r
index 28a15a2637ed3f21a5cb81293f1633cbe385d43e..3dfbaf7b503a33f0d4129d1a46ce31e1be80e266 100644 (file)
@@ -27,11 +27,6 @@ Abstract:
     0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \\r
   }\r
 \r
-#define EFI_UNICODE_COLLATION2_PROTOCOL_GUID \\r
-  { \\r
-    0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49} \\r
-  }\r
-\r
 EFI_FORWARD_DECLARATION (EFI_UNICODE_COLLATION_PROTOCOL);\r
 \r
 //\r
@@ -212,6 +207,5 @@ struct _EFI_UNICODE_COLLATION_PROTOCOL {
 };\r
 \r
 extern EFI_GUID gEfiUnicodeCollationProtocolGuid;\r
-extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;\r
 \r
 #endif\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.c
new file mode 100644 (file)
index 0000000..c808187
--- /dev/null
@@ -0,0 +1,27 @@
+/*++\r
+\r
+Copyright (c) 2008, 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
+Module Name:\r
+\r
+  UnicodeCollation2.c\r
+\r
+Abstract:\r
+\r
+  Unicode Collation2 protocol that follows the UEFI 2.0 specification.\r
+\r
+--*/\r
+\r
+#include "EfiSpec.h"\r
+#include EFI_PROTOCOL_DEFINITION (UnicodeCollation2)\r
+\r
+EFI_GUID  gEfiUnicodeCollation2ProtocolGuid = EFI_UNICODE_COLLATION2_PROTOCOL_GUID;\r
+\r
+EFI_GUID_STRING(&gEfiUnicodeCollation2ProtocolGuid, "Unicode Collation Protocol", "UEFI 2.0 Unicode Collation2 Protocol");\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation2/UnicodeCollation2.h
new file mode 100644 (file)
index 0000000..d250da5
--- /dev/null
@@ -0,0 +1,211 @@
+/*++\r
+\r
+Copyright (c) 2008, 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
+Module Name:\r
+\r
+  UnicodeCollation2.h\r
+\r
+Abstract:\r
+\r
+  Unicode Collation2 protocol that follows the UEFI 2.0 specification.\r
+\r
+--*/\r
+\r
+#ifndef _UNICODE_COLLATION2_H_\r
+#define _UNICODE_COLLATION2_H_\r
+\r
+#define EFI_UNICODE_COLLATION2_PROTOCOL_GUID \\r
+  { \\r
+    0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49} \\r
+  }\r
+\r
+EFI_FORWARD_DECLARATION (EFI_UNICODE_COLLATION2_PROTOCOL);\r
+\r
+//\r
+// Protocol data structures and defines\r
+//\r
+#define EFI_UNICODE_BYTE_ORDER_MARK          ((CHAR16)(0xfeff))\r
+#define EFI_UNICODE_BYTE_ORDER_MARK_REVERSE  ((CHAR16)(0xfffe))\r
+\r
+//\r
+// Protocol member functions\r
+//\r
+typedef\r
+INTN\r
+(EFIAPI *EFI_UNICODE_COLLATION2_STRICOLL) (\r
+  IN EFI_UNICODE_COLLATION2_PROTOCOL        * This,\r
+  IN CHAR16                                 *Str1,\r
+  IN CHAR16                                 *Str2\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Performs a case-insensitive comparison of two Null-terminated Unicode\r
+    strings.\r
+\r
+  Arguments:\r
+    This - Protocol instance pointer.\r
+    Str1 - A pointer to a Null-terminated Unicode string.\r
+    Str2 - A pointer to a Null-terminated Unicode string.\r
+\r
+  Returns:\r
+    0   - Str1 is equivalent to Str2\r
+    > 0 - Str1 is lexically greater than Str2\r
+    < 0 - Str1 is lexically less than Str2\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+BOOLEAN\r
+(EFIAPI *EFI_UNICODE_COLLATION2_METAIMATCH) (\r
+  IN EFI_UNICODE_COLLATION2_PROTOCOL        * This,\r
+  IN CHAR16                                 *String,\r
+  IN CHAR16                                 *Pattern\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Performs a case-insensitive comparison of a Null-terminated Unicode\r
+    pattern string and a Null-terminated Unicode string.\r
+\r
+  Arguments:\r
+    This - Protocol instance pointer.\r
+    String  - A pointer to a Null-terminated Unicode string.\r
+    Pattern - A pointer to a Null-terminated Unicode pattern string.\r
+\r
+  Returns:\r
+    TRUE -  Pattern was found in String.\r
+    FALSE - Pattern was not found in String.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_UNICODE_COLLATION2_STRLWR) (\r
+  IN EFI_UNICODE_COLLATION2_PROTOCOL        * This,\r
+  IN OUT CHAR16                             *Str\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Converts all the Unicode characters in a Null-terminated Unicode string to\r
+    lower case Unicode characters.\r
+\r
+  Arguments:\r
+    This - Protocol instance pointer.\r
+    String  - A pointer to a Null-terminated Unicode string.\r
+\r
+  Returns:\r
+    NONE\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_UNICODE_COLLATION2_STRUPR) (\r
+  IN EFI_UNICODE_COLLATION2_PROTOCOL        * This,\r
+  IN OUT CHAR16                             *Str\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+   Converts all the Unicode characters in a Null-terminated Unicode string to upper\r
+   case Unicode characters.\r
+\r
+  Arguments:\r
+    This   - Protocol instance pointer.\r
+    String - A pointer to a Null-terminated Unicode string.\r
+\r
+  Returns:\r
+    NONE\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_UNICODE_COLLATION2_FATTOSTR) (\r
+  IN EFI_UNICODE_COLLATION2_PROTOCOL        * This,\r
+  IN UINTN                                  FatSize,\r
+  IN CHAR8                                  *Fat,\r
+  OUT CHAR16                                *String\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+   Converts an 8.3 FAT file name in an OEM character set to a Null-terminated\r
+   Unicode string.\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    FatSize - The size of the string Fat in bytes.\r
+    Fat     - A pointer to a Null-terminated string that contains an 8.3 file\r
+               name using an OEM character set.\r
+    String  - A pointer to a Null-terminated Unicode string. The string must\r
+               be preallocated to hold FatSize Unicode characters.\r
+  Returns:\r
+    NONE\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+BOOLEAN\r
+(EFIAPI *EFI_UNICODE_COLLATION2_STRTOFAT) (\r
+  IN EFI_UNICODE_COLLATION2_PROTOCOL        * This,\r
+  IN CHAR16                                 *String,\r
+  IN UINTN                                  FatSize,\r
+  OUT CHAR8                                 *Fat\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Converts a Null-terminated Unicode string to legal characters in a FAT\r
+    filename using an OEM character set.\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    String  - A pointer to a Null-terminated Unicode string. The string must\r
+               be preallocated to hold FatSize Unicode characters.\r
+    FatSize - The size of the string Fat in bytes.\r
+    Fat     - A pointer to a Null-terminated string that contains an 8.3 file\r
+               name using an OEM character set.\r
+  Returns:\r
+    TRUE  - Fat is a Long File Name\r
+    FALSE - Fat is an 8.3 file name\r
+\r
+--*/\r
+;\r
+\r
+typedef struct _EFI_UNICODE_COLLATION2_PROTOCOL {\r
+  //\r
+  // general\r
+  //\r
+  EFI_UNICODE_COLLATION2_STRICOLL    StriColl;\r
+  EFI_UNICODE_COLLATION2_METAIMATCH  MetaiMatch;\r
+  EFI_UNICODE_COLLATION2_STRLWR      StrLwr;\r
+  EFI_UNICODE_COLLATION2_STRUPR      StrUpr;\r
+\r
+  //\r
+  // for supporting fat volumes\r
+  //\r
+  EFI_UNICODE_COLLATION2_FATTOSTR    FatToStr;\r
+  EFI_UNICODE_COLLATION2_STRTOFAT    StrToFat;\r
+\r
+  CHAR8                             *SupportedLanguages;\r
+} EFI_UNICODE_COLLATION2_PROTOCOL;\r
+\r
+extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;\r
+\r
+#endif\r