Adjust the code so that global variable placed at beginning of file.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8172 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy
2009-04-24 07:30:54 +00:00
parent 14d59fa188
commit 9f6531d14d
18 changed files with 170 additions and 166 deletions

View File

@@ -40,6 +40,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "ComponentName.h"
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gIsaBusControllerDriver;
extern EFI_ISA_IO_PROTOCOL IsaIoInterface;
//
// 8237 DMA registers
//
@@ -106,9 +113,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define R_8237_DMA_WRMSK_CH0_3 0x0f
#define R_8237_DMA_WRMSK_CH4_7 0xde
extern EFI_ISA_IO_PROTOCOL IsaIoInterface;
typedef enum {
IsaAccessTypeUnknown,
IsaAccessTypeIo,
@@ -146,11 +150,6 @@ typedef struct {
#define ISA_IO_DEVICE_FROM_ISA_IO_THIS(a) CR (a, ISA_IO_DEVICE, IsaIo, ISA_IO_DEVICE_SIGNATURE)
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gIsaBusControllerDriver;
//
// Mapping structure for performing ISA DMA to a buffer above 16 MB
//

View File

@@ -114,10 +114,6 @@ typedef struct {
#define SERIAL_DEV_FROM_THIS(a) CR (a, SERIAL_DEV, SerialIo, SERIAL_DEV_SIGNATURE)
//
// Globale Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gSerialControllerDriver;
//
// Serial Driver Defaults

View File

@@ -15,64 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Ps2Keyboard.h"
//
// Function declarations
//
UINT8
KeyReadDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
);
VOID
KeyWriteDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
VOID
KeyWriteCommandRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
VOID
KeyboardError (
IN KEYBOARD_CONSOLE_IN_DEV*ConsoleIn,
IN CHAR16 *ErrMsg // should be a unicode string
);
EFI_STATUS
GetScancodeBufHead (
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT32 Count,
OUT UINT8 *Buf
);
EFI_STATUS
PopScancodeBufHead (
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT32 Count,
OUT UINT8 *Buf
);
EFI_STATUS
KeyboardWrite (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
EFI_STATUS
KeyboardCommand (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
EFI_STATUS
KeyboardWaitForValue (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Value
);
struct {
UINT8 ScanCode;
UINT16 EfiScanCode;
@@ -625,6 +567,64 @@ UINTN mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT;
BOOLEAN mEnableMouseInterface;
//
// Function declarations
//
UINT8
KeyReadDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
);
VOID
KeyWriteDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
VOID
KeyWriteCommandRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
VOID
KeyboardError (
IN KEYBOARD_CONSOLE_IN_DEV*ConsoleIn,
IN CHAR16 *ErrMsg // should be a unicode string
);
EFI_STATUS
GetScancodeBufHead (
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT32 Count,
OUT UINT8 *Buf
);
EFI_STATUS
PopScancodeBufHead (
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT32 Count,
OUT UINT8 *Buf
);
EFI_STATUS
KeyboardWrite (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
EFI_STATUS
KeyboardCommand (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
);
EFI_STATUS
KeyboardWaitForValue (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Value
);
/**
Read data register

View File

@@ -34,6 +34,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver;
extern EFI_COMPONENT_NAME_PROTOCOL gPs2KeyboardComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;
//
// Driver Private Data
//
@@ -119,14 +126,6 @@ typedef struct {
#define TABLE_END 0x0
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver;
extern EFI_COMPONENT_NAME_PROTOCOL gPs2KeyboardComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;
//
// Driver entry point
//

View File

@@ -30,6 +30,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiBootServicesTableLib.h>
#include <Library/ReportStatusCodeLib.h>
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gPS2MouseAbsolutePointerDriver;
extern EFI_COMPONENT_NAME_PROTOCOL gPs2MouseAbsolutePointerComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPs2MouseAbsolutePointerComponentName2;
//
// PS/2 mouse sample rate
//
@@ -95,13 +102,6 @@ typedef struct {
#define PS2_MOUSE_ABSOLUTE_POINTER_DEV_FROM_THIS(a) CR (a, PS2_MOUSE_ABSOLUTE_POINTER_DEV, AbsolutePointerProtocol, PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE)
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gPS2MouseAbsolutePointerDriver;
extern EFI_COMPONENT_NAME_PROTOCOL gPs2MouseAbsolutePointerComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPs2MouseAbsolutePointerComponentName2;
//
// Function prototypes
//

View File

@@ -30,6 +30,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiBootServicesTableLib.h>
#include <Library/ReportStatusCodeLib.h>
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gPS2MouseDriver;
extern EFI_COMPONENT_NAME_PROTOCOL gPs2MouseComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPs2MouseComponentName2;
//
// PS/2 mouse sample rate
//
@@ -95,13 +102,6 @@ typedef struct {
#define PS2_MOUSE_DEV_FROM_THIS(a) CR (a, PS2_MOUSE_DEV, SimplePointerProtocol, PS2_MOUSE_DEV_SIGNATURE)
//
// Global Variables
//
extern EFI_DRIVER_BINDING_PROTOCOL gPS2MouseDriver;
extern EFI_COMPONENT_NAME_PROTOCOL gPs2MouseComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPs2MouseComponentName2;
//
// Function prototypes
//