summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga
diff options
context:
space:
mode:
Diffstat (limited to 'EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga')
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c198
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.h363
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.msa92
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c338
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaInput.c411
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaScreen.c990
6 files changed, 0 insertions, 2392 deletions
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c
deleted file mode 100644
index 910771964d..0000000000
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*++
-
-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 "WinNtUga.h"
-
-//
-// EFI Component Name Functions
-//
-EFI_STATUS
-EFIAPI
-WinNtUgaComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- );
-
-EFI_STATUS
-EFIAPI
-WinNtUgaComponentNameGetControllerName (
- 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 gWinNtUgaComponentName = {
- WinNtUgaComponentNameGetDriverName,
- WinNtUgaComponentNameGetControllerName,
- "eng"
-};
-
-static EFI_UNICODE_STRING_TABLE mWinNtUgaDriverNameTable[] = {
- { "eng", L"Windows Universal Graphics Adapter Driver" },
- { NULL , NULL }
-};
-
-EFI_STATUS
-EFIAPI
-WinNtUgaComponentNameGetDriverName (
- 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,
- gWinNtUgaComponentName.SupportedLanguages,
- mWinNtUgaDriverNameTable,
- DriverName
- );
-}
-
-EFI_STATUS
-EFIAPI
-WinNtUgaComponentNameGetControllerName (
- 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_UGA_DRAW_PROTOCOL *UgaDraw;
- UGA_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,
- gWinNtUgaDriverBinding.DriverBindingHandle,
- &gEfiWinNtIoProtocolGuid
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
- //
- // Get our context back
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiUgaDrawProtocolGuid,
- &UgaDraw,
- gWinNtUgaDriverBinding.DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Private = UGA_DRAW_PRIVATE_DATA_FROM_THIS (UgaDraw);
-
- return LookupUnicodeString (
- Language,
- gWinNtUgaComponentName.SupportedLanguages,
- Private->ControllerNameTable,
- ControllerName
- );
-}
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.h b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.h
deleted file mode 100644
index defe3913fc..0000000000
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/*++
-
-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:
-
- WinNtUga.h
-
-Abstract:
-
- Private data for the Uga driver that is bound to the WinNt Thunk protocol
-
---*/
-
-#ifndef _WIN_NT_UGA_H_
-#define _WIN_NT_UGA_H_
-
-
-
-#define MAX_Q 256
-
-typedef struct {
- UINTN Front;
- UINTN Rear;
- UINTN Count;
- EFI_INPUT_KEY Q[MAX_Q];
-} UGA_QUEUE_FIXED;
-
-#define WIN_NT_UGA_CLASS_NAME L"WinNtUgaWindow"
-
-#define UGA_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N')
-typedef struct {
- UINT64 Signature;
-
- EFI_HANDLE Handle;
- EFI_UGA_DRAW_PROTOCOL UgaDraw;
- EFI_SIMPLE_TEXT_IN_PROTOCOL SimpleTextIn;
-
- EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;
-
- EFI_UNICODE_STRING_TABLE *ControllerNameTable;
-
- //
- // UGA Private Data for GetMode ()
- //
- UINT32 HorizontalResolution;
- UINT32 VerticalResolution;
- UINT32 ColorDepth;
- UINT32 RefreshRate;
-
- //
- // UGA Private Data knowing when to start hardware
- //
- BOOLEAN HardwareNeedsStarting;
-
- CHAR16 *WindowName;
- CHAR16 Buffer[160];
-
- HANDLE ThreadInited; // Semaphore
- HANDLE ThreadHandle; // Thread
- DWORD ThreadId;
-
- HWND WindowHandle;
- WNDCLASSEX WindowsClass;
-
- //
- // This screen is used to redraw the scree when windows events happen. It's
- // updated in the main thread and displayed in the windows thread.
- //
- BITMAPV4HEADER *VirtualScreenInfo;
- RGBQUAD *VirtualScreen;
-
- EFI_UGA_PIXEL *FillLine;
-
- //
- // Keyboard Queue used by Simple Text In. WinProc thread adds, and main
- // thread removes.
- //
- CRITICAL_SECTION QCriticalSection;
- UGA_QUEUE_FIXED Queue;
-
-} UGA_PRIVATE_DATA;
-
-#define UGA_DRAW_PRIVATE_DATA_FROM_THIS(a) \
- CR(a, UGA_PRIVATE_DATA, UgaDraw, UGA_PRIVATE_DATA_SIGNATURE)
-
-#define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
- CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
-
-//
-// Global Protocol Variables
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gWinNtUgaDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gWinNtUgaComponentName;
-
-//
-// Uga Hardware abstraction internal worker functions
-//
-EFI_STATUS
-WinNtUgaSupported (
- IN EFI_WIN_NT_IO_PROTOCOL *WinNtIo
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- WinNtIo - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-WinNtUgaConstructor (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-WinNtUgaDestructor (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-//
-// EFI 1.1 driver model prototypes for Win NT UGA
-//
-
-EFI_STATUS
-EFIAPI
-WinNtUgaInitialize (
- 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
-EFIAPI
-WinNtUgaDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Handle - TODO: add argument description
- RemainingDevicePath - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-WinNtUgaDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Handle - TODO: add argument description
- RemainingDevicePath - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-WinNtUgaDriverBindingStop (
- 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:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-UgaPrivateAddQ (
- IN UGA_PRIVATE_DATA *Private,
- IN EFI_INPUT_KEY Key
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
- Key - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-WinNtUgaInitializeSimpleTextInForWindow (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-WinNtUgaDestroySimpleTextInForWindow (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-UINTN
-Atoi (
- IN CHAR16 *String
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- String - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-#endif
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.msa b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.msa
deleted file mode 100644
index 0024262116..0000000000
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUga.msa
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <MsaHeader>
- <ModuleName>WinNtUga</ModuleName>
- <ModuleType>UEFI_DRIVER</ModuleType>
- <GuidValue>AB248E8D-ABE1-11d4-BD0D-0080C73C8881</GuidValue>
- <Version>1.0</Version>
- <Abstract>Uga driver</Abstract>
- <Description>UGA is short hand for Universal Graphics Abstraction protocol.
- This file is a verision of UgaIo the uses WinNtThunk system calls as an IO
- abstraction. For a PCI device WinNtIo would be replaced with
- a PCI IO abstraction that abstracted a specific PCI device.</Description>
- <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
- <License>All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
- <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
- </MsaHeader>
- <ModuleDefinitions>
- <SupportedArchitectures>IA32</SupportedArchitectures>
- <BinaryModule>false</BinaryModule>
- <OutputFileBasename>WinNtUga</OutputFileBasename>
- </ModuleDefinitions>
- <LibraryClassDefinitions>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>DebugLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiDriverModelLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiDriverEntryPoint</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>BaseMemoryLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiBootServicesTableLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>MemoryAllocationLib</Keyword>
- </LibraryClass>
- </LibraryClassDefinitions>
- <SourceFiles>
- <Filename>WinNtUga.h</Filename>
- <Filename>WinNtUgaInput.c</Filename>
- <Filename>WinNtUgaDriver.c</Filename>
- <Filename>WinNtUgaScreen.c</Filename>
- <Filename>ComponentName.c</Filename>
- </SourceFiles>
- <PackageDependencies>
- <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
- <Package PackageGuid="0fb2aa2d-10d5-40a5-a9dc-060c12a4a3f3"/>
- </PackageDependencies>
- <Protocols>
- <Protocol Usage="TO_START">
- <ProtocolCName>gEfiWinNtIoProtocolGuid</ProtocolCName>
- </Protocol>
- <Protocol Usage="BY_START">
- <ProtocolCName>gEfiUgaDrawProtocolGuid</ProtocolCName>
- </Protocol>
- <Protocol Usage="BY_START">
- <ProtocolCName>gEfiSimpleTextInProtocolGuid</ProtocolCName>
- </Protocol>
- </Protocols>
- <Events>
- <CreateEvents>
- <EventTypes EventGuidCName="gEfiEventExitBootServicesGuid" Usage="SOMETIMES_CONSUMED">
- <EventType>EVENT_GROUP_GUID</EventType>
- </EventTypes>
- </CreateEvents>
- </Events>
- <Guids>
- <GuidCNames Usage="ALWAYS_CONSUMED">
- <GuidCName>gEfiWinNtUgaGuid</GuidCName>
- </GuidCNames>
- </Guids>
- <Externs>
- <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
- <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
- <Extern>
- <DriverBinding>gWinNtUgaDriverBinding</DriverBinding>
- <ComponentName>gWinNtUgaComponentName</ComponentName>
- </Extern>
- </Externs>
-</ModuleSurfaceArea> \ No newline at end of file
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c
deleted file mode 100644
index 520856007d..0000000000
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*++
-
-Copyright (c) 2006 - 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- WinNtUgaDriver.c
-
-Abstract:
-
- This file implements the EFI 1.1 Device Driver model requirements for UGA
-
- UGA is short hand for Universal Graphics Abstraction protocol.
-
- This file is a verision of UgaIo the uses WinNtThunk system calls as an IO
- abstraction. For a PCI device WinNtIo would be replaced with
- a PCI IO abstraction that abstracted a specific PCI device.
-
---*/
-
-#include "WinNtUga.h"
-
-EFI_DRIVER_BINDING_PROTOCOL gWinNtUgaDriverBinding = {
- WinNtUgaDriverBindingSupported,
- WinNtUgaDriverBindingStart,
- WinNtUgaDriverBindingStop,
- 0xa,
- NULL,
- NULL
-};
-
-
-EFI_STATUS
-EFIAPI
-WinNtUgaDriverBindingSupported (
- 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_WIN_NT_IO_PROTOCOL *WinNtIo;
-
- //
- // Open the IO Abstraction(s) needed to perform the supported test
- //
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiWinNtIoProtocolGuid,
- &WinNtIo,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- Status = WinNtUgaSupported (WinNtIo);
-
- //
- // Close the I/O Abstraction(s) used to perform the supported test
- //
- gBS->CloseProtocol (
- Handle,
- &gEfiWinNtIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-WinNtUgaDriverBindingStart (
- 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
-// TODO: EFI_UNSUPPORTED - add return value to function comment
-{
- EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
- EFI_STATUS Status;
- UGA_PRIVATE_DATA *Private;
-
- //
- // Grab the protocols we need
- //
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiWinNtIoProtocolGuid,
- &WinNtIo,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- //
- // Allocate Private context data for SGO inteface.
- //
- Private = AllocatePool (sizeof (UGA_PRIVATE_DATA));
- if (Private == NULL) {
- goto Done;
- }
- //
- // Set up context record
- //
- Private->Signature = UGA_PRIVATE_DATA_SIGNATURE;
- Private->Handle = Handle;
- Private->WinNtThunk = WinNtIo->WinNtThunk;
-
- Private->ControllerNameTable = NULL;
-
- AddUnicodeString (
- "eng",
- gWinNtUgaComponentName.SupportedLanguages,
- &Private->ControllerNameTable,
- WinNtIo->EnvString
- );
-
- Private->WindowName = WinNtIo->EnvString;
-
- Status = WinNtUgaConstructor (Private);
- if (EFI_ERROR (Status)) {
- goto Done;
- }
- //
- // Publish the Uga interface to the world
- //
- Status = gBS->InstallMultipleProtocolInterfaces (
- &Private->Handle,
- &gEfiUgaDrawProtocolGuid,
- &Private->UgaDraw,
- &gEfiSimpleTextInProtocolGuid,
- &Private->SimpleTextIn,
- NULL
- );
-
-Done:
- if (EFI_ERROR (Status)) {
-
- gBS->CloseProtocol (
- Handle,
- &gEfiWinNtIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
-
- if (Private != NULL) {
- //
- // On Error Free back private data
- //
- if (Private->ControllerNameTable != NULL) {
- FreeUnicodeStringTable (Private->ControllerNameTable);
- }
-
- FreePool (Private);
- }
- }
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-WinNtUgaDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Handle - add argument and description to function comment
-// TODO: NumberOfChildren - add argument and description to function comment
-// TODO: ChildHandleBuffer - add argument and description to function comment
-// TODO: EFI_NOT_STARTED - add return value to function comment
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
-{
- EFI_UGA_DRAW_PROTOCOL *UgaDraw;
- EFI_STATUS Status;
- UGA_PRIVATE_DATA *Private;
-
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiUgaDrawProtocolGuid,
- &UgaDraw,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- //
- // If the UGA interface does not exist the driver is not started
- //
- return EFI_NOT_STARTED;
- }
-
- //
- // Get our private context information
- //
- Private = UGA_DRAW_PRIVATE_DATA_FROM_THIS (UgaDraw);
-
- //
- // Remove the SGO interface from the system
- //
- Status = gBS->UninstallMultipleProtocolInterfaces (
- Private->Handle,
- &gEfiUgaDrawProtocolGuid,
- &Private->UgaDraw,
- &gEfiSimpleTextInProtocolGuid,
- &Private->SimpleTextIn,
- NULL
- );
- if (!EFI_ERROR (Status)) {
- //
- // Shutdown the hardware
- //
- Status = WinNtUgaDestructor (Private);
- if (EFI_ERROR (Status)) {
- return EFI_DEVICE_ERROR;
- }
-
- gBS->CloseProtocol (
- Handle,
- &gEfiWinNtIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
-
- //
- // Free our instance data
- //
- FreeUnicodeStringTable (Private->ControllerNameTable);
-
- FreePool (Private);
-
- }
-
- return Status;
-}
-
-UINTN
-Atoi (
- CHAR16 *String
- )
-/*++
-
-Routine Description:
-
- Convert a unicode string to a UINTN
-
-Arguments:
-
- String - Unicode string.
-
-Returns:
-
- UINTN of the number represented by String.
-
---*/
-{
- UINTN Number;
- CHAR16 *Str;
-
- //
- // skip preceeding white space
- //
- Str = String;
- while ((*Str) && (*Str == ' ' || *Str == '"')) {
- Str++;
- }
-
- //
- // Convert ot a Number
- //
- Number = 0;
- while (*Str != '\0') {
- if ((*Str >= '0') && (*Str <= '9')) {
- Number = (Number * 10) +*Str - '0';
- } else {
- break;
- }
-
- Str++;
- }
-
- return Number;
-}
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaInput.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaInput.c
deleted file mode 100644
index 2c715c663d..0000000000
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaInput.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/*++
-
-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:
-
- WinNtUgaInput.c
-
-Abstract:
-
- This file produces the Simple Text In for an Uga window.
-
- This stuff is linked at the hip to the Window, since the window
- processing is done in a thread kicked off in WinNtUgaImplementation.c
-
- Since the window information is processed in an other thread we need
- a keyboard Queue to pass data about. The Simple Text In code just
- takes data off the Queue. The WinProc message loop takes keyboard input
- and places it in the Queue.
-
---*/
-
-#include "WinNtUga.h"
-
-EFI_STATUS
-UgaPrivateCreateQ (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- Private->WinNtThunk->InitializeCriticalSection (&Private->QCriticalSection);
-
- Private->Queue.Front = 0;
- Private->Queue.Rear = MAX_Q - 1;
- Private->Queue.Count = 0;
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UgaPrivateDestroyQ (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- Private->Queue.Count = 0;
- Private->WinNtThunk->DeleteCriticalSection (&Private->QCriticalSection);
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UgaPrivateAddQ (
- IN UGA_PRIVATE_DATA *Private,
- IN EFI_INPUT_KEY Key
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
- Key - TODO: add argument description
-
-Returns:
-
- EFI_NOT_READY - TODO: Add description for return value
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- Private->WinNtThunk->EnterCriticalSection (&Private->QCriticalSection);
-
- if (Private->Queue.Count == MAX_Q) {
- Private->WinNtThunk->LeaveCriticalSection (&Private->QCriticalSection);
- return EFI_NOT_READY;
- }
-
- Private->Queue.Rear = (Private->Queue.Rear + 1) % MAX_Q;
- Private->Queue.Q[Private->Queue.Rear] = Key;
- Private->Queue.Count++;
-
- Private->WinNtThunk->LeaveCriticalSection (&Private->QCriticalSection);
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UgaPrivateDeleteQ (
- IN UGA_PRIVATE_DATA *Private,
- OUT EFI_INPUT_KEY *Key
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
- Key - TODO: add argument description
-
-Returns:
-
- EFI_NOT_READY - TODO: Add description for return value
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- Private->WinNtThunk->EnterCriticalSection (&Private->QCriticalSection);
-
- if (Private->Queue.Count == 0) {
- Private->WinNtThunk->LeaveCriticalSection (&Private->QCriticalSection);
- return EFI_NOT_READY;
- }
-
- *Key = Private->Queue.Q[Private->Queue.Front];
- Private->Queue.Front = (Private->Queue.Front + 1) % MAX_Q;
- Private->Queue.Count--;
-
- Private->WinNtThunk->LeaveCriticalSection (&Private->QCriticalSection);
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-UgaPrivateCheckQ (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- EFI_NOT_READY - TODO: Add description for return value
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- if (Private->Queue.Count == 0) {
- return EFI_NOT_READY;
- }
-
- return EFI_SUCCESS;
-}
-
-//
-// Simple Text In implementation.
-//
-
-EFI_STATUS
-EFIAPI
-WinNtUgaSimpleTextInReset (
- IN EFI_SIMPLE_TEXT_IN_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
-
---*/
-{
- UGA_PRIVATE_DATA *Private;
- EFI_INPUT_KEY Key;
- EFI_TPL OldTpl;
-
- Private = UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
-
- //
- // Enter critical section
- //
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
-
- //
- // A reset is draining the Queue
- //
- while (UgaPrivateDeleteQ (Private, &Key) == EFI_SUCCESS)
- ;
-
- //
- // Leave critical section and return
- //
- gBS->RestoreTPL (OldTpl);
- return EFI_SUCCESS;
-}
-
-STATIC
-EFI_STATUS
-EFIAPI
-WinNtUgaSimpleTextInReadKeyStroke (
- IN EFI_SIMPLE_TEXT_IN_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
-
---*/
-{
- UGA_PRIVATE_DATA *Private;
- EFI_STATUS Status;
- EFI_TPL OldTpl;
-
- Private = UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
-
- //
- // Enter critical section
- //
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
-
- Status = UgaPrivateCheckQ (Private);
- if (!EFI_ERROR (Status)) {
- //
- // If a Key press exists try and read it.
- //
- Status = UgaPrivateDeleteQ (Private, Key);
- }
-
- //
- // Leave critical section and return
- //
- gBS->RestoreTPL (OldTpl);
-
- return Status;
-}
-
-STATIC
-VOID
-EFIAPI
-WinNtUgaSimpleTextInWaitForKey (
- 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
-
---*/
-{
- UGA_PRIVATE_DATA *Private;
- EFI_STATUS Status;
- EFI_TPL OldTpl;
-
- Private = (UGA_PRIVATE_DATA *) Context;
-
- //
- // Enter critical section
- //
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
-
- Status = UgaPrivateCheckQ (Private);
- if (!EFI_ERROR (Status)) {
- //
- // If a there is a key in the queue signal our event.
- //
- gBS->SignalEvent (Event);
- } else {
- //
- // We need to sleep or NT will schedule this thread with such high
- // priority that WinProc thread will never run and we will not see
- // keyboard input. This Sleep makes the syste run 10x faster, so don't
- // remove it.
- //
- Private->WinNtThunk->Sleep (1);
- }
-
- //
- // Leave critical section and return
- //
- gBS->RestoreTPL (OldTpl);
-}
-
-EFI_STATUS
-WinNtUgaInitializeSimpleTextInForWindow (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- EFI_STATUS Status;
-
- UgaPrivateCreateQ (Private);
-
- //
- // Initialize Simple Text In protoocol
- //
- Private->SimpleTextIn.Reset = WinNtUgaSimpleTextInReset;
- Private->SimpleTextIn.ReadKeyStroke = WinNtUgaSimpleTextInReadKeyStroke;
-
- Status = gBS->CreateEvent (
- EVT_NOTIFY_WAIT,
- TPL_NOTIFY,
- WinNtUgaSimpleTextInWaitForKey,
- Private,
- &Private->SimpleTextIn.WaitForKey
- );
-
- return Status;
-}
-
-EFI_STATUS
-WinNtUgaDestroySimpleTextInForWindow (
- IN UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - TODO: Add description for return value
-
---*/
-{
- UgaPrivateDestroyQ (Private);
- return EFI_SUCCESS;
-}
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaScreen.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaScreen.c
deleted file mode 100644
index ebaf0b3a80..0000000000
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaScreen.c
+++ /dev/null
@@ -1,990 +0,0 @@
-/*++
-
-Copyright (c) 2006 - 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- WinNtUgaScreen.c
-
-Abstract:
-
- This file produces the graphics abstration of UGA. It is called by
- WinNtUgaDriver.c file which deals with the EFI 1.1 driver model.
- This file just does graphics.
-
---*/
-
-#include "WinNtUga.h"
-
-EFI_WIN_NT_THUNK_PROTOCOL *mWinNt;
-DWORD mTlsIndex = TLS_OUT_OF_INDEXES;
-DWORD mTlsIndexUseCount = 0; // lets us know when we can free mTlsIndex.
-static EFI_EVENT mUgaScreenExitBootServicesEvent;
-
-EFI_STATUS
-WinNtUgaStartWindow (
- IN UGA_PRIVATE_DATA *Private,
- IN UINT32 HorizontalResolution,
- IN UINT32 VerticalResolution,
- IN UINT32 ColorDepth,
- IN UINT32 RefreshRate
- );
-
-STATIC
-VOID
-EFIAPI
-KillNtUgaThread (
- IN EFI_EVENT Event,
- IN VOID *Context
- );
-
-//
-// UGA Protocol Member Functions
-//
-
-EFI_STATUS
-EFIAPI
-WinNtUgaGetMode (
- EFI_UGA_DRAW_PROTOCOL *This,
- UINT32 *HorizontalResolution,
- UINT32 *VerticalResolution,
- UINT32 *ColorDepth,
- UINT32 *RefreshRate
- )
-/*++
-
- Routine Description:
- Return the current video mode information.
-
- Arguments:
- This - Protocol instance pointer.
- HorizontalResolution - Current video horizontal resolution in pixels
- VerticalResolution - Current video Vertical resolution in pixels
- ColorDepth - Current video color depth in bits per pixel
- RefreshRate - Current video refresh rate in Hz.
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
- EFI_INVALID_PARAMETER - One of the input args was NULL.
-
---*/
-// TODO: ADD IN/OUT description here
-{
- UGA_PRIVATE_DATA *Private;
-
- Private = UGA_DRAW_PRIVATE_DATA_FROM_THIS (This);
-
- if (Private->HardwareNeedsStarting) {
- return EFI_NOT_STARTED;
- }
-
- if ((HorizontalResolution == NULL) ||
- (VerticalResolution == NULL) ||
- (ColorDepth == NULL) ||
- (RefreshRate == NULL)) {
- return EFI_INVALID_PARAMETER;
- }
-
- *HorizontalResolution = Private->HorizontalResolution;
- *VerticalResolution = Private->VerticalResolution;
- *ColorDepth = Private->ColorDepth;
- *RefreshRate = Private->RefreshRate;
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-WinNtUgaSetMode (
- EFI_UGA_DRAW_PROTOCOL *This,
- UINT32 HorizontalResolution,
- UINT32 VerticalResolution,
- UINT32 ColorDepth,
- UINT32 RefreshRate
- )
-/*++
-
- Routine Description:
- Return the current video mode information.
-
- Arguments:
- This - Protocol instance pointer.
- HorizontalResolution - Current video horizontal resolution in pixels
- VerticalResolution - Current video Vertical resolution in pixels
- ColorDepth - Current video color depth in bits per pixel
- RefreshRate - Current video refresh rate in Hz.
-
- Returns:
- EFI_SUCCESS - Mode information returned.
- EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
- EFI_INVALID_PARAMETER - One of the input args was NULL.
-
---*/
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
-// TODO: ADD IN/OUT description here
-{
- EFI_STATUS Status;
- UGA_PRIVATE_DATA *Private;
- EFI_UGA_PIXEL Fill;
- EFI_UGA_PIXEL *NewFillLine;
- RECT Rect;
- UINTN Size;
- UINTN Width;
- UINTN Height;
-
- Private = UGA_DRAW_PRIVATE_DATA_FROM_THIS (This);
-
- if (Private->HardwareNeedsStarting) {
- Status = WinNtUgaStartWindow (
- Private,
- HorizontalResolution,
- VerticalResolution,
- ColorDepth,
- RefreshRate
- );
- if (EFI_ERROR (Status)) {
- return EFI_DEVICE_ERROR;
- }
-
- Private->HardwareNeedsStarting = FALSE;
- } else {
- //
- // Change the resolution and resize of the window
- //
-
- //
- // Free the old buffer. We do not save the content of the old buffer since the
- // screen is to be cleared anyway. Clearing the screen is required by the EFI spec.
- // See EFI spec chepter 10.5-EFI_UGA_DRAW_PROTOCOL.SetMode()
- //
- Private->WinNtThunk->HeapFree (Private->WinNtThunk->GetProcessHeap (), 0, Private->VirtualScreenInfo);
-
- //
- // Allocate DIB frame buffer directly from NT for performance enhancement
- // This buffer is the virtual screen/frame buffer. This buffer is not the
- // same a a frame buffer. The first row of this buffer will be the bottom
- // line of the image. This is an artifact of the way we draw to the screen.
- //
- Size = HorizontalResolution * VerticalResolution * sizeof (RGBQUAD) + sizeof (BITMAPV4HEADER);
- Private->VirtualScreenInfo = Private->WinNtThunk->HeapAlloc (
- Private->WinNtThunk->GetProcessHeap (),
- HEAP_ZERO_MEMORY,
- Size
- );
-
- //
- // Update the virtual screen info data structure
- //
- Private->VirtualScreenInfo->bV4Size = sizeof (BITMAPV4HEADER);
- Private->VirtualScreenInfo->bV4Width = HorizontalResolution;
- Private->VirtualScreenInfo->bV4Height = VerticalResolution;
- Private->VirtualScreenInfo->bV4Planes = 1;
- Private->VirtualScreenInfo->bV4BitCount = 32;
- //
- // uncompressed
- //
- Private->VirtualScreenInfo->bV4V4Compression = BI_RGB;
-
- //
- // The rest of the allocated memory block is the virtual screen buffer
- //
- Private->VirtualScreen = (RGBQUAD *) (Private->VirtualScreenInfo + 1);
-
- //
- // Use the AdjuctWindowRect fuction to calculate the real width and height
- // of the new window including the border and caption
- //
- Rect.left = 0;
- Rect.top = 0;
- Rect.right = HorizontalResolution;
- Rect.bottom = VerticalResolution;
-
- Private->WinNtThunk->AdjustWindowRect (&Rect, WS_OVERLAPPEDWINDOW, 0);
-
- Width = Rect.right - Rect.left;
- Height = Rect.bottom - Rect.top;
-
- //
- // Retrieve the original window position information
- //
- Private->WinNtThunk->GetWindowRect (Private->WindowHandle, &Rect);
-
- //
- // Adjust the window size
- //
- Private->WinNtThunk->MoveWindow (Private->WindowHandle, Rect.left, Rect.top, Width, Height, TRUE);
-
- }
-
- NewFillLine = AllocatePool (sizeof (EFI_UGA_PIXEL) * HorizontalResolution);
- if (NewFillLine == NULL) {
- return EFI_DEVICE_ERROR;
- }
-
- if (Private->FillLine != NULL) {
- FreePool (Private->FillLine);
- }
-
- Private->FillLine = NewFillLine;
-
- Private->HorizontalResolution = HorizontalResolution;
- Private->VerticalResolution = VerticalResolution;
- Private->ColorDepth = ColorDepth;
- Private->RefreshRate = RefreshRate;
-
- Fill.Red = 0x00;
- Fill.Green = 0x00;
- Fill.Blue = 0x00;
- This->Blt (
- This,
- &Fill,
- EfiUgaVideoFill,
- 0,
- 0,
- 0,
- 0,
- HorizontalResolution,
- VerticalResolution,
- HorizontalResolution * sizeof (EFI_UGA_PIXEL)
- );
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-WinNtUgaBlt (
- 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
- )
-/*++
-
- Routine Description:
- Blt pixels from the rectangle (Width X Height) formed by the BltBuffer
- onto the graphics screen starting a location (X, Y). (0, 0) is defined as
- the upper left hand side of the screen. (X, Y) can be outside of the
- current screen geometry and the BltBuffer will be cliped when it is
- displayed. X and Y can be negative or positive. If Width or Height is
- bigger than the current video screen the image will be clipped.
-
- Arguments:
- This - Protocol instance pointer.
- X - X location on graphics screen.
- Y - Y location on the graphics screen.
- Width - Width of BltBuffer.
- Height - Hight of BltBuffer
- BltOperation - Operation to perform on BltBuffer and video memory
- BltBuffer - Buffer containing data to blt into video buffer. This
- buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
- SourceX - If the BltOperation is a EfiCopyBlt this is the source
- of the copy. For other BLT operations this argument is not
- used.
- SourceX - If the BltOperation is a EfiCopyBlt this is the source
- of the copy. For other BLT operations this argument is not
- used.
-
- Returns:
- EFI_SUCCESS - The palette is updated with PaletteArray.
- EFI_INVALID_PARAMETER - BltOperation is not valid.
- EFI_DEVICE_ERROR - A hardware error occured writting to the video
- buffer.
-
---*/
-// TODO: SourceY - add argument and description to function comment
-// TODO: DestinationX - add argument and description to function comment
-// TODO: DestinationY - add argument and description to function comment
-// TODO: Delta - add argument and description to function comment
-{
- UGA_PRIVATE_DATA *Private;
- EFI_TPL OriginalTPL;
- UINTN DstY;
- UINTN SrcY;
- RGBQUAD *VScreen;
- RGBQUAD *VScreenSrc;
- EFI_UGA_PIXEL *Blt;
- UINTN Index;
- RECT Rect;
- EFI_UGA_PIXEL *FillPixel;
-
- Private = UGA_DRAW_PRIVATE_DATA_FROM_THIS (This);
-
- if ((BltOperation < 0) || (BltOperation >= EfiUgaBltMax)) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (Width == 0 || Height == 0) {
- return EFI_INVALID_PARAMETER;
- }
- //
- // If Delta is zero, then the entire BltBuffer is being used, so Delta
- // is the number of bytes in each row of BltBuffer. Since BltBuffer is Width pixels size,
- // the number of bytes in each row can be computed.
- //
- if (Delta == 0) {
- Delta = Width * sizeof (EFI_UGA_PIXEL);
- }
-
- //
- // We need to fill the Virtual Screen buffer with the blt data.
- // The virtual screen is upside down, as the first row is the bootom row of
- // the image.
- //
-
- if (BltOperation == EfiUgaVideoToBltBuffer) {
-
- //
- // Video to BltBuffer: Source is Video, destination is BltBuffer
- //
- if (SourceY + Height > Private->VerticalResolution) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (SourceX + Width > Private->HorizontalResolution) {
- return EFI_INVALID_PARAMETER;
- }
- //
- // We have to raise to TPL Notify, so we make an atomic write the frame buffer.
- // We would not want a timer based event (Cursor, ...) to come in while we are
- // doing this operation.
- //
- OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
-
- for (SrcY = SourceY, DstY = DestinationY; DstY < (Height + DestinationY); SrcY++, DstY++) {
- Blt = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + (DstY * Delta) + DestinationX * sizeof (EFI_UGA_PIXEL));
- VScreen = &Private->VirtualScreen[(Private->VerticalResolution - SrcY - 1) * Private->HorizontalResolution + SourceX];
- CopyMem (Blt, VScreen, sizeof (EFI_UGA_PIXEL) * Width);
- }
- } else {
- //
- // BltBuffer to Video: Source is BltBuffer, destination is Video
- //
- if (DestinationY + Height > Private->VerticalResolution) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (DestinationX + Width > Private->HorizontalResolution) {
- return EFI_INVALID_PARAMETER;
- }
-
- //
- // We have to raise to TPL Notify, so we make an atomic write the frame buffer.
- // We would not want a timer based event (Cursor, ...) to come in while we are
- // doing this operation.
- //
- OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
-
- if (BltOperation == EfiUgaVideoFill) {
- FillPixel = BltBuffer;
- for (Index = 0; Index < Width; Index++) {
- Private->FillLine[Index] = *FillPixel;
- }
- }
-
- for (Index = 0; Index < Height; Index++) {
- if (DestinationY <= SourceY) {
- SrcY = SourceY + Index;
- DstY = DestinationY + Index;
- } else {
- SrcY = SourceY + Height - Index - 1;
- DstY = DestinationY + Height - Index - 1;
- }
-
- VScreen = &Private->VirtualScreen[(Private->VerticalResolution - DstY - 1) * Private->HorizontalResolution + DestinationX];
- switch (BltOperation) {
- case EfiUgaBltBufferToVideo:
- Blt = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + (SrcY * Delta) + SourceX * sizeof (EFI_UGA_PIXEL));
- CopyMem (VScreen, Blt, Width * sizeof (EFI_UGA_PIXEL));
- break;
-
- case EfiUgaVideoToVideo:
- VScreenSrc = &Private->VirtualScreen[(Private->VerticalResolution - SrcY - 1) * Private->HorizontalResolution + SourceX];
- CopyMem (VScreen, VScreenSrc, Width * sizeof (EFI_UGA_PIXEL));
- break;
-
- case EfiUgaVideoFill:
- CopyMem (VScreen, Private->FillLine, Width * sizeof (EFI_UGA_PIXEL));
- break;
- }
- }
- }
-
- if (BltOperation != EfiUgaVideoToBltBuffer) {
- //
- // Mark the area we just blted as Invalid so WM_PAINT will update.
- //
- Rect.left = DestinationX;
- Rect.top = DestinationY;
- Rect.right = DestinationX + Width;
- Rect.bottom = DestinationY + Height;
- Private->WinNtThunk->InvalidateRect (Private->WindowHandle, &Rect, FALSE);
-
- //
- // Send the WM_PAINT message to the thread that is drawing the window. We
- // are in the main thread and the window drawing is in a child thread.
- // There is a child thread per window. We have no CriticalSection or Mutex
- // since we write the data and the other thread displays the data. While
- // we may miss some data for a short period of time this is no different than
- // a write combining on writes to a frame buffer.
- //
-
- Private->WinNtThunk->UpdateWindow (Private->WindowHandle);
- }
-
- gBS->RestoreTPL (OriginalTPL);
-
- return EFI_SUCCESS;
-}
-
-
-//
-// Construction and Destruction functions
-//
-
-EFI_STATUS
-WinNtUgaSupported (
- IN EFI_WIN_NT_IO_PROTOCOL *WinNtIo
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: WinNtIo - add argument and description to function comment
-// TODO: EFI_UNSUPPORTED - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-{
- //
- // Check to see if the IO abstraction represents a device type we support.
- //
- // This would be replaced a check of PCI subsystem ID, etc.
- //
- if (!CompareGuid (WinNtIo->TypeGuid, &gEfiWinNtUgaGuid)) {
- return EFI_UNSUPPORTED;
- }
-
- return EFI_SUCCESS;
-}
-
-LRESULT
-CALLBACK
-WinNtUgaThreadWindowProc (
- IN HWND hwnd,
- IN UINT iMsg,
- IN WPARAM wParam,
- IN LPARAM lParam
- )
-/*++
-
-Routine Description:
- Win32 Windows event handler.
-
-Arguments:
- See Win32 Book
-
-Returns:
- See Win32 Book
-
---*/
-// TODO: hwnd - add argument and description to function comment
-// TODO: iMsg - add argument and description to function comment
-// TODO: wParam - add argument and description to function comment
-// TODO: lParam - add argument and description to function comment
-{
- UGA_PRIVATE_DATA *Private;
- UINTN Size;
- HDC Handle;
- PAINTSTRUCT PaintStruct;
- LPARAM Index;
- EFI_INPUT_KEY Key;
-
- //
- // BugBug - if there are two instances of this DLL in memory (such as is
- // the case for ERM), the correct instance of this function may not be called.
- // This also means that the address of the mTlsIndex value will be wrong, and
- // the value may be wrong too.
- //
-
-
- //
- // Use mTlsIndex global to get a Thread Local Storage version of Private.
- // This works since each Uga protocol has a unique Private data instance and
- // a unique thread.
- //
- Private = mWinNt->TlsGetValue (mTlsIndex);
- ASSERT (NULL != Private);
-
- switch (iMsg) {
- case WM_CREATE:
- Size = Private->HorizontalResolution * Private->VerticalResolution * sizeof (RGBQUAD);
-
- //
- // Allocate DIB frame buffer directly from NT for performance enhancement
- // This buffer is the virtual screen/frame buffer. This buffer is not the
- // same a a frame buffer. The first fow of this buffer will be the bottom
- // line of the image. This is an artifact of the way we draw to the screen.
- //
- Private->VirtualScreenInfo = Private->WinNtThunk->HeapAlloc (
- Private->WinNtThunk->GetProcessHeap (),
- HEAP_ZERO_MEMORY,
- Size
- );
-
- Private->VirtualScreenInfo->bV4Size = sizeof (BITMAPV4HEADER);
- Private->VirtualScreenInfo->bV4Width = Private->HorizontalResolution;
- Private->VirtualScreenInfo->bV4Height = Private->VerticalResolution;
- Private->VirtualScreenInfo->bV4Planes = 1;
- Private->VirtualScreenInfo->bV4BitCount = 32;
- //
- // uncompressed
- //
- Private->VirtualScreenInfo->bV4V4Compression = BI_RGB;
- Private->VirtualScreen = (RGBQUAD *) (Private->VirtualScreenInfo + 1);
- return 0;
-
- case WM_PAINT:
- //
- // I have not found a way to convert hwnd into a Private context. So for
- // now we use this API to convert hwnd to Private data.
- //
-
- Handle = mWinNt->BeginPaint (hwnd, &PaintStruct);
-
- mWinNt->SetDIBitsToDevice (
- Handle, // Destination Device Context
- 0, // Destination X - 0
- 0, // Destination Y - 0
- Private->HorizontalResolution, // Width
- Private->VerticalResolution, // Height
- 0, // Source X
- 0, // Source Y
- 0, // DIB Start Scan Line
- Private->VerticalResolution, // Number of scan lines
- Private->VirtualScreen, // Address of array of DIB bits
- (BITMAPINFO *) Private->VirtualScreenInfo, // Address of structure with bitmap info
- DIB_RGB_COLORS // RGB or palette indexes
- );
-
- mWinNt->EndPaint (hwnd, &PaintStruct);
- return 0;
-
- //
- // F10 and the ALT key do not create a WM_KEYDOWN message, thus this special case
- //
- case WM_SYSKEYDOWN:
- Key.ScanCode = 0;
- switch (wParam) {
- case VK_F10:
- Key.ScanCode = SCAN_F10;
- Key.UnicodeChar = 0;
- UgaPrivateAddQ (Private, Key);
- return 0;
- }
- break;
-
- case WM_KEYDOWN:
- Key.ScanCode = 0;
- switch (wParam) {
- case VK_HOME: Key.ScanCode = SCAN_HOME; break;
- case VK_END: Key.ScanCode = SCAN_END; break;
- case VK_LEFT: Key.ScanCode = SCAN_LEFT; break;
- case VK_RIGHT: Key.ScanCode = SCAN_RIGHT; break;
- case VK_UP: Key.ScanCode = SCAN_UP; break;
- case VK_DOWN: Key.ScanCode = SCAN_DOWN; break;
- case VK_DELETE: Key.ScanCode = SCAN_DELETE; break;
- case VK_INSERT: Key.ScanCode = SCAN_INSERT; break;
- case VK_PRIOR: Key.ScanCode = SCAN_PAGE_UP; break;
- case VK_NEXT: Key.ScanCode = SCAN_PAGE_DOWN; break;
- case VK_ESCAPE: Key.ScanCode = SCAN_ESC; break;
-
- case VK_F1: Key.ScanCode = SCAN_F1; break;
- case VK_F2: Key.ScanCode = SCAN_F2; break;
- case VK_F3: Key.ScanCode = SCAN_F3; break;
- case VK_F4: Key.ScanCode = SCAN_F4; break;
- case VK_F5: Key.ScanCode = SCAN_F5; break;
- case VK_F6: Key.ScanCode = SCAN_F6; break;
- case VK_F7: Key.ScanCode = SCAN_F7; break;
- case VK_F8: Key.ScanCode = SCAN_F8; break;
- case VK_F9: Key.ScanCode = SCAN_F9; break;
- case VK_F11: Key.ScanCode = SCAN_F11; break;
- case VK_F12: Key.ScanCode = SCAN_F12; break;
- }
-
- if (Key.ScanCode != 0) {
- Key.UnicodeChar = 0;
- UgaPrivateAddQ (Private, Key);
- }
-
- return 0;
-
- case WM_CHAR:
- //
- // The ESC key also generate WM_CHAR.
- //
- if (wParam == 0x1B) {
- return 0;
- }
-
- for (Index = 0; Index < (lParam & 0xffff); Index++) {
- if (wParam != 0) {
- Key.UnicodeChar = (CHAR16) wParam;
- Key.ScanCode = 0;
- UgaPrivateAddQ (Private, Key);
- }
- }
-
- return 0;
-
- case WM_CLOSE:
- //
- // This close message is issued by user, core is not aware of this,
- // so don't release the window display resource, just hide the window.
- //
- Private->WinNtThunk->ShowWindow (Private->WindowHandle, SW_HIDE);
- return 0;
-
- case WM_DESTROY:
- mWinNt->DestroyWindow (hwnd);
- mWinNt->PostQuitMessage (0);
-
- mWinNt->HeapFree (Private->WinNtThunk->GetProcessHeap (), 0, Private->VirtualScreenInfo);
-
- mWinNt->ExitThread (0);
- return 0;
-
- default:
- break;
- };
-
- return mWinNt->DefWindowProc (hwnd, iMsg, wParam, lParam);
-}
-
-DWORD
-WINAPI
-WinNtUgaThreadWinMain (
- LPVOID lpParameter
- )
-/*++
-
-Routine Description:
-
- This thread simulates the end of WinMain () aplication. Each Winow nededs
- to process it's events. The messages are dispatched to
- WinNtUgaThreadWindowProc ().
-
- Be very careful sine WinNtUgaThreadWinMain () and WinNtUgaThreadWindowProc ()
- are running in a seperate thread. We have to do this to process the events.
-
-Arguments:
-
- lpParameter - Handle of window to manage.
-
-Returns:
-
- if a WM_QUIT message is returned exit.
-
---*/
-{
- MSG Message;
- UGA_PRIVATE_DATA *Private;
- ATOM Atom;
- RECT Rect;
-
- Private = (UGA_PRIVATE_DATA *) lpParameter;
- ASSERT (NULL != Private);
-
- //
- // Since each thread has unique private data, save the private data in Thread
- // Local Storage slot. Then the shared global mTlsIndex can be used to get
- // thread specific context.
- //
- Private->WinNtThunk->TlsSetValue (mTlsIndex, Private);
-
- Private->ThreadId = Private->WinNtThunk->GetCurrentThreadId ();
-
- Private->WindowsClass.cbSize = sizeof (WNDCLASSEX);
- Private->WindowsClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
- Private->WindowsClass.lpfnWndProc = WinNtUgaThreadWindowProc;
- Private->WindowsClass.cbClsExtra = 0;
- Private->WindowsClass.cbWndExtra = 0;
- Private->WindowsClass.hInstance = NULL;
- Private->WindowsClass.hIcon = Private->WinNtThunk->LoadIcon (NULL, IDI_APPLICATION);
- Private->WindowsClass.hCursor = Private->WinNtThunk->LoadCursor (NULL, IDC_ARROW);
- Private->WindowsClass.hbrBackground = (HBRUSH) COLOR_WINDOW;
- Private->WindowsClass.lpszMenuName = NULL;
- Private->WindowsClass.lpszClassName = WIN_NT_UGA_CLASS_NAME;
- Private->WindowsClass.hIconSm = Private->WinNtThunk->LoadIcon (NULL, IDI_APPLICATION);
-
- //
- // This call will fail after the first time, but thats O.K. since we only need
- // WIN_NT_UGA_CLASS_NAME to exist to create the window.
- //
- // Note: Multiple instances of this DLL will use the same instance of this
- // Class, including the callback function, unless the Class is unregistered and
- // successfully registered again.
- //
- Atom = Private->WinNtThunk->RegisterClassEx (&Private->WindowsClass);
-
- //
- // Setting Rect values to allow for the AdjustWindowRect to provide
- // us the correct sizes for the client area when doing the CreateWindowEx
- //
- Rect.top = 0;
- Rect.bottom = Private->VerticalResolution;
- Rect.left = 0;
- Rect.right = Private->HorizontalResolution;
-
- Private->WinNtThunk->AdjustWindowRect (&Rect, WS_OVERLAPPEDWINDOW, 0);
-
- Private->WindowHandle = Private->WinNtThunk->CreateWindowEx (
- 0,
- WIN_NT_UGA_CLASS_NAME,
- Private->WindowName,
- WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- Rect.right - Rect.left,
- Rect.bottom - Rect.top,
- NULL,
- NULL,
- NULL,
- &Private
- );
-
- //
- // The reset of this thread is the standard winows program. We need a sperate
- // thread since we must process the message loop to make windows act like
- // windows.
- //
-
- Private->WinNtThunk->ShowWindow (Private->WindowHandle, SW_SHOW);
- Private->WinNtThunk->UpdateWindow (Private->WindowHandle);
-
- //
- // Let the main thread get some work done
- //
- Private->WinNtThunk->ReleaseSemaphore (Private->ThreadInited, 1, NULL);
-
- //
- // This is the message loop that all Windows programs need.
- //
- while (Private->WinNtThunk->GetMessage (&Message, Private->WindowHandle, 0, 0)) {
- Private->WinNtThunk->TranslateMessage (&Message);
- Private->WinNtThunk->DispatchMessage (&Message);
- }
-
- return Message.wParam;
-}
-
-EFI_STATUS
-WinNtUgaStartWindow (
- IN UGA_PRIVATE_DATA *Private,
- IN UINT32 HorizontalResolution,
- IN UINT32 VerticalResolution,
- IN UINT32 ColorDepth,
- IN UINT32 RefreshRate
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- Private - TODO: add argument description
- HorizontalResolution - TODO: add argument description
- VerticalResolution - TODO: add argument description
- ColorDepth - TODO: add argument description
- RefreshRate - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-{
- EFI_STATUS Status;
- DWORD NewThreadId;
-
-
- mWinNt = Private->WinNtThunk;
-
- //
- // Initialize a Thread Local Storge variable slot. We use TLS to get the
- // correct Private data instance into the windows thread.
- //
- if (mTlsIndex == TLS_OUT_OF_INDEXES) {
- ASSERT (0 == mTlsIndexUseCount);
- mTlsIndex = Private->WinNtThunk->TlsAlloc ();
- }
-
- //
- // always increase the use count!
- //
- mTlsIndexUseCount++;
-
- Private->HorizontalResolution = HorizontalResolution;
- Private->VerticalResolution = VerticalResolution;
-
- //
- // Register to be notified on exit boot services so we can destroy the window.
- //
- Status = gBS->CreateEvent (
- EVT_SIGNAL_EXIT_BOOT_SERVICES,
- TPL_CALLBACK,
- KillNtUgaThread,
- Private,
- &mUgaScreenExitBootServicesEvent
- );
-
- Private->ThreadInited = Private->WinNtThunk->CreateSemaphore (NULL, 0, 1, NULL);
- Private->ThreadHandle = Private->WinNtThunk->CreateThread (
- NULL,
- 0,
- WinNtUgaThreadWinMain,
- (VOID *) Private,
- 0,
- &NewThreadId
- );
-
- //
- // The other thread has entered the windows message loop so we can
- // continue our initialization.
- //
- Private->WinNtThunk->WaitForSingleObject (Private->ThreadInited, INFINITE);
- Private->WinNtThunk->CloseHandle (Private->ThreadInited);
-
- return Status;
-}
-
-EFI_STATUS
-WinNtUgaConstructor (
- UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: Private - add argument and description to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-{
-
- Private->UgaDraw.GetMode = WinNtUgaGetMode;
- Private->UgaDraw.SetMode = WinNtUgaSetMode;
- Private->UgaDraw.Blt = WinNtUgaBlt;
-
- Private->HardwareNeedsStarting = TRUE;
- Private->FillLine = NULL;
-
- WinNtUgaInitializeSimpleTextInForWindow (Private);
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-WinNtUgaDestructor (
- UGA_PRIVATE_DATA *Private
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: Private - add argument and description to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-{
- UINT32 UnregisterReturn;
-
- if (!Private->HardwareNeedsStarting) {
- //
- // BugBug: Shutdown Uga Hardware and any child devices.
- //
- Private->WinNtThunk->SendMessage (Private->WindowHandle, WM_DESTROY, 0, 0);
- Private->WinNtThunk->CloseHandle (Private->ThreadHandle);
-
- mTlsIndexUseCount--;
-
- //
- // The callback function for another window could still be called,
- // so we need to make sure there are no more users of mTlsIndex.
- //
- if (0 == mTlsIndexUseCount) {
- ASSERT (TLS_OUT_OF_INDEXES != mTlsIndex);
-
- Private->WinNtThunk->TlsFree (mTlsIndex);
- mTlsIndex = TLS_OUT_OF_INDEXES;
-
- UnregisterReturn = Private->WinNtThunk->UnregisterClass (
- Private->WindowsClass.lpszClassName,
- Private->WindowsClass.hInstance
- );
- }
-
- WinNtUgaDestroySimpleTextInForWindow (Private);
- }
-
- return EFI_SUCCESS;
-}
-
-STATIC
-VOID
-EFIAPI
-KillNtUgaThread (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
-
- This is the UGA screen's callback notification function for exit-boot-services.
- All we do here is call WinNtUgaDestructor().
-
-Arguments:
-
- Event - not used
- Context - pointer to the Private structure.
-
-Returns:
-
- None.
-
---*/
-{
- EFI_STATUS Status;
- Status = WinNtUgaDestructor (Context);
-}