Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.

Changed old event definitions reference to these new event definitions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2729 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-06-25 08:54:54 +00:00
parent a197b1ad17
commit 93b0fbc8a1
88 changed files with 2046 additions and 2039 deletions

View File

@@ -321,7 +321,7 @@ CirrusLogic5430UgaDrawBlt (
// We would not want a timer based event (Cursor, ...) to come in while we are
// doing this operation.
//
OriginalTPL = gBS->RaiseTPL (EFI_TPL_NOTIFY);
OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
switch (BltOperation) {
case EfiUgaVideoToBltBuffer:

View File

@@ -2138,7 +2138,7 @@ EhciAsyncInterruptTransfer (
//
if (!IsNewTransfer) {
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
Status = DeleteAsyncRequestTransfer (
HcDev,

View File

@@ -239,7 +239,7 @@ Returns:
MemoryHeader = HcDev->MemoryHeader;
ASSERT (MemoryHeader != NULL);
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
//
// allocate unit is 32 bytes (align on 32 byte)
@@ -297,7 +297,7 @@ Returns:
return Status;
}
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
//
@@ -353,7 +353,7 @@ Returns:
UINTN Count;
UINTN RealAllocSize;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
MemoryHeader = HcDev->MemoryHeader;
@@ -419,7 +419,7 @@ Returns:
// the TempHeaderPtr is pointing to nonsense content.
//
gBS->RestoreTPL (OldTpl);
FreeMemoryHeader (HcDev, TempHeaderPtr);
FreeMemoryHeader (HcDev, TempHeaderPtr);
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
//
// reset the TempHeaderPtr, continue search for

View File

@@ -253,7 +253,7 @@ Returns:
//
if (HcDev->Is64BitCapable != 0) {
HcDev->High32BitAddr = (UINT32) GET_32B_TO_63B (FrameBuffer);
Status = SetCtrlDataStructSeg (HcDev);
if (EFI_ERROR (Status)) {
DEBUG ((gEHCErrorLevel, "EHCI: SetCtrlDataStructSeg Failed\n"));
@@ -347,8 +347,8 @@ Returns:
--*/
{
return gBS->CreateEvent (
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
EFI_TPL_NOTIFY,
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
NotifyFunction,
HcDev,
&HcDev->AsyncRequestEvent
@@ -1868,7 +1868,7 @@ Returns:
QhPtr->Qh.HeadReclamationFlag = FALSE;
if (QhPtr->TransferType == ASYNC_INTERRUPT_TRANSFER) {
if (QhPtr->TransferType == ASYNC_INTERRUPT_TRANSFER) {
//
// AsyncInterruptTransfer Qh
@@ -2596,7 +2596,7 @@ Returns:
*DataMap = NULL;
break;
default:
default:
Status = EFI_INVALID_PARAMETER;
}

View File

@@ -1,12 +1,12 @@
/** @file
Copyright (c) 2006 - 2007 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
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.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
This module is modified from DXE\IDE module for Ide Contriller Init support
@@ -89,7 +89,7 @@ IDEBusDriverBindingSupported (
if (EFI_ERROR (Status)) {
return Status;
}
//
// Close protocol, don't use device path protocol in the .Support() function
//
@@ -140,7 +140,7 @@ IDEBusDriverBindingSupported (
// ***********************************************************************************
//
/**
Start this driver on Controller by detecting all disks and installing
Start this driver on Controller by detecting all disks and installing
BlockIo protocol on them.
@param This Protocol instance pointer.
@@ -210,7 +210,7 @@ IDEBusDriverBindingStart (
if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
return Status;
}
//
// Now open the IDE_CONTROLLER_INIT protocol. Step7.1
//
@@ -429,7 +429,7 @@ IDEBusDriverBindingStart (
if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {
continue;
}
//
// The device has been scanned in another Start(), No need to scan it again
// for perf optimization.
@@ -437,7 +437,7 @@ IDEBusDriverBindingStart (
if (IdeBusDriverPrivateData->HaveScannedDevice[IdeChannel * 2 + IdeDevice]) {
continue;
}
//
// create child handle for the detected device.
//
@@ -664,7 +664,7 @@ IDEBusDriverBindingStart (
if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {
Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);
}
//
// Record PIO mode used in private data
//
@@ -715,13 +715,13 @@ IDEBusDriverBindingStart (
(EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),
IdeBlkIoDevicePtr->DevicePath
);
//
// Create event to clear pending IDE interrupt
//
Status = gBS->CreateEvent (
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
EFI_TPL_NOTIFY,
EVT_SIGNAL_EXIT_BOOT_SERVICES,
TPL_NOTIFY,
ClearInterrupt,
IdeBlkIoDevicePtr,
&IdeBlkIoDevicePtr->ExitBootServiceEvent
@@ -735,7 +735,7 @@ IDEBusDriverBindingStart (
// end of 2nd outer loop ==========
//
}
//
// All configurations done! Notify IdeController to do post initialization
// work such as saving IDE controller PCI settings for S3 resume
@@ -808,7 +808,7 @@ ErrorExit:
// ***********************************************************************************
//
/**
Stop this driver on Controller Handle.
Stop this driver on Controller Handle.
@param This Protocol instance pointer.
@param DeviceHandle Handle of device to stop driver on
@@ -1003,7 +1003,7 @@ DeRegisterIdeDevice (
);
return Status;
}
//
// Release allocated resources
//
@@ -1037,7 +1037,7 @@ IDEBlkIoReset (
EFI_STATUS Status;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
//
@@ -1058,7 +1058,7 @@ IDEBlkIoReset (
Status = EFI_DEVICE_ERROR;
goto Done;
}
//
// for ATAPI device, using ATAPI reset method
//
@@ -1099,7 +1099,7 @@ IDEBlkIoReadBlocks (
EFI_STATUS Status;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
@@ -1127,7 +1127,7 @@ IDEBlkIoReadBlocks (
Status = EFI_DEVICE_ERROR;
goto Done;
}
//
// for ATAPI device, using ATAPI read block's mechanism
//
@@ -1172,8 +1172,8 @@ IDEBlkIoWriteBlocks (
EFI_STATUS Status;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
//
// Requery IDE IO resources in case of the switch of native and legacy modes
@@ -1184,7 +1184,7 @@ IDEBlkIoWriteBlocks (
// for ATA device, using ATA write block's mechanism
//
if (IdeBlkIoDevice->Type == IdeHardDisk ||
IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {
IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {
Status = AtaBlkIoWriteBlocks (
IdeBlkIoDevice,
@@ -1200,7 +1200,7 @@ IDEBlkIoWriteBlocks (
Status = EFI_DEVICE_ERROR;
goto Done;
}
//
// for ATAPI device, using ATAPI write block's mechanism
//
@@ -1211,7 +1211,7 @@ IDEBlkIoWriteBlocks (
BufferSize,
Buffer
);
Done:
gBS->RestoreTPL (OldTpl);
return Status;

View File

@@ -693,7 +693,7 @@ Returns:
//
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
PciIoWrite (PciIo, EfiPciIoWidthUint32, (UINT8) Offset, 1, &gAllOne);
PciIoRead (PciIo, EfiPciIoWidthUint32, (UINT8) Offset, 1, &Value);
@@ -759,7 +759,7 @@ Returns:
//
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
PciSetCommandRegister (PciIoDevice, *Command);
PciReadCommandRegister (PciIoDevice, Command);
@@ -784,7 +784,7 @@ Returns:
//
// Raise TPL to high level to disable timer interrupt while the BAR is probed
//
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
PciSetBridgeControlRegister (PciIoDevice, *BridgeControl);
PciReadBridgeControlRegister (PciIoDevice, BridgeControl);

View File

@@ -1,21 +1,21 @@
/*++
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.
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:
PciHotPlugSupport.c
Abstract:
Revision History
@@ -254,8 +254,8 @@ Returns:
EFI_STATUS Status;
Status = gBS->CreateEvent (
EFI_EVENT_NOTIFY_SIGNAL,
EFI_TPL_CALLBACK,
EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
PciHPCInitialized,
gPciRootHpcData + HpIndex,
&((gPciRootHpcData + HpIndex)->Event)

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
/*++
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.
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:
@@ -30,7 +30,7 @@ PXE_SW_UNDI *pxe = 0; // 3.0 entry point
PXE_SW_UNDI *pxe_31 = 0; // 3.1 entry
UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
NII_TABLE *UnidiDataPointer=NULL;
NII_TABLE *UnidiDataPointer=NULL;
VOID
EFIAPI
@@ -103,7 +103,7 @@ UndiNotifyExitBs (
Routine Description:
When EFI is shuting down the boot services, we need to install a
When EFI is shuting down the boot services, we need to install a
configuration table for UNDI to work at runtime!
Arguments:
@@ -161,8 +161,8 @@ Returns:
EFI_EVENT Event;
Status = gBS->CreateEvent (
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
EFI_TPL_NOTIFY,
EVT_SIGNAL_EXIT_BOOT_SERVICES,
TPL_NOTIFY,
UndiNotifyExitBs,
NULL,
&Event
@@ -191,15 +191,15 @@ Routine Description:
Arguments:
This - Protocol instance pointer.
Controller - Handle of device to test.
RemainingDevicePath - Not used.
Returns:
EFI_SUCCESS - This driver supports this device.
other - This driver does not support this device.
--*/
@@ -305,15 +305,15 @@ Routine Description:
Arguments:
This - Protocol instance pointer.
Controller - Handle of device to work with.
RemainingDevicePath - Not used, always produce all possible children.
Returns:
EFI_SUCCESS - This driver is added to Controller.
other - This driver does not support this device.
--*/
@@ -325,7 +325,7 @@ Returns:
UINT16 NewCommand;
UINT8 *TmpPxePointer;
EFI_PCI_IO_PROTOCOL *PciIoFncs;
UINTN Len;
UINTN Len;
Status = gBS->OpenProtocol (
Controller,
@@ -538,7 +538,7 @@ Returns:
}
//
// if the table exists, free it and alloc again, or alloc it directly
// if the table exists, free it and alloc again, or alloc it directly
//
if (UnidiDataPointer != NULL) {
Status = gBS->FreePool(UnidiDataPointer);
@@ -553,7 +553,7 @@ Returns:
if (EFI_ERROR (Status)) {
goto UndiErrorAllocDataPointer;
}
//
// Open For Child Device
//
@@ -750,7 +750,7 @@ Routine Description:
Arguments:
UnqId - Runtime O/S routine might use this, this temp routine does not use it
MicroSeconds - Determines the length of pause.
Returns:
@@ -780,13 +780,13 @@ Routine Description:
Arguments:
UnqId - Runtime O/S routine may use this field, this temp routine does not.
ReadWrite - Determine if it is an I/O or Memory Read/Write Operation.
Len - Determines the width of the data operation.
Port - What port to Read/Write from.
BuffAddr - Address to read to or write from.
Returns:
@@ -880,15 +880,15 @@ Routine Description:
Arguments:
DevPtr - Pointer which will point to the newly created device path with the MAC node attached.
BaseDevPtr - Pointer to the device path which the UNDI device driver is latching on to.
AdapterInfo - Pointer to the NIC data structure information which the UNDI driver is layering on..
Returns:
EFI_SUCCESS - A MAC address was successfully appended to the Base Device Path.
other - Not enough resources available to create new Device Path node.
--*/
@@ -1020,7 +1020,7 @@ Arguments:
Returns:
EFI_SUCCESS - Install a GUID/Pointer pair into the system's configuration table.
other - Did not successfully install the GUID/Pointer pair into the configuration table.
--*/
@@ -1036,12 +1036,12 @@ Returns:
return EFI_SUCCESS;
}
if(UnidiDataPointer == NULL) {
if(UnidiDataPointer == NULL) {
return EFI_SUCCESS;
}
UndiData = (NII_TABLE *)UnidiDataPointer;
UndiData = (NII_TABLE *)UnidiDataPointer;
UndiData->NumEntries = pxe_31->IFcnt;
UndiData->NextLink = NULL;

View File

@@ -334,7 +334,7 @@ Returns:
EFI_STATUS Status;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
@@ -405,7 +405,7 @@ Returns:
return EFI_SUCCESS;
}
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
@@ -529,7 +529,7 @@ Returns:
return EFI_SUCCESS;
}
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,18 @@
/*++
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.
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:
EfiKey.c
Abstract:
USB Keyboard Driver
@@ -80,18 +80,18 @@ USBKeyboardDriverBindingSupported (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
/*++
Routine Description:
Supported.
Arguments:
This - EFI_DRIVER_BINDING_PROTOCOL
Controller - Controller handle
RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL
RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL
Returns:
EFI_STATUS
--*/
--*/
{
EFI_STATUS OpenStatus;
EFI_USB_IO_PROTOCOL *UsbIo;
@@ -111,7 +111,7 @@ USBKeyboardDriverBindingSupported (
if (EFI_ERROR (OpenStatus)) {
return OpenStatus;
}
//
// Use the USB I/O protocol interface to check whether the Controller is
// the Keyboard controller that can be managed by this driver.
@@ -140,10 +140,10 @@ USBKeyboardDriverBindingStart (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
/*++
Routine Description:
Start.
Arguments:
This - EFI_DRIVER_BINDING_PROTOCOL
Controller - Controller handle
@@ -152,8 +152,8 @@ USBKeyboardDriverBindingStart (
EFI_SUCCESS - Success
EFI_OUT_OF_RESOURCES - Can't allocate memory
EFI_UNSUPPORTED - The Start routine fail
--*/
{
--*/
{
EFI_STATUS Status;
EFI_USB_IO_PROTOCOL *UsbIo;
USB_KB_DEV *UsbKeyboardDevice;
@@ -164,7 +164,7 @@ USBKeyboardDriverBindingStart (
UINT8 PollingInterval;
UINT8 PacketSize;
BOOLEAN Found;
UsbKeyboardDevice = NULL;
Found = FALSE;
@@ -283,8 +283,8 @@ USBKeyboardDriverBindingStart (
UsbKeyboardDevice->SimpleInput.Reset = USBKeyboardReset;
UsbKeyboardDevice->SimpleInput.ReadKeyStroke = USBKeyboardReadKeyStroke;
Status = gBS->CreateEvent (
EFI_EVENT_NOTIFY_WAIT,
EFI_TPL_NOTIFY,
EVT_NOTIFY_WAIT,
TPL_NOTIFY,
USBKeyboardWaitForKey,
UsbKeyboardDevice,
&(UsbKeyboardDevice->SimpleInput.WaitForKey)
@@ -300,7 +300,7 @@ USBKeyboardDriverBindingStart (
);
return Status;
}
//
// Install simple txt in protocol interface
// for the usb keyboard device.
@@ -328,7 +328,7 @@ USBKeyboardDriverBindingStart (
);
return Status;
}
//
// Reset USB Keyboard Device
//
@@ -414,19 +414,19 @@ USBKeyboardDriverBindingStop (
IN EFI_HANDLE *ChildHandleBuffer
)
/*++
Routine Description:
Stop.
Arguments:
This - EFI_DRIVER_BINDING_PROTOCOL
Controller - Controller handle
NumberOfChildren - Child handle number
ChildHandleBuffer - Child handle buffer
ChildHandleBuffer - Child handle buffer
Returns:
EFI_SUCCESS - Success
EFI_UNSUPPORTED - Can't support
--*/
EFI_UNSUPPORTED - Can't support
--*/
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_IN_PROTOCOL *SimpleInput;
@@ -443,7 +443,7 @@ USBKeyboardDriverBindingStop (
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
//
// Get USB_KB_DEV instance.
//
@@ -522,17 +522,17 @@ USBKeyboardReset (
Routine Description:
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.Reset() function.
Arguments:
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
ExtendedVerification
Indicates that the driver may perform a more exhaustive
verification operation of the device during reset.
Returns:
verification operation of the device during reset.
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
--*/
--*/
{
EFI_STATUS Status;
USB_KB_DEV *UsbKeyboardDevice;
@@ -563,7 +563,7 @@ USBKeyboardReset (
UsbKeyboardDevice->CurKeyChar = 0;
return EFI_SUCCESS;
}
//
// Exhaustive reset
//
@@ -587,15 +587,15 @@ USBKeyboardReadKeyStroke (
Routine Description:
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.ReadKeyStroke() function.
Arguments:
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
Key A pointer to a buffer that is filled in with the keystroke
information for the key that was pressed.
Returns:
Returns:
EFI_SUCCESS - Success
--*/
--*/
{
USB_KB_DEV *UsbKeyboardDevice;
EFI_STATUS Status;
@@ -640,15 +640,15 @@ USBKeyboardWaitForKey (
/*++
Routine Description:
Handler function for WaitForKey event.
Handler function for WaitForKey event.
Arguments:
Event Event to be signaled when a key is pressed.
Context Points to USB_KB_DEV instance.
Returns:
Returns:
VOID
--*/
--*/
{
USB_KB_DEV *UsbKeyboardDevice;
@@ -676,13 +676,13 @@ USBKeyboardCheckForKey (
Routine Description:
Check whether there is key pending.
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
Returns:
Returns:
EFI_SUCCESS - Success
--*/
--*/
{
EFI_STATUS Status;
UINT8 KeyChar;

View File

@@ -1,18 +1,18 @@
/*++
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.
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:
Keyboard.c
Abstract:
Helper functions for USB Keyboard Driver
@@ -85,8 +85,8 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = {
{ SCAN_NULL, 0x00, 0x00 }, // 0x39 CapsLock
{ SCAN_F1, 0x00, 0x00 }, // 0x3A
{ SCAN_F2, 0x00, 0x00 }, // 0x3B
{ SCAN_F3, 0x00, 0x00 }, // 0x3C
{ SCAN_F4, 0x00, 0x00 }, // 0x3D
{ SCAN_F3, 0x00, 0x00 }, // 0x3C
{ SCAN_F4, 0x00, 0x00 }, // 0x3D
{ SCAN_F5, 0x00, 0x00 }, // 0x3E
{ SCAN_F6, 0x00, 0x00 }, // 0x3F
{ SCAN_F7, 0x00, 0x00 }, // 0x40
@@ -132,14 +132,14 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = {
};
STATIC KB_MODIFIER KB_Mod[8] = {
{ MOD_CONTROL_L, 0xe0 }, // 11100000
{ MOD_CONTROL_R, 0xe4 }, // 11100100
{ MOD_SHIFT_L, 0xe1 }, // 11100001
{ MOD_SHIFT_R, 0xe5 }, // 11100101
{ MOD_ALT_L, 0xe2 }, // 11100010
{ MOD_ALT_R, 0xe6 }, // 11100110
{ MOD_WIN_L, 0xe3 }, // 11100011
{ MOD_WIN_R, 0xe7 } // 11100111
{ MOD_CONTROL_L, 0xe0 }, // 11100000
{ MOD_CONTROL_R, 0xe4 }, // 11100100
{ MOD_SHIFT_L, 0xe1 }, // 11100001
{ MOD_SHIFT_R, 0xe5 }, // 11100101
{ MOD_ALT_L, 0xe2 }, // 11100010
{ MOD_ALT_R, 0xe6 }, // 11100110
{ MOD_WIN_L, 0xe3 }, // 11100011
{ MOD_WIN_R, 0xe7 } // 11100111
};
@@ -148,16 +148,16 @@ IsUSBKeyboard (
IN EFI_USB_IO_PROTOCOL *UsbIo
)
/*++
Routine Description:
Uses USB I/O to check whether the device is a USB Keyboard device.
Arguments:
UsbIo: Points to a USB I/O protocol instance.
Returns:
--*/
--*/
{
EFI_STATUS Status;
EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
@@ -192,13 +192,13 @@ InitUSBKeyboard (
IN USB_KB_DEV *UsbKeyboardDevice
)
/*++
Routine Description:
Initialize USB Keyboard device and all private data structures.
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
@@ -289,7 +289,7 @@ InitUSBKeyboard (
UsbKeyboardDevice->ShiftOn = 0;
UsbKeyboardDevice->NumLockOn = 0;
UsbKeyboardDevice->CapsOn = 0;
UsbKeyboardDevice->ScrollOn = 0;
UsbKeyboardDevice->ScrollOn = 0;
ZeroMem (UsbKeyboardDevice->LastKeyCodeArray, sizeof (UINT8) * 8);
//
@@ -301,8 +301,8 @@ InitUSBKeyboard (
}
Status = gBS->CreateEvent (
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
EFI_TPL_NOTIFY,
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
USBKeyboardRepeatHandler,
UsbKeyboardDevice,
&UsbKeyboardDevice->RepeatTimer
@@ -314,8 +314,8 @@ InitUSBKeyboard (
}
Status = gBS->CreateEvent (
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
EFI_TPL_NOTIFY,
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
USBKeyboardRecoveryHandler,
UsbKeyboardDevice,
&UsbKeyboardDevice->DelayedRecoveryEvent
@@ -333,21 +333,21 @@ KeyboardHandler (
IN UINT32 Result
)
/*++
Routine Description:
Handler function for USB Keyboard's asynchronous interrupt transfer.
Arguments:
Data A pointer to a buffer that is filled with key data which is
retrieved via asynchronous interrupt transfer.
DataLength Indicates the size of the data buffer.
Context Pointing to USB_KB_DEV instance.
Result Indicates the result of the asynchronous interrupt transfer.
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
--*/
--*/
{
USB_KB_DEV *UsbKeyboardDevice;
EFI_USB_IO_PROTOCOL *UsbIo;
@@ -402,11 +402,11 @@ KeyboardHandler (
&UsbStatus
);
}
//
// Delete & Submit this interrupt again
//
UsbIo->UsbAsyncInterruptTransfer (
UsbIo,
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
@@ -446,7 +446,7 @@ KeyboardHandler (
if (Index == 8) {
return EFI_SUCCESS;
}
//
// Parse the modifier key
//
@@ -469,7 +469,7 @@ KeyboardHandler (
InsertKeyCode (&(UsbKeyboardDevice->KeyboardBuffer), KB_Mod[Index].Key, Down);
}
}
//
// handle normal key's releasing situation
//
@@ -507,7 +507,7 @@ KeyboardHandler (
}
}
}
//
// original repeat key is released, cancel the repeat timer
//
@@ -518,7 +518,7 @@ KeyboardHandler (
USBKBD_REPEAT_RATE
);
}
//
// handle normal key's pressing situation
//
@@ -558,7 +558,7 @@ KeyboardHandler (
}
}
}
//
// Update LastKeycodeArray[] buffer in the
// Usb Keyboard Device data structure.
@@ -566,7 +566,7 @@ KeyboardHandler (
for (Index = 0; Index < 8; Index++) {
UsbKeyboardDevice->LastKeyCodeArray[Index] = CurKeyCodeBuffer[Index];
}
//
// pre-process KeyboardBuffer, pop out the ctrl,alt,del key in sequence
// and judge whether it will invoke reset event.
@@ -611,7 +611,7 @@ KeyboardHandler (
default:
break;
}
//
// insert the key back to the buffer.
// so the key sequence will not be destroyed.
@@ -651,18 +651,18 @@ USBParseKey (
OUT UINT8 *KeyChar
)
/*++
Routine Description:
Retrieves a key character after parsing the raw data in keyboard buffer.
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
KeyChar Points to the Key character after key parsing.
Returns:
EFI_SUCCESS - Success
EFI_NOT_READY - Device is not ready
--*/
EFI_NOT_READY - Device is not ready
--*/
{
USB_KEY UsbKey;
@@ -698,7 +698,7 @@ USBParseKey (
continue;
}
//
// Analyzes key pressing situation
//
@@ -762,7 +762,7 @@ USBParseKey (
UsbKeyboardDevice->ScrollOn ^= 1;
SetKeyLED (UsbKeyboardDevice);
continue;
break;
break;
case 0x48:
//
// fall through
@@ -775,7 +775,7 @@ USBParseKey (
default:
break;
}
//
// When encountered Del Key...
//
@@ -801,15 +801,15 @@ USBKeyCodeToEFIScanCode (
OUT EFI_INPUT_KEY *Key
)
/*++
Routine Description:
Converts USB Keyboard code to EFI Scan Code.
Arguments:
Arguments:
UsbKeyboardDevice The USB_KB_DEV instance.
KeyChar Indicates the key code that will be interpreted.
Key A pointer to a buffer that is filled in with
the keystroke information for the key that
KeyChar Indicates the key code that will be interpreted.
Key A pointer to a buffer that is filled in with
the keystroke information for the key that
was pressed.
Returns:
EFI_NOT_READY - Device is not ready
@@ -821,7 +821,7 @@ USBKeyCodeToEFIScanCode (
if (!USBKBD_VALID_KEYCODE (KeyChar)) {
return EFI_NOT_READY;
}
//
// valid USB Key Code starts from 4
//
@@ -881,16 +881,16 @@ InitUSBKeyBuffer (
IN OUT USB_KB_BUFFER *KeyboardBuffer
)
/*++
Routine Description:
Resets USB Keyboard Buffer.
Arguments:
KeyboardBuffer - Points to the USB Keyboard Buffer.
Returns:
EFI_SUCCESS - Success
--*/
--*/
{
ZeroMem (KeyboardBuffer, sizeof (USB_KB_BUFFER));
@@ -904,15 +904,15 @@ IsUSBKeyboardBufferEmpty (
IN USB_KB_BUFFER *KeyboardBuffer
)
/*++
Routine Description:
Check whether USB Keyboard buffer is empty.
Arguments:
KeyboardBuffer - USB Keyboard Buffer.
Returns:
--*/
{
//
@@ -927,18 +927,18 @@ IsUSBKeyboardBufferFull (
IN USB_KB_BUFFER *KeyboardBuffer
)
/*++
Routine Description:
Check whether USB Keyboard buffer is full.
Arguments:
KeyboardBuffer - USB Keyboard Buffer.
Returns:
--*/
{
return (BOOLEAN)(((KeyboardBuffer->bTail + 1) % (MAX_KEY_ALLOWED + 1)) ==
return (BOOLEAN)(((KeyboardBuffer->bTail + 1) % (MAX_KEY_ALLOWED + 1)) ==
KeyboardBuffer->bHead);
}
@@ -950,10 +950,10 @@ InsertKeyCode (
IN UINT8 Down
)
/*++
Routine Description:
Inserts a key code into keyboard buffer.
Arguments:
KeyboardBuffer - Points to the USB Keyboard Buffer.
Key - Key code
@@ -989,18 +989,18 @@ RemoveKeyCode (
OUT USB_KEY *UsbKey
)
/*++
Routine Description:
Pops a key code off from keyboard buffer.
Arguments:
KeyboardBuffer - Points to the USB Keyboard Buffer.
UsbKey - Points to the buffer that contains a usb key code.
Returns:
EFI_SUCCESS - Success
EFI_DEVICE_ERROR - Hardware Error
--*/
--*/
{
if (IsUSBKeyboardBufferEmpty (KeyboardBuffer)) {
return EFI_DEVICE_ERROR;
@@ -1022,16 +1022,16 @@ SetKeyLED (
IN USB_KB_DEV *UsbKeyboardDevice
)
/*++
Routine Description:
Sets USB Keyboard LED state.
Arguments:
UsbKeyboardDevice - The USB_KB_DEV instance.
Returns:
EFI_SUCCESS - Success
--*/
--*/
{
LED_MAP Led;
UINT8 ReportId;
@@ -1041,7 +1041,7 @@ SetKeyLED (
//
Led.NumLock = (UINT8) UsbKeyboardDevice->NumLockOn;
Led.CapsLock = (UINT8) UsbKeyboardDevice->CapsOn;
Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;
Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;
Led.Resrvd = 0;
ReportId = 0;
@@ -1067,17 +1067,17 @@ USBKeyboardRepeatHandler (
IN VOID *Context
)
/*++
Routine Description:
Timer handler for Repeat Key timer.
Arguments:
Event - The Repeat Key event.
Context - Points to the USB_KB_DEV instance.
Returns:
--*/
--*/
{
USB_KB_DEV *UsbKeyboardDevice;
@@ -1115,17 +1115,17 @@ USBKeyboardRecoveryHandler (
IN VOID *Context
)
/*++
Routine Description:
Timer handler for Delayed Recovery timer.
Arguments:
Event - The Delayed Recovery event.
Context - Points to the USB_KB_DEV instance.
Returns:
--*/
--*/
{
USB_KB_DEV *UsbKeyboardDevice;

View File

@@ -352,7 +352,7 @@ USBFloppyReset (
EFI_STATUS Status;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbFloppyDevice = USB_FLOPPY_DEV_FROM_THIS (This);
@@ -426,7 +426,7 @@ USBFloppyReadBlocks (
return EFI_SUCCESS;
}
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbFloppyTestUnitReady (UsbFloppyDevice);
@@ -572,7 +572,7 @@ USBFloppyWriteBlocks (
return EFI_SUCCESS;
}
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
UsbFloppyTestUnitReady (UsbFloppyDevice);

View File

@@ -1,13 +1,13 @@
/*++
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.
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:
@@ -127,7 +127,7 @@ USBMouseDriverBindingSupported (
if (OpenStatus == EFI_ALREADY_STARTED) {
return EFI_ALREADY_STARTED;
}
//
// Use the USB I/O protocol interface to see the Controller is
// the Mouse controller that can be managed by this driver.
@@ -283,8 +283,8 @@ USBMouseDriverBindingStart (
UsbMouseDevice->SimplePointerProtocol.Mode = &UsbMouseDevice->Mode;
Status = gBS->CreateEvent (
EFI_EVENT_NOTIFY_WAIT,
EFI_TPL_NOTIFY,
EVT_NOTIFY_WAIT,
TPL_NOTIFY,
UsbMouseWaitForInput,
UsbMouseDevice,
&((UsbMouseDevice->SimplePointerProtocol).WaitForInput)
@@ -304,13 +304,13 @@ USBMouseDriverBindingStart (
Status = EFI_DEVICE_ERROR;
goto ErrorExit;
}
//
// After Enabling Async Interrupt Transfer on this mouse Device
// we will be able to get key data from it. Thus this is deemed as
// the enable action of the mouse
//
MouseReportStatusCode (
UsbMouseDevice->DevicePath,
EFI_PROGRESS_CODE,
@@ -677,8 +677,8 @@ InitializeUsbMouseDevice (
}
Status = gBS->CreateEvent (
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
EFI_TPL_NOTIFY,
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
USBMouseRecoveryHandler,
UsbMouseDev,
&UsbMouseDev->DelayedRecoveryEvent
@@ -805,11 +805,11 @@ GetMouseState (
Routine Description:
Get the mouse state, see SIMPLE POINTER PROTOCOL.
Arguments:
This - Protocol instance pointer.
MouseState - Current mouse state
Returns:
EFI_SUCCESS
EFI_DEVICE_ERROR
@@ -858,11 +858,11 @@ UsbMouseReset (
Routine Description:
Reset the mouse device, see SIMPLE POINTER PROTOCOL.
Arguments:
This - Protocol instance pointer.
ExtendedVerification - Ignored here/
Returns:
EFI_SUCCESS
@@ -928,17 +928,17 @@ USBMouseRecoveryHandler (
IN VOID *Context
)
/*++
Routine Description:
Timer handler for Delayed Recovery timer.
Arguments:
Event - The Delayed Recovery event.
Context - Points to the USB_KB_DEV instance.
Returns:
--*/
--*/
{
USB_MOUSE_DEV *UsbMouseDev;
EFI_USB_IO_PROTOCOL *UsbIo;