summaryrefslogtreecommitdiff
path: root/UnixPkg/UnixConsoleDxe
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2013-07-29 21:09:55 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-07-29 21:09:55 +0000
commit5d71a30480bdf7081f72485d6bf48361c244c4d7 (patch)
treeeaa76ec905c5a488d86edb9dcc5c4c7a79958258 /UnixPkg/UnixConsoleDxe
parentbf6ee6c7c33cf280cdfb2fd0e6b66a712b7aa4a1 (diff)
downloadedk2-5d71a30480bdf7081f72485d6bf48361c244c4d7.zip
edk2-5d71a30480bdf7081f72485d6bf48361c244c4d7.tar.gz
edk2-5d71a30480bdf7081f72485d6bf48361c244c4d7.tar.bz2
UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg)
For now the UnixPkg/Deprecated.txt file is retained to indicate that EmulatorPkg should be used instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14518 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/UnixConsoleDxe')
-rw-r--r--UnixPkg/UnixConsoleDxe/ComponentName.c197
-rw-r--r--UnixPkg/UnixConsoleDxe/Console.c310
-rw-r--r--UnixPkg/UnixConsoleDxe/Console.h519
-rw-r--r--UnixPkg/UnixConsoleDxe/ConsoleIn.c241
-rw-r--r--UnixPkg/UnixConsoleDxe/ConsoleOut.c620
-rw-r--r--UnixPkg/UnixConsoleDxe/EntryPoint.c51
-rw-r--r--UnixPkg/UnixConsoleDxe/UnixConsole.inf65
7 files changed, 0 insertions, 2003 deletions
diff --git a/UnixPkg/UnixConsoleDxe/ComponentName.c b/UnixPkg/UnixConsoleDxe/ComponentName.c
deleted file mode 100644
index f9bd509..0000000
--- a/UnixPkg/UnixConsoleDxe/ComponentName.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*++
-
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
-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 "Console.h"
-
-//
-// EFI Component Name Functions
-//
-EFI_STATUS
-EFIAPI
-UnixConsoleComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- );
-
-EFI_STATUS
-EFIAPI
-UnixConsoleComponentNameGetControllerName (
- 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 gUnixConsoleComponentName = {
- UnixConsoleComponentNameGetDriverName,
- UnixConsoleComponentNameGetControllerName,
- "eng"
-};
-
-EFI_UNICODE_STRING_TABLE mUnixConsoleDriverNameTable[] = {
- { "eng", L"Unix Text Console Driver" },
- { NULL , NULL }
-};
-
-EFI_STATUS
-EFIAPI
-UnixConsoleComponentNameGetDriverName (
- 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,
- gUnixConsoleComponentName.SupportedLanguages,
- mUnixConsoleDriverNameTable,
- DriverName
- );
-}
-
-EFI_STATUS
-EFIAPI
-UnixConsoleComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- )
-/*++
-
- Routine Description:
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by an EFI Driver.
-
- Arguments:
- This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
- ControllerHandle - The handle of a controller that the driver specified by
- This is managing. This handle specifies the controller
- whose name is to be returned.
- ChildHandle - The handle of the child controller to retrieve the name
- of. This is an optional parameter that may be NULL. It
- will be NULL for device drivers. It will also be NULL
- for a bus drivers that wish to retrieve the name of the
- bus controller. It will not be NULL for a bus driver
- that wishes to retrieve the name of a child controller.
- Language - A pointer to a three character ISO 639-2 language
- identifier. This is the language of the controller name
- that that the caller is requesting, and it must match one
- of the languages specified in SupportedLanguages. The
- number of languages supported by a driver is up to the
- driver writer.
- ControllerName - A pointer to the Unicode string to return. This Unicode
- string is the name of the controller specified by
- ControllerHandle and ChildHandle in the language specified
- by Language from the point of view of the driver specified
- by This.
-
- Returns:
- EFI_SUCCESS - The Unicode string for the user readable name in the
- language specified by Language for the driver
- specified by This was returned in DriverName.
- EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
- EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
- EFI_INVALID_PARAMETER - Language is NULL.
- EFI_INVALID_PARAMETER - ControllerName is NULL.
- EFI_UNSUPPORTED - The driver specified by This is not currently managing
- the controller specified by ControllerHandle and
- ChildHandle.
- EFI_UNSUPPORTED - The driver specified by This does not support the
- language specified by Language.
-
---*/
-{
- EFI_STATUS Status;
- EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut;
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- //
- // This is a device driver, so ChildHandle must be NULL.
- //
- if (ChildHandle != NULL) {
- return EFI_UNSUPPORTED;
- }
- //
- // Make sure this driver is currently managing ControllerHandle
- //
- Status = EfiTestManagedDevice (
- ControllerHandle,
- gUnixConsoleDriverBinding.DriverBindingHandle,
- &gEfiUnixIoProtocolGuid
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
- //
- // Get out context back
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiSimpleTextOutProtocolGuid,
- (void *)&SimpleTextOut,
- gUnixConsoleDriverBinding.DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (SimpleTextOut);
-
- return LookupUnicodeString (
- Language,
- gUnixConsoleComponentName.SupportedLanguages,
- Private->ControllerNameTable,
- ControllerName
- );
-}
diff --git a/UnixPkg/UnixConsoleDxe/Console.c b/UnixPkg/UnixConsoleDxe/Console.c
deleted file mode 100644
index d96646c..0000000
--- a/UnixPkg/UnixConsoleDxe/Console.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/*++
-
-Copyright (c) 2004 - 2005, Intel Corporation. All rights reserved.<BR>
-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:
-
- Console.c
-
-Abstract:
-
- Console based on Posix APIs.
-
---*/
-
-#include "Console.h"
-
-EFI_STATUS
-EFIAPI
-UnixConsoleDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-UnixConsoleDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-UnixConsoleDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-EFI_DRIVER_BINDING_PROTOCOL gUnixConsoleDriverBinding = {
- UnixConsoleDriverBindingSupported,
- UnixConsoleDriverBindingStart,
- UnixConsoleDriverBindingStop,
- 0xa,
- NULL,
- NULL
-};
-
-EFI_STATUS
-EFIAPI
-UnixConsoleDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Handle - add argument and description to function comment
-// TODO: RemainingDevicePath - add argument and description to function comment
-{
- EFI_STATUS Status;
- EFI_UNIX_IO_PROTOCOL *UnixIo;
-
- //
- // Open the IO Abstraction(s) needed to perform the supported test
- //
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiUnixIoProtocolGuid,
- (void *)&UnixIo,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Make sure that the Unix Thunk Protocol is valid
- //
- Status = EFI_UNSUPPORTED;
- if (UnixIo->UnixThunk->Signature == EFI_UNIX_THUNK_PROTOCOL_SIGNATURE) {
-
- //
- // Check the GUID to see if this is a handle type the driver supports
- //
- if (CompareGuid (UnixIo->TypeGuid, &gEfiUnixConsoleGuid)) {
- Status = EFI_SUCCESS;
- }
- }
-
- //
- // Close the I/O Abstraction(s) used to perform the supported test
- //
- gBS->CloseProtocol (
- Handle,
- &gEfiUnixIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-UnixConsoleDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Handle - add argument and description to function comment
-// TODO: RemainingDevicePath - add argument and description to function comment
-{
- EFI_STATUS Status;
- EFI_UNIX_IO_PROTOCOL *UnixIo;
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- //
- // Grab the IO abstraction we need to get any work done
- //
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiUnixIoProtocolGuid,
- (void *)&UnixIo,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (UNIX_SIMPLE_TEXT_PRIVATE_DATA),
- (void *)&Private
- );
- if (EFI_ERROR (Status)) {
- goto Done;
- }
-
- ZeroMem (Private, sizeof (UNIX_SIMPLE_TEXT_PRIVATE_DATA));
-
- Private->Signature = UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE;
- Private->Handle = Handle;
- Private->UnixIo = UnixIo;
- Private->UnixThunk = UnixIo->UnixThunk;
-
- UnixSimpleTextOutOpenWindow (Private);
- UnixSimpleTextInAttachToWindow (Private);
-
- Status = gBS->InstallMultipleProtocolInterfaces (
- &Handle,
- &gEfiSimpleTextOutProtocolGuid,
- &Private->SimpleTextOut,
- &gEfiSimpleTextInProtocolGuid,
- &Private->SimpleTextIn,
- NULL
- );
- if (!EFI_ERROR (Status)) {
- return Status;
- }
-
-Done:
- gBS->CloseProtocol (
- Handle,
- &gEfiUnixIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
- if (Private != NULL) {
-
- FreeUnicodeStringTable (Private->ControllerNameTable);
-
-#if 0
- if (Private->NtOutHandle != NULL) {
- Private->UnixThunk->CloseHandle (Private->NtOutHandle);
- }
-#endif
-
- if (Private->SimpleTextIn.WaitForKey != NULL) {
- gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);
- }
-
- gBS->FreePool (Private);
- }
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-UnixConsoleDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Handle - TODO: add argument description
- NumberOfChildren - TODO: add argument description
- ChildHandleBuffer - TODO: add argument description
-
-Returns:
-
- EFI_UNSUPPORTED - TODO: Add description for return value
-
---*/
-{
- EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut;
- EFI_STATUS Status;
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- //
- // Kick people off our interface???
- //
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiSimpleTextOutProtocolGuid,
- (void *)&SimpleTextOut,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (SimpleTextOut);
-
- ASSERT (Private->Handle == Handle);
-
- Status = gBS->UninstallMultipleProtocolInterfaces (
- Handle,
- &gEfiSimpleTextOutProtocolGuid,
- &Private->SimpleTextOut,
- &gEfiSimpleTextInProtocolGuid,
- &Private->SimpleTextIn,
- NULL
- );
- if (!EFI_ERROR (Status)) {
-
- //
- // Shut down our device
- //
- Status = gBS->CloseProtocol (
- Handle,
- &gEfiUnixIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
-
- Status = gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);
- ASSERT_EFI_ERROR (Status);
-
-#if 0
- Private->UnixThunk->CloseHandle (Private->NtOutHandle);
-#endif
- //
- // DO NOT close Private->NtInHandle. It points to StdIn and not
- // the Private->NtOutHandle is StdIn and should not be closed!
- //
- FreeUnicodeStringTable (Private->ControllerNameTable);
-
- gBS->FreePool (Private);
- }
-
- return Status;
-}
diff --git a/UnixPkg/UnixConsoleDxe/Console.h b/UnixPkg/UnixConsoleDxe/Console.h
deleted file mode 100644
index dd80a63..0000000
--- a/UnixPkg/UnixConsoleDxe/Console.h
+++ /dev/null
@@ -1,519 +0,0 @@
-/*++
-
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
-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:
-
- Console.h
-
-Abstract:
-
- Console based on Posix APIs.
-
- This file attaches a SimpleTextIn protocol to a previously open window.
-
- The constructor for this protocol depends on an open window. Currently
- the SimpleTextOut protocol creates a window when it's constructor is called.
- Thus this code must run after the constructor for the SimpleTextOut
- protocol
-
---*/
-
-#ifndef _CONSOLE_H_
-#define _CONSOLE_H_
-
-#include "PiDxe.h"
-#include "UnixDxe.h"
-#include <Protocol/UnixIo.h>
-#include <Protocol/SimpleTextIn.h>
-#include <Protocol/SimpleTextOut.h>
-
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-
-extern EFI_DRIVER_BINDING_PROTOCOL gUnixConsoleDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gUnixConsoleComponentName;
-
-#define UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE \
- SIGNATURE_32('U','X','s','c')
-
-typedef struct {
- UINT64 Signature;
-
- EFI_HANDLE Handle;
-
- EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOut;
- EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutMode;
-
- EFI_UNIX_IO_PROTOCOL *UnixIo;
- EFI_UNIX_THUNK_PROTOCOL *UnixThunk;
-
- //
- // SimpleTextOut Private Data including Posix types.
- //
- // HANDLE NtOutHandle;
- // HANDLE NtInHandle;
-
- //COORD MaxScreenSize;
- //COORD Position;
- //WORD Attribute;
- BOOLEAN CursorEnable;
-
- EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn;
-
- EFI_UNICODE_STRING_TABLE *ControllerNameTable;
-
-} UNIX_SIMPLE_TEXT_PRIVATE_DATA;
-
-#define UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS(a) \
- CR(a, UNIX_SIMPLE_TEXT_PRIVATE_DATA, SimpleTextOut, UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE)
-
-#define UNIX_SIMPLE_TEXT_IN_PRIVATE_DATA_FROM_THIS(a) \
- CR(a, UNIX_SIMPLE_TEXT_PRIVATE_DATA, SimpleTextIn, UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE)
-
-//
-// Console Globale Variables
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gUnixConsoleDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gUnixConsoleComponentName;
-
-typedef struct {
- UINTN ColumnsX;
- UINTN RowsY;
-} UNIX_SIMPLE_TEXT_OUT_MODE;
-
-#if 0
-//
-// Simple Text Out protocol member functions
-//
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutReset (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ExtendedVerification - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutOutputString (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN CHAR16 *String
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- String - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutTestString (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN CHAR16 *String
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- String - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutQueryMode (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN ModeNumber,
- OUT UINTN *Columns,
- OUT UINTN *Rows
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ModeNumber - TODO: add argument description
- Columns - TODO: add argument description
- Rows - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetMode (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN ModeNumber
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ModeNumber - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetAttribute (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN Attribute
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Attribute - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutClearScreen (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetCursorPosition (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN Column,
- IN UINTN Row
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Column - TODO: add argument description
- Row - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutEnableCursor (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN BOOLEAN Enable
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Enable - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-#endif
-//
-// Simple Text Out constructor and destructor.
-//
-EFI_STATUS
-UnixSimpleTextOutOpenWindow (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-UnixSimpleTextOutCloseWindow (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Console - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-#if 0
-//
-// Simple Text In protocol member functions.
-//
-EFI_STATUS
-EFIAPI
-UnixSimpleTextInReset (
- IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ExtendedVerification - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextInReadKeyStroke (
- IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
- OUT EFI_INPUT_KEY *Key
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Key - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-VOID
-EFIAPI
-UnixSimpleTextInWaitForKey (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Event - TODO: add argument description
- Context - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-#endif
-//
-// Simple Text In constructor
-//
-EFI_STATUS
-UnixSimpleTextInAttachToWindow (
- IN UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-//
-// Main Entry Point
-//
-EFI_STATUS
-EFIAPI
-InitializeUnixConsole (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- ImageHandle - TODO: add argument description
- SystemTable - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-AppendDevicePathInstanceToVar (
- IN CHAR16 *VariableName,
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- VariableName - TODO: add argument description
- DevicePathInstance - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-#endif
diff --git a/UnixPkg/UnixConsoleDxe/ConsoleIn.c b/UnixPkg/UnixConsoleDxe/ConsoleIn.c
deleted file mode 100644
index 08100bc..0000000
--- a/UnixPkg/UnixConsoleDxe/ConsoleIn.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*++
-
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
-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:
-
- ConsoleIn.c
-
-Abstract:
-
- Console based on Posix APIs.
-
- This file attaches a SimpleTextIn protocol to a previously open window.
-
- The constructor for this protocol depends on an open window. Currently
- the SimpleTextOut protocol creates a window when it's constructor is called.
- Thus this code must run after the constructor for the SimpleTextOut
- protocol
-
---*/
-
-#include "Console.h"
-#include <sys/poll.h>
-
-//
-// Private worker functions
-//
-EFI_STATUS
-UnixSimpleTextInCheckKey (
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
- );
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextInReset (
- IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ExtendedVerification - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_IN_PRIVATE_DATA_FROM_THIS (This);
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UnixConvertInputRecordToEfiKey (
- IN char c,
- OUT EFI_INPUT_KEY *Key
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- InputRecord - TODO: add argument description
- Key - TODO: add argument description
-
-Returns:
-
- EFI_NOT_READY - TODO: Add description for return value
- EFI_NOT_READY - TODO: Add description for return value
- EFI_NOT_READY - TODO: Add description for return value
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- Key->ScanCode = 0;
- if (c == '\n')
- c = '\r';
- Key->UnicodeChar = c;
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextInReadKeyStroke (
- IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
- OUT EFI_INPUT_KEY *Key
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Key - TODO: add argument description
-
-Returns:
-
- EFI_DEVICE_ERROR - TODO: Add description for return value
- EFI_NOT_READY - TODO: Add description for return value
-
---*/
-{
- EFI_STATUS Status;
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
- char c;
-
- Private = UNIX_SIMPLE_TEXT_IN_PRIVATE_DATA_FROM_THIS (This);
-
- Status = UnixSimpleTextInCheckKey (Private);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- if (Private->UnixThunk->Read (0, &c, 1) != 1)
- return EFI_NOT_READY;
- Status = UnixConvertInputRecordToEfiKey (c, Key);
-
- return Status;
-}
-
-VOID
-EFIAPI
-UnixSimpleTextInWaitForKey (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Event - TODO: add argument description
- Context - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
- EFI_STATUS Status;
-
- Private = (UNIX_SIMPLE_TEXT_PRIVATE_DATA *) Context;
- Status = UnixSimpleTextInCheckKey (Private);
- if (!EFI_ERROR (Status)) {
- gBS->SignalEvent (Event);
- }
-}
-
-EFI_STATUS
-UnixSimpleTextInCheckKey (
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- struct pollfd pfd;
-
- pfd.fd = 0;
- pfd.events = POLLIN;
- if (Private->UnixThunk->Poll (&pfd, 1, 0) <= 0) {
- return EFI_NOT_READY;
- }
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UnixSimpleTextInAttachToWindow (
- IN UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- EFI_STATUS Status;
-
- Private->SimpleTextIn.Reset = UnixSimpleTextInReset;
- Private->SimpleTextIn.ReadKeyStroke = UnixSimpleTextInReadKeyStroke;
-
- Status = gBS->CreateEvent (
- EVT_NOTIFY_WAIT,
- TPL_NOTIFY,
- UnixSimpleTextInWaitForKey,
- Private,
- &Private->SimpleTextIn.WaitForKey
- );
- ASSERT_EFI_ERROR (Status);
-
- return Status;
-}
diff --git a/UnixPkg/UnixConsoleDxe/ConsoleOut.c b/UnixPkg/UnixConsoleDxe/ConsoleOut.c
deleted file mode 100644
index 0244e0b..0000000
--- a/UnixPkg/UnixConsoleDxe/ConsoleOut.c
+++ /dev/null
@@ -1,620 +0,0 @@
-/*++
-
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
-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:
-
- ConsoleOut.c
-
-Abstract:
-
- Console based on Posix APIs.
-
- This file creates an Posix window and attaches a SimpleTextOut protocol.
-
---*/
-
-#include "Console.h"
-//
-// Private worker functions.
-//
-
-#if 0
-VOID
-UnixSimpleTextOutScrollScreen (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console
- );
-
-#endif
-VOID
-UnixSimpleTextOutPutChar (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console,
- IN CHAR16 Char
- );
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetAttribute (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN Attribute
- );
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetMode (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN ModeNumber
- );
-
-//
-// Modeule Global for Simple Text Out Mode.
-//
-#define MAX_SIMPLE_TEXT_OUT_MODE \
- (sizeof(mUnixSimpleTextOutSupportedModes)/sizeof(UNIX_SIMPLE_TEXT_OUT_MODE))
-
-UNIX_SIMPLE_TEXT_OUT_MODE mUnixSimpleTextOutSupportedModes[] = {
- { 80, 25 },
-#if 0
- { 80, 50 },
- { 80, 43 },
- { 100, 100 },
- { 100, 999 }
-#endif
-};
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutReset (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ExtendedVerification - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
- UnixSimpleTextOutSetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));
-
- UnixSimpleTextOutSetMode (This, 0);
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutOutputString (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN CHAR16 *String
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- String - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
- CHAR16 *Str;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
- for (Str = String; *Str != '\0'; Str++) {
- switch (*Str) {
-#if 0
- case '\n':
- if (Private->Position.Y == (Private->MaxScreenSize.Y - 1)) {
- UnixSimpleTextOutScrollScreen (Private);
- }
-
- if (Private->Position.Y < (Private->MaxScreenSize.Y - 1)) {
- Private->Position.Y++;
- This->Mode->CursorRow++;
- }
- break;
-
- case '\r':
- Private->Position.X = 0;
- This->Mode->CursorColumn = 0;
- break;
-
- case '\b':
- if (Private->Position.X > 0) {
- Private->Position.X--;
- This->Mode->CursorColumn--;
- }
- break;
-
-#endif
- default:
- UnixSimpleTextOutPutChar (Private, *Str);
- }
- }
-
- return EFI_SUCCESS;
-}
-
-VOID
-UnixSimpleTextOutPutChar (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console,
- IN CHAR16 Char
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Console - TODO: add argument description
- Char - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- char c = Char;
- Console->UnixThunk->Write (1, &c, 1);
-}
-
-#if 0
-VOID
-UnixSimpleTextOutScrollScreen (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Console - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
-}
-#endif
-
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutTestString (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN CHAR16 *String
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- String - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
- //
- // BugBug: The correct answer would be a function of what code pages
- // are currently loaded? For now we will just return success.
- //
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutQueryMode (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN ModeNumber,
- OUT UINTN *Columns,
- OUT UINTN *Rows
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ModeNumber - TODO: add argument description
- Columns - TODO: add argument description
- Rows - TODO: add argument description
-
-Returns:
-
- EFI_INVALID_PARAMETER - TODO: Add description for return value
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
- if (ModeNumber > MAX_SIMPLE_TEXT_OUT_MODE) {
- return EFI_INVALID_PARAMETER;
- }
-
- *Columns = mUnixSimpleTextOutSupportedModes[ModeNumber].ColumnsX;
- *Rows = mUnixSimpleTextOutSupportedModes[ModeNumber].RowsY;
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetMode (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN ModeNumber
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ModeNumber - TODO: add argument description
-
-Returns:
-
- EFI_INVALID_PARAMETER - TODO: Add description for return value
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
- if (ModeNumber > MAX_SIMPLE_TEXT_OUT_MODE) {
- return EFI_INVALID_PARAMETER;
- }
-
-
- This->Mode->Mode = (INT32) ModeNumber;
-
- This->EnableCursor (This, TRUE);
- This->ClearScreen (This);
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetAttribute (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN Attribute
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Attribute - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
-#if 0
- Private->Attribute = (WORD) Attribute;
-#endif
- This->Mode->Attribute = (INT32) Attribute;
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutClearScreen (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
- // DWORD ConsoleWindow;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
- This->SetCursorPosition (This, 0, 0);
- Private->UnixThunk->Write (1, "\e[2J", 4);
-
-
-#if 0
- Private->UnixThunk->FillConsoleOutputCharacter (
- Private->NtOutHandle,
- ' ',
- Private->MaxScreenSize.X * Private->MaxScreenSize.Y,
- Private->Possition,
- &ConsoleWindow
- );
- Private->UnixThunk->FillConsoleOutputAttribute (
- Private->NtOutHandle,
- Private->Attribute,
- Private->MaxScreenSize.X * Private->MaxScreenSize.Y,
- Private->Possition,
- &ConsoleWindow
- );
-#endif
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutSetCursorPosition (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN UINTN Column,
- IN UINTN Row
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Column - TODO: add argument description
- Row - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- char buf[12];
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
-
-#if 0
- Private->Position.X = (WORD) Column;
-#endif
- This->Mode->CursorColumn = (INT32) Column;
-
-#if 0
- Private->Position.Y = (WORD) Row;
-#endif
- This->Mode->CursorRow = (INT32) Row;
-#if 0
- Private->UnixThunk->SetConsoleCursorPosition (Private->NtOutHandle, Private->Possition);
-#endif
-
- buf[0] = '\e';
- buf[1] = '[';
- buf[2] = '0' + ((Row / 100) % 10);
- buf[3] = '0' + ((Row / 10) % 10);
- buf[4] = '0' + ((Row / 1) % 10);
- buf[5] = ';';
- buf[6] = '0' + ((Column / 100) % 10);
- buf[7] = '0' + ((Column / 10) % 10);
- buf[8] = '0' + ((Column / 1) % 10);
- buf[9] = 'H';
- Private->UnixThunk->Write (1, buf, 10);
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-UnixSimpleTextOutEnableCursor (
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
- IN BOOLEAN Enable
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Enable - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
-#if 0
- CONSOLE_CURSOR_INFO Info;
-#endif
-
- Private = UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS (This);
- Private->CursorEnable = Enable;
- This->Mode->CursorVisible = Enable;
-
-#if 0
- Private->UnixThunk->GetConsoleCursorInfo (Private->NtOutHandle, &Info);
- Info.bVisible = Enable;
- Private->UnixThunk->SetConsoleCursorInfo (Private->NtOutHandle, &Info);
-#endif
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UnixSimpleTextOutOpenWindow (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut;
- CHAR16 *WindowName;
-
- //WindowName = Private->UnixIo->EnvString;
-#if 0
- Private->Attribute = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY;
- if (*WindowName == '?') {
- Private->Attribute = BACKGROUND_RED | FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN;
- WindowName = L"EFI Emulator Error Console";
- }
-#endif
- WindowName = L"EFI Emulator Error Console";
-
- AddUnicodeString (
- "eng",
- gUnixConsoleComponentName.SupportedLanguages,
- &Private->ControllerNameTable,
- WindowName
- );
-
- //
- // Fill in protocol member functions
- //
- SimpleTextOut = &Private->SimpleTextOut;
- SimpleTextOut->Reset = UnixSimpleTextOutReset;
- SimpleTextOut->OutputString = UnixSimpleTextOutOutputString;
- SimpleTextOut->TestString = UnixSimpleTextOutTestString;
- SimpleTextOut->QueryMode = UnixSimpleTextOutQueryMode;
- SimpleTextOut->SetMode = UnixSimpleTextOutSetMode;
- SimpleTextOut->SetAttribute = UnixSimpleTextOutSetAttribute;
- SimpleTextOut->ClearScreen = UnixSimpleTextOutClearScreen;
- SimpleTextOut->SetCursorPosition = UnixSimpleTextOutSetCursorPosition;
- SimpleTextOut->EnableCursor = UnixSimpleTextOutEnableCursor;
-
- //
- // Initialize SimpleTextOut protocol mode structure
- //
- SimpleTextOut->Mode = &Private->SimpleTextOutMode;
- SimpleTextOut->Mode->MaxMode = MAX_SIMPLE_TEXT_OUT_MODE;
- SimpleTextOut->Mode->Attribute = 0; //FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY;
-
-#if 0
- //
- // Open the window an initialize it!
- //
- Private->NtOutHandle = Private->UnixThunk->CreateConsoleScreenBuffer (
- GENERIC_WRITE | GENERIC_READ,
- FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL,
- CONSOLE_TEXTMODE_BUFFER,
- NULL
- );
- Private->UnixThunk->SetConsoleTitle (WindowName);
-#endif
-
- return SimpleTextOut->SetMode (SimpleTextOut, 0);
-}
-
-EFI_STATUS
-UnixSimpleTextOutCloseWindow (
- IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Console - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
-#if 0
- Console->UnixThunk->CloseHandle (Console->NtOutHandle);
-#endif
- return EFI_SUCCESS;
-}
diff --git a/UnixPkg/UnixConsoleDxe/EntryPoint.c b/UnixPkg/UnixConsoleDxe/EntryPoint.c
deleted file mode 100644
index 62d8013..0000000
--- a/UnixPkg/UnixConsoleDxe/EntryPoint.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**@file
- Entry Point Source file.
-
- This file contains the user entry point
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-
-
-#include "Console.h"
-
-/**
- The user Entry Point for module UnixConsole. The user code starts with this function.
-
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The entry point is executed successfully.
- @retval other Some error occurs when executing this entry point.
-
-**/
-EFI_STATUS
-EFIAPI
-InitializeUnixConsole(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
-
- Status = EfiLibInstallAllDriverProtocols (
- ImageHandle,
- SystemTable,
- &gUnixConsoleDriverBinding,
- ImageHandle,
- &gUnixConsoleComponentName,
- NULL,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
-
- return Status;
-}
diff --git a/UnixPkg/UnixConsoleDxe/UnixConsole.inf b/UnixPkg/UnixConsoleDxe/UnixConsole.inf
deleted file mode 100644
index a3e1313..0000000
--- a/UnixPkg/UnixConsoleDxe/UnixConsole.inf
+++ /dev/null
@@ -1,65 +0,0 @@
-## @file
-# Console Dxe driver
-#
-# Simulate console with Unix API
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
-#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = UnixConsole
- FILE_GUID = f314a8cc-8985-11db-9f69-0040d02b1835
- MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
-
- ENTRY_POINT = InitializeUnixConsole
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-# DRIVER_BINDING = gUnixConsoleDriverBinding
-# COMPONENT_NAME = gUnixConsoleComponentName
-#
-
-[Sources]
- ComponentName.c
- ConsoleOut.c
- ConsoleIn.c
- Console.c
- Console.h
- EntryPoint.c
-
-
-[Packages]
- MdePkg/MdePkg.dec
- UnixPkg/UnixPkg.dec
-
-
-[LibraryClasses]
- UefiBootServicesTableLib
- MemoryAllocationLib
- BaseMemoryLib
- UefiLib
- UefiDriverEntryPoint
- BaseLib
- DebugLib
-
-
-[Protocols]
- gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
- gEfiSimpleTextOutProtocolGuid # PROTOCOL BY_START
- gEfiUnixIoProtocolGuid # PROTOCOL TO_START
-
-[Guids]
- gEfiUnixConsoleGuid