diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-03 14:09:20 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-03 14:09:20 +0000 |
commit | c1f23d63363d36947e76df61320bdd2e5e233946 (patch) | |
tree | 656b3a32bfde791b312c445c0130b1b4fd7d8ffa /MdeModulePkg/Universal/DebugPortDxe/ComponentName.c | |
parent | 00c4901b895c285722a3a11dd9d0e659d84f8951 (diff) | |
download | edk2-platforms-c1f23d63363d36947e76df61320bdd2e5e233946.tar.xz |
Add DebugPort & DebugSupport drivers
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3018 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DebugPortDxe/ComponentName.c')
-rw-r--r-- | MdeModulePkg/Universal/DebugPortDxe/ComponentName.c | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/DebugPortDxe/ComponentName.c b/MdeModulePkg/Universal/DebugPortDxe/ComponentName.c new file mode 100644 index 0000000000..078bdab54d --- /dev/null +++ b/MdeModulePkg/Universal/DebugPortDxe/ComponentName.c @@ -0,0 +1,108 @@ +/*++
+
+Copyright (c) 2006, 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.
+
+Module Name:
+ ComponentName.c
+
+Abstract:
+ Component name protocol member functions for DebugPort...
+
+--*/
+
+#include "DebugPort.h"
+
+//
+// EFI Component Name Protocol
+//
+EFI_COMPONENT_NAME_PROTOCOL gDebugPortComponentName = {
+ DebugPortComponentNameGetDriverName,
+ DebugPortComponentNameGetControllerName,
+ "eng"
+};
+
+static EFI_UNICODE_STRING_TABLE mDebugPortDriverNameTable[] = {
+ {
+ "eng",
+ (CHAR16 *) L"DebugPort Driver"
+ },
+ {
+ NULL,
+ NULL
+ }
+};
+
+EFI_STATUS
+EFIAPI
+DebugPortComponentNameGetDriverName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
+ )
+/*++
+
+ Routine Description:
+ Retrieves a Unicode string that is the user readable name of the EFI Driver.
+
+ Arguments:
+ This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ Language - A pointer to a three character ISO 639-2 language identifier.
+ This is the language of the driver name that that the caller
+ is requesting, and it must match one of the languages specified
+ in SupportedLanguages. The number of languages supported by a
+ driver is up to the driver writer.
+ DriverName - A pointer to the Unicode string to return. This Unicode string
+ is the name of the driver specified by This in the language
+ specified by Language.
+
+ Returns:
+ EFI_SUCCESS - The Unicode string for the Driver specified by This
+ and the language specified by Language was returned
+ in DriverName.
+ EFI_INVALID_PARAMETER - Language is NULL.
+ EFI_INVALID_PARAMETER - DriverName is NULL.
+ EFI_UNSUPPORTED - The driver specified by This does not support the
+ language specified by Language.
+
+--*/
+{
+ return LookupUnicodeString (
+ Language,
+ gDebugPortComponentName.SupportedLanguages,
+ mDebugPortDriverNameTable,
+ DriverName
+ );
+}
+
+EFI_STATUS
+EFIAPI
+DebugPortComponentNameGetControllerName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
+ )
+/*++
+
+ Routine Description:
+ The debug port driver does not support GetControllerName, so this function
+ is just stubbed and returns EFI_UNSUPPORTED.
+
+ Arguments:
+ Per EFI 1.10 driver model
+
+ Returns:
+ EFI_UNSUPPORTED
+
+--*/
+{
+ return EFI_UNSUPPORTED;
+}
|