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:
@ -321,7 +321,7 @@ CirrusLogic5430UgaDrawBlt (
|
|||||||
// We would not want a timer based event (Cursor, ...) to come in while we are
|
// We would not want a timer based event (Cursor, ...) to come in while we are
|
||||||
// doing this operation.
|
// doing this operation.
|
||||||
//
|
//
|
||||||
OriginalTPL = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
switch (BltOperation) {
|
switch (BltOperation) {
|
||||||
case EfiUgaVideoToBltBuffer:
|
case EfiUgaVideoToBltBuffer:
|
||||||
|
@ -2138,7 +2138,7 @@ EhciAsyncInterruptTransfer (
|
|||||||
//
|
//
|
||||||
if (!IsNewTransfer) {
|
if (!IsNewTransfer) {
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Status = DeleteAsyncRequestTransfer (
|
Status = DeleteAsyncRequestTransfer (
|
||||||
HcDev,
|
HcDev,
|
||||||
|
@ -239,7 +239,7 @@ Returns:
|
|||||||
MemoryHeader = HcDev->MemoryHeader;
|
MemoryHeader = HcDev->MemoryHeader;
|
||||||
ASSERT (MemoryHeader != NULL);
|
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)
|
// allocate unit is 32 bytes (align on 32 byte)
|
||||||
@ -297,7 +297,7 @@ Returns:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY + 1);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -353,7 +353,7 @@ Returns:
|
|||||||
UINTN Count;
|
UINTN Count;
|
||||||
UINTN RealAllocSize;
|
UINTN RealAllocSize;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
|
||||||
|
|
||||||
MemoryHeader = HcDev->MemoryHeader;
|
MemoryHeader = HcDev->MemoryHeader;
|
||||||
@ -419,7 +419,7 @@ Returns:
|
|||||||
// the TempHeaderPtr is pointing to nonsense content.
|
// the TempHeaderPtr is pointing to nonsense content.
|
||||||
//
|
//
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
FreeMemoryHeader (HcDev, TempHeaderPtr);
|
FreeMemoryHeader (HcDev, TempHeaderPtr);
|
||||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY + 1);
|
||||||
//
|
//
|
||||||
// reset the TempHeaderPtr, continue search for
|
// reset the TempHeaderPtr, continue search for
|
||||||
|
@ -253,7 +253,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
if (HcDev->Is64BitCapable != 0) {
|
if (HcDev->Is64BitCapable != 0) {
|
||||||
HcDev->High32BitAddr = (UINT32) GET_32B_TO_63B (FrameBuffer);
|
HcDev->High32BitAddr = (UINT32) GET_32B_TO_63B (FrameBuffer);
|
||||||
|
|
||||||
Status = SetCtrlDataStructSeg (HcDev);
|
Status = SetCtrlDataStructSeg (HcDev);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((gEHCErrorLevel, "EHCI: SetCtrlDataStructSeg Failed\n"));
|
DEBUG ((gEHCErrorLevel, "EHCI: SetCtrlDataStructSeg Failed\n"));
|
||||||
@ -347,8 +347,8 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
return gBS->CreateEvent (
|
return gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
HcDev,
|
HcDev,
|
||||||
&HcDev->AsyncRequestEvent
|
&HcDev->AsyncRequestEvent
|
||||||
@ -1868,7 +1868,7 @@ Returns:
|
|||||||
|
|
||||||
QhPtr->Qh.HeadReclamationFlag = FALSE;
|
QhPtr->Qh.HeadReclamationFlag = FALSE;
|
||||||
|
|
||||||
if (QhPtr->TransferType == ASYNC_INTERRUPT_TRANSFER) {
|
if (QhPtr->TransferType == ASYNC_INTERRUPT_TRANSFER) {
|
||||||
|
|
||||||
//
|
//
|
||||||
// AsyncInterruptTransfer Qh
|
// AsyncInterruptTransfer Qh
|
||||||
@ -2596,7 +2596,7 @@ Returns:
|
|||||||
*DataMap = NULL;
|
*DataMap = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
Copyright (c) 2006 - 2007 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
|
||||||
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.
|
||||||
|
|
||||||
@par Revision Reference:
|
@par Revision Reference:
|
||||||
This module is modified from DXE\IDE module for Ide Contriller Init support
|
This module is modified from DXE\IDE module for Ide Contriller Init support
|
||||||
@ -89,7 +89,7 @@ IDEBusDriverBindingSupported (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Close protocol, don't use device path protocol in the .Support() function
|
// 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.
|
BlockIo protocol on them.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@ -210,7 +210,7 @@ IDEBusDriverBindingStart (
|
|||||||
if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
|
if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now open the IDE_CONTROLLER_INIT protocol. Step7.1
|
// Now open the IDE_CONTROLLER_INIT protocol. Step7.1
|
||||||
//
|
//
|
||||||
@ -429,7 +429,7 @@ IDEBusDriverBindingStart (
|
|||||||
if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {
|
if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// The device has been scanned in another Start(), No need to scan it again
|
// The device has been scanned in another Start(), No need to scan it again
|
||||||
// for perf optimization.
|
// for perf optimization.
|
||||||
@ -437,7 +437,7 @@ IDEBusDriverBindingStart (
|
|||||||
if (IdeBusDriverPrivateData->HaveScannedDevice[IdeChannel * 2 + IdeDevice]) {
|
if (IdeBusDriverPrivateData->HaveScannedDevice[IdeChannel * 2 + IdeDevice]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// create child handle for the detected device.
|
// create child handle for the detected device.
|
||||||
//
|
//
|
||||||
@ -664,7 +664,7 @@ IDEBusDriverBindingStart (
|
|||||||
if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {
|
if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {
|
||||||
Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);
|
Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Record PIO mode used in private data
|
// Record PIO mode used in private data
|
||||||
//
|
//
|
||||||
@ -715,13 +715,13 @@ IDEBusDriverBindingStart (
|
|||||||
(EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),
|
(EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),
|
||||||
IdeBlkIoDevicePtr->DevicePath
|
IdeBlkIoDevicePtr->DevicePath
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create event to clear pending IDE interrupt
|
// Create event to clear pending IDE interrupt
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
ClearInterrupt,
|
ClearInterrupt,
|
||||||
IdeBlkIoDevicePtr,
|
IdeBlkIoDevicePtr,
|
||||||
&IdeBlkIoDevicePtr->ExitBootServiceEvent
|
&IdeBlkIoDevicePtr->ExitBootServiceEvent
|
||||||
@ -735,7 +735,7 @@ IDEBusDriverBindingStart (
|
|||||||
// end of 2nd outer loop ==========
|
// end of 2nd outer loop ==========
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// All configurations done! Notify IdeController to do post initialization
|
// All configurations done! Notify IdeController to do post initialization
|
||||||
// work such as saving IDE controller PCI settings for S3 resume
|
// 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 This Protocol instance pointer.
|
||||||
@param DeviceHandle Handle of device to stop driver on
|
@param DeviceHandle Handle of device to stop driver on
|
||||||
@ -1003,7 +1003,7 @@ DeRegisterIdeDevice (
|
|||||||
);
|
);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Release allocated resources
|
// Release allocated resources
|
||||||
//
|
//
|
||||||
@ -1037,7 +1037,7 @@ IDEBlkIoReset (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
|
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
|
||||||
//
|
//
|
||||||
@ -1058,7 +1058,7 @@ IDEBlkIoReset (
|
|||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// for ATAPI device, using ATAPI reset method
|
// for ATAPI device, using ATAPI reset method
|
||||||
//
|
//
|
||||||
@ -1099,7 +1099,7 @@ IDEBlkIoReadBlocks (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
|
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1127,7 +1127,7 @@ IDEBlkIoReadBlocks (
|
|||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// for ATAPI device, using ATAPI read block's mechanism
|
// for ATAPI device, using ATAPI read block's mechanism
|
||||||
//
|
//
|
||||||
@ -1172,8 +1172,8 @@ IDEBlkIoWriteBlocks (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
|
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);
|
||||||
//
|
//
|
||||||
// Requery IDE IO resources in case of the switch of native and legacy modes
|
// 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
|
// for ATA device, using ATA write block's mechanism
|
||||||
//
|
//
|
||||||
if (IdeBlkIoDevice->Type == IdeHardDisk ||
|
if (IdeBlkIoDevice->Type == IdeHardDisk ||
|
||||||
IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {
|
IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {
|
||||||
|
|
||||||
Status = AtaBlkIoWriteBlocks (
|
Status = AtaBlkIoWriteBlocks (
|
||||||
IdeBlkIoDevice,
|
IdeBlkIoDevice,
|
||||||
@ -1200,7 +1200,7 @@ IDEBlkIoWriteBlocks (
|
|||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// for ATAPI device, using ATAPI write block's mechanism
|
// for ATAPI device, using ATAPI write block's mechanism
|
||||||
//
|
//
|
||||||
@ -1211,7 +1211,7 @@ IDEBlkIoWriteBlocks (
|
|||||||
BufferSize,
|
BufferSize,
|
||||||
Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -693,7 +693,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Raise TPL to high level to disable timer interrupt while the BAR is probed
|
// 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);
|
PciIoWrite (PciIo, EfiPciIoWidthUint32, (UINT8) Offset, 1, &gAllOne);
|
||||||
PciIoRead (PciIo, EfiPciIoWidthUint32, (UINT8) Offset, 1, &Value);
|
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
|
// 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);
|
PciSetCommandRegister (PciIoDevice, *Command);
|
||||||
PciReadCommandRegister (PciIoDevice, Command);
|
PciReadCommandRegister (PciIoDevice, Command);
|
||||||
@ -784,7 +784,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Raise TPL to high level to disable timer interrupt while the BAR is probed
|
// 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);
|
PciSetBridgeControlRegister (PciIoDevice, *BridgeControl);
|
||||||
PciReadBridgeControlRegister (PciIoDevice, BridgeControl);
|
PciReadBridgeControlRegister (PciIoDevice, BridgeControl);
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, 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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
PciHotPlugSupport.c
|
PciHotPlugSupport.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Revision History
|
Revision History
|
||||||
|
|
||||||
@ -254,8 +254,8 @@ Returns:
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
PciHPCInitialized,
|
PciHPCInitialized,
|
||||||
gPciRootHpcData + HpIndex,
|
gPciRootHpcData + HpIndex,
|
||||||
&((gPciRootHpcData + HpIndex)->Event)
|
&((gPciRootHpcData + HpIndex)->Event)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, 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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ PXE_SW_UNDI *pxe = 0; // 3.0 entry point
|
|||||||
PXE_SW_UNDI *pxe_31 = 0; // 3.1 entry
|
PXE_SW_UNDI *pxe_31 = 0; // 3.1 entry
|
||||||
UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
|
UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
|
||||||
|
|
||||||
NII_TABLE *UnidiDataPointer=NULL;
|
NII_TABLE *UnidiDataPointer=NULL;
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -103,7 +103,7 @@ UndiNotifyExitBs (
|
|||||||
|
|
||||||
Routine Description:
|
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!
|
configuration table for UNDI to work at runtime!
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
@ -161,8 +161,8 @@ Returns:
|
|||||||
EFI_EVENT Event;
|
EFI_EVENT Event;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
UndiNotifyExitBs,
|
UndiNotifyExitBs,
|
||||||
NULL,
|
NULL,
|
||||||
&Event
|
&Event
|
||||||
@ -191,15 +191,15 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
|
|
||||||
Controller - Handle of device to test.
|
Controller - Handle of device to test.
|
||||||
|
|
||||||
RemainingDevicePath - Not used.
|
RemainingDevicePath - Not used.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - This driver supports this device.
|
EFI_SUCCESS - This driver supports this device.
|
||||||
|
|
||||||
other - This driver does not support this device.
|
other - This driver does not support this device.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -305,15 +305,15 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
|
|
||||||
Controller - Handle of device to work with.
|
Controller - Handle of device to work with.
|
||||||
|
|
||||||
RemainingDevicePath - Not used, always produce all possible children.
|
RemainingDevicePath - Not used, always produce all possible children.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - This driver is added to Controller.
|
EFI_SUCCESS - This driver is added to Controller.
|
||||||
|
|
||||||
other - This driver does not support this device.
|
other - This driver does not support this device.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -325,7 +325,7 @@ Returns:
|
|||||||
UINT16 NewCommand;
|
UINT16 NewCommand;
|
||||||
UINT8 *TmpPxePointer;
|
UINT8 *TmpPxePointer;
|
||||||
EFI_PCI_IO_PROTOCOL *PciIoFncs;
|
EFI_PCI_IO_PROTOCOL *PciIoFncs;
|
||||||
UINTN Len;
|
UINTN Len;
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
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) {
|
if (UnidiDataPointer != NULL) {
|
||||||
Status = gBS->FreePool(UnidiDataPointer);
|
Status = gBS->FreePool(UnidiDataPointer);
|
||||||
@ -553,7 +553,7 @@ Returns:
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto UndiErrorAllocDataPointer;
|
goto UndiErrorAllocDataPointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Open For Child Device
|
// Open For Child Device
|
||||||
//
|
//
|
||||||
@ -750,7 +750,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
UnqId - Runtime O/S routine might use this, this temp routine does not use it
|
UnqId - Runtime O/S routine might use this, this temp routine does not use it
|
||||||
|
|
||||||
MicroSeconds - Determines the length of pause.
|
MicroSeconds - Determines the length of pause.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -780,13 +780,13 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
UnqId - Runtime O/S routine may use this field, this temp routine does not.
|
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.
|
ReadWrite - Determine if it is an I/O or Memory Read/Write Operation.
|
||||||
|
|
||||||
Len - Determines the width of the data operation.
|
Len - Determines the width of the data operation.
|
||||||
|
|
||||||
Port - What port to Read/Write from.
|
Port - What port to Read/Write from.
|
||||||
|
|
||||||
BuffAddr - Address to read to or write from.
|
BuffAddr - Address to read to or write from.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -880,15 +880,15 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
DevPtr - Pointer which will point to the newly created device path with the MAC node attached.
|
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.
|
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..
|
AdapterInfo - Pointer to the NIC data structure information which the UNDI driver is layering on..
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - A MAC address was successfully appended to the Base Device Path.
|
EFI_SUCCESS - A MAC address was successfully appended to the Base Device Path.
|
||||||
|
|
||||||
other - Not enough resources available to create new Device Path node.
|
other - Not enough resources available to create new Device Path node.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -1020,7 +1020,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - Install a GUID/Pointer pair into the system's configuration table.
|
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.
|
other - Did not successfully install the GUID/Pointer pair into the configuration table.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -1036,12 +1036,12 @@ Returns:
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UnidiDataPointer == NULL) {
|
if(UnidiDataPointer == NULL) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
UndiData = (NII_TABLE *)UnidiDataPointer;
|
UndiData = (NII_TABLE *)UnidiDataPointer;
|
||||||
|
|
||||||
UndiData->NumEntries = pxe_31->IFcnt;
|
UndiData->NumEntries = pxe_31->IFcnt;
|
||||||
UndiData->NextLink = NULL;
|
UndiData->NextLink = NULL;
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ Returns:
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
|
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ Returns:
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
|
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ Returns:
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
|
ScsiDiskDevice = SCSI_DISK_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,18 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
EfiKey.c
|
EfiKey.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
USB Keyboard Driver
|
USB Keyboard Driver
|
||||||
@ -80,18 +80,18 @@ USBKeyboardDriverBindingSupported (
|
|||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Supported.
|
Supported.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - EFI_DRIVER_BINDING_PROTOCOL
|
This - EFI_DRIVER_BINDING_PROTOCOL
|
||||||
Controller - Controller handle
|
Controller - Controller handle
|
||||||
RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL
|
RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL
|
||||||
Returns:
|
Returns:
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS OpenStatus;
|
EFI_STATUS OpenStatus;
|
||||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||||
@ -111,7 +111,7 @@ USBKeyboardDriverBindingSupported (
|
|||||||
if (EFI_ERROR (OpenStatus)) {
|
if (EFI_ERROR (OpenStatus)) {
|
||||||
return OpenStatus;
|
return OpenStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Use the USB I/O protocol interface to check whether the Controller is
|
// Use the USB I/O protocol interface to check whether the Controller is
|
||||||
// the Keyboard controller that can be managed by this driver.
|
// the Keyboard controller that can be managed by this driver.
|
||||||
@ -140,10 +140,10 @@ USBKeyboardDriverBindingStart (
|
|||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Start.
|
Start.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - EFI_DRIVER_BINDING_PROTOCOL
|
This - EFI_DRIVER_BINDING_PROTOCOL
|
||||||
Controller - Controller handle
|
Controller - Controller handle
|
||||||
@ -152,8 +152,8 @@ USBKeyboardDriverBindingStart (
|
|||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_OUT_OF_RESOURCES - Can't allocate memory
|
EFI_OUT_OF_RESOURCES - Can't allocate memory
|
||||||
EFI_UNSUPPORTED - The Start routine fail
|
EFI_UNSUPPORTED - The Start routine fail
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
@ -164,7 +164,7 @@ USBKeyboardDriverBindingStart (
|
|||||||
UINT8 PollingInterval;
|
UINT8 PollingInterval;
|
||||||
UINT8 PacketSize;
|
UINT8 PacketSize;
|
||||||
BOOLEAN Found;
|
BOOLEAN Found;
|
||||||
|
|
||||||
UsbKeyboardDevice = NULL;
|
UsbKeyboardDevice = NULL;
|
||||||
Found = FALSE;
|
Found = FALSE;
|
||||||
|
|
||||||
@ -283,8 +283,8 @@ USBKeyboardDriverBindingStart (
|
|||||||
UsbKeyboardDevice->SimpleInput.Reset = USBKeyboardReset;
|
UsbKeyboardDevice->SimpleInput.Reset = USBKeyboardReset;
|
||||||
UsbKeyboardDevice->SimpleInput.ReadKeyStroke = USBKeyboardReadKeyStroke;
|
UsbKeyboardDevice->SimpleInput.ReadKeyStroke = USBKeyboardReadKeyStroke;
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
USBKeyboardWaitForKey,
|
USBKeyboardWaitForKey,
|
||||||
UsbKeyboardDevice,
|
UsbKeyboardDevice,
|
||||||
&(UsbKeyboardDevice->SimpleInput.WaitForKey)
|
&(UsbKeyboardDevice->SimpleInput.WaitForKey)
|
||||||
@ -300,7 +300,7 @@ USBKeyboardDriverBindingStart (
|
|||||||
);
|
);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install simple txt in protocol interface
|
// Install simple txt in protocol interface
|
||||||
// for the usb keyboard device.
|
// for the usb keyboard device.
|
||||||
@ -328,7 +328,7 @@ USBKeyboardDriverBindingStart (
|
|||||||
);
|
);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Reset USB Keyboard Device
|
// Reset USB Keyboard Device
|
||||||
//
|
//
|
||||||
@ -414,19 +414,19 @@ USBKeyboardDriverBindingStop (
|
|||||||
IN EFI_HANDLE *ChildHandleBuffer
|
IN EFI_HANDLE *ChildHandleBuffer
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Stop.
|
Stop.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - EFI_DRIVER_BINDING_PROTOCOL
|
This - EFI_DRIVER_BINDING_PROTOCOL
|
||||||
Controller - Controller handle
|
Controller - Controller handle
|
||||||
NumberOfChildren - Child handle number
|
NumberOfChildren - Child handle number
|
||||||
ChildHandleBuffer - Child handle buffer
|
ChildHandleBuffer - Child handle buffer
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_UNSUPPORTED - Can't support
|
EFI_UNSUPPORTED - Can't support
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_SIMPLE_TEXT_IN_PROTOCOL *SimpleInput;
|
EFI_SIMPLE_TEXT_IN_PROTOCOL *SimpleInput;
|
||||||
@ -443,7 +443,7 @@ USBKeyboardDriverBindingStop (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get USB_KB_DEV instance.
|
// Get USB_KB_DEV instance.
|
||||||
//
|
//
|
||||||
@ -522,17 +522,17 @@ USBKeyboardReset (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.Reset() function.
|
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.Reset() function.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
|
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
|
||||||
ExtendedVerification
|
ExtendedVerification
|
||||||
Indicates that the driver may perform a more exhaustive
|
Indicates that the driver may perform a more exhaustive
|
||||||
verification operation of the device during reset.
|
verification operation of the device during reset.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_DEVICE_ERROR - Hardware Error
|
EFI_DEVICE_ERROR - Hardware Error
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
@ -563,7 +563,7 @@ USBKeyboardReset (
|
|||||||
UsbKeyboardDevice->CurKeyChar = 0;
|
UsbKeyboardDevice->CurKeyChar = 0;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Exhaustive reset
|
// Exhaustive reset
|
||||||
//
|
//
|
||||||
@ -587,15 +587,15 @@ USBKeyboardReadKeyStroke (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.ReadKeyStroke() function.
|
Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.ReadKeyStroke() function.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
|
This The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.
|
||||||
Key A pointer to a buffer that is filled in with the keystroke
|
Key A pointer to a buffer that is filled in with the keystroke
|
||||||
information for the key that was pressed.
|
information for the key that was pressed.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -640,15 +640,15 @@ USBKeyboardWaitForKey (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Handler function for WaitForKey event.
|
Handler function for WaitForKey event.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Event Event to be signaled when a key is pressed.
|
Event Event to be signaled when a key is pressed.
|
||||||
Context Points to USB_KB_DEV instance.
|
Context Points to USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
VOID
|
VOID
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
|
|
||||||
@ -676,13 +676,13 @@ USBKeyboardCheckForKey (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Check whether there is key pending.
|
Check whether there is key pending.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
UsbKeyboardDevice The USB_KB_DEV instance.
|
UsbKeyboardDevice The USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT8 KeyChar;
|
UINT8 KeyChar;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
Keyboard.c
|
Keyboard.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Helper functions for USB Keyboard Driver
|
Helper functions for USB Keyboard Driver
|
||||||
@ -85,8 +85,8 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = {
|
|||||||
{ SCAN_NULL, 0x00, 0x00 }, // 0x39 CapsLock
|
{ SCAN_NULL, 0x00, 0x00 }, // 0x39 CapsLock
|
||||||
{ SCAN_F1, 0x00, 0x00 }, // 0x3A
|
{ SCAN_F1, 0x00, 0x00 }, // 0x3A
|
||||||
{ SCAN_F2, 0x00, 0x00 }, // 0x3B
|
{ SCAN_F2, 0x00, 0x00 }, // 0x3B
|
||||||
{ SCAN_F3, 0x00, 0x00 }, // 0x3C
|
{ SCAN_F3, 0x00, 0x00 }, // 0x3C
|
||||||
{ SCAN_F4, 0x00, 0x00 }, // 0x3D
|
{ SCAN_F4, 0x00, 0x00 }, // 0x3D
|
||||||
{ SCAN_F5, 0x00, 0x00 }, // 0x3E
|
{ SCAN_F5, 0x00, 0x00 }, // 0x3E
|
||||||
{ SCAN_F6, 0x00, 0x00 }, // 0x3F
|
{ SCAN_F6, 0x00, 0x00 }, // 0x3F
|
||||||
{ SCAN_F7, 0x00, 0x00 }, // 0x40
|
{ SCAN_F7, 0x00, 0x00 }, // 0x40
|
||||||
@ -132,14 +132,14 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
STATIC KB_MODIFIER KB_Mod[8] = {
|
STATIC KB_MODIFIER KB_Mod[8] = {
|
||||||
{ MOD_CONTROL_L, 0xe0 }, // 11100000
|
{ MOD_CONTROL_L, 0xe0 }, // 11100000
|
||||||
{ MOD_CONTROL_R, 0xe4 }, // 11100100
|
{ MOD_CONTROL_R, 0xe4 }, // 11100100
|
||||||
{ MOD_SHIFT_L, 0xe1 }, // 11100001
|
{ MOD_SHIFT_L, 0xe1 }, // 11100001
|
||||||
{ MOD_SHIFT_R, 0xe5 }, // 11100101
|
{ MOD_SHIFT_R, 0xe5 }, // 11100101
|
||||||
{ MOD_ALT_L, 0xe2 }, // 11100010
|
{ MOD_ALT_L, 0xe2 }, // 11100010
|
||||||
{ MOD_ALT_R, 0xe6 }, // 11100110
|
{ MOD_ALT_R, 0xe6 }, // 11100110
|
||||||
{ MOD_WIN_L, 0xe3 }, // 11100011
|
{ MOD_WIN_L, 0xe3 }, // 11100011
|
||||||
{ MOD_WIN_R, 0xe7 } // 11100111
|
{ MOD_WIN_R, 0xe7 } // 11100111
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -148,16 +148,16 @@ IsUSBKeyboard (
|
|||||||
IN EFI_USB_IO_PROTOCOL *UsbIo
|
IN EFI_USB_IO_PROTOCOL *UsbIo
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Uses USB I/O to check whether the device is a USB Keyboard device.
|
Uses USB I/O to check whether the device is a USB Keyboard device.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
UsbIo: Points to a USB I/O protocol instance.
|
UsbIo: Points to a USB I/O protocol instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
|
EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
|
||||||
@ -192,13 +192,13 @@ InitUSBKeyboard (
|
|||||||
IN USB_KB_DEV *UsbKeyboardDevice
|
IN USB_KB_DEV *UsbKeyboardDevice
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Initialize USB Keyboard device and all private data structures.
|
Initialize USB Keyboard device and all private data structures.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
UsbKeyboardDevice The USB_KB_DEV instance.
|
UsbKeyboardDevice The USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_DEVICE_ERROR - Hardware Error
|
EFI_DEVICE_ERROR - Hardware Error
|
||||||
@ -289,7 +289,7 @@ InitUSBKeyboard (
|
|||||||
UsbKeyboardDevice->ShiftOn = 0;
|
UsbKeyboardDevice->ShiftOn = 0;
|
||||||
UsbKeyboardDevice->NumLockOn = 0;
|
UsbKeyboardDevice->NumLockOn = 0;
|
||||||
UsbKeyboardDevice->CapsOn = 0;
|
UsbKeyboardDevice->CapsOn = 0;
|
||||||
UsbKeyboardDevice->ScrollOn = 0;
|
UsbKeyboardDevice->ScrollOn = 0;
|
||||||
ZeroMem (UsbKeyboardDevice->LastKeyCodeArray, sizeof (UINT8) * 8);
|
ZeroMem (UsbKeyboardDevice->LastKeyCodeArray, sizeof (UINT8) * 8);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -301,8 +301,8 @@ InitUSBKeyboard (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
USBKeyboardRepeatHandler,
|
USBKeyboardRepeatHandler,
|
||||||
UsbKeyboardDevice,
|
UsbKeyboardDevice,
|
||||||
&UsbKeyboardDevice->RepeatTimer
|
&UsbKeyboardDevice->RepeatTimer
|
||||||
@ -314,8 +314,8 @@ InitUSBKeyboard (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
USBKeyboardRecoveryHandler,
|
USBKeyboardRecoveryHandler,
|
||||||
UsbKeyboardDevice,
|
UsbKeyboardDevice,
|
||||||
&UsbKeyboardDevice->DelayedRecoveryEvent
|
&UsbKeyboardDevice->DelayedRecoveryEvent
|
||||||
@ -333,21 +333,21 @@ KeyboardHandler (
|
|||||||
IN UINT32 Result
|
IN UINT32 Result
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Handler function for USB Keyboard's asynchronous interrupt transfer.
|
Handler function for USB Keyboard's asynchronous interrupt transfer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Data A pointer to a buffer that is filled with key data which is
|
Data A pointer to a buffer that is filled with key data which is
|
||||||
retrieved via asynchronous interrupt transfer.
|
retrieved via asynchronous interrupt transfer.
|
||||||
DataLength Indicates the size of the data buffer.
|
DataLength Indicates the size of the data buffer.
|
||||||
Context Pointing to USB_KB_DEV instance.
|
Context Pointing to USB_KB_DEV instance.
|
||||||
Result Indicates the result of the asynchronous interrupt transfer.
|
Result Indicates the result of the asynchronous interrupt transfer.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_DEVICE_ERROR - Hardware Error
|
EFI_DEVICE_ERROR - Hardware Error
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||||
@ -402,11 +402,11 @@ KeyboardHandler (
|
|||||||
&UsbStatus
|
&UsbStatus
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Delete & Submit this interrupt again
|
// Delete & Submit this interrupt again
|
||||||
//
|
//
|
||||||
|
|
||||||
UsbIo->UsbAsyncInterruptTransfer (
|
UsbIo->UsbAsyncInterruptTransfer (
|
||||||
UsbIo,
|
UsbIo,
|
||||||
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
|
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
|
||||||
@ -446,7 +446,7 @@ KeyboardHandler (
|
|||||||
if (Index == 8) {
|
if (Index == 8) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse the modifier key
|
// Parse the modifier key
|
||||||
//
|
//
|
||||||
@ -469,7 +469,7 @@ KeyboardHandler (
|
|||||||
InsertKeyCode (&(UsbKeyboardDevice->KeyboardBuffer), KB_Mod[Index].Key, Down);
|
InsertKeyCode (&(UsbKeyboardDevice->KeyboardBuffer), KB_Mod[Index].Key, Down);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// handle normal key's releasing situation
|
// handle normal key's releasing situation
|
||||||
//
|
//
|
||||||
@ -507,7 +507,7 @@ KeyboardHandler (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// original repeat key is released, cancel the repeat timer
|
// original repeat key is released, cancel the repeat timer
|
||||||
//
|
//
|
||||||
@ -518,7 +518,7 @@ KeyboardHandler (
|
|||||||
USBKBD_REPEAT_RATE
|
USBKBD_REPEAT_RATE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// handle normal key's pressing situation
|
// handle normal key's pressing situation
|
||||||
//
|
//
|
||||||
@ -558,7 +558,7 @@ KeyboardHandler (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update LastKeycodeArray[] buffer in the
|
// Update LastKeycodeArray[] buffer in the
|
||||||
// Usb Keyboard Device data structure.
|
// Usb Keyboard Device data structure.
|
||||||
@ -566,7 +566,7 @@ KeyboardHandler (
|
|||||||
for (Index = 0; Index < 8; Index++) {
|
for (Index = 0; Index < 8; Index++) {
|
||||||
UsbKeyboardDevice->LastKeyCodeArray[Index] = CurKeyCodeBuffer[Index];
|
UsbKeyboardDevice->LastKeyCodeArray[Index] = CurKeyCodeBuffer[Index];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// pre-process KeyboardBuffer, pop out the ctrl,alt,del key in sequence
|
// pre-process KeyboardBuffer, pop out the ctrl,alt,del key in sequence
|
||||||
// and judge whether it will invoke reset event.
|
// and judge whether it will invoke reset event.
|
||||||
@ -611,7 +611,7 @@ KeyboardHandler (
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// insert the key back to the buffer.
|
// insert the key back to the buffer.
|
||||||
// so the key sequence will not be destroyed.
|
// so the key sequence will not be destroyed.
|
||||||
@ -651,18 +651,18 @@ USBParseKey (
|
|||||||
OUT UINT8 *KeyChar
|
OUT UINT8 *KeyChar
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Retrieves a key character after parsing the raw data in keyboard buffer.
|
Retrieves a key character after parsing the raw data in keyboard buffer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
UsbKeyboardDevice The USB_KB_DEV instance.
|
UsbKeyboardDevice The USB_KB_DEV instance.
|
||||||
KeyChar Points to the Key character after key parsing.
|
KeyChar Points to the Key character after key parsing.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_NOT_READY - Device is not ready
|
EFI_NOT_READY - Device is not ready
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
USB_KEY UsbKey;
|
USB_KEY UsbKey;
|
||||||
|
|
||||||
@ -698,7 +698,7 @@ USBParseKey (
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Analyzes key pressing situation
|
// Analyzes key pressing situation
|
||||||
//
|
//
|
||||||
@ -762,7 +762,7 @@ USBParseKey (
|
|||||||
UsbKeyboardDevice->ScrollOn ^= 1;
|
UsbKeyboardDevice->ScrollOn ^= 1;
|
||||||
SetKeyLED (UsbKeyboardDevice);
|
SetKeyLED (UsbKeyboardDevice);
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case 0x48:
|
case 0x48:
|
||||||
//
|
//
|
||||||
// fall through
|
// fall through
|
||||||
@ -775,7 +775,7 @@ USBParseKey (
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// When encountered Del Key...
|
// When encountered Del Key...
|
||||||
//
|
//
|
||||||
@ -801,15 +801,15 @@ USBKeyCodeToEFIScanCode (
|
|||||||
OUT EFI_INPUT_KEY *Key
|
OUT EFI_INPUT_KEY *Key
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Converts USB Keyboard code to EFI Scan Code.
|
Converts USB Keyboard code to EFI Scan Code.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
UsbKeyboardDevice The USB_KB_DEV instance.
|
UsbKeyboardDevice The USB_KB_DEV instance.
|
||||||
KeyChar Indicates the key code that will be interpreted.
|
KeyChar Indicates the key code that will be interpreted.
|
||||||
Key A pointer to a buffer that is filled in with
|
Key A pointer to a buffer that is filled in with
|
||||||
the keystroke information for the key that
|
the keystroke information for the key that
|
||||||
was pressed.
|
was pressed.
|
||||||
Returns:
|
Returns:
|
||||||
EFI_NOT_READY - Device is not ready
|
EFI_NOT_READY - Device is not ready
|
||||||
@ -821,7 +821,7 @@ USBKeyCodeToEFIScanCode (
|
|||||||
if (!USBKBD_VALID_KEYCODE (KeyChar)) {
|
if (!USBKBD_VALID_KEYCODE (KeyChar)) {
|
||||||
return EFI_NOT_READY;
|
return EFI_NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// valid USB Key Code starts from 4
|
// valid USB Key Code starts from 4
|
||||||
//
|
//
|
||||||
@ -881,16 +881,16 @@ InitUSBKeyBuffer (
|
|||||||
IN OUT USB_KB_BUFFER *KeyboardBuffer
|
IN OUT USB_KB_BUFFER *KeyboardBuffer
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Resets USB Keyboard Buffer.
|
Resets USB Keyboard Buffer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
KeyboardBuffer - Points to the USB Keyboard Buffer.
|
KeyboardBuffer - Points to the USB Keyboard Buffer.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
ZeroMem (KeyboardBuffer, sizeof (USB_KB_BUFFER));
|
ZeroMem (KeyboardBuffer, sizeof (USB_KB_BUFFER));
|
||||||
|
|
||||||
@ -904,15 +904,15 @@ IsUSBKeyboardBufferEmpty (
|
|||||||
IN USB_KB_BUFFER *KeyboardBuffer
|
IN USB_KB_BUFFER *KeyboardBuffer
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Check whether USB Keyboard buffer is empty.
|
Check whether USB Keyboard buffer is empty.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
KeyboardBuffer - USB Keyboard Buffer.
|
KeyboardBuffer - USB Keyboard Buffer.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@ -927,18 +927,18 @@ IsUSBKeyboardBufferFull (
|
|||||||
IN USB_KB_BUFFER *KeyboardBuffer
|
IN USB_KB_BUFFER *KeyboardBuffer
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Check whether USB Keyboard buffer is full.
|
Check whether USB Keyboard buffer is full.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
KeyboardBuffer - USB Keyboard Buffer.
|
KeyboardBuffer - USB Keyboard Buffer.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
return (BOOLEAN)(((KeyboardBuffer->bTail + 1) % (MAX_KEY_ALLOWED + 1)) ==
|
return (BOOLEAN)(((KeyboardBuffer->bTail + 1) % (MAX_KEY_ALLOWED + 1)) ==
|
||||||
KeyboardBuffer->bHead);
|
KeyboardBuffer->bHead);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -950,10 +950,10 @@ InsertKeyCode (
|
|||||||
IN UINT8 Down
|
IN UINT8 Down
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Inserts a key code into keyboard buffer.
|
Inserts a key code into keyboard buffer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
KeyboardBuffer - Points to the USB Keyboard Buffer.
|
KeyboardBuffer - Points to the USB Keyboard Buffer.
|
||||||
Key - Key code
|
Key - Key code
|
||||||
@ -989,18 +989,18 @@ RemoveKeyCode (
|
|||||||
OUT USB_KEY *UsbKey
|
OUT USB_KEY *UsbKey
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Pops a key code off from keyboard buffer.
|
Pops a key code off from keyboard buffer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
KeyboardBuffer - Points to the USB Keyboard Buffer.
|
KeyboardBuffer - Points to the USB Keyboard Buffer.
|
||||||
UsbKey - Points to the buffer that contains a usb key code.
|
UsbKey - Points to the buffer that contains a usb key code.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
EFI_DEVICE_ERROR - Hardware Error
|
EFI_DEVICE_ERROR - Hardware Error
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
if (IsUSBKeyboardBufferEmpty (KeyboardBuffer)) {
|
if (IsUSBKeyboardBufferEmpty (KeyboardBuffer)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
@ -1022,16 +1022,16 @@ SetKeyLED (
|
|||||||
IN USB_KB_DEV *UsbKeyboardDevice
|
IN USB_KB_DEV *UsbKeyboardDevice
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Sets USB Keyboard LED state.
|
Sets USB Keyboard LED state.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
UsbKeyboardDevice - The USB_KB_DEV instance.
|
UsbKeyboardDevice - The USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Success
|
EFI_SUCCESS - Success
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
LED_MAP Led;
|
LED_MAP Led;
|
||||||
UINT8 ReportId;
|
UINT8 ReportId;
|
||||||
@ -1041,7 +1041,7 @@ SetKeyLED (
|
|||||||
//
|
//
|
||||||
Led.NumLock = (UINT8) UsbKeyboardDevice->NumLockOn;
|
Led.NumLock = (UINT8) UsbKeyboardDevice->NumLockOn;
|
||||||
Led.CapsLock = (UINT8) UsbKeyboardDevice->CapsOn;
|
Led.CapsLock = (UINT8) UsbKeyboardDevice->CapsOn;
|
||||||
Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;
|
Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;
|
||||||
Led.Resrvd = 0;
|
Led.Resrvd = 0;
|
||||||
|
|
||||||
ReportId = 0;
|
ReportId = 0;
|
||||||
@ -1067,17 +1067,17 @@ USBKeyboardRepeatHandler (
|
|||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Timer handler for Repeat Key timer.
|
Timer handler for Repeat Key timer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Event - The Repeat Key event.
|
Event - The Repeat Key event.
|
||||||
Context - Points to the USB_KB_DEV instance.
|
Context - Points to the USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
|
|
||||||
@ -1115,17 +1115,17 @@ USBKeyboardRecoveryHandler (
|
|||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Timer handler for Delayed Recovery timer.
|
Timer handler for Delayed Recovery timer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Event - The Delayed Recovery event.
|
Event - The Delayed Recovery event.
|
||||||
Context - Points to the USB_KB_DEV instance.
|
Context - Points to the USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
|
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
|
@ -352,7 +352,7 @@ USBFloppyReset (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
UsbFloppyDevice = USB_FLOPPY_DEV_FROM_THIS (This);
|
UsbFloppyDevice = USB_FLOPPY_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ USBFloppyReadBlocks (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
UsbFloppyTestUnitReady (UsbFloppyDevice);
|
UsbFloppyTestUnitReady (UsbFloppyDevice);
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ USBFloppyWriteBlocks (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
UsbFloppyTestUnitReady (UsbFloppyDevice);
|
UsbFloppyTestUnitReady (UsbFloppyDevice);
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ USBMouseDriverBindingSupported (
|
|||||||
if (OpenStatus == EFI_ALREADY_STARTED) {
|
if (OpenStatus == EFI_ALREADY_STARTED) {
|
||||||
return EFI_ALREADY_STARTED;
|
return EFI_ALREADY_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Use the USB I/O protocol interface to see the Controller is
|
// Use the USB I/O protocol interface to see the Controller is
|
||||||
// the Mouse controller that can be managed by this driver.
|
// the Mouse controller that can be managed by this driver.
|
||||||
@ -283,8 +283,8 @@ USBMouseDriverBindingStart (
|
|||||||
UsbMouseDevice->SimplePointerProtocol.Mode = &UsbMouseDevice->Mode;
|
UsbMouseDevice->SimplePointerProtocol.Mode = &UsbMouseDevice->Mode;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
UsbMouseWaitForInput,
|
UsbMouseWaitForInput,
|
||||||
UsbMouseDevice,
|
UsbMouseDevice,
|
||||||
&((UsbMouseDevice->SimplePointerProtocol).WaitForInput)
|
&((UsbMouseDevice->SimplePointerProtocol).WaitForInput)
|
||||||
@ -304,13 +304,13 @@ USBMouseDriverBindingStart (
|
|||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto ErrorExit;
|
goto ErrorExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// After Enabling Async Interrupt Transfer on this mouse Device
|
// After Enabling Async Interrupt Transfer on this mouse Device
|
||||||
// we will be able to get key data from it. Thus this is deemed as
|
// we will be able to get key data from it. Thus this is deemed as
|
||||||
// the enable action of the mouse
|
// the enable action of the mouse
|
||||||
//
|
//
|
||||||
|
|
||||||
MouseReportStatusCode (
|
MouseReportStatusCode (
|
||||||
UsbMouseDevice->DevicePath,
|
UsbMouseDevice->DevicePath,
|
||||||
EFI_PROGRESS_CODE,
|
EFI_PROGRESS_CODE,
|
||||||
@ -677,8 +677,8 @@ InitializeUsbMouseDevice (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
USBMouseRecoveryHandler,
|
USBMouseRecoveryHandler,
|
||||||
UsbMouseDev,
|
UsbMouseDev,
|
||||||
&UsbMouseDev->DelayedRecoveryEvent
|
&UsbMouseDev->DelayedRecoveryEvent
|
||||||
@ -805,11 +805,11 @@ GetMouseState (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Get the mouse state, see SIMPLE POINTER PROTOCOL.
|
Get the mouse state, see SIMPLE POINTER PROTOCOL.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
MouseState - Current mouse state
|
MouseState - Current mouse state
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
@ -858,11 +858,11 @@ UsbMouseReset (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Reset the mouse device, see SIMPLE POINTER PROTOCOL.
|
Reset the mouse device, see SIMPLE POINTER PROTOCOL.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
ExtendedVerification - Ignored here/
|
ExtendedVerification - Ignored here/
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
|
|
||||||
@ -928,17 +928,17 @@ USBMouseRecoveryHandler (
|
|||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Timer handler for Delayed Recovery timer.
|
Timer handler for Delayed Recovery timer.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
Event - The Delayed Recovery event.
|
Event - The Delayed Recovery event.
|
||||||
Context - Points to the USB_KB_DEV instance.
|
Context - Points to the USB_KB_DEV instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
USB_MOUSE_DEV *UsbMouseDev;
|
USB_MOUSE_DEV *UsbMouseDev;
|
||||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||||
|
@ -66,7 +66,7 @@ LIST_ENTRY mFvHandleList = INITIALIZE_LIST_HEAD_VARIABLE (mFvHandleList);
|
|||||||
//
|
//
|
||||||
// Lock for mDiscoveredList, mScheduledQueue, gDispatcherRunning.
|
// Lock for mDiscoveredList, mScheduledQueue, gDispatcherRunning.
|
||||||
//
|
//
|
||||||
EFI_LOCK mDispatcherLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL);
|
EFI_LOCK mDispatcherLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1126,7 +1126,7 @@ Returns:
|
|||||||
{
|
{
|
||||||
mFwVolEvent = CoreCreateProtocolNotifyEvent (
|
mFwVolEvent = CoreCreateProtocolNotifyEvent (
|
||||||
&gEfiFirmwareVolumeProtocolGuid,
|
&gEfiFirmwareVolumeProtocolGuid,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
CoreFwVolEventProtocolNotify,
|
CoreFwVolEventProtocolNotify,
|
||||||
NULL,
|
NULL,
|
||||||
&mFwVolEventRegistration,
|
&mFwVolEventRegistration,
|
||||||
|
@ -216,8 +216,8 @@ Returns:
|
|||||||
// Create the event
|
// Create the event
|
||||||
//
|
//
|
||||||
Status = CoreCreateEvent (
|
Status = CoreCreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
GenericArchProtocolNotify,
|
GenericArchProtocolNotify,
|
||||||
NULL,
|
NULL,
|
||||||
&Entry->Event
|
&Entry->Event
|
||||||
|
@ -30,30 +30,30 @@ UINT32 mEventTable[] = {
|
|||||||
// 0x80000200 Timer event with a notification function that is
|
// 0x80000200 Timer event with a notification function that is
|
||||||
// queue when the event is signaled with SignalEvent()
|
// queue when the event is signaled with SignalEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
//
|
//
|
||||||
// 0x80000000 Timer event without a notification function. It can be
|
// 0x80000000 Timer event without a notification function. It can be
|
||||||
// signaled with SignalEvent() and checked with CheckEvent() or WaitForEvent().
|
// signaled with SignalEvent() and checked with CheckEvent() or WaitForEvent().
|
||||||
//
|
//
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
//
|
//
|
||||||
// 0x00000100 Generic event with a notification function that
|
// 0x00000100 Generic event with a notification function that
|
||||||
// can be waited on with CheckEvent() or WaitForEvent()
|
// can be waited on with CheckEvent() or WaitForEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
//
|
//
|
||||||
// 0x00000200 Generic event with a notification function that
|
// 0x00000200 Generic event with a notification function that
|
||||||
// is queue when the event is signaled with SignalEvent()
|
// is queue when the event is signaled with SignalEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
//
|
//
|
||||||
// 0x00000201 ExitBootServicesEvent.
|
// 0x00000201 ExitBootServicesEvent.
|
||||||
//
|
//
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
//
|
//
|
||||||
// 0x60000202 SetVirtualAddressMapEvent.
|
// 0x60000202 SetVirtualAddressMapEvent.
|
||||||
//
|
//
|
||||||
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
|
|
||||||
//
|
//
|
||||||
// 0x00000000 Generic event without a notification function.
|
// 0x00000000 Generic event without a notification function.
|
||||||
@ -65,7 +65,7 @@ UINT32 mEventTable[] = {
|
|||||||
// 0x80000100 Timer event with a notification function that can be
|
// 0x80000100 Timer event with a notification function that can be
|
||||||
// waited on with CheckEvent() or WaitForEvent()
|
// waited on with CheckEvent() or WaitForEvent()
|
||||||
//
|
//
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_WAIT,
|
EVT_TIMER | EVT_NOTIFY_WAIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
@ -139,7 +139,7 @@ Returns:
|
|||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
for (Index=0; Index <= EFI_TPL_HIGH_LEVEL; Index++) {
|
for (Index=0; Index <= TPL_HIGH_LEVEL; Index++) {
|
||||||
InitializeListHead (&gEventQueue[Index]);
|
InitializeListHead (&gEventQueue[Index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ Returns:
|
|||||||
// Only clear the SIGNAL status if it is a SIGNAL type event.
|
// Only clear the SIGNAL status if it is a SIGNAL type event.
|
||||||
// WAIT type events are only cleared in CheckEvent()
|
// WAIT type events are only cleared in CheckEvent()
|
||||||
//
|
//
|
||||||
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
|
if (Event->Type & EVT_NOTIFY_SIGNAL) {
|
||||||
Event->SignalCount = 0;
|
Event->SignalCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,9 +332,9 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Convert EFI 1.10 Events to thier UEFI 2.0 CreateEventEx mapping
|
// Convert EFI 1.10 Events to thier UEFI 2.0 CreateEventEx mapping
|
||||||
//
|
//
|
||||||
if (Type == EVENT_SIGNAL_EXIT_BOOT_SERVICES) {
|
if (Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) {
|
||||||
GuidPtr = &gEfiEventExitBootServicesGuid;
|
GuidPtr = &gEfiEventExitBootServicesGuid;
|
||||||
} else if (Type == EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
|
} else if (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
|
||||||
GuidPtr = &gEfiEventVirtualAddressChangeGuid;
|
GuidPtr = &gEfiEventVirtualAddressChangeGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ Returns:
|
|||||||
INTN Index;
|
INTN Index;
|
||||||
|
|
||||||
|
|
||||||
if ((Event == NULL) || (NotifyTpl == EFI_TPL_APPLICATION)) {
|
if ((Event == NULL) || (NotifyTpl == TPL_APPLICATION)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -399,13 +399,13 @@ Returns:
|
|||||||
//
|
//
|
||||||
// If it's a notify type of event, check its parameters
|
// If it's a notify type of event, check its parameters
|
||||||
//
|
//
|
||||||
if ((Type & (EFI_EVENT_NOTIFY_WAIT | EFI_EVENT_NOTIFY_SIGNAL))) {
|
if ((Type & (EVT_NOTIFY_WAIT | EVT_NOTIFY_SIGNAL))) {
|
||||||
//
|
//
|
||||||
// Check for an invalid NotifyFunction or NotifyTpl
|
// Check for an invalid NotifyFunction or NotifyTpl
|
||||||
//
|
//
|
||||||
if ((NotifyFunction == NULL) ||
|
if ((NotifyFunction == NULL) ||
|
||||||
(NotifyTpl < EFI_TPL_APPLICATION) ||
|
(NotifyTpl < TPL_APPLICATION) ||
|
||||||
(NotifyTpl >= EFI_TPL_HIGH_LEVEL)) {
|
(NotifyTpl >= TPL_HIGH_LEVEL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ Returns:
|
|||||||
// Allcoate and initialize a new event structure.
|
// Allcoate and initialize a new event structure.
|
||||||
//
|
//
|
||||||
Status = CoreAllocatePool (
|
Status = CoreAllocatePool (
|
||||||
(Type & EFI_EVENT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
|
(Type & EVT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
|
||||||
sizeof (IEVENT),
|
sizeof (IEVENT),
|
||||||
(VOID **)&IEvent
|
(VOID **)&IEvent
|
||||||
);
|
);
|
||||||
@ -445,7 +445,7 @@ Returns:
|
|||||||
|
|
||||||
*Event = IEvent;
|
*Event = IEvent;
|
||||||
|
|
||||||
if (Type & EFI_EVENT_RUNTIME) {
|
if (Type & EVT_RUNTIME) {
|
||||||
//
|
//
|
||||||
// Keep a list of all RT events so we can tell the RT AP.
|
// Keep a list of all RT events so we can tell the RT AP.
|
||||||
//
|
//
|
||||||
@ -459,7 +459,7 @@ Returns:
|
|||||||
|
|
||||||
CoreAcquireEventLock ();
|
CoreAcquireEventLock ();
|
||||||
|
|
||||||
if ((Type & EFI_EVENT_NOTIFY_SIGNAL) != 0x00000000) {
|
if ((Type & EVT_NOTIFY_SIGNAL) != 0x00000000) {
|
||||||
//
|
//
|
||||||
// The Event's NotifyFunction must be queued whenever the event is signaled
|
// The Event's NotifyFunction must be queued whenever the event is signaled
|
||||||
//
|
//
|
||||||
@ -523,7 +523,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// If signalling type is a notify function, queue it
|
// If signalling type is a notify function, queue it
|
||||||
//
|
//
|
||||||
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
|
if (Event->Type & EVT_NOTIFY_SIGNAL) {
|
||||||
if (Event->ExFlag) {
|
if (Event->ExFlag) {
|
||||||
//
|
//
|
||||||
// The CreateEventEx() style requires all members of the Event Group
|
// The CreateEventEx() style requires all members of the Event Group
|
||||||
@ -580,13 +580,13 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
|
if (Event->Type & EVT_NOTIFY_SIGNAL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_NOT_READY;
|
Status = EFI_NOT_READY;
|
||||||
|
|
||||||
if (!Event->SignalCount && (Event->Type & EFI_EVENT_NOTIFY_WAIT)) {
|
if (!Event->SignalCount && (Event->Type & EVT_NOTIFY_WAIT)) {
|
||||||
|
|
||||||
//
|
//
|
||||||
// Queue the wait notify function
|
// Queue the wait notify function
|
||||||
@ -654,7 +654,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Can only WaitForEvent at TPL_APPLICATION
|
// Can only WaitForEvent at TPL_APPLICATION
|
||||||
//
|
//
|
||||||
if (gEfiCurrentTpl != EFI_TPL_APPLICATION) {
|
if (gEfiCurrentTpl != TPL_APPLICATION) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -721,7 +721,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// If it's a timer event, make sure it's not pending
|
// If it's a timer event, make sure it's not pending
|
||||||
//
|
//
|
||||||
if (Event->Type & EFI_EVENT_TIMER) {
|
if (Event->Type & EVT_TIMER) {
|
||||||
CoreSetTimer (Event, TimerCancel, 0);
|
CoreSetTimer (Event, TimerCancel, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,19 +28,19 @@ Revision History
|
|||||||
//
|
//
|
||||||
// gTpl - Task priority level
|
// gTpl - Task priority level
|
||||||
//
|
//
|
||||||
EFI_TPL gEfiCurrentTpl = EFI_TPL_APPLICATION;
|
EFI_TPL gEfiCurrentTpl = TPL_APPLICATION;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// gEventQueueLock - Protects the event queus
|
// gEventQueueLock - Protects the event queus
|
||||||
//
|
//
|
||||||
EFI_LOCK gEventQueueLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL);
|
EFI_LOCK gEventQueueLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// gEventQueue - A list of event's to notify for each priority level
|
// gEventQueue - A list of event's to notify for each priority level
|
||||||
// gEventPending - A bitmask of the EventQueues that are pending
|
// gEventPending - A bitmask of the EventQueues that are pending
|
||||||
//
|
//
|
||||||
LIST_ENTRY gEventQueue[EFI_TPL_HIGH_LEVEL + 1];
|
LIST_ENTRY gEventQueue[TPL_HIGH_LEVEL + 1];
|
||||||
UINTN gEventPending = 0;
|
UINTN gEventPending = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
timer.c
|
timer.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
@ -52,10 +52,10 @@ CoreInsertEventTimer (
|
|||||||
//
|
//
|
||||||
|
|
||||||
static LIST_ENTRY mEfiTimerList = INITIALIZE_LIST_HEAD_VARIABLE (mEfiTimerList);
|
static LIST_ENTRY mEfiTimerList = INITIALIZE_LIST_HEAD_VARIABLE (mEfiTimerList);
|
||||||
static EFI_LOCK mEfiTimerLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL - 1);
|
static EFI_LOCK mEfiTimerLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL - 1);
|
||||||
static EFI_EVENT mEfiCheckTimerEvent;
|
static EFI_EVENT mEfiCheckTimerEvent;
|
||||||
|
|
||||||
static EFI_LOCK mEfiSystemTimeLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL);
|
static EFI_LOCK mEfiSystemTimeLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL);
|
||||||
static UINT64 mEfiSystemTime = 0;
|
static UINT64 mEfiSystemTime = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -75,7 +75,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
@ -85,8 +85,8 @@ Returns:
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
Status = CoreCreateEvent (
|
Status = CoreCreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_HIGH_LEVEL - 1,
|
TPL_HIGH_LEVEL - 1,
|
||||||
CoreCheckTimers,
|
CoreCheckTimers,
|
||||||
NULL,
|
NULL,
|
||||||
&mEfiCheckTimerEvent
|
&mEfiCheckTimerEvent
|
||||||
@ -108,7 +108,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Returns the current system time
|
Returns the current system time
|
||||||
@ -137,7 +137,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Duration - The number of 100ns elasped since the last call to TimerTick
|
Duration - The number of 100ns elasped since the last call to TimerTick
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
@ -331,16 +331,16 @@ Arguments:
|
|||||||
UserEvent - The timer event that is to be signaled at the specified time
|
UserEvent - The timer event that is to be signaled at the specified time
|
||||||
Type - The type of time that is specified in TriggerTime
|
Type - The type of time that is specified in TriggerTime
|
||||||
TriggerTime - The number of 100ns units until the timer expires
|
TriggerTime - The number of 100ns units until the timer expires
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The event has been set to be signaled at the requested time
|
EFI_SUCCESS - The event has been set to be signaled at the requested time
|
||||||
EFI_INVALID_PARAMETER - Event or Type is not valid
|
EFI_INVALID_PARAMETER - Event or Type is not valid
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
IEVENT *Event;
|
IEVENT *Event;
|
||||||
|
|
||||||
Event = UserEvent;
|
Event = UserEvent;
|
||||||
|
|
||||||
if (Event == NULL) {
|
if (Event == NULL) {
|
||||||
@ -351,10 +351,10 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Type < 0 || Type > TimerRelative || !(Event->Type & EFI_EVENT_TIMER)) {
|
if (Type < 0 || Type > TimerRelative || !(Event->Type & EVT_TIMER)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreAcquireLock (&mEfiTimerLock);
|
CoreAcquireLock (&mEfiTimerLock);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -118,7 +118,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// If raising to high level, disable interrupts
|
// If raising to high level, disable interrupts
|
||||||
//
|
//
|
||||||
if (NewTpl >= EFI_TPL_HIGH_LEVEL && OldTpl < EFI_TPL_HIGH_LEVEL) {
|
if (NewTpl >= TPL_HIGH_LEVEL && OldTpl < TPL_HIGH_LEVEL) {
|
||||||
CoreSetInterruptState (FALSE);
|
CoreSetInterruptState (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,8 +165,8 @@ Returns:
|
|||||||
// interrupts are enabled
|
// interrupts are enabled
|
||||||
//
|
//
|
||||||
|
|
||||||
if (OldTpl >= EFI_TPL_HIGH_LEVEL && NewTpl < EFI_TPL_HIGH_LEVEL) {
|
if (OldTpl >= TPL_HIGH_LEVEL && NewTpl < TPL_HIGH_LEVEL) {
|
||||||
gEfiCurrentTpl = EFI_TPL_HIGH_LEVEL;
|
gEfiCurrentTpl = TPL_HIGH_LEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -175,7 +175,7 @@ Returns:
|
|||||||
|
|
||||||
while ((-2 << NewTpl) & gEventPending) {
|
while ((-2 << NewTpl) & gEventPending) {
|
||||||
gEfiCurrentTpl = CoreHighestSetBit (gEventPending);
|
gEfiCurrentTpl = CoreHighestSetBit (gEventPending);
|
||||||
if (gEfiCurrentTpl < EFI_TPL_HIGH_LEVEL) {
|
if (gEfiCurrentTpl < TPL_HIGH_LEVEL) {
|
||||||
CoreSetInterruptState (TRUE);
|
CoreSetInterruptState (TRUE);
|
||||||
}
|
}
|
||||||
CoreDispatchEventNotifies (gEfiCurrentTpl);
|
CoreDispatchEventNotifies (gEfiCurrentTpl);
|
||||||
@ -191,7 +191,7 @@ Returns:
|
|||||||
// If lowering below HIGH_LEVEL, make sure
|
// If lowering below HIGH_LEVEL, make sure
|
||||||
// interrupts are enabled
|
// interrupts are enabled
|
||||||
//
|
//
|
||||||
if (gEfiCurrentTpl < EFI_TPL_HIGH_LEVEL) {
|
if (gEfiCurrentTpl < TPL_HIGH_LEVEL) {
|
||||||
CoreSetInterruptState (TRUE);
|
CoreSetInterruptState (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Abstract:
|
|||||||
#ifndef _EXEC_H_
|
#ifndef _EXEC_H_
|
||||||
#define _EXEC_H_
|
#define _EXEC_H_
|
||||||
|
|
||||||
#define VALID_TPL(a) ((a) <= EFI_TPL_HIGH_LEVEL)
|
#define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)
|
||||||
|
|
||||||
//
|
//
|
||||||
// EFI_EVENT
|
// EFI_EVENT
|
||||||
|
@ -536,7 +536,7 @@ Returns:
|
|||||||
{
|
{
|
||||||
gEfiFwVolBlockEvent = CoreCreateProtocolNotifyEvent (
|
gEfiFwVolBlockEvent = CoreCreateProtocolNotifyEvent (
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlockProtocolGuid,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NotifyFwVolBlock,
|
NotifyFwVolBlock,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiFwVolBlockNotifyReg,
|
&gEfiFwVolBlockNotifyReg,
|
||||||
|
@ -48,8 +48,8 @@ Abstract:
|
|||||||
//
|
//
|
||||||
// Module Variables
|
// Module Variables
|
||||||
//
|
//
|
||||||
EFI_LOCK mGcdMemorySpaceLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_NOTIFY);
|
EFI_LOCK mGcdMemorySpaceLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY);
|
||||||
EFI_LOCK mGcdIoSpaceLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_NOTIFY);
|
EFI_LOCK mGcdIoSpaceLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY);
|
||||||
LIST_ENTRY mGcdMemorySpaceMap = INITIALIZE_LIST_HEAD_VARIABLE (mGcdMemorySpaceMap);
|
LIST_ENTRY mGcdMemorySpaceMap = INITIALIZE_LIST_HEAD_VARIABLE (mGcdMemorySpaceMap);
|
||||||
LIST_ENTRY mGcdIoSpaceMap = INITIALIZE_LIST_HEAD_VARIABLE (mGcdIoSpaceMap);
|
LIST_ENTRY mGcdIoSpaceMap = INITIALIZE_LIST_HEAD_VARIABLE (mGcdIoSpaceMap);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ Revision History
|
|||||||
//
|
//
|
||||||
static LIST_ENTRY mProtocolDatabase = INITIALIZE_LIST_HEAD_VARIABLE (mProtocolDatabase);
|
static LIST_ENTRY mProtocolDatabase = INITIALIZE_LIST_HEAD_VARIABLE (mProtocolDatabase);
|
||||||
LIST_ENTRY gHandleList = INITIALIZE_LIST_HEAD_VARIABLE (gHandleList);
|
LIST_ENTRY gHandleList = INITIALIZE_LIST_HEAD_VARIABLE (gHandleList);
|
||||||
EFI_LOCK gProtocolDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_NOTIFY);
|
EFI_LOCK gProtocolDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY);
|
||||||
UINT64 gHandleDatabaseKey = 0;
|
UINT64 gHandleDatabaseKey = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -632,7 +632,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Syncronize with notifcations.
|
// Syncronize with notifcations.
|
||||||
//
|
//
|
||||||
OldTpl = CoreRaiseTpl (EFI_TPL_NOTIFY);
|
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
|
||||||
OldHandle = *Handle;
|
OldHandle = *Handle;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -576,7 +576,7 @@ Returns:
|
|||||||
|
|
||||||
SecurityStatus = EFI_SUCCESS;
|
SecurityStatus = EFI_SUCCESS;
|
||||||
|
|
||||||
ASSERT (gEfiCurrentTpl < EFI_TPL_NOTIFY);
|
ASSERT (gEfiCurrentTpl < TPL_NOTIFY);
|
||||||
ParentImage = NULL;
|
ParentImage = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1224,7 +1224,7 @@ Returns:
|
|||||||
// Prevent possible reentrance to this function
|
// Prevent possible reentrance to this function
|
||||||
// for the same ImageHandle
|
// for the same ImageHandle
|
||||||
//
|
//
|
||||||
OldTpl = CoreRaiseTpl (EFI_TPL_NOTIFY);
|
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
|
||||||
|
|
||||||
Image = CoreLoadedImageInfo (ImageHandle);
|
Image = CoreLoadedImageInfo (ImageHandle);
|
||||||
if (Image == NULL_HANDLE) {
|
if (Image == NULL_HANDLE) {
|
||||||
@ -1317,7 +1317,7 @@ Returns:
|
|||||||
// Prevent possible reentrance to this function
|
// Prevent possible reentrance to this function
|
||||||
// for the same ImageHandle
|
// for the same ImageHandle
|
||||||
//
|
//
|
||||||
OldTpl = CoreRaiseTpl (EFI_TPL_NOTIFY);
|
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
|
||||||
|
|
||||||
Image = CoreLoadedImageInfo (ImageHandle);
|
Image = CoreLoadedImageInfo (ImageHandle);
|
||||||
if (Image == NULL ) {
|
if (Image == NULL ) {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -41,16 +41,16 @@ CoreReportProgressCodeSpecific (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiDxeServicesTableGuid,
|
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiDxeServicesTableGuid,
|
||||||
with a handle as additional information.
|
with a handle as additional information.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Value - Describes the class/subclass/operation of the hardware or software entity
|
Value - Describes the class/subclass/operation of the hardware or software entity
|
||||||
that the Status Code relates to.
|
that the Status Code relates to.
|
||||||
|
|
||||||
Handle - Additional information.
|
Handle - Additional information.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
@ -80,12 +80,12 @@ CoreReportProgressCode (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiDxeServicesTableGuid.
|
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiDxeServicesTableGuid.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Value - Describes the class/subclass/operation of the hardware or software entity
|
Value - Describes the class/subclass/operation of the hardware or software entity
|
||||||
that the Status Code relates to.
|
that the Status Code relates to.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
@ -113,11 +113,11 @@ CoreAllocateBootServicesPool (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.
|
Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
AllocationSize - Size to allocate.
|
AllocationSize - Size to allocate.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer of the allocated pool.
|
Pointer of the allocated pool.
|
||||||
@ -140,11 +140,11 @@ CoreAllocateZeroBootServicesPool (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.
|
Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
AllocationSize - Size to allocate.
|
AllocationSize - Size to allocate.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer of the allocated pool.
|
Pointer of the allocated pool.
|
||||||
@ -169,13 +169,13 @@ CoreAllocateCopyPool (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.
|
Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
AllocationSize - Size to allocate.
|
AllocationSize - Size to allocate.
|
||||||
|
|
||||||
Buffer - Specified buffer that will be copy to the allocated pool
|
Buffer - Specified buffer that will be copy to the allocated pool
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer of the allocated pool.
|
Pointer of the allocated pool.
|
||||||
@ -186,11 +186,11 @@ Returns:
|
|||||||
|
|
||||||
Memory = CoreAllocateBootServicesPool (AllocationSize);
|
Memory = CoreAllocateBootServicesPool (AllocationSize);
|
||||||
CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);
|
CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);
|
||||||
|
|
||||||
return Memory;
|
return Memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID *
|
VOID *
|
||||||
CoreAllocateRuntimePool (
|
CoreAllocateRuntimePool (
|
||||||
@ -201,11 +201,11 @@ CoreAllocateRuntimePool (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.
|
Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
AllocationSize - Size to allocate.
|
AllocationSize - Size to allocate.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer of the allocated pool.
|
Pointer of the allocated pool.
|
||||||
@ -228,13 +228,13 @@ CoreAllocateRuntimeCopyPool (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.
|
Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
AllocationSize - Size to allocate.
|
AllocationSize - Size to allocate.
|
||||||
|
|
||||||
Buffer - Specified buffer that will be copy to the allocated pool
|
Buffer - Specified buffer that will be copy to the allocated pool
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer of the allocated pool.
|
Pointer of the allocated pool.
|
||||||
@ -246,7 +246,7 @@ Returns:
|
|||||||
|
|
||||||
Memory = CoreAllocateRuntimePool (AllocationSize);
|
Memory = CoreAllocateRuntimePool (AllocationSize);
|
||||||
CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);
|
CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);
|
||||||
|
|
||||||
return Memory;
|
return Memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,11 +271,11 @@ Routine Description:
|
|||||||
level. Since there is no-premption (at any TPL) or
|
level. Since there is no-premption (at any TPL) or
|
||||||
multiprocessor support, acquiring the lock only consists
|
multiprocessor support, acquiring the lock only consists
|
||||||
of raising to the locks TPL.
|
of raising to the locks TPL.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Lock - The EFI_LOCK structure to initialize
|
Lock - The EFI_LOCK structure to initialize
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - Lock Owned.
|
EFI_SUCCESS - Lock Owned.
|
||||||
@ -310,11 +310,11 @@ Routine Description:
|
|||||||
|
|
||||||
Raising to the task priority level of the mutual exclusion
|
Raising to the task priority level of the mutual exclusion
|
||||||
lock, and then acquires ownership of the lock.
|
lock, and then acquires ownership of the lock.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Lock - The lock to acquire
|
Lock - The lock to acquire
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Lock owned
|
Lock owned
|
||||||
@ -339,11 +339,11 @@ Routine Description:
|
|||||||
|
|
||||||
Releases ownership of the mutual exclusion lock, and
|
Releases ownership of the mutual exclusion lock, and
|
||||||
restores the previous task priority level.
|
restores the previous task priority level.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Lock - The lock to release
|
Lock - The lock to release
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Lock unowned
|
Lock unowned
|
||||||
@ -356,7 +356,7 @@ Returns:
|
|||||||
ASSERT (Lock->Lock == EfiLockAcquired);
|
ASSERT (Lock->Lock == EfiLockAcquired);
|
||||||
|
|
||||||
Tpl = Lock->OwnerTpl;
|
Tpl = Lock->OwnerTpl;
|
||||||
|
|
||||||
Lock->Lock = EfiLockReleased;
|
Lock->Lock = EfiLockReleased;
|
||||||
|
|
||||||
CoreRestoreTpl (Tpl);
|
CoreRestoreTpl (Tpl);
|
||||||
@ -371,12 +371,12 @@ CoreDevicePathSize (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Calculate the size of a whole device path.
|
Calculate the size of a whole device path.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
DevicePath - The pointer to the device path data.
|
DevicePath - The pointer to the device path data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Size of device path data structure..
|
Size of device path data structure..
|
||||||
@ -513,7 +513,7 @@ Returns:
|
|||||||
if (Src1 == NULL && Src2 == NULL) {
|
if (Src1 == NULL && Src2 == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate space for the combined device path. It only has one end node of
|
// Allocate space for the combined device path. It only has one end node of
|
||||||
// length EFI_DEVICE_PATH_PROTOCOL
|
// length EFI_DEVICE_PATH_PROTOCOL
|
||||||
@ -564,7 +564,7 @@ Arguments:
|
|||||||
|
|
||||||
Registration - Registration key returned from RegisterProtocolNotify().
|
Registration - Registration key returned from RegisterProtocolNotify().
|
||||||
|
|
||||||
SignalFlag - Boolean value to decide whether kick the event after register or not.
|
SignalFlag - Boolean value to decide whether kick the event after register or not.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
@ -581,11 +581,11 @@ Returns:
|
|||||||
//
|
//
|
||||||
|
|
||||||
Status = CoreCreateEvent (
|
Status = CoreCreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
&Event
|
&Event
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Revision History
|
|||||||
//
|
//
|
||||||
// MemoryLock - synchronizes access to the memory map and pool lists
|
// MemoryLock - synchronizes access to the memory map and pool lists
|
||||||
//
|
//
|
||||||
EFI_LOCK gMemoryLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_NOTIFY);
|
EFI_LOCK gMemoryLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// MemoryMap - the current memory map
|
// MemoryMap - the current memory map
|
||||||
|
@ -383,7 +383,7 @@ Returns:
|
|||||||
UINTN SectionSize;
|
UINTN SectionSize;
|
||||||
|
|
||||||
|
|
||||||
OldTpl = CoreRaiseTpl (EFI_TPL_NOTIFY);
|
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
|
||||||
Instance = SectionInstance + 1;
|
Instance = SectionInstance + 1;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -484,7 +484,7 @@ Returns:
|
|||||||
LIST_ENTRY *Link;
|
LIST_ENTRY *Link;
|
||||||
CORE_SECTION_CHILD_NODE *ChildNode;
|
CORE_SECTION_CHILD_NODE *ChildNode;
|
||||||
|
|
||||||
OldTpl = CoreRaiseTpl (EFI_TPL_NOTIFY);
|
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Locate target stream
|
// Locate target stream
|
||||||
@ -1025,7 +1025,7 @@ Returns:
|
|||||||
|
|
||||||
Context->Event = CoreCreateProtocolNotifyEvent (
|
Context->Event = CoreCreateProtocolNotifyEvent (
|
||||||
Context->ChildNode->EncapsulationGuid,
|
Context->ChildNode->EncapsulationGuid,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
NotifyGuidedExtraction,
|
NotifyGuidedExtraction,
|
||||||
Context,
|
Context,
|
||||||
&Context->Registration,
|
&Context->Registration,
|
||||||
@ -1234,7 +1234,7 @@ OpenSectionStreamEx (
|
|||||||
//
|
//
|
||||||
// Add new stream to stream list
|
// Add new stream to stream list
|
||||||
//
|
//
|
||||||
OldTpl = CoreRaiseTpl (EFI_TPL_NOTIFY);
|
OldTpl = CoreRaiseTpl (TPL_NOTIFY);
|
||||||
InsertTailList (&mStreamRoot, &NewStream->Link);
|
InsertTailList (&mStreamRoot, &NewStream->Link);
|
||||||
CoreRestoreTpl (OldTpl);
|
CoreRestoreTpl (OldTpl);
|
||||||
|
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
Firmware Volume Block Protocol Runtime Abstraction
|
Firmware Volume Block Protocol Runtime Abstraction
|
||||||
|
|
||||||
mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the
|
mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the
|
||||||
index in the mFvbEntry array. This should be the same sequence as the FVB's
|
index in the mFvbEntry array. This should be the same sequence as the FVB's
|
||||||
were described in the HOB. We have to remember the handle so we can tell if
|
were described in the HOB. We have to remember the handle so we can tell if
|
||||||
the protocol has been reinstalled and it needs updateing.
|
the protocol has been reinstalled and it needs updateing.
|
||||||
|
|
||||||
If you are using any of these lib functions.you must first call FvbInitialize ().
|
If you are using any of these lib functions.you must first call FvbInitialize ().
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -32,9 +32,9 @@ STATIC UINTN mFvbCount;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Check whether an address is runtime memory or not.
|
Check whether an address is runtime memory or not.
|
||||||
|
|
||||||
@param Address The Address being checked.
|
@param Address The Address being checked.
|
||||||
|
|
||||||
@retval TRUE The address is runtime memory.
|
@retval TRUE The address is runtime memory.
|
||||||
@retval FALSE The address is not runtime memory.
|
@retval FALSE The address is not runtime memory.
|
||||||
**/
|
**/
|
||||||
@ -124,10 +124,10 @@ IsRuntimeMemory (
|
|||||||
/**
|
/**
|
||||||
Update mFvbEntry. Add new entry, or update existing entry if Fvb protocol is
|
Update mFvbEntry. Add new entry, or update existing entry if Fvb protocol is
|
||||||
reinstalled.
|
reinstalled.
|
||||||
|
|
||||||
@param Event The Event that is being processed
|
@param Event The Event that is being processed
|
||||||
@param Context Event Context
|
@param Context Event Context
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
@ -190,15 +190,15 @@ FvbNotificationEvent (
|
|||||||
// Get the interface pointer and if it's ours, skip it
|
// Get the interface pointer and if it's ours, skip it
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Handle,
|
Handle,
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlockProtocolGuid,
|
||||||
(VOID **) &mFvbEntry[UpdateIndex].Fvb
|
(VOID **) &mFvbEntry[UpdateIndex].Fvb
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Handle,
|
Handle,
|
||||||
&gEfiFvbExtensionProtocolGuid,
|
&gEfiFvbExtensionProtocolGuid,
|
||||||
(VOID **) &mFvbEntry[UpdateIndex].FvbExtension
|
(VOID **) &mFvbEntry[UpdateIndex].FvbExtension
|
||||||
);
|
);
|
||||||
if (Status != EFI_SUCCESS) {
|
if (Status != EFI_SUCCESS) {
|
||||||
@ -209,14 +209,14 @@ FvbNotificationEvent (
|
|||||||
// Check the FVB can be accessed in RUNTIME, The FVBs in FVB handle list comes
|
// Check the FVB can be accessed in RUNTIME, The FVBs in FVB handle list comes
|
||||||
// from two way:
|
// from two way:
|
||||||
// 1) Dxe Core. (FVB information is transferred from FV HOB).
|
// 1) Dxe Core. (FVB information is transferred from FV HOB).
|
||||||
// 2) FVB driver.
|
// 2) FVB driver.
|
||||||
// The FVB produced Dxe core is used for discoverying DXE driver and dispatch. These
|
// The FVB produced Dxe core is used for discoverying DXE driver and dispatch. These
|
||||||
// FVBs can only be accessed in boot time.
|
// FVBs can only be accessed in boot time.
|
||||||
// FVB driver will discovery all FV in FLASH and these FVBs can be accessed in runtime.
|
// FVB driver will discovery all FV in FLASH and these FVBs can be accessed in runtime.
|
||||||
// The FVB itself produced by FVB driver is allocated in runtime memory. So we can
|
// The FVB itself produced by FVB driver is allocated in runtime memory. So we can
|
||||||
// determine the what FVB can be accessed in RUNTIME by judging whether FVB itself is allocated
|
// determine the what FVB can be accessed in RUNTIME by judging whether FVB itself is allocated
|
||||||
// in RUNTIME memory.
|
// in RUNTIME memory.
|
||||||
//
|
//
|
||||||
mFvbEntry[UpdateIndex].IsRuntimeAccess = IsRuntimeMemory (mFvbEntry[UpdateIndex].Fvb);
|
mFvbEntry[UpdateIndex].IsRuntimeAccess = IsRuntimeMemory (mFvbEntry[UpdateIndex].Fvb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ FvbNotificationEvent (
|
|||||||
|
|
||||||
@param Event The Event that is being processed
|
@param Event The Event that is being processed
|
||||||
@param Context Event Context
|
@param Context Event Context
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -265,10 +265,10 @@ FvbVirtualAddressChangeNotifyEvent (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Library constructor function entry.
|
Library constructor function entry.
|
||||||
|
|
||||||
@param ImageHandle The handle of image who call this libary.
|
@param ImageHandle The handle of image who call this libary.
|
||||||
@param SystemTable The point of System Table.
|
@param SystemTable The point of System Table.
|
||||||
|
|
||||||
@retval EFI_SUCESS Sucess construct this library.
|
@retval EFI_SUCESS Sucess construct this library.
|
||||||
@retval Others Fail to contruct this libary.
|
@retval Others Fail to contruct this libary.
|
||||||
**/
|
**/
|
||||||
@ -296,7 +296,7 @@ FvbLibInitialize (
|
|||||||
|
|
||||||
EfiCreateProtocolNotifyEvent (
|
EfiCreateProtocolNotifyEvent (
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlockProtocolGuid,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
FvbNotificationEvent,
|
FvbNotificationEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&mFvbRegistration
|
&mFvbRegistration
|
||||||
@ -306,8 +306,8 @@ FvbLibInitialize (
|
|||||||
// Register SetVirtualAddressMap () notify function
|
// Register SetVirtualAddressMap () notify function
|
||||||
//
|
//
|
||||||
// Status = gBS->CreateEvent (
|
// Status = gBS->CreateEvent (
|
||||||
// EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
// EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
// EFI_TPL_NOTIFY,
|
// TPL_NOTIFY,
|
||||||
// EfiRuntimeLibFvbVirtualNotifyEvent,
|
// EfiRuntimeLibFvbVirtualNotifyEvent,
|
||||||
// NULL,
|
// NULL,
|
||||||
// &mEfiFvbVirtualNotifyEvent
|
// &mEfiFvbVirtualNotifyEvent
|
||||||
@ -326,7 +326,7 @@ FvbLibInitialize (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// The following functions wrap Fvb protocol in the Runtime Lib functions.
|
// The following functions wrap Fvb protocol in the Runtime Lib functions.
|
||||||
// The Instance translates into Fvb instance. The Fvb order defined by HOBs and
|
// The Instance translates into Fvb instance. The Fvb order defined by HOBs and
|
||||||
@ -335,7 +335,7 @@ FvbLibInitialize (
|
|||||||
// EfiFvbInitialize () must be called before any of the following functions
|
// EfiFvbInitialize () must be called before any of the following functions
|
||||||
// must be called.
|
// must be called.
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
//
|
//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads specified number of bytes into a buffer from the specified block
|
Reads specified number of bytes into a buffer from the specified block
|
||||||
@ -348,7 +348,7 @@ FvbLibInitialize (
|
|||||||
of bytes read
|
of bytes read
|
||||||
@param Buffer Pointer to a caller allocated buffer that will be
|
@param Buffer Pointer to a caller allocated buffer that will be
|
||||||
used to hold the data read
|
used to hold the data read
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to Read block
|
@retval EFI_SUCESS Sucess to Read block
|
||||||
@retval Others Fail to read block
|
@retval Others Fail to read block
|
||||||
@ -375,7 +375,7 @@ EfiFvbReadBlock (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Writes specified number of bytes from the input buffer to the block
|
Writes specified number of bytes from the input buffer to the block
|
||||||
|
|
||||||
@param Instance The FV instance to be written to
|
@param Instance The FV instance to be written to
|
||||||
@param Lba The starting logical block index to write to
|
@param Lba The starting logical block index to write to
|
||||||
@param Offset Offset into the block at which to begin writing
|
@param Offset Offset into the block at which to begin writing
|
||||||
@ -384,7 +384,7 @@ EfiFvbReadBlock (
|
|||||||
of bytes actually written
|
of bytes actually written
|
||||||
@param Buffer Pointer to a caller allocated buffer that contains
|
@param Buffer Pointer to a caller allocated buffer that contains
|
||||||
the source for the write
|
the source for the write
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to write block
|
@retval EFI_SUCESS Sucess to write block
|
||||||
@retval Others Fail to write block
|
@retval Others Fail to write block
|
||||||
@ -414,7 +414,7 @@ EfiFvbWriteBlock (
|
|||||||
|
|
||||||
@param Instance The FV instance to be erased
|
@param Instance The FV instance to be erased
|
||||||
@param Lba The logical block index to be erased
|
@param Lba The logical block index to be erased
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to erase block
|
@retval EFI_SUCESS Sucess to erase block
|
||||||
@retval Others Fail to erase block
|
@retval Others Fail to erase block
|
||||||
@ -439,10 +439,10 @@ EfiFvbEraseBlock (
|
|||||||
/**
|
/**
|
||||||
Retrieves attributes, insures positive polarity of attribute bits, returns
|
Retrieves attributes, insures positive polarity of attribute bits, returns
|
||||||
resulting attributes in output parameter
|
resulting attributes in output parameter
|
||||||
|
|
||||||
@param Instance The FV instance whose attributes is going to be returned
|
@param Instance The FV instance whose attributes is going to be returned
|
||||||
@param Attributes Output buffer which contains attributes
|
@param Attributes Output buffer which contains attributes
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to get Fv attribute
|
@retval EFI_SUCESS Sucess to get Fv attribute
|
||||||
@retval Others Fail to get Fv attribute
|
@retval Others Fail to get Fv attribute
|
||||||
@ -465,16 +465,16 @@ EfiFvbGetVolumeAttributes (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifies the current settings of the firmware volume according to the
|
Modifies the current settings of the firmware volume according to the
|
||||||
input parameter, and returns the new setting of the volume
|
input parameter, and returns the new setting of the volume
|
||||||
|
|
||||||
@param Instance The FV instance whose attributes is going to be
|
@param Instance The FV instance whose attributes is going to be
|
||||||
modified
|
modified
|
||||||
@param Attributes On input, it is a pointer to EFI_FVB_ATTRIBUTES
|
@param Attributes On input, it is a pointer to EFI_FVB_ATTRIBUTES
|
||||||
containing the desired firmware volume settings.
|
containing the desired firmware volume settings.
|
||||||
On successful return, it contains the new settings
|
On successful return, it contains the new settings
|
||||||
of the firmware volume
|
of the firmware volume
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to set Fv attribute
|
@retval EFI_SUCESS Sucess to set Fv attribute
|
||||||
@retval Others Fail to set Fv attribute
|
@retval Others Fail to set Fv attribute
|
||||||
@ -501,10 +501,10 @@ EfiFvbSetVolumeAttributes (
|
|||||||
|
|
||||||
@param Instance The FV instance whose base address is going to be
|
@param Instance The FV instance whose base address is going to be
|
||||||
returned
|
returned
|
||||||
@param BaseAddress Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
|
@param BaseAddress Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
|
||||||
that on successful return, contains the base address
|
that on successful return, contains the base address
|
||||||
of the firmware volume.
|
of the firmware volume.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to get physical address
|
@retval EFI_SUCESS Sucess to get physical address
|
||||||
@retval Others Fail to get physical address
|
@retval Others Fail to get physical address
|
||||||
@ -538,7 +538,7 @@ EfiFvbGetPhysicalAddress (
|
|||||||
number of consecutive blocks starting with Lba is
|
number of consecutive blocks starting with Lba is
|
||||||
returned. All blocks in this range have a size of
|
returned. All blocks in this range have a size of
|
||||||
BlockSize
|
BlockSize
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to get block size
|
@retval EFI_SUCESS Sucess to get block size
|
||||||
@retval Others Fail to get block size
|
@retval Others Fail to get block size
|
||||||
@ -567,11 +567,11 @@ EfiFvbGetBlockSize (
|
|||||||
|
|
||||||
@param Instance The FV instance to be erased
|
@param Instance The FV instance to be erased
|
||||||
@param StartLba The starting logical block index to be erased
|
@param StartLba The starting logical block index to be erased
|
||||||
@param OffsetStartLba Offset into the starting block at which to
|
@param OffsetStartLba Offset into the starting block at which to
|
||||||
begin erasing
|
begin erasing
|
||||||
@param LastLba The last logical block index to be erased
|
@param LastLba The last logical block index to be erased
|
||||||
@param OffsetLastLba Offset into the last block at which to end erasing
|
@param OffsetLastLba Offset into the last block at which to end erasing
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to erase custom block range
|
@retval EFI_SUCESS Sucess to erase custom block range
|
||||||
@retval Others Fail to erase custom block range
|
@retval Others Fail to erase custom block range
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
Firmware Volume Block Protocol Runtime Abstraction
|
Firmware Volume Block Protocol Runtime Abstraction
|
||||||
|
|
||||||
mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the
|
mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the
|
||||||
index in the mFvbEntry array. This should be the same sequence as the FVB's
|
index in the mFvbEntry array. This should be the same sequence as the FVB's
|
||||||
were described in the HOB. We have to remember the handle so we can tell if
|
were described in the HOB. We have to remember the handle so we can tell if
|
||||||
the protocol has been reinstalled and it needs updateing.
|
the protocol has been reinstalled and it needs updateing.
|
||||||
|
|
||||||
If you are using any of these lib functions.you must first call FvbInitialize ().
|
If you are using any of these lib functions.you must first call FvbInitialize ().
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -32,9 +32,9 @@ STATIC UINTN mFvbCount;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Check whether an address is runtime memory or not.
|
Check whether an address is runtime memory or not.
|
||||||
|
|
||||||
@param Address The Address being checked.
|
@param Address The Address being checked.
|
||||||
|
|
||||||
@retval TRUE The address is runtime memory.
|
@retval TRUE The address is runtime memory.
|
||||||
@retval FALSE The address is not runtime memory.
|
@retval FALSE The address is not runtime memory.
|
||||||
**/
|
**/
|
||||||
@ -124,10 +124,10 @@ IsRuntimeMemory (
|
|||||||
/**
|
/**
|
||||||
Update mFvbEntry. Add new entry, or update existing entry if Fvb protocol is
|
Update mFvbEntry. Add new entry, or update existing entry if Fvb protocol is
|
||||||
reinstalled.
|
reinstalled.
|
||||||
|
|
||||||
@param Event The Event that is being processed
|
@param Event The Event that is being processed
|
||||||
@param Context Event Context
|
@param Context Event Context
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
@ -190,15 +190,15 @@ FvbNotificationEvent (
|
|||||||
// Get the interface pointer and if it's ours, skip it
|
// Get the interface pointer and if it's ours, skip it
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Handle,
|
Handle,
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlockProtocolGuid,
|
||||||
(VOID **) &mFvbEntry[UpdateIndex].Fvb
|
(VOID **) &mFvbEntry[UpdateIndex].Fvb
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Handle,
|
Handle,
|
||||||
&gEfiFvbExtensionProtocolGuid,
|
&gEfiFvbExtensionProtocolGuid,
|
||||||
(VOID **) &mFvbEntry[UpdateIndex].FvbExtension
|
(VOID **) &mFvbEntry[UpdateIndex].FvbExtension
|
||||||
);
|
);
|
||||||
if (Status != EFI_SUCCESS) {
|
if (Status != EFI_SUCCESS) {
|
||||||
@ -209,14 +209,14 @@ FvbNotificationEvent (
|
|||||||
// Check the FVB can be accessed in RUNTIME, The FVBs in FVB handle list comes
|
// Check the FVB can be accessed in RUNTIME, The FVBs in FVB handle list comes
|
||||||
// from two way:
|
// from two way:
|
||||||
// 1) Dxe Core. (FVB information is transferred from FV HOB).
|
// 1) Dxe Core. (FVB information is transferred from FV HOB).
|
||||||
// 2) FVB driver.
|
// 2) FVB driver.
|
||||||
// The FVB produced Dxe core is used for discoverying DXE driver and dispatch. These
|
// The FVB produced Dxe core is used for discoverying DXE driver and dispatch. These
|
||||||
// FVBs can only be accessed in boot time.
|
// FVBs can only be accessed in boot time.
|
||||||
// FVB driver will discovery all FV in FLASH and these FVBs can be accessed in runtime.
|
// FVB driver will discovery all FV in FLASH and these FVBs can be accessed in runtime.
|
||||||
// The FVB itself produced by FVB driver is allocated in runtime memory. So we can
|
// The FVB itself produced by FVB driver is allocated in runtime memory. So we can
|
||||||
// determine the what FVB can be accessed in RUNTIME by judging whether FVB itself is allocated
|
// determine the what FVB can be accessed in RUNTIME by judging whether FVB itself is allocated
|
||||||
// in RUNTIME memory.
|
// in RUNTIME memory.
|
||||||
//
|
//
|
||||||
mFvbEntry[UpdateIndex].IsRuntimeAccess = IsRuntimeMemory (mFvbEntry[UpdateIndex].Fvb);
|
mFvbEntry[UpdateIndex].IsRuntimeAccess = IsRuntimeMemory (mFvbEntry[UpdateIndex].Fvb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ FvbNotificationEvent (
|
|||||||
|
|
||||||
@param Event The Event that is being processed
|
@param Event The Event that is being processed
|
||||||
@param Context Event Context
|
@param Context Event Context
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -265,10 +265,10 @@ FvbVirtualAddressChangeNotifyEvent (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Library constructor function entry.
|
Library constructor function entry.
|
||||||
|
|
||||||
@param ImageHandle The handle of image who call this libary.
|
@param ImageHandle The handle of image who call this libary.
|
||||||
@param SystemTable The point of System Table.
|
@param SystemTable The point of System Table.
|
||||||
|
|
||||||
@retval EFI_SUCESS Sucess construct this library.
|
@retval EFI_SUCESS Sucess construct this library.
|
||||||
@retval Others Fail to contruct this libary.
|
@retval Others Fail to contruct this libary.
|
||||||
**/
|
**/
|
||||||
@ -296,7 +296,7 @@ FvbLibInitialize (
|
|||||||
|
|
||||||
EfiCreateProtocolNotifyEvent (
|
EfiCreateProtocolNotifyEvent (
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlockProtocolGuid,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
FvbNotificationEvent,
|
FvbNotificationEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&mFvbRegistration
|
&mFvbRegistration
|
||||||
@ -306,8 +306,8 @@ FvbLibInitialize (
|
|||||||
// Register SetVirtualAddressMap () notify function
|
// Register SetVirtualAddressMap () notify function
|
||||||
//
|
//
|
||||||
// Status = gBS->CreateEvent (
|
// Status = gBS->CreateEvent (
|
||||||
// EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
// EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
// EFI_TPL_NOTIFY,
|
// TPL_NOTIFY,
|
||||||
// EfiRuntimeLibFvbVirtualNotifyEvent,
|
// EfiRuntimeLibFvbVirtualNotifyEvent,
|
||||||
// NULL,
|
// NULL,
|
||||||
// &mEfiFvbVirtualNotifyEvent
|
// &mEfiFvbVirtualNotifyEvent
|
||||||
@ -326,7 +326,7 @@ FvbLibInitialize (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// The following functions wrap Fvb protocol in the Runtime Lib functions.
|
// The following functions wrap Fvb protocol in the Runtime Lib functions.
|
||||||
// The Instance translates into Fvb instance. The Fvb order defined by HOBs and
|
// The Instance translates into Fvb instance. The Fvb order defined by HOBs and
|
||||||
@ -335,7 +335,7 @@ FvbLibInitialize (
|
|||||||
// EfiFvbInitialize () must be called before any of the following functions
|
// EfiFvbInitialize () must be called before any of the following functions
|
||||||
// must be called.
|
// must be called.
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
//
|
//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads specified number of bytes into a buffer from the specified block
|
Reads specified number of bytes into a buffer from the specified block
|
||||||
@ -348,7 +348,7 @@ FvbLibInitialize (
|
|||||||
of bytes read
|
of bytes read
|
||||||
@param Buffer Pointer to a caller allocated buffer that will be
|
@param Buffer Pointer to a caller allocated buffer that will be
|
||||||
used to hold the data read
|
used to hold the data read
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to Read block
|
@retval EFI_SUCESS Sucess to Read block
|
||||||
@retval Others Fail to read block
|
@retval Others Fail to read block
|
||||||
@ -375,7 +375,7 @@ EfiFvbReadBlock (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Writes specified number of bytes from the input buffer to the block
|
Writes specified number of bytes from the input buffer to the block
|
||||||
|
|
||||||
@param Instance The FV instance to be written to
|
@param Instance The FV instance to be written to
|
||||||
@param Lba The starting logical block index to write to
|
@param Lba The starting logical block index to write to
|
||||||
@param Offset Offset into the block at which to begin writing
|
@param Offset Offset into the block at which to begin writing
|
||||||
@ -384,7 +384,7 @@ EfiFvbReadBlock (
|
|||||||
of bytes actually written
|
of bytes actually written
|
||||||
@param Buffer Pointer to a caller allocated buffer that contains
|
@param Buffer Pointer to a caller allocated buffer that contains
|
||||||
the source for the write
|
the source for the write
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to write block
|
@retval EFI_SUCESS Sucess to write block
|
||||||
@retval Others Fail to write block
|
@retval Others Fail to write block
|
||||||
@ -414,7 +414,7 @@ EfiFvbWriteBlock (
|
|||||||
|
|
||||||
@param Instance The FV instance to be erased
|
@param Instance The FV instance to be erased
|
||||||
@param Lba The logical block index to be erased
|
@param Lba The logical block index to be erased
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to erase block
|
@retval EFI_SUCESS Sucess to erase block
|
||||||
@retval Others Fail to erase block
|
@retval Others Fail to erase block
|
||||||
@ -439,10 +439,10 @@ EfiFvbEraseBlock (
|
|||||||
/**
|
/**
|
||||||
Retrieves attributes, insures positive polarity of attribute bits, returns
|
Retrieves attributes, insures positive polarity of attribute bits, returns
|
||||||
resulting attributes in output parameter
|
resulting attributes in output parameter
|
||||||
|
|
||||||
@param Instance The FV instance whose attributes is going to be returned
|
@param Instance The FV instance whose attributes is going to be returned
|
||||||
@param Attributes Output buffer which contains attributes
|
@param Attributes Output buffer which contains attributes
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to get Fv attribute
|
@retval EFI_SUCESS Sucess to get Fv attribute
|
||||||
@retval Others Fail to get Fv attribute
|
@retval Others Fail to get Fv attribute
|
||||||
@ -465,16 +465,16 @@ EfiFvbGetVolumeAttributes (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifies the current settings of the firmware volume according to the
|
Modifies the current settings of the firmware volume according to the
|
||||||
input parameter, and returns the new setting of the volume
|
input parameter, and returns the new setting of the volume
|
||||||
|
|
||||||
@param Instance The FV instance whose attributes is going to be
|
@param Instance The FV instance whose attributes is going to be
|
||||||
modified
|
modified
|
||||||
@param Attributes On input, it is a pointer to EFI_FVB_ATTRIBUTES
|
@param Attributes On input, it is a pointer to EFI_FVB_ATTRIBUTES
|
||||||
containing the desired firmware volume settings.
|
containing the desired firmware volume settings.
|
||||||
On successful return, it contains the new settings
|
On successful return, it contains the new settings
|
||||||
of the firmware volume
|
of the firmware volume
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to set Fv attribute
|
@retval EFI_SUCESS Sucess to set Fv attribute
|
||||||
@retval Others Fail to set Fv attribute
|
@retval Others Fail to set Fv attribute
|
||||||
@ -501,10 +501,10 @@ EfiFvbSetVolumeAttributes (
|
|||||||
|
|
||||||
@param Instance The FV instance whose base address is going to be
|
@param Instance The FV instance whose base address is going to be
|
||||||
returned
|
returned
|
||||||
@param BaseAddress Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
|
@param BaseAddress Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
|
||||||
that on successful return, contains the base address
|
that on successful return, contains the base address
|
||||||
of the firmware volume.
|
of the firmware volume.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to get physical address
|
@retval EFI_SUCESS Sucess to get physical address
|
||||||
@retval Others Fail to get physical address
|
@retval Others Fail to get physical address
|
||||||
@ -538,7 +538,7 @@ EfiFvbGetPhysicalAddress (
|
|||||||
number of consecutive blocks starting with Lba is
|
number of consecutive blocks starting with Lba is
|
||||||
returned. All blocks in this range have a size of
|
returned. All blocks in this range have a size of
|
||||||
BlockSize
|
BlockSize
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to get block size
|
@retval EFI_SUCESS Sucess to get block size
|
||||||
@retval Others Fail to get block size
|
@retval Others Fail to get block size
|
||||||
@ -567,11 +567,11 @@ EfiFvbGetBlockSize (
|
|||||||
|
|
||||||
@param Instance The FV instance to be erased
|
@param Instance The FV instance to be erased
|
||||||
@param StartLba The starting logical block index to be erased
|
@param StartLba The starting logical block index to be erased
|
||||||
@param OffsetStartLba Offset into the starting block at which to
|
@param OffsetStartLba Offset into the starting block at which to
|
||||||
begin erasing
|
begin erasing
|
||||||
@param LastLba The last logical block index to be erased
|
@param LastLba The last logical block index to be erased
|
||||||
@param OffsetLastLba Offset into the last block at which to end erasing
|
@param OffsetLastLba Offset into the last block at which to end erasing
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||||
@retval EFI_SUCESS Sucess to erase custom block range
|
@retval EFI_SUCESS Sucess to erase custom block range
|
||||||
@retval Others Fail to erase custom block range
|
@retval Others Fail to erase custom block range
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/**@file
|
/**@file
|
||||||
Library utility functions for Runtime driver.
|
Library utility functions for Runtime driver.
|
||||||
|
|
||||||
Copyright (c) 2006 Intel Corporation. <BR>
|
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
|
||||||
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.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ EFI_RUNTIME_SERVICES *mRT;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Set AtRuntime flag as TRUE after ExitBootServices
|
Set AtRuntime flag as TRUE after ExitBootServices
|
||||||
|
|
||||||
@param[in] Event The Event that is being processed
|
@param[in] Event The Event that is being processed
|
||||||
@param[in] Context Event Context
|
@param[in] Context Event Context
|
||||||
**/
|
**/
|
||||||
@ -46,9 +46,9 @@ RuntimeDriverExitBootServices (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Fixup internal data so that EFI can be call in virtual mode.
|
Fixup internal data so that EFI can be call in virtual mode.
|
||||||
Call the passed in Child Notify event and convert any pointers in
|
Call the passed in Child Notify event and convert any pointers in
|
||||||
lib to virtual mode.
|
lib to virtual mode.
|
||||||
|
|
||||||
@param[in] Event The Event that is being processed
|
@param[in] Event The Event that is being processed
|
||||||
@param[in] Context Event Context
|
@param[in] Context Event Context
|
||||||
**/
|
**/
|
||||||
@ -63,7 +63,7 @@ RuntimeLibVirtualNotifyEvent (
|
|||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_EVENT_NOTIFY ChildNotifyEventHandler;
|
EFI_EVENT_NOTIFY ChildNotifyEventHandler;
|
||||||
|
|
||||||
for (Index = 0;
|
for (Index = 0;
|
||||||
_gDriverSetVirtualAddressMapEvent[Index] != NULL;
|
_gDriverSetVirtualAddressMapEvent[Index] != NULL;
|
||||||
Index++) {
|
Index++) {
|
||||||
ChildNotifyEventHandler = _gDriverSetVirtualAddressMapEvent[Index];
|
ChildNotifyEventHandler = _gDriverSetVirtualAddressMapEvent[Index];
|
||||||
@ -79,11 +79,11 @@ RuntimeLibVirtualNotifyEvent (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Intialize runtime Driver Lib if it has not yet been initialized.
|
Intialize runtime Driver Lib if it has not yet been initialized.
|
||||||
|
|
||||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@return EFI_STATUS always returns EFI_SUCCESS except EFI_ALREADY_STARTED if already started.
|
@return EFI_STATUS always returns EFI_SUCCESS except EFI_ALREADY_STARTED if already started.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -101,11 +101,11 @@ RuntimeDriverLibConstruct (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Register SetVirtualAddressMap () notify function
|
// Register SetVirtualAddressMap () notify function
|
||||||
//
|
//
|
||||||
ASSERT (gBS != NULL);
|
ASSERT (gBS != NULL);
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
RuntimeLibVirtualNotifyEvent,
|
RuntimeLibVirtualNotifyEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&mEfiVirtualNotifyEvent
|
&mEfiVirtualNotifyEvent
|
||||||
@ -118,7 +118,7 @@ RuntimeDriverLibConstruct (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This routine will free some resources which have been allocated in
|
This routine will free some resources which have been allocated in
|
||||||
EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error,
|
EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error,
|
||||||
it must call this routine to free the allocated resource before the exiting.
|
it must call this routine to free the allocated resource before the exiting.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Shutdown the Runtime Driver Lib successfully
|
@retval EFI_SUCCESS Shutdown the Runtime Driver Lib successfully
|
||||||
@ -139,13 +139,13 @@ RuntimeDriverLibDeconstruct (
|
|||||||
ASSERT (gBS != NULL);
|
ASSERT (gBS != NULL);
|
||||||
Status = gBS->CloseEvent (mEfiVirtualNotifyEvent);
|
Status = gBS->CloseEvent (mEfiVirtualNotifyEvent);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return TRUE if ExitBootServices () has been called
|
Return TRUE if ExitBootServices () has been called
|
||||||
|
|
||||||
@retval TRUE If ExitBootServices () has been called
|
@retval TRUE If ExitBootServices () has been called
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
@ -159,7 +159,7 @@ EfiAtRuntime (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Return TRUE if SetVirtualAddressMap () has been called
|
Return TRUE if SetVirtualAddressMap () has been called
|
||||||
|
|
||||||
@retval TRUE If SetVirtualAddressMap () has been called
|
@retval TRUE If SetVirtualAddressMap () has been called
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Event - The Event that is being processed
|
Event - The Event that is being processed
|
||||||
|
|
||||||
Context - Event Context
|
Context - Event Context
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
@ -64,16 +64,16 @@ RuntimeLibVirtualNotifyEvent (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Fixup internal data so that EFI can be call in virtual mode.
|
Fixup internal data so that EFI can be call in virtual mode.
|
||||||
Call the passed in Child Notify event and convert any pointers in
|
Call the passed in Child Notify event and convert any pointers in
|
||||||
lib to virtual mode.
|
lib to virtual mode.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Event - The Event that is being processed
|
Event - The Event that is being processed
|
||||||
|
|
||||||
Context - Event Context
|
Context - Event Context
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
@ -103,12 +103,12 @@ RuntimeDriverLibConstruct (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Intialize runtime Driver Lib if it has not yet been initialized.
|
Intialize runtime Driver Lib if it has not yet been initialized.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
ImageHandle - The firmware allocated handle for the EFI image.
|
ImageHandle - The firmware allocated handle for the EFI image.
|
||||||
|
|
||||||
SystemTable - A pointer to the EFI System Table.
|
SystemTable - A pointer to the EFI System Table.
|
||||||
|
|
||||||
GoVirtualChildEvent - Caller can register a virtual notification event.
|
GoVirtualChildEvent - Caller can register a virtual notification event.
|
||||||
@ -128,8 +128,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
if (_gDriverSetVirtualAddressMapEvent[0] != NULL) {
|
if (_gDriverSetVirtualAddressMapEvent[0] != NULL) {
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
RuntimeLibVirtualNotifyEvent,
|
RuntimeLibVirtualNotifyEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&mEfiVirtualNotifyEvent
|
&mEfiVirtualNotifyEvent
|
||||||
@ -151,14 +151,14 @@ RuntimeDriverLibDeconstruct (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine will free some resources which have been allocated in
|
This routine will free some resources which have been allocated in
|
||||||
EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error,
|
EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error,
|
||||||
it must call this routine to free the allocated resource before the exiting.
|
it must call this routine to free the allocated resource before the exiting.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - Shotdown the Runtime Driver Lib successfully
|
EFI_SUCCESS - Shotdown the Runtime Driver Lib successfully
|
||||||
EFI_UNSUPPORTED - Runtime Driver lib was not initialized at all
|
EFI_UNSUPPORTED - Runtime Driver lib was not initialized at all
|
||||||
@ -191,7 +191,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
NONE
|
NONE
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
TRUE - If ExitBootService () has been called
|
TRUE - If ExitBootService () has been called
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -220,7 +220,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
NONE
|
NONE
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
TRUE - If SetVirtualAddressMap () has been called
|
TRUE - If SetVirtualAddressMap () has been called
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -366,8 +366,8 @@ Returns:
|
|||||||
// Create Event to support locking StdIn Device
|
// Create Event to support locking StdIn Device
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
ConSpliterConsoleControlLockStdInEvent,
|
ConSpliterConsoleControlLockStdInEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&ConInPrivate->LockEvent
|
&ConInPrivate->LockEvent
|
||||||
@ -375,8 +375,8 @@ Returns:
|
|||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
ConSplitterTextInWaitForKey,
|
ConSplitterTextInWaitForKey,
|
||||||
ConInPrivate,
|
ConInPrivate,
|
||||||
&ConInPrivate->TextIn.WaitForKey
|
&ConInPrivate->TextIn.WaitForKey
|
||||||
@ -395,8 +395,8 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
ConSplitterSimplePointerWaitForInput,
|
ConSplitterSimplePointerWaitForInput,
|
||||||
ConInPrivate,
|
ConInPrivate,
|
||||||
&ConInPrivate->SimplePointer.WaitForInput
|
&ConInPrivate->SimplePointer.WaitForInput
|
||||||
|
@ -727,7 +727,7 @@ GraphicsConsoleConOutOutputString (
|
|||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
//
|
//
|
||||||
// Current mode
|
// Current mode
|
||||||
//
|
//
|
||||||
@ -1078,7 +1078,7 @@ GraphicsConsoleConOutQueryMode (
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
||||||
@ -1141,7 +1141,7 @@ GraphicsConsoleConOutSetMode (
|
|||||||
UINT32 RefreshRate;
|
UINT32 RefreshRate;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
||||||
GraphicsOutput = Private->GraphicsOutput;
|
GraphicsOutput = Private->GraphicsOutput;
|
||||||
@ -1343,7 +1343,7 @@ GraphicsConsoleConOutSetAttribute (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
EraseCursor (This);
|
EraseCursor (This);
|
||||||
|
|
||||||
@ -1395,7 +1395,7 @@ GraphicsConsoleConOutClearScreen (
|
|||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
||||||
GraphicsOutput = Private->GraphicsOutput;
|
GraphicsOutput = Private->GraphicsOutput;
|
||||||
@ -1482,7 +1482,7 @@ GraphicsConsoleConOutSetCursorPosition (
|
|||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
||||||
ModeData = &(Private->ModeData[This->Mode->Mode]);
|
ModeData = &(Private->ModeData[This->Mode->Mode]);
|
||||||
@ -1541,7 +1541,7 @@ GraphicsConsoleConOutEnableCursor (
|
|||||||
{
|
{
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
EraseCursor (This);
|
EraseCursor (This);
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
Terminal.c
|
Terminal.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Revision History:
|
Revision History:
|
||||||
|
|
||||||
@ -289,10 +289,10 @@ TerminalDriverBindingStart (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (&DefaultNode->Guid, &gEfiPcAnsiGuid, sizeof (EFI_GUID));
|
CopyMem (&DefaultNode->Guid, &gEfiPcAnsiGuid, sizeof (EFI_GUID));
|
||||||
RemainingDevicePath = (EFI_DEVICE_PATH_PROTOCOL*) DefaultNode;
|
RemainingDevicePath = (EFI_DEVICE_PATH_PROTOCOL*) DefaultNode;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Use the RemainingDevicePath to determine the terminal type
|
// Use the RemainingDevicePath to determine the terminal type
|
||||||
//
|
//
|
||||||
@ -341,8 +341,8 @@ TerminalDriverBindingStart (
|
|||||||
TerminalDevice->SimpleInput.ReadKeyStroke = TerminalConInReadKeyStroke;
|
TerminalDevice->SimpleInput.ReadKeyStroke = TerminalConInReadKeyStroke;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
TerminalConInWaitForKey,
|
TerminalConInWaitForKey,
|
||||||
&TerminalDevice->SimpleInput,
|
&TerminalDevice->SimpleInput,
|
||||||
&TerminalDevice->SimpleInput.WaitForKey
|
&TerminalDevice->SimpleInput.WaitForKey
|
||||||
@ -465,8 +465,8 @@ TerminalDriverBindingStart (
|
|||||||
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
|
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TerminalDevice->TwoSecondTimeOut
|
&TerminalDevice->TwoSecondTimeOut
|
||||||
@ -568,7 +568,7 @@ TerminalDriverBindingStart (
|
|||||||
if (DefaultNode != NULL) {
|
if (DefaultNode != NULL) {
|
||||||
FreePool (DefaultNode);
|
FreePool (DefaultNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ReportError:
|
ReportError:
|
||||||
@ -614,7 +614,7 @@ Error:
|
|||||||
if (DefaultNode != NULL) {
|
if (DefaultNode != NULL) {
|
||||||
FreePool (DefaultNode);
|
FreePool (DefaultNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
This->Stop (This, Controller, 0, NULL);
|
This->Stop (This, Controller, 0, NULL);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
@ -883,9 +883,9 @@ TerminalRemoveConsoleDevVariable (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Remove console device variable.
|
Remove console device variable.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
VariableName - A pointer to the variable name.
|
VariableName - A pointer to the variable name.
|
||||||
@ -1022,7 +1022,7 @@ Returns:
|
|||||||
Caller is repsoncible freeing the buffer.
|
Caller is repsoncible freeing the buffer.
|
||||||
|
|
||||||
NULL - Variable was not read
|
NULL - Variable was not read
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -632,7 +632,7 @@ Returns:
|
|||||||
InitializeListHead (&mPrivateData.DataListHead);
|
InitializeListHead (&mPrivateData.DataListHead);
|
||||||
InitializeListHead (&mPrivateData.FilterDriverListHead);
|
InitializeListHead (&mPrivateData.FilterDriverListHead);
|
||||||
|
|
||||||
EfiInitializeLock (&mPrivateData.DataLock, EFI_TPL_NOTIFY);
|
EfiInitializeLock (&mPrivateData.DataLock, TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure we get a bigger MTC number on every boot!
|
// Make sure we get a bigger MTC number on every boot!
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ Module Name:
|
|||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Data Hub filter driver that takes DEBUG () info from Data Hub and writes it
|
Data Hub filter driver that takes DEBUG () info from Data Hub and writes it
|
||||||
to StdErr if it exists.
|
to StdErr if it exists.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -42,7 +42,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
Event - The event that occured, not used
|
Event - The event that occured, not used
|
||||||
Context - DataHub Protocol Pointer
|
Context - DataHub Protocol Pointer
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
None.
|
None.
|
||||||
|
|
||||||
@ -119,9 +119,9 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The event handler was registered.
|
EFI_SUCCESS - The event handler was registered.
|
||||||
EFI_OUT_OF_RESOURCES - The event hadler was not registered due to lack of
|
EFI_OUT_OF_RESOURCES - The event hadler was not registered due to lack of
|
||||||
system resources.
|
system resources.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -137,8 +137,8 @@ Returns:
|
|||||||
// Create an event and register it with the filter driver
|
// Create an event and register it with the filter driver
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
DataHubStdErrEventHandler,
|
DataHubStdErrEventHandler,
|
||||||
mDataHub,
|
mDataHub,
|
||||||
&mDataHubStdErrEvent
|
&mDataHubStdErrEvent
|
||||||
@ -151,7 +151,7 @@ Returns:
|
|||||||
Status = mDataHub->RegisterFilterDriver (
|
Status = mDataHub->RegisterFilterDriver (
|
||||||
mDataHub,
|
mDataHub,
|
||||||
mDataHubStdErrEvent,
|
mDataHubStdErrEvent,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
DataClass,
|
DataClass,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
@ -285,7 +285,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// else remove the previously installed handler
|
// else remove the previously installed handler
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
InterruptFlags = ProgramInterruptFlags (DISABLE_INTERRUPTS);
|
InterruptFlags = ProgramInterruptFlags (DISABLE_INTERRUPTS);
|
||||||
if (ExceptionType == EXCEPT_IPF_EXTERNAL_INTERRUPT) {
|
if (ExceptionType == EXCEPT_IPF_EXTERNAL_INTERRUPT) {
|
||||||
UnchainExternalInterrupt ();
|
UnchainExternalInterrupt ();
|
||||||
@ -305,7 +305,7 @@ Returns:
|
|||||||
// no user handler installed on this vector
|
// no user handler installed on this vector
|
||||||
//
|
//
|
||||||
if (NewCallback != NULL) {
|
if (NewCallback != NULL) {
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
InterruptFlags = ProgramInterruptFlags (DISABLE_INTERRUPTS);
|
InterruptFlags = ProgramInterruptFlags (DISABLE_INTERRUPTS);
|
||||||
if (ExceptionType == EXCEPT_IPF_EXTERNAL_INTERRUPT) {
|
if (ExceptionType == EXCEPT_IPF_EXTERNAL_INTERRUPT) {
|
||||||
ChainExternalInterrupt (NewCallback);
|
ChainExternalInterrupt (NewCallback);
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name:
|
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:
|
||||||
|
|
||||||
EbcInt.c
|
EbcInt.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Top level module for the EBC virtual machine implementation.
|
Top level module for the EBC virtual machine implementation.
|
||||||
Provides auxilliary support routines for the VM. That is, routines
|
Provides auxilliary support routines for the VM. That is, routines
|
||||||
that are not particularly related to VM execution of EBC instructions.
|
that are not particularly related to VM execution of EBC instructions.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
#include "EbcInt.h"
|
#include "EbcInt.h"
|
||||||
@ -196,17 +196,17 @@ InitializeEbcDriver (
|
|||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Initializes the VM EFI interface. Allocates memory for the VM interface
|
Initializes the VM EFI interface. Allocates memory for the VM interface
|
||||||
and registers the VM protocol.
|
and registers the VM protocol.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
ImageHandle - EFI image handle.
|
ImageHandle - EFI image handle.
|
||||||
SystemTable - Pointer to the EFI system table.
|
SystemTable - Pointer to the EFI system table.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Standard EFI status code.
|
Standard EFI status code.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -396,9 +396,9 @@ EbcCreateThunk (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This is the top-level routine plugged into the EBC protocol. Since thunks
|
This is the top-level routine plugged into the EBC protocol. Since thunks
|
||||||
are very processor-specific, from here we dispatch directly to the very
|
are very processor-specific, from here we dispatch directly to the very
|
||||||
processor-specific routine EbcCreateThunks().
|
processor-specific routine EbcCreateThunks().
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
@ -438,7 +438,7 @@ EbcDebugGetMaximumProcessorIndex (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This EBC debugger protocol service is called by the debug agent
|
This EBC debugger protocol service is called by the debug agent
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
@ -446,7 +446,7 @@ Arguments:
|
|||||||
This - pointer to the caller's debug support protocol interface
|
This - pointer to the caller's debug support protocol interface
|
||||||
MaxProcessorIndex - pointer to a caller allocated UINTN in which the maximum
|
MaxProcessorIndex - pointer to a caller allocated UINTN in which the maximum
|
||||||
processor index is returned.
|
processor index is returned.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Standard EFI_STATUS
|
Standard EFI_STATUS
|
||||||
@ -468,10 +468,10 @@ EbcDebugRegisterPeriodicCallback (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This protocol service is called by the debug agent to register a function
|
This protocol service is called by the debug agent to register a function
|
||||||
for us to call on a periodic basis.
|
for us to call on a periodic basis.
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ Returns:
|
|||||||
if ((mDebugPeriodicCallback != NULL) && (PeriodicCallback != NULL)) {
|
if ((mDebugPeriodicCallback != NULL) && (PeriodicCallback != NULL)) {
|
||||||
return EFI_ALREADY_STARTED;
|
return EFI_ALREADY_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDebugPeriodicCallback = PeriodicCallback;
|
mDebugPeriodicCallback = PeriodicCallback;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -507,10 +507,10 @@ EbcDebugRegisterExceptionCallback (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This protocol service is called by the debug agent to register a function
|
This protocol service is called by the debug agent to register a function
|
||||||
for us to call when we detect an exception.
|
for us to call when we detect an exception.
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -548,12 +548,12 @@ EbcDebugInvalidateInstructionCache (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This EBC debugger protocol service is called by the debug agent. Required
|
This EBC debugger protocol service is called by the debug agent. Required
|
||||||
for DebugSupport compliance but is only stubbed out for EBC.
|
for DebugSupport compliance but is only stubbed out for EBC.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
@ -574,7 +574,7 @@ EbcDebugSignalException (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
The VM interpreter calls this function when an exception is detected.
|
The VM interpreter calls this function when an exception is detected.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
VmPtr - pointer to a VM context for passing info to the EFI debugger.
|
VmPtr - pointer to a VM context for passing info to the EFI debugger.
|
||||||
@ -582,7 +582,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS if it returns at all
|
EFI_SUCCESS if it returns at all
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_SYSTEM_CONTEXT_EBC EbcContext;
|
EFI_SYSTEM_CONTEXT_EBC EbcContext;
|
||||||
@ -641,7 +641,7 @@ Returns:
|
|||||||
VmPtr->Ip = (VMIP)(UINTN)EbcContext.Ip;
|
VmPtr->Ip = (VMIP)(UINTN)EbcContext.Ip;
|
||||||
VmPtr->Flags = EbcContext.Flags;
|
VmPtr->Flags = EbcContext.Flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,7 +655,7 @@ InitializeEbcCallback (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
To install default Callback function for the VM interpreter.
|
To install default Callback function for the VM interpreter.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - pointer to the instance of DebugSupport protocol
|
This - pointer to the instance of DebugSupport protocol
|
||||||
@ -663,7 +663,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
INTN Index;
|
INTN Index;
|
||||||
@ -685,8 +685,8 @@ Returns:
|
|||||||
// For PeriodicCallback
|
// For PeriodicCallback
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
EbcPeriodicNotifyFunction,
|
EbcPeriodicNotifyFunction,
|
||||||
&mVmPtr,
|
&mVmPtr,
|
||||||
&mEbcPeriodicEvent
|
&mEbcPeriodicEvent
|
||||||
@ -720,7 +720,7 @@ Routine Description:
|
|||||||
The default Exception Callback for the VM interpreter.
|
The default Exception Callback for the VM interpreter.
|
||||||
In this function, we report status code, and print debug information
|
In this function, we report status code, and print debug information
|
||||||
about EBC_CONTEXT, then dead loop.
|
about EBC_CONTEXT, then dead loop.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
InterruptType - Interrupt type.
|
InterruptType - Interrupt type.
|
||||||
@ -729,7 +729,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@ -753,7 +753,7 @@ Routine Description:
|
|||||||
|
|
||||||
The periodic callback function for EBC VM interpreter, which is used
|
The periodic callback function for EBC VM interpreter, which is used
|
||||||
to support the EFI debug support protocol.
|
to support the EFI debug support protocol.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Event - The Periodic Callback Event.
|
Event - The Periodic Callback Event.
|
||||||
@ -762,7 +762,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
VM_CONTEXT *VmPtr;
|
VM_CONTEXT *VmPtr;
|
||||||
@ -787,7 +787,7 @@ Routine Description:
|
|||||||
|
|
||||||
The VM interpreter calls this function on a periodic basis to support
|
The VM interpreter calls this function on a periodic basis to support
|
||||||
the EFI debug support protocol.
|
the EFI debug support protocol.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
VmPtr - pointer to a VM context for passing info to the debugger.
|
VmPtr - pointer to a VM context for passing info to the debugger.
|
||||||
@ -795,12 +795,12 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Standard EFI status.
|
Standard EFI status.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_SYSTEM_CONTEXT_EBC EbcContext;
|
EFI_SYSTEM_CONTEXT_EBC EbcContext;
|
||||||
EFI_SYSTEM_CONTEXT SystemContext;
|
EFI_SYSTEM_CONTEXT SystemContext;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If someone's registered for periodic callbacks, then call them.
|
// If someone's registered for periodic callbacks, then call them.
|
||||||
//
|
//
|
||||||
@ -838,7 +838,7 @@ Returns:
|
|||||||
VmPtr->Ip = (VMIP)(UINTN)EbcContext.Ip;
|
VmPtr->Ip = (VMIP)(UINTN)EbcContext.Ip;
|
||||||
VmPtr->Flags = EbcContext.Flags;
|
VmPtr->Flags = EbcContext.Flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -852,8 +852,8 @@ EbcUnloadImage (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine is called by the core when an image is being unloaded from
|
This routine is called by the core when an image is being unloaded from
|
||||||
memory. Basically we now have the opportunity to do any necessary cleanup.
|
memory. Basically we now have the opportunity to do any necessary cleanup.
|
||||||
Typically this will include freeing any memory allocated for thunk-creation.
|
Typically this will include freeing any memory allocated for thunk-creation.
|
||||||
|
|
||||||
@ -931,8 +931,8 @@ EbcAddImageThunk (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Add a thunk to our list of thunks for a given image handle.
|
Add a thunk to our list of thunks for a given image handle.
|
||||||
Also flush the instruction cache since we've written thunk code
|
Also flush the instruction cache since we've written thunk code
|
||||||
to memory that will be executed eventually.
|
to memory that will be executed eventually.
|
||||||
|
|
||||||
@ -943,7 +943,7 @@ Arguments:
|
|||||||
ThunkSize - the size of the thunk memory allocated
|
ThunkSize - the size of the thunk memory allocated
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_OUT_OF_RESOURCES - memory allocation failed
|
EFI_OUT_OF_RESOURCES - memory allocation failed
|
||||||
EFI_SUCCESS - successful completion
|
EFI_SUCCESS - successful completion
|
||||||
|
|
||||||
@ -1041,7 +1041,7 @@ GetEBCStack(
|
|||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
OldTpl = gBS->RaiseTPL(EFI_TPL_HIGH_LEVEL);
|
OldTpl = gBS->RaiseTPL(TPL_HIGH_LEVEL);
|
||||||
for (Index = 0; Index < mStackNum; Index ++) {
|
for (Index = 0; Index < mStackNum; Index ++) {
|
||||||
if (mStackBufferIndex[Index] == NULL) {
|
if (mStackBufferIndex[Index] == NULL) {
|
||||||
mStackBufferIndex[Index] = Handle;
|
mStackBufferIndex[Index] = Handle;
|
||||||
@ -1121,7 +1121,7 @@ InitEbcVmTestProtocol (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Produce an EBC VM test protocol that can be used for regression tests.
|
Produce an EBC VM test protocol that can be used for regression tests.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -824,7 +824,7 @@ Returns:
|
|||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, EFI_TPL_NOTIFY);
|
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Intialize volatile variable store
|
// Intialize volatile variable store
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, 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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Update the monotonic counter with a lock
|
// Update the monotonic counter with a lock
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
*Count = mEfiMtc;
|
*Count = mEfiMtc;
|
||||||
mEfiMtc++;
|
mEfiMtc++;
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
@ -104,22 +104,22 @@ Returns:
|
|||||||
/**
|
/**
|
||||||
Returns the next high 32 bits of the platform's monotonic counter.
|
Returns the next high 32 bits of the platform's monotonic counter.
|
||||||
|
|
||||||
The GetNextHighMonotonicCount() function returns the next high 32 bits
|
The GetNextHighMonotonicCount() function returns the next high 32 bits
|
||||||
of the platform's monotonic counter. The platform's monotonic counter is
|
of the platform's monotonic counter. The platform's monotonic counter is
|
||||||
comprised of two 32 bit quantities: the high 32 bits and the low 32 bits.
|
comprised of two 32 bit quantities: the high 32 bits and the low 32 bits.
|
||||||
During boot service time the low 32 bit value is volatile: it is reset to
|
During boot service time the low 32 bit value is volatile: it is reset to
|
||||||
zero on every system reset and is increased by 1 on every call to GetNextMonotonicCount().
|
zero on every system reset and is increased by 1 on every call to GetNextMonotonicCount().
|
||||||
The high 32 bit value is non-volatile and is increased by 1 whenever the system resets
|
The high 32 bit value is non-volatile and is increased by 1 whenever the system resets
|
||||||
or whenever the low 32 bit count [returned by GetNextMonoticCount()] overflows.
|
or whenever the low 32 bit count [returned by GetNextMonoticCount()] overflows.
|
||||||
The GetNextMonotonicCount() function is only available at boot services time.
|
The GetNextMonotonicCount() function is only available at boot services time.
|
||||||
If the operating system wishes to extend the platform monotonic counter to runtime,
|
If the operating system wishes to extend the platform monotonic counter to runtime,
|
||||||
it may do so by utilizing GetNextHighMonotonicCount(). To do this, before calling
|
it may do so by utilizing GetNextHighMonotonicCount(). To do this, before calling
|
||||||
ExitBootServices() the operating system would call GetNextMonotonicCount() to obtain
|
ExitBootServices() the operating system would call GetNextMonotonicCount() to obtain
|
||||||
the current platform monotonic count. The operating system would then provide an
|
the current platform monotonic count. The operating system would then provide an
|
||||||
interface that returns the next count by:
|
interface that returns the next count by:
|
||||||
Adding 1 to the last count.
|
Adding 1 to the last count.
|
||||||
Before the lower 32 bits of the count overflows, call GetNextHighMonotonicCount().
|
Before the lower 32 bits of the count overflows, call GetNextHighMonotonicCount().
|
||||||
This will increase the high 32 bits of the platform's non-volatile portion of the monotonic
|
This will increase the high 32 bits of the platform's non-volatile portion of the monotonic
|
||||||
count by 1.
|
count by 1.
|
||||||
|
|
||||||
This function may only be called at Runtime.
|
This function may only be called at Runtime.
|
||||||
@ -128,7 +128,7 @@ Returns:
|
|||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER If HighCount is NULL.
|
@retval EFI_INVALID_PARAMETER If HighCount is NULL.
|
||||||
@retval EFI_SUCCESS Operation is successful.
|
@retval EFI_SUCCESS Operation is successful.
|
||||||
@retval EFI_OUT_OF_RESOURCES If variable service reports that not enough storage
|
@retval EFI_OUT_OF_RESOURCES If variable service reports that not enough storage
|
||||||
is available to hold the variable and its data.
|
is available to hold the variable and its data.
|
||||||
@retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
|
@retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Use a lock if called before ExitBootServices()
|
// Use a lock if called before ExitBootServices()
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
*HighCount = (UINT32) RShiftU64 (mEfiMtc, 32) + 1;
|
*HighCount = (UINT32) RShiftU64 (mEfiMtc, 32) + 1;
|
||||||
mEfiMtc = LShiftU64 (*HighCount, 32);
|
mEfiMtc = LShiftU64 (*HighCount, 32);
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
@ -203,7 +203,7 @@ Arguments:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS The event has been handled properly
|
EFI_SUCCESS The event has been handled properly
|
||||||
EFI_NOT_FOUND An error occurred updating the variable.
|
EFI_NOT_FOUND An error occurred updating the variable.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -243,8 +243,8 @@ Returns:
|
|||||||
// Initialize event to handle overflows
|
// Initialize event to handle overflows
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
EfiMtcEventHandler,
|
EfiMtcEventHandler,
|
||||||
NULL,
|
NULL,
|
||||||
&mEfiMtcEvent
|
&mEfiMtcEvent
|
||||||
|
@ -417,8 +417,8 @@ WaitForReceive (
|
|||||||
// Create callback event and set timer
|
// Create callback event and set timer
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&CallbackEvent
|
&CallbackEvent
|
||||||
@ -622,8 +622,8 @@ SendPacket (
|
|||||||
// headersize should be zero if not filled in
|
// headersize should be zero if not filled in
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
@ -695,8 +695,8 @@ SendPacket (
|
|||||||
// immediately
|
// immediately
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
@ -2009,7 +2009,7 @@ BcSetStationIP (
|
|||||||
StationIpPtr = &PxebcMode->StationIp;
|
StationIpPtr = &PxebcMode->StationIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IS_INADDR_UNICAST (StationIpPtr) ||
|
if (!IS_INADDR_UNICAST (StationIpPtr) ||
|
||||||
((StationIpPtr->Addr[0] | SubnetMask) == BROADCAST_IPv4)) {
|
((StationIpPtr->Addr[0] | SubnetMask) == BROADCAST_IPv4)) {
|
||||||
//
|
//
|
||||||
// The station IP is not a unicast address.
|
// The station IP is not a unicast address.
|
||||||
@ -2159,10 +2159,10 @@ PxeBcDriverStart (
|
|||||||
//
|
//
|
||||||
// Lock access, just in case
|
// Lock access, just in case
|
||||||
//
|
//
|
||||||
EfiInitializeLock (&Private->Lock, EFI_TPL_CALLBACK);
|
EfiInitializeLock (&Private->Lock, TPL_CALLBACK);
|
||||||
EfiAcquireLock (&Private->Lock);
|
EfiAcquireLock (&Private->Lock);
|
||||||
|
|
||||||
EfiInitializeLock (&pLF->Lock, EFI_TPL_CALLBACK);
|
EfiInitializeLock (&pLF->Lock, TPL_CALLBACK);
|
||||||
EfiAcquireLock (&pLF->Lock);
|
EfiAcquireLock (&pLF->Lock);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, 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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
pxe_bc_arp.c
|
pxe_bc_arp.c
|
||||||
@ -405,7 +405,7 @@ Returns:
|
|||||||
// not how it would be done in a full system
|
// not how it would be done in a full system
|
||||||
//
|
//
|
||||||
#define ARP_REQUEST_TIMEOUT_MS 500 // try for half a second
|
#define ARP_REQUEST_TIMEOUT_MS 500 // try for half a second
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// BC Arp Routine
|
// BC Arp Routine
|
||||||
@ -543,8 +543,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
|
@ -587,8 +587,8 @@ SetStationIP (
|
|||||||
}
|
}
|
||||||
|
|
||||||
EfiStatus = gBS->CreateEvent (
|
EfiStatus = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&Private->Igmpv1TimeoutEvent
|
&Private->Igmpv1TimeoutEvent
|
||||||
@ -1283,8 +1283,8 @@ GetOffers (
|
|||||||
//
|
//
|
||||||
Private->GotProxy[DHCP_ONLY_IX] = 1;
|
Private->GotProxy[DHCP_ONLY_IX] = 1;
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
@ -1522,8 +1522,8 @@ GetBINLAck (
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
@ -1770,8 +1770,8 @@ TryFinishDORA (
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
@ -2599,8 +2599,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
StatCode = gBS->CreateEvent (
|
StatCode = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
|
@ -83,8 +83,8 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
EfiStatus = gBS->CreateEvent (
|
EfiStatus = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&Private->IgmpGroupEvent[TimerId]
|
&Private->IgmpGroupEvent[TimerId]
|
||||||
@ -405,8 +405,8 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
EfiStatus = gBS->CreateEvent (
|
EfiStatus = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&Private->Igmpv1TimeoutEvent
|
&Private->Igmpv1TimeoutEvent
|
||||||
|
@ -117,8 +117,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, 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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
pxe_loadfile.c
|
pxe_loadfile.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
An implementation of the load file protocol for network devices.
|
An implementation of the load file protocol for network devices.
|
||||||
|
|
||||||
@ -65,9 +65,9 @@ Arguments:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE -
|
EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE -
|
||||||
EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT -
|
EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT -
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
STATIC UINTN Propeller;
|
STATIC UINTN Propeller;
|
||||||
@ -173,7 +173,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
if (Ptr != NULL) {
|
if (Ptr != NULL) {
|
||||||
@ -199,7 +199,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_PXE_BASE_CODE_MODE *PxeBcMode;
|
EFI_PXE_BASE_CODE_MODE *PxeBcMode;
|
||||||
@ -276,11 +276,11 @@ Arguments:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
AUTO_SELECT -
|
AUTO_SELECT -
|
||||||
DO_MENU -
|
DO_MENU -
|
||||||
NO_MENU -
|
NO_MENU -
|
||||||
LOCAL_BOOT -
|
LOCAL_BOOT -
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -307,8 +307,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&TimeoutEvent
|
&TimeoutEvent
|
||||||
@ -332,8 +332,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER,
|
EVT_TIMER,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&SecondsEvent
|
&SecondsEvent
|
||||||
@ -375,7 +375,7 @@ Returns:
|
|||||||
|
|
||||||
gST->ConOut->SetCursorPosition (gST->ConOut, SecColumn, SecRow);
|
gST->ConOut->SetCursorPosition (gST->ConOut, SecColumn, SecRow);
|
||||||
AsciiPrint ("(%d) ", SecsLeft);
|
AsciiPrint ("(%d) ", SecsLeft);
|
||||||
|
|
||||||
//
|
//
|
||||||
// set the default action to be AUTO_SELECT
|
// set the default action to be AUTO_SELECT
|
||||||
//
|
//
|
||||||
@ -507,9 +507,9 @@ Arguments:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
NO_MENU -
|
NO_MENU -
|
||||||
LOCAL_BOOT -
|
LOCAL_BOOT -
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
PXE_OP_DISCOVERY_CONTROL *DiscoveryControlPtr;
|
PXE_OP_DISCOVERY_CONTROL *DiscoveryControlPtr;
|
||||||
@ -804,7 +804,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Value from DHCP option
|
Value from DHCP option
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
if (OpPtr->Header.Length == 1) {
|
if (OpPtr->Header.Length == 1) {
|
||||||
@ -836,7 +836,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer to opcode, may be NULL
|
Pointer to opcode, may be NULL
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
if (BufferPtr == NULL) {
|
if (BufferPtr == NULL) {
|
||||||
@ -889,7 +889,7 @@ Arguments:
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pointer to option in packet
|
Pointer to option in packet
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
UINTN PacketLen;
|
UINTN PacketLen;
|
||||||
@ -1234,9 +1234,9 @@ Arguments:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS -
|
EFI_SUCCESS -
|
||||||
EFI_NOT_READY -
|
EFI_NOT_READY -
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_PXE_BASE_CODE_MODE *PxeBcMode;
|
EFI_PXE_BASE_CODE_MODE *PxeBcMode;
|
||||||
@ -1363,7 +1363,7 @@ Arguments:
|
|||||||
This - Pointer to Loadfile interface
|
This - Pointer to Loadfile interface
|
||||||
FilePath - Not used and not checked
|
FilePath - Not used and not checked
|
||||||
BootPolicy - Must be TRUE
|
BootPolicy - Must be TRUE
|
||||||
BufferSize - Pointer to buffer size
|
BufferSize - Pointer to buffer size
|
||||||
Buffer - Pointer to download buffer or NULL
|
Buffer - Pointer to download buffer or NULL
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -558,8 +558,8 @@ Returns:
|
|||||||
// Setup timeout event and start timer.
|
// Setup timeout event and start timer.
|
||||||
//
|
//
|
||||||
efi_status = gBS->CreateEvent (
|
efi_status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
&timeout_notify,
|
&timeout_notify,
|
||||||
Private,
|
Private,
|
||||||
&Private->TimeoutEvent
|
&Private->TimeoutEvent
|
||||||
@ -588,8 +588,8 @@ Returns:
|
|||||||
// Setup periodic event for callbacks
|
// Setup periodic event for callbacks
|
||||||
//
|
//
|
||||||
efi_status = gBS->CreateEvent (
|
efi_status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
&periodic_notify,
|
&periodic_notify,
|
||||||
Private,
|
Private,
|
||||||
&Private->PeriodicEvent
|
&Private->PeriodicEvent
|
||||||
|
@ -112,7 +112,7 @@ Returns:
|
|||||||
// created at a lower level (TPL_CALLBACK) it gives an assert!
|
// created at a lower level (TPL_CALLBACK) it gives an assert!
|
||||||
//
|
//
|
||||||
if (mInitializeLock) {
|
if (mInitializeLock) {
|
||||||
EfiInitializeLock (&mLock, EFI_TPL_NOTIFY);
|
EfiInitializeLock (&mLock, TPL_NOTIFY);
|
||||||
mInitializeLock = FALSE;
|
mInitializeLock = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*++
|
/*++
|
||||||
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.
|
||||||
|
|
||||||
Module name:
|
Module name:
|
||||||
initialize.c
|
initialize.c
|
||||||
@ -190,8 +190,8 @@ Returns:
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
EfiStatus = gBS->CreateEvent (
|
EfiStatus = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
&SnpWaitForPacketNotify,
|
&SnpWaitForPacketNotify,
|
||||||
snp,
|
snp,
|
||||||
&snp->snp.WaitForPacket
|
&snp->snp.WaitForPacket
|
||||||
|
@ -453,7 +453,7 @@ Arguments:
|
|||||||
|
|
||||||
snp->Signature = SNP_DRIVER_SIGNATURE;
|
snp->Signature = SNP_DRIVER_SIGNATURE;
|
||||||
|
|
||||||
EfiInitializeLock (&snp->lock, EFI_TPL_NOTIFY);
|
EfiInitializeLock (&snp->lock, TPL_NOTIFY);
|
||||||
|
|
||||||
snp->snp.Revision = EFI_SIMPLE_NETWORK_PROTOCOL_REVISION;
|
snp->snp.Revision = EFI_SIMPLE_NETWORK_PROTOCOL_REVISION;
|
||||||
snp->snp.Start = snp_undi32_start;
|
snp->snp.Start = snp_undi32_start;
|
||||||
|
@ -17,7 +17,7 @@ Module Name: Pcd.c
|
|||||||
|
|
||||||
#include "Service.h"
|
#include "Service.h"
|
||||||
|
|
||||||
EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(EFI_TPL_CALLBACK);
|
EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(TPL_CALLBACK);
|
||||||
|
|
||||||
PCD_PROTOCOL mPcdInstance = {
|
PCD_PROTOCOL mPcdInstance = {
|
||||||
DxePcdSetSku,
|
DxePcdSetSku,
|
||||||
|
@ -342,7 +342,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
for (Link = mRuntime.EventHead.ForwardLink; Link != &mRuntime.EventHead; Link = Link->ForwardLink) {
|
for (Link = mRuntime.EventHead.ForwardLink; Link != &mRuntime.EventHead; Link = Link->ForwardLink) {
|
||||||
RuntimeEvent = _CR (Link, EFI_RUNTIME_EVENT_ENTRY, Link);
|
RuntimeEvent = _CR (Link, EFI_RUNTIME_EVENT_ENTRY, Link);
|
||||||
if ((RuntimeEvent->Type & EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) == EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
|
if ((RuntimeEvent->Type & EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
|
||||||
RuntimeEvent->NotifyFunction (
|
RuntimeEvent->NotifyFunction (
|
||||||
RuntimeEvent->Event,
|
RuntimeEvent->Event,
|
||||||
RuntimeEvent->NotifyContext
|
RuntimeEvent->NotifyContext
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Data Hub status code worker in DXE.
|
Data Hub status code worker in DXE.
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name: DataHubStatusCodeWorker.c
|
Module Name: DataHubStatusCodeWorker.c
|
||||||
|
|
||||||
@ -33,9 +33,9 @@ EFI_DATA_HUB_PROTOCOL *mDataHubProtocol;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Return one DATAHUB_STATUSCODE_RECORD space.
|
Return one DATAHUB_STATUSCODE_RECORD space.
|
||||||
The size of free record pool would be extend, if the pool is empty.
|
The size of free record pool would be extend, if the pool is empty.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@retval NULL Can not allocate free memeory for record.
|
@retval NULL Can not allocate free memeory for record.
|
||||||
@retval !NULL Point to buffer of record.
|
@retval !NULL Point to buffer of record.
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ AcquireRecordBuffer (
|
|||||||
LIST_ENTRY *Node;
|
LIST_ENTRY *Node;
|
||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
|
|
||||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
CurrentTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
if (!IsListEmpty (&mRecordsBuffer)) {
|
if (!IsListEmpty (&mRecordsBuffer)) {
|
||||||
Node = GetFirstNode (&mRecordsBuffer);
|
Node = GetFirstNode (&mRecordsBuffer);
|
||||||
@ -59,7 +59,7 @@ AcquireRecordBuffer (
|
|||||||
|
|
||||||
Record = _CR (Node, DATAHUB_STATUSCODE_RECORD, Node);
|
Record = _CR (Node, DATAHUB_STATUSCODE_RECORD, Node);
|
||||||
} else {
|
} else {
|
||||||
if (CurrentTpl > EFI_TPL_NOTIFY) {
|
if (CurrentTpl > TPL_NOTIFY) {
|
||||||
gBS->RestoreTPL (CurrentTpl);
|
gBS->RestoreTPL (CurrentTpl);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ AcquireRecordBuffer (
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
CurrentTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
for (Index = 1; Index < 16; Index++) {
|
for (Index = 1; Index < 16; Index++) {
|
||||||
InsertTailList (&mRecordsBuffer, &Record[Index].Node);
|
InsertTailList (&mRecordsBuffer, &Record[Index].Node);
|
||||||
}
|
}
|
||||||
@ -86,12 +86,12 @@ AcquireRecordBuffer (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve one record from Records FIFO. The record would be removed from FIFO and
|
Retrieve one record from Records FIFO. The record would be removed from FIFO and
|
||||||
release to free record buffer.
|
release to free record buffer.
|
||||||
|
|
||||||
@return !NULL Point to record, which is ready to be logged.
|
@return !NULL Point to record, which is ready to be logged.
|
||||||
@return NULL the FIFO of record is empty.
|
@return NULL the FIFO of record is empty.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
STATIC
|
||||||
DATAHUB_STATUSCODE_RECORD *
|
DATAHUB_STATUSCODE_RECORD *
|
||||||
@ -103,7 +103,7 @@ RetrieveRecord (
|
|||||||
LIST_ENTRY *Node;
|
LIST_ENTRY *Node;
|
||||||
EFI_TPL CurrentTpl;
|
EFI_TPL CurrentTpl;
|
||||||
|
|
||||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
CurrentTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
if (!IsListEmpty (&mRecordsFifo)) {
|
if (!IsListEmpty (&mRecordsFifo)) {
|
||||||
Node = GetFirstNode (&mRecordsFifo);
|
Node = GetFirstNode (&mRecordsFifo);
|
||||||
@ -122,29 +122,29 @@ RetrieveRecord (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Report status code into DataHub.
|
Report status code into DataHub.
|
||||||
|
|
||||||
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
|
@param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
|
||||||
|
|
||||||
@param Value Describes the current status of a hardware or software entity.
|
@param Value Describes the current status of a hardware or software entity.
|
||||||
This included information about the class and subclass that is used to classify the entity
|
This included information about the class and subclass that is used to classify the entity
|
||||||
as well as an operation. For progress codes, the operation is the current activity.
|
as well as an operation. For progress codes, the operation is the current activity.
|
||||||
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
For error codes, it is the exception. For debug codes, it is not defined at this time.
|
||||||
Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
|
Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
|
||||||
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
|
||||||
|
|
||||||
@param Instance The enumeration of a hardware or software entity within the system.
|
@param Instance The enumeration of a hardware or software entity within the system.
|
||||||
A system may contain multiple entities that match a class/subclass pairing.
|
A system may contain multiple entities that match a class/subclass pairing.
|
||||||
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
|
||||||
not meaningful, or not relevant. Valid instance numbers start with 1.
|
not meaningful, or not relevant. Valid instance numbers start with 1.
|
||||||
|
|
||||||
|
|
||||||
@param CallerId This optional parameter may be used to identify the caller.
|
@param CallerId This optional parameter may be used to identify the caller.
|
||||||
This parameter allows the status code driver to apply different rules to different callers.
|
This parameter allows the status code driver to apply different rules to different callers.
|
||||||
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
|
||||||
|
|
||||||
|
|
||||||
@param Data This optional parameter may be used to pass additional data
|
@param Data This optional parameter may be used to pass additional data
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.
|
@retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.
|
||||||
@retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called .
|
@retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called .
|
||||||
@retval EFI_SUCCESS Success to cache status code and signal log data event.
|
@retval EFI_SUCCESS Success to cache status code and signal log data event.
|
||||||
@ -212,7 +212,7 @@ DataHubStatusCodeReportWorker (
|
|||||||
|
|
||||||
if (Data->Size > EFI_STATUS_CODE_DATA_MAX_SIZE) {
|
if (Data->Size > EFI_STATUS_CODE_DATA_MAX_SIZE) {
|
||||||
Record->Data.Size = EFI_STATUS_CODE_DATA_MAX_SIZE;
|
Record->Data.Size = EFI_STATUS_CODE_DATA_MAX_SIZE;
|
||||||
}
|
}
|
||||||
CopyMem (Record->ExtendData, Data + 1, Record->Data.Size);
|
CopyMem (Record->ExtendData, Data + 1, Record->Data.Size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ LogDataHubEventCallBack (
|
|||||||
//
|
//
|
||||||
// Log DataRecord in Data Hub
|
// Log DataRecord in Data Hub
|
||||||
//
|
//
|
||||||
|
|
||||||
mDataHubProtocol->LogData (
|
mDataHubProtocol->LogData (
|
||||||
mDataHubProtocol,
|
mDataHubProtocol,
|
||||||
&gEfiStatusCodeGuid,
|
&gEfiStatusCodeGuid,
|
||||||
@ -293,7 +293,7 @@ LogDataHubEventCallBack (
|
|||||||
/**
|
/**
|
||||||
Initialize data hubstatus code.
|
Initialize data hubstatus code.
|
||||||
Create a data hub listener.
|
Create a data hub listener.
|
||||||
|
|
||||||
@return The function always return EFI_SUCCESS
|
@return The function always return EFI_SUCCESS
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -315,8 +315,8 @@ DataHubStatusCodeInitializeWorker (
|
|||||||
// Create a Notify Event to log data in Data Hub
|
// Create a Notify Event to log data in Data Hub
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
LogDataHubEventCallBack,
|
LogDataHubEventCallBack,
|
||||||
NULL,
|
NULL,
|
||||||
&mLogDataHubEvent
|
&mLogDataHubEvent
|
||||||
|
@ -99,10 +99,10 @@ SerialStatusCodeReportWorker (
|
|||||||
if (EfiAtRuntime ()) {
|
if (EfiAtRuntime ()) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
CurrentTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
gBS->RestoreTPL (CurrentTpl);
|
gBS->RestoreTPL (CurrentTpl);
|
||||||
|
|
||||||
if (CurrentTpl > EFI_TPL_CALLBACK ) {
|
if (CurrentTpl > TPL_CALLBACK ) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Create a timer event
|
// Create a timer event
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent);
|
Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Set the timer event
|
// Set the timer event
|
||||||
@ -324,7 +324,7 @@ Returns:
|
|||||||
Timeout = ONE_SECOND;
|
Timeout = ONE_SECOND;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
Status = gBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent);
|
Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the timer event
|
// Set the timer event
|
||||||
|
@ -1309,7 +1309,7 @@ Returns:
|
|||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, EFI_TPL_NOTIFY);
|
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal[Physical].VariableServicesLock, TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate memory for volatile variable store
|
// Allocate memory for volatile variable store
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -66,15 +66,15 @@ WatchdogTimerDriverExpires (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Notification function that is called if the watchdog timer is fired. If a
|
Notification function that is called if the watchdog timer is fired. If a
|
||||||
handler has been registered with the Watchdog Timer Architectural Protocol,
|
handler has been registered with the Watchdog Timer Architectural Protocol,
|
||||||
then that handler is called passing in the time period that has passed that
|
then that handler is called passing in the time period that has passed that
|
||||||
cause the watchdog timer to fire. Then, a call to the Runtime Service
|
cause the watchdog timer to fire. Then, a call to the Runtime Service
|
||||||
ResetSystem() is made to reset the platform.
|
ResetSystem() is made to reset the platform.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Timer - The one-shot timer event that was signaled when the watchdog timer
|
Timer - The one-shot timer event that was signaled when the watchdog timer
|
||||||
expired.
|
expired.
|
||||||
|
|
||||||
Context - The context that was registered when the event Timer was created.
|
Context - The context that was registered when the event Timer was created.
|
||||||
@ -115,15 +115,15 @@ WatchdogTimerDriverRegisterHandler (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function registers a handler that is to be invoked when the watchdog
|
This function registers a handler that is to be invoked when the watchdog
|
||||||
timer fires. By default, the EFI_WATCHDOG_TIMER protocol will call the
|
timer fires. By default, the EFI_WATCHDOG_TIMER protocol will call the
|
||||||
Runtime Service ResetSystem() when the watchdog timer fires. If a
|
Runtime Service ResetSystem() when the watchdog timer fires. If a
|
||||||
NotifyFunction is registered, then the NotifyFunction will be called before
|
NotifyFunction is registered, then the NotifyFunction will be called before
|
||||||
the Runtime Service ResetSystem() is called. If NotifyFunction is NULL, then
|
the Runtime Service ResetSystem() is called. If NotifyFunction is NULL, then
|
||||||
the watchdog handler is unregistered. If a watchdog handler is registered,
|
the watchdog handler is unregistered. If a watchdog handler is registered,
|
||||||
then EFI_SUCCESS is returned. If an attempt is made to register a handler
|
then EFI_SUCCESS is returned. If an attempt is made to register a handler
|
||||||
when a handler is already registered, then EFI_ALREADY_STARTED is returned.
|
when a handler is already registered, then EFI_ALREADY_STARTED is returned.
|
||||||
If an attempt is made to uninstall a handler when a handler is not installed,
|
If an attempt is made to uninstall a handler when a handler is not installed,
|
||||||
then return EFI_INVALID_PARAMETER.
|
then return EFI_INVALID_PARAMETER.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
@ -133,15 +133,15 @@ Arguments:
|
|||||||
NotifyFunction - The function to call when the watchdog timer fires. If this
|
NotifyFunction - The function to call when the watchdog timer fires. If this
|
||||||
is NULL, then the handler will be unregistered.
|
is NULL, then the handler will be unregistered.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The watchdog timer handler was registered or
|
EFI_SUCCESS - The watchdog timer handler was registered or
|
||||||
unregistered.
|
unregistered.
|
||||||
|
|
||||||
EFI_ALREADY_STARTED - NotifyFunction is not NULL, and a handler is already
|
EFI_ALREADY_STARTED - NotifyFunction is not NULL, and a handler is already
|
||||||
registered.
|
registered.
|
||||||
|
|
||||||
EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not
|
EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not
|
||||||
previously registered.
|
previously registered.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -169,24 +169,24 @@ WatchdogTimerDriverSetTimerPeriod (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function sets the amount of time to wait before firing the watchdog
|
This function sets the amount of time to wait before firing the watchdog
|
||||||
timer to TimerPeriod 100 nS units. If TimerPeriod is 0, then the watchdog
|
timer to TimerPeriod 100 nS units. If TimerPeriod is 0, then the watchdog
|
||||||
timer is disabled.
|
timer is disabled.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
||||||
|
|
||||||
TimerPeriod - The amount of time in 100 nS units to wait before the watchdog
|
TimerPeriod - The amount of time in 100 nS units to wait before the watchdog
|
||||||
timer is fired. If TimerPeriod is zero, then the watchdog
|
timer is fired. If TimerPeriod is zero, then the watchdog
|
||||||
timer is disabled.
|
timer is disabled.
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - The watchdog timer has been programmed to fire in Time
|
Returns:
|
||||||
|
|
||||||
|
EFI_SUCCESS - The watchdog timer has been programmed to fire in Time
|
||||||
100 nS units.
|
100 nS units.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR - A watchdog timer could not be programmed due to a device
|
EFI_DEVICE_ERROR - A watchdog timer could not be programmed due to a device
|
||||||
error.
|
error.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -210,21 +210,21 @@ WatchdogTimerDriverGetTimerPeriod (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function retrieves the amount of time the system will wait before firing
|
This function retrieves the amount of time the system will wait before firing
|
||||||
the watchdog timer. This period is returned in TimerPeriod, and EFI_SUCCESS
|
the watchdog timer. This period is returned in TimerPeriod, and EFI_SUCCESS
|
||||||
is returned. If TimerPeriod is NULL, then EFI_INVALID_PARAMETER is returned.
|
is returned. If TimerPeriod is NULL, then EFI_INVALID_PARAMETER is returned.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
|
||||||
|
|
||||||
TimerPeriod - A pointer to the amount of time in 100 nS units that the system
|
TimerPeriod - A pointer to the amount of time in 100 nS units that the system
|
||||||
will wait before the watchdog timer is fired. If TimerPeriod of
|
will wait before the watchdog timer is fired. If TimerPeriod of
|
||||||
zero is returned, then the watchdog timer is disabled.
|
zero is returned, then the watchdog timer is disabled.
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - The amount of time that the system will wait before
|
Returns:
|
||||||
|
|
||||||
|
EFI_SUCCESS - The amount of time that the system will wait before
|
||||||
firing the watchdog timer was returned in TimerPeriod.
|
firing the watchdog timer was returned in TimerPeriod.
|
||||||
|
|
||||||
EFI_INVALID_PARAMETER - TimerPeriod is NULL.
|
EFI_INVALID_PARAMETER - TimerPeriod is NULL.
|
||||||
@ -263,7 +263,7 @@ Returns:
|
|||||||
EFI_SUCCESS - Timer Architectural Protocol created
|
EFI_SUCCESS - Timer Architectural Protocol created
|
||||||
|
|
||||||
EFI_OUT_OF_RESOURCES - Not enough resources available to initialize driver.
|
EFI_OUT_OF_RESOURCES - Not enough resources available to initialize driver.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR - A device error occured attempting to initialize the driver.
|
EFI_DEVICE_ERROR - A device error occured attempting to initialize the driver.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -283,8 +283,8 @@ Returns:
|
|||||||
// Create the timer event used to implement a simple watchdog timer
|
// Create the timer event used to implement a simple watchdog timer
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
WatchdogTimerDriverExpires,
|
WatchdogTimerDriverExpires,
|
||||||
NULL,
|
NULL,
|
||||||
&mWatchdogTimerEvent
|
&mWatchdogTimerEvent
|
||||||
|
@ -321,8 +321,8 @@ Returns:
|
|||||||
// Install notify function to fetch memory data through WinNtIo protocol and store to data hub.
|
// Install notify function to fetch memory data through WinNtIo protocol and store to data hub.
|
||||||
//
|
//
|
||||||
EfiStatus = gBS->CreateEvent (
|
EfiStatus = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
WinNtIoProtocolNotifyFunction,
|
WinNtIoProtocolNotifyFunction,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&Event
|
&Event
|
||||||
|
@ -433,7 +433,7 @@ Returns:
|
|||||||
Private = AllocatePool (sizeof (WIN_NT_BLOCK_IO_PRIVATE));
|
Private = AllocatePool (sizeof (WIN_NT_BLOCK_IO_PRIVATE));
|
||||||
ASSERT (Private != NULL);
|
ASSERT (Private != NULL);
|
||||||
|
|
||||||
EfiInitializeLock (&Private->Lock, EFI_TPL_NOTIFY);
|
EfiInitializeLock (&Private->Lock, TPL_NOTIFY);
|
||||||
|
|
||||||
Private->WinNtThunk = WinNtIo->WinNtThunk;
|
Private->WinNtThunk = WinNtIo->WinNtThunk;
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ WinNtBlockIoReadBlocks (
|
|||||||
DWORD BytesRead;
|
DWORD BytesRead;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = WIN_NT_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -917,7 +917,7 @@ WinNtBlockIoWriteBlocks (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = WIN_NT_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -996,7 +996,7 @@ WinNtBlockIoResetBlock (
|
|||||||
WIN_NT_BLOCK_IO_PRIVATE *Private;
|
WIN_NT_BLOCK_IO_PRIVATE *Private;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = WIN_NT_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
|
@ -345,8 +345,8 @@ Returns:
|
|||||||
Private->SimpleTextIn.ReadKeyStroke = WinNtSimpleTextInReadKeyStroke;
|
Private->SimpleTextIn.ReadKeyStroke = WinNtSimpleTextInReadKeyStroke;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
WinNtSimpleTextInWaitForKey,
|
WinNtSimpleTextInWaitForKey,
|
||||||
Private,
|
Private,
|
||||||
&Private->SimpleTextIn.WaitForKey
|
&Private->SimpleTextIn.WaitForKey
|
||||||
|
@ -323,7 +323,7 @@ WinNtGopInitializeSimpleTextInForWindow (
|
|||||||
Private->SimpleTextIn.ReadKeyStroke = WinNtGopSimpleTextInReadKeyStroke;
|
Private->SimpleTextIn.ReadKeyStroke = WinNtGopSimpleTextInReadKeyStroke;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
WinNtGopSimpleTextInWaitForKey,
|
WinNtGopSimpleTextInWaitForKey,
|
||||||
Private,
|
Private,
|
||||||
|
@ -835,7 +835,7 @@ WinNtGopStartWindow (
|
|||||||
// Register to be notified on exit boot services so we can destroy the window.
|
// Register to be notified on exit boot services so we can destroy the window.
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
KillNtGopThread,
|
KillNtGopThread,
|
||||||
Private,
|
Private,
|
||||||
|
@ -637,7 +637,7 @@ Returns:
|
|||||||
WIN_NT_SERIAL_IO_PRIVATE_DATA *Private;
|
WIN_NT_SERIAL_IO_PRIVATE_DATA *Private;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ Returns:
|
|||||||
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -906,7 +906,7 @@ Returns:
|
|||||||
DCB Dcb;
|
DCB Dcb;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -996,7 +996,7 @@ Returns:
|
|||||||
DCB Dcb;
|
DCB Dcb;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1114,7 +1114,7 @@ Returns:
|
|||||||
UINT32 Control;
|
UINT32 Control;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1216,7 +1216,7 @@ Returns:
|
|||||||
UINT32 Control;
|
UINT32 Control;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (This);
|
Private = WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1081,7 +1081,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1143,7 +1143,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1277,7 +1277,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1486,7 +1486,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1560,7 +1560,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1648,7 +1648,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
PositionHigh = 0;
|
PositionHigh = 0;
|
||||||
@ -1913,7 +1913,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
PrivateRoot = WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (PrivateFile->SimpleFileSystem);
|
PrivateRoot = WIN_NT_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (PrivateFile->SimpleFileSystem);
|
||||||
@ -2115,7 +2115,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialise locals.
|
// Initialise locals.
|
||||||
@ -2643,7 +2643,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = WIN_NT_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ Module Name:
|
|||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
This file produces the Simple Text In for an Uga window.
|
This file produces the Simple Text In for an Uga window.
|
||||||
|
|
||||||
This stuff is linked at the hip to the Window, since the 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
|
processing is done in a thread kicked off in WinNtUgaImplementation.c
|
||||||
|
|
||||||
Since the window information is processed in an other thread we need
|
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
|
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
|
takes data off the Queue. The WinProc message loop takes keyboard input
|
||||||
and places it in the Queue.
|
and places it in the Queue.
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Enter critical section
|
// Enter critical section
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// A reset is draining the Queue
|
// A reset is draining the Queue
|
||||||
@ -270,7 +270,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Enter critical section
|
// Enter critical section
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Status = UgaPrivateCheckQ (Private);
|
Status = UgaPrivateCheckQ (Private);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
@ -321,7 +321,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Enter critical section
|
// Enter critical section
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Status = UgaPrivateCheckQ (Private);
|
Status = UgaPrivateCheckQ (Private);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
@ -376,8 +376,8 @@ Returns:
|
|||||||
Private->SimpleTextIn.ReadKeyStroke = WinNtUgaSimpleTextInReadKeyStroke;
|
Private->SimpleTextIn.ReadKeyStroke = WinNtUgaSimpleTextInReadKeyStroke;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
WinNtUgaSimpleTextInWaitForKey,
|
WinNtUgaSimpleTextInWaitForKey,
|
||||||
Private,
|
Private,
|
||||||
&Private->SimpleTextIn.WaitForKey
|
&Private->SimpleTextIn.WaitForKey
|
||||||
|
@ -362,7 +362,7 @@ WinNtUgaBlt (
|
|||||||
// We would not want a timer based event (Cursor, ...) to come in while we are
|
// We would not want a timer based event (Cursor, ...) to come in while we are
|
||||||
// doing this operation.
|
// doing this operation.
|
||||||
//
|
//
|
||||||
OriginalTPL = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
for (SrcY = SourceY, DstY = DestinationY; DstY < (Height + DestinationY); SrcY++, DstY++) {
|
for (SrcY = SourceY, DstY = DestinationY; DstY < (Height + DestinationY); SrcY++, DstY++) {
|
||||||
Blt = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + (DstY * Delta) + DestinationX * sizeof (EFI_UGA_PIXEL));
|
Blt = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + (DstY * Delta) + DestinationX * sizeof (EFI_UGA_PIXEL));
|
||||||
@ -386,7 +386,7 @@ WinNtUgaBlt (
|
|||||||
// We would not want a timer based event (Cursor, ...) to come in while we are
|
// We would not want a timer based event (Cursor, ...) to come in while we are
|
||||||
// doing this operation.
|
// doing this operation.
|
||||||
//
|
//
|
||||||
OriginalTPL = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
if (BltOperation == EfiUgaVideoFill) {
|
if (BltOperation == EfiUgaVideoFill) {
|
||||||
FillPixel = BltBuffer;
|
FillPixel = BltBuffer;
|
||||||
@ -851,8 +851,8 @@ Returns:
|
|||||||
// Register to be notified on exit boot services so we can destroy the window.
|
// Register to be notified on exit boot services so we can destroy the window.
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
KillNtUgaThread,
|
KillNtUgaThread,
|
||||||
Private,
|
Private,
|
||||||
&mUgaScreenExitBootServicesEvent
|
&mUgaScreenExitBootServicesEvent
|
||||||
|
@ -167,7 +167,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
if (Delta < 1000) {
|
if (Delta < 1000) {
|
||||||
|
|
||||||
OriginalTPL = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Inform the firmware of an "timer interrupt". The time
|
// Inform the firmware of an "timer interrupt". The time
|
||||||
|
@ -454,8 +454,8 @@ Returns:
|
|||||||
// Install notify function to store processor data to HII database and data hub.
|
// Install notify function to store processor data to HII database and data hub.
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
WinNtIoProtocolNotifyFunction,
|
WinNtIoProtocolNotifyFunction,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&Event
|
&Event
|
||||||
|
@ -1360,7 +1360,7 @@ Returns:
|
|||||||
|
|
||||||
CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);
|
CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);
|
||||||
FwVolHeader = &(FwhInstance->VolumeHeader);
|
FwVolHeader = &(FwhInstance->VolumeHeader);
|
||||||
EfiInitializeLock (&(FwhInstance->FvbDevLock), EFI_TPL_HIGH_LEVEL);
|
EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
NumOfBlocks = 0;
|
NumOfBlocks = 0;
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
MiscSubclassDriverEntryPoint.c
|
MiscSubclassDriverEntryPoint.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
This driver parses the mMiscSubclassDataTable structure and reports
|
This driver parses the mMiscSubclassDataTable structure and reports
|
||||||
any generated data to the DataHub.
|
any generated data to the DataHub.
|
||||||
@ -321,8 +321,8 @@ Returns:
|
|||||||
// Install notify function to fetch memory data through UnixIo protocol and store to data hub.
|
// Install notify function to fetch memory data through UnixIo protocol and store to data hub.
|
||||||
//
|
//
|
||||||
EfiStatus = gBS->CreateEvent (
|
EfiStatus = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
UnixIoProtocolNotifyFunction,
|
UnixIoProtocolNotifyFunction,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&Event
|
&Event
|
||||||
@ -351,8 +351,8 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
String - Unicode string.
|
String - Unicode string.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
UINTN of the number represented by String.
|
UINTN of the number represented by String.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
|
@ -679,7 +679,7 @@ Returns:
|
|||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
EfiInitializeLock (&Private->Lock, EFI_TPL_NOTIFY);
|
EfiInitializeLock (&Private->Lock, TPL_NOTIFY);
|
||||||
|
|
||||||
Private->UnixThunk = UnixIo->UnixThunk;
|
Private->UnixThunk = UnixIo->UnixThunk;
|
||||||
|
|
||||||
@ -1066,7 +1066,7 @@ UnixBlockIoReadBlocks (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = UNIX_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1133,7 +1133,7 @@ UnixBlockIoWriteBlocks (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = UNIX_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1211,7 +1211,7 @@ UnixBlockIoResetBlock (
|
|||||||
UNIX_BLOCK_IO_PRIVATE *Private;
|
UNIX_BLOCK_IO_PRIVATE *Private;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = UNIX_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2004, Intel Corporation
|
Copyright (c) 2004, 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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -15,15 +15,15 @@ Module Name:
|
|||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Console based on Posix APIs.
|
Console based on Posix APIs.
|
||||||
|
|
||||||
This file attaches a SimpleTextIn protocol to a previously open window.
|
This file attaches a SimpleTextIn protocol to a previously open window.
|
||||||
|
|
||||||
The constructor for this protocol depends on an open window. Currently
|
The constructor for this protocol depends on an open window. Currently
|
||||||
the SimpleTextOut protocol creates a window when it's constructor is called.
|
the SimpleTextOut protocol creates a window when it's constructor is called.
|
||||||
Thus this code must run after the constructor for the SimpleTextOut
|
Thus this code must run after the constructor for the SimpleTextOut
|
||||||
protocol
|
protocol
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
#include "Console.h"
|
#include "Console.h"
|
||||||
@ -234,8 +234,8 @@ Returns:
|
|||||||
Private->SimpleTextIn.ReadKeyStroke = UnixSimpleTextInReadKeyStroke;
|
Private->SimpleTextIn.ReadKeyStroke = UnixSimpleTextInReadKeyStroke;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
UnixSimpleTextInWaitForKey,
|
UnixSimpleTextInWaitForKey,
|
||||||
Private,
|
Private,
|
||||||
&Private->SimpleTextIn.WaitForKey
|
&Private->SimpleTextIn.WaitForKey
|
||||||
|
@ -770,7 +770,7 @@ Returns:
|
|||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
UINTN UnixStatus;
|
UINTN UnixStatus;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -844,7 +844,7 @@ Returns:
|
|||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1037,7 +1037,7 @@ Returns:
|
|||||||
struct termios Options;
|
struct termios Options;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1119,7 +1119,7 @@ Returns:
|
|||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
UINTN Bytes;
|
UINTN Bytes;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
Result = Private->UnixThunk->IoCtl (Private->UnixHandle, TIOCMGET, &Status);
|
Result = Private->UnixThunk->IoCtl (Private->UnixHandle, TIOCMGET, &Status);
|
||||||
@ -1218,7 +1218,7 @@ Returns:
|
|||||||
UINT32 Control;
|
UINT32 Control;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1309,7 +1309,7 @@ Returns:
|
|||||||
UINT32 Control;
|
UINT32 Control;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
|
@ -500,7 +500,7 @@ Returns:
|
|||||||
if (This == NULL || Root == NULL) {
|
if (This == NULL || Root == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Private = UNIX_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (This);
|
Private = UNIX_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -989,7 +989,7 @@ Returns:
|
|||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
if (PrivateFile->fd >= 0) {
|
if (PrivateFile->fd >= 0) {
|
||||||
PrivateFile->UnixThunk->Close (PrivateFile->fd);
|
PrivateFile->UnixThunk->Close (PrivateFile->fd);
|
||||||
@ -1044,7 +1044,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1268,7 +1268,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1401,7 +1401,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1473,7 +1473,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1539,7 +1539,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
@ -1609,7 +1609,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
PrivateRoot = UNIX_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (PrivateFile->SimpleFileSystem);
|
PrivateRoot = UNIX_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (PrivateFile->SimpleFileSystem);
|
||||||
@ -1741,7 +1741,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialise locals.
|
// Initialise locals.
|
||||||
@ -2152,7 +2152,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
PrivateFile = UNIX_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ Module Name:
|
|||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
This file produces the Simple Text In for an Uga window.
|
This file produces the Simple Text In for an Uga window.
|
||||||
|
|
||||||
This stuff is linked at the hip to the Window, since the window
|
This stuff is linked at the hip to the Window, since the window
|
||||||
processing is done in a thread kicked off in UnixUgaImplementation.c
|
processing is done in a thread kicked off in UnixUgaImplementation.c
|
||||||
|
|
||||||
Since the window information is processed in an other thread we need
|
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
|
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
|
takes data off the Queue. The WinProc message loop takes keyboard input
|
||||||
and places it in the Queue.
|
and places it in the Queue.
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Enter critical section
|
// Enter critical section
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// A reset is draining the Queue
|
// A reset is draining the Queue
|
||||||
@ -119,7 +119,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Enter critical section
|
// Enter critical section
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Status = Private->UgaIo->UgaGetKey(Private->UgaIo, Key);
|
Status = Private->UgaIo->UgaGetKey(Private->UgaIo, Key);
|
||||||
//
|
//
|
||||||
@ -166,7 +166,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Enter critical section
|
// Enter critical section
|
||||||
//
|
//
|
||||||
OldTpl = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Status = Private->UgaIo->UgaCheckKey(Private->UgaIo);
|
Status = Private->UgaIo->UgaCheckKey(Private->UgaIo);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
@ -210,8 +210,8 @@ Returns:
|
|||||||
Private->SimpleTextIn.ReadKeyStroke = UnixUgaSimpleTextInReadKeyStroke;
|
Private->SimpleTextIn.ReadKeyStroke = UnixUgaSimpleTextInReadKeyStroke;
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_WAIT,
|
EVT_NOTIFY_WAIT,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
UnixUgaSimpleTextInWaitForKey,
|
UnixUgaSimpleTextInWaitForKey,
|
||||||
Private,
|
Private,
|
||||||
&Private->SimpleTextIn.WaitForKey
|
&Private->SimpleTextIn.WaitForKey
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
UnixUgaScreen.c
|
UnixUgaScreen.c
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
This file produces the graphics abstration of UGA. It is called by
|
This file produces the graphics abstration of UGA. It is called by
|
||||||
UnixUgaDriver.c file which deals with the EFI 1.1 driver model.
|
UnixUgaDriver.c file which deals with the EFI 1.1 driver model.
|
||||||
This file just does graphics.
|
This file just does graphics.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -71,7 +71,7 @@ UnixUgaGetMode (
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Mode information returned.
|
EFI_SUCCESS - Mode information returned.
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
||||||
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -122,7 +122,7 @@ UnixUgaSetMode (
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - Mode information returned.
|
EFI_SUCCESS - Mode information returned.
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
||||||
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -196,19 +196,19 @@ UnixUgaBlt (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
Blt pixels from the rectangle (Width X Height) formed by the BltBuffer
|
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
|
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
|
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
|
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
|
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.
|
bigger than the current video screen the image will be clipped.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
X - X location on graphics screen.
|
X - X location on graphics screen.
|
||||||
Y - Y location on the graphics screen.
|
Y - Y location on the graphics screen.
|
||||||
Width - Width of BltBuffer.
|
Width - Width of BltBuffer.
|
||||||
Height - Hight of BltBuffer
|
Height - Hight of BltBuffer
|
||||||
BltOperation - Operation to perform on BltBuffer and video memory
|
BltOperation - Operation to perform on BltBuffer and video memory
|
||||||
BltBuffer - Buffer containing data to blt into video buffer. This
|
BltBuffer - Buffer containing data to blt into video buffer. This
|
||||||
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
||||||
SourceX - If the BltOperation is a EfiCopyBlt this is the source
|
SourceX - If the BltOperation is a EfiCopyBlt this is the source
|
||||||
of the copy. For other BLT operations this argument is not
|
of the copy. For other BLT operations this argument is not
|
||||||
@ -216,11 +216,11 @@ UnixUgaBlt (
|
|||||||
SourceX - If the BltOperation is a EfiCopyBlt this is the source
|
SourceX - If the BltOperation is a EfiCopyBlt this is the source
|
||||||
of the copy. For other BLT operations this argument is not
|
of the copy. For other BLT operations this argument is not
|
||||||
used.
|
used.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
EFI_SUCCESS - The palette is updated with PaletteArray.
|
EFI_SUCCESS - The palette is updated with PaletteArray.
|
||||||
EFI_INVALID_PARAMETER - BltOperation is not valid.
|
EFI_INVALID_PARAMETER - BltOperation is not valid.
|
||||||
EFI_DEVICE_ERROR - A hardware error occured writting to the video
|
EFI_DEVICE_ERROR - A hardware error occured writting to the video
|
||||||
buffer.
|
buffer.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -256,7 +256,7 @@ UnixUgaBlt (
|
|||||||
// We would not want a timer based event (Cursor, ...) to come in while we are
|
// We would not want a timer based event (Cursor, ...) to come in while we are
|
||||||
// doing this operation.
|
// doing this operation.
|
||||||
//
|
//
|
||||||
OriginalTPL = gBS->RaiseTPL (EFI_TPL_NOTIFY);
|
OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
Status = Private->UgaIo->UgaBlt (Private->UgaIo,
|
Status = Private->UgaIo->UgaBlt (Private->UgaIo,
|
||||||
BltBuffer,
|
BltBuffer,
|
||||||
@ -348,8 +348,8 @@ Returns:
|
|||||||
// Register to be notified on exit boot services so we can destroy the window.
|
// Register to be notified on exit boot services so we can destroy the window.
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
KillNtUgaThread,
|
KillNtUgaThread,
|
||||||
Private,
|
Private,
|
||||||
&mUgaScreenExitBootServicesEvent
|
&mUgaScreenExitBootServicesEvent
|
||||||
@ -426,8 +426,8 @@ KillNtUgaThread (
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This is the UGA screen's callback notification function for exit-boot-services.
|
This is the UGA screen's callback notification function for exit-boot-services.
|
||||||
All we do here is call UnixUgaDestructor().
|
All we do here is call UnixUgaDestructor().
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -77,9 +77,9 @@ Returns:
|
|||||||
EFI_TIMER_NOTIFY CallbackFunction;
|
EFI_TIMER_NOTIFY CallbackFunction;
|
||||||
|
|
||||||
|
|
||||||
OriginalTPL = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
if (OriginalTPL < EFI_TPL_HIGH_LEVEL) {
|
if (OriginalTPL < TPL_HIGH_LEVEL) {
|
||||||
CallbackFunction = mTimerNotifyFunction;
|
CallbackFunction = mTimerNotifyFunction;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ UnixEnableInterrupt (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine provides support for emulation of the interrupt enable of the
|
This routine provides support for emulation of the interrupt enable of the
|
||||||
the system. For our purposes, CPU enable is just a BOOLEAN that the Timer
|
the system. For our purposes, CPU enable is just a BOOLEAN that the Timer
|
||||||
Architectural Protocol observes in order to defer behaviour while in its
|
Architectural Protocol observes in order to defer behaviour while in its
|
||||||
emulated interrupt, or timer tick.
|
emulated interrupt, or timer tick.
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ UnixDisableInterrupt (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine provides support for emulation of the interrupt disable of the
|
This routine provides support for emulation of the interrupt disable of the
|
||||||
the system. For our purposes, CPU enable is just a BOOLEAN that the Timer
|
the system. For our purposes, CPU enable is just a BOOLEAN that the Timer
|
||||||
Architectural Protocol observes in order to defer behaviour while in its
|
Architectural Protocol observes in order to defer behaviour while in its
|
||||||
emulated interrupt, or timer tick.
|
emulated interrupt, or timer tick.
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ UnixGetInterruptState (
|
|||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine provides support for emulation of the interrupt disable of the
|
This routine provides support for emulation of the interrupt disable of the
|
||||||
the system. For our purposes, CPU enable is just a BOOLEAN that the Timer
|
the system. For our purposes, CPU enable is just a BOOLEAN that the Timer
|
||||||
Architectural Protocol observes in order to defer behaviour while in its
|
Architectural Protocol observes in order to defer behaviour while in its
|
||||||
emulated interrupt, or timer tick.
|
emulated interrupt, or timer tick.
|
||||||
|
|
||||||
@ -223,8 +223,8 @@ UnixInit (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine would support generation of a CPU INIT. At
|
This routine would support generation of a CPU INIT. At
|
||||||
present, this code does not provide emulation.
|
present, this code does not provide emulation.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -258,8 +258,8 @@ UnixRegisterInterruptHandler (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine would support registration of an interrupt handler. At
|
This routine would support registration of an interrupt handler. At
|
||||||
present, this code does not provide emulation.
|
present, this code does not provide emulation.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -305,8 +305,8 @@ UnixGetTimerValue (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine would support querying of an on-CPU timer. At present,
|
This routine would support querying of an on-CPU timer. At present,
|
||||||
this code does not provide timer emulation.
|
this code does not provide timer emulation.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -325,7 +325,7 @@ Returns:
|
|||||||
if (TimerValue == NULL) {
|
if (TimerValue == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// No timer supported
|
// No timer supported
|
||||||
//
|
//
|
||||||
@ -345,8 +345,8 @@ UnixSetMemoryAttributes (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine would support querying of an on-CPU timer. At present,
|
This routine would support querying of an on-CPU timer. At present,
|
||||||
this code does not provide timer emulation.
|
this code does not provide timer emulation.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ Returns:
|
|||||||
|
|
||||||
Status
|
Status
|
||||||
|
|
||||||
EFI_SUCCESS - protocol instance can be published
|
EFI_SUCCESS - protocol instance can be published
|
||||||
EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure
|
EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure
|
||||||
EFI_DEVICE_ERROR - cannot create the thread
|
EFI_DEVICE_ERROR - cannot create the thread
|
||||||
|
|
||||||
@ -458,8 +458,8 @@ Returns:
|
|||||||
// Install notify function to store processor data to HII database and data hub.
|
// Install notify function to store processor data to HII database and data hub.
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
UnixIoProtocolNotifyFunction,
|
UnixIoProtocolNotifyFunction,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&Event
|
&Event
|
||||||
@ -479,7 +479,7 @@ Returns:
|
|||||||
DEBUG ((EFI_D_ERROR, "CPU Architectural Protocol Loaded\n"));
|
DEBUG ((EFI_D_ERROR, "CPU Architectural Protocol Loaded\n"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,8 +495,8 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
String - Unicode string.
|
String - Unicode string.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
UINTN of the number represented by String.
|
UINTN of the number represented by String.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
|
@ -1368,7 +1368,7 @@ Returns:
|
|||||||
|
|
||||||
CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);
|
CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);
|
||||||
FwVolHeader = &(FwhInstance->VolumeHeader);
|
FwVolHeader = &(FwhInstance->VolumeHeader);
|
||||||
EfiInitializeLock (&(FwhInstance->FvbDevLock), EFI_TPL_HIGH_LEVEL);
|
EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
NumOfBlocks = 0;
|
NumOfBlocks = 0;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ EfiCreateProtocolNotifyEvent(
|
|||||||
//
|
//
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
@ -175,7 +175,7 @@ EfiNamedEventListen (
|
|||||||
// Create event
|
// Create event
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
(VOID *) NotifyContext,
|
(VOID *) NotifyContext,
|
||||||
@ -267,7 +267,7 @@ EfiGetCurrentTpl (
|
|||||||
{
|
{
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
gBS->RestoreTPL (Tpl);
|
gBS->RestoreTPL (Tpl);
|
||||||
|
|
||||||
return Tpl;
|
return Tpl;
|
||||||
@ -294,10 +294,10 @@ EfiInitializeLock (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (Lock != NULL);
|
ASSERT (Lock != NULL);
|
||||||
ASSERT (Priority <= EFI_TPL_HIGH_LEVEL);
|
ASSERT (Priority <= TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
Lock->Tpl = Priority;
|
Lock->Tpl = Priority;
|
||||||
Lock->OwnerTpl = EFI_TPL_APPLICATION;
|
Lock->OwnerTpl = TPL_APPLICATION;
|
||||||
Lock->Lock = EfiLockReleased ;
|
Lock->Lock = EfiLockReleased ;
|
||||||
return Lock;
|
return Lock;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ EfiCreateEventLegacyBoot (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return EfiCreateEventLegacyBootEx (
|
return EfiCreateEventLegacyBootEx (
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
InternalEmptyFuntion,
|
InternalEmptyFuntion,
|
||||||
NULL,
|
NULL,
|
||||||
LegacyBootEvent
|
LegacyBootEvent
|
||||||
@ -104,7 +104,7 @@ EfiCreateEventLegacyBootEx (
|
|||||||
// prior to UEFI 2.0 use Tiano extension to EFI
|
// prior to UEFI 2.0 use Tiano extension to EFI
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_LEGACY_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL,
|
EFI_EVENT_SIGNAL_LEGACY_BOOT | EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
@ -115,7 +115,7 @@ EfiCreateEventLegacyBootEx (
|
|||||||
// For UEFI 2.0 and the future use an Event Group
|
// For UEFI 2.0 and the future use an Event Group
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEventEx (
|
||||||
EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
@ -150,7 +150,7 @@ EfiCreateEventReadyToBoot (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return EfiCreateEventReadyToBootEx (
|
return EfiCreateEventReadyToBootEx (
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
InternalEmptyFuntion,
|
InternalEmptyFuntion,
|
||||||
NULL,
|
NULL,
|
||||||
ReadyToBootEvent
|
ReadyToBootEvent
|
||||||
@ -205,7 +205,7 @@ EfiCreateEventReadyToBootEx (
|
|||||||
// For UEFI 2.0 and the future use an Event Group
|
// For UEFI 2.0 and the future use an Event Group
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEventEx (
|
||||||
EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
|
@ -180,7 +180,7 @@ EfiInitializeLock (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
#define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \
|
#define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \
|
||||||
{Priority, EFI_TPL_APPLICATION, EfiLockReleased }
|
{Priority, TPL_APPLICATION, EfiLockReleased }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -341,15 +341,22 @@ EFI_STATUS
|
|||||||
//
|
//
|
||||||
// EFI Event Types (name defined in spec)
|
// EFI Event Types (name defined in spec)
|
||||||
//
|
//
|
||||||
#define EVENT_TIMER 0x80000000
|
#define EVT_TIMER 0x80000000
|
||||||
#define EVENT_RUNTIME 0x40000000
|
#define EVT_RUNTIME 0x40000000
|
||||||
|
|
||||||
|
#define EVT_NOTIFY_WAIT 0x00000100
|
||||||
|
#define EVT_NOTIFY_SIGNAL 0x00000200
|
||||||
|
#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
|
||||||
|
#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
|
||||||
|
|
||||||
|
#define EVENT_TIMER EVT_TIMER
|
||||||
|
#define EVENT_RUNTIME EVT_RUNTIME
|
||||||
#define EVENT_RUNTIME_CONTEXT 0x20000000
|
#define EVENT_RUNTIME_CONTEXT 0x20000000
|
||||||
|
|
||||||
#define EVENT_NOTIFY_WAIT 0x00000100
|
#define EVENT_NOTIFY_WAIT EVT_NOTIFY_WAIT
|
||||||
#define EVENT_NOTIFY_SIGNAL 0x00000200
|
#define EVENT_NOTIFY_SIGNAL EVT_NOTIFY_SIGNAL
|
||||||
|
#define EVENT_SIGNAL_EXIT_BOOT_SERVICES EVT_SIGNAL_EXIT_BOOT_SERVICES
|
||||||
#define EVENT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
|
#define EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
|
||||||
#define EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prior to UEFI 2.0 Tiano extended these enums. This was replaced by
|
// Prior to UEFI 2.0 Tiano extended these enums. This was replaced by
|
||||||
|
@ -64,7 +64,7 @@ _DriverUnloadHandler (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Notification Entry of ExitBootService event. In the entry, all notifications in _gDriverExitBootServicesEvent[]
|
Notification Entry of ExitBootService event. In the entry, all notifications in _gDriverExitBootServicesEvent[]
|
||||||
would be invoked.
|
would be invoked.
|
||||||
|
|
||||||
@param Event The Event that is being processed.
|
@param Event The Event that is being processed.
|
||||||
@ -127,8 +127,8 @@ _ModuleEntryPoint (
|
|||||||
//
|
//
|
||||||
if (_gDriverExitBootServicesEvent[0] != NULL) {
|
if (_gDriverExitBootServicesEvent[0] != NULL) {
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
EFI_TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
_DriverExitBootServices,
|
_DriverExitBootServices,
|
||||||
NULL,
|
NULL,
|
||||||
&_mDriverExitBootServicesNotifyEvent
|
&_mDriverExitBootServicesNotifyEvent
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
Mde UEFI library functions.
|
Mde UEFI library functions.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, 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
|
||||||
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.
|
||||||
|
|
||||||
Module Name: UefiLib.c
|
Module Name: UefiLib.c
|
||||||
|
|
||||||
@ -41,9 +41,9 @@ CompareIso639LanguageCode (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function searches the list of configuration tables stored in the EFI System
|
This function searches the list of configuration tables stored in the EFI System
|
||||||
Table for a table with a GUID that matches TableGuid. If a match is found,
|
Table for a table with a GUID that matches TableGuid. If a match is found,
|
||||||
then a pointer to the configuration table is returned in Table, and EFI_SUCCESS
|
then a pointer to the configuration table is returned in Table, and EFI_SUCCESS
|
||||||
is returned. If a matching GUID is not found, then EFI_NOT_FOUND is returned.
|
is returned. If a matching GUID is not found, then EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param TableGuid Pointer to table's GUID type..
|
@param TableGuid Pointer to table's GUID type..
|
||||||
@ -55,7 +55,7 @@ CompareIso639LanguageCode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EfiGetSystemConfigurationTable (
|
EfiGetSystemConfigurationTable (
|
||||||
IN EFI_GUID *TableGuid,
|
IN EFI_GUID *TableGuid,
|
||||||
OUT VOID **Table
|
OUT VOID **Table
|
||||||
)
|
)
|
||||||
@ -79,9 +79,9 @@ EfiGetSystemConfigurationTable (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function causes the notification function to be executed for every protocol
|
This function causes the notification function to be executed for every protocol
|
||||||
of type ProtocolGuid instance that exists in the system when this function is
|
of type ProtocolGuid instance that exists in the system when this function is
|
||||||
invoked. In addition, every time a protocol of type ProtocolGuid instance is
|
invoked. In addition, every time a protocol of type ProtocolGuid instance is
|
||||||
installed or reinstalled, the notification function is also executed.
|
installed or reinstalled, the notification function is also executed.
|
||||||
|
|
||||||
@param ProtocolGuid Supplies GUID of the protocol upon whose installation the event is fired.
|
@param ProtocolGuid Supplies GUID of the protocol upon whose installation the event is fired.
|
||||||
@ -90,7 +90,7 @@ EfiGetSystemConfigurationTable (
|
|||||||
@param NotifyContext The context parameter to pass to NotifyFunction.
|
@param NotifyContext The context parameter to pass to NotifyFunction.
|
||||||
@param Registration A pointer to a memory location to receive the registration value.
|
@param Registration A pointer to a memory location to receive the registration value.
|
||||||
|
|
||||||
@return The notification event that was created.
|
@return The notification event that was created.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_EVENT
|
EFI_EVENT
|
||||||
@ -111,7 +111,7 @@ EfiCreateProtocolNotifyEvent(
|
|||||||
//
|
//
|
||||||
|
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
@ -142,13 +142,13 @@ EfiCreateProtocolNotifyEvent(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function creates an event using NotifyTpl, NoifyFunction, and NotifyContext.
|
This function creates an event using NotifyTpl, NoifyFunction, and NotifyContext.
|
||||||
This event is signaled with EfiNamedEventSignal(). This provide the ability for
|
This event is signaled with EfiNamedEventSignal(). This provide the ability for
|
||||||
one or more listeners on the same event named by the GUID specified by Name.
|
one or more listeners on the same event named by the GUID specified by Name.
|
||||||
|
|
||||||
@param Name Supplies GUID name of the event.
|
@param Name Supplies GUID name of the event.
|
||||||
@param NotifyTpl Supplies the task priority level of the event notifications.
|
@param NotifyTpl Supplies the task priority level of the event notifications.
|
||||||
@param NotifyFunction Supplies the function to notify when the event is signaled.
|
@param NotifyFunction Supplies the function to notify when the event is signaled.
|
||||||
@param NotifyContext The context parameter to pass to NotifyFunction.
|
@param NotifyContext The context parameter to pass to NotifyFunction.
|
||||||
@param Registration A pointer to a memory location to receive the registration value.
|
@param Registration A pointer to a memory location to receive the registration value.
|
||||||
|
|
||||||
@retval EFI_SUCCESS A named event was created.
|
@retval EFI_SUCCESS A named event was created.
|
||||||
@ -173,7 +173,7 @@ EfiNamedEventListen (
|
|||||||
// Create event
|
// Create event
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EFI_EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
(VOID *) NotifyContext,
|
(VOID *) NotifyContext,
|
||||||
@ -206,7 +206,7 @@ EfiNamedEventListen (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function signals the named event specified by Name. The named event must
|
This function signals the named event specified by Name. The named event must
|
||||||
have been created with EfiNamedEventListen().
|
have been created with EfiNamedEventListen().
|
||||||
|
|
||||||
@param Name Supplies GUID name of the event.
|
@param Name Supplies GUID name of the event.
|
||||||
@ -243,13 +243,13 @@ EfiNamedEventSignal (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current TPL.
|
Returns the current TPL.
|
||||||
|
|
||||||
This function returns the current TPL. There is no EFI service to directly
|
This function returns the current TPL. There is no EFI service to directly
|
||||||
retrieve the current TPL. Instead, the RaiseTPL() function is used to raise
|
retrieve the current TPL. Instead, the RaiseTPL() function is used to raise
|
||||||
the TPL to TPL_HIGH_LEVEL. This will return the current TPL. The TPL level
|
the TPL to TPL_HIGH_LEVEL. This will return the current TPL. The TPL level
|
||||||
can then immediately be restored back to the current TPL level with a call
|
can then immediately be restored back to the current TPL level with a call
|
||||||
to RestoreTPL().
|
to RestoreTPL().
|
||||||
|
|
||||||
@param VOID
|
@param VOID
|
||||||
@ -265,7 +265,7 @@ EfiGetCurrentTpl (
|
|||||||
{
|
{
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
|
|
||||||
Tpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
gBS->RestoreTPL (Tpl);
|
gBS->RestoreTPL (Tpl);
|
||||||
|
|
||||||
return Tpl;
|
return Tpl;
|
||||||
@ -273,8 +273,8 @@ EfiGetCurrentTpl (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function initializes a basic mutual exclusion lock to the released state
|
This function initializes a basic mutual exclusion lock to the released state
|
||||||
and returns the lock. Each lock provides mutual exclusion access at its task
|
and returns the lock. Each lock provides mutual exclusion access at its task
|
||||||
priority level. Since there is no preemption or multiprocessor support in EFI,
|
priority level. Since there is no preemption or multiprocessor support in EFI,
|
||||||
acquiring the lock only consists of raising to the locks TPL.
|
acquiring the lock only consists of raising to the locks TPL.
|
||||||
|
|
||||||
@ -292,17 +292,17 @@ EfiInitializeLock (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (Lock != NULL);
|
ASSERT (Lock != NULL);
|
||||||
ASSERT (Priority <= EFI_TPL_HIGH_LEVEL);
|
ASSERT (Priority <= TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
Lock->Tpl = Priority;
|
Lock->Tpl = Priority;
|
||||||
Lock->OwnerTpl = EFI_TPL_APPLICATION;
|
Lock->OwnerTpl = TPL_APPLICATION;
|
||||||
Lock->Lock = EfiLockReleased ;
|
Lock->Lock = EfiLockReleased ;
|
||||||
return Lock;
|
return Lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function raises the system's current task priority level to the task
|
This function raises the system's current task priority level to the task
|
||||||
priority level of the mutual exclusion lock. Then, it places the lock in the
|
priority level of the mutual exclusion lock. Then, it places the lock in the
|
||||||
acquired state.
|
acquired state.
|
||||||
|
|
||||||
@param Priority The task priority level of the lock.
|
@param Priority The task priority level of the lock.
|
||||||
@ -322,8 +322,8 @@ EfiAcquireLock (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function raises the system's current task priority level to the task
|
This function raises the system's current task priority level to the task
|
||||||
priority level of the mutual exclusion lock. Then, it attempts to place the
|
priority level of the mutual exclusion lock. Then, it attempts to place the
|
||||||
lock in the acquired state.
|
lock in the acquired state.
|
||||||
|
|
||||||
@param Lock A pointer to the lock to acquire.
|
@param Lock A pointer to the lock to acquire.
|
||||||
@ -357,8 +357,8 @@ EfiAcquireLockOrFail (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function transitions a mutual exclusion lock from the acquired state to
|
This function transitions a mutual exclusion lock from the acquired state to
|
||||||
the released state, and restores the system's task priority level to its
|
the released state, and restores the system's task priority level to its
|
||||||
previous level.
|
previous level.
|
||||||
|
|
||||||
@param Lock A pointer to the lock to release.
|
@param Lock A pointer to the lock to release.
|
||||||
@ -376,7 +376,7 @@ EfiReleaseLock (
|
|||||||
ASSERT (Lock->Lock == EfiLockAcquired);
|
ASSERT (Lock->Lock == EfiLockAcquired);
|
||||||
|
|
||||||
Tpl = Lock->OwnerTpl;
|
Tpl = Lock->OwnerTpl;
|
||||||
|
|
||||||
Lock->Lock = EfiLockReleased;
|
Lock->Lock = EfiLockReleased;
|
||||||
|
|
||||||
gBS->RestoreTPL (Tpl);
|
gBS->RestoreTPL (Tpl);
|
||||||
@ -389,7 +389,7 @@ EfiReleaseLock (
|
|||||||
currently managing the controller specified by ControllerHandle. This test
|
currently managing the controller specified by ControllerHandle. This test
|
||||||
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
||||||
present on ControllerHandle and is was opened by DriverBindingHandle with an
|
present on ControllerHandle and is was opened by DriverBindingHandle with an
|
||||||
attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||||
If ProtocolGuid is NULL, then ASSERT().
|
If ProtocolGuid is NULL, then ASSERT().
|
||||||
|
|
||||||
@param ControllerHandle A handle for a controller to test.
|
@param ControllerHandle A handle for a controller to test.
|
||||||
@ -452,10 +452,10 @@ EfiTestManagedDevice (
|
|||||||
ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
If ProtocolGuid is NULL, then ASSERT().
|
If ProtocolGuid is NULL, then ASSERT().
|
||||||
|
|
||||||
@param ControllerHandle A handle for a (parent) controller to test.
|
@param ControllerHandle A handle for a (parent) controller to test.
|
||||||
@param ChildHandle A child handle to test.
|
@param ChildHandle A child handle to test.
|
||||||
@param ConsumsedGuid Supplies the protocol that the child controller
|
@param ConsumsedGuid Supplies the protocol that the child controller
|
||||||
opens on its parent controller.
|
opens on its parent controller.
|
||||||
|
|
||||||
@retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
|
@retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
|
||||||
@retval EFI_UNSUPPORTED ChildHandle is not a child of the
|
@retval EFI_UNSUPPORTED ChildHandle is not a child of the
|
||||||
@ -502,37 +502,37 @@ EfiTestChildHandle (
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (OpenInfoBuffer);
|
FreePool (OpenInfoBuffer);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function looks up a Unicode string in UnicodeStringTable. If Language is
|
This function looks up a Unicode string in UnicodeStringTable. If Language is
|
||||||
a member of SupportedLanguages and a Unicode string is found in UnicodeStringTable
|
a member of SupportedLanguages and a Unicode string is found in UnicodeStringTable
|
||||||
that matches the language code specified by Language, then it is returned in
|
that matches the language code specified by Language, then it is returned in
|
||||||
UnicodeString.
|
UnicodeString.
|
||||||
|
|
||||||
@param Language A pointer to the ISO 639-2 language code for the
|
@param Language A pointer to the ISO 639-2 language code for the
|
||||||
Unicode string to look up and return.
|
Unicode string to look up and return.
|
||||||
@param SupportedLanguages A pointer to the set of ISO 639-2 language codes
|
@param SupportedLanguages A pointer to the set of ISO 639-2 language codes
|
||||||
that the Unicode string table supports. Language
|
that the Unicode string table supports. Language
|
||||||
must be a member of this set.
|
must be a member of this set.
|
||||||
@param UnicodeStringTable A pointer to the table of Unicode strings.
|
@param UnicodeStringTable A pointer to the table of Unicode strings.
|
||||||
@param UnicodeString A pointer to the Unicode string from UnicodeStringTable
|
@param UnicodeString A pointer to the Unicode string from UnicodeStringTable
|
||||||
that matches the language specified by Language.
|
that matches the language specified by Language.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Unicode string that matches the language
|
@retval EFI_SUCCESS The Unicode string that matches the language
|
||||||
specified by Language was found
|
specified by Language was found
|
||||||
in the table of Unicoide strings UnicodeStringTable,
|
in the table of Unicoide strings UnicodeStringTable,
|
||||||
and it was returned in UnicodeString.
|
and it was returned in UnicodeString.
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER UnicodeString is NULL.
|
@retval EFI_INVALID_PARAMETER UnicodeString is NULL.
|
||||||
@retval EFI_UNSUPPORTED SupportedLanguages is NULL.
|
@retval EFI_UNSUPPORTED SupportedLanguages is NULL.
|
||||||
@retval EFI_UNSUPPORTED UnicodeStringTable is NULL.
|
@retval EFI_UNSUPPORTED UnicodeStringTable is NULL.
|
||||||
@retval EFI_UNSUPPORTED The language specified by Language is not a
|
@retval EFI_UNSUPPORTED The language specified by Language is not a
|
||||||
member of SupportedLanguages.
|
member of SupportedLanguages.
|
||||||
@retval EFI_UNSUPPORTED The language specified by Language is not
|
@retval EFI_UNSUPPORTED The language specified by Language is not
|
||||||
supported by UnicodeStringTable.
|
supported by UnicodeStringTable.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -593,13 +593,13 @@ LookupUnicodeString (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function adds a Unicode string to UnicodeStringTable.
|
This function adds a Unicode string to UnicodeStringTable.
|
||||||
If Language is a member of SupportedLanguages then UnicodeString is added to
|
If Language is a member of SupportedLanguages then UnicodeString is added to
|
||||||
UnicodeStringTable. New buffers are allocated for both Language and
|
UnicodeStringTable. New buffers are allocated for both Language and
|
||||||
UnicodeString. The contents of Language and UnicodeString are copied into
|
UnicodeString. The contents of Language and UnicodeString are copied into
|
||||||
these new buffers. These buffers are automatically freed when
|
these new buffers. These buffers are automatically freed when
|
||||||
FreeUnicodeStringTable() is called.
|
FreeUnicodeStringTable() is called.
|
||||||
|
|
||||||
@param Language A pointer to the ISO 639-2 language code for the Unicode
|
@param Language A pointer to the ISO 639-2 language code for the Unicode
|
||||||
string to add.
|
string to add.
|
||||||
@param SupportedLanguages A pointer to the set of ISO 639-2 language codes
|
@param SupportedLanguages A pointer to the set of ISO 639-2 language codes
|
||||||
that the Unicode string table supports.
|
that the Unicode string table supports.
|
||||||
@ -607,19 +607,19 @@ LookupUnicodeString (
|
|||||||
@param UnicodeStringTable A pointer to the table of Unicode strings.
|
@param UnicodeStringTable A pointer to the table of Unicode strings.
|
||||||
@param UnicodeString A pointer to the Unicode string to add.
|
@param UnicodeString A pointer to the Unicode string to add.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Unicode string that matches the language
|
@retval EFI_SUCCESS The Unicode string that matches the language
|
||||||
specified by Language was found in the table of
|
specified by Language was found in the table of
|
||||||
Unicode strings UnicodeStringTable, and it was
|
Unicode strings UnicodeStringTable, and it was
|
||||||
returned in UnicodeString.
|
returned in UnicodeString.
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER UnicodeString is NULL.
|
@retval EFI_INVALID_PARAMETER UnicodeString is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER UnicodeString is an empty string.
|
@retval EFI_INVALID_PARAMETER UnicodeString is an empty string.
|
||||||
@retval EFI_UNSUPPORTED SupportedLanguages is NULL.
|
@retval EFI_UNSUPPORTED SupportedLanguages is NULL.
|
||||||
@retval EFI_ALREADY_STARTED A Unicode string with language Language is
|
@retval EFI_ALREADY_STARTED A Unicode string with language Language is
|
||||||
already present in UnicodeStringTable.
|
already present in UnicodeStringTable.
|
||||||
@retval EFI_OUT_OF_RESOURCES There is not enough memory to add another
|
@retval EFI_OUT_OF_RESOURCES There is not enough memory to add another
|
||||||
Unicode string to UnicodeStringTable.
|
Unicode string to UnicodeStringTable.
|
||||||
@retval EFI_UNSUPPORTED The language specified by Language is not a
|
@retval EFI_UNSUPPORTED The language specified by Language is not a
|
||||||
member of SupportedLanguages.
|
member of SupportedLanguages.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -760,7 +760,7 @@ AddUnicodeString (
|
|||||||
/**
|
/**
|
||||||
This function frees the table of Unicode strings in UnicodeStringTable.
|
This function frees the table of Unicode strings in UnicodeStringTable.
|
||||||
If UnicodeStringTable is NULL, then EFI_SUCCESS is returned.
|
If UnicodeStringTable is NULL, then EFI_SUCCESS is returned.
|
||||||
Otherwise, each language code, and each Unicode string in the Unicode string
|
Otherwise, each language code, and each Unicode string in the Unicode string
|
||||||
table are freed, and EFI_SUCCESS is returned.
|
table are freed, and EFI_SUCCESS is returned.
|
||||||
|
|
||||||
@param UnicodeStringTable A pointer to the table of Unicode strings.
|
@param UnicodeStringTable A pointer to the table of Unicode strings.
|
||||||
|
@ -59,7 +59,7 @@ EfiCreateEventLegacyBoot (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return EfiCreateEventLegacyBootEx (
|
return EfiCreateEventLegacyBootEx (
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
InternalEmptyFuntion,
|
InternalEmptyFuntion,
|
||||||
NULL,
|
NULL,
|
||||||
LegacyBootEvent
|
LegacyBootEvent
|
||||||
@ -114,7 +114,7 @@ EfiCreateEventLegacyBootEx (
|
|||||||
// For UEFI 2.0 and the future use an Event Group
|
// For UEFI 2.0 and the future use an Event Group
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEventEx (
|
||||||
EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
@ -149,7 +149,7 @@ EfiCreateEventReadyToBoot (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return EfiCreateEventReadyToBootEx (
|
return EfiCreateEventReadyToBootEx (
|
||||||
EFI_TPL_CALLBACK,
|
TPL_CALLBACK,
|
||||||
InternalEmptyFuntion,
|
InternalEmptyFuntion,
|
||||||
NULL,
|
NULL,
|
||||||
ReadyToBootEvent
|
ReadyToBootEvent
|
||||||
@ -204,7 +204,7 @@ EfiCreateEventReadyToBootEx (
|
|||||||
// For UEFI 2.0 and the future use an Event Group
|
// For UEFI 2.0 and the future use an Event Group
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEventEx (
|
||||||
EVENT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
NotifyTpl,
|
NotifyTpl,
|
||||||
NotifyFunction,
|
NotifyFunction,
|
||||||
NotifyContext,
|
NotifyContext,
|
||||||
|
Reference in New Issue
Block a user