Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
531
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ComponentName.c
Normal file
531
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ComponentName.c
Normal file
@@ -0,0 +1,531 @@
|
||||
/*++
|
||||
|
||||
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 "ConSplitter.h"
|
||||
|
||||
//
|
||||
// EFI Component Name Functions
|
||||
//
|
||||
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
|
||||
);
|
||||
|
||||
//
|
||||
// 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_IN_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_OUT_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_OUT_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
|
||||
);
|
||||
}
|
3193
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c
Normal file
3193
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c
Normal file
File diff suppressed because it is too large
Load Diff
623
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h
Normal file
623
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.h
Normal file
@@ -0,0 +1,623 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
ConSplitter.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Private data structures for the Console Splitter driver
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef SPLITER_H_
|
||||
#define SPLITER_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_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_IN_PROTOCOL TextIn;
|
||||
UINTN CurrentNumberOfConsoles;
|
||||
EFI_SIMPLE_TEXT_IN_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_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||
EFI_SIMPLE_TEXT_OUT_PROTOCOL *TextOut;
|
||||
BOOLEAN TextOutEnabled;
|
||||
} TEXT_OUT_AND_UGA_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
EFI_HANDLE VirtualHandle;
|
||||
EFI_SIMPLE_TEXT_OUT_PROTOCOL TextOut;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
|
||||
EFI_UGA_DRAW_PROTOCOL UgaDraw;
|
||||
UINT32 UgaHorizontalResolution;
|
||||
UINT32 UgaVerticalResolution;
|
||||
UINT32 UgaColorDepth;
|
||||
UINT32 UgaRefreshRate;
|
||||
EFI_UGA_PIXEL *UgaBlt;
|
||||
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
|
||||
|
||||
UINTN CurrentNumberOfConsoles;
|
||||
TEXT_OUT_AND_UGA_DATA *TextOutList;
|
||||
UINTN TextOutListCount;
|
||||
TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;
|
||||
UINTN TextOutQueryDataCount;
|
||||
INT32 *TextOutModeMap;
|
||||
|
||||
EFI_CONSOLE_CONTROL_SCREEN_MODE UgaMode;
|
||||
|
||||
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 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
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// TextIn Constructor/Destructor functions
|
||||
//
|
||||
EFI_STATUS
|
||||
ConSplitterTextInAddDevice (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_IN_PROTOCOL *TextIn
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterTextInDeleteDevice (
|
||||
IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_IN_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_OUT_PROTOCOL *TextOut,
|
||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ConSplitterTextOutDeleteDevice (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *TextOut
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// TextIn I/O Functions
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextInReset (
|
||||
IN EFI_SIMPLE_TEXT_IN_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextInReadKeyStroke (
|
||||
IN EFI_SIMPLE_TEXT_IN_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_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSplitterTextOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUT_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 *UgaExists,
|
||||
OUT BOOLEAN *StdInLocked
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlSetMode (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterUgaDrawGetMode (
|
||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||
OUT UINT32 *HorizontalResolution,
|
||||
OUT UINT32 *VerticalResolution,
|
||||
OUT UINT32 *ColorDepth,
|
||||
OUT UINT32 *RefreshRate
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterUgaDrawSetMode (
|
||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||
IN UINT32 HorizontalResolution,
|
||||
IN UINT32 VerticalResolution,
|
||||
IN UINT32 ColorDepth,
|
||||
IN UINT32 RefreshRate
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterUgaDrawBlt (
|
||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
||||
IN EFI_UGA_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
|
||||
DevNullUgaSync (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
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
|
||||
DevNullSyncUgaStdOut (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MbdHeader>
|
||||
<BaseName>ConSplitter</BaseName>
|
||||
<Guid>408edcec-cf6d-477c-a5a8-b4844e3de281</Guid>
|
||||
<Version>0</Version>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-2006, 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>
|
||||
<Created>2006-03-12 17:09</Created>
|
||||
<Modified>2006-03-19 15:19</Modified>
|
||||
</MbdHeader>
|
||||
<Libraries>
|
||||
<Library>UefiBootServicesTableLib</Library>
|
||||
<Library>UefiMemoryLib</Library>
|
||||
<Library>UefiLib</Library>
|
||||
<Library>UefiDriverEntryPoint</Library>
|
||||
<Library>UefiDriverModelLib</Library>
|
||||
<Library>DxeReportStatusCodeLib</Library>
|
||||
<Library>BaseDebugLibReportStatusCode</Library>
|
||||
<Library>BaseLib</Library>
|
||||
<Library>DxeMemoryAllocationLib</Library>
|
||||
</Libraries>
|
||||
</ModuleBuildDescription>
|
102
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.msa
Normal file
102
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.msa
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MsaHeader>
|
||||
<BaseName>ConSplitter</BaseName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<ComponentType>BS_DRIVER</ComponentType>
|
||||
<Guid>408edcec-cf6d-477c-a5a8-b4844e3de281</Guid>
|
||||
<Version>0</Version>
|
||||
<Abstract>Component description file for DiskIo module.</Abstract>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-2006, 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>0</Specification>
|
||||
<Created>2006-03-12 17:09</Created>
|
||||
<Updated>2006-03-19 15:19</Updated>
|
||||
</MsaHeader>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverModelLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverEntryPoint</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">MemoryAllocationLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>ConSplitter.c</Filename>
|
||||
<Filename>ConSplitter.h</Filename>
|
||||
<Filename>ComponentName.c</Filename>
|
||||
<Filename>ConSplitterGraphics.c</Filename>
|
||||
</SourceFiles>
|
||||
<Includes>
|
||||
<PackageName>MdePkg</PackageName>
|
||||
<PackageName>EdkModulePkg</PackageName>
|
||||
</Includes>
|
||||
<Protocols>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">UgaDraw</Protocol>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">SimpleTextOut</Protocol>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">SimpleTextIn</Protocol>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">SimplePointer</Protocol>
|
||||
<Protocol Usage="ALWAYS_PRODUCED">ConsoleControl</Protocol>
|
||||
</Protocols>
|
||||
<Guids>
|
||||
<GuidEntry Usage="ALWAYS_PRODUCED">
|
||||
<C_Name>PrimaryStandardErrorDevice</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="ALWAYS_PRODUCED">
|
||||
<C_Name>PrimaryConsoleInDevice</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="ALWAYS_PRODUCED">
|
||||
<C_Name>PrimaryConsoleOutDevice</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="ALWAYS_CONSUMED">
|
||||
<C_Name>ConsoleOutDevice</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="ALWAYS_CONSUMED">
|
||||
<C_Name>StandardErrorDevice</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="ALWAYS_CONSUMED">
|
||||
<C_Name>ConsoleInDevice</C_Name>
|
||||
</GuidEntry>
|
||||
</Guids>
|
||||
<Externs>
|
||||
<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>
|
1076
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
Normal file
1076
EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
Normal file
File diff suppressed because it is too large
Load Diff
74
EdkModulePkg/Universal/Console/ConSplitter/Dxe/build.xml
Normal file
74
EdkModulePkg/Universal/Console/ConSplitter/Dxe/build.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!-- 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.-->
|
||||
<project basedir="." default="ConSplitter"><!--Apply external ANT tasks-->
|
||||
<taskdef resource="GenBuild.tasks"/>
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
||||
<property environment="env"/>
|
||||
<property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>
|
||||
<import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->
|
||||
<property name="MODULE_RELATIVE_PATH" value="Universal\Console\ConSplitter\Dxe"/>
|
||||
<property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
|
||||
<property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
|
||||
<target name="ConSplitter">
|
||||
<GenBuild baseName="ConSplitter" mbdFilename="${MODULE_DIR}\ConSplitter.mbd" msaFilename="${MODULE_DIR}\ConSplitter.msa"/>
|
||||
</target>
|
||||
<target name="ConSplitterLite">
|
||||
<GenBuild baseName="ConSplitterLite" mbdFilename="${MODULE_DIR}\ConSplitterLite.mbd" msaFilename="${MODULE_DIR}\ConSplitterLite.msa"/>
|
||||
</target>
|
||||
<target depends="ConSplitter_clean" name="clean"/>
|
||||
<target depends="ConSplitter_cleanall" name="cleanall"/>
|
||||
<target name="ConSplitter_clean">
|
||||
<OutputDirSetup baseName="ConSplitter" mbdFilename="${MODULE_DIR}\ConSplitter.mbd" msaFilename="${MODULE_DIR}\ConSplitter.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\ConSplitter_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\ConSplitter_build.xml" target="clean"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
|
||||
</target>
|
||||
<target name="ConSplitterLite_clean">
|
||||
<OutputDirSetup baseName="ConSplitterLite" mbdFilename="${MODULE_DIR}\ConSplitterLite.mbd" msaFilename="${MODULE_DIR}\ConSplitterLite.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\ConSplitterLite_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\ConSplitterLite_build.xml" target="clean"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
|
||||
</target>
|
||||
<target name="ConSplitter_cleanall">
|
||||
<OutputDirSetup baseName="ConSplitter" mbdFilename="${MODULE_DIR}\ConSplitter.mbd" msaFilename="${MODULE_DIR}\ConSplitter.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\ConSplitter_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\ConSplitter_build.xml" target="cleanall"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}"/>
|
||||
<delete dir="${DEST_DIR_DEBUG}"/>
|
||||
<delete>
|
||||
<fileset dir="${BIN_DIR}" includes="**ConSplitter*"/>
|
||||
</delete>
|
||||
</target>
|
||||
<target name="ConSplitterLite_cleanall">
|
||||
<OutputDirSetup baseName="ConSplitterLite" mbdFilename="${MODULE_DIR}\ConSplitterLite.mbd" msaFilename="${MODULE_DIR}\ConSplitterLite.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\ConSplitterLite_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\ConSplitterLite_build.xml" target="cleanall"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}"/>
|
||||
<delete dir="${DEST_DIR_DEBUG}"/>
|
||||
<delete>
|
||||
<fileset dir="${BIN_DIR}" includes="**ConSplitterLite*"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
@@ -0,0 +1,139 @@
|
||||
/*++
|
||||
|
||||
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 "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,51 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
|
||||
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
|
1566
EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c
Normal file
1566
EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,160 @@
|
||||
/*++
|
||||
|
||||
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 "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 UgaWidth;
|
||||
UINT32 UgaHeight;
|
||||
} GRAPHICS_CONSOLE_MODE_DATA;
|
||||
|
||||
#define GRAPHICS_MAX_MODE 3
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||
EFI_SIMPLE_TEXT_OUT_PROTOCOL SimpleTextOutput;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
|
||||
GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];
|
||||
EFI_UGA_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_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GraphicsConsoleConOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN Visible
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EfiLocateHiiProtocol (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MbdHeader>
|
||||
<BaseName>GraphicsConsole</BaseName>
|
||||
<Guid>CCCB0C28-4B24-11d5-9A5A-0090273FC14D</Guid>
|
||||
<Version>0</Version>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-2006, 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>
|
||||
<Created>2006-03-12 17:09</Created>
|
||||
<Modified>2006-03-19 15:19</Modified>
|
||||
</MbdHeader>
|
||||
<Libraries>
|
||||
<Library>UefiBootServicesTableLib</Library>
|
||||
<Library>UefiDriverEntryPoint</Library>
|
||||
<Library>UefiLib</Library>
|
||||
<Library>UefiMemoryLib</Library>
|
||||
<Library>HiiLib</Library>
|
||||
<Library>UefiDriverModelLib</Library>
|
||||
<Library>DxeReportStatusCodeLib</Library>
|
||||
<Library>BaseDebugLibReportStatusCode</Library>
|
||||
<Library>BaseLib</Library>
|
||||
<Library>DxeMemoryAllocationLib</Library>
|
||||
</Libraries>
|
||||
</ModuleBuildDescription>
|
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MsaHeader>
|
||||
<BaseName>GraphicsConsole</BaseName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<ComponentType>BS_DRIVER</ComponentType>
|
||||
<Guid>CCCB0C28-4B24-11d5-9A5A-0090273FC14D</Guid>
|
||||
<Version>0</Version>
|
||||
<Abstract>Component description file for GraphicsConsole module</Abstract>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-2006, 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>0</Specification>
|
||||
<Created>2006-03-12 17:09</Created>
|
||||
<Updated>2006-03-19 15:19</Updated>
|
||||
</MsaHeader>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverModelLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverEntryPoint</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">HiiLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">MemoryAllocationLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>
|
||||
</LibraryClassDefinitions>
|
||||
<SourceFiles>
|
||||
<Filename>GraphicsConsole.h</Filename>
|
||||
<Filename>GraphicsConsole.c</Filename>
|
||||
<Filename>LaffStd.c</Filename>
|
||||
<Filename>ComponentName.c</Filename>
|
||||
</SourceFiles>
|
||||
<Includes>
|
||||
<PackageName>MdePkg</PackageName>
|
||||
</Includes>
|
||||
<Protocols>
|
||||
<Protocol Usage="TO_START">UgaDraw</Protocol>
|
||||
<Protocol Usage="TO_START">Hii</Protocol>
|
||||
<Protocol Usage="BY_START">SimpleTextOut</Protocol>
|
||||
<Protocol Usage="TO_START">DevicePath</Protocol>
|
||||
</Protocols>
|
||||
<Externs>
|
||||
<Extern>
|
||||
<ModuleEntryPoint></ModuleEntryPoint>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gGraphicsConsoleDriverBinding</DriverBinding>
|
||||
<ComponentName>gGraphicsConsoleComponentName</ComponentName>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
290
EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/LaffStd.c
Normal file
290
EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/LaffStd.c
Normal file
@@ -0,0 +1,290 @@
|
||||
/*++
|
||||
|
||||
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 "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);
|
||||
}
|
47
EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/build.xml
Normal file
47
EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/build.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!-- 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.-->
|
||||
<project basedir="." default="GraphicsConsole"><!--Apply external ANT tasks-->
|
||||
<taskdef resource="GenBuild.tasks"/>
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
||||
<property environment="env"/>
|
||||
<property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>
|
||||
<import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->
|
||||
<property name="MODULE_RELATIVE_PATH" value="Universal\Console\GraphicsConsole\Dxe"/>
|
||||
<property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
|
||||
<property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
|
||||
<target name="GraphicsConsole">
|
||||
<GenBuild baseName="GraphicsConsole" mbdFilename="${MODULE_DIR}\GraphicsConsole.mbd" msaFilename="${MODULE_DIR}\GraphicsConsole.msa"/>
|
||||
</target>
|
||||
<target depends="GraphicsConsole_clean" name="clean"/>
|
||||
<target depends="GraphicsConsole_cleanall" name="cleanall"/>
|
||||
<target name="GraphicsConsole_clean">
|
||||
<OutputDirSetup baseName="GraphicsConsole" mbdFilename="${MODULE_DIR}\GraphicsConsole.mbd" msaFilename="${MODULE_DIR}\GraphicsConsole.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\GraphicsConsole_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\GraphicsConsole_build.xml" target="clean"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
|
||||
</target>
|
||||
<target name="GraphicsConsole_cleanall">
|
||||
<OutputDirSetup baseName="GraphicsConsole" mbdFilename="${MODULE_DIR}\GraphicsConsole.mbd" msaFilename="${MODULE_DIR}\GraphicsConsole.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\GraphicsConsole_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\GraphicsConsole_build.xml" target="cleanall"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}"/>
|
||||
<delete dir="${DEST_DIR_DEBUG}"/>
|
||||
<delete>
|
||||
<fileset dir="${BIN_DIR}" includes="**GraphicsConsole*"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
194
EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c
Normal file
194
EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c
Normal file
@@ -0,0 +1,194 @@
|
||||
/*++
|
||||
|
||||
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 "Terminal.h"
|
||||
|
||||
//
|
||||
// EFI Component Name Functions
|
||||
//
|
||||
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
|
||||
);
|
||||
|
||||
//
|
||||
// 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_OUT_PROTOCOL *SimpleTextOutput;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
//
|
||||
// This is a bus driver, so ChildHandle can not be NULL.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// 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
|
||||
);
|
||||
}
|
1214
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c
Normal file
1214
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c
Normal file
File diff suppressed because it is too large
Load Diff
506
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.h
Normal file
506
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.h
Normal file
@@ -0,0 +1,506 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
|
||||
#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_IN_PROTOCOL SimpleInput;
|
||||
EFI_SIMPLE_TEXT_OUT_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_IN_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConInReadKeyStroke (
|
||||
IN EFI_SIMPLE_TEXT_IN_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_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN Visible
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// internal functions
|
||||
//
|
||||
EFI_STATUS
|
||||
TerminalConInCheckForKey (
|
||||
IN EFI_SIMPLE_TEXT_IN_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
|
44
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.mbd
Normal file
44
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.mbd
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MbdHeader>
|
||||
<BaseName>Terminal</BaseName>
|
||||
<Guid>9E863906-A40F-4875-977F-5B93FF237FC6</Guid>
|
||||
<Version>EDK_RELEASE_VERSION 0x00020000</Version>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-2006, 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>
|
||||
<Created>2006-03-12 17:09</Created>
|
||||
<Modified>2006-03-22 19:05</Modified>
|
||||
</MbdHeader>
|
||||
<Libraries>
|
||||
<Library>UefiBootServicesTableLib</Library>
|
||||
<Library>UefiRuntimeServicesTableLib</Library>
|
||||
<Library>UefiMemoryLib</Library>
|
||||
<Library>UefiLib</Library>
|
||||
<Library>UefiDriverEntryPoint</Library>
|
||||
<Library>UefiDriverModelLib</Library>
|
||||
<Library>DxeReportStatusCodeLib</Library>
|
||||
<Library>BaseDebugLibReportStatusCode</Library>
|
||||
<Library>EdkDxePrintLib</Library>
|
||||
<Library>BaseLib</Library>
|
||||
<Library>DxeMemoryAllocationLib</Library>
|
||||
<Library>UefiDevicePathLib</Library>
|
||||
</Libraries>
|
||||
</ModuleBuildDescription>
|
108
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa
Normal file
108
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
|
||||
<MsaHeader>
|
||||
<BaseName>Terminal</BaseName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<ComponentType>BS_DRIVER</ComponentType>
|
||||
<Guid>9E863906-A40F-4875-977F-5B93FF237FC6</Guid>
|
||||
<Version>EDK_RELEASE_VERSION 0x00020000</Version>
|
||||
<Abstract>Component description file for DiskIo module.</Abstract>
|
||||
<Description>FIX ME!</Description>
|
||||
<Copyright>Copyright (c) 2004-2006, 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>EFI_SPECIFICATION_VERSION 0x00000000</Specification>
|
||||
<Created>2006-03-12 17:09</Created>
|
||||
<Updated>2006-03-22 19:05</Updated>
|
||||
</MsaHeader>
|
||||
<LibraryClassDefinitions>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverModelLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverEntryPoint</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">ReportStatusCodeLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">MemoryAllocationLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">UefiRuntimeServicesTableLib</LibraryClass>
|
||||
<LibraryClass Usage="ALWAYS_CONSUMED">DevicePathLib</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>
|
||||
<Includes>
|
||||
<PackageName>MdePkg</PackageName>
|
||||
<PackageName>EdkModulePkg</PackageName>
|
||||
</Includes>
|
||||
<Protocols>
|
||||
<Protocol Usage="BY_START">SimpleTextOut</Protocol>
|
||||
<Protocol Usage="BY_START">SimpleTextIn</Protocol>
|
||||
<Protocol Usage="TO_START">DevicePath</Protocol>
|
||||
<Protocol Usage="TO_START">SerialIo</Protocol>
|
||||
</Protocols>
|
||||
<Variables>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<String>ConInDev</String>
|
||||
<Guid>0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C</Guid>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<String>ConOutDev</String>
|
||||
<Guid>0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C</Guid>
|
||||
</Variable>
|
||||
<Variable Usage="SOMETIMES_CONSUMED">
|
||||
<String>ErrOutDev</String>
|
||||
<Guid>0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C</Guid>
|
||||
</Variable>
|
||||
</Variables>
|
||||
<Guids>
|
||||
<GuidEntry Usage="SOMETIMES_CONSUMED">
|
||||
<C_Name>HotPlugDevice</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="SOMETIMES_CONSUMED">
|
||||
<C_Name>GlobalVariable</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="SOMETIMES_CONSUMED">
|
||||
<C_Name>PcAnsi</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="SOMETIMES_CONSUMED">
|
||||
<C_Name>VT100Plus</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="SOMETIMES_CONSUMED">
|
||||
<C_Name>VT100</C_Name>
|
||||
</GuidEntry>
|
||||
<GuidEntry Usage="SOMETIMES_CONSUMED">
|
||||
<C_Name>VTUTF8</C_Name>
|
||||
</GuidEntry>
|
||||
</Guids>
|
||||
<Externs>
|
||||
<Extern>
|
||||
<ModuleEntryPoint></ModuleEntryPoint>
|
||||
</Extern>
|
||||
<Extern>
|
||||
<DriverBinding>gTerminalDriverBinding</DriverBinding>
|
||||
<ComponentName>gTerminalComponentName</ComponentName>
|
||||
</Extern>
|
||||
</Externs>
|
||||
</ModuleSurfaceArea>
|
1185
EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConIn.c
Normal file
1185
EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConIn.c
Normal file
File diff suppressed because it is too large
Load Diff
997
EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConOut.c
Normal file
997
EdkModulePkg/Universal/Console/Terminal/Dxe/TerminalConOut.c
Normal file
@@ -0,0 +1,997 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
TerminalConOut.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
|
||||
|
||||
#include "Terminal.h"
|
||||
#include <Common/StatusCode.h>
|
||||
|
||||
//
|
||||
// This list is used to define the valid extend chars.
|
||||
// It also provides a mapping from Unicode to PCANSI or
|
||||
// ASCII. The ASCII mapping we just made up.
|
||||
//
|
||||
//
|
||||
STATIC UNICODE_TO_CHAR UnicodeToPcAnsiOrAscii[] = {
|
||||
{ BOXDRAW_HORIZONTAL, 0xc4, L'-' },
|
||||
{ BOXDRAW_VERTICAL, 0xb3, L'|' },
|
||||
{ BOXDRAW_DOWN_RIGHT, 0xda, L'/' },
|
||||
{ BOXDRAW_DOWN_LEFT, 0xbf, L'\\' },
|
||||
{ BOXDRAW_UP_RIGHT, 0xc0, L'\\' },
|
||||
{ BOXDRAW_UP_LEFT, 0xd9, L'/' },
|
||||
{ BOXDRAW_VERTICAL_RIGHT, 0xc3, L'|' },
|
||||
{ BOXDRAW_VERTICAL_LEFT, 0xb4, L'|' },
|
||||
{ BOXDRAW_DOWN_HORIZONTAL, 0xc2, L'+' },
|
||||
{ BOXDRAW_UP_HORIZONTAL, 0xc1, L'+' },
|
||||
{ BOXDRAW_VERTICAL_HORIZONTAL, 0xc5, L'+' },
|
||||
{ BOXDRAW_DOUBLE_HORIZONTAL, 0xcd, L'-' },
|
||||
{ BOXDRAW_DOUBLE_VERTICAL, 0xba, L'|' },
|
||||
{ BOXDRAW_DOWN_RIGHT_DOUBLE, 0xd5, L'/' },
|
||||
{ BOXDRAW_DOWN_DOUBLE_RIGHT, 0xd6, L'/' },
|
||||
{ BOXDRAW_DOUBLE_DOWN_RIGHT, 0xc9, L'/' },
|
||||
{ BOXDRAW_DOWN_LEFT_DOUBLE, 0xb8, L'\\' },
|
||||
{ BOXDRAW_DOWN_DOUBLE_LEFT, 0xb7, L'\\' },
|
||||
{ BOXDRAW_DOUBLE_DOWN_LEFT, 0xbb, L'\\' },
|
||||
{ BOXDRAW_UP_RIGHT_DOUBLE, 0xd4, L'\\' },
|
||||
{ BOXDRAW_UP_DOUBLE_RIGHT, 0xd3, L'\\' },
|
||||
{ BOXDRAW_DOUBLE_UP_RIGHT, 0xc8, L'\\' },
|
||||
{ BOXDRAW_UP_LEFT_DOUBLE, 0xbe, L'/' },
|
||||
{ BOXDRAW_UP_DOUBLE_LEFT, 0xbd, L'/' },
|
||||
{ BOXDRAW_DOUBLE_UP_LEFT, 0xbc, L'/' },
|
||||
{ BOXDRAW_VERTICAL_RIGHT_DOUBLE, 0xc6, L'|' },
|
||||
{ BOXDRAW_VERTICAL_DOUBLE_RIGHT, 0xc7, L'|' },
|
||||
{ BOXDRAW_DOUBLE_VERTICAL_RIGHT, 0xcc, L'|' },
|
||||
{ BOXDRAW_VERTICAL_LEFT_DOUBLE, 0xb5, L'|' },
|
||||
{ BOXDRAW_VERTICAL_DOUBLE_LEFT, 0xb6, L'|' },
|
||||
{ BOXDRAW_DOUBLE_VERTICAL_LEFT, 0xb9, L'|' },
|
||||
{ BOXDRAW_DOWN_HORIZONTAL_DOUBLE, 0xd1, L'+' },
|
||||
{ BOXDRAW_DOWN_DOUBLE_HORIZONTAL, 0xd2, L'+' },
|
||||
{ BOXDRAW_DOUBLE_DOWN_HORIZONTAL, 0xcb, L'+' },
|
||||
{ BOXDRAW_UP_HORIZONTAL_DOUBLE, 0xcf, L'+' },
|
||||
{ BOXDRAW_UP_DOUBLE_HORIZONTAL, 0xd0, L'+' },
|
||||
{ BOXDRAW_DOUBLE_UP_HORIZONTAL, 0xca, L'+' },
|
||||
{ BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE, 0xd8, L'+' },
|
||||
{ BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL, 0xd7, L'+' },
|
||||
{ BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL, 0xce, L'+' },
|
||||
|
||||
{ BLOCKELEMENT_FULL_BLOCK, 0xdb, L'*' },
|
||||
{ BLOCKELEMENT_LIGHT_SHADE, 0xb0, L'+' },
|
||||
|
||||
{ GEOMETRICSHAPE_UP_TRIANGLE, 0x1e, L'^' },
|
||||
{ GEOMETRICSHAPE_RIGHT_TRIANGLE, 0x10, L'>' },
|
||||
{ GEOMETRICSHAPE_DOWN_TRIANGLE, 0x1f, L'v' },
|
||||
{ GEOMETRICSHAPE_LEFT_TRIANGLE, 0x11, L'<' },
|
||||
|
||||
{ ARROW_LEFT, 0x3c, L'<' },
|
||||
{ ARROW_UP, 0x18, L'^' },
|
||||
{ ARROW_RIGHT, 0x3e, L'>' },
|
||||
{ ARROW_DOWN, 0x19, L'v' },
|
||||
|
||||
{ 0x0000, 0x00, L'\0' }
|
||||
};
|
||||
|
||||
CHAR16 mSetModeString[] = { ESC, '[', '=', '3', 'h', 0 };
|
||||
CHAR16 mSetAttributeString[] = { ESC, '[', '0', 'm', ESC, '[', '4', '0', 'm', ESC, '[', '4', '0', 'm', 0 };
|
||||
CHAR16 mClearScreenString[] = { ESC, '[', '2', 'J', 0 };
|
||||
CHAR16 mSetCursorPositionString[] = { ESC, '[', '0', '0', ';', '0', '0', 'H', 0 };
|
||||
|
||||
//
|
||||
// Body of the ConOut functions
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutReset (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.Reset().
|
||||
If ExtendeVerification is TRUE, then perform dependent serial device reset,
|
||||
and set display mode to mode 0.
|
||||
If ExtendedVerification is FALSE, only set display mode to mode 0.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - Indicates the calling context.
|
||||
|
||||
ExtendedVerification - Indicates that the driver may perform a more exhaustive
|
||||
verification operation of the device during reset.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The reset operation succeeds.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
The terminal is not functioning correctly or the serial port reset fails.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// Perform a more exhaustive reset by resetting the serial port.
|
||||
//
|
||||
if (ExtendedVerification) {
|
||||
//
|
||||
// Report progress code here
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_RESET,
|
||||
TerminalDevice->DevicePath
|
||||
);
|
||||
|
||||
Status = TerminalDevice->SerialIo->Reset (TerminalDevice->SerialIo);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Report error code here
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_CONTROLLER_ERROR,
|
||||
TerminalDevice->DevicePath
|
||||
);
|
||||
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));
|
||||
|
||||
Status = This->SetMode (This, 0);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutOutputString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.OutputString().
|
||||
The Unicode string will be converted to terminal expressible data stream
|
||||
and send to terminal via serial port.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
This - Indicates the calling context.
|
||||
|
||||
WString - The Null-terminated Unicode string to be displayed on
|
||||
the terminal screen.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The string is output successfully.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
The serial port fails to send the string out.
|
||||
|
||||
EFI_WARN_UNKNOWN_GLYPH
|
||||
Indicates that some of the characters in the Unicode string could not
|
||||
be rendered and are skipped.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
|
||||
--*/
|
||||
{
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
|
||||
UINTN MaxColumn;
|
||||
UINTN MaxRow;
|
||||
UINTN Length;
|
||||
UTF8_CHAR Utf8Char;
|
||||
CHAR8 GraphicChar;
|
||||
CHAR8 AsciiChar;
|
||||
EFI_STATUS Status;
|
||||
UINT8 ValidBytes;
|
||||
//
|
||||
// flag used to indicate whether condition happens which will cause
|
||||
// return EFI_WARN_UNKNOWN_GLYPH
|
||||
//
|
||||
BOOLEAN Warning;
|
||||
|
||||
ValidBytes = 0;
|
||||
Warning = FALSE;
|
||||
|
||||
//
|
||||
// get Terminal device data structure pointer.
|
||||
//
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// get current display mode
|
||||
// Terminal driver only support mode 0
|
||||
//
|
||||
Mode = This->Mode;
|
||||
if (Mode->Mode != 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
This->QueryMode (
|
||||
This,
|
||||
Mode->Mode,
|
||||
&MaxColumn,
|
||||
&MaxRow
|
||||
);
|
||||
|
||||
for (; *WString != CHAR_NULL; WString++) {
|
||||
|
||||
switch (TerminalDevice->TerminalType) {
|
||||
|
||||
case PcAnsiType:
|
||||
case VT100Type:
|
||||
case VT100PlusType:
|
||||
|
||||
if (!TerminalIsValidTextGraphics (*WString, &GraphicChar, &AsciiChar)) {
|
||||
//
|
||||
// If it's not a graphic character convert Unicode to ASCII.
|
||||
//
|
||||
GraphicChar = (CHAR8) *WString;
|
||||
|
||||
if (!(TerminalIsValidAscii (GraphicChar) || TerminalIsValidEfiCntlChar (GraphicChar))) {
|
||||
//
|
||||
// when this driver use the OutputString to output control string,
|
||||
// TerminalDevice->OutputEscChar is set to let the Esc char
|
||||
// to be output to the terminal emulation software.
|
||||
//
|
||||
if ((GraphicChar == 27) && TerminalDevice->OutputEscChar) {
|
||||
GraphicChar = 27;
|
||||
} else {
|
||||
GraphicChar = '?';
|
||||
Warning = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
AsciiChar = GraphicChar;
|
||||
|
||||
}
|
||||
|
||||
if (TerminalDevice->TerminalType != PcAnsiType) {
|
||||
GraphicChar = AsciiChar;
|
||||
}
|
||||
|
||||
Length = 1;
|
||||
|
||||
Status = TerminalDevice->SerialIo->Write (
|
||||
TerminalDevice->SerialIo,
|
||||
&Length,
|
||||
&GraphicChar
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto OutputError;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case VTUTF8Type:
|
||||
UnicodeToUtf8 (*WString, &Utf8Char, &ValidBytes);
|
||||
Length = ValidBytes;
|
||||
Status = TerminalDevice->SerialIo->Write (
|
||||
TerminalDevice->SerialIo,
|
||||
&Length,
|
||||
(UINT8 *) &Utf8Char
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto OutputError;
|
||||
}
|
||||
break;
|
||||
}
|
||||
//
|
||||
// Update cursor position.
|
||||
//
|
||||
switch (*WString) {
|
||||
|
||||
case CHAR_BACKSPACE:
|
||||
if (Mode->CursorColumn > 0) {
|
||||
Mode->CursorColumn--;
|
||||
}
|
||||
break;
|
||||
|
||||
case CHAR_LINEFEED:
|
||||
if (Mode->CursorRow < (INT32) (MaxRow - 1)) {
|
||||
Mode->CursorRow++;
|
||||
}
|
||||
break;
|
||||
|
||||
case CHAR_CARRIAGE_RETURN:
|
||||
Mode->CursorColumn = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Mode->CursorColumn < (INT32) (MaxColumn - 1)) {
|
||||
|
||||
Mode->CursorColumn++;
|
||||
|
||||
} else {
|
||||
|
||||
Mode->CursorColumn = 0;
|
||||
if (Mode->CursorRow < (INT32) (MaxRow - 1)) {
|
||||
Mode->CursorRow++;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
if (Warning) {
|
||||
return EFI_WARN_UNKNOWN_GLYPH;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
OutputError:
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_OUTPUT_ERROR,
|
||||
TerminalDevice->DevicePath
|
||||
);
|
||||
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutTestString (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN CHAR16 *WString
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.TestString().
|
||||
If one of the characters in the *Wstring is
|
||||
neither valid Unicode drawing characters,
|
||||
not ASCII code, then this function will return
|
||||
EFI_UNSUPPORTED.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
This - Indicates the calling context.
|
||||
|
||||
WString - The Null-terminated Unicode string to be tested.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The terminal is capable of rendering the output string.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
Some of the characters in the Unicode string cannot be rendered.
|
||||
|
||||
--*/
|
||||
{
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// get Terminal device data structure pointer.
|
||||
//
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
switch (TerminalDevice->TerminalType) {
|
||||
|
||||
case PcAnsiType:
|
||||
case VT100Type:
|
||||
case VT100PlusType:
|
||||
Status = AnsiTestString (TerminalDevice, WString);
|
||||
break;
|
||||
|
||||
case VTUTF8Type:
|
||||
Status = VTUTF8TestString (TerminalDevice, WString);
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = EFI_UNSUPPORTED;
|
||||
break;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutQueryMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber,
|
||||
OUT UINTN *Columns,
|
||||
OUT UINTN *Rows
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.QueryMode().
|
||||
It returns information for an available text mode
|
||||
that the terminal supports.
|
||||
In this driver, we only support text mode 80x25, which is
|
||||
defined as mode 0.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
*This
|
||||
Indicates the calling context.
|
||||
|
||||
ModeNumber
|
||||
The mode number to return information on.
|
||||
|
||||
Columns
|
||||
The returned columns of the requested mode.
|
||||
|
||||
Rows
|
||||
The returned rows of the requested mode.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The requested mode information is returned.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
The mode number is not valid.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
|
||||
--*/
|
||||
{
|
||||
if (This->Mode->MaxMode > 1) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (ModeNumber == 0) {
|
||||
|
||||
*Columns = MODE0_COLUMN_COUNT;
|
||||
*Rows = MODE0_ROW_COUNT;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetMode (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN ModeNumber
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT.SetMode().
|
||||
Set the terminal to a specified display mode.
|
||||
In this driver, we only support mode 0.
|
||||
|
||||
Arguments:
|
||||
|
||||
This
|
||||
Indicates the calling context.
|
||||
|
||||
ModeNumber
|
||||
The text mode to set.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The requested text mode is set.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
The requested text mode cannot be set because of serial device error.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
The text mode number is not valid.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
//
|
||||
// get Terminal device data structure pointer.
|
||||
//
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
if (ModeNumber != 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
This->Mode->Mode = 0;
|
||||
|
||||
This->ClearScreen (This);
|
||||
|
||||
TerminalDevice->OutputEscChar = TRUE;
|
||||
Status = This->OutputString (This, mSetModeString);
|
||||
TerminalDevice->OutputEscChar = FALSE;
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
This->Mode->Mode = 0;
|
||||
|
||||
Status = This->ClearScreen (This);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetAttribute (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Attribute
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.SetAttribute().
|
||||
|
||||
Arguments:
|
||||
|
||||
This
|
||||
Indicates the calling context.
|
||||
|
||||
Attribute
|
||||
The attribute to set. Only bit0..6 are valid, all other bits
|
||||
are undefined and must be zero.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The requested attribute is set.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
The requested attribute cannot be set due to serial port error.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
The attribute requested is not defined by EFI spec.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT8 ForegroundControl;
|
||||
UINT8 BackgroundControl;
|
||||
UINT8 BrightControl;
|
||||
INT32 SavedColumn;
|
||||
INT32 SavedRow;
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
SavedColumn = 0;
|
||||
SavedRow = 0;
|
||||
|
||||
//
|
||||
// get Terminal device data structure pointer.
|
||||
//
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// only the bit0..6 of the Attribute is valid
|
||||
//
|
||||
if ((Attribute | 0x7f) != 0x7f) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// convert Attribute value to terminal emulator
|
||||
// understandable foreground color
|
||||
//
|
||||
switch (Attribute & 0x07) {
|
||||
|
||||
case EFI_BLACK:
|
||||
ForegroundControl = 30;
|
||||
break;
|
||||
|
||||
case EFI_BLUE:
|
||||
ForegroundControl = 34;
|
||||
break;
|
||||
|
||||
case EFI_GREEN:
|
||||
ForegroundControl = 32;
|
||||
break;
|
||||
|
||||
case EFI_CYAN:
|
||||
ForegroundControl = 36;
|
||||
break;
|
||||
|
||||
case EFI_RED:
|
||||
ForegroundControl = 31;
|
||||
break;
|
||||
|
||||
case EFI_MAGENTA:
|
||||
ForegroundControl = 35;
|
||||
break;
|
||||
|
||||
case EFI_BROWN:
|
||||
ForegroundControl = 33;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
case EFI_LIGHTGRAY:
|
||||
ForegroundControl = 37;
|
||||
break;
|
||||
|
||||
}
|
||||
//
|
||||
// bit4 of the Attribute indicates bright control
|
||||
// of terminal emulator.
|
||||
//
|
||||
BrightControl = (UINT8) ((Attribute >> 3) & 1);
|
||||
|
||||
//
|
||||
// convert Attribute value to terminal emulator
|
||||
// understandable background color.
|
||||
//
|
||||
switch ((Attribute >> 4) & 0x07) {
|
||||
|
||||
case EFI_BLACK:
|
||||
BackgroundControl = 40;
|
||||
break;
|
||||
|
||||
case EFI_BLUE:
|
||||
BackgroundControl = 44;
|
||||
break;
|
||||
|
||||
case EFI_GREEN:
|
||||
BackgroundControl = 42;
|
||||
break;
|
||||
|
||||
case EFI_CYAN:
|
||||
BackgroundControl = 46;
|
||||
break;
|
||||
|
||||
case EFI_RED:
|
||||
BackgroundControl = 41;
|
||||
break;
|
||||
|
||||
case EFI_MAGENTA:
|
||||
BackgroundControl = 45;
|
||||
break;
|
||||
|
||||
case EFI_BROWN:
|
||||
BackgroundControl = 43;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
case EFI_LIGHTGRAY:
|
||||
BackgroundControl = 47;
|
||||
break;
|
||||
}
|
||||
//
|
||||
// terminal emulator's control sequence to set attributes
|
||||
//
|
||||
mSetAttributeString[BRIGHT_CONTROL_OFFSET] = (CHAR16) ('0' + BrightControl);
|
||||
mSetAttributeString[FOREGROUND_CONTROL_OFFSET + 0] = (CHAR16) ('0' + (ForegroundControl / 10));
|
||||
mSetAttributeString[FOREGROUND_CONTROL_OFFSET + 1] = (CHAR16) ('0' + (ForegroundControl % 10));
|
||||
mSetAttributeString[BACKGROUND_CONTROL_OFFSET + 0] = (CHAR16) ('0' + (BackgroundControl / 10));
|
||||
mSetAttributeString[BACKGROUND_CONTROL_OFFSET + 1] = (CHAR16) ('0' + (BackgroundControl % 10));
|
||||
|
||||
//
|
||||
// save current column and row
|
||||
// for future scrolling back use.
|
||||
//
|
||||
SavedColumn = This->Mode->CursorColumn;
|
||||
SavedRow = This->Mode->CursorRow;
|
||||
|
||||
TerminalDevice->OutputEscChar = TRUE;
|
||||
Status = This->OutputString (This, mSetAttributeString);
|
||||
TerminalDevice->OutputEscChar = FALSE;
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
//
|
||||
// scroll back to saved cursor position.
|
||||
//
|
||||
This->Mode->CursorColumn = SavedColumn;
|
||||
This->Mode->CursorRow = SavedRow;
|
||||
|
||||
This->Mode->Attribute = (INT32) Attribute;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutClearScreen (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.ClearScreen().
|
||||
It clears the ANSI terminal's display to the
|
||||
currently selected background color.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
This
|
||||
Indicates the calling context.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The operation completed successfully.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
The terminal screen cannot be cleared due to serial port error.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
The terminal is not in a valid display mode.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// control sequence for clear screen request
|
||||
//
|
||||
TerminalDevice->OutputEscChar = TRUE;
|
||||
Status = This->OutputString (This, mClearScreenString);
|
||||
TerminalDevice->OutputEscChar = FALSE;
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
Status = This->SetCursorPosition (This, 0, 0);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutSetCursorPosition (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.SetCursorPosition().
|
||||
|
||||
Arguments:
|
||||
|
||||
This
|
||||
Indicates the calling context.
|
||||
|
||||
Column
|
||||
The row to set cursor to.
|
||||
|
||||
Row
|
||||
The column to set cursor to.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The operation completed successfully.
|
||||
|
||||
EFI_DEVICE_ERROR
|
||||
The request fails due to serial port error.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
The terminal is not in a valid text mode, or the cursor position
|
||||
is invalid for current mode.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
|
||||
UINTN MaxColumn;
|
||||
UINTN MaxRow;
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// get current mode
|
||||
//
|
||||
Mode = This->Mode;
|
||||
|
||||
//
|
||||
// get geometry of current mode
|
||||
//
|
||||
Status = This->QueryMode (
|
||||
This,
|
||||
Mode->Mode,
|
||||
&MaxColumn,
|
||||
&MaxRow
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (Column >= MaxColumn || Row >= MaxRow) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// control sequence to move the cursor
|
||||
//
|
||||
mSetCursorPositionString[ROW_OFFSET + 0] = (CHAR16) ('0' + ((Row + 1) / 10));
|
||||
mSetCursorPositionString[ROW_OFFSET + 1] = (CHAR16) ('0' + ((Row + 1) % 10));
|
||||
mSetCursorPositionString[COLUMN_OFFSET + 0] = (CHAR16) ('0' + ((Column + 1) / 10));
|
||||
mSetCursorPositionString[COLUMN_OFFSET + 1] = (CHAR16) ('0' + ((Column + 1) % 10));
|
||||
|
||||
TerminalDevice->OutputEscChar = TRUE;
|
||||
Status = This->OutputString (This, mSetCursorPositionString);
|
||||
TerminalDevice->OutputEscChar = FALSE;
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
//
|
||||
// update current cursor position
|
||||
// in the Mode data structure.
|
||||
//
|
||||
Mode->CursorColumn = (INT32) Column;
|
||||
Mode->CursorRow = (INT32) Row;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TerminalConOutEnableCursor (
|
||||
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
|
||||
IN BOOLEAN Visible
|
||||
)
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
||||
In this driver, the cursor cannot be hidden.
|
||||
|
||||
Arguments:
|
||||
|
||||
This
|
||||
Indicates the calling context.
|
||||
|
||||
Visible
|
||||
If TRUE, the cursor is set to be visible,
|
||||
If FALSE, the cursor is set to be invisible.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
The request is valid.
|
||||
|
||||
EFI_UNSUPPORTED
|
||||
The terminal does not support cursor hidden.
|
||||
|
||||
--*/
|
||||
{
|
||||
if (!Visible) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
TerminalIsValidTextGraphics (
|
||||
IN CHAR16 Graphic,
|
||||
OUT CHAR8 *PcAnsi, OPTIONAL
|
||||
OUT CHAR8 *Ascii OPTIONAL
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Detects if a Unicode char is for Box Drawing text graphics.
|
||||
|
||||
Arguments:
|
||||
|
||||
Graphic - Unicode char to test.
|
||||
|
||||
PcAnsi - Optional pointer to return PCANSI equivalent of Graphic.
|
||||
|
||||
Ascii - Optional pointer to return ASCII equivalent of Graphic.
|
||||
|
||||
Returns:
|
||||
|
||||
TRUE if Graphic is a supported Unicode Box Drawing character.
|
||||
|
||||
--*/
|
||||
{
|
||||
UNICODE_TO_CHAR *Table;
|
||||
|
||||
if ((((Graphic & 0xff00) != 0x2500) && ((Graphic & 0xff00) != 0x2100))) {
|
||||
//
|
||||
// Unicode drawing code charts are all in the 0x25xx range,
|
||||
// arrows are 0x21xx
|
||||
//
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (Table = UnicodeToPcAnsiOrAscii; Table->Unicode != 0x0000; Table++) {
|
||||
if (Graphic == Table->Unicode) {
|
||||
if (PcAnsi != NULL) {
|
||||
*PcAnsi = Table->PcAnsi;
|
||||
}
|
||||
|
||||
if (Ascii != NULL) {
|
||||
*Ascii = Table->Ascii;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
TerminalIsValidAscii (
|
||||
IN CHAR16 Ascii
|
||||
)
|
||||
{
|
||||
//
|
||||
// valid ascii code lies in the extent of 0x20 ~ 0x7f
|
||||
//
|
||||
if ((Ascii >= 0x20) && (Ascii <= 0x7f)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
TerminalIsValidEfiCntlChar (
|
||||
IN CHAR16 CharC
|
||||
)
|
||||
{
|
||||
//
|
||||
// only support four control characters.
|
||||
//
|
||||
if (CharC == CHAR_NULL ||
|
||||
CharC == CHAR_BACKSPACE ||
|
||||
CharC == CHAR_LINEFEED ||
|
||||
CharC == CHAR_CARRIAGE_RETURN ||
|
||||
CharC == CHAR_TAB
|
||||
) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
68
EdkModulePkg/Universal/Console/Terminal/Dxe/ansi.c
Normal file
68
EdkModulePkg/Universal/Console/Terminal/Dxe/ansi.c
Normal file
@@ -0,0 +1,68 @@
|
||||
/*++
|
||||
|
||||
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 "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;
|
||||
}
|
47
EdkModulePkg/Universal/Console/Terminal/Dxe/build.xml
Normal file
47
EdkModulePkg/Universal/Console/Terminal/Dxe/build.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!-- 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.-->
|
||||
<project basedir="." default="Terminal"><!--Apply external ANT tasks-->
|
||||
<taskdef resource="GenBuild.tasks"/>
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
||||
<property environment="env"/>
|
||||
<property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>
|
||||
<import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->
|
||||
<property name="MODULE_RELATIVE_PATH" value="Universal\Console\Terminal\Dxe"/>
|
||||
<property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
|
||||
<property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
|
||||
<target name="Terminal">
|
||||
<GenBuild baseName="Terminal" mbdFilename="${MODULE_DIR}\Terminal.mbd" msaFilename="${MODULE_DIR}\Terminal.msa"/>
|
||||
</target>
|
||||
<target depends="Terminal_clean" name="clean"/>
|
||||
<target depends="Terminal_cleanall" name="cleanall"/>
|
||||
<target name="Terminal_clean">
|
||||
<OutputDirSetup baseName="Terminal" mbdFilename="${MODULE_DIR}\Terminal.mbd" msaFilename="${MODULE_DIR}\Terminal.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\Terminal_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\Terminal_build.xml" target="clean"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
|
||||
</target>
|
||||
<target name="Terminal_cleanall">
|
||||
<OutputDirSetup baseName="Terminal" mbdFilename="${MODULE_DIR}\Terminal.mbd" msaFilename="${MODULE_DIR}\Terminal.msa"/>
|
||||
<if>
|
||||
<available file="${DEST_DIR_OUTPUT}\Terminal_build.xml"/>
|
||||
<then>
|
||||
<ant antfile="${DEST_DIR_OUTPUT}\Terminal_build.xml" target="cleanall"/>
|
||||
</then>
|
||||
</if>
|
||||
<delete dir="${DEST_DIR_OUTPUT}"/>
|
||||
<delete dir="${DEST_DIR_DEBUG}"/>
|
||||
<delete>
|
||||
<fileset dir="${BIN_DIR}" includes="**Terminal*"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
270
EdkModulePkg/Universal/Console/Terminal/Dxe/vtutf8.c
Normal file
270
EdkModulePkg/Universal/Console/Terminal/Dxe/vtutf8.c
Normal file
@@ -0,0 +1,270 @@
|
||||
/*++
|
||||
|
||||
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 "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;
|
||||
}
|
Reference in New Issue
Block a user