Fix linux/cygwin build issue.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2088 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2006-12-12 17:19:13 +00:00
parent 9d3fbdbd47
commit 7a2729d4f7
4 changed files with 78 additions and 146 deletions

View File

@ -1,6 +1,7 @@
/*++ /**@file
UGA Splash screen protocol.
Copyright (c) 2006, Intel Corporation
Copyright (c) 2006 Intel Corporation. <BR>
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
@ -9,32 +10,18 @@ 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.
Module Name: **/
UgaSplash.h
Abstract:
UGA Splash screen protocol.
Abstraction of a very simple graphics device.
--*/
#ifndef __UGA_SPLASH_H__ #ifndef __UGA_SPLASH_H__
#define __UGA_SPLASH_H__ #define __UGA_SPLASH_H__
#define EFI_UGA_SPLASH_PROTOCOL_GUID \ #define EFI_UGA_SPLASH_PROTOCOL_GUID \
{ 0xa45b3a0d, 0x2e55, 0x4c03, {0xad, 0x9c, 0x27, 0xd4, 0x82, 0xb, 0x50, 0x7e } } { 0xa45b3a0d, 0x2e55, 0x4c03, {0xad, 0x9c, 0x27, 0xd4, 0x82, 0xb, 0x50, 0x7e } }
typedef struct _EFI_UGA_SPLASH_PROTOCOL EFI_UGA_SPLASH_PROTOCOL;
typedef struct _EFI_UGA_SPLASH_PROTOCOL { typedef struct _EFI_UGA_SPLASH_PROTOCOL {
UINT32 PixelWidth; UINT32 PixelWidth;
UINT32 PixelHeight; UINT32 PixelHeight;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Image; EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Image;
} EFI_UGA_SPLASH_PROTOCOL; } EFI_UGA_SPLASH_PROTOCOL;
extern EFI_GUID gEfiUgaSplashProtocolGuid; extern EFI_GUID gEfiUgaSplashProtocolGuid;

View File

@ -1,20 +1,4 @@
/*++ /**@file
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
ConSplitter.c
Abstract:
Console Splitter Driver. Any Handle that attatched Console Splitter Driver. Any Handle that attatched
EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver. EFI_CONSOLE_IDENTIFIER_PROTOCOL can be bound by this driver.
@ -31,8 +15,17 @@ Abstract:
and Console I/O protocol, will be produced in the driver entry point. and Console I/O protocol, will be produced in the driver entry point.
The virtual handle are added on driver entry and never removed. The virtual handle are added on driver entry and never removed.
Such design ensures sytem function well during none console device situation. Such design ensures sytem function well during none console device situation.
Copyright (c) 2006 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
--*/ **/
#include "ConSplitter.h" #include "ConSplitter.h"
@ -381,7 +374,6 @@ Returns:
return EFI_SUCCESS; return EFI_SUCCESS;
} }
STATIC
EFI_STATUS EFI_STATUS
ConSplitterTextInConstructor ( ConSplitterTextInConstructor (
TEXT_IN_SPLITTER_PRIVATE_DATA *ConInPrivate TEXT_IN_SPLITTER_PRIVATE_DATA *ConInPrivate
@ -457,7 +449,6 @@ Returns:
return Status; return Status;
} }
STATIC
EFI_STATUS EFI_STATUS
ConSplitterTextOutConstructor ( ConSplitterTextOutConstructor (
TEXT_OUT_SPLITTER_PRIVATE_DATA *ConOutPrivate TEXT_OUT_SPLITTER_PRIVATE_DATA *ConOutPrivate
@ -540,7 +531,6 @@ ConSplitterTextOutConstructor (
return Status; return Status;
} }
STATIC
EFI_STATUS EFI_STATUS
ConSplitterSupported ( ConSplitterSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_DRIVER_BINDING_PROTOCOL *This,
@ -607,7 +597,6 @@ Returns:
return EFI_SUCCESS; return EFI_SUCCESS;
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConInDriverBindingSupported ( ConSplitterConInDriverBindingSupported (
@ -638,7 +627,6 @@ Returns:
); );
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterSimplePointerDriverBindingSupported ( ConSplitterSimplePointerDriverBindingSupported (
@ -669,7 +657,6 @@ Returns:
); );
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConOutDriverBindingSupported ( ConSplitterConOutDriverBindingSupported (
@ -700,7 +687,6 @@ Returns:
); );
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStdErrDriverBindingSupported ( ConSplitterStdErrDriverBindingSupported (
@ -731,7 +717,6 @@ Returns:
); );
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStart ( ConSplitterStart (
@ -796,7 +781,6 @@ Returns:
); );
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConInDriverBindingStart ( ConSplitterConInDriverBindingStart (
@ -844,7 +828,6 @@ Returns:
return ConSplitterTextInAddDevice (&mConIn, TextIn); return ConSplitterTextInAddDevice (&mConIn, TextIn);
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterSimplePointerDriverBindingStart ( ConSplitterSimplePointerDriverBindingStart (
@ -887,7 +870,6 @@ Returns:
return ConSplitterSimplePointerAddDevice (&mConIn, SimplePointer); return ConSplitterSimplePointerAddDevice (&mConIn, SimplePointer);
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConOutDriverBindingStart ( ConSplitterConOutDriverBindingStart (
@ -980,7 +962,6 @@ Returns:
return Status; return Status;
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStdErrDriverBindingStart ( ConSplitterStdErrDriverBindingStart (
@ -1045,7 +1026,6 @@ Returns:
return Status; return Status;
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStop ( ConSplitterStop (
@ -1101,7 +1081,6 @@ Returns:
return EFI_SUCCESS; return EFI_SUCCESS;
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConInDriverBindingStop ( ConSplitterConInDriverBindingStop (
@ -1147,7 +1126,6 @@ Returns:
return ConSplitterTextInDeleteDevice (&mConIn, TextIn); return ConSplitterTextInDeleteDevice (&mConIn, TextIn);
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterSimplePointerDriverBindingStop ( ConSplitterSimplePointerDriverBindingStop (
@ -1193,7 +1171,6 @@ Returns:
return ConSplitterSimplePointerDeleteDevice (&mConIn, SimplePointer); return ConSplitterSimplePointerDeleteDevice (&mConIn, SimplePointer);
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConOutDriverBindingStop ( ConSplitterConOutDriverBindingStop (
@ -1240,7 +1217,6 @@ Returns:
return ConSplitterTextOutDeleteDevice (&mConOut, TextOut); return ConSplitterTextOutDeleteDevice (&mConOut, TextOut);
} }
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStdErrDriverBindingStop ( ConSplitterStdErrDriverBindingStop (

View File

@ -1,6 +1,7 @@
/*++ /**@file
Private data structures for the Console Splitter driver
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 Intel Corporation. <BR>
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
@ -9,18 +10,10 @@ 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.
Module Name: **/
ConSplitter.h #ifndef _CON_SPLITER_H_
#define _CON_SPLITER_H_
Abstract:
Private data structures for the Console Splitter driver
--*/
#ifndef SPLITER_H_
#define SPLITER_H_
// //
// Private Data Structures // Private Data Structures
@ -64,18 +57,18 @@ typedef struct {
BOOLEAN InputEventSignalState; BOOLEAN InputEventSignalState;
} TEXT_IN_SPLITTER_PRIVATE_DATA; } TEXT_IN_SPLITTER_PRIVATE_DATA;
#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \ #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
CR (a, \ CR ((a), \
TEXT_IN_SPLITTER_PRIVATE_DATA, \ TEXT_IN_SPLITTER_PRIVATE_DATA, \
TextIn, \ TextIn, \
TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \ TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
) )
#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \ #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
CR (a, \ CR ((a), \
TEXT_IN_SPLITTER_PRIVATE_DATA, \ TEXT_IN_SPLITTER_PRIVATE_DATA, \
SimplePointer, \ SimplePointer, \
TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \ TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
) )
// //
@ -135,31 +128,31 @@ typedef struct {
} TEXT_OUT_SPLITTER_PRIVATE_DATA; } TEXT_OUT_SPLITTER_PRIVATE_DATA;
#define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \ #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
CR (a, \ CR ((a), \
TEXT_OUT_SPLITTER_PRIVATE_DATA, \ TEXT_OUT_SPLITTER_PRIVATE_DATA, \
TextOut, \ TextOut, \
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \ TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
) )
#define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \ #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
CR (a, \ CR ((a), \
TEXT_OUT_SPLITTER_PRIVATE_DATA, \ TEXT_OUT_SPLITTER_PRIVATE_DATA, \
GraphicsOutput, \ GraphicsOutput, \
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \ TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
) )
#define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \ #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
CR (a, \ CR ((a), \
TEXT_OUT_SPLITTER_PRIVATE_DATA, \ TEXT_OUT_SPLITTER_PRIVATE_DATA, \
UgaDraw, \ UgaDraw, \
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \ TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
) )
#define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \ #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
CR (a, \ CR ((a), \
TEXT_OUT_SPLITTER_PRIVATE_DATA, \ TEXT_OUT_SPLITTER_PRIVATE_DATA, \
ConsoleControl, \ ConsoleControl, \
TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \ TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
) )
// //
@ -173,14 +166,12 @@ ConSplitterDriverEntry (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
ConSplitterTextInConstructor ( ConSplitterTextInConstructor (
TEXT_IN_SPLITTER_PRIVATE_DATA *Private TEXT_IN_SPLITTER_PRIVATE_DATA *Private
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
ConSplitterTextOutConstructor ( ConSplitterTextOutConstructor (
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
@ -190,7 +181,6 @@ ConSplitterTextOutConstructor (
// //
// Driver Binding Functions // Driver Binding Functions
// //
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConInDriverBindingSupported ( ConSplitterConInDriverBindingSupported (
@ -200,7 +190,6 @@ ConSplitterConInDriverBindingSupported (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterSimplePointerDriverBindingSupported ( ConSplitterSimplePointerDriverBindingSupported (
@ -210,7 +199,6 @@ ConSplitterSimplePointerDriverBindingSupported (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConOutDriverBindingSupported ( ConSplitterConOutDriverBindingSupported (
@ -220,7 +208,6 @@ ConSplitterConOutDriverBindingSupported (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStdErrDriverBindingSupported ( ConSplitterStdErrDriverBindingSupported (
@ -230,7 +217,6 @@ ConSplitterStdErrDriverBindingSupported (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConInDriverBindingStart ( ConSplitterConInDriverBindingStart (
@ -240,7 +226,6 @@ ConSplitterConInDriverBindingStart (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterSimplePointerDriverBindingStart ( ConSplitterSimplePointerDriverBindingStart (
@ -250,7 +235,6 @@ ConSplitterSimplePointerDriverBindingStart (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConOutDriverBindingStart ( ConSplitterConOutDriverBindingStart (
@ -260,7 +244,6 @@ ConSplitterConOutDriverBindingStart (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStdErrDriverBindingStart ( ConSplitterStdErrDriverBindingStart (
@ -270,7 +253,6 @@ ConSplitterStdErrDriverBindingStart (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConInDriverBindingStop ( ConSplitterConInDriverBindingStop (
@ -281,7 +263,6 @@ ConSplitterConInDriverBindingStop (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterSimplePointerDriverBindingStop ( ConSplitterSimplePointerDriverBindingStop (
@ -292,7 +273,6 @@ ConSplitterSimplePointerDriverBindingStop (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterConOutDriverBindingStop ( ConSplitterConOutDriverBindingStop (
@ -303,7 +283,6 @@ ConSplitterConOutDriverBindingStop (
) )
; ;
STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
ConSplitterStdErrDriverBindingStop ( ConSplitterStdErrDriverBindingStop (

View File

@ -1,6 +1,12 @@
/*++ /**@file
This is the main routine for initializing the Graphics Console support routines.
Copyright (c) 2006, Intel Corporation Remaining Tasks
Add all standard Glyphs from EFI 1.02 Specification
Implement optimal automatic Mode creation algorithm
Solve palette issues for mixed graphics and text
When does this protocol reset the palette?
Copyright (c) 2006 Intel Corporation. <BR>
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
@ -9,23 +15,7 @@ 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.
Module Name: **/
GraphicsConsole.c
Abstract:
This is the main routine for initializing the Graphics Console support routines.
Revision History
Remaining Tasks
Add all standard Glyphs from EFI 1.02 Specification
Implement optimal automatic Mode creation algorithm
Solve palette issues for mixed graphics and text
When does this protocol reset the palette?
--*/
#include "GraphicsConsole.h" #include "GraphicsConsole.h"
@ -126,22 +116,22 @@ static EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = {
// //
// B G R // B G R
// //
0x00, 0x00, 0x00, 0x00, // BLACK {0x00, 0x00, 0x00, 0x00}, // BLACK
0x98, 0x00, 0x00, 0x00, // BLUE {0x98, 0x00, 0x00, 0x00}, // BLUE
0x00, 0x98, 0x00, 0x00, // GREEN {0x00, 0x98, 0x00, 0x00}, // GREEN
0x98, 0x98, 0x00, 0x00, // CYAN {0x98, 0x98, 0x00, 0x00}, // CYAN
0x00, 0x00, 0x98, 0x00, // RED {0x00, 0x00, 0x98, 0x00}, // RED
0x98, 0x00, 0x98, 0x00, // MAGENTA {0x98, 0x00, 0x98, 0x00}, // MAGENTA
0x00, 0x98, 0x98, 0x00, // BROWN {0x00, 0x98, 0x98, 0x00}, // BROWN
0x98, 0x98, 0x98, 0x00, // LIGHTGRAY {0x98, 0x98, 0x98, 0x00}, // LIGHTGRAY
0x30, 0x30, 0x30, 0x00, // DARKGRAY - BRIGHT BLACK {0x30, 0x30, 0x30, 0x00}, // DARKGRAY - BRIGHT BLACK
0xff, 0x00, 0x00, 0x00, // LIGHTBLUE - ? {0xff, 0x00, 0x00, 0x00}, // LIGHTBLUE - ?
0x00, 0xff, 0x00, 0x00, // LIGHTGREEN - ? {0x00, 0xff, 0x00, 0x00}, // LIGHTGREEN - ?
0xff, 0xff, 0x00, 0x00, // LIGHTCYAN {0xff, 0xff, 0x00, 0x00}, // LIGHTCYAN
0x00, 0x00, 0xff, 0x00, // LIGHTRED {0x00, 0x00, 0xff, 0x00}, // LIGHTRED
0xff, 0x00, 0xff, 0x00, // LIGHTMAGENTA {0xff, 0x00, 0xff, 0x00}, // LIGHTMAGENTA
0x00, 0xff, 0xff, 0x00, // LIGHTBROWN {0x00, 0xff, 0xff, 0x00}, // LIGHTBROWN
0xff, 0xff, 0xff, 0x00, // WHITE {0xff, 0xff, 0xff, 0x00} // WHITE
}; };
static EFI_NARROW_GLYPH mCursorGlyph = { static EFI_NARROW_GLYPH mCursorGlyph = {