EmulatorPkg: Remove all trailing whitespace
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11919 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -74,7 +74,7 @@ DevPathToTextVendorLib (
|
||||
CatPrint (Str, L"EmuThread()");
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -160,10 +160,10 @@ DevPathFromTextEmuFs (
|
||||
|
||||
/**
|
||||
Register the Filter function
|
||||
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The constructor executed correctly.
|
||||
|
||||
**/
|
||||
|
@@ -121,7 +121,7 @@ GetPerformanceCounterProperties (
|
||||
if (EndValue != NULL) {
|
||||
*EndValue = (UINT64)-1LL;
|
||||
}
|
||||
|
||||
|
||||
return gEmuThunk->QueryPerformanceFrequency ();
|
||||
}
|
||||
|
||||
|
@@ -41,4 +41,4 @@
|
||||
[LibraryClasses]
|
||||
DebugLib
|
||||
EmuThunkLib
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*++ @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -42,16 +42,16 @@ DxeEmuLibConstructor (
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gEmuThunkProtocolGuid);
|
||||
ASSERT (GuidHob != NULL);
|
||||
|
||||
|
||||
gEmuThunk = (EMU_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));
|
||||
ASSERT (gEmuThunk != NULL);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Serach the EMU IO Thunk database for a matching EMU IO Thunk
|
||||
Serach the EMU IO Thunk database for a matching EMU IO Thunk
|
||||
Protocol instance.
|
||||
|
||||
@param Protocol Protocol to search for.
|
||||
@@ -70,19 +70,19 @@ GetIoThunkInstance (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EMU_IO_THUNK_PROTOCOL *EmuIoThunk;
|
||||
|
||||
|
||||
for (Status = EFI_SUCCESS, EmuIoThunk = NULL; !EFI_ERROR (Status); ) {
|
||||
Status = gEmuThunk->GetNextProtocol (FALSE, &EmuIoThunk);
|
||||
if (EFI_ERROR (Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (EmuIoThunk->Instance == Instance) {
|
||||
if (CompareGuid (EmuIoThunk->Protocol, Protocol)) {
|
||||
return EmuIoThunk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
@@ -1,10 +1,10 @@
|
||||
## @file
|
||||
# A library to produce the global variable 'gEmuThunk'
|
||||
#
|
||||
# This library contains a single global variable 'gEmuThunk' along with a constructor to
|
||||
# This library contains a single global variable 'gEmuThunk' along with a constructor to
|
||||
# initialize that global.
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -22,7 +22,7 @@
|
||||
FILE_GUID = 31479AFD-B06F-4E4A-863B-A8F7E7710778
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = EmuThunkLib
|
||||
LIBRARY_CLASS = EmuThunkLib
|
||||
|
||||
CONSTRUCTOR = DxeEmuLibConstructor
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides services to perform additional actions to relocate and unload
|
||||
PE/Coff image for Emu environment specific purpose such as souce level debug.
|
||||
This version only works for DXE phase
|
||||
This version only works for DXE phase
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
||||
@@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/PeCoffExtraActionLib.h>
|
||||
|
||||
//
|
||||
// Cache of UnixThunk protocol
|
||||
// Cache of UnixThunk protocol
|
||||
//
|
||||
EMU_THUNK_PROTOCOL *mThunk = NULL;
|
||||
|
||||
@@ -84,9 +84,9 @@ PeCoffLoaderRelocateImageExtraAction (
|
||||
/**
|
||||
Performs additional actions just before a PE/COFF image is unloaded. Any resources
|
||||
that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
|
||||
|
||||
|
||||
If ImageContext is NULL, then ASSERT().
|
||||
|
||||
|
||||
@param ImageContext Pointer to the image context structure that describes the
|
||||
PE/COFF image that is being unloaded.
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# PeCoff extra action libary for DXE phase that run Emu emulator.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Serial Port Lib that thunks back to Emulator services to write to StdErr.
|
||||
All read functions are stubed out.
|
||||
Serial Port Lib that thunks back to Emulator services to write to StdErr.
|
||||
All read functions are stubed out.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR>
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
/**
|
||||
Initialize the serial device hardware.
|
||||
|
||||
|
||||
If no initialization is required, then return RETURN_SUCCESS.
|
||||
If the serial device was successfully initialized, then return RETURN_SUCCESS.
|
||||
If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
|
||||
|
||||
|
||||
@retval RETURN_SUCCESS The serial device was initialized.
|
||||
@retval RETURN_DEVICE_ERROR The serial device could not be initialized.
|
||||
|
||||
@@ -43,19 +43,19 @@ SerialPortInitialize (
|
||||
}
|
||||
|
||||
/**
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
The number of bytes actually written to the serial device is returned.
|
||||
If the return value is less than NumberOfBytes, then the write operation failed.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@param Buffer The pointer to the data buffer to be written.
|
||||
@param NumberOfBytes The number of bytes to written to the serial device.
|
||||
|
||||
@retval 0 NumberOfBytes is 0.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
If this value is less than NumberOfBytes, then the read operation failed.
|
||||
|
||||
**/
|
||||
@@ -72,11 +72,11 @@ SerialPortWrite (
|
||||
|
||||
/**
|
||||
Read data from serial device and save the datas in buffer.
|
||||
|
||||
|
||||
Reads NumberOfBytes data bytes from a serial device into the buffer
|
||||
specified by Buffer. The number of bytes actually read is returned.
|
||||
specified by Buffer. The number of bytes actually read is returned.
|
||||
If the return value is less than NumberOfBytes, then the rest operation failed.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@param Buffer The pointer to the data buffer to store the data read from the serial device.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Write only instance of Serial Port Library with empty functions.
|
||||
#
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -30,11 +30,11 @@
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
EmulatorPkg/EmulatorPkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
EmuThunkLib
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Serial Port Lib that thunks back to Emulator services to write to StdErr.
|
||||
All read functions are stubed out.
|
||||
Serial Port Lib that thunks back to Emulator services to write to StdErr.
|
||||
All read functions are stubed out.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR>
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
/**
|
||||
Initialize the serial device hardware.
|
||||
|
||||
|
||||
If no initialization is required, then return RETURN_SUCCESS.
|
||||
If the serial device was successfully initialized, then return RETURN_SUCCESS.
|
||||
If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
|
||||
|
||||
|
||||
@retval RETURN_SUCCESS The serial device was initialized.
|
||||
@retval RETURN_DEVICE_ERROR The serial device could not be initialized.
|
||||
|
||||
@@ -43,19 +43,19 @@ SerialPortInitialize (
|
||||
}
|
||||
|
||||
/**
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
The number of bytes actually written to the serial device is returned.
|
||||
If the return value is less than NumberOfBytes, then the write operation failed.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@param Buffer The pointer to the data buffer to be written.
|
||||
@param NumberOfBytes The number of bytes to written to the serial device.
|
||||
|
||||
@retval 0 NumberOfBytes is 0.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
If this value is less than NumberOfBytes, then the read operation failed.
|
||||
|
||||
**/
|
||||
@@ -72,11 +72,11 @@ SerialPortWrite (
|
||||
|
||||
/**
|
||||
Read data from serial device and save the datas in buffer.
|
||||
|
||||
|
||||
Reads NumberOfBytes data bytes from a serial device into the buffer
|
||||
specified by Buffer. The number of bytes actually read is returned.
|
||||
specified by Buffer. The number of bytes actually read is returned.
|
||||
If the return value is less than NumberOfBytes, then the rest operation failed.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@param Buffer The pointer to the data buffer to store the data read from the serial device.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Write only instance of Serial Port Library with empty functions.
|
||||
#
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -30,11 +30,11 @@
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
EmulatorPkg/EmulatorPkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
EmuThunkLib
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -36,15 +36,15 @@ RegisterTimerArchProtocol (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiTimerArchProtocolGuid, NULL, (VOID **)&gTimerAp);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = gTimerAp->GetTimerPeriod (gTimerAp, &gTimerPeriod);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
// Convert to Nanoseconds.
|
||||
gTimerPeriod = MultU64x32 (gTimerPeriod, 100);
|
||||
|
||||
|
||||
if (gTimerEvent == NULL) {
|
||||
Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, (VOID **)&gTimerEvent);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -93,21 +93,21 @@ NanoSecondDelay (
|
||||
EFI_STATUS Status;
|
||||
UINT64 HundredNanoseconds;
|
||||
UINTN Index;
|
||||
|
||||
if ((gTimerPeriod != 0) &&
|
||||
((UINT64)NanoSeconds > gTimerPeriod) &&
|
||||
|
||||
if ((gTimerPeriod != 0) &&
|
||||
((UINT64)NanoSeconds > gTimerPeriod) &&
|
||||
(EfiGetCurrentTpl () == TPL_APPLICATION)) {
|
||||
//
|
||||
// This stall is long, so use gBS->WaitForEvent () to yield CPU to DXE Core
|
||||
//
|
||||
|
||||
|
||||
HundredNanoseconds = DivU64x32 (NanoSeconds, 100);
|
||||
Status = gBS->SetTimer (gTimerEvent, TimerRelative, HundredNanoseconds);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = gBS->WaitForEvent (sizeof (gTimerEvent)/sizeof (EFI_EVENT), &gTimerEvent, &Index);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
} else {
|
||||
gEmuThunk->Sleep (NanoSeconds);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ GetPerformanceCounterProperties (
|
||||
if (EndValue != NULL) {
|
||||
*EndValue = (UINT64)-1LL;
|
||||
}
|
||||
|
||||
|
||||
return gEmuThunk->QueryPerformanceFrequency ();
|
||||
}
|
||||
|
||||
|
@@ -46,6 +46,6 @@
|
||||
EmuThunkLib
|
||||
UefiLib
|
||||
UefiBootServicesTableLib
|
||||
|
||||
|
||||
[Protocols]
|
||||
gEfiTimerArchProtocolGuid
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -93,14 +93,14 @@ Routine Description:
|
||||
Arguments:
|
||||
|
||||
PlatformConsole - Predfined platform default console device array.
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - Success connect at least one ConIn and ConOut
|
||||
device, there must have one ConOut device is
|
||||
EFI_SUCCESS - Success connect at least one ConIn and ConOut
|
||||
device, there must have one ConOut device is
|
||||
active vga device.
|
||||
|
||||
EFI_STATUS - Return the status of
|
||||
|
||||
EFI_STATUS - Return the status of
|
||||
BdsLibConnectAllDefaultConsoles ()
|
||||
|
||||
**/
|
||||
@@ -149,17 +149,17 @@ PlatformBdsConnectSequence (
|
||||
|
||||
Routine Description:
|
||||
|
||||
Connect with predeined platform connect sequence,
|
||||
Connect with predeined platform connect sequence,
|
||||
the OEM/IBV can customize with their own connect sequence.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
None.
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
|
||||
**/
|
||||
{
|
||||
UINTN Index;
|
||||
@@ -195,15 +195,15 @@ Routine Description:
|
||||
|
||||
Load the predefined driver option, OEM/IBV can customize this
|
||||
to load their own drivers
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
BdsDriverLists - The header of the driver option link list.
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
|
||||
**/
|
||||
{
|
||||
UINTN Index;
|
||||
@@ -235,19 +235,19 @@ Routine Description:
|
||||
|
||||
Perform the platform diagnostic, such like test memory. OEM/IBV also
|
||||
can customize this fuction to support specific platform diagnostic.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
MemoryTestLevel - The memory test intensive level
|
||||
|
||||
|
||||
QuietBoot - Indicate if need to enable the quiet boot
|
||||
|
||||
BaseMemoryTest - A pointer to BdsMemoryTest()
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
|
||||
**/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -291,11 +291,11 @@ Routine Description:
|
||||
The function will excute with as the platform policy, current policy
|
||||
is driven by boot mode. IBV/OEM can customize this code for their specific
|
||||
policy action.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
DriverOptionList - The header of the driver option link list
|
||||
|
||||
|
||||
BootOptionList - The header of the boot option link list
|
||||
|
||||
ProcessCapsules - A pointer to ProcessCapsules()
|
||||
@@ -305,7 +305,7 @@ Arguments:
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
|
||||
**/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -431,7 +431,7 @@ PlatformBdsBootSuccess (
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
|
||||
Hook point after a boot attempt succeeds. We don't expect a boot option to
|
||||
return, so the EFI 1.0 specification defines that you will default to an
|
||||
interactive mode and stop processing the BootOrder list in this case. This
|
||||
@@ -442,7 +442,7 @@ Arguments:
|
||||
Option - Pointer to Boot Option that succeeded to boot.
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
None.
|
||||
|
||||
**/
|
||||
@@ -471,11 +471,11 @@ PlatformBdsBootFail (
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
|
||||
Hook point after a boot attempt fails.
|
||||
|
||||
Arguments:
|
||||
|
||||
|
||||
Option - Pointer to Boot Option that failed to boot.
|
||||
|
||||
Status - Status returned from failed boot.
|
||||
@@ -485,7 +485,7 @@ Arguments:
|
||||
ExitDataSize - Exit data size returned from failed boot.
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
None.
|
||||
|
||||
**/
|
||||
@@ -510,16 +510,16 @@ PlatformBdsNoConsoleAction (
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
|
||||
This function is remained for IBV/OEM to do some platform action,
|
||||
if there no console device can be connected.
|
||||
|
||||
Arguments:
|
||||
|
||||
|
||||
None.
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
EFI_SUCCESS - Direct return success now.
|
||||
|
||||
**/
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Do platform action customized by IBV/OEM.
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -21,7 +21,7 @@
|
||||
FILE_GUID = 59569181-CBF8-2E44-9C3E-C2AB2F5608E1
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
|
||||
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
|
||||
|
||||
|
||||
#
|
||||
@@ -61,6 +61,6 @@
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
|
||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut
|
||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
|
||||
|
||||
|
||||
[Depex]
|
||||
gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -1,23 +1,23 @@
|
||||
/** @file
|
||||
Support routines for memory allocation routines based
|
||||
Support routines for memory allocation routines based
|
||||
on boot services for Dxe phase drivers using OS malloc.
|
||||
|
||||
OS malloc is used so OS based malloc debugging tools can be used.
|
||||
If a single driver links against this lib protocols from other
|
||||
drivers, or EFI boot services can return a buffer that needs to
|
||||
freed using the EFI scheme. This is why the gEmuThunk->Free ()
|
||||
|
||||
OS malloc is used so OS based malloc debugging tools can be used.
|
||||
If a single driver links against this lib protocols from other
|
||||
drivers, or EFI boot services can return a buffer that needs to
|
||||
freed using the EFI scheme. This is why the gEmuThunk->Free ()
|
||||
can detect if the memory rang is for EFI so the right free can be
|
||||
called.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocatePages (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Pages
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_PHYSICAL_ADDRESS Memory;
|
||||
EFI_PHYSICAL_ADDRESS Memory;
|
||||
|
||||
if (Pages == 0) {
|
||||
return NULL;
|
||||
@@ -134,11 +134,11 @@ AllocateReservedPages (
|
||||
must have been allocated on a previous call to the page allocation services of the Memory
|
||||
Allocation Library. If it is not possible to free allocated pages, then this function will
|
||||
perform no actions.
|
||||
|
||||
|
||||
If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
|
||||
then ASSERT().
|
||||
If Pages is zero, then ASSERT().
|
||||
|
||||
|
||||
@param Buffer The pointer to the buffer of pages to free.
|
||||
@param Pages The number of 4 KB pages to free.
|
||||
|
||||
@@ -155,7 +155,7 @@ FreePages (
|
||||
ASSERT (Pages != 0);
|
||||
if (!gEmuThunk->Free (Buffer)) {
|
||||
// The Free thunk will not free memory allocated in emulated EFI memory.
|
||||
// The assmuption is this was allocated directly by EFI. We need this as some
|
||||
// The assmuption is this was allocated directly by EFI. We need this as some
|
||||
// times protocols or EFI BootServices can return dynamically allocated buffers.
|
||||
Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -181,7 +181,7 @@ FreePages (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateAlignedPages (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Pages,
|
||||
IN UINTN Alignment
|
||||
)
|
||||
@@ -197,7 +197,7 @@ InternalAllocateAlignedPages (
|
||||
// Alignment must be a power of two or zero.
|
||||
//
|
||||
ASSERT ((Alignment & (Alignment - 1)) == 0);
|
||||
|
||||
|
||||
if (Pages == 0) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ InternalAllocateAlignedPages (
|
||||
// Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.
|
||||
//
|
||||
ASSERT (RealPages > Pages);
|
||||
|
||||
|
||||
Memory = gEmuThunk->Valloc (Pages * EFI_PAGE_SIZE);
|
||||
if (Memory != NULL) {
|
||||
return NULL;
|
||||
@@ -252,7 +252,7 @@ InternalAllocateAlignedPages (
|
||||
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
|
||||
returned. If there is not enough memory at the specified alignment remaining to satisfy the
|
||||
request, then NULL is returned.
|
||||
|
||||
|
||||
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
|
||||
|
||||
@param Pages The number of 4 KB pages to allocate.
|
||||
@@ -279,7 +279,7 @@ AllocateAlignedPages (
|
||||
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
|
||||
returned. If there is not enough memory at the specified alignment remaining to satisfy the
|
||||
request, then NULL is returned.
|
||||
|
||||
|
||||
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
|
||||
|
||||
@param Pages The number of 4 KB pages to allocate.
|
||||
@@ -306,7 +306,7 @@ AllocateAlignedRuntimePages (
|
||||
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
|
||||
returned. If there is not enough memory at the specified alignment remaining to satisfy the
|
||||
request, then NULL is returned.
|
||||
|
||||
|
||||
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
|
||||
|
||||
@param Pages The number of 4 KB pages to allocate.
|
||||
@@ -332,13 +332,13 @@ AllocateAlignedReservedPages (
|
||||
|
||||
Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
|
||||
must have been allocated on a previous call to the aligned page allocation services of the Memory
|
||||
Allocation Library. If it is not possible to free allocated pages, then this function will
|
||||
Allocation Library. If it is not possible to free allocated pages, then this function will
|
||||
perform no actions.
|
||||
|
||||
|
||||
If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
|
||||
Library, then ASSERT().
|
||||
If Pages is zero, then ASSERT().
|
||||
|
||||
|
||||
@param Buffer The pointer to the buffer of pages to free.
|
||||
@param Pages The number of 4 KB pages to free.
|
||||
|
||||
@@ -368,7 +368,7 @@ FreeAlignedPages (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocatePool (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN AllocationSize
|
||||
)
|
||||
{
|
||||
@@ -454,9 +454,9 @@ AllocateReservedPool (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateZeroPool (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize
|
||||
)
|
||||
)
|
||||
{
|
||||
VOID *Memory;
|
||||
|
||||
@@ -541,7 +541,7 @@ AllocateReservedZeroPool (
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param PoolType The type of pool to allocate.
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@@ -552,10 +552,10 @@ AllocateReservedZeroPool (
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
)
|
||||
{
|
||||
VOID *Memory;
|
||||
|
||||
@@ -567,7 +567,7 @@ InternalAllocateCopyPool (
|
||||
Memory = CopyMem (Memory, Buffer, AllocationSize);
|
||||
}
|
||||
return Memory;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Copies a buffer to an allocated buffer of type EfiBootServicesData.
|
||||
@@ -576,9 +576,9 @@ InternalAllocateCopyPool (
|
||||
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@param Buffer The buffer to copy to the allocated buffer.
|
||||
@@ -603,9 +603,9 @@ AllocateCopyPool (
|
||||
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@param Buffer The buffer to copy to the allocated buffer.
|
||||
@@ -630,9 +630,9 @@ AllocateRuntimeCopyPool (
|
||||
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
|
||||
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
|
||||
is not enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param AllocationSize The number of bytes to allocate and zero.
|
||||
@param Buffer The buffer to copy to the allocated buffer.
|
||||
@@ -654,19 +654,19 @@ AllocateReservedCopyPool (
|
||||
Reallocates a buffer of a specified memory type.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of the type
|
||||
specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
|
||||
|
||||
@param PoolType The type of pool to allocate.
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -674,7 +674,7 @@ AllocateReservedCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
InternalReallocatePool (
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN OldSize,
|
||||
IN UINTN NewSize,
|
||||
IN VOID *OldBuffer OPTIONAL
|
||||
@@ -694,18 +694,18 @@ InternalReallocatePool (
|
||||
Reallocates a buffer of type EfiBootServicesData.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of type
|
||||
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
|
||||
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -726,10 +726,10 @@ ReallocatePool (
|
||||
Reallocates a buffer of type EfiRuntimeServicesData.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of type
|
||||
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
@@ -737,7 +737,7 @@ ReallocatePool (
|
||||
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -758,10 +758,10 @@ ReallocateRuntimePool (
|
||||
Reallocates a buffer of type EfiReservedMemoryType.
|
||||
|
||||
Allocates and zeros the number bytes specified by NewSize from memory of type
|
||||
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
|
||||
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
|
||||
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
|
||||
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
|
||||
enough memory remaining to satisfy the request, then NULL is returned.
|
||||
|
||||
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
|
||||
@@ -769,7 +769,7 @@ ReallocateRuntimePool (
|
||||
|
||||
@param OldSize The size, in bytes, of OldBuffer.
|
||||
@param NewSize The size, in bytes, of the buffer to reallocate.
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
|
||||
parameter that may be NULL.
|
||||
|
||||
@return A pointer to the allocated buffer or NULL if allocation fails.
|
||||
@@ -793,7 +793,7 @@ ReallocateReservedPool (
|
||||
Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the
|
||||
pool allocation services of the Memory Allocation Library. If it is not possible to free pool
|
||||
resources, then this function will perform no actions.
|
||||
|
||||
|
||||
If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
|
||||
then ASSERT().
|
||||
|
||||
@@ -810,7 +810,7 @@ FreePool (
|
||||
|
||||
if (!gEmuThunk->Free (Buffer)) {
|
||||
// The Free thunk will not free memory allocated in emulated EFI memory.
|
||||
// The assmuption is this was allocated directly by EFI. We need this as some
|
||||
// The assmuption is this was allocated directly by EFI. We need this as some
|
||||
// times protocols or EFI BootServices can return dynamically allocated buffers.
|
||||
Status = gBS->FreePool (Buffer);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++ @file
|
||||
|
||||
Copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
Copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,10 +1,10 @@
|
||||
## @file
|
||||
# A library to produce the global variable 'gEmuThunk'
|
||||
#
|
||||
# This library contains a single global variable 'gEmuThunk' along with a constructor to
|
||||
# This library contains a single global variable 'gEmuThunk' along with a constructor to
|
||||
# initialize that global.
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -22,7 +22,7 @@
|
||||
FILE_GUID = 6B7067C7-A843-A34C-9530-48446963B740
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = KeyMapLib
|
||||
LIBRARY_CLASS = KeyMapLib
|
||||
|
||||
[Sources]
|
||||
KeyMapLibNull.c
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# read-only memory.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
PEI Services Table Pointer Library.
|
||||
|
||||
|
||||
This library is used for PEIM which does executed from flash device directly but
|
||||
executed in memory.
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
CONST EFI_PEI_SERVICES **gPeiServices;
|
||||
|
||||
/**
|
||||
Caches a pointer PEI Services Table.
|
||||
|
||||
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
|
||||
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
|
||||
Pre-EFI Initialization Core Interface Specification.
|
||||
|
||||
Caches a pointer PEI Services Table.
|
||||
|
||||
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
|
||||
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
|
||||
Pre-EFI Initialization Core Interface Specification.
|
||||
|
||||
If PeiServicesTablePointer is NULL, then ASSERT().
|
||||
|
||||
|
||||
@param PeiServicesTablePointer The address of PeiServices pointer.
|
||||
**/
|
||||
VOID
|
||||
@@ -45,10 +45,10 @@ SetPeiServicesTablePointer (
|
||||
/**
|
||||
Retrieves the cached value of the PEI Services Table pointer.
|
||||
|
||||
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
|
||||
as specified in the CPU binding section of the Platform Initialization Pre-EFI
|
||||
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
|
||||
as specified in the CPU binding section of the Platform Initialization Pre-EFI
|
||||
Initialization Core Interface Specification.
|
||||
|
||||
|
||||
If the cached PEI Services Table pointer is NULL, then ASSERT().
|
||||
|
||||
@return The pointer to PeiServices.
|
||||
@@ -67,7 +67,7 @@ GetPeiServicesTablePointer (
|
||||
|
||||
/**
|
||||
The constructor function caches the pointer to PEI services.
|
||||
|
||||
|
||||
The constructor function caches the pointer to PEI services.
|
||||
It will always return EFI_SUCCESS.
|
||||
|
||||
|
@@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/EmuMagicPageLib.h>
|
||||
|
||||
//
|
||||
// Cache of UnixThunk protocol
|
||||
// Cache of UnixThunk protocol
|
||||
//
|
||||
EMU_THUNK_PROTOCOL *mThunk = NULL;
|
||||
|
||||
@@ -45,7 +45,7 @@ EmuPeCoffGetThunkStucture (
|
||||
EMU_THUNK_PPI *ThunkPpi;
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Locate Unix ThunkPpi for retrieving standard output handle
|
||||
//
|
||||
@@ -87,9 +87,9 @@ PeCoffLoaderRelocateImageExtraAction (
|
||||
/**
|
||||
Performs additional actions just before a PE/COFF image is unloaded. Any resources
|
||||
that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
|
||||
|
||||
|
||||
If ImageContext is NULL, then ASSERT().
|
||||
|
||||
|
||||
@param ImageContext Pointer to the image context structure that describes the
|
||||
PE/COFF image that is being unloaded.
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Lib to provide memory journal status code reporting Routines
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -68,11 +68,11 @@ PeCoffLoaderGetEntryPoint (
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the machine type of PE/COFF image.
|
||||
Returns the machine type of PE/COFF image.
|
||||
This is copied from MDE BasePeCoffGetEntryPointLib, the code should be sync with it.
|
||||
The reason is Emu package needs to load the image to memory to support source
|
||||
level debug.
|
||||
|
||||
|
||||
|
||||
@param Pe32Data Pointer to a PE/COFF header
|
||||
|
||||
@@ -84,7 +84,7 @@ EFIAPI
|
||||
PeCoffLoaderGetMachineType (
|
||||
IN VOID *Pe32Data
|
||||
)
|
||||
{
|
||||
{
|
||||
EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr;
|
||||
EFI_IMAGE_DOS_HEADER *DosHdr;
|
||||
|
||||
@@ -270,7 +270,7 @@ PeCoffGetSizeOfHeaders (
|
||||
UINTN SizeOfHeaders;
|
||||
|
||||
ASSERT (Pe32Data != NULL);
|
||||
|
||||
|
||||
DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;
|
||||
if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
|
||||
//
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# PeCoffGetEntryPointLib library class for NT32 instance implemented by use NTPeiLoadFile PPI.
|
||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -21,7 +21,7 @@
|
||||
FILE_GUID = 1CBED347-7DE6-BC48-AC68-3758598124D2
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = PeCoffGetEntryPointLib
|
||||
LIBRARY_CLASS = PeCoffGetEntryPointLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Serial Port Lib that thunks back to Emulator services to write to StdErr.
|
||||
All read functions are stubed out. There is no constructor so this lib can
|
||||
Serial Port Lib that thunks back to Emulator services to write to StdErr.
|
||||
All read functions are stubed out. There is no constructor so this lib can
|
||||
be linked with PEI Core.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
/**
|
||||
Initialize the serial device hardware.
|
||||
|
||||
|
||||
If no initialization is required, then return RETURN_SUCCESS.
|
||||
If the serial device was successfully initialized, then return RETURN_SUCCESS.
|
||||
If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
|
||||
|
||||
|
||||
@retval RETURN_SUCCESS The serial device was initialized.
|
||||
@retval RETURN_DEVICE_ERROR The serial device could not be initialized.
|
||||
|
||||
@@ -46,19 +46,19 @@ SerialPortInitialize (
|
||||
}
|
||||
|
||||
/**
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
Write data from buffer to serial device.
|
||||
|
||||
Writes NumberOfBytes data bytes from Buffer to the serial device.
|
||||
The number of bytes actually written to the serial device is returned.
|
||||
If the return value is less than NumberOfBytes, then the write operation failed.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@param Buffer The pointer to the data buffer to be written.
|
||||
@param NumberOfBytes The number of bytes to written to the serial device.
|
||||
|
||||
@retval 0 NumberOfBytes is 0.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
@retval >0 The number of bytes written to the serial device.
|
||||
If this value is less than NumberOfBytes, then the read operation failed.
|
||||
|
||||
**/
|
||||
@@ -86,18 +86,18 @@ SerialPortWrite (
|
||||
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
|
||||
return Thunk->WriteStdErr (Buffer, NumberOfBytes);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Read data from serial device and save the datas in buffer.
|
||||
|
||||
|
||||
Reads NumberOfBytes data bytes from a serial device into the buffer
|
||||
specified by Buffer. The number of bytes actually read is returned.
|
||||
specified by Buffer. The number of bytes actually read is returned.
|
||||
If the return value is less than NumberOfBytes, then the rest operation failed.
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If NumberOfBytes is zero, then return 0.
|
||||
|
||||
@param Buffer The pointer to the data buffer to store the data read from the serial device.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Write only instance of Serial Port Library with empty functions.
|
||||
#
|
||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -33,7 +33,7 @@
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
EmulatorPkg/EmulatorPkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
PeiServicesLib
|
||||
|
||||
@@ -41,5 +41,5 @@
|
||||
gEmuThunkPpiGuid # PPI ALWAYS_CONSUMED
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/** @file
|
||||
PEI Services Table Pointer Library.
|
||||
|
||||
|
||||
This library is used for PEIM which does executed from flash device directly but
|
||||
executed in memory.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
|
||||
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -26,14 +26,14 @@
|
||||
CONST EFI_PEI_SERVICES **gPeiServices = NULL;
|
||||
|
||||
/**
|
||||
Caches a pointer PEI Services Table.
|
||||
|
||||
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
|
||||
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
|
||||
Pre-EFI Initialization Core Interface Specification.
|
||||
|
||||
Caches a pointer PEI Services Table.
|
||||
|
||||
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
|
||||
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
|
||||
Pre-EFI Initialization Core Interface Specification.
|
||||
|
||||
If PeiServicesTablePointer is NULL, then ASSERT().
|
||||
|
||||
|
||||
@param PeiServicesTablePointer The address of PeiServices pointer.
|
||||
**/
|
||||
VOID
|
||||
@@ -50,10 +50,10 @@ SetPeiServicesTablePointer (
|
||||
/**
|
||||
Retrieves the cached value of the PEI Services Table pointer.
|
||||
|
||||
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
|
||||
as specified in the CPU binding section of the Platform Initialization Pre-EFI
|
||||
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
|
||||
as specified in the CPU binding section of the Platform Initialization Pre-EFI
|
||||
Initialization Core Interface Specification.
|
||||
|
||||
|
||||
If the cached PEI Services Table pointer is NULL, then ASSERT().
|
||||
|
||||
@return The pointer to PeiServices.
|
||||
@@ -101,13 +101,13 @@ PeiServicesTablePointerNotifyCallback (
|
||||
EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnThunkList = {
|
||||
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
&gEfiPeiMemoryDiscoveredPpiGuid,
|
||||
PeiServicesTablePointerNotifyCallback
|
||||
PeiServicesTablePointerNotifyCallback
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Constructor register notification on when PPI updates. If PPI is
|
||||
alreay installed registering the notify will cause the handle to
|
||||
Constructor register notification on when PPI updates. If PPI is
|
||||
alreay installed registering the notify will cause the handle to
|
||||
run.
|
||||
|
||||
@param FileHandle The handle of FFS header the loaded driver.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# read-only memory.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/** @file
|
||||
PEI Services Table Pointer Library.
|
||||
|
||||
|
||||
Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage.
|
||||
This emulates a platform SRAM. The PI mechaism does not work in the emulator due to
|
||||
lack of privledge.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
|
||||
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -24,14 +24,14 @@
|
||||
|
||||
|
||||
/**
|
||||
Caches a pointer PEI Services Table.
|
||||
|
||||
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
|
||||
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
|
||||
Pre-EFI Initialization Core Interface Specification.
|
||||
|
||||
Caches a pointer PEI Services Table.
|
||||
|
||||
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
|
||||
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
|
||||
Pre-EFI Initialization Core Interface Specification.
|
||||
|
||||
If PeiServicesTablePointer is NULL, then ASSERT().
|
||||
|
||||
|
||||
@param PeiServicesTablePointer The address of PeiServices pointer.
|
||||
**/
|
||||
VOID
|
||||
@@ -48,10 +48,10 @@ SetPeiServicesTablePointer (
|
||||
/**
|
||||
Retrieves the cached value of the PEI Services Table pointer.
|
||||
|
||||
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
|
||||
as specified in the CPU binding section of the Platform Initialization Pre-EFI
|
||||
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
|
||||
as specified in the CPU binding section of the Platform Initialization Pre-EFI
|
||||
Initialization Core Interface Specification.
|
||||
|
||||
|
||||
If the cached PEI Services Table pointer is NULL, then ASSERT().
|
||||
|
||||
@return The pointer to PeiServices.
|
||||
@@ -64,7 +64,7 @@ GetPeiServicesTablePointer (
|
||||
)
|
||||
{
|
||||
CONST EFI_PEI_SERVICES **PeiServicesTablePointer;
|
||||
|
||||
|
||||
PeiServicesTablePointer = EMU_MAGIC_PAGE()->PeiServicesTablePointer;
|
||||
ASSERT (PeiServicesTablePointer != NULL);
|
||||
ASSERT (*PeiServicesTablePointer != NULL);
|
||||
|
@@ -1,12 +1,12 @@
|
||||
## @file
|
||||
# PEI Services Table Pointer Library.
|
||||
#
|
||||
#
|
||||
# Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage.
|
||||
# This emulates a platform SRAM. The PI mechaism does not work in the emulator due to
|
||||
# lack of privledge.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -60,7 +60,7 @@ NanoSecondDelay (
|
||||
EMU_THUNK_PROTOCOL *Thunk;
|
||||
|
||||
//
|
||||
// Locate EmuThunkPpi for
|
||||
// Locate EmuThunkPpi for
|
||||
//
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEmuThunkPpiGuid,
|
||||
@@ -68,7 +68,7 @@ NanoSecondDelay (
|
||||
NULL,
|
||||
(VOID **) &ThunkPpi
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
|
||||
Thunk->Sleep (NanoSeconds * 100);
|
||||
return NanoSeconds;
|
||||
@@ -99,7 +99,7 @@ GetPerformanceCounter (
|
||||
EMU_THUNK_PROTOCOL *Thunk;
|
||||
|
||||
//
|
||||
// Locate EmuThunkPpi for
|
||||
// Locate EmuThunkPpi for
|
||||
//
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEmuThunkPpiGuid,
|
||||
@@ -107,7 +107,7 @@ GetPerformanceCounter (
|
||||
NULL,
|
||||
(VOID **) &ThunkPpi
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
|
||||
return Thunk->QueryPerformanceCounter ();
|
||||
}
|
||||
@@ -150,7 +150,7 @@ GetPerformanceCounterProperties (
|
||||
EMU_THUNK_PROTOCOL *Thunk;
|
||||
|
||||
//
|
||||
// Locate EmuThunkPpi for
|
||||
// Locate EmuThunkPpi for
|
||||
//
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEmuThunkPpiGuid,
|
||||
@@ -165,7 +165,7 @@ GetPerformanceCounterProperties (
|
||||
if (EndValue != NULL) {
|
||||
*EndValue = (UINT64)-1LL;
|
||||
}
|
||||
|
||||
|
||||
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
|
||||
return Thunk->QueryPerformanceFrequency ();
|
||||
}
|
||||
|
@@ -3,13 +3,13 @@
|
||||
FV.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -70,7 +70,7 @@ Arguments:
|
||||
|
||||
Returns:
|
||||
Checksum of the header.
|
||||
|
||||
|
||||
**/
|
||||
{
|
||||
UINT8 *ptr;
|
||||
|
@@ -87,8 +87,8 @@ PeiServicesReInstallPpi (
|
||||
/**
|
||||
This service enables PEIMs to discover a given instance of an interface.
|
||||
|
||||
So this is, well a hack, so we can reuse the same libraries as the PEI Core
|
||||
for XIP modules....
|
||||
So this is, well a hack, so we can reuse the same libraries as the PEI Core
|
||||
for XIP modules....
|
||||
|
||||
@param Guid A pointer to the GUID whose corresponding interface needs to be
|
||||
found.
|
||||
@@ -110,11 +110,11 @@ PeiServicesLocatePpi (
|
||||
)
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR *PpiList;
|
||||
|
||||
|
||||
if (Instance != 0) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
for (PpiList = EMU_MAGIC_PAGE()->PpiList; ; PpiList++) {
|
||||
if (CompareGuid (PpiList->Guid, Guid)) {
|
||||
if (PpiDescriptor != NULL) {
|
||||
@@ -125,13 +125,13 @@ PeiServicesLocatePpi (
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) == EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ PeiServicesLocatePpi (
|
||||
This service enables PEIMs to register a given service to be invoked when another service is
|
||||
installed or reinstalled.
|
||||
|
||||
@param NotifyList A pointer to the list of notification interfaces
|
||||
@param NotifyList A pointer to the list of notification interfaces
|
||||
that the caller shall install.
|
||||
|
||||
@retval EFI_SUCCESS The interface was successfully installed.
|
||||
@@ -200,9 +200,9 @@ PeiServicesSetBootMode (
|
||||
/**
|
||||
This service enables a PEIM to ascertain the address of the list of HOBs in memory.
|
||||
|
||||
@param HobList A pointer to the list of HOBs that the PEI Foundation
|
||||
@param HobList A pointer to the list of HOBs that the PEI Foundation
|
||||
will initialize.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The list was successfully returned.
|
||||
@retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
|
||||
|
||||
@@ -222,7 +222,7 @@ PeiServicesGetHobList (
|
||||
|
||||
@param Type The type of HOB to be installed.
|
||||
@param Length The length of the HOB to be added.
|
||||
@param Hob The address of a pointer that will contain the
|
||||
@param Hob The address of a pointer that will contain the
|
||||
HOB header.
|
||||
|
||||
@retval EFI_SUCCESS The HOB was successfully created.
|
||||
@@ -244,7 +244,7 @@ PeiServicesCreateHob (
|
||||
/**
|
||||
This service enables PEIMs to discover additional firmware volumes.
|
||||
|
||||
@param Instance This instance of the firmware volume to find. The
|
||||
@param Instance This instance of the firmware volume to find. The
|
||||
value 0 is the Boot Firmware Volume (BFV).
|
||||
@param VolumeHandle Handle of the firmware volume header of the volume
|
||||
to return.
|
||||
@@ -269,9 +269,9 @@ PeiServicesFfsFindNextVolume (
|
||||
This service enables PEIMs to discover additional firmware files.
|
||||
|
||||
@param SearchType A filter to find files only of this type.
|
||||
@param VolumeHandle The pointer to the firmware volume header of the
|
||||
volume to search. This parameter must point to a
|
||||
valid FFS volume.
|
||||
@param VolumeHandle The pointer to the firmware volume header of the
|
||||
volume to search. This parameter must point to a
|
||||
valid FFS volume.
|
||||
@param FileHandle Handle of the current file from which to begin searching.
|
||||
|
||||
@retval EFI_SUCCESS The file was found.
|
||||
@@ -294,7 +294,7 @@ PeiServicesFfsFindNextFile (
|
||||
This service enables PEIMs to discover sections of a given type within a valid FFS file.
|
||||
|
||||
@param SectionType The value of the section type to find.
|
||||
@param FileHandle A pointer to the file header that contains the set
|
||||
@param FileHandle A pointer to the file header that contains the set
|
||||
of sections to be searched.
|
||||
@param SectionData A pointer to the discovered section, if successful.
|
||||
|
||||
@@ -366,7 +366,7 @@ PeiServicesAllocatePages (
|
||||
This service allocates memory from the Hand-Off Block (HOB) heap.
|
||||
|
||||
@param Size The number of bytes to allocate from the pool.
|
||||
@param Buffer If the call succeeds, a pointer to a pointer to
|
||||
@param Buffer If the call succeeds, a pointer to a pointer to
|
||||
the allocate buffer; otherwise, undefined.
|
||||
|
||||
@retval EFI_SUCCESS The allocation was successful
|
||||
@@ -402,13 +402,13 @@ PeiServicesResetSystem (
|
||||
}
|
||||
|
||||
/**
|
||||
This service is a wrapper for the PEI Service RegisterForShadow(), except the
|
||||
pointer to the PEI Services Table has been removed. See the Platform
|
||||
Initialization Pre-EFI Initialization Core Interface Specification for details.
|
||||
This service is a wrapper for the PEI Service RegisterForShadow(), except the
|
||||
pointer to the PEI Services Table has been removed. See the Platform
|
||||
Initialization Pre-EFI Initialization Core Interface Specification for details.
|
||||
|
||||
@param FileHandle PEIM's file handle. Must be the currently
|
||||
executing PEIM.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The PEIM was successfully registered for
|
||||
shadowing.
|
||||
|
||||
@@ -429,9 +429,9 @@ PeiServicesRegisterForShadow (
|
||||
}
|
||||
|
||||
/**
|
||||
This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services
|
||||
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
|
||||
Specification for details.
|
||||
This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services
|
||||
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
|
||||
Specification for details.
|
||||
|
||||
@param FileHandle The handle of the file.
|
||||
|
||||
@@ -439,15 +439,15 @@ PeiServicesRegisterForShadow (
|
||||
information.
|
||||
|
||||
@retval EFI_SUCCESS File information returned.
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER If FileHandle does not
|
||||
represent a valid file.
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER FileInfo is NULL.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
PeiServicesFfsGetFileInfo (
|
||||
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
|
||||
OUT EFI_FV_FILE_INFO *FileInfo
|
||||
@@ -459,9 +459,9 @@ PeiServicesFfsGetFileInfo (
|
||||
|
||||
|
||||
/**
|
||||
This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services
|
||||
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
|
||||
Specification for details.
|
||||
This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services
|
||||
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
|
||||
Specification for details.
|
||||
|
||||
@param FileName A pointer to the name of the file to
|
||||
find within the firmware volume.
|
||||
@@ -469,7 +469,7 @@ PeiServicesFfsGetFileInfo (
|
||||
@param VolumeHandle The firmware volume to search FileHandle
|
||||
Upon exit, points to the found file's
|
||||
handle or NULL if it could not be found.
|
||||
@param FileHandle The pointer to found file handle
|
||||
@param FileHandle The pointer to found file handle
|
||||
|
||||
@retval EFI_SUCCESS File was found.
|
||||
|
||||
@@ -493,9 +493,9 @@ PeiServicesFfsFindFileByName (
|
||||
|
||||
|
||||
/**
|
||||
This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services
|
||||
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
|
||||
Specification for details.
|
||||
This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services
|
||||
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
|
||||
Specification for details.
|
||||
|
||||
@param VolumeHandle Handle of the volume.
|
||||
|
||||
@@ -503,10 +503,10 @@ PeiServicesFfsFindFileByName (
|
||||
information.
|
||||
|
||||
@retval EFI_SUCCESS File information returned.
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER If FileHandle does not
|
||||
represent a valid file.
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
|
||||
|
||||
**/
|
||||
@@ -523,32 +523,32 @@ PeiServicesFfsGetVolumeInfo (
|
||||
|
||||
/**
|
||||
Install a EFI_PEI_FIRMWARE_VOLUME_INFO_PPI instance so the PEI Core will be notified about a new firmware volume.
|
||||
|
||||
This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO_PPI using
|
||||
|
||||
This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO_PPI using
|
||||
the parameters passed in to initialize the fields of the EFI_PEI_FIRMWARE_VOLUME_INFO_PPI instance.
|
||||
If the resources can not be allocated for EFI_PEI_FIRMWARE_VOLUME_INFO_PPI, then ASSERT().
|
||||
If the EFI_PEI_FIRMWARE_VOLUME_INFO_PPI can not be installed, then ASSERT().
|
||||
|
||||
|
||||
@param FvFormat Unique identifier of the format of the memory-mapped
|
||||
firmware volume. This parameter is optional and
|
||||
may be NULL. If NULL is specified, the
|
||||
|
||||
@param FvFormat Unique identifier of the format of the memory-mapped
|
||||
firmware volume. This parameter is optional and
|
||||
may be NULL. If NULL is specified, the
|
||||
EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.
|
||||
@param FvInfo Points to a buffer which allows the
|
||||
EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.
|
||||
The format of this buffer is specific to the FvFormat.
|
||||
For memory-mapped firmware volumes, this typically
|
||||
@param FvInfo Points to a buffer which allows the
|
||||
EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.
|
||||
The format of this buffer is specific to the FvFormat.
|
||||
For memory-mapped firmware volumes, this typically
|
||||
points to the first byte of the firmware volume.
|
||||
@param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped
|
||||
firmware volumes, this is typically the size of
|
||||
@param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped
|
||||
firmware volumes, this is typically the size of
|
||||
the firmware volume.
|
||||
@param ParentFvName If the new firmware volume originated from a file
|
||||
in a different firmware volume, then this parameter
|
||||
@param ParentFvName If the new firmware volume originated from a file
|
||||
in a different firmware volume, then this parameter
|
||||
specifies the GUID name of the originating firmware
|
||||
volume. Otherwise, this parameter must be NULL.
|
||||
@param ParentFileName If the new firmware volume originated from a file
|
||||
in a different firmware volume, then this parameter
|
||||
specifies the GUID file name of the originating
|
||||
@param ParentFileName If the new firmware volume originated from a file
|
||||
in a different firmware volume, then this parameter
|
||||
specifies the GUID file name of the originating
|
||||
firmware file. Otherwise, this parameter must be NULL.
|
||||
**/
|
||||
VOID
|
||||
|
@@ -19,7 +19,7 @@
|
||||
FILE_GUID = E3E4A441-8465-0F41-8AF4-F67EBE984099
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = PeiServicesLib|SEC PEIM PEI_CORE
|
||||
LIBRARY_CLASS = PeiServicesLib|SEC PEIM PEI_CORE
|
||||
PI_SPECIFICATION_VERSION = 0x0001000A
|
||||
|
||||
#
|
||||
|
@@ -1,13 +1,13 @@
|
||||
/*++ @file
|
||||
|
||||
Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Place thunk PPI in HOB.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,14 +30,14 @@ GetThunkPpiList (
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
|
||||
|
||||
if (gThunkPpiList == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR)) - 1;
|
||||
gThunkPpiList[Index].Flags |= EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
|
||||
|
||||
|
||||
return gThunkPpiList;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ AddThunkPpi (
|
||||
if (gThunkPpiList == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR));
|
||||
gThunkPpiList[Index].Flags = Flags;
|
||||
gThunkPpiList[Index].Guid = Guid;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Place thunk PPI in HOB.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -38,7 +38,7 @@ LIST_ENTRY mThunkList = INITIALIZE_LIST_HEAD_VARIABLE (mThunkList);
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AddThunkProtocol (
|
||||
IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
|
||||
IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
|
||||
IN CHAR16 *ConfigString,
|
||||
IN BOOLEAN EmuBusDriver
|
||||
)
|
||||
@@ -47,11 +47,11 @@ AddThunkProtocol (
|
||||
CHAR16 *SubString;
|
||||
UINTN Instance;
|
||||
EMU_IO_THUNK_PROTOCOL_DATA *Private;
|
||||
|
||||
|
||||
if (ThunkIo == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
Instance = 0;
|
||||
StartString = AllocatePool (StrSize (ConfigString));
|
||||
StrCpy (StartString, ConfigString);
|
||||
@@ -81,10 +81,10 @@ AddThunkProtocol (
|
||||
Private->Signature = EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE;
|
||||
Private->EmuBusDriver = EmuBusDriver;
|
||||
|
||||
CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL));
|
||||
CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL));
|
||||
Private->Data.Instance = Instance++;
|
||||
Private->Data.ConfigString = StartString;
|
||||
|
||||
|
||||
InsertTailList (&mThunkList, &Private->Link);
|
||||
|
||||
//
|
||||
@@ -104,14 +104,14 @@ GetNextThunkProtocol (
|
||||
OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Link;
|
||||
EMU_IO_THUNK_PROTOCOL_DATA *Private;
|
||||
|
||||
LIST_ENTRY *Link;
|
||||
EMU_IO_THUNK_PROTOCOL_DATA *Private;
|
||||
|
||||
if (mThunkList.ForwardLink == &mThunkList) {
|
||||
// Skip parsing an empty list
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
for (Link = mThunkList.ForwardLink; Link != &mThunkList; Link = Link->ForwardLink) {
|
||||
Private = CR (Link, EMU_IO_THUNK_PROTOCOL_DATA, Link, EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE);
|
||||
if (EmuBusDriver & !Private->EmuBusDriver) {
|
||||
@@ -131,8 +131,8 @@ GetNextThunkProtocol (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
Reference in New Issue
Block a user