Check in following modules,
DxeIpl ConPlatform ConSplitter GraphicsConsole Terminal DevicePath git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3069 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
54
MdeModulePkg/Universal/Console/ConPlatformDxe/CommonHeader.h
Normal file
54
MdeModulePkg/Universal/Console/ConPlatformDxe/CommonHeader.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/**@file
|
||||
Common header file shared by all source files.
|
||||
|
||||
This file includes package header files, library classes and protocol, PPI & GUID definitions.
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
#ifndef __COMMON_HEADER_H_
|
||||
#define __COMMON_HEADER_H_
|
||||
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <Uefi.h>
|
||||
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Guid/GlobalVariable.h>
|
||||
#include <Guid/ConsoleInDevice.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Guid/HotPlugDevice.h>
|
||||
#include <Guid/StandardErrorDevice.h>
|
||||
#include <Guid/ConsoleOutDevice.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
//
|
||||
// Driver Binding Externs
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||
|
||||
#endif
|
146
MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c
Normal file
146
MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c
Normal file
@@ -0,0 +1,146 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
|
||||
|
||||
#include "ConPlatform.h"
|
||||
#include "ComponentName.h"
|
||||
|
||||
//
|
||||
// EFI Component Name Protocol
|
||||
//
|
||||
EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName = {
|
||||
ConPlatformComponentNameGetDriverName,
|
||||
ConPlatformComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
STATIC EFI_UNICODE_STRING_TABLE mConPlatformDriverNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
L"Platform Console Management Driver"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformComponentNameGetDriverName (
|
||||
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,
|
||||
gConPlatformComponentName.SupportedLanguages,
|
||||
mConPlatformDriverNameTable,
|
||||
DriverName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language
|
||||
specified by Language from the point of view of the
|
||||
driver specified by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
/*++
|
||||
|
||||
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.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef CON_MANAGE_COMPONENT_NAME_H_
|
||||
#define CON_MANAGE_COMPONENT_NAME_H_
|
||||
|
||||
|
||||
//
|
||||
// EFI Component Name Functions
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformComponentNameGetDriverName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
#endif
|
950
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
Normal file
950
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
Normal file
@@ -0,0 +1,950 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006 - 2007, 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:
|
||||
|
||||
ConPlatform.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
#include "ConPlatform.h"
|
||||
|
||||
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Guid/GlobalVariable.h>
|
||||
#include <Guid/ConsoleInDevice.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Guid/HotPlugDevice.h>
|
||||
#include <Guid/StandardErrorDevice.h>
|
||||
#include <Guid/ConsoleOutDevice.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
//
|
||||
// Driver Binding Externs
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||
|
||||
EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = {
|
||||
ConPlatformTextInDriverBindingSupported,
|
||||
ConPlatformTextInDriverBindingStart,
|
||||
ConPlatformTextInDriverBindingStop,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding = {
|
||||
ConPlatformTextOutDriverBindingSupported,
|
||||
ConPlatformTextOutDriverBindingStart,
|
||||
ConPlatformTextOutDriverBindingStop,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
The user Entry Point for module ConPlatform. The user code starts with this function.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeConPlatform(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Install driver model protocol(s).
|
||||
//
|
||||
Status = EfiLibInstallAllDriverProtocols (
|
||||
ImageHandle,
|
||||
SystemTable,
|
||||
&gConPlatformTextInDriverBinding,
|
||||
ImageHandle,
|
||||
&gConPlatformComponentName,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = EfiLibInstallAllDriverProtocols (
|
||||
ImageHandle,
|
||||
SystemTable,
|
||||
&gConPlatformTextOutDriverBinding,
|
||||
NULL,
|
||||
&gConPlatformComponentName,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextInDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Supported
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Supported() function)
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
return ConPlatformDriverBindingSupported (
|
||||
This,
|
||||
ControllerHandle,
|
||||
RemainingDevicePath,
|
||||
&gEfiSimpleTextInProtocolGuid
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextOutDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Supported
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Supported() function)
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
return ConPlatformDriverBindingSupported (
|
||||
This,
|
||||
ControllerHandle,
|
||||
RemainingDevicePath,
|
||||
&gEfiSimpleTextOutProtocolGuid
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
ConPlatformDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,
|
||||
IN EFI_GUID *ProtocolGuid
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Supported
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Supported() function)
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VOID *Interface;
|
||||
|
||||
//
|
||||
// Test to see if this is a physical device by checking to see if
|
||||
// it has a Device Path Protocol
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
NULL,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Test to see if this device supports the Simple Text Output Protocol
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
ProtocolGuid,
|
||||
(VOID **) &Interface,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
ProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextInDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Start() function)
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
|
||||
|
||||
//
|
||||
// Get the Device Path Protocol so the environment variables can be updated
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &DevicePath,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Open the Simple Input Protocol BY_DRIVER
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
(VOID **) &TextIn,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Check the device handle, if it is a hot plug device,
|
||||
// do not put the device path into ConInDev, and install
|
||||
// gEfiConsoleInDeviceGuid to the device handle directly.
|
||||
// The policy is, make hot plug device plug in and play immediately.
|
||||
//
|
||||
if (IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {
|
||||
gBS->InstallMultipleProtocolInterfaces (
|
||||
&ControllerHandle,
|
||||
&gEfiConsoleInDeviceGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
} else {
|
||||
//
|
||||
// Append the device path to the ConInDev environment variable
|
||||
//
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
VarConsoleInpDev,
|
||||
DevicePath,
|
||||
APPEND
|
||||
);
|
||||
|
||||
//
|
||||
// If the device path is an instance in the ConIn environment variable,
|
||||
// then install EfiConsoleInDeviceGuid onto ControllerHandle
|
||||
//
|
||||
Status = ConPlatformUpdateDeviceVariable (
|
||||
VarConsoleInp,
|
||||
DevicePath,
|
||||
CHECK
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
gBS->InstallMultipleProtocolInterfaces (
|
||||
&ControllerHandle,
|
||||
&gEfiConsoleInDeviceGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
} else {
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextOutDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Start() function)
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
||||
BOOLEAN NeedClose;
|
||||
|
||||
NeedClose = TRUE;
|
||||
|
||||
//
|
||||
// Get the Device Path Protocol so the environment variables can be updated
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &DevicePath,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Open the Simple Text Output Protocol BY_DRIVER
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
(VOID **) &TextOut,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Check the device handle, if it is a hot plug device,
|
||||
// do not put the device path into ConOutDev and StdErrDev,
|
||||
// and install gEfiConsoleOutDeviceGuid to the device handle directly.
|
||||
// The policy is, make hot plug device plug in and play immediately.
|
||||
//
|
||||
if (IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {
|
||||
gBS->InstallMultipleProtocolInterfaces (
|
||||
&ControllerHandle,
|
||||
&gEfiConsoleOutDeviceGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
} else {
|
||||
//
|
||||
// Append the device path to the ConOutDev environment variable
|
||||
//
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
VarConsoleOutDev,
|
||||
DevicePath,
|
||||
APPEND
|
||||
);
|
||||
//
|
||||
// Append the device path to the StdErrDev environment variable
|
||||
//
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
VarErrorOutDev,
|
||||
DevicePath,
|
||||
APPEND
|
||||
);
|
||||
|
||||
//
|
||||
// If the device path is an instance in the ConOut environment variable,
|
||||
// then install EfiConsoleOutDeviceGuid onto ControllerHandle
|
||||
//
|
||||
Status = ConPlatformUpdateDeviceVariable (
|
||||
VarConsoleOut,
|
||||
DevicePath,
|
||||
CHECK
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
NeedClose = FALSE;
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&ControllerHandle,
|
||||
&gEfiConsoleOutDeviceGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
//
|
||||
// If the device path is an instance in the StdErr environment variable,
|
||||
// then install EfiStandardErrorDeviceGuid onto ControllerHandle
|
||||
//
|
||||
Status = ConPlatformUpdateDeviceVariable (
|
||||
VarErrorOut,
|
||||
DevicePath,
|
||||
CHECK
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
NeedClose = FALSE;
|
||||
gBS->InstallMultipleProtocolInterfaces (
|
||||
&ControllerHandle,
|
||||
&gEfiStandardErrorDeviceGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
if (NeedClose) {
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextInDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Stop() function)
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
|
||||
//
|
||||
// hot plug device is not included into the console associated variables,
|
||||
// so no need to check variable for those hot plug devices.
|
||||
//
|
||||
if (!IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {
|
||||
//
|
||||
// Get the Device Path Protocol so the environment variables can be updated
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &DevicePath,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
//
|
||||
// Remove DevicePath from ConInDev
|
||||
//
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
VarConsoleInpDev,
|
||||
DevicePath,
|
||||
DELETE
|
||||
);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Uninstall the Console Device GUIDs from Controller Handle
|
||||
//
|
||||
ConPlatformUnInstallProtocol (
|
||||
This,
|
||||
ControllerHandle,
|
||||
&gEfiConsoleInDeviceGuid
|
||||
);
|
||||
|
||||
//
|
||||
// Close the Simple Input Protocol
|
||||
//
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextOutDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Arguments:
|
||||
(Standard DriverBinding Protocol Stop() function)
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
|
||||
//
|
||||
// hot plug device is not included into the console associated variables,
|
||||
// so no need to check variable for those hot plug devices.
|
||||
//
|
||||
if (!IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {
|
||||
//
|
||||
// Get the Device Path Protocol so the environment variables can be updated
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &DevicePath,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
//
|
||||
// Remove DevicePath from ConOutDev, and StdErrDev
|
||||
//
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
VarConsoleOutDev,
|
||||
DevicePath,
|
||||
DELETE
|
||||
);
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
VarErrorOutDev,
|
||||
DevicePath,
|
||||
DELETE
|
||||
);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Uninstall the Console Device GUIDs from Controller Handle
|
||||
//
|
||||
ConPlatformUnInstallProtocol (
|
||||
This,
|
||||
ControllerHandle,
|
||||
&gEfiConsoleOutDeviceGuid
|
||||
);
|
||||
|
||||
ConPlatformUnInstallProtocol (
|
||||
This,
|
||||
ControllerHandle,
|
||||
&gEfiStandardErrorDeviceGuid
|
||||
);
|
||||
|
||||
//
|
||||
// Close the Simple Text Output Protocol
|
||||
//
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
ConPlatformUnInstallProtocol (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_GUID *ProtocolGuid
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
Handle,
|
||||
ProtocolGuid,
|
||||
NULL,
|
||||
This->DriverBindingHandle,
|
||||
Handle,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Handle,
|
||||
ProtocolGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
VOID *
|
||||
ConPlatformGetVariable (
|
||||
IN CHAR16 *Name
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Read the EFI variable (Name) and return a dynamically allocated
|
||||
buffer, and the size of the buffer. On failure return NULL.
|
||||
|
||||
Arguments:
|
||||
Name - String part of EFI variable name
|
||||
|
||||
Returns:
|
||||
Dynamically allocated memory that contains a copy of the EFI variable.
|
||||
Caller is repsoncible freeing the buffer.
|
||||
|
||||
NULL - Variable was not read
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VOID *Buffer;
|
||||
UINTN BufferSize;
|
||||
|
||||
BufferSize = 0;
|
||||
Buffer = NULL;
|
||||
|
||||
//
|
||||
// Test to see if the variable exists. If it doesn't reuturn NULL
|
||||
//
|
||||
Status = gRT->GetVariable (
|
||||
Name,
|
||||
&gEfiGlobalVariableGuid,
|
||||
NULL,
|
||||
&BufferSize,
|
||||
Buffer
|
||||
);
|
||||
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
//
|
||||
// Allocate the buffer to return
|
||||
//
|
||||
Buffer = AllocatePool (BufferSize);
|
||||
if (Buffer == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
//
|
||||
// Read variable into the allocated buffer.
|
||||
//
|
||||
Status = gRT->GetVariable (
|
||||
Name,
|
||||
&gEfiGlobalVariableGuid,
|
||||
NULL,
|
||||
&BufferSize,
|
||||
Buffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (Buffer);
|
||||
Buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
ConPlatformMatchDevicePaths (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * Multi,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * Single,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL **NewDevicePath OPTIONAL,
|
||||
IN BOOLEAN Delete
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Function compares a device path data structure to that of all the nodes of a
|
||||
second device path instance.
|
||||
|
||||
Arguments:
|
||||
Multi - A pointer to a multi-instance device path data structure.
|
||||
|
||||
Single - A pointer to a single-instance device path data structure.
|
||||
|
||||
NewDevicePath - If Delete is TRUE, this parameter must not be null, and it
|
||||
points to the remaining device path data structure.
|
||||
(remaining device path = Multi - Single.)
|
||||
|
||||
Delete - If TRUE, means removing Single from Multi.
|
||||
If FALSE, the routine just check whether Single matches
|
||||
with any instance in Multi.
|
||||
|
||||
Returns:
|
||||
|
||||
The function returns EFI_SUCCESS if the Single is contained within Multi.
|
||||
Otherwise, EFI_NOT_FOUND is returned.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath1;
|
||||
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath2;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
|
||||
UINTN Size;
|
||||
|
||||
//
|
||||
// The passed in DevicePath should not be NULL
|
||||
//
|
||||
if ((!Multi) || (!Single)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
//
|
||||
// if performing Delete operation, the NewDevicePath must not be NULL.
|
||||
//
|
||||
TempDevicePath1 = NULL;
|
||||
|
||||
DevicePath = Multi;
|
||||
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
||||
|
||||
//
|
||||
// search for the match of 'Single' in 'Multi'
|
||||
//
|
||||
while (DevicePathInst) {
|
||||
if (CompareMem (Single, DevicePathInst, Size) == 0) {
|
||||
if (!Delete) {
|
||||
FreePool (DevicePathInst);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
if (Delete) {
|
||||
TempDevicePath2 = AppendDevicePathInstance (
|
||||
TempDevicePath1,
|
||||
DevicePathInst
|
||||
);
|
||||
if (TempDevicePath1 != NULL) {
|
||||
FreePool (TempDevicePath1);
|
||||
}
|
||||
TempDevicePath1 = TempDevicePath2;
|
||||
}
|
||||
}
|
||||
|
||||
FreePool (DevicePathInst);
|
||||
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
||||
}
|
||||
|
||||
if (Delete) {
|
||||
*NewDevicePath = TempDevicePath1;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONPLATFORM_VAR_OPERATION Operation
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH_PROTOCOL *VariableDevicePath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *NewVariableDevicePath;
|
||||
|
||||
VariableDevicePath = NULL;
|
||||
NewVariableDevicePath = NULL;
|
||||
|
||||
//
|
||||
// Get Variable according to variable name.
|
||||
// The memory for Variable is allocated within ConPlatformGetVarible(),
|
||||
// it is the caller's responsibility to free the memory before return.
|
||||
//
|
||||
VariableDevicePath = ConPlatformGetVariable (VariableName);
|
||||
|
||||
if (Operation != DELETE) {
|
||||
|
||||
Status = ConPlatformMatchDevicePaths (
|
||||
VariableDevicePath,
|
||||
DevicePath,
|
||||
NULL,
|
||||
FALSE
|
||||
);
|
||||
|
||||
if ((Operation == CHECK) || (!EFI_ERROR (Status))) {
|
||||
//
|
||||
// The device path is already in the variable
|
||||
//
|
||||
if (VariableDevicePath != NULL) {
|
||||
FreePool (VariableDevicePath);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// The device path is not in variable. Append DevicePath to the
|
||||
// environment variable that is a multi-instance device path.
|
||||
//
|
||||
Status = EFI_SUCCESS;
|
||||
NewVariableDevicePath = AppendDevicePathInstance (
|
||||
VariableDevicePath,
|
||||
DevicePath
|
||||
);
|
||||
if (NewVariableDevicePath == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
} else {
|
||||
//
|
||||
// Remove DevicePath from the environment variable that
|
||||
// is a multi-instance device path.
|
||||
//
|
||||
Status = ConPlatformMatchDevicePaths (
|
||||
VariableDevicePath,
|
||||
DevicePath,
|
||||
&NewVariableDevicePath,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
|
||||
if (VariableDevicePath != NULL) {
|
||||
FreePool (VariableDevicePath);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
VariableName,
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
GetDevicePathSize (NewVariableDevicePath),
|
||||
NewVariableDevicePath
|
||||
);
|
||||
|
||||
FreePool (NewVariableDevicePath);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
IsHotPlugDevice (
|
||||
EFI_HANDLE DriverBindingHandle,
|
||||
EFI_HANDLE ControllerHandle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// HotPlugDeviceGuid indicates ControllerHandle stands for a hot plug device.
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiHotPlugDeviceGuid,
|
||||
NULL,
|
||||
DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
132
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
Normal file
132
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
ConPlatform.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef CON_MANAGE_H_
|
||||
#define CON_MANAGE_H_
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#define VarConsoleInpDev L"ConInDev"
|
||||
#define VarConsoleInp L"ConIn"
|
||||
#define VarConsoleOutDev L"ConOutDev"
|
||||
#define VarConsoleOut L"ConOut"
|
||||
#define VarErrorOutDev L"ErrOutDev"
|
||||
#define VarErrorOut L"ErrOut"
|
||||
|
||||
typedef enum {
|
||||
CHECK,
|
||||
APPEND,
|
||||
DELETE
|
||||
} CONPLATFORM_VAR_OPERATION;
|
||||
|
||||
EFI_STATUS
|
||||
ConPlatformDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,
|
||||
IN EFI_GUID *ProtocolGuid
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextInDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextOutDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextInDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextOutDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextInDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConPlatformTextOutDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
VOID
|
||||
ConPlatformUnInstallProtocol (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_GUID *ProtocolGuid
|
||||
);
|
||||
|
||||
VOID *
|
||||
ConPlatformGetVariable (
|
||||
IN CHAR16 *Name
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
ConPlatformMatchDevicePaths (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * Multi,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * Single,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL **NewDevicePath OPTIONAL,
|
||||
IN BOOLEAN Delete
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
ConPlatformUpdateDeviceVariable (
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONPLATFORM_VAR_OPERATION Operation
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
IsHotPlugDevice (
|
||||
EFI_HANDLE DriverBindingHandle,
|
||||
EFI_HANDLE ControllerHandle
|
||||
);
|
||||
|
||||
#endif
|
112
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.inf
Normal file
112
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.inf
Normal file
@@ -0,0 +1,112 @@
|
||||
#/** @file
|
||||
# Console Platfrom Driver
|
||||
#
|
||||
# Console Platfrom DXE Driver, install Console protocols
|
||||
# Copyright (c) 2006 - 2007, 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.
|
||||
#
|
||||
#
|
||||
#**/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Defines Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = ConPlatform
|
||||
FILE_GUID = 51ccf399-4fdf-4e55-a45b-e123f84d456a
|
||||
MODULE_TYPE = UEFI_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
ENTRY_POINT = InitializeConPlatform
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gConPlatformTextInDriverBinding
|
||||
# COMPONENT_NAME = gConPlatformComponentName
|
||||
# DRIVER_BINDING = gConPlatformTextOutDriverBinding
|
||||
# COMPONENT_NAME = gConPlatformComponentName
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
ComponentName.c
|
||||
ComponentName.h
|
||||
ConPlatform.h
|
||||
ConPlatform.c
|
||||
CommonHeader.h
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
MemoryAllocationLib
|
||||
DevicePathLib
|
||||
UefiRuntimeServicesTableLib
|
||||
UefiBootServicesTableLib
|
||||
BaseMemoryLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Guid C Name Section - list of Guids that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Guids]
|
||||
gEfiGlobalVariableGuid # SOMETIMES_CONSUMED L"ErrOut"
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
|
||||
# that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Protocols]
|
||||
gEfiHotPlugDeviceGuid # PROTOCOL TO_START
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||
gEfiSimpleTextInProtocolGuid # PROTOCOL TO_START
|
||||
gEfiSimpleTextOutProtocolGuid # PROTOCOL TO_START
|
||||
gEfiStandardErrorDeviceGuid # PROTOCOL BY_START
|
||||
gEfiConsoleOutDeviceGuid # PROTOCOL BY_START
|
||||
gEfiConsoleInDeviceGuid # PROTOCOL BY_START
|
||||
|
135
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.msa
Normal file
135
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.msa
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<MsaHeader>
|
||||
<ModuleName>ConPlatform</ModuleName>
|
||||
<ModuleType>UEFI_DRIVER</ModuleType>
|
||||
<GuidValue>51ccf399-4fdf-4e55-a45b-e123f84d456a</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Console Platfrom Driver</Abstract>
|
||||
<Description>Console Platfrom DXE Driver, install Console protocols</Description>
|
||||
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
|
||||
<License>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.</License>
|
||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>ConPlatform</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>DebugLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverModelLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverEntryPoint</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseMemoryLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiRuntimeServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>DevicePathLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>ConPlatform.c</Filename>
|
||||
<Filename>ConPlatform.h</Filename>
|
||||
<Filename>ComponentName.h</Filename>
|
||||
<Filename>ComponentName.c</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
|
||||
</PackageDependencies>
|
||||
<Protocols>
|
||||
<Protocol Usage="BY_START">
|
||||
<ProtocolCName>gEfiConsoleInDeviceGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="BY_START">
|
||||
<ProtocolCName>gEfiConsoleOutDeviceGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="BY_START">
|
||||
<ProtocolCName>gEfiStandardErrorDeviceGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiSimpleTextOutProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiSimpleTextInProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiHotPlugDeviceGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
</Protocols>
|
||||
<Variables>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0043 0x006F 0x006E 0x0049 0x006E 0x0044 0x0065 0x0076</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ConInDev" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0043 0x006F 0x006E 0x0049 0x006E</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ConIn" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0043 0x006F 0x006E 0x004F 0x0075 0x0074 0x0044 0x0065 0x0076</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ConOutDev" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0043 0x006F 0x006E 0x004F 0x0075 0x0074</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ConOut" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0045 0x0072 0x0072 0x004F 0x0075 0x0074 0x0044 0x0065 0x0076</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ErrOutDev" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0045 0x0072 0x0072 0x004F 0x0075 0x0074</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ErrOut" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
</Variables>
|
||||
<Guids>
|
||||
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||
<GuidCName>gEfiGlobalVariableGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
</Guids>
|
||||
<Externs>
|
||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||
<Extern>
|
||||
<DriverBinding>gConPlatformTextInDriverBinding</DriverBinding>
|
||||
<ComponentName>gConPlatformComponentName</ComponentName>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gConPlatformTextOutDriverBinding</DriverBinding>
|
||||
<ComponentName>gConPlatformComponentName</ComponentName>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
61
MdeModulePkg/Universal/Console/ConSplitterDxe/CommonHeader.h
Normal file
61
MdeModulePkg/Universal/Console/ConSplitterDxe/CommonHeader.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/**@file
|
||||
Common header file shared by all source files.
|
||||
|
||||
This file includes package header files, library classes and protocol, PPI & GUID definitions.
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
#ifndef __COMMON_HEADER_H_
|
||||
#define __COMMON_HEADER_H_
|
||||
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiDxe.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Guid/PrimaryStandardErrorDevice.h>
|
||||
#include <Guid/PrimaryConsoleOutDevice.h>
|
||||
#include <Protocol/GraphicsOutput.h>
|
||||
#include <Guid/PrimaryConsoleInDevice.h>
|
||||
#include <Protocol/SimplePointer.h>
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Guid/ConsoleInDevice.h>
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Protocol/ConsoleControl.h>
|
||||
#include <Guid/StandardErrorDevice.h>
|
||||
#include <Guid/ConsoleOutDevice.h>
|
||||
#include <Protocol/UgaDraw.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
//
|
||||
// Driver Binding Externs
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
|
||||
|
||||
|
||||
#endif
|
485
MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
Normal file
485
MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
Normal file
@@ -0,0 +1,485 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "ConSplitter.h"
|
||||
|
||||
//
|
||||
// EFI Component Name Protocol
|
||||
//
|
||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName = {
|
||||
ConSplitterComponentNameGetDriverName,
|
||||
ConSplitterConInComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName = {
|
||||
ConSplitterComponentNameGetDriverName,
|
||||
ConSplitterSimplePointerComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName = {
|
||||
ConSplitterComponentNameGetDriverName,
|
||||
ConSplitterConOutComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName = {
|
||||
ConSplitterComponentNameGetDriverName,
|
||||
ConSplitterStdErrComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
static EFI_UNICODE_STRING_TABLE mConSplitterDriverNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *) L"Console Splitter Driver"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
static EFI_UNICODE_STRING_TABLE mConSplitterConInControllerNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *) L"Primary Console Input Device"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
static EFI_UNICODE_STRING_TABLE mConSplitterSimplePointerControllerNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *) L"Primary Simple Pointer Device"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
static EFI_UNICODE_STRING_TABLE mConSplitterConOutControllerNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *) L"Primary Console Output Device"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
static EFI_UNICODE_STRING_TABLE mConSplitterStdErrControllerNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *) L"Primary Standard Error Device"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterComponentNameGetDriverName (
|
||||
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,
|
||||
gConSplitterConInComponentName.SupportedLanguages,
|
||||
mConSplitterDriverNameTable,
|
||||
DriverName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConInComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language
|
||||
specified by Language from the point of view of the
|
||||
driver specified by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
|
||||
//
|
||||
// here ChildHandle is not an Optional parameter.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
(VOID **) &TextIn,
|
||||
NULL,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return LookupUnicodeString (
|
||||
Language,
|
||||
gConSplitterConInComponentName.SupportedLanguages,
|
||||
mConSplitterConInControllerNameTable,
|
||||
ControllerName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language
|
||||
specified by Language from the point of view of the
|
||||
driver specified by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;
|
||||
//
|
||||
// here ChildHandle is not an Optional parameter.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimplePointerProtocolGuid,
|
||||
(VOID **) &SimplePointer,
|
||||
NULL,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return LookupUnicodeString (
|
||||
Language,
|
||||
gConSplitterSimplePointerComponentName.SupportedLanguages,
|
||||
mConSplitterSimplePointerControllerNameTable,
|
||||
ControllerName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConOutComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language
|
||||
specified by Language from the point of view of the
|
||||
driver specified by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
||||
//
|
||||
// here ChildHandle is not an Optional parameter.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
(VOID **) &TextOut,
|
||||
NULL,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return LookupUnicodeString (
|
||||
Language,
|
||||
gConSplitterConOutComponentName.SupportedLanguages,
|
||||
mConSplitterConOutControllerNameTable,
|
||||
ControllerName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStdErrComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language
|
||||
specified by Language from the point of view of the
|
||||
driver specified by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ErrOut;
|
||||
//
|
||||
// here ChildHandle is not an Optional parameter.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
(VOID **) &ErrOut,
|
||||
NULL,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return LookupUnicodeString (
|
||||
Language,
|
||||
gConSplitterStdErrComponentName.SupportedLanguages,
|
||||
mConSplitterStdErrControllerNameTable,
|
||||
ControllerName
|
||||
);
|
||||
}
|
3467
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
Normal file
3467
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
Normal file
File diff suppressed because it is too large
Load Diff
667
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
Normal file
667
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
Normal file
@@ -0,0 +1,667 @@
|
||||
/**@file
|
||||
Private data structures for the Console Splitter driver
|
||||
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||
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.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _CON_SPLITTER_H_
|
||||
#define _CON_SPLITTER_H_
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
//
|
||||
// Private Data Structures
|
||||
//
|
||||
#define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
|
||||
#define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
|
||||
#define MAX_STD_IN_PASSWORD 80
|
||||
|
||||
typedef struct {
|
||||
UINTN Columns;
|
||||
UINTN Rows;
|
||||
} TEXT_OUT_SPLITTER_QUERY_DATA;
|
||||
|
||||
//
|
||||
// Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
|
||||
//
|
||||
#define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
EFI_HANDLE VirtualHandle;
|
||||
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn;
|
||||
UINTN CurrentNumberOfConsoles;
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL **TextInList;
|
||||
UINTN TextInListCount;
|
||||
|
||||
EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;
|
||||
EFI_SIMPLE_POINTER_MODE SimplePointerMode;
|
||||
UINTN CurrentNumberOfPointers;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL **PointerList;
|
||||
UINTN PointerListCount;
|
||||
|
||||
BOOLEAN PasswordEnabled;
|
||||
CHAR16 Password[MAX_STD_IN_PASSWORD];
|
||||
UINTN PwdIndex;
|
||||
CHAR16 PwdAttempt[MAX_STD_IN_PASSWORD];
|
||||
EFI_EVENT LockEvent;
|
||||
|
||||
BOOLEAN KeyEventSignalState;
|
||||
BOOLEAN InputEventSignalState;
|
||||
} TEXT_IN_SPLITTER_PRIVATE_DATA;
|
||||
|
||||
#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
|
||||
CR ((a), \
|
||||
TEXT_IN_SPLITTER_PRIVATE_DATA, \
|
||||
TextIn, \
|
||||
TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
|
||||
CR ((a), \
|
||||
TEXT_IN_SPLITTER_PRIVATE_DATA, \
|
||||
SimplePointer, \
|
||||
TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
//
|
||||
// Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
|
||||
//
|
||||
#define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
|
||||
|
||||
typedef struct {
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
||||
BOOLEAN TextOutEnabled;
|
||||
} TEXT_OUT_AND_GOP_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT32 HorizontalResolution;
|
||||
UINT32 VerticalResolution;
|
||||
} TEXT_OUT_GOP_MODE;
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
EFI_HANDLE VirtualHandle;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
|
||||
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
|
||||
TEXT_OUT_GOP_MODE *GraphicsOutputModeBuffer;
|
||||
UINTN CurrentNumberOfGraphicsOutput;
|
||||
BOOLEAN HardwareNeedsStarting;
|
||||
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
|
||||
|
||||
UINTN CurrentNumberOfConsoles;
|
||||
TEXT_OUT_AND_GOP_DATA *TextOutList;
|
||||
UINTN TextOutListCount;
|
||||
TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;
|
||||
UINTN TextOutQueryDataCount;
|
||||
INT32 *TextOutModeMap;
|
||||
|
||||
EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode;
|
||||
|
||||
UINTN DevNullColumns;
|
||||
UINTN DevNullRows;
|
||||
CHAR16 *DevNullScreen;
|
||||
INT32 *DevNullAttributes;
|
||||
|
||||
} TEXT_OUT_SPLITTER_PRIVATE_DATA;
|
||||
|
||||
#define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
|
||||
CR ((a), \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA, \
|
||||
TextOut, \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
#define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
|
||||
CR ((a), \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA, \
|
||||
GraphicsOutput, \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
#define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
|
||||
CR ((a), \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA, \
|
||||
UgaDraw, \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
#define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
|
||||
CR ((a), \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA, \
|
||||
ConsoleControl, \
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
|
||||
)
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterDriverEntry (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterTextInConstructor (
|
||||
TEXT_IN_SPLITTER_PRIVATE_DATA *Private
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterTextOutConstructor (
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Driver Binding Functions
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConInDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConOutDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStdErrDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConInDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConOutDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStdErrDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConInDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConOutDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStdErrDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterComponentNameGetDriverName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConInComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterConOutComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterStdErrComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
//
|
||||
// TextIn Constructor/Destructor functions
|
||||
//
|
||||
EFI_STATUS
|
||||
ConSplitterTextInAddDevice (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterTextInDeleteDevice (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// SimplePointer Constuctor/Destructor functions
|
||||
//
|
||||
EFI_STATUS
|
||||
ConSplitterSimplePointerAddDevice (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterSimplePointerDeleteDevice (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// TextOut Constuctor/Destructor functions
|
||||
//
|
||||
EFI_STATUS
|
||||
ConSplitterTextOutAddDevice (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut,
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
|
||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterTextOutDeleteDevice (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// TextIn I/O Functions
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextInReset (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextInReadKeyStroke (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
|
||||
OUT EFI_INPUT_KEY *Key
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
ConSplitterTextInWaitForKey (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
ConSpliterConssoleControlStdInLocked (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlLockStdInEvent (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlLockStdIn (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN CHAR16 *Password
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextInPrivateReadKeyStroke (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
OUT EFI_INPUT_KEY *Key
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerReset (
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerGetState (
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
|
||||
IN OUT EFI_SIMPLE_POINTER_STATE *State
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
ConSplitterSimplePointerWaitForInput (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// TextOut I/O Functions
|
||||
//
|
||||
VOID
|
||||
ConSplitterSynchronizeModeData (
|
||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutReset (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN BOOLEAN Visible
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterGrowBuffer (
|
||||
IN UINTN SizeOfCount,
|
||||
IN UINTN *Count,
|
||||
IN OUT VOID **Buffer
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlGetMode (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
||||
OUT BOOLEAN *GopExists,
|
||||
OUT BOOLEAN *StdInLocked
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlSetMode (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterGraphicsOutputQueryMode (
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||
IN UINT32 ModeNumber,
|
||||
OUT UINTN *SizeOfInfo,
|
||||
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterGraphicsOutputSetMode (
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
||||
IN UINT32 ModeNumber
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterGraphicsOutputBlt (
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
|
||||
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
||||
IN UINTN SourceX,
|
||||
IN UINTN SourceY,
|
||||
IN UINTN DestinationX,
|
||||
IN UINTN DestinationY,
|
||||
IN UINTN Width,
|
||||
IN UINTN Height,
|
||||
IN UINTN Delta OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
DevNullGopSync (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
|
||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
EFI_STATUS
|
||||
DevNullTextOutOutputString (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
DevNullTextOutSetMode (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN UINTN ModeNumber
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
DevNullTextOutClearScreen (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
DevNullTextOutSetCursorPosition (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
DevNullTextOutEnableCursor (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Visible
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
DevNullSyncGopStdOut (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
120
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.inf
Normal file
120
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.inf
Normal file
@@ -0,0 +1,120 @@
|
||||
#/** @file
|
||||
# Component description file for ConSplitter module.
|
||||
#
|
||||
# Any Handle that attatched EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver.
|
||||
# Copyright (c) 2006 - 2007, 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.
|
||||
#
|
||||
#
|
||||
#**/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Defines Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = ConSplitter
|
||||
FILE_GUID = 408edcec-cf6d-477c-a5a8-b4844e3de281
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
ENTRY_POINT = InitializeConSplitter
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gConSplitterConInDriverBinding
|
||||
# COMPONENT_NAME = gConSplitterConInComponentName
|
||||
# DRIVER_BINDING = gConSplitterSimplePointerDriverBinding
|
||||
# COMPONENT_NAME = gConSplitterSimplePointerComponentName
|
||||
# DRIVER_BINDING = gConSplitterConOutDriverBinding
|
||||
# COMPONENT_NAME = gConSplitterConOutComponentName
|
||||
# DRIVER_BINDING = gConSplitterStdErrDriverBinding
|
||||
# COMPONENT_NAME = gConSplitterStdErrComponentName
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
ConSplitterGraphics.c
|
||||
ComponentName.c
|
||||
ConSplitter.h
|
||||
ConSplitter.c
|
||||
CommonHeader.h
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
IntelFrameworkPkg/IntelFrameworkPkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
UefiBootServicesTableLib
|
||||
MemoryAllocationLib
|
||||
BaseMemoryLib
|
||||
BaseLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Guid C Name Section - list of Guids that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Guids]
|
||||
gEfiConsoleInDeviceGuid # ALWAYS_CONSUMED
|
||||
gEfiStandardErrorDeviceGuid # ALWAYS_CONSUMED
|
||||
gEfiConsoleOutDeviceGuid # ALWAYS_CONSUMED
|
||||
gEfiPrimaryConsoleOutDeviceGuid # ALWAYS_PRODUCED
|
||||
gEfiPrimaryConsoleInDeviceGuid # ALWAYS_PRODUCED
|
||||
gEfiPrimaryStandardErrorDeviceGuid # ALWAYS_PRODUCED
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
|
||||
# that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Protocols]
|
||||
gEfiConsoleControlProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiSimplePointerProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiSimpleTextInProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiSimpleTextOutProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiGraphicsOutputProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiUgaDrawProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
|
126
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.msa
Normal file
126
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.msa
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
||||
<MsaHeader>
|
||||
<ModuleName>ConSplitter</ModuleName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<GuidValue>408edcec-cf6d-477c-a5a8-b4844e3de281</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for ConSplitter module.</Abstract>
|
||||
<Description>Any Handle that attatched EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver.</Description>
|
||||
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
|
||||
<License>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.</License>
|
||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>ConSplitter</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
|
||||
<Keyword>DebugLib</Keyword>
|
||||
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverModelLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverEntryPoint</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseMemoryLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>ConSplitter.c</Filename>
|
||||
<Filename>ConSplitter.h</Filename>
|
||||
<Filename>ComponentName.c</Filename>
|
||||
<Filename>ConSplitterGraphics.c</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
|
||||
</PackageDependencies>
|
||||
<Protocols>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiUgaDrawProtocolGuid</ProtocolCName>
|
||||
<HelpText>UGA Draw protocol is only installed in EFI mode.</HelpText>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiGraphicsOutputProtocolGuid</ProtocolCName>
|
||||
<HelpText>Graphics Output Protocol is only installed in UEFI mode.</HelpText>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiSimpleTextOutProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiSimpleTextInProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiSimplePointerProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiConsoleControlProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
</Protocols>
|
||||
<Guids>
|
||||
<GuidCNames Usage="ALWAYS_PRODUCED">
|
||||
<GuidCName>gEfiPrimaryStandardErrorDeviceGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_PRODUCED">
|
||||
<GuidCName>gEfiPrimaryConsoleInDeviceGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_PRODUCED">
|
||||
<GuidCName>gEfiPrimaryConsoleOutDeviceGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiConsoleOutDeviceGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiStandardErrorDeviceGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiConsoleInDeviceGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
</Guids>
|
||||
<Externs>
|
||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||
<Extern>
|
||||
<ModuleEntryPoint>ConSplitterDriverEntry</ModuleEntryPoint>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gConSplitterConInDriverBinding</DriverBinding>
|
||||
<ComponentName>gConSplitterConInComponentName</ComponentName>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gConSplitterSimplePointerDriverBinding</DriverBinding>
|
||||
<ComponentName>gConSplitterSimplePointerComponentName</ComponentName>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gConSplitterConOutDriverBinding</DriverBinding>
|
||||
<ComponentName>gConSplitterConOutComponentName</ComponentName>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gConSplitterStdErrDriverBinding</DriverBinding>
|
||||
<ComponentName>gConSplitterStdErrComponentName</ComponentName>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
1222
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
Normal file
1222
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
/**@file
|
||||
Common header file shared by all source files.
|
||||
|
||||
This file includes package header files, library classes and protocol, PPI & GUID definitions.
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
#ifndef __COMMON_HEADER_H_
|
||||
#define __COMMON_HEADER_H_
|
||||
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiDxe.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/FrameworkHii.h>
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Protocol/GraphicsOutput.h>
|
||||
#include <Protocol/UgaDraw.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/HiiLibFramework.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
//
|
||||
// Driver Binding Externs
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
|
||||
|
||||
#endif
|
@@ -0,0 +1,144 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "GraphicsConsole.h"
|
||||
|
||||
//
|
||||
// EFI Component Name Protocol
|
||||
//
|
||||
EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName = {
|
||||
GraphicsConsoleComponentNameGetDriverName,
|
||||
GraphicsConsoleComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
STATIC EFI_UNICODE_STRING_TABLE mGraphicsConsoleDriverNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *)L"UGA Console Driver"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleComponentNameGetDriverName (
|
||||
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,
|
||||
gGraphicsConsoleComponentName.SupportedLanguages,
|
||||
mGraphicsConsoleDriverNameTable,
|
||||
DriverName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language specified
|
||||
by Language from the point of view of the driver specified
|
||||
by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently managing
|
||||
the controller specified by ControllerHandle and
|
||||
ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
/*++
|
||||
|
||||
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.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _GRAPHICS_CONSOLE_COMPONENT_NAME_H
|
||||
#define _GRAPHICS_CONSOLE_COMPONENT_NAME_H
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
|
||||
|
||||
//
|
||||
// EFI Component Name Functions
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleComponentNameGetDriverName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
@@ -0,0 +1,56 @@
|
||||
/**@file
|
||||
Entry Point Source file.
|
||||
|
||||
This file contains the user entry point
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
/**
|
||||
The user Entry Point for module GraphicsConsole. The user code starts with this function.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeGraphicsConsole(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Install driver model protocol(s).
|
||||
//
|
||||
Status = EfiLibInstallAllDriverProtocols (
|
||||
ImageHandle,
|
||||
SystemTable,
|
||||
&gGraphicsConsoleDriverBinding,
|
||||
ImageHandle,
|
||||
&gGraphicsConsoleComponentName,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
1826
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
Normal file
1826
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,192 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
GraphicsConsole.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _GRAPHICS_CONSOLE_H
|
||||
#define _GRAPHICS_CONSOLE_H
|
||||
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "ComponentName.h"
|
||||
|
||||
//
|
||||
// Glyph database
|
||||
//
|
||||
#define GLYPH_WIDTH 8
|
||||
#define GLYPH_HEIGHT 19
|
||||
|
||||
typedef union {
|
||||
EFI_NARROW_GLYPH NarrowGlyph;
|
||||
EFI_WIDE_GLYPH WideGlyph;
|
||||
} GLYPH_UNION;
|
||||
|
||||
extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];
|
||||
extern EFI_WIDE_GLYPH UsStdWideGlyphData[];
|
||||
|
||||
//
|
||||
// Device Structure
|
||||
//
|
||||
#define GRAPHICS_CONSOLE_DEV_SIGNATURE EFI_SIGNATURE_32 ('g', 's', 't', 'o')
|
||||
|
||||
typedef struct {
|
||||
UINTN Columns;
|
||||
UINTN Rows;
|
||||
INTN DeltaX;
|
||||
INTN DeltaY;
|
||||
UINT32 GopWidth;
|
||||
UINT32 GopHeight;
|
||||
UINT32 GopModeNumber;
|
||||
} GRAPHICS_CONSOLE_MODE_DATA;
|
||||
|
||||
#define GRAPHICS_MAX_MODE 3
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
|
||||
GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer;
|
||||
EFI_HII_HANDLE HiiHandle;
|
||||
} GRAPHICS_CONSOLE_DEV;
|
||||
|
||||
#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \
|
||||
CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)
|
||||
|
||||
//
|
||||
// Global Variables
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
|
||||
|
||||
//
|
||||
// Prototypes
|
||||
//
|
||||
UINTN
|
||||
ReturnNarrowFontSize (
|
||||
VOID
|
||||
);
|
||||
|
||||
UINTN
|
||||
ReturnWideFontSize (
|
||||
VOID
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutReset (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN BOOLEAN Visible
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EfiLocateHiiProtocol (
|
||||
VOID
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleControllerDriverSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleControllerDriverStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleControllerDriverStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
#endif
|
@@ -0,0 +1,110 @@
|
||||
#/** @file
|
||||
# Component description file for GraphicsConsole module
|
||||
#
|
||||
# This is the main routine for initializing the Graphics Console support routines.
|
||||
# Copyright (c) 2006 - 2007, 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.
|
||||
#
|
||||
#
|
||||
#**/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Defines Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = GraphicsConsole
|
||||
FILE_GUID = CCCB0C28-4B24-11d5-9A5A-0090273FC14D
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
ENTRY_POINT = InitializeGraphicsConsole
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gGraphicsConsoleDriverBinding
|
||||
# COMPONENT_NAME = gGraphicsConsoleComponentName
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
ComponentName.c
|
||||
ComponentName.h
|
||||
LaffStd.c
|
||||
GraphicsConsole.c
|
||||
GraphicsConsole.h
|
||||
CommonHeader.h
|
||||
EntryPoint.c
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
IntelFrameworkPkg/IntelFrameworkPkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
UefiBootServicesTableLib
|
||||
MemoryAllocationLib
|
||||
BaseMemoryLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
DebugLib
|
||||
HiiLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Guid C Name Section - list of Guids that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Guids]
|
||||
FontPack # ALWAYS_PRODUCED HII Formset
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
|
||||
# that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Protocols]
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiSimpleTextOutProtocolGuid # PROTOCOL BY_START
|
||||
gEfiHiiProtocolGuid # PROTOCOL TO_START
|
||||
gEfiGraphicsOutputProtocolGuid # PROTOCOL TO_START
|
||||
gEfiUgaDrawProtocolGuid # PROTOCOL TO_START
|
||||
|
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<MsaHeader>
|
||||
<ModuleName>GraphicsConsole</ModuleName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<GuidValue>CCCB0C28-4B24-11d5-9A5A-0090273FC14D</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for GraphicsConsole module</Abstract>
|
||||
<Description>This is the main routine for initializing the Graphics Console support routines.</Description>
|
||||
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
|
||||
<License>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.</License>
|
||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>GraphicsConsole</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
|
||||
<Keyword>DebugLib</Keyword>
|
||||
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverModelLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverEntryPoint</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>HiiLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseMemoryLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>GraphicsConsole.h</Filename>
|
||||
<Filename>GraphicsConsole.c</Filename>
|
||||
<Filename>LaffStd.c</Filename>
|
||||
<Filename>ComponentName.h</Filename>
|
||||
<Filename>ComponentName.c</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
</PackageDependencies>
|
||||
<Protocols>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiUgaDrawProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiGraphicsOutputProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiHiiProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="BY_START">
|
||||
<ProtocolCName>gEfiSimpleTextOutProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">
|
||||
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
</Protocols>
|
||||
<HiiPackages>
|
||||
<HiiPackage Usage="ALWAYS_PRODUCED">
|
||||
<HiiCName>FontPack</HiiCName>
|
||||
<HelpText>Register UsStdNarrow Fonts into the global database.</HelpText>
|
||||
</HiiPackage>
|
||||
</HiiPackages>
|
||||
<Externs>
|
||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||
<Extern>
|
||||
<DriverBinding>gGraphicsConsoleDriverBinding</DriverBinding>
|
||||
<ComponentName>gGraphicsConsoleComponentName</ComponentName>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
295
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c
Normal file
295
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c
Normal file
@@ -0,0 +1,295 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
LaffStd.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "GraphicsConsole.h"
|
||||
|
||||
EFI_NARROW_GLYPH UsStdNarrowGlyphData[] = {
|
||||
//
|
||||
// Unicode glyphs from 0x20 to 0x7e are the same as ASCII characters 0x20 to 0x7e
|
||||
//
|
||||
{ 0x0020, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0021, 0x00, {0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0022, 0x00, {0x00,0x00,0x00,0x6C,0x6C,0x6C,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0023, 0x00, {0x00,0x00,0x00,0x00,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0024, 0x00, {0x00,0x00,0x18,0x18,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x18,0x18,0x00,0x00,0x00}},
|
||||
{ 0x0025, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0x0C,0x0C,0x18,0x18,0x30,0x30,0x60,0x60,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0026, 0x00, {0x00,0x00,0x00,0x78,0xCC,0xCC,0xCC,0x78,0x76,0xDC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0027, 0x00, {0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0028, 0x00, {0x00,0x00,0x00,0x06,0x0C,0x0C,0x18,0x18,0x18,0x18,0x18,0x18,0x0C,0x0C,0x06,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0029, 0x00, {0x00,0x00,0x00,0xC0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60,0xC0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x002a, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6C,0x38,0xFE,0x38,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x002b, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x002c, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,0x00}},
|
||||
{ 0x002d, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x002e, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x002f, 0x00, {0x00,0x00,0x00,0x06,0x06,0x0C,0x0C,0x18,0x18,0x30,0x30,0x60,0x60,0xC0,0xC0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0030, 0x00, {0x00,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xD6,0xD6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0031, 0x00, {0x00,0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0032, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0x06,0x06,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC2,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0033, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0x06,0x06,0x06,0x3C,0x06,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0034, 0x00, {0x00,0x00,0x00,0x1C,0x1C,0x3C,0x3C,0x6C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0035, 0x00, {0x00,0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xC0,0xFC,0x06,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0036, 0x00, {0x00,0x00,0x00,0x3C,0x60,0xC0,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0037, 0x00, {0x00,0x00,0x00,0xFE,0xC6,0x06,0x06,0x06,0x0C,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0038, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0039, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00}},
|
||||
{ 0x003a, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x003b, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00}},
|
||||
{ 0x003c, 0x00, {0x00,0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0xC0,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00}},
|
||||
{ 0x003d, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x003e, 0x00, {0x00,0x00,0x00,0x00,0xC0,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0xC0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x003f, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x0C,0x18,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0040, 0x00, {0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0xC0,0x7E,0x00,0x00,0x00,0x00}},
|
||||
|
||||
{ 0x0041, 0x00, {0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
|
||||
{ 0x0042, 0x00, {0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0043, 0x00, {0x00,0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0044, 0x00, {0x00,0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0045, 0x00, {0x00,0x00,0x00,0xFE,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0046, 0x00, {0x00,0x00,0x00,0xFE,0x66,0x62,0x60,0x64,0x7C,0x64,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0047, 0x00, {0x00,0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xDE,0xC6,0xC6,0xC6,0x66,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0048, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0049, 0x00, {0x00,0x00,0x00,0xFC,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xFC,0x00,0x00,0x00,0x00}},
|
||||
{ 0x004a, 0x00, {0x00,0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00}},
|
||||
{ 0x004b, 0x00, {0x00,0x00,0x00,0xE6,0x66,0x6C,0x6C,0x78,0x70,0x78,0x6C,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x004c, 0x00, {0x00,0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x004d, 0x00, {0x00,0x00,0x00,0xC6,0xEE,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x004e, 0x00, {0x00,0x00,0x00,0xC6,0xE6,0xF6,0xF6,0xF6,0xDE,0xCE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x004f, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0050, 0x00, {0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0051, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xD6,0x7C,0x1C,0x0E,0x00,0x00}},
|
||||
{ 0x0052, 0x00, {0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x66,0x7C,0x78,0x6C,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0053, 0x00, {0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x60,0x38,0x0C,0x06,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0054, 0x00, {0x00,0x00,0x00,0xFC,0xFC,0xB4,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0055, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0056, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0057, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xD6,0xD6,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0058, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0xC6,0x6C,0x6C,0x38,0x6C,0x6C,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0059, 0x00, {0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0x78,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00}},
|
||||
{ 0x005a, 0x00, {0x00,0x00,0x00,0xFE,0xC6,0x86,0x0C,0x0C,0x18,0x30,0x60,0xC0,0xC2,0xC6,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x005b, 0x00, {0x00,0x00,0x00,0x1E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1E,0x00,0x00,0x00,0x00}},
|
||||
{ 0x005c, 0x00, {0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0x30,0x30,0x18,0x18,0x0C,0x0C,0x06,0x06,0x00,0x00,0x00,0x00}},
|
||||
{ 0x005d, 0x00, {0x00,0x00,0x00,0xF0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xF0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x005e, 0x00, {0x00,0x00,0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x005f, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0060, 0x00, {0x00,0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0061, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0062, 0x00, {0x00,0x00,0x00,0xE0,0x60,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0063, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0064, 0x00, {0x00,0x00,0x00,0x1C,0x0C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0xCC,0x7E,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0065, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0066, 0x00, {0x00,0x00,0x00,0x1E,0x33,0x30,0x30,0x30,0x78,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0067, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,0x00}},
|
||||
{ 0x0068, 0x00, {0x00,0x00,0x00,0xE0,0x60,0x60,0x60,0x7C,0x76,0x66,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0069, 0x00, {0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x006a, 0x00, {0x00,0x00,0x00,0x0C,0x0C,0x0C,0x00,0x1C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x6C,0x38,0x00}},
|
||||
{ 0x006b, 0x00, {0x00,0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x70,0x78,0x6C,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x006c, 0x00, {0x00,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x006d, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEC,0xEE,0xFE,0xD6,0xD6,0xD6,0xD6,0xD6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x006e, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00}},
|
||||
{ 0x006f, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0070, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00}},
|
||||
{ 0x0071, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00}},
|
||||
{ 0x0072, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x60,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0073, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0x7C,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0074, 0x00, {0x00,0x00,0x00,0x10,0x30,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0075, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0076, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x78,0x30,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0077, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xD6,0xD6,0xFE,0xEE,0x6C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0078, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x6C,0x6C,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x0079, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00}},
|
||||
{ 0x007a, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x86,0x0C,0x18,0x30,0x60,0xC0,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x007b, 0x00, {0x00,0x00,0x00,0x0E,0x18,0x18,0x18,0x18,0x30,0x18,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00}},
|
||||
{ 0x007c, 0x00, {0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x007d, 0x00, {0x00,0x00,0x00,0xE0,0x30,0x30,0x30,0x30,0x18,0x30,0x30,0x30,0x30,0x30,0xE0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x007e, 0x00, {0x00,0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
|
||||
{ 0x00a0, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a1, 0x00, {0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x3C,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a2, 0x00, {0x00,0x00,0x00,0x00,0x18,0x18,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a3, 0x00, {0x00,0x00,0x00,0x38,0x6C,0x64,0x60,0x60,0xF0,0x60,0x60,0x60,0x60,0xE6,0xFC,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a4, 0x00, {0x00,0x00,0x18,0x00,0x00,0x00,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0xC6,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a5, 0x00, {0x00,0x00,0x00,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,0x7E,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a6, 0x00, {0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a7, 0x00, {0x00,0x00,0x18,0x7C,0xC6,0x60,0x38,0x6C,0xC6,0xC6,0x6C,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a8, 0x00, {0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00a9, 0x00, {0x00,0x00,0x00,0x00,0x7C,0x82,0x9A,0xA2,0xA2,0xA2,0x9A,0x82,0x7C,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00aa, 0x00, {0x00,0x00,0x00,0x00,0x3C,0x6C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ab, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x6C,0xD8,0x6C,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ac, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ad, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ae, 0x00, {0x00,0x00,0x00,0x00,0x7C,0x82,0xB2,0xAA,0xAA,0xB2,0xAA,0xAA,0x82,0x7C,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00af, 0x00, {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b0, 0x00, {0x00,0x00,0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b1, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b2, 0x00, {0x00,0x00,0x00,0x3C,0x66,0x0C,0x18,0x32,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b3, 0x00, {0x00,0x00,0x00,0x7C,0x06,0x3C,0x06,0x06,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b4, 0x00, {0x00,0x00,0x00,0x0C,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b5, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xC0,0x00}},
|
||||
{ 0x00b6, 0x00, {0x00,0x00,0x00,0x7F,0xDB,0xDB,0xDB,0xDB,0x7B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b7, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00b8, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0x78,0x00,0x00,0x00}},
|
||||
{ 0x00b9, 0x00, {0x00,0x00,0x00,0x18,0x38,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ba, 0x00, {0x00,0x00,0x00,0x00,0x38,0x6C,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00bb, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x6C,0x36,0x6C,0xD8,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00bc, 0x00, {0x00,0x00,0x00,0x60,0xE0,0x62,0x66,0x6C,0x18,0x30,0x66,0xCE,0x9A,0x3F,0x06,0x06,0x00,0x00,0x00}},
|
||||
{ 0x00bd, 0x00, {0x00,0x00,0x00,0x60,0xE0,0x62,0x66,0x6C,0x18,0x30,0x60,0xDC,0x86,0x0C,0x18,0x3E,0x00,0x00,0x00}},
|
||||
{ 0x00be, 0x00, {0x00,0x00,0x00,0xE0,0x30,0x62,0x36,0xEC,0x18,0x30,0x66,0xCE,0x9A,0x3F,0x06,0x06,0x00,0x00,0x00}},
|
||||
{ 0x00bf, 0x00, {0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0x60,0xC0,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c0, 0x00, {0x60,0x30,0x18,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c1, 0x00, {0x18,0x30,0x60,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c2, 0x00, {0x10,0x38,0x6C,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c3, 0x00, {0x76,0xDC,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c4, 0x00, {0xCC,0xCC,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c5, 0x00, {0x38,0x6C,0x38,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c6, 0x00, {0x00,0x00,0x00,0x00,0x3E,0x6C,0xCC,0xCC,0xCC,0xFE,0xCC,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c7, 0x00, {0x00,0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x18,0x70,0x00,0x00}},
|
||||
{ 0x00c8, 0x00, {0x60,0x30,0x18,0x00,0xFE,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00c9, 0x00, {0x18,0x30,0x60,0x00,0xFE,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ca, 0x00, {0x10,0x38,0x6C,0x00,0xFE,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00cb, 0x00, {0xCC,0xCC,0x00,0x00,0xFE,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00cc, 0x00, {0x60,0x30,0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00cd, 0x00, {0x18,0x30,0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ce, 0x00, {0x10,0x38,0x6C,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00cf, 0x00, {0xCC,0xCC,0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d0, 0x00, {0x00,0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0xF6,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d1, 0x00, {0x76,0xDC,0x00,0x00,0xC6,0xE6,0xE6,0xF6,0xF6,0xDE,0xDE,0xCE,0xCE,0xC6,0xC6,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d2, 0x00, {0x60,0x30,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d3, 0x00, {0x18,0x30,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d4, 0x00, {0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d5, 0x00, {0x76,0xDC,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d6, 0x00, {0xCC,0xCC,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d7, 0x00, {0x10,0x28,0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x6C,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00d8, 0x00, {0x00,0x00,0x00,0x7C,0xCE,0xCE,0xDE,0xD6,0xD6,0xD6,0xD6,0xF6,0xE6,0xE6,0x7C,0x40,0x00,0x00,0x00}},
|
||||
{ 0x00d9, 0x00, {0x60,0x30,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00da, 0x00, {0x18,0x30,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00db, 0x00, {0x10,0x38,0x6C,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00dc, 0x00, {0xCC,0xCC,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00dd, 0x00, {0x18,0x30,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00de, 0x00, {0x00,0x00,0x10,0x00,0xF0,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x7C,0x60,0xF0,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00df, 0x00, {0x00,0x00,0x00,0x78,0xCC,0xCC,0xCC,0xCC,0xD8,0xCC,0xC6,0xC6,0xC6,0xC6,0xCC,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e0, 0x00, {0x00,0x30,0x30,0x60,0x30,0x18,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e1, 0x00, {0x00,0x00,0x00,0x18,0x30,0x60,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e2, 0x00, {0x00,0x00,0x00,0x10,0x38,0x6C,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e3, 0x00, {0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e4, 0x00, {0x00,0x00,0x00,0xCC,0xCC,0x00,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e5, 0x00, {0x00,0x00,0x00,0x38,0x6C,0x38,0x00,0x78,0x0C,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e6, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEC,0x36,0x36,0x7E,0xD8,0xD8,0xD8,0x6E,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e7, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC0,0xC6,0x7C,0x18,0x70,0x00,0x00}},
|
||||
{ 0x00e8, 0x00, {0x00,0x00,0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00e9, 0x00, {0x00,0x00,0x00,0x0C,0x18,0x30,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ea, 0x00, {0x00,0x00,0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00eb, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0x00,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ec, 0x00, {0x00,0x00,0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ed, 0x00, {0x00,0x00,0x00,0x0C,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ee, 0x00, {0x00,0x00,0x00,0x18,0x3C,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00ef, 0x00, {0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f0, 0x00, {0x00,0x00,0x00,0x34,0x18,0x2C,0x0C,0x06,0x3E,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f1, 0x00, {0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f2, 0x00, {0x00,0x00,0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f3, 0x00, {0x00,0x00,0x00,0x18,0x30,0x60,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f4, 0x00, {0x00,0x00,0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f5, 0x00, {0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f6, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f7, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x7E,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f8, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xCE,0xDE,0xD6,0xF6,0xE6,0xC6,0x7C,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00f9, 0x00, {0x00,0x00,0x00,0x60,0x30,0x18,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00fa, 0x00, {0x00,0x00,0x00,0x18,0x30,0x60,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00fb, 0x00, {0x00,0x00,0x00,0x30,0x78,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00fc, 0x00, {0x00,0x00,0x00,0xCC,0xCC,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00}},
|
||||
{ 0x00fd, 0x00, {0x00,0x00,0x00,0x0C,0x18,0x30,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00}},
|
||||
{ 0x00fe, 0x00, {0x00,0x00,0x00,0xE0,0x60,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00}},
|
||||
{ 0x00ff, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00}},
|
||||
|
||||
{ (CHAR16)BOXDRAW_HORIZONTAL, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_RIGHT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_LEFT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_UP_RIGHT, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_UP_LEFT, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_RIGHT, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_LEFT, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_HORIZONTAL, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_UP_HORIZONTAL, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_HORIZONTAL, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_HORIZONTAL, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_VERTICAL, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_RIGHT_DOUBLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_DOUBLE_RIGHT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_DOWN_RIGHT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_LEFT_DOUBLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_DOUBLE_LEFT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_DOWN_LEFT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_UP_RIGHT_DOUBLE, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_UP_DOUBLE_RIGHT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_UP_RIGHT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_UP_LEFT_DOUBLE, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_UP_DOUBLE_LEFT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_UP_LEFT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_RIGHT_DOUBLE, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_DOUBLE_RIGHT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_VERTICAL_RIGHT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_LEFT_DOUBLE, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_DOUBLE_LEFT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_VERTICAL_LEFT, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_HORIZONTAL_DOUBLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_DOWN_DOUBLE_HORIZONTAL, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_DOWN_HORIZONTAL, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_UP_HORIZONTAL_DOUBLE, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_UP_DOUBLE_HORIZONTAL, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_UP_HORIZONTAL, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE, 0x00, {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}},
|
||||
{ (CHAR16)BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
{ (CHAR16)BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL, 0x00, {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36}},
|
||||
|
||||
{ (CHAR16)BLOCKELEMENT_FULL_BLOCK, 0x00, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}},
|
||||
{ (CHAR16)BLOCKELEMENT_LIGHT_SHADE, 0x00, {0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22}},
|
||||
|
||||
{ (CHAR16)GEOMETRICSHAPE_RIGHT_TRIANGLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF0,0xF8,0xFE,0xF8,0xF0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)GEOMETRICSHAPE_LEFT_TRIANGLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0x06,0x0E,0x1E,0x3E,0xFE,0x3E,0x1E,0x0E,0x06,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)GEOMETRICSHAPE_UP_TRIANGLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)GEOMETRICSHAPE_DOWN_TRIANGLE, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
|
||||
{ (CHAR16)ARROW_UP, 0x00, {0x00,0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)ARROW_DOWN, 0x00, {0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)ARROW_LEFT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x20,0x60,0x60,0xFE,0xFE,0x60,0x60,0x20,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
{ (CHAR16)ARROW_RIGHT, 0x00, {0x00,0x00,0x00,0x00,0x00,0x08,0x0C,0x0C,0xFE,0xFE,0x0C,0x0C,0x08,0x00,0x00,0x00,0x00,0x00,0x00}},
|
||||
|
||||
{ 0x0000, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} //EOL
|
||||
};
|
||||
|
||||
UINTN
|
||||
ReturnNarrowFontSize (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
//
|
||||
// I need the size of this outside of this file, so here is a stub function to do that for me
|
||||
//
|
||||
return sizeof (UsStdNarrowGlyphData);
|
||||
}
|
51
MdeModulePkg/Universal/Console/TerminalDxe/CommonHeader.h
Normal file
51
MdeModulePkg/Universal/Console/TerminalDxe/CommonHeader.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/**@file
|
||||
Common header file shared by all source files.
|
||||
|
||||
This file includes package header files, library classes and protocol, PPI & GUID definitions.
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
#ifndef __COMMON_HEADER_H_
|
||||
#define __COMMON_HEADER_H_
|
||||
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiDxe.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Protocol/SerialIo.h>
|
||||
#include <Guid/GlobalVariable.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Guid/HotPlugDevice.h>
|
||||
#include <Guid/PcAnsi.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
//
|
||||
// Driver Binding Externs
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName;
|
||||
|
||||
#endif
|
200
MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c
Normal file
200
MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c
Normal file
@@ -0,0 +1,200 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "Terminal.h"
|
||||
|
||||
//
|
||||
// EFI Component Name Protocol
|
||||
//
|
||||
EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName = {
|
||||
TerminalComponentNameGetDriverName,
|
||||
TerminalComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
|
||||
static EFI_UNICODE_STRING_TABLE mTerminalDriverNameTable[] = {
|
||||
{
|
||||
"eng",
|
||||
(CHAR16 *) L"Serial Terminal Driver"
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalComponentNameGetDriverName (
|
||||
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,
|
||||
gTerminalComponentName.SupportedLanguages,
|
||||
mTerminalDriverNameTable,
|
||||
DriverName
|
||||
);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. 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 retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller 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.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language
|
||||
specified by Language from the point of view of the
|
||||
driver specified by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOutput;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gTerminalDriverBinding.DriverBindingHandle,
|
||||
&gEfiSerialIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// This is a bus driver, so ChildHandle can not be NULL.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
&gEfiSerialIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Get our context back
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
(VOID **) &SimpleTextOutput,
|
||||
gTerminalDriverBinding.DriverBindingHandle,
|
||||
ChildHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (SimpleTextOutput);
|
||||
|
||||
return LookupUnicodeString (
|
||||
Language,
|
||||
gTerminalComponentName.SupportedLanguages,
|
||||
TerminalDevice->ControllerNameTable,
|
||||
ControllerName
|
||||
);
|
||||
}
|
56
MdeModulePkg/Universal/Console/TerminalDxe/EntryPoint.c
Normal file
56
MdeModulePkg/Universal/Console/TerminalDxe/EntryPoint.c
Normal file
@@ -0,0 +1,56 @@
|
||||
/**@file
|
||||
Entry Point Source file.
|
||||
|
||||
This file contains the user entry point
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
/**
|
||||
The user Entry Point for module Terminal. The user code starts with this function.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeTerminal(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Install driver model protocol(s).
|
||||
//
|
||||
Status = EfiLibInstallAllDriverProtocols (
|
||||
ImageHandle,
|
||||
SystemTable,
|
||||
&gTerminalDriverBinding,
|
||||
ImageHandle,
|
||||
&gTerminalComponentName,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
1194
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
Normal file
1194
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
Normal file
File diff suppressed because it is too large
Load Diff
554
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
Normal file
554
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
Normal file
@@ -0,0 +1,554 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
terminal.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _TERMINAL_H
|
||||
#define _TERMINAL_H
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#define RAW_FIFO_MAX_NUMBER 256
|
||||
#define FIFO_MAX_NUMBER 128
|
||||
|
||||
typedef struct {
|
||||
UINT8 Head;
|
||||
UINT8 Tail;
|
||||
UINT8 Data[RAW_FIFO_MAX_NUMBER + 1];
|
||||
} RAW_DATA_FIFO;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Head;
|
||||
UINT8 Tail;
|
||||
UINT16 Data[FIFO_MAX_NUMBER + 1];
|
||||
} UNICODE_FIFO;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Head;
|
||||
UINT8 Tail;
|
||||
EFI_INPUT_KEY Data[FIFO_MAX_NUMBER + 1];
|
||||
} EFI_KEY_FIFO;
|
||||
|
||||
#define TERMINAL_DEV_SIGNATURE EFI_SIGNATURE_32 ('t', 'm', 'n', 'l')
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
EFI_HANDLE Handle;
|
||||
UINT8 TerminalType;
|
||||
EFI_SERIAL_IO_PROTOCOL *SerialIo;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
VENDOR_DEVICE_PATH Node;
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleInput;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
|
||||
UINTN SerialInTimeOut;
|
||||
RAW_DATA_FIFO RawFiFo;
|
||||
UNICODE_FIFO UnicodeFiFo;
|
||||
EFI_KEY_FIFO EfiKeyFiFo;
|
||||
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
|
||||
EFI_EVENT TwoSecondTimeOut;
|
||||
UINT32 InputState;
|
||||
UINT32 ResetState;
|
||||
|
||||
//
|
||||
// Esc could not be output to the screen by user,
|
||||
// but the terminal driver need to output it to
|
||||
// the terminal emulation software to send control sequence.
|
||||
// This boolean is used by the terminal driver only
|
||||
// to indicate whether the Esc could be sent or not.
|
||||
//
|
||||
BOOLEAN OutputEscChar;
|
||||
} TERMINAL_DEV;
|
||||
|
||||
#define INPUT_STATE_DEFAULT 0x00
|
||||
#define INPUT_STATE_ESC 0x01
|
||||
#define INPUT_STATE_CSI 0x02
|
||||
#define INPUT_STATE_LEFTOPENBRACKET 0x04
|
||||
#define INPUT_STATE_O 0x08
|
||||
#define INPUT_STATE_2 0x10
|
||||
|
||||
#define RESET_STATE_DEFAULT 0x00
|
||||
#define RESET_STATE_ESC_R 0x01
|
||||
#define RESET_STATE_ESC_R_ESC_r 0x02
|
||||
|
||||
#define TERMINAL_CON_IN_DEV_FROM_THIS(a) CR (a, TERMINAL_DEV, SimpleInput, TERMINAL_DEV_SIGNATURE)
|
||||
#define TERMINAL_CON_OUT_DEV_FROM_THIS(a) CR (a, TERMINAL_DEV, SimpleTextOutput, TERMINAL_DEV_SIGNATURE)
|
||||
|
||||
typedef union {
|
||||
UINT8 Utf8_1;
|
||||
UINT8 Utf8_2[2];
|
||||
UINT8 Utf8_3[3];
|
||||
} UTF8_CHAR;
|
||||
|
||||
#define PcAnsiType 0
|
||||
#define VT100Type 1
|
||||
#define VT100PlusType 2
|
||||
#define VTUTF8Type 3
|
||||
|
||||
#define LEFTOPENBRACKET 0x5b // '['
|
||||
#define ACAP 0x41
|
||||
#define BCAP 0x42
|
||||
#define CCAP 0x43
|
||||
#define DCAP 0x44
|
||||
|
||||
#define MODE0_COLUMN_COUNT 80
|
||||
#define MODE0_ROW_COUNT 25
|
||||
|
||||
#define BACKSPACE 8
|
||||
#define ESC 27
|
||||
#define CSI 0x9B
|
||||
#define DEL 127
|
||||
#define BRIGHT_CONTROL_OFFSET 2
|
||||
#define FOREGROUND_CONTROL_OFFSET 6
|
||||
#define BACKGROUND_CONTROL_OFFSET 11
|
||||
#define ROW_OFFSET 2
|
||||
#define COLUMN_OFFSET 5
|
||||
|
||||
typedef struct {
|
||||
UINT16 Unicode;
|
||||
CHAR8 PcAnsi;
|
||||
CHAR8 Ascii;
|
||||
} UNICODE_TO_CHAR;
|
||||
|
||||
#define VarConsoleInpDev L"ConInDev"
|
||||
#define VarConsoleOutDev L"ConOutDev"
|
||||
#define VarErrorOutDev L"ErrOutDev"
|
||||
|
||||
//
|
||||
// Global Variables
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName;
|
||||
|
||||
//
|
||||
// Prototypes
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeTerminal (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConInReset (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConInReadKeyStroke (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
|
||||
OUT EFI_INPUT_KEY *Key
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
TerminalConInWaitForKey (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutReset (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
IN BOOLEAN Visible
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalComponentNameGetDriverName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
//
|
||||
// internal functions
|
||||
//
|
||||
EFI_STATUS
|
||||
TerminalConInCheckForKey (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
TerminalUpdateConsoleDevVariable (
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
TerminalRemoveConsoleDevVariable (
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
VOID *
|
||||
TerminalGetVariableAndSize (
|
||||
IN CHAR16 *Name,
|
||||
IN EFI_GUID *VendorGuid,
|
||||
OUT UINTN *VariableSize
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SetTerminalDevicePath (
|
||||
IN UINT8 TerminalType,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
|
||||
OUT EFI_DEVICE_PATH_PROTOCOL **TerminalDevicePath
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
InitializeRawFiFo (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
InitializeUnicodeFiFo (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
InitializeEfiKeyFiFo (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
GetOneKeyFromSerial (
|
||||
EFI_SERIAL_IO_PROTOCOL *SerialIo,
|
||||
UINT8 *Input
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
RawFiFoInsertOneKey (
|
||||
TERMINAL_DEV *TerminalDevice,
|
||||
UINT8 Input
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
RawFiFoRemoveOneKey (
|
||||
TERMINAL_DEV *TerminalDevice,
|
||||
UINT8 *Output
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsRawFiFoEmpty (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsRawFiFoFull (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
EfiKeyFiFoInsertOneKey (
|
||||
TERMINAL_DEV *TerminalDevice,
|
||||
EFI_INPUT_KEY Key
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
EfiKeyFiFoRemoveOneKey (
|
||||
TERMINAL_DEV *TerminalDevice,
|
||||
EFI_INPUT_KEY *Output
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsEfiKeyFiFoEmpty (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsEfiKeyFiFoFull (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
UnicodeFiFoInsertOneKey (
|
||||
TERMINAL_DEV *TerminalDevice,
|
||||
UINT16 Input
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
UnicodeFiFoRemoveOneKey (
|
||||
TERMINAL_DEV *TerminalDevice,
|
||||
UINT16 *Output
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsUnicodeFiFoEmpty (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsUnicodeFiFoFull (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
UINT8
|
||||
UnicodeFiFoGetKeyCount (
|
||||
TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
TranslateRawDataToEfiKey (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// internal functions for PC ANSI
|
||||
//
|
||||
VOID
|
||||
AnsiRawDataToUnicode (
|
||||
IN TERMINAL_DEV *PcAnsiDevice
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
UnicodeToEfiKey (
|
||||
IN TERMINAL_DEV *PcAnsiDevice
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
AnsiTestString (
|
||||
IN TERMINAL_DEV *TerminalDevice,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// internal functions for VT100
|
||||
//
|
||||
EFI_STATUS
|
||||
VT100TestString (
|
||||
IN TERMINAL_DEV *VT100Device,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// internal functions for VT100Plus
|
||||
//
|
||||
EFI_STATUS
|
||||
VT100PlusTestString (
|
||||
IN TERMINAL_DEV *TerminalDevice,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// internal functions for VTUTF8
|
||||
//
|
||||
VOID
|
||||
VTUTF8RawDataToUnicode (
|
||||
IN TERMINAL_DEV *VtUtf8Device
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
VTUTF8TestString (
|
||||
IN TERMINAL_DEV *TerminalDevice,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
UnicodeToUtf8 (
|
||||
IN CHAR16 Unicode,
|
||||
OUT UTF8_CHAR *Utf8Char,
|
||||
OUT UINT8 *ValidBytes
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
GetOneValidUtf8Char (
|
||||
IN TERMINAL_DEV *Utf8Device,
|
||||
OUT UTF8_CHAR *Utf8Char,
|
||||
OUT UINT8 *ValidBytes
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
Utf8ToUnicode (
|
||||
IN UTF8_CHAR Utf8Char,
|
||||
IN UINT8 ValidBytes,
|
||||
OUT CHAR16 *UnicodeChar
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// functions for boxdraw unicode
|
||||
//
|
||||
BOOLEAN
|
||||
TerminalIsValidTextGraphics (
|
||||
IN CHAR16 Graphic,
|
||||
OUT CHAR8 *PcAnsi, OPTIONAL
|
||||
OUT CHAR8 *Ascii OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
TerminalIsValidAscii (
|
||||
IN CHAR16 Ascii
|
||||
)
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
TerminalIsValidEfiCntlChar (
|
||||
IN CHAR16 CharC
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
117
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.inf
Normal file
117
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.inf
Normal file
@@ -0,0 +1,117 @@
|
||||
#/** @file
|
||||
# Component description file for Terminal module.
|
||||
#
|
||||
# This driver installs Simple Text In/Out protocol for terminal devices (serial devices or hotplug devices).
|
||||
# Copyright (c) 2006 - 2007, 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.
|
||||
#
|
||||
#
|
||||
#**/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Defines Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = Terminal
|
||||
FILE_GUID = 9E863906-A40F-4875-977F-5B93FF237FC6
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
ENTRY_POINT = InitializeTerminal
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gTerminalDriverBinding
|
||||
# COMPONENT_NAME = gTerminalComponentName
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
ComponentName.c
|
||||
vtutf8.c
|
||||
ansi.c
|
||||
TerminalConOut.c
|
||||
TerminalConIn.c
|
||||
Terminal.c
|
||||
Terminal.h
|
||||
CommonHeader.h
|
||||
EntryPoint.c
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
IntelFrameworkPkg/IntelFrameworkPkg.dec
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
DevicePathLib
|
||||
UefiRuntimeServicesTableLib
|
||||
UefiBootServicesTableLib
|
||||
MemoryAllocationLib
|
||||
BaseMemoryLib
|
||||
ReportStatusCodeLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Guid C Name Section - list of Guids that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Guids]
|
||||
gEfiGlobalVariableGuid # SOMETIMES_CONSUMED L"ErrOutDev"
|
||||
gEfiVTUTF8Guid # SOMETIMES_CONSUMED
|
||||
gEfiVT100Guid # SOMETIMES_CONSUMED
|
||||
gEfiVT100PlusGuid # SOMETIMES_CONSUMED
|
||||
gEfiPcAnsiGuid # SOMETIMES_CONSUMED
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
|
||||
# that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Protocols]
|
||||
gEfiHotPlugDeviceGuid # PROTOCOL SOMETIMES_CONSUMED
|
||||
gEfiSerialIoProtocolGuid # PROTOCOL TO_START
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||
gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
|
||||
gEfiSimpleTextOutProtocolGuid # PROTOCOL BY_START
|
||||
|
129
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.msa
Normal file
129
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.msa
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
|
||||
<MsaHeader>
|
||||
<ModuleName>Terminal</ModuleName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<GuidValue>9E863906-A40F-4875-977F-5B93FF237FC6</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for Terminal module.</Abstract>
|
||||
<Description>This driver installs Simple Text In/Out protocol for terminal devices (serial devices or hotplug devices).</Description>
|
||||
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
|
||||
<License>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.</License>
|
||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>Terminal</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
|
||||
<Keyword>DebugLib</Keyword>
|
||||
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverModelLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverEntryPoint</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>ReportStatusCodeLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseMemoryLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiRuntimeServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>DevicePathLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>Terminal.h</Filename>
|
||||
<Filename>Terminal.c</Filename>
|
||||
<Filename>TerminalConIn.c</Filename>
|
||||
<Filename>TerminalConOut.c</Filename>
|
||||
<Filename>ansi.c</Filename>
|
||||
<Filename>vtutf8.c</Filename>
|
||||
<Filename>ComponentName.c</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
|
||||
</PackageDependencies>
|
||||
<Protocols>
|
||||
<Protocol Usage="BY_START">
|
||||
<ProtocolCName>gEfiSimpleTextOutProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="BY_START">
|
||||
<ProtocolCName>gEfiSimpleTextInProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="TO_START">
|
||||
<ProtocolCName>gEfiSerialIoProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="SOMETIMES_CONSUMED">
|
||||
<ProtocolCName>gEfiHotPlugDeviceGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
</Protocols>
|
||||
<Variables>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0043 0x006F 0x006E 0x0049 0x006E 0x0044 0x0065 0x0076</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ConInDev" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0043 0x006F 0x006E 0x004F 0x0075 0x0074 0x0044 0x0065 0x0076</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ConOutDev" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<VariableName>0x0045 0x0072 0x0072 0x004F 0x0075 0x0074 0x0044 0x0065 0x0076</VariableName>
|
||||
<GuidC_Name>gEfiGlobalVariableGuid</GuidC_Name>
|
||||
<HelpText>L"ErrOutDev" global variable will be updated if the serial device is not a hot plug device.</HelpText>
|
||||
</Variable>
|
||||
</Variables>
|
||||
<Guids>
|
||||
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||
<GuidCName>gEfiGlobalVariableGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||
<GuidCName>gEfiPcAnsiGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||
<GuidCName>gEfiVT100PlusGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||
<GuidCName>gEfiVT100Guid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="SOMETIMES_CONSUMED">
|
||||
<GuidCName>gEfiVTUTF8Guid</GuidCName>
|
||||
</GuidCNames>
|
||||
</Guids>
|
||||
<Externs>
|
||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||
<Extern>
|
||||
<DriverBinding>gTerminalDriverBinding</DriverBinding>
|
||||
<ComponentName>gTerminalComponentName</ComponentName>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
1184
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
Normal file
1184
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
Normal file
File diff suppressed because it is too large
Load Diff
1002
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
Normal file
1002
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
Normal file
File diff suppressed because it is too large
Load Diff
73
MdeModulePkg/Universal/Console/TerminalDxe/ansi.c
Normal file
73
MdeModulePkg/Universal/Console/TerminalDxe/ansi.c
Normal file
@@ -0,0 +1,73 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
ansi.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "Terminal.h"
|
||||
|
||||
VOID
|
||||
AnsiRawDataToUnicode (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
{
|
||||
UINT8 RawData;
|
||||
|
||||
//
|
||||
// pop the raw data out from the raw fifo,
|
||||
// and translate it into unicode, then push
|
||||
// the unicode into unicode fifo, until the raw fifo is empty.
|
||||
//
|
||||
while (!IsRawFiFoEmpty (TerminalDevice)) {
|
||||
|
||||
RawFiFoRemoveOneKey (TerminalDevice, &RawData);
|
||||
|
||||
UnicodeFiFoInsertOneKey (TerminalDevice, (UINT16) RawData);
|
||||
}
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
AnsiTestString (
|
||||
IN TERMINAL_DEV *TerminalDevice,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
{
|
||||
CHAR8 GraphicChar;
|
||||
|
||||
//
|
||||
// support three kind of character:
|
||||
// valid ascii, valid efi control char, valid text graphics.
|
||||
//
|
||||
for (; *WString != CHAR_NULL; WString++) {
|
||||
|
||||
if ( !(TerminalIsValidAscii (*WString) ||
|
||||
TerminalIsValidEfiCntlChar (*WString) ||
|
||||
TerminalIsValidTextGraphics (*WString, &GraphicChar, NULL) )) {
|
||||
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
275
MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c
Normal file
275
MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c
Normal file
@@ -0,0 +1,275 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
vtutf8.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "Terminal.h"
|
||||
|
||||
VOID
|
||||
VTUTF8RawDataToUnicode (
|
||||
IN TERMINAL_DEV *TerminalDevice
|
||||
)
|
||||
{
|
||||
UTF8_CHAR Utf8Char;
|
||||
UINT8 ValidBytes;
|
||||
UINT16 UnicodeChar;
|
||||
|
||||
ValidBytes = 0;
|
||||
//
|
||||
// pop the raw data out from the raw fifo,
|
||||
// and translate it into unicode, then push
|
||||
// the unicode into unicode fifo, until the raw fifo is empty.
|
||||
//
|
||||
while (!IsRawFiFoEmpty (TerminalDevice)) {
|
||||
|
||||
GetOneValidUtf8Char (TerminalDevice, &Utf8Char, &ValidBytes);
|
||||
|
||||
if (ValidBytes < 1 || ValidBytes > 3) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Utf8ToUnicode (Utf8Char, ValidBytes, (CHAR16 *) &UnicodeChar);
|
||||
|
||||
UnicodeFiFoInsertOneKey (TerminalDevice, UnicodeChar);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
GetOneValidUtf8Char (
|
||||
IN TERMINAL_DEV *Utf8Device,
|
||||
OUT UTF8_CHAR *Utf8Char,
|
||||
OUT UINT8 *ValidBytes
|
||||
)
|
||||
{
|
||||
UINT8 Temp;
|
||||
UINT8 Index;
|
||||
BOOLEAN FetchFlag;
|
||||
|
||||
Temp = 0;
|
||||
Index = 0;
|
||||
FetchFlag = TRUE;
|
||||
|
||||
//
|
||||
// if no valid Utf8 char is found in the RawFiFo,
|
||||
// then *ValidBytes will be zero.
|
||||
//
|
||||
*ValidBytes = 0;
|
||||
|
||||
while (!IsRawFiFoEmpty (Utf8Device)) {
|
||||
|
||||
RawFiFoRemoveOneKey (Utf8Device, &Temp);
|
||||
|
||||
switch (*ValidBytes) {
|
||||
|
||||
case 0:
|
||||
if ((Temp & 0x80) == 0) {
|
||||
//
|
||||
// one-byte utf8 char
|
||||
//
|
||||
*ValidBytes = 1;
|
||||
|
||||
Utf8Char->Utf8_1 = Temp;
|
||||
|
||||
FetchFlag = FALSE;
|
||||
|
||||
} else if ((Temp & 0xe0) == 0xc0) {
|
||||
//
|
||||
// two-byte utf8 char
|
||||
//
|
||||
*ValidBytes = 2;
|
||||
|
||||
Utf8Char->Utf8_2[1] = Temp;
|
||||
|
||||
} else if ((Temp & 0xf0) == 0xe0) {
|
||||
//
|
||||
// three-byte utf8 char
|
||||
//
|
||||
*ValidBytes = 3;
|
||||
|
||||
Utf8Char->Utf8_3[2] = Temp;
|
||||
|
||||
Index++;
|
||||
|
||||
} else {
|
||||
//
|
||||
// reset *ValidBytes to zero, let valid utf8 char search restart
|
||||
//
|
||||
*ValidBytes = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ((Temp & 0xc0) == 0x80) {
|
||||
|
||||
Utf8Char->Utf8_2[0] = Temp;
|
||||
|
||||
FetchFlag = FALSE;
|
||||
|
||||
} else {
|
||||
|
||||
*ValidBytes = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if ((Temp & 0xc0) == 0x80) {
|
||||
|
||||
Utf8Char->Utf8_3[2 - Index] = Temp;
|
||||
Index++;
|
||||
if (Index == 3) {
|
||||
FetchFlag = FALSE;
|
||||
}
|
||||
} else {
|
||||
|
||||
*ValidBytes = 0;
|
||||
Index = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!FetchFlag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
VOID
|
||||
Utf8ToUnicode (
|
||||
IN UTF8_CHAR Utf8Char,
|
||||
IN UINT8 ValidBytes,
|
||||
OUT CHAR16 *UnicodeChar
|
||||
)
|
||||
{
|
||||
UINT8 UnicodeByte0;
|
||||
UINT8 UnicodeByte1;
|
||||
UINT8 Byte0;
|
||||
UINT8 Byte1;
|
||||
UINT8 Byte2;
|
||||
|
||||
*UnicodeChar = 0;
|
||||
|
||||
//
|
||||
// translate utf8 code to unicode, in terminal standard,
|
||||
// up to 3 bytes utf8 code is supported.
|
||||
//
|
||||
switch (ValidBytes) {
|
||||
case 1:
|
||||
//
|
||||
// one-byte utf8 code
|
||||
//
|
||||
*UnicodeChar = (UINT16) Utf8Char.Utf8_1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
//
|
||||
// two-byte utf8 code
|
||||
//
|
||||
Byte0 = Utf8Char.Utf8_2[0];
|
||||
Byte1 = Utf8Char.Utf8_2[1];
|
||||
|
||||
UnicodeByte0 = (UINT8) ((Byte1 << 6) | (Byte0 & 0x3f));
|
||||
UnicodeByte1 = (UINT8) ((Byte1 >> 2) & 0x07);
|
||||
*UnicodeChar = (UINT16) (UnicodeByte0 | (UnicodeByte1 << 8));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
//
|
||||
// three-byte utf8 code
|
||||
//
|
||||
Byte0 = Utf8Char.Utf8_3[0];
|
||||
Byte1 = Utf8Char.Utf8_3[1];
|
||||
Byte2 = Utf8Char.Utf8_3[2];
|
||||
|
||||
UnicodeByte0 = (UINT8) ((Byte1 << 6) | (Byte0 & 0x3f));
|
||||
UnicodeByte1 = (UINT8) ((Byte2 << 4) | ((Byte1 >> 2) & 0x0f));
|
||||
*UnicodeChar = (UINT16) (UnicodeByte0 | (UnicodeByte1 << 8));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
VOID
|
||||
UnicodeToUtf8 (
|
||||
IN CHAR16 Unicode,
|
||||
OUT UTF8_CHAR *Utf8Char,
|
||||
OUT UINT8 *ValidBytes
|
||||
)
|
||||
{
|
||||
UINT8 UnicodeByte0;
|
||||
UINT8 UnicodeByte1;
|
||||
//
|
||||
// translate unicode to utf8 code
|
||||
//
|
||||
UnicodeByte0 = (UINT8) Unicode;
|
||||
UnicodeByte1 = (UINT8) (Unicode >> 8);
|
||||
|
||||
if (Unicode < 0x0080) {
|
||||
|
||||
Utf8Char->Utf8_1 = (UINT8) (UnicodeByte0 & 0x7f);
|
||||
*ValidBytes = 1;
|
||||
|
||||
} else if (Unicode < 0x0800) {
|
||||
//
|
||||
// byte sequence: high -> low
|
||||
// Utf8_2[0], Utf8_2[1]
|
||||
//
|
||||
Utf8Char->Utf8_2[1] = (UINT8) ((UnicodeByte0 & 0x3f) + 0x80);
|
||||
Utf8Char->Utf8_2[0] = (UINT8) ((((UnicodeByte1 << 2) + (UnicodeByte0 >> 6)) & 0x1f) + 0xc0);
|
||||
|
||||
*ValidBytes = 2;
|
||||
|
||||
} else {
|
||||
//
|
||||
// byte sequence: high -> low
|
||||
// Utf8_3[0], Utf8_3[1], Utf8_3[2]
|
||||
//
|
||||
Utf8Char->Utf8_3[2] = (UINT8) ((UnicodeByte0 & 0x3f) + 0x80);
|
||||
Utf8Char->Utf8_3[1] = (UINT8) ((((UnicodeByte1 << 2) + (UnicodeByte0 >> 6)) & 0x3f) + 0x80);
|
||||
Utf8Char->Utf8_3[0] = (UINT8) (((UnicodeByte1 >> 4) & 0x0f) + 0xe0);
|
||||
|
||||
*ValidBytes = 3;
|
||||
}
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
VTUTF8TestString (
|
||||
IN TERMINAL_DEV *TerminalDevice,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
{
|
||||
//
|
||||
// to utf8, all kind of characters are supported.
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
44
MdeModulePkg/Universal/DevicePathDxe/CommonHeader.h
Normal file
44
MdeModulePkg/Universal/DevicePathDxe/CommonHeader.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/**@file
|
||||
Common header file shared by all source files.
|
||||
|
||||
This file includes package header files, library classes and protocol, PPI & GUID definitions.
|
||||
|
||||
Copyright (c) 2006 - 2007, 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.
|
||||
**/
|
||||
|
||||
#ifndef __COMMON_HEADER_H_
|
||||
#define __COMMON_HEADER_H_
|
||||
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiDxe.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/DevicePathUtilities.h>
|
||||
#include <Protocol/DebugPort.h>
|
||||
#include <Protocol/DevicePathToText.h>
|
||||
#include <Protocol/DevicePathFromText.h>
|
||||
#include <Guid/PcAnsi.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PrintLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
||||
#endif
|
114
MdeModulePkg/Universal/DevicePathDxe/DevicePath.c
Normal file
114
MdeModulePkg/Universal/DevicePathDxe/DevicePath.c
Normal file
@@ -0,0 +1,114 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
DevicePathDriver.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Device Path Driver to produce DevPathUtilities Protocol, DevPathFromText Protocol
|
||||
and DevPathToText Protocol.
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "DevicePath.h"
|
||||
|
||||
EFI_HANDLE mDevicePathHandle = NULL;
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DEVICE_PATH_UTILITIES_PROTOCOL mDevicePathUtilities = {
|
||||
GetDevicePathSizeProtocolInterface,
|
||||
DuplicateDevicePathProtocolInterface,
|
||||
AppendDevicePathProtocolInterface,
|
||||
AppendDeviceNodeProtocolInterface,
|
||||
AppendDevicePathInstanceProtocolInterface,
|
||||
GetNextDevicePathInstanceProtocolInterface,
|
||||
IsDevicePathMultiInstanceProtocolInterface,
|
||||
CreateDeviceNodeProtocolInterface
|
||||
};
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DEVICE_PATH_TO_TEXT_PROTOCOL mDevicePathToText = {
|
||||
ConvertDeviceNodeToText,
|
||||
ConvertDevicePathToText
|
||||
};
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL mDevicePathFromText = {
|
||||
ConvertTextToDeviceNode,
|
||||
ConvertTextToDevicePath
|
||||
};
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED const EFI_GUID mEfiDevicePathMessagingSASGuid = DEVICE_PATH_MESSAGING_SAS;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DevicePathEntryPoint (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Entry point for EFI drivers.
|
||||
|
||||
Arguments:
|
||||
ImageHandle - EFI_HANDLE
|
||||
SystemTable - EFI_SYSTEM_TABLE
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS
|
||||
others
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = EFI_UNSUPPORTED;
|
||||
if (FeaturePcdGet (PcdDevicePathSupportDevicePathToText)) {
|
||||
if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText)) {
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&mDevicePathHandle,
|
||||
&gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,
|
||||
&gEfiDevicePathToTextProtocolGuid, &mDevicePathToText,
|
||||
&gEfiDevicePathFromTextProtocolGuid, &mDevicePathFromText,
|
||||
NULL
|
||||
);
|
||||
} else {
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&mDevicePathHandle,
|
||||
&gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,
|
||||
&gEfiDevicePathToTextProtocolGuid, &mDevicePathToText,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText)) {
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&mDevicePathHandle,
|
||||
&gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,
|
||||
&gEfiDevicePathFromTextProtocolGuid, &mDevicePathFromText,
|
||||
NULL
|
||||
);
|
||||
} else {
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&mDevicePathHandle,
|
||||
&gEfiDevicePathUtilitiesProtocolGuid, &mDevicePathUtilities,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
}
|
412
MdeModulePkg/Universal/DevicePathDxe/DevicePath.h
Normal file
412
MdeModulePkg/Universal/DevicePathDxe/DevicePath.h
Normal file
@@ -0,0 +1,412 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
DevicePath.h
|
||||
|
||||
Abstract:
|
||||
Definition for Device Path Utilities driver
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEVICE_PATH_DRIVER_H
|
||||
#define _DEVICE_PATH_DRIVER_H
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
extern const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid;
|
||||
extern const EFI_GUID mEfiDevicePathMessagingSASGuid;
|
||||
|
||||
#define MAX_CHAR 480
|
||||
|
||||
#define MIN_ALIGNMENT_SIZE sizeof(UINTN)
|
||||
#define ALIGN_SIZE(a) ((a % MIN_ALIGNMENT_SIZE) ? MIN_ALIGNMENT_SIZE - (a % MIN_ALIGNMENT_SIZE) : 0)
|
||||
|
||||
#define IS_COMMA(a) ((a) == L',')
|
||||
#define IS_HYPHEN(a) ((a) == L'-')
|
||||
#define IS_DOT(a) ((a) == L'.')
|
||||
#define IS_LEFT_PARENTH(a) ((a) == L'(')
|
||||
#define IS_RIGHT_PARENTH(a) ((a) == L')')
|
||||
#define IS_SLASH(a) ((a) == L'/')
|
||||
#define IS_NULL(a) ((a) == L'\0')
|
||||
|
||||
#define DEVICE_NODE_END 1
|
||||
#define DEVICE_PATH_INSTANCE_END 2
|
||||
#define DEVICE_PATH_END 3
|
||||
|
||||
#define SetDevicePathInstanceEndNode(a) { \
|
||||
(a)->Type = END_DEVICE_PATH_TYPE; \
|
||||
(a)->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; \
|
||||
(a)->Length[0] = sizeof (EFI_DEVICE_PATH_PROTOCOL); \
|
||||
(a)->Length[1] = 0; \
|
||||
}
|
||||
|
||||
//
|
||||
// Private Data structure
|
||||
//
|
||||
typedef struct {
|
||||
CHAR16 *Str;
|
||||
UINTN Len;
|
||||
UINTN MaxLen;
|
||||
} POOL_PRINT;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 SubType;
|
||||
VOID (*Function) (POOL_PRINT *, VOID *, BOOLEAN, BOOLEAN);
|
||||
} DEVICE_PATH_TO_TEXT_TABLE;
|
||||
|
||||
typedef struct {
|
||||
CHAR16 *DevicePathNodeText;
|
||||
EFI_DEVICE_PATH_PROTOCOL * (*Function) (CHAR16 *);
|
||||
} DEVICE_PATH_FROM_TEXT_TABLE;
|
||||
|
||||
typedef struct {
|
||||
BOOLEAN ClassExist;
|
||||
UINT8 Class;
|
||||
BOOLEAN SubClassExist;
|
||||
UINT8 SubClass;
|
||||
} USB_CLASS_TEXT;
|
||||
|
||||
#define USB_CLASS_AUDIO 1
|
||||
#define USB_CLASS_CDCCONTROL 2
|
||||
#define USB_CLASS_HID 3
|
||||
#define USB_CLASS_IMAGE 6
|
||||
#define USB_CLASS_PRINTER 7
|
||||
#define USB_CLASS_MASS_STORAGE 8
|
||||
#define USB_CLASS_HUB 9
|
||||
#define USB_CLASS_CDCDATA 10
|
||||
#define USB_CLASS_SMART_CARD 11
|
||||
#define USB_CLASS_VIDEO 14
|
||||
#define USB_CLASS_DIAGNOSTIC 220
|
||||
#define USB_CLASS_WIRELESS 224
|
||||
|
||||
#define USB_CLASS_RESERVE 254
|
||||
#define USB_SUBCLASS_FW_UPDATE 1
|
||||
#define USB_SUBCLASS_IRDA_BRIDGE 2
|
||||
#define USB_SUBCLASS_TEST 3
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
UINT8 VendorDefinedData[1];
|
||||
} VENDOR_DEFINED_HARDWARE_DEVICE_PATH;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
UINT8 VendorDefinedData[1];
|
||||
} VENDOR_DEFINED_MESSAGING_DEVICE_PATH;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
UINT8 VendorDefinedData[1];
|
||||
} VENDOR_DEFINED_MEDIA_DEVICE_PATH;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 HID;
|
||||
UINT32 UID;
|
||||
UINT32 CID;
|
||||
CHAR8 HidUidCidStr[3];
|
||||
} ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 NetworkProtocol;
|
||||
UINT16 LoginOption;
|
||||
UINT16 Reserved;
|
||||
UINT16 TargetPortalGroupTag;
|
||||
UINT64 Lun;
|
||||
CHAR16 iSCSITargetName[1];
|
||||
} ISCSI_DEVICE_PATH_WITH_NAME;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
UINT8 VendorDefinedData[1];
|
||||
} VENDOR_DEVICE_PATH_WITH_DATA;
|
||||
|
||||
CHAR16 *
|
||||
ConvertDeviceNodeToText (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
|
||||
IN BOOLEAN DisplayOnly,
|
||||
IN BOOLEAN AllowShortcuts
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert a device node to its text representation.
|
||||
|
||||
Arguments:
|
||||
DeviceNode - Points to the device node to be converted.
|
||||
DisplayOnly - If DisplayOnly is TRUE, then the shorter text representation
|
||||
of the display node is used, where applicable. If DisplayOnly
|
||||
is FALSE, then the longer text representation of the display node
|
||||
is used.
|
||||
AllowShortcuts - If AllowShortcuts is TRUE, then the shortcut forms of text
|
||||
representation for a device node can be used, where applicable.
|
||||
|
||||
Returns:
|
||||
A pointer - a pointer to the allocated text representation of the device node.
|
||||
NULL - if DeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
CHAR16 *
|
||||
ConvertDevicePathToText (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
|
||||
IN BOOLEAN DisplayOnly,
|
||||
IN BOOLEAN AllowShortcuts
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert a device path to its text representation.
|
||||
|
||||
Arguments:
|
||||
DeviceNode - Points to the device path to be converted.
|
||||
DisplayOnly - If DisplayOnly is TRUE, then the shorter text representation
|
||||
of the display node is used, where applicable. If DisplayOnly
|
||||
is FALSE, then the longer text representation of the display node
|
||||
is used.
|
||||
AllowShortcuts - If AllowShortcuts is TRUE, then the shortcut forms of text
|
||||
representation for a device node can be used, where applicable.
|
||||
|
||||
Returns:
|
||||
A pointer - a pointer to the allocated text representation of the device path.
|
||||
NULL - if DeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
ConvertTextToDeviceNode (
|
||||
IN CONST CHAR16 *TextDeviceNode
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert text to the binary representation of a device node.
|
||||
|
||||
Arguments:
|
||||
TextDeviceNode - TextDeviceNode points to the text representation of a device
|
||||
node. Conversion starts with the first character and continues
|
||||
until the first non-device node character.
|
||||
|
||||
Returns:
|
||||
A pointer - Pointer to the EFI device node.
|
||||
NULL - if TextDeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
ConvertTextToDevicePath (
|
||||
IN CONST CHAR16 *TextDevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert text to the binary representation of a device path.
|
||||
|
||||
Arguments:
|
||||
TextDevicePath - TextDevicePath points to the text representation of a device
|
||||
path. Conversion starts with the first character and continues
|
||||
until the first non-device node character.
|
||||
|
||||
Returns:
|
||||
A pointer - Pointer to the allocated device path.
|
||||
NULL - if TextDeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
UINTN
|
||||
GetDevicePathSizeProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns the size of the device path, in bytes.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the start of the EFI device path.
|
||||
|
||||
Returns:
|
||||
Size - Size of the specified device path, in bytes, including the end-of-path tag.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DuplicateDevicePathProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Create a duplicate of the specified path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the source EFI device path.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the duplicate device path.
|
||||
NULL - Insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
AppendDevicePathProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Create a new path by appending the second device path to the first.
|
||||
|
||||
Arguments:
|
||||
Src1 - Points to the first device path. If NULL, then it is ignored.
|
||||
Src2 - Points to the second device path. If NULL, then it is ignored.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device path.
|
||||
NULL - Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
AppendDeviceNodeProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a new path by appending the device node to the device path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path.
|
||||
DeviceNode - Points to the device node.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the allocated device node.
|
||||
NULL - Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
AppendDevicePathInstanceProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a new path by appending the specified device path instance to the specified device path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path. If NULL, then ignored.
|
||||
DevicePathInstance - Points to the device path instance.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device path
|
||||
NULL - Memory could not be allocated or DevicePathInstance is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
GetNextDevicePathInstanceProtocolInterface (
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
|
||||
OUT UINTN *DevicePathInstanceSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a copy of the current device path instance and returns a pointer to the next device path instance.
|
||||
|
||||
Arguments:
|
||||
DevicePathInstance - On input, this holds the pointer to the current device path
|
||||
instance. On output, this holds the pointer to the next
|
||||
device path instance or NULL if there are no more device
|
||||
path instances in the device path.
|
||||
DevicePathInstanceSize - On output, this holds the size of the device path instance,
|
||||
in bytes or zero, if DevicePathInstance is zero.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the copy of the current device path instance.
|
||||
NULL - DevicePathInstace was NULL on entry or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
BOOLEAN
|
||||
IsDevicePathMultiInstanceProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns whether a device path is multi-instance.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path. If NULL, then ignored.
|
||||
|
||||
Returns:
|
||||
TRUE - The device path has more than one instance
|
||||
FALSE - The device path is empty or contains only a single instance.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
CreateDeviceNodeProtocolInterface (
|
||||
IN UINT8 NodeType,
|
||||
IN UINT8 NodeSubType,
|
||||
IN UINT16 NodeLength
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a device node
|
||||
|
||||
Arguments:
|
||||
NodeType - NodeType is the device node type (EFI_DEVICE_PATH.Type) for
|
||||
the new device node.
|
||||
NodeSubType - NodeSubType is the device node sub-type
|
||||
EFI_DEVICE_PATH.SubType) for the new device node.
|
||||
NodeLength - NodeLength is the length of the device node
|
||||
(EFI_DEVICE_PATH.Length) for the new device node.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device node.
|
||||
NULL - NodeLength is less than
|
||||
the size of the header or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
#endif
|
122
MdeModulePkg/Universal/DevicePathDxe/DevicePath.inf
Normal file
122
MdeModulePkg/Universal/DevicePathDxe/DevicePath.inf
Normal file
@@ -0,0 +1,122 @@
|
||||
#/** @file
|
||||
# Component description file for Device Path Driver.
|
||||
#
|
||||
# This driver implement these three UEFI deveice path protocols (
|
||||
# DevicePathUtilities, DevicePahtToText and DevicePathFromText) and install them.
|
||||
# Copyright (c) 2006 - 2007, 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.
|
||||
#
|
||||
#
|
||||
#**/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Defines Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = DevicePath
|
||||
FILE_GUID = 9B680FCE-AD6B-4F3A-B60B-F59899003443
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
EDK_RELEASE_VERSION = 0x00090000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
ENTRY_POINT = DevicePathEntryPoint
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
DevicePathUtilities.c
|
||||
DevicePathToText.c
|
||||
DevicePathFromText.c
|
||||
DevicePath.h
|
||||
DevicePath.c
|
||||
CommonHeader.h
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
PcdLib
|
||||
DevicePathLib
|
||||
UefiBootServicesTableLib
|
||||
MemoryAllocationLib
|
||||
BaseMemoryLib
|
||||
BaseLib
|
||||
UefiDriverEntryPoint
|
||||
PrintLib
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Guid C Name Section - list of Guids that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Guids]
|
||||
gEfiVTUTF8Guid # ALWAYS_CONSUMED
|
||||
gEfiVT100Guid # ALWAYS_CONSUMED
|
||||
gEfiVT100PlusGuid # ALWAYS_CONSUMED
|
||||
gEfiPcAnsiGuid # ALWAYS_CONSUMED
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
|
||||
# that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Protocols]
|
||||
gEfiDevicePathToTextProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiDevicePathFromTextProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiDevicePathUtilitiesProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiDebugPortProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Pcd FEATURE_FLAG - list of PCDs that this module is coded for.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[PcdsFeatureFlag.common]
|
||||
PcdDevicePathSupportDevicePathFromText|gEfiEdkModulePkgTokenSpaceGuid
|
||||
PcdDevicePathSupportDevicePathToText|gEfiEdkModulePkgTokenSpaceGuid
|
||||
|
117
MdeModulePkg/Universal/DevicePathDxe/DevicePath.msa
Normal file
117
MdeModulePkg/Universal/DevicePathDxe/DevicePath.msa
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<MsaHeader>
|
||||
<ModuleName>DevicePath</ModuleName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<GuidValue>9B680FCE-AD6B-4F3A-B60B-F59899003443</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for Device Path Driver.</Abstract>
|
||||
<Description>This driver implement these three UEFI deveice path protocols (
|
||||
DevicePathUtilities, DevicePahtToText and DevicePathFromText) and install them.</Description>
|
||||
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
|
||||
<License>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.</License>
|
||||
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
|
||||
</MsaHeader>
|
||||
<ModuleDefinitions>
|
||||
<SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
|
||||
<BinaryModule>false</BinaryModule>
|
||||
<OutputFileBasename>DevicePath</OutputFileBasename>
|
||||
</ModuleDefinitions>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
|
||||
<Keyword>DebugLib</Keyword>
|
||||
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3">
|
||||
<Keyword>PrintLib</Keyword>
|
||||
<HelpText>Recommended libary Instance is BasePrintLib instance in MdePkg.</HelpText>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiDriverEntryPoint</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>BaseMemoryLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>MemoryAllocationLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>UefiBootServicesTableLib</Keyword>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0">
|
||||
<Keyword>DevicePathLib</Keyword>
|
||||
<HelpText>Recommended libary Instance is UefiDevicePathLib instance in MdePkg.</HelpText>
|
||||
</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">
|
||||
<Keyword>PcdLib</Keyword>
|
||||
</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>DevicePath.c</Filename>
|
||||
<Filename>DevicePath.h</Filename>
|
||||
<Filename>DevicePathFromText.c</Filename>
|
||||
<Filename>DevicePathToText.c</Filename>
|
||||
<Filename>DevicePathUtilities.c</Filename>
|
||||
</SourceFiles>
|
||||
<PackageDependencies>
|
||||
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
|
||||
</PackageDependencies>
|
||||
<Protocols>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">
|
||||
<ProtocolCName>gEfiDebugPortProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiDevicePathUtilitiesProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiDevicePathFromTextProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">
|
||||
<ProtocolCName>gEfiDevicePathToTextProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
</Protocols>
|
||||
<Guids>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiPcAnsiGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiVT100PlusGuid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiVT100Guid</GuidCName>
|
||||
</GuidCNames>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
<GuidCName>gEfiVTUTF8Guid</GuidCName>
|
||||
</GuidCNames>
|
||||
</Guids>
|
||||
<Externs>
|
||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||
<Specification>EDK_RELEASE_VERSION 0x00090000</Specification>
|
||||
<Extern>
|
||||
<ModuleEntryPoint>DevicePathEntryPoint</ModuleEntryPoint>
|
||||
</Extern>
|
||||
</Externs>
|
||||
<PcdCoded>
|
||||
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_PRODUCED">
|
||||
<C_Name>PcdDevicePathSupportDevicePathToText</C_Name>
|
||||
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||
<DefaultValue>FALSE</DefaultValue>
|
||||
<HelpText>If TRUE, then the Device Path To Text Protocol should be produced by the platform</HelpText>
|
||||
</PcdEntry>
|
||||
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_PRODUCED">
|
||||
<C_Name>PcdDevicePathSupportDevicePathFromText</C_Name>
|
||||
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||
<DefaultValue>FALSE</DefaultValue>
|
||||
<HelpText>If TRUE, then the Device Path From Text Protocol should be produced by the platform</HelpText>
|
||||
</PcdEntry>
|
||||
</PcdCoded>
|
||||
</ModuleSurfaceArea>
|
2375
MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
Normal file
2375
MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
Normal file
File diff suppressed because it is too large
Load Diff
1503
MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c
Normal file
1503
MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c
Normal file
File diff suppressed because it is too large
Load Diff
216
MdeModulePkg/Universal/DevicePathDxe/DevicePathUtilities.c
Normal file
216
MdeModulePkg/Universal/DevicePathDxe/DevicePathUtilities.c
Normal file
@@ -0,0 +1,216 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
DevicePathUtilities.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Implementation file for Device Path Utilities Protocol
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
//
|
||||
#include "CommonHeader.h"
|
||||
|
||||
#include "DevicePath.h"
|
||||
|
||||
UINTN
|
||||
GetDevicePathSizeProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns the size of the device path, in bytes.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the start of the EFI device path.
|
||||
|
||||
Returns:
|
||||
Size - Size of the specified device path, in bytes, including the end-of-path tag.
|
||||
|
||||
--*/
|
||||
{
|
||||
return GetDevicePathSize (DevicePath);
|
||||
}
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
DuplicateDevicePathProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Create a duplicate of the specified path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the source EFI device path.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the duplicate device path.
|
||||
NULL - Insufficient memory.
|
||||
|
||||
--*/
|
||||
{
|
||||
return DuplicateDevicePath (DevicePath);
|
||||
}
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
AppendDevicePathProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Create a new path by appending the second device path to the first.
|
||||
|
||||
Arguments:
|
||||
Src1 - Points to the first device path. If NULL, then it is ignored.
|
||||
Src2 - Points to the second device path. If NULL, then it is ignored.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device path.
|
||||
NULL - Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
--*/
|
||||
{
|
||||
return AppendDevicePath (Src1, Src2);
|
||||
}
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
AppendDeviceNodeProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a new path by appending the device node to the device path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path.
|
||||
DeviceNode - Points to the device node.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the allocated device node.
|
||||
NULL - Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
--*/
|
||||
{
|
||||
return AppendDevicePathNode (DevicePath, DeviceNode);
|
||||
}
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
AppendDevicePathInstanceProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a new path by appending the specified device path instance to the specified device path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path. If NULL, then ignored.
|
||||
DevicePathInstance - Points to the device path instance.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device path
|
||||
NULL - Memory could not be allocated or DevicePathInstance is NULL.
|
||||
|
||||
--*/
|
||||
{
|
||||
return AppendDevicePathInstance (DevicePath, DevicePathInstance);
|
||||
}
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
GetNextDevicePathInstanceProtocolInterface (
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
|
||||
OUT UINTN *DevicePathInstanceSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a copy of the current device path instance and returns a pointer to the next device path instance.
|
||||
|
||||
Arguments:
|
||||
DevicePathInstance - On input, this holds the pointer to the current device path
|
||||
instance. On output, this holds the pointer to the next
|
||||
device path instance or NULL if there are no more device
|
||||
path instances in the device path.
|
||||
DevicePathInstanceSize - On output, this holds the size of the device path instance,
|
||||
in bytes or zero, if DevicePathInstance is zero.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the copy of the current device path instance.
|
||||
NULL - DevicePathInstace was NULL on entry or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
{
|
||||
return GetNextDevicePathInstance (DevicePathInstance, DevicePathInstanceSize);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
IsDevicePathMultiInstanceProtocolInterface (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns whether a device path is multi-instance.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path. If NULL, then ignored.
|
||||
|
||||
Returns:
|
||||
TRUE - The device path has more than one instance
|
||||
FALSE - The device path is empty or contains only a single instance.
|
||||
|
||||
--*/
|
||||
{
|
||||
return IsDevicePathMultiInstance (DevicePath);
|
||||
}
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
CreateDeviceNodeProtocolInterface (
|
||||
IN UINT8 NodeType,
|
||||
IN UINT8 NodeSubType,
|
||||
IN UINT16 NodeLength
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a device node
|
||||
|
||||
Arguments:
|
||||
NodeType - NodeType is the device node type (EFI_DEVICE_PATH.Type) for
|
||||
the new device node.
|
||||
NodeSubType - NodeSubType is the device node sub-type
|
||||
EFI_DEVICE_PATH.SubType) for the new device node.
|
||||
NodeLength - NodeLength is the length of the device node
|
||||
(EFI_DEVICE_PATH.Length) for the new device node.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device node.
|
||||
NULL - NodeLength is less than
|
||||
the size of the header or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
{
|
||||
return CreateDeviceNode (NodeType, NodeSubType, NodeLength);
|
||||
}
|
Reference in New Issue
Block a user