Module clean up.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3798 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-09-12 05:41:53 +00:00
parent 5182bf8ec8
commit 67996c4197
3 changed files with 54 additions and 80 deletions

View File

@ -1,39 +0,0 @@
/**@file
Common header file shared by all source files.
This file includes package header files, library classes and protocol, PPI & GUID definitions.
Copyright (c) 2006 - 2007, Intel Corporation.
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __COMMON_HEADER_H_
#define __COMMON_HEADER_H_
#include <PiDxe.h>
#include <Protocol/SimpleTextOut.h>
#include <Protocol/OEMBadging.h>
#include <Protocol/ConsoleControl.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/UgaDraw.h>
#include <Protocol/HiiFramework.h>
#include <Guid/Bmp.h>
#include <Library/GraphicsLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#endif

View File

@ -5,21 +5,36 @@
when Tiano graphics format is supported. when Tiano graphics format is supported.
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
//
// Include common header file for this module. #include <PiDxe.h>
//
#include "CommonHeader.h" #include <Protocol/SimpleTextOut.h>
#include <Protocol/OEMBadging.h>
#include <Protocol/ConsoleControl.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/UgaDraw.h>
#include <Protocol/HiiFramework.h>
#include <Guid/Bmp.h>
#include <Library/GraphicsLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
EFI_STATUS EFI_STATUS
GetGraphicsBitMapFromFV ( GetGraphicsBitMapFromFV (
@ -39,15 +54,15 @@ Arguments:
FileNameGuid - File Name of graphics file in the FV(s). FileNameGuid - File Name of graphics file in the FV(s).
Image - Pointer to pointer to return graphics image. If NULL, a Image - Pointer to pointer to return graphics image. If NULL, a
buffer will be allocated. buffer will be allocated.
ImageSize - Size of the graphics Image in bytes. Zero if no image found. ImageSize - Size of the graphics Image in bytes. Zero if no image found.
Returns: Returns:
EFI_SUCCESS - Image and ImageSize are valid. EFI_SUCCESS - Image and ImageSize are valid.
EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
EFI_NOT_FOUND - FileNameGuid not found EFI_NOT_FOUND - FileNameGuid not found
@ -137,9 +152,9 @@ Arguments:
PixelWidth - Width of UgaBlt/BmpImage in pixels PixelWidth - Width of UgaBlt/BmpImage in pixels
Returns: Returns:
EFI_SUCCESS - UgaBlt and UgaBltSize are returned. EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough. EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
UgaBltSize will contain the required size. UgaBltSize will contain the required size.
@ -159,7 +174,7 @@ Returns:
UINTN Width; UINTN Width;
UINTN ImageIndex; UINTN ImageIndex;
BOOLEAN IsAllocated; BOOLEAN IsAllocated;
BmpHeader = (BMP_IMAGE_HEADER *) BmpImage; BmpHeader = (BMP_IMAGE_HEADER *) BmpImage;
if (BmpHeader->CharB != 'B' || BmpHeader->CharM != 'M') { if (BmpHeader->CharB != 'B' || BmpHeader->CharM != 'M') {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
@ -223,7 +238,7 @@ Returns:
Blt --; Blt --;
Width --; Width --;
break; break;
case 4: case 4:
// //
// Convert BMP Palette to 24-bit color // Convert BMP Palette to 24-bit color
@ -288,7 +303,7 @@ LockKeyboards (
/*++ /*++
Routine Description: Routine Description:
Use Console Control Protocol to lock the Console In Spliter virtual handle. Use Console Control Protocol to lock the Console In Spliter virtual handle.
This is the ConInHandle and ConIn handle in the EFI system table. All key This is the ConInHandle and ConIn handle in the EFI system table. All key
presses will be ignored until the Password is typed in. The only way to presses will be ignored until the Password is typed in. The only way to
disable the password is to type it in to a ConIn device. disable the password is to type it in to a ConIn device.
@ -297,7 +312,7 @@ Arguments:
Password - Password used to lock ConIn device Password - Password used to lock ConIn device
Returns: Returns:
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
displayed. displayed.
@ -334,7 +349,7 @@ Arguments:
LogoFile - File name of logo to display on the center of the screen. LogoFile - File name of logo to display on the center of the screen.
Returns: Returns:
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
displayed. displayed.
@ -374,7 +389,7 @@ Returns:
// //
// Try to open GOP first // Try to open GOP first
// //
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput); Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
GraphicsOutput = NULL; GraphicsOutput = NULL;
// //
@ -560,14 +575,14 @@ DisableQuietBoot (
Routine Description: Routine Description:
Use Console Control to turn on UGA based Simple Text Out consoles. The UGA Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
Simple Text Out screens will now be synced up with all non UGA output devices Simple Text Out screens will now be synced up with all non UGA output devices
Arguments: Arguments:
NONE NONE
Returns: Returns:
EFI_SUCCESS - UGA devices are back in text mode and synced up. EFI_SUCCESS - UGA devices are back in text mode and synced up.
EFI_UNSUPPORTED - Logo not found EFI_UNSUPPORTED - Logo not found
@ -626,24 +641,24 @@ Routine Description:
Arguments: Arguments:
GraphicsOutput - Graphics output protocol interface GraphicsOutput - Graphics output protocol interface
UgaDraw - UGA draw protocol interface UgaDraw - UGA draw protocol interface
Sto - Simple text out protocol interface Sto - Simple text out protocol interface
X - X coordinate to start printing X - X coordinate to start printing
Y - Y coordinate to start printing Y - Y coordinate to start printing
Foreground - Foreground color Foreground - Foreground color
Background - Background color Background - Background color
fmt - Format string fmt - Format string
args - Print arguments args - Print arguments
Returns: Returns:
EFI_SUCCESS - success EFI_SUCCESS - success
EFI_OUT_OF_RESOURCES - out of resources EFI_OUT_OF_RESOURCES - out of resources
@ -675,7 +690,7 @@ Returns:
if (Buffer == NULL) { if (Buffer == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
if (GraphicsOutput != NULL) { if (GraphicsOutput != NULL) {
HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution; HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;
VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution; VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;
@ -798,11 +813,11 @@ Routine Description:
Arguments: Arguments:
X - X coordinate to start printing X - X coordinate to start printing
Y - Y coordinate to start printing Y - Y coordinate to start printing
ForeGround - Foreground color ForeGround - Foreground color
BackGround - Background color BackGround - Background color
Fmt - Format string Fmt - Format string

View File

@ -20,7 +20,7 @@
FILE_GUID = 08c1a0e4-1208-47f8-a2c5-f42eabee653a FILE_GUID = 08c1a0e4-1208-47f8-a2c5-f42eabee653a
MODULE_TYPE = DXE_DRIVER MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = GraphicsLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER LIBRARY_CLASS = GraphicsLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
EDK_RELEASE_VERSION = 0x00020000 EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000 EFI_SPECIFICATION_VERSION = 0x00020000
@ -33,8 +33,6 @@
[Sources.common] [Sources.common]
Graphics.c Graphics.c
CommonHeader.h
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec