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:
jljusten 2011-06-28 16:50:26 +00:00
parent bb89ec1a7e
commit d18d8a1d0e
161 changed files with 2566 additions and 2566 deletions

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 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 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.
**/ **/
@ -38,7 +38,7 @@ Routine Description:
Arguments: Arguments:
FfsHeader - General purpose data available to every PEIM FfsHeader - General purpose data available to every PEIM
PeiServices - General purpose services available to every PEIM. PeiServices - General purpose services available to every PEIM.
Returns: Returns:
None None
@ -89,7 +89,7 @@ Returns:
Attributes |= EFI_RESOURCE_ATTRIBUTE_TESTED; Attributes |= EFI_RESOURCE_ATTRIBUTE_TESTED;
} }
BuildResourceDescriptorHob ( BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY, EFI_RESOURCE_SYSTEM_MEMORY,
Attributes, Attributes,
@ -104,6 +104,6 @@ Returns:
// Build the CPU hob with 36-bit addressing and 16-bits of IO space. // Build the CPU hob with 36-bit addressing and 16-bits of IO space.
// //
BuildCpuHob (36, 16); BuildCpuHob (36, 16);
return Status; return Status;
} }

View File

@ -3,7 +3,7 @@
# #
# This module abstracts memory auto-scan in a Emu environment. # This module abstracts memory auto-scan in a Emu environment.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 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 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.
**/ **/
@ -65,7 +65,7 @@ Routine Description:
Arguments: Arguments:
PeiServices - General purpose services available to every PEIM. PeiServices - General purpose services available to every PEIM.
Returns: Returns:
Status - EFI_SUCCESS if the boot mode could be set Status - EFI_SUCCESS if the boot mode could be set

View File

@ -3,7 +3,7 @@
# #
# This module provides platform specific function to detect boot mode. # This module provides platform specific function to detect boot mode.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -1,6 +1,6 @@
/*++ @file /*++ @file
Emu driver to produce CPU Architectural Protocol. Emu driver to produce CPU Architectural Protocol.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2011, 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 This program and the accompanying materials
@ -172,12 +172,12 @@ EmuGetTimerValue (
if (TimerIndex != 0) { if (TimerIndex != 0) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
*TimerValue = gEmuThunk->QueryPerformanceCounter (); *TimerValue = gEmuThunk->QueryPerformanceCounter ();
if (TimerPeriod != NULL) { if (TimerPeriod != NULL) {
*TimerPeriod = mTimerPeriod; *TimerPeriod = mTimerPeriod;
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -225,7 +225,7 @@ LogSmbiosData (
{ {
EFI_STATUS Status; EFI_STATUS Status;
EFI_SMBIOS_HANDLE SmbiosHandle; EFI_SMBIOS_HANDLE SmbiosHandle;
SmbiosHandle = 0; SmbiosHandle = 0;
Status = Smbios->Add ( Status = Smbios->Add (
Smbios, Smbios,
@ -255,7 +255,7 @@ CpuUpdateSmbios (
// Locate Smbios protocol. // Locate Smbios protocol.
// //
Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **)&Smbios); Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **)&Smbios);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return; return;
} }
@ -285,7 +285,7 @@ CpuUpdateSmbios (
// //
// Make handle chosen by smbios protocol.add automatically. // Make handle chosen by smbios protocol.add automatically.
// //
SmbiosRecord->Hdr.Handle = 0; SmbiosRecord->Hdr.Handle = 0;
// //
// Processor version is the 1st string. // Processor version is the 1st string.
// //
@ -309,7 +309,7 @@ CpuUpdateSmbios (
/** /**
Callback function for idle events. Callback function for idle events.
@param Event Event whose notification function is being invoked. @param Event Event whose notification function is being invoked.
@param Context The pointer to the notification function's context, @param Context The pointer to the notification function's context,
which is implementation-dependent. which is implementation-dependent.
@ -339,18 +339,18 @@ InitializeCpu (
// //
// Retrieve the frequency of the performance counter in Hz. // Retrieve the frequency of the performance counter in Hz.
// //
Frequency = gEmuThunk->QueryPerformanceFrequency (); Frequency = gEmuThunk->QueryPerformanceFrequency ();
// //
// Convert frequency in Hz to a clock period in femtoseconds. // Convert frequency in Hz to a clock period in femtoseconds.
// //
mTimerPeriod = DivU64x64Remainder (1000000000000000ULL, Frequency, NULL); mTimerPeriod = DivU64x64Remainder (1000000000000000ULL, Frequency, NULL);
CpuUpdateSmbios (); CpuUpdateSmbios ();
CpuMpServicesInit (); CpuMpServicesInit ();
Status = gBS->CreateEventEx ( Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL, EVT_NOTIFY_SIGNAL,
TPL_NOTIFY, TPL_NOTIFY,

View File

@ -36,7 +36,7 @@
CpuDriver.h CpuDriver.h
Strings.uni Strings.uni
MpService.c MpService.c
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec

View File

@ -3,13 +3,13 @@
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2011, 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 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.
**/ **/
@ -91,7 +91,7 @@ typedef struct {
VOID *StateLock; VOID *StateLock;
VOID *ProcedureLock; VOID *ProcedureLock;
PROCESSOR_STATE State; PROCESSOR_STATE State;
EFI_EVENT CheckThisAPEvent; EFI_EVENT CheckThisAPEvent;
} PROCESSOR_DATA_BLOCK; } PROCESSOR_DATA_BLOCK;

View File

@ -1,20 +1,20 @@
/*++ @file /*++ @file
This is the code that publishes the CPU I/O Protocol. This is the code that publishes the CPU I/O Protocol.
The intent herein is to have a single I/O service that can load The intent herein is to have a single I/O service that can load
as early as possible, extend into runtime, and be layered upon by as early as possible, extend into runtime, and be layered upon by
the implementations of architectural protocols and the PCI Root the implementations of architectural protocols and the PCI Root
Bridge I/O Protocol. Bridge I/O Protocol.
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, 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 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.
**/ **/
@ -74,12 +74,12 @@ Returns:
Status Status
EFI_SUCCESS - The data was read from or written to the EFI EFI_SUCCESS - The data was read from or written to the EFI
System. System.
EFI_INVALID_PARAMETER - Width is invalid for this EFI System. EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL. EFI_INVALID_PARAMETER - Buffer is NULL.
EFI_UNSUPPORTED - The Buffer is not aligned for the given Width. EFI_UNSUPPORTED - The Buffer is not aligned for the given Width.
EFI_UNSUPPORTED - The address range specified by Address, Width, EFI_UNSUPPORTED - The address range specified by Address, Width,
and Count is not valid for this EFI System. and Count is not valid for this EFI System.
**/ **/
@ -132,7 +132,7 @@ Returns:
EFI_INVALID_PARAMETER - Width is invalid for this EFI System. EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL. EFI_INVALID_PARAMETER - Buffer is NULL.
EFI_UNSUPPORTED - The Buffer is not aligned for the given Width. EFI_UNSUPPORTED - The Buffer is not aligned for the given Width.
EFI_UNSUPPORTED - The address range specified by Address, Width, and EFI_UNSUPPORTED - The address range specified by Address, Width, and
Count is not valid for this EFI System. Count is not valid for this EFI System.
**/ **/
@ -166,7 +166,7 @@ CpuIoServiceRead (
/*++ /*++
Routine Description: Routine Description:
This is the service that implements the I/O read This is the service that implements the I/O read
Arguments: Arguments:
@ -184,7 +184,7 @@ Returns:
EFI_INVALID_PARAMETER - Width is invalid for this EFI System. EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL. EFI_INVALID_PARAMETER - Buffer is NULL.
EFI_UNSUPPORTED - The Buffer is not aligned for the given Width. EFI_UNSUPPORTED - The Buffer is not aligned for the given Width.
EFI_UNSUPPORTED - The address range specified by Address, Width, and EFI_UNSUPPORTED - The address range specified by Address, Width, and
Count is not valid for this EFI System. Count is not valid for this EFI System.
**/ **/
{ {
@ -225,7 +225,7 @@ CpuIoServiceWrite (
Routine Description: Routine Description:
This is the service that implements the I/O Write This is the service that implements the I/O Write
Arguments: Arguments:
@ -245,7 +245,7 @@ Returns:
EFI_INVALID_PARAMETER - Width is invalid for this EFI System. EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL. EFI_INVALID_PARAMETER - Buffer is NULL.
EFI_UNSUPPORTED - The Buffer is not aligned for the given Width. EFI_UNSUPPORTED - The Buffer is not aligned for the given Width.
EFI_UNSUPPORTED - The address range specified by Address, Width, and EFI_UNSUPPORTED - The address range specified by Address, Width, and
Count is not valid for this EFI System. Count is not valid for this EFI System.
**/ **/

View File

@ -15,16 +15,16 @@
The Protocol is available only during boot time. The Protocol is available only during boot time.
MP Services Protocol is hardware-independent. Most of the logic of this protocol MP Services Protocol is hardware-independent. Most of the logic of this protocol
is architecturally neutral. It abstracts the multi-processor environment and is architecturally neutral. It abstracts the multi-processor environment and
status of processors, and provides interfaces to retrieve information, maintain, status of processors, and provides interfaces to retrieve information, maintain,
and dispatch. and dispatch.
MP Services Protocol may be consumed by ACPI module. The ACPI module may use this MP Services Protocol may be consumed by ACPI module. The ACPI module may use this
protocol to retrieve data that are needed for an MP platform and report them to OS. protocol to retrieve data that are needed for an MP platform and report them to OS.
MP Services Protocol may also be used to program and configure processors, such MP Services Protocol may also be used to program and configure processors, such
as MTRR synchronization for memory space attributes setting in DXE Services. as MTRR synchronization for memory space attributes setting in DXE Services.
MP Services Protocol may be used by non-CPU DXE drivers to speed up platform boot MP Services Protocol may be used by non-CPU DXE drivers to speed up platform boot
by taking advantage of the processing capabilities of the APs, for example, using by taking advantage of the processing capabilities of the APs, for example, using
APs to help test system memory in parallel with other device initialization. APs to help test system memory in parallel with other device initialization.
Diagnostics applications may also use this protocol for multi-processor. Diagnostics applications may also use this protocol for multi-processor.
@ -45,7 +45,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
MP_SYSTEM_DATA gMPSystem; MP_SYSTEM_DATA gMPSystem;
EMU_THREAD_THUNK_PROTOCOL *gThread = NULL; EMU_THREAD_THUNK_PROTOCOL *gThread = NULL;
EFI_EVENT gReadToBootEvent; EFI_EVENT gReadToBootEvent;
BOOLEAN gReadToBoot = FALSE; BOOLEAN gReadToBoot = FALSE;
UINTN gPollInterval; UINTN gPollInterval;
@ -58,12 +58,12 @@ IsBSP (
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINTN ProcessorNumber; UINTN ProcessorNumber;
Status = CpuMpServicesWhoAmI (&mMpSercicesTemplate, &ProcessorNumber); Status = CpuMpServicesWhoAmI (&mMpSercicesTemplate, &ProcessorNumber);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return FALSE; return FALSE;
} }
return (gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0; return (gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0;
} }
@ -121,17 +121,17 @@ GetNextBlockedNumber (
This function is used to retrieve the following information: This function is used to retrieve the following information:
- The number of logical processors that are present in the system. - The number of logical processors that are present in the system.
- The number of enabled logical processors in the system at the instant - The number of enabled logical processors in the system at the instant
this call is made. this call is made.
Because MP Service Protocol provides services to enable and disable processors Because MP Service Protocol provides services to enable and disable processors
dynamically, the number of enabled logical processors may vary during the dynamically, the number of enabled logical processors may vary during the
course of a boot session. course of a boot session.
If this service is called from an AP, then EFI_DEVICE_ERROR is returned. If this service is called from an AP, then EFI_DEVICE_ERROR is returned.
If NumberOfProcessors or NumberOfEnabledProcessors is NULL, then If NumberOfProcessors or NumberOfEnabledProcessors is NULL, then
EFI_INVALID_PARAMETER is returned. Otherwise, the total number of processors EFI_INVALID_PARAMETER is returned. Otherwise, the total number of processors
is returned in NumberOfProcessors, the number of currently enabled processor is returned in NumberOfProcessors, the number of currently enabled processor
is returned in NumberOfEnabledProcessors, and EFI_SUCCESS is returned. is returned in NumberOfEnabledProcessors, and EFI_SUCCESS is returned.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
@ -143,7 +143,7 @@ GetNextBlockedNumber (
processors that exist in system, including processors that exist in system, including
the BSP. the BSP.
@retval EFI_SUCCESS The number of logical processors and enabled @retval EFI_SUCCESS The number of logical processors and enabled
logical processors was retrieved. logical processors was retrieved.
@retval EFI_DEVICE_ERROR The calling processor is an AP. @retval EFI_DEVICE_ERROR The calling processor is an AP.
@retval EFI_INVALID_PARAMETER NumberOfProcessors is NULL. @retval EFI_INVALID_PARAMETER NumberOfProcessors is NULL.
@ -161,11 +161,11 @@ CpuMpServicesGetNumberOfProcessors (
if ((NumberOfProcessors == NULL) || (NumberOfEnabledProcessors == NULL)) { if ((NumberOfProcessors == NULL) || (NumberOfEnabledProcessors == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (!IsBSP ()) { if (!IsBSP ()) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
*NumberOfProcessors = gMPSystem.NumberOfProcessors; *NumberOfProcessors = gMPSystem.NumberOfProcessors;
*NumberOfEnabledProcessors = gMPSystem.NumberOfEnabledProcessors; *NumberOfEnabledProcessors = gMPSystem.NumberOfEnabledProcessors;
return EFI_SUCCESS; return EFI_SUCCESS;
@ -177,13 +177,13 @@ CpuMpServicesGetNumberOfProcessors (
Gets detailed MP-related information on the requested processor at the Gets detailed MP-related information on the requested processor at the
instant this call is made. This service may only be called from the BSP. instant this call is made. This service may only be called from the BSP.
This service retrieves detailed MP-related information about any processor This service retrieves detailed MP-related information about any processor
on the platform. Note the following: on the platform. Note the following:
- The processor information may change during the course of a boot session. - The processor information may change during the course of a boot session.
- The information presented here is entirely MP related. - The information presented here is entirely MP related.
Information regarding the number of caches and their sizes, frequency of operation, Information regarding the number of caches and their sizes, frequency of operation,
slot numbers is all considered platform-related information and is not provided slot numbers is all considered platform-related information and is not provided
by this service. by this service.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
@ -210,152 +210,152 @@ CpuMpServicesGetProcessorInfo (
if (ProcessorInfoBuffer == NULL) { if (ProcessorInfoBuffer == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (!IsBSP ()) { if (!IsBSP ()) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) { if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
CopyMem (ProcessorInfoBuffer, &gMPSystem.ProcessorData[ProcessorNumber], sizeof (EFI_PROCESSOR_INFORMATION)); CopyMem (ProcessorInfoBuffer, &gMPSystem.ProcessorData[ProcessorNumber], sizeof (EFI_PROCESSOR_INFORMATION));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
This service executes a caller provided function on all enabled APs. APs can This service executes a caller provided function on all enabled APs. APs can
run either simultaneously or one at a time in sequence. This service supports run either simultaneously or one at a time in sequence. This service supports
both blocking and non-blocking requests. The non-blocking requests use EFI both blocking and non-blocking requests. The non-blocking requests use EFI
events so the BSP can detect when the APs have finished. This service may only events so the BSP can detect when the APs have finished. This service may only
be called from the BSP. be called from the BSP.
This function is used to dispatch all the enabled APs to the function specified This function is used to dispatch all the enabled APs to the function specified
by Procedure. If any enabled AP is busy, then EFI_NOT_READY is returned by Procedure. If any enabled AP is busy, then EFI_NOT_READY is returned
immediately and Procedure is not started on any AP. immediately and Procedure is not started on any AP.
If SingleThread is TRUE, all the enabled APs execute the function specified by If SingleThread is TRUE, all the enabled APs execute the function specified by
Procedure one by one, in ascending order of processor handle number. Otherwise, Procedure one by one, in ascending order of processor handle number. Otherwise,
all the enabled APs execute the function specified by Procedure simultaneously. all the enabled APs execute the function specified by Procedure simultaneously.
If WaitEvent is NULL, execution is in blocking mode. The BSP waits until all If WaitEvent is NULL, execution is in blocking mode. The BSP waits until all
APs finish or TimeoutInMicroseconds expires. Otherwise, execution is in non-blocking APs finish or TimeoutInMicroseconds expires. Otherwise, execution is in non-blocking
mode, and the BSP returns from this service without waiting for APs. If a mode, and the BSP returns from this service without waiting for APs. If a
non-blocking mode is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT non-blocking mode is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT
is signaled, then EFI_UNSUPPORTED must be returned. is signaled, then EFI_UNSUPPORTED must be returned.
If the timeout specified by TimeoutInMicroseconds expires before all APs return If the timeout specified by TimeoutInMicroseconds expires before all APs return
from Procedure, then Procedure on the failed APs is terminated. All enabled APs from Procedure, then Procedure on the failed APs is terminated. All enabled APs
are always available for further calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() are always available for further calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
and EFI_MP_SERVICES_PROTOCOL.StartupThisAP(). If FailedCpuList is not NULL, its and EFI_MP_SERVICES_PROTOCOL.StartupThisAP(). If FailedCpuList is not NULL, its
content points to the list of processor handle numbers in which Procedure was content points to the list of processor handle numbers in which Procedure was
terminated. terminated.
Note: It is the responsibility of the consumer of the EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() Note: It is the responsibility of the consumer of the EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
to make sure that the nature of the code that is executed on the BSP and the to make sure that the nature of the code that is executed on the BSP and the
dispatched APs is well controlled. The MP Services Protocol does not guarantee dispatched APs is well controlled. The MP Services Protocol does not guarantee
that the Procedure function is MP-safe. Hence, the tasks that can be run in that the Procedure function is MP-safe. Hence, the tasks that can be run in
parallel are limited to certain independent tasks and well-controlled exclusive parallel are limited to certain independent tasks and well-controlled exclusive
code. EFI services and protocols may not be called by APs unless otherwise code. EFI services and protocols may not be called by APs unless otherwise
specified. specified.
In blocking execution mode, BSP waits until all APs finish or In blocking execution mode, BSP waits until all APs finish or
TimeoutInMicroseconds expires. TimeoutInMicroseconds expires.
In non-blocking execution mode, BSP is freed to return to the caller and then In non-blocking execution mode, BSP is freed to return to the caller and then
proceed to the next task without having to wait for APs. The following proceed to the next task without having to wait for APs. The following
sequence needs to occur in a non-blocking execution mode: sequence needs to occur in a non-blocking execution mode:
-# The caller that intends to use this MP Services Protocol in non-blocking -# The caller that intends to use this MP Services Protocol in non-blocking
mode creates WaitEvent by calling the EFI CreateEvent() service. The caller mode creates WaitEvent by calling the EFI CreateEvent() service. The caller
invokes EFI_MP_SERVICES_PROTOCOL.StartupAllAPs(). If the parameter WaitEvent invokes EFI_MP_SERVICES_PROTOCOL.StartupAllAPs(). If the parameter WaitEvent
is not NULL, then StartupAllAPs() executes in non-blocking mode. It requests is not NULL, then StartupAllAPs() executes in non-blocking mode. It requests
the function specified by Procedure to be started on all the enabled APs, the function specified by Procedure to be started on all the enabled APs,
and releases the BSP to continue with other tasks. and releases the BSP to continue with other tasks.
-# The caller can use the CheckEvent() and WaitForEvent() services to check -# The caller can use the CheckEvent() and WaitForEvent() services to check
the state of the WaitEvent created in step 1. the state of the WaitEvent created in step 1.
-# When the APs complete their task or TimeoutInMicroSecondss expires, the MP -# When the APs complete their task or TimeoutInMicroSecondss expires, the MP
Service signals WaitEvent by calling the EFI SignalEvent() function. If Service signals WaitEvent by calling the EFI SignalEvent() function. If
FailedCpuList is not NULL, its content is available when WaitEvent is FailedCpuList is not NULL, its content is available when WaitEvent is
signaled. If all APs returned from Procedure prior to the timeout, then signaled. If all APs returned from Procedure prior to the timeout, then
FailedCpuList is set to NULL. If not all APs return from Procedure before FailedCpuList is set to NULL. If not all APs return from Procedure before
the timeout, then FailedCpuList is filled in with the list of the failed the timeout, then FailedCpuList is filled in with the list of the failed
APs. The buffer is allocated by MP Service Protocol using AllocatePool(). APs. The buffer is allocated by MP Service Protocol using AllocatePool().
It is the caller's responsibility to free the buffer with FreePool() service. It is the caller's responsibility to free the buffer with FreePool() service.
-# This invocation of SignalEvent() function informs the caller that invoked -# This invocation of SignalEvent() function informs the caller that invoked
EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() that either all the APs completed EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() that either all the APs completed
the specified task or a timeout occurred. The contents of FailedCpuList the specified task or a timeout occurred. The contents of FailedCpuList
can be examined to determine which APs did not complete the specified task can be examined to determine which APs did not complete the specified task
prior to the timeout. prior to the timeout.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
instance. instance.
@param[in] Procedure A pointer to the function to be run on @param[in] Procedure A pointer to the function to be run on
enabled APs of the system. See type enabled APs of the system. See type
EFI_AP_PROCEDURE. EFI_AP_PROCEDURE.
@param[in] SingleThread If TRUE, then all the enabled APs execute @param[in] SingleThread If TRUE, then all the enabled APs execute
the function specified by Procedure one by the function specified by Procedure one by
one, in ascending order of processor handle one, in ascending order of processor handle
number. If FALSE, then all the enabled APs number. If FALSE, then all the enabled APs
execute the function specified by Procedure execute the function specified by Procedure
simultaneously. simultaneously.
@param[in] WaitEvent The event created by the caller with CreateEvent() @param[in] WaitEvent The event created by the caller with CreateEvent()
service. If it is NULL, then execute in service. If it is NULL, then execute in
blocking mode. BSP waits until all APs finish blocking mode. BSP waits until all APs finish
or TimeoutInMicroseconds expires. If it's or TimeoutInMicroseconds expires. If it's
not NULL, then execute in non-blocking mode. not NULL, then execute in non-blocking mode.
BSP requests the function specified by BSP requests the function specified by
Procedure to be started on all the enabled Procedure to be started on all the enabled
APs, and go on executing immediately. If APs, and go on executing immediately. If
all return from Procedure, or TimeoutInMicroseconds all return from Procedure, or TimeoutInMicroseconds
expires, this event is signaled. The BSP expires, this event is signaled. The BSP
can use the CheckEvent() or WaitForEvent() can use the CheckEvent() or WaitForEvent()
services to check the state of event. Type services to check the state of event. Type
EFI_EVENT is defined in CreateEvent() in EFI_EVENT is defined in CreateEvent() in
the Unified Extensible Firmware Interface the Unified Extensible Firmware Interface
Specification. Specification.
@param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for @param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for
APs to return from Procedure, either for APs to return from Procedure, either for
blocking or non-blocking mode. Zero means blocking or non-blocking mode. Zero means
infinity. If the timeout expires before infinity. If the timeout expires before
all APs return from Procedure, then Procedure all APs return from Procedure, then Procedure
on the failed APs is terminated. All enabled on the failed APs is terminated. All enabled
APs are available for next function assigned APs are available for next function assigned
by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
or EFI_MP_SERVICES_PROTOCOL.StartupThisAP(). or EFI_MP_SERVICES_PROTOCOL.StartupThisAP().
If the timeout expires in blocking mode, If the timeout expires in blocking mode,
BSP returns EFI_TIMEOUT. If the timeout BSP returns EFI_TIMEOUT. If the timeout
expires in non-blocking mode, WaitEvent expires in non-blocking mode, WaitEvent
is signaled with SignalEvent(). is signaled with SignalEvent().
@param[in] ProcedureArgument The parameter passed into Procedure for @param[in] ProcedureArgument The parameter passed into Procedure for
all APs. all APs.
@param[out] FailedCpuList If NULL, this parameter is ignored. Otherwise, @param[out] FailedCpuList If NULL, this parameter is ignored. Otherwise,
if all APs finish successfully, then its if all APs finish successfully, then its
content is set to NULL. If not all APs content is set to NULL. If not all APs
finish before timeout expires, then its finish before timeout expires, then its
content is set to address of the buffer content is set to address of the buffer
holding handle numbers of the failed APs. holding handle numbers of the failed APs.
The buffer is allocated by MP Service Protocol, The buffer is allocated by MP Service Protocol,
and it's the caller's responsibility to and it's the caller's responsibility to
free the buffer with FreePool() service. free the buffer with FreePool() service.
In blocking mode, it is ready for consumption In blocking mode, it is ready for consumption
when the call returns. In non-blocking mode, when the call returns. In non-blocking mode,
it is ready when WaitEvent is signaled. The it is ready when WaitEvent is signaled. The
list of failed CPU is terminated by list of failed CPU is terminated by
END_OF_CPU_LIST. END_OF_CPU_LIST.
@retval EFI_SUCCESS In blocking mode, all APs have finished before @retval EFI_SUCCESS In blocking mode, all APs have finished before
the timeout expired. the timeout expired.
@retval EFI_SUCCESS In non-blocking mode, function has been dispatched @retval EFI_SUCCESS In non-blocking mode, function has been dispatched
to all enabled APs. to all enabled APs.
@retval EFI_UNSUPPORTED A non-blocking mode request was made after the @retval EFI_UNSUPPORTED A non-blocking mode request was made after the
UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was
signaled. signaled.
@retval EFI_DEVICE_ERROR Caller processor is AP. @retval EFI_DEVICE_ERROR Caller processor is AP.
@retval EFI_NOT_STARTED No enabled APs exist in the system. @retval EFI_NOT_STARTED No enabled APs exist in the system.
@retval EFI_NOT_READY Any enabled APs are busy. @retval EFI_NOT_READY Any enabled APs are busy.
@retval EFI_TIMEOUT In blocking mode, the timeout expired before @retval EFI_TIMEOUT In blocking mode, the timeout expired before
all enabled APs have finished. all enabled APs have finished.
@retval EFI_INVALID_PARAMETER Procedure is NULL. @retval EFI_INVALID_PARAMETER Procedure is NULL.
@ -385,7 +385,7 @@ CpuMpServicesStartupAllAps (
if (!IsBSP ()) { if (!IsBSP ()) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
if (gMPSystem.NumberOfProcessors == 1) { if (gMPSystem.NumberOfProcessors == 1) {
return EFI_NOT_STARTED; return EFI_NOT_STARTED;
} }
@ -393,12 +393,12 @@ CpuMpServicesStartupAllAps (
if (Procedure == NULL) { if (Procedure == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if ((WaitEvent != NULL) && gReadToBoot) { if ((WaitEvent != NULL) && gReadToBoot) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
if (FailedCpuList != NULL) { if (FailedCpuList != NULL) {
gMPSystem.FailedList = AllocatePool ((gMPSystem.NumberOfProcessors + 1) * sizeof (UINTN)); gMPSystem.FailedList = AllocatePool ((gMPSystem.NumberOfProcessors + 1) * sizeof (UINTN));
if (gMPSystem.FailedList == NULL) { if (gMPSystem.FailedList == NULL) {
@ -453,10 +453,10 @@ CpuMpServicesStartupAllAps (
return EFI_NOT_READY; return EFI_NOT_READY;
} }
} }
if (WaitEvent != NULL) { if (WaitEvent != NULL) {
for (Number = 0; Number < gMPSystem.NumberOfProcessors; Number++) { for (Number = 0; Number < gMPSystem.NumberOfProcessors; Number++) {
ProcessorData = &gMPSystem.ProcessorData[Number]; ProcessorData = &gMPSystem.ProcessorData[Number];
if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) { if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
// Skip BSP // Skip BSP
continue; continue;
@ -466,7 +466,7 @@ CpuMpServicesStartupAllAps (
// Skip Disabled processors // Skip Disabled processors
continue; continue;
} }
SetApProcedure (ProcessorData, Procedure, ProcedureArgument); SetApProcedure (ProcessorData, Procedure, ProcedureArgument);
} }
@ -489,7 +489,7 @@ CpuMpServicesStartupAllAps (
while (TRUE) { while (TRUE) {
for (Number = 0; Number < gMPSystem.NumberOfProcessors; Number++) { for (Number = 0; Number < gMPSystem.NumberOfProcessors; Number++) {
ProcessorData = &gMPSystem.ProcessorData[Number]; ProcessorData = &gMPSystem.ProcessorData[Number];
if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) { if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
// Skip BSP // Skip BSP
continue; continue;
@ -553,86 +553,86 @@ Done:
/** /**
This service lets the caller get one enabled AP to execute a caller-provided This service lets the caller get one enabled AP to execute a caller-provided
function. The caller can request the BSP to either wait for the completion function. The caller can request the BSP to either wait for the completion
of the AP or just proceed with the next task by using the EFI event mechanism. of the AP or just proceed with the next task by using the EFI event mechanism.
See EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() for more details on non-blocking See EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() for more details on non-blocking
execution support. This service may only be called from the BSP. execution support. This service may only be called from the BSP.
This function is used to dispatch one enabled AP to the function specified by This function is used to dispatch one enabled AP to the function specified by
Procedure passing in the argument specified by ProcedureArgument. If WaitEvent Procedure passing in the argument specified by ProcedureArgument. If WaitEvent
is NULL, execution is in blocking mode. The BSP waits until the AP finishes or is NULL, execution is in blocking mode. The BSP waits until the AP finishes or
TimeoutInMicroSecondss expires. Otherwise, execution is in non-blocking mode. TimeoutInMicroSecondss expires. Otherwise, execution is in non-blocking mode.
BSP proceeds to the next task without waiting for the AP. If a non-blocking mode BSP proceeds to the next task without waiting for the AP. If a non-blocking mode
is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled, is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled,
then EFI_UNSUPPORTED must be returned. then EFI_UNSUPPORTED must be returned.
If the timeout specified by TimeoutInMicroseconds expires before the AP returns If the timeout specified by TimeoutInMicroseconds expires before the AP returns
from Procedure, then execution of Procedure by the AP is terminated. The AP is from Procedure, then execution of Procedure by the AP is terminated. The AP is
available for subsequent calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() and available for subsequent calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() and
EFI_MP_SERVICES_PROTOCOL.StartupThisAP(). EFI_MP_SERVICES_PROTOCOL.StartupThisAP().
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
instance. instance.
@param[in] Procedure A pointer to the function to be run on @param[in] Procedure A pointer to the function to be run on
enabled APs of the system. See type enabled APs of the system. See type
EFI_AP_PROCEDURE. EFI_AP_PROCEDURE.
@param[in] ProcessorNumber The handle number of the AP. The range is @param[in] ProcessorNumber The handle number of the AP. The range is
from 0 to the total number of logical from 0 to the total number of logical
processors minus 1. The total number of processors minus 1. The total number of
logical processors can be retrieved by logical processors can be retrieved by
EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().
@param[in] WaitEvent The event created by the caller with CreateEvent() @param[in] WaitEvent The event created by the caller with CreateEvent()
service. If it is NULL, then execute in service. If it is NULL, then execute in
blocking mode. BSP waits until all APs finish blocking mode. BSP waits until all APs finish
or TimeoutInMicroseconds expires. If it's or TimeoutInMicroseconds expires. If it's
not NULL, then execute in non-blocking mode. not NULL, then execute in non-blocking mode.
BSP requests the function specified by BSP requests the function specified by
Procedure to be started on all the enabled Procedure to be started on all the enabled
APs, and go on executing immediately. If APs, and go on executing immediately. If
all return from Procedure or TimeoutInMicroseconds all return from Procedure or TimeoutInMicroseconds
expires, this event is signaled. The BSP expires, this event is signaled. The BSP
can use the CheckEvent() or WaitForEvent() can use the CheckEvent() or WaitForEvent()
services to check the state of event. Type services to check the state of event. Type
EFI_EVENT is defined in CreateEvent() in EFI_EVENT is defined in CreateEvent() in
the Unified Extensible Firmware Interface the Unified Extensible Firmware Interface
Specification. Specification.
@param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for @param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for
APs to return from Procedure, either for APs to return from Procedure, either for
blocking or non-blocking mode. Zero means blocking or non-blocking mode. Zero means
infinity. If the timeout expires before infinity. If the timeout expires before
all APs return from Procedure, then Procedure all APs return from Procedure, then Procedure
on the failed APs is terminated. All enabled on the failed APs is terminated. All enabled
APs are available for next function assigned APs are available for next function assigned
by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
or EFI_MP_SERVICES_PROTOCOL.StartupThisAP(). or EFI_MP_SERVICES_PROTOCOL.StartupThisAP().
If the timeout expires in blocking mode, If the timeout expires in blocking mode,
BSP returns EFI_TIMEOUT. If the timeout BSP returns EFI_TIMEOUT. If the timeout
expires in non-blocking mode, WaitEvent expires in non-blocking mode, WaitEvent
is signaled with SignalEvent(). is signaled with SignalEvent().
@param[in] ProcedureArgument The parameter passed into Procedure for @param[in] ProcedureArgument The parameter passed into Procedure for
all APs. all APs.
@param[out] Finished If NULL, this parameter is ignored. In @param[out] Finished If NULL, this parameter is ignored. In
blocking mode, this parameter is ignored. blocking mode, this parameter is ignored.
In non-blocking mode, if AP returns from In non-blocking mode, if AP returns from
Procedure before the timeout expires, its Procedure before the timeout expires, its
content is set to TRUE. Otherwise, the content is set to TRUE. Otherwise, the
value is set to FALSE. The caller can value is set to FALSE. The caller can
determine if the AP returned from Procedure determine if the AP returned from Procedure
by evaluating this value. by evaluating this value.
@retval EFI_SUCCESS In blocking mode, specified AP finished before @retval EFI_SUCCESS In blocking mode, specified AP finished before
the timeout expires. the timeout expires.
@retval EFI_SUCCESS In non-blocking mode, the function has been @retval EFI_SUCCESS In non-blocking mode, the function has been
dispatched to specified AP. dispatched to specified AP.
@retval EFI_UNSUPPORTED A non-blocking mode request was made after the @retval EFI_UNSUPPORTED A non-blocking mode request was made after the
UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was
signaled. signaled.
@retval EFI_DEVICE_ERROR The calling processor is an AP. @retval EFI_DEVICE_ERROR The calling processor is an AP.
@retval EFI_TIMEOUT In blocking mode, the timeout expired before @retval EFI_TIMEOUT In blocking mode, the timeout expired before
the specified AP has finished. the specified AP has finished.
@retval EFI_NOT_READY The specified AP is busy. @retval EFI_NOT_READY The specified AP is busy.
@retval EFI_NOT_FOUND The processor with the handle specified by @retval EFI_NOT_FOUND The processor with the handle specified by
ProcessorNumber does not exist. ProcessorNumber does not exist.
@retval EFI_INVALID_PARAMETER ProcessorNumber specifies the BSP or disabled AP. @retval EFI_INVALID_PARAMETER ProcessorNumber specifies the BSP or disabled AP.
@retval EFI_INVALID_PARAMETER Procedure is NULL. @retval EFI_INVALID_PARAMETER Procedure is NULL.
@ -652,19 +652,19 @@ CpuMpServicesStartupThisAP (
{ {
EFI_STATUS Status; EFI_STATUS Status;
INTN Timeout; INTN Timeout;
if (!IsBSP ()) { if (!IsBSP ()) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
if (Procedure == NULL) { if (Procedure == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) { if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) { if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -720,36 +720,36 @@ CpuMpServicesStartupThisAP (
/** /**
This service switches the requested AP to be the BSP from that point onward. This service switches the requested AP to be the BSP from that point onward.
This service changes the BSP for all purposes. This call can only be performed This service changes the BSP for all purposes. This call can only be performed
by the current BSP. by the current BSP.
This service switches the requested AP to be the BSP from that point onward. This service switches the requested AP to be the BSP from that point onward.
This service changes the BSP for all purposes. The new BSP can take over the This service changes the BSP for all purposes. The new BSP can take over the
execution of the old BSP and continue seamlessly from where the old one left execution of the old BSP and continue seamlessly from where the old one left
off. This service may not be supported after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT off. This service may not be supported after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT
is signaled. is signaled.
If the BSP cannot be switched prior to the return from this service, then If the BSP cannot be switched prior to the return from this service, then
EFI_UNSUPPORTED must be returned. EFI_UNSUPPORTED must be returned.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL instance. @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL instance.
@param[in] ProcessorNumber The handle number of AP that is to become the new @param[in] ProcessorNumber The handle number of AP that is to become the new
BSP. The range is from 0 to the total number of BSP. The range is from 0 to the total number of
logical processors minus 1. The total number of logical processors minus 1. The total number of
logical processors can be retrieved by logical processors can be retrieved by
EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().
@param[in] EnableOldBSP If TRUE, then the old BSP will be listed as an @param[in] EnableOldBSP If TRUE, then the old BSP will be listed as an
enabled AP. Otherwise, it will be disabled. enabled AP. Otherwise, it will be disabled.
@retval EFI_SUCCESS BSP successfully switched. @retval EFI_SUCCESS BSP successfully switched.
@retval EFI_UNSUPPORTED Switching the BSP cannot be completed prior to @retval EFI_UNSUPPORTED Switching the BSP cannot be completed prior to
this service returning. this service returning.
@retval EFI_UNSUPPORTED Switching the BSP is not supported. @retval EFI_UNSUPPORTED Switching the BSP is not supported.
@retval EFI_SUCCESS The calling processor is an AP. @retval EFI_SUCCESS The calling processor is an AP.
@retval EFI_NOT_FOUND The processor with the handle specified by @retval EFI_NOT_FOUND The processor with the handle specified by
ProcessorNumber does not exist. ProcessorNumber does not exist.
@retval EFI_INVALID_PARAMETER ProcessorNumber specifies the current BSP or @retval EFI_INVALID_PARAMETER ProcessorNumber specifies the current BSP or
a disabled AP. a disabled AP.
@retval EFI_NOT_READY The specified AP is busy. @retval EFI_NOT_READY The specified AP is busy.
@ -763,15 +763,15 @@ CpuMpServicesSwitchBSP (
) )
{ {
UINTN Index; UINTN Index;
if (!IsBSP ()) { if (!IsBSP ()) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) { if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0) { if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -779,18 +779,18 @@ CpuMpServicesSwitchBSP (
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) { if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) { for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) {
if ((gMPSystem.ProcessorData[Index].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) { if ((gMPSystem.ProcessorData[Index].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
break; break;
} }
} }
ASSERT (Index != gMPSystem.NumberOfProcessors); ASSERT (Index != gMPSystem.NumberOfProcessors);
if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) { if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) {
return EFI_NOT_READY; return EFI_NOT_READY;
} }
// Skip for now as we need switch a bunch of stack stuff around and it's complex // Skip for now as we need switch a bunch of stack stuff around and it's complex
// May not be worth it? // May not be worth it?
return EFI_NOT_READY; return EFI_NOT_READY;
@ -798,38 +798,38 @@ CpuMpServicesSwitchBSP (
/** /**
This service lets the caller enable or disable an AP from this point onward. This service lets the caller enable or disable an AP from this point onward.
This service may only be called from the BSP. This service may only be called from the BSP.
This service allows the caller enable or disable an AP from this point onward. This service allows the caller enable or disable an AP from this point onward.
The caller can optionally specify the health status of the AP by Health. If The caller can optionally specify the health status of the AP by Health. If
an AP is being disabled, then the state of the disabled AP is implementation an AP is being disabled, then the state of the disabled AP is implementation
dependent. If an AP is enabled, then the implementation must guarantee that a dependent. If an AP is enabled, then the implementation must guarantee that a
complete initialization sequence is performed on the AP, so the AP is in a state complete initialization sequence is performed on the AP, so the AP is in a state
that is compatible with an MP operating system. This service may not be supported that is compatible with an MP operating system. This service may not be supported
after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled. after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled.
If the enable or disable AP operation cannot be completed prior to the return If the enable or disable AP operation cannot be completed prior to the return
from this service, then EFI_UNSUPPORTED must be returned. from this service, then EFI_UNSUPPORTED must be returned.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL instance. @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL instance.
@param[in] ProcessorNumber The handle number of AP that is to become the new @param[in] ProcessorNumber The handle number of AP that is to become the new
BSP. The range is from 0 to the total number of BSP. The range is from 0 to the total number of
logical processors minus 1. The total number of logical processors minus 1. The total number of
logical processors can be retrieved by logical processors can be retrieved by
EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().
@param[in] EnableAP Specifies the new state for the processor for @param[in] EnableAP Specifies the new state for the processor for
enabled, FALSE for disabled. enabled, FALSE for disabled.
@param[in] HealthFlag If not NULL, a pointer to a value that specifies @param[in] HealthFlag If not NULL, a pointer to a value that specifies
the new health status of the AP. This flag the new health status of the AP. This flag
corresponds to StatusFlag defined in corresponds to StatusFlag defined in
EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo(). Only EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo(). Only
the PROCESSOR_HEALTH_STATUS_BIT is used. All other the PROCESSOR_HEALTH_STATUS_BIT is used. All other
bits are ignored. If it is NULL, this parameter bits are ignored. If it is NULL, this parameter
is ignored. is ignored.
@retval EFI_SUCCESS The specified AP was enabled or disabled successfully. @retval EFI_SUCCESS The specified AP was enabled or disabled successfully.
@retval EFI_UNSUPPORTED Enabling or disabling an AP cannot be completed @retval EFI_UNSUPPORTED Enabling or disabling an AP cannot be completed
prior to this service returning. prior to this service returning.
@retval EFI_UNSUPPORTED Enabling or disabling an AP is not supported. @retval EFI_UNSUPPORTED Enabling or disabling an AP is not supported.
@retval EFI_DEVICE_ERROR The calling processor is an AP. @retval EFI_DEVICE_ERROR The calling processor is an AP.
@ -850,21 +850,21 @@ CpuMpServicesEnableDisableAP (
if (!IsBSP ()) { if (!IsBSP ()) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) { if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) { if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) { if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
gThread->MutexLock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock); gThread->MutexLock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
if (EnableAP) { if (EnableAP) {
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0 ) { if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0 ) {
gMPSystem.NumberOfEnabledProcessors++; gMPSystem.NumberOfEnabledProcessors++;
@ -876,38 +876,38 @@ CpuMpServicesEnableDisableAP (
} }
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag &= ~PROCESSOR_ENABLED_BIT; gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag &= ~PROCESSOR_ENABLED_BIT;
} }
if (HealthFlag != NULL) { if (HealthFlag != NULL) {
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag &= ~PROCESSOR_HEALTH_STATUS_BIT; gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag &= ~PROCESSOR_HEALTH_STATUS_BIT;
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= (*HealthFlag & PROCESSOR_HEALTH_STATUS_BIT); gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= (*HealthFlag & PROCESSOR_HEALTH_STATUS_BIT);
} }
gThread->MutexUnlock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock); gThread->MutexUnlock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
This return the handle number for the calling processor. This service may be This return the handle number for the calling processor. This service may be
called from the BSP and APs. called from the BSP and APs.
This service returns the processor handle number for the calling processor. This service returns the processor handle number for the calling processor.
The returned value is in the range from 0 to the total number of logical The returned value is in the range from 0 to the total number of logical
processors minus 1. The total number of logical processors can be retrieved processors minus 1. The total number of logical processors can be retrieved
with EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). This service may be with EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). This service may be
called from the BSP and APs. If ProcessorNumber is NULL, then EFI_INVALID_PARAMETER called from the BSP and APs. If ProcessorNumber is NULL, then EFI_INVALID_PARAMETER
is returned. Otherwise, the current processors handle number is returned in is returned. Otherwise, the current processors handle number is returned in
ProcessorNumber, and EFI_SUCCESS is returned. ProcessorNumber, and EFI_SUCCESS is returned.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL instance. @param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL instance.
@param[in] ProcessorNumber The handle number of AP that is to become the new @param[in] ProcessorNumber The handle number of AP that is to become the new
BSP. The range is from 0 to the total number of BSP. The range is from 0 to the total number of
logical processors minus 1. The total number of logical processors minus 1. The total number of
logical processors can be retrieved by logical processors can be retrieved by
EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().
@retval EFI_SUCCESS The current processor handle number was returned @retval EFI_SUCCESS The current processor handle number was returned
in ProcessorNumber. in ProcessorNumber.
@retval EFI_INVALID_PARAMETER ProcessorNumber is NULL. @retval EFI_INVALID_PARAMETER ProcessorNumber is NULL.
@ -921,11 +921,11 @@ CpuMpServicesWhoAmI (
{ {
UINTN Index; UINTN Index;
UINT64 ProcessorId; UINT64 ProcessorId;
if (ProcessorNumber == NULL) { if (ProcessorNumber == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
ProcessorId = gThread->Self (); ProcessorId = gThread->Self ();
for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) { for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) {
if (gMPSystem.ProcessorData[Index].Info.ProcessorId == ProcessorId) { if (gMPSystem.ProcessorData[Index].Info.ProcessorId == ProcessorId) {
@ -976,7 +976,7 @@ CpuCheckAllAPsStatus (
if (gMPSystem.TimeoutActive) { if (gMPSystem.TimeoutActive) {
gMPSystem.Timeout -= gPollInterval; gMPSystem.Timeout -= gPollInterval;
} }
ProcessorData = (PROCESSOR_DATA_BLOCK *) Context; ProcessorData = (PROCESSOR_DATA_BLOCK *) Context;
for (ProcessorNumber = 0; ProcessorNumber < gMPSystem.NumberOfProcessors; ProcessorNumber++) { for (ProcessorNumber = 0; ProcessorNumber < gMPSystem.NumberOfProcessors; ProcessorNumber++) {
@ -1029,7 +1029,7 @@ CpuCheckAllAPsStatus (
break; break;
} }
} }
if (gMPSystem.TimeoutActive && gMPSystem.Timeout < 0) { if (gMPSystem.TimeoutActive && gMPSystem.Timeout < 0) {
// //
// Timeout // Timeout
@ -1045,15 +1045,15 @@ CpuCheckAllAPsStatus (
// Skip Disabled processors // Skip Disabled processors
continue; continue;
} }
// Mark the // Mark the
Status = gThread->MutexTryLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock); Status = gThread->MutexTryLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
return; return;
} }
ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State; ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State;
gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock); gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
if (ProcessorState != CPU_STATE_IDLE) { if (ProcessorState != CPU_STATE_IDLE) {
// If we are retrying make sure we don't double count // If we are retrying make sure we don't double count
for (Cpu = 0, Found = FALSE; Cpu < gMPSystem.NumberOfProcessors; Cpu++) { for (Cpu = 0, Found = FALSE; Cpu < gMPSystem.NumberOfProcessors; Cpu++) {
@ -1078,7 +1078,7 @@ CpuCheckAllAPsStatus (
if (gMPSystem.FinishCount != gMPSystem.StartCount) { if (gMPSystem.FinishCount != gMPSystem.StartCount) {
return; return;
} }
gBS->SetTimer ( gBS->SetTimer (
gMPSystem.CheckAllAPsEvent, gMPSystem.CheckAllAPsEvent,
TimerCancel, TimerCancel,
@ -1127,10 +1127,10 @@ CpuCheckThisAPStatus (
if (ProcessorState == CPU_STATE_FINISHED) { if (ProcessorState == CPU_STATE_FINISHED) {
Status = gBS->SetTimer (ProcessorData->CheckThisAPEvent, TimerCancel, 0); Status = gBS->SetTimer (ProcessorData->CheckThisAPEvent, TimerCancel, 0);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = gBS->SignalEvent (gMPSystem.WaitEvent); Status = gBS->SignalEvent (gMPSystem.WaitEvent);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
gThread->MutexLock (ProcessorData->StateLock); gThread->MutexLock (ProcessorData->StateLock);
ProcessorData->State = CPU_STATE_IDLE; ProcessorData->State = CPU_STATE_IDLE;
gThread->MutexUnlock (ProcessorData->StateLock); gThread->MutexUnlock (ProcessorData->StateLock);
@ -1158,18 +1158,18 @@ FillInProcessorInformation (
PROCESSOR_DATA_BLOCK *ProcessorData; PROCESSOR_DATA_BLOCK *ProcessorData;
ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber]; ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
gMPSystem.ProcessorData[ProcessorNumber].Info.ProcessorId = gThread->Self (); gMPSystem.ProcessorData[ProcessorNumber].Info.ProcessorId = gThread->Self ();
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag = PROCESSOR_ENABLED_BIT | PROCESSOR_HEALTH_STATUS_BIT; gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag = PROCESSOR_ENABLED_BIT | PROCESSOR_HEALTH_STATUS_BIT;
if (BSP) { if (BSP) {
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= PROCESSOR_AS_BSP_BIT; gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= PROCESSOR_AS_BSP_BIT;
} }
gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Package = ProcessorNumber; gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Package = ProcessorNumber;
gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Core = 0; gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Core = 0;
gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Thread = 0; gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Thread = 0;
gMPSystem.ProcessorData[ProcessorNumber].State = BSP ? CPU_STATE_BUSY : CPU_STATE_IDLE; gMPSystem.ProcessorData[ProcessorNumber].State = BSP ? CPU_STATE_BUSY : CPU_STATE_IDLE;
gMPSystem.ProcessorData[ProcessorNumber].Procedure = NULL; gMPSystem.ProcessorData[ProcessorNumber].Procedure = NULL;
gMPSystem.ProcessorData[ProcessorNumber].Parameter = NULL; gMPSystem.ProcessorData[ProcessorNumber].Parameter = NULL;
gMPSystem.ProcessorData[ProcessorNumber].StateLock = gThread->MutexInit (); gMPSystem.ProcessorData[ProcessorNumber].StateLock = gThread->MutexInit ();
@ -1188,12 +1188,12 @@ CpuDriverApIdolLoop (
VOID *Parameter; VOID *Parameter;
UINTN ProcessorNumber; UINTN ProcessorNumber;
PROCESSOR_DATA_BLOCK *ProcessorData; PROCESSOR_DATA_BLOCK *ProcessorData;
ProcessorNumber = (UINTN)Context; ProcessorNumber = (UINTN)Context;
ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber]; ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
ProcessorData->Info.ProcessorId = gThread->Self (); ProcessorData->Info.ProcessorId = gThread->Self ();
while (TRUE) { while (TRUE) {
// //
// Make a local copy on the stack to be extra safe // Make a local copy on the stack to be extra safe
@ -1202,28 +1202,28 @@ CpuDriverApIdolLoop (
Procedure = ProcessorData->Procedure; Procedure = ProcessorData->Procedure;
Parameter = ProcessorData->Parameter; Parameter = ProcessorData->Parameter;
gThread->MutexUnlock (ProcessorData->ProcedureLock); gThread->MutexUnlock (ProcessorData->ProcedureLock);
if (Procedure != NULL) { if (Procedure != NULL) {
gThread->MutexLock (ProcessorData->StateLock); gThread->MutexLock (ProcessorData->StateLock);
ProcessorData->State = CPU_STATE_BUSY; ProcessorData->State = CPU_STATE_BUSY;
gThread->MutexUnlock (ProcessorData->StateLock); gThread->MutexUnlock (ProcessorData->StateLock);
Procedure (Parameter); Procedure (Parameter);
gThread->MutexLock (ProcessorData->ProcedureLock); gThread->MutexLock (ProcessorData->ProcedureLock);
ProcessorData->Procedure = NULL; ProcessorData->Procedure = NULL;
gThread->MutexUnlock (ProcessorData->ProcedureLock); gThread->MutexUnlock (ProcessorData->ProcedureLock);
gThread->MutexLock (ProcessorData->StateLock); gThread->MutexLock (ProcessorData->StateLock);
ProcessorData->State = CPU_STATE_FINISHED; ProcessorData->State = CPU_STATE_FINISHED;
gThread->MutexUnlock (ProcessorData->StateLock); gThread->MutexUnlock (ProcessorData->StateLock);
} }
// Poll 5 times a seconds, 200ms // Poll 5 times a seconds, 200ms
// Don't want to burn too many system resources doing nothing. // Don't want to burn too many system resources doing nothing.
gEmuThunk->Sleep (200 * 1000); gEmuThunk->Sleep (200 * 1000);
} }
return 0; return 0;
} }
@ -1236,7 +1236,7 @@ InitializeMpSystemData (
EFI_STATUS Status; EFI_STATUS Status;
UINTN Index; UINTN Index;
// //
// Clear the data structure area first. // Clear the data structure area first.
// //
@ -1247,12 +1247,12 @@ InitializeMpSystemData (
// //
gMPSystem.NumberOfProcessors = NumberOfProcessors; gMPSystem.NumberOfProcessors = NumberOfProcessors;
gMPSystem.NumberOfEnabledProcessors = NumberOfProcessors; gMPSystem.NumberOfEnabledProcessors = NumberOfProcessors;
gMPSystem.ProcessorData = AllocateZeroPool (gMPSystem.NumberOfProcessors * sizeof (PROCESSOR_DATA_BLOCK)); gMPSystem.ProcessorData = AllocateZeroPool (gMPSystem.NumberOfProcessors * sizeof (PROCESSOR_DATA_BLOCK));
ASSERT (gMPSystem.ProcessorData != NULL); ASSERT (gMPSystem.ProcessorData != NULL);
FillInProcessorInformation (TRUE, 0); FillInProcessorInformation (TRUE, 0);
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL, EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_CALLBACK, TPL_CALLBACK,
@ -1261,24 +1261,24 @@ InitializeMpSystemData (
&gMPSystem.CheckAllAPsEvent &gMPSystem.CheckAllAPsEvent
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) { for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) {
if ((gMPSystem.ProcessorData[Index].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) { if ((gMPSystem.ProcessorData[Index].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
// Skip BSP // Skip BSP
continue; continue;
} }
FillInProcessorInformation (FALSE, Index); FillInProcessorInformation (FALSE, Index);
Status = gThread->CreateThread ( Status = gThread->CreateThread (
(VOID *)&gMPSystem.ProcessorData[Index].Info.ProcessorId, (VOID *)&gMPSystem.ProcessorData[Index].Info.ProcessorId,
NULL, NULL,
CpuDriverApIdolLoop, CpuDriverApIdolLoop,
(VOID *)Index (VOID *)Index
); );
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL, EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_CALLBACK, TPL_CALLBACK,
@ -1324,7 +1324,7 @@ CpuMpServicesInit (
UINTN MaxCpus; UINTN MaxCpus;
MaxCpus = 1; // BSP MaxCpus = 1; // BSP
IoThunk = GetIoThunkInstance (&gEmuThreadThunkProtocolGuid, 0); IoThunk = GetIoThunkInstance (&gEmuThreadThunkProtocolGuid, 0);
if (IoThunk != NULL) { if (IoThunk != NULL) {
Status = IoThunk->Open (IoThunk); Status = IoThunk->Open (IoThunk);

View File

@ -1,13 +1,13 @@
/**@file /**@file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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:

View File

@ -1,13 +1,13 @@
/**@file /**@file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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:
@ -63,46 +63,46 @@ EFI_DRIVER_CONFIGURATION_PROTOCOL gEmuBlockIoDriverConfiguration = {
/*++ /*++
Routine Description: Routine Description:
Allows the user to set controller specific options for a controller that a Allows the user to set controller specific options for a controller that a
driver is currently managing. driver is currently managing.
Arguments: Arguments:
This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance. This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
ControllerHandle - The handle of the controller to set options on. ControllerHandle - The handle of the controller to set options on.
ChildHandle - The handle of the child controller to set options on. This ChildHandle - The handle of the child controller to set options on. This
is an optional parameter that may be NULL. It will be NULL is an optional parameter that may be NULL. It will be NULL
for device drivers, and for a bus drivers that wish to set for device drivers, and for a bus drivers that wish to set
options for the bus controller. It will not be NULL for a options for the bus controller. It will not be NULL for a
bus driver that wishes to set options for one of its child bus driver that wishes to set options for one of its child
controllers. controllers.
Language - A pointer to a three character ISO 639-2 language identifier. Language - A pointer to a three character ISO 639-2 language identifier.
This is the language of the user interface that should be This is the language of the user interface that should be
presented to the user, and it must match one of the languages presented to the user, and it must match one of the languages
specified in SupportedLanguages. The number of languages specified in SupportedLanguages. The number of languages
supported by a driver is up to the driver writer. supported by a driver is up to the driver writer.
ActionRequired - A pointer to the action that the calling agent is required ActionRequired - A pointer to the action that the calling agent is required
to perform when this function returns. See "Related to perform when this function returns. See "Related
Definitions" for a list of the actions that the calling Definitions" for a list of the actions that the calling
agent is required to perform prior to accessing agent is required to perform prior to accessing
ControllerHandle again. ControllerHandle again.
Returns: Returns:
EFI_SUCCESS - The driver specified by This successfully set the EFI_SUCCESS - The driver specified by This successfully set the
configuration options for the controller specified configuration options for the controller specified
by ControllerHandle.. by ControllerHandle..
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ActionRequired is NULL. EFI_INVALID_PARAMETER - ActionRequired is NULL.
EFI_UNSUPPORTED - The driver specified by This does not support setting EFI_UNSUPPORTED - The driver specified by This does not support setting
configuration options for the controller specified by configuration options for the controller specified by
ControllerHandle and ChildHandle. ControllerHandle and ChildHandle.
EFI_UNSUPPORTED - The driver specified by This does not support the EFI_UNSUPPORTED - The driver specified by This does not support the
language specified by Language. language specified by Language.
EFI_DEVICE_ERROR - A device error occurred while attempt to set the EFI_DEVICE_ERROR - A device error occurred while attempt to set the
configuration options for the controller specified configuration options for the controller specified
by ControllerHandle and ChildHandle. by ControllerHandle and ChildHandle.
EFI_OUT_RESOURCES - There are not enough resources available to set the EFI_OUT_RESOURCES - There are not enough resources available to set the
configuration options for the controller specified configuration options for the controller specified
by ControllerHandle and ChildHandle. by ControllerHandle and ChildHandle.
--*/ --*/
@ -183,29 +183,29 @@ EmuBlockIoDriverConfigurationSetOptions (
Arguments: Arguments:
This - A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance. This - A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
ControllerHandle - The handle of the controller to test if it's current ControllerHandle - The handle of the controller to test if it's current
configuration options are valid. configuration options are valid.
ChildHandle - The handle of the child controller to test if it's current ChildHandle - The handle of the child controller to test if it's current
configuration options are valid. This is an optional configuration options are valid. This is an optional
parameter that may be NULL. It will be NULL for device parameter that may be NULL. It will be NULL for device
drivers. It will also be NULL for a bus drivers that wish drivers. It will also be NULL for a bus drivers that wish
to test the configuration options for the bus controller. to test the configuration options for the bus controller.
It will not be NULL for a bus driver that wishes to test It will not be NULL for a bus driver that wishes to test
configuration options for one of its child controllers. configuration options for one of its child controllers.
Returns: Returns:
EFI_SUCCESS - The controller specified by ControllerHandle and EFI_SUCCESS - The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver ChildHandle that is being managed by the driver
specified by This has a valid set of configuration specified by This has a valid set of configuration
options. options.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
EFI_UNSUPPORTED - The driver specified by This is not currently EFI_UNSUPPORTED - The driver specified by This is not currently
managing the controller specified by ControllerHandle managing the controller specified by ControllerHandle
and ChildHandle. and ChildHandle.
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver ChildHandle that is being managed by the driver
specified by This has an invalid set of configuration specified by This has an invalid set of configuration
options. options.
--*/ --*/

View File

@ -1,13 +1,13 @@
/**@file /**@file
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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:
@ -71,54 +71,54 @@ EmuBlockIoDriverDiagnosticsRunDiagnostics (
Arguments: Arguments:
This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance. This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
ControllerHandle - The handle of the controller to run diagnostics on. ControllerHandle - The handle of the controller to run diagnostics on.
ChildHandle - The handle of the child controller to run diagnostics on ChildHandle - The handle of the child controller to run diagnostics on
This is an optional parameter that may be NULL. It will This is an optional parameter that may be NULL. It will
be NULL for device drivers. It will also be NULL for a be NULL for device drivers. It will also be NULL for a
bus drivers that wish to run diagnostics on the bus bus drivers that wish to run diagnostics on the bus
controller. It will not be NULL for a bus driver that controller. It will not be NULL for a bus driver that
wishes to run diagnostics on one of its child controllers. wishes to run diagnostics on one of its child controllers.
DiagnosticType - Indicates type of diagnostics to perform on the controller DiagnosticType - Indicates type of diagnostics to perform on the controller
specified by ControllerHandle and ChildHandle. See specified by ControllerHandle and ChildHandle. See
"Related Definitions" for the list of supported types. "Related Definitions" for the list of supported types.
Language - A pointer to a three character ISO 639-2 language Language - A pointer to a three character ISO 639-2 language
identifier or a Null-terminated ASCII string array indicating identifier or a Null-terminated ASCII string array indicating
the language. This is the language in which the optional the language. This is the language in which the optional
error message should be returned in Buffer, and it must error message should be returned in Buffer, and it must
match one of the languages specified in SupportedLanguages. match one of the languages specified in SupportedLanguages.
The number of languages supported by a driver is up to The number of languages supported by a driver is up to
the driver writer. the driver writer.
ErrorType - A GUID that defines the format of the data returned in ErrorType - A GUID that defines the format of the data returned in
Buffer. Buffer.
BufferSize - The size, in bytes, of the data returned in Buffer. BufferSize - The size, in bytes, of the data returned in Buffer.
Buffer - A buffer that contains a Null-terminated Unicode string Buffer - A buffer that contains a Null-terminated Unicode string
plus some additional data whose format is defined by plus some additional data whose format is defined by
ErrorType. Buffer is allocated by this function with ErrorType. Buffer is allocated by this function with
AllocatePool(), and it is the caller's responsibility AllocatePool(), and it is the caller's responsibility
to free it with a call to FreePool(). to free it with a call to FreePool().
Returns: Returns:
EFI_SUCCESS - The controller specified by ControllerHandle and EFI_SUCCESS - The controller specified by ControllerHandle and
ChildHandle passed the diagnostic. ChildHandle passed the diagnostic.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
EFI_HANDLE. EFI_HANDLE.
EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ErrorType is NULL. EFI_INVALID_PARAMETER - ErrorType is NULL.
EFI_INVALID_PARAMETER - BufferType is NULL. EFI_INVALID_PARAMETER - BufferType is NULL.
EFI_INVALID_PARAMETER - Buffer is NULL. EFI_INVALID_PARAMETER - Buffer is NULL.
EFI_UNSUPPORTED - The driver specified by This does not support EFI_UNSUPPORTED - The driver specified by This does not support
running diagnostics for the controller specified running diagnostics for the controller specified
by ControllerHandle and ChildHandle. by ControllerHandle and ChildHandle.
EFI_UNSUPPORTED - The driver specified by This does not support the EFI_UNSUPPORTED - The driver specified by This does not support the
type of diagnostic specified by DiagnosticType. type of diagnostic specified by DiagnosticType.
EFI_UNSUPPORTED - The driver specified by This does not support the EFI_UNSUPPORTED - The driver specified by This does not support the
language specified by Language. language specified by Language.
EFI_OUT_OF_RESOURCES - There are not enough resources available to complete EFI_OUT_OF_RESOURCES - There are not enough resources available to complete
the diagnostics. the diagnostics.
EFI_OUT_OF_RESOURCES - There are not enough resources available to return EFI_OUT_OF_RESOURCES - There are not enough resources available to return
the status information in ErrorType, BufferSize, the status information in ErrorType, BufferSize,
and Buffer. and Buffer.
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
ChildHandle did not pass the diagnostic. ChildHandle did not pass the diagnostic.
--*/ --*/

View File

@ -1,13 +1,13 @@
/**@file /**@file
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
bbe bbe
**/ **/
@ -50,7 +50,7 @@ EmuBlockIo2Reset (
/** /**
Read BufferSize bytes from Lba into Buffer. Read BufferSize bytes from Lba into Buffer.
This function reads the requested number of blocks from the device. All the This function reads the requested number of blocks from the device. All the
blocks are read, or an error is returned. blocks are read, or an error is returned.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and
@ -58,13 +58,13 @@ EmuBlockIo2Reset (
not be signaled. not be signaled.
@param[in] This Indicates a pointer to the calling context. @param[in] This Indicates a pointer to the calling context.
@param[in] MediaId Id of the media, changes every time the media is @param[in] MediaId Id of the media, changes every time the media is
replaced. replaced.
@param[in] Lba The starting Logical Block Address to read from. @param[in] Lba The starting Logical Block Address to read from.
@param[in, out] Token A pointer to the token associated with the transaction. @param[in, out] Token A pointer to the token associated with the transaction.
@param[in] BufferSize Size of Buffer, must be a multiple of device block size. @param[in] BufferSize Size of Buffer, must be a multiple of device block size.
@param[out] Buffer A pointer to the destination buffer for the data. The @param[out] Buffer A pointer to the destination buffer for the data. The
caller is responsible for either having implicit or caller is responsible for either having implicit or
explicit ownership of the buffer. explicit ownership of the buffer.
@retval EFI_SUCCESS The read request was queued if Token->Event is @retval EFI_SUCCESS The read request was queued if Token->Event is
@ -76,7 +76,7 @@ EmuBlockIo2Reset (
@retval EFI_MEDIA_CHANGED The MediaId is not for the current media. @retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
intrinsic block size of the device. intrinsic block size of the device.
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
or the buffer is not on proper alignment. or the buffer is not on proper alignment.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources. of resources.
@ -132,14 +132,14 @@ EmuBlockIo2ReadBlocksEx (
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
@retval EFI_DEVICE_ERROR The device reported an error while performing the write. @retval EFI_DEVICE_ERROR The device reported an error while performing the write.
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
or the buffer is not on proper alignment. or the buffer is not on proper alignment.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources. of resources.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
EmuBlockIo2WriteBlocksEx ( EmuBlockIo2WriteBlocksEx (
IN EFI_BLOCK_IO2_PROTOCOL *This, IN EFI_BLOCK_IO2_PROTOCOL *This,
IN UINT32 MediaId, IN UINT32 MediaId,
@ -167,10 +167,10 @@ EmuBlockIo2WriteBlocksEx (
/** /**
Flush the Block Device. Flush the Block Device.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED
is returned and non-blocking I/O is being used, the Event associated with is returned and non-blocking I/O is being used, the Event associated with
this request will not be signaled. this request will not be signaled.
@param[in] This Indicates a pointer to the calling context. @param[in] This Indicates a pointer to the calling context.
@param[in,out] Token A pointer to the token associated with the transaction @param[in,out] Token A pointer to the token associated with the transaction
@ -258,7 +258,7 @@ EmuBlockIoReset (
@retval EFI_NO_MEDIA There is no media in the device. @retval EFI_NO_MEDIA There is no media in the device.
@retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
or the buffer is not on proper alignment. or the buffer is not on proper alignment.
**/ **/
@ -305,7 +305,7 @@ EmuBlockIoReadBlocks (
@retval EFI_NO_MEDIA There is no media in the device. @retval EFI_NO_MEDIA There is no media in the device.
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
or the buffer is not on proper alignment. or the buffer is not on proper alignment.
**/ **/
@ -370,33 +370,33 @@ EmuBlockIoFlushBlocks (
/** /**
Tests to see if this driver supports a given controller. If a child device is provided, Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device. it further tests to see if this driver supports creating a handle for the specified child device.
This function checks to see if the driver specified by This supports the device specified by This function checks to see if the driver specified by This supports the device specified by
ControllerHandle. Drivers will typically use the device path attached to ControllerHandle. Drivers will typically use the device path attached to
ControllerHandle and/or the services from the bus I/O abstraction attached to ControllerHandle and/or the services from the bus I/O abstraction attached to
ControllerHandle to determine if the driver supports ControllerHandle. This function ControllerHandle to determine if the driver supports ControllerHandle. This function
may be called many times during platform initialization. In order to reduce boot times, the tests may be called many times during platform initialization. In order to reduce boot times, the tests
performed by this function must be very small, and take as little time as possible to execute. This performed by this function must be very small, and take as little time as possible to execute. This
function must not change the state of any hardware devices, and this function must be aware that the function must not change the state of any hardware devices, and this function must be aware that the
device specified by ControllerHandle may already be managed by the same driver or a device specified by ControllerHandle may already be managed by the same driver or a
different driver. This function must match its calls to AllocatePages() with FreePages(), different driver. This function must match its calls to AllocatePages() with FreePages(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
Because ControllerHandle may have been previously started by the same driver, if a protocol is Because ControllerHandle may have been previously started by the same driver, if a protocol is
already in the opened state, then it must not be closed with CloseProtocol(). This is required already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function. to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle The handle of the controller to test. This handle @param[in] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies must support a protocol interface that supplies
an I/O abstraction to the driver. an I/O abstraction to the driver.
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus parameter is ignored by device drivers, and is optional for bus
drivers. For bus drivers, if this parameter is not NULL, then drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by this by RemainingDevicePath are both supported by this
bus driver. bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and @retval EFI_SUCCESS The device specified by ControllerHandle and
@ -462,28 +462,28 @@ EmuBlockIoDriverBindingSupported (
Starts a device controller or a bus controller. Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController(). The Start() function is designed to be invoked from the EFI boot service ConnectController().
As a result, much of the error checking on the parameters to Start() has been moved into this As a result, much of the error checking on the parameters to Start() has been moved into this
common boot service. It is legal to call Start() from other locations, common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic. but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE. 1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL. EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must 3. Prior to calling Start(), the Supported() function for the driver specified by This must
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle The handle of the controller to start. This handle @param[in] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies must support a protocol interface that supplies
an I/O abstraction to the driver. an I/O abstraction to the driver.
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus parameter is ignored by device drivers, and is optional for bus
drivers. For a bus driver, if this parameter is NULL, then handles drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver. for all the children of Controller are created by this driver.
If this parameter is not NULL and the first Device Path Node is If this parameter is not NULL and the first Device Path Node is
not the End of Device Path Node, then only the handle for the not the End of Device Path Node, then only the handle for the
child device specified by the first Device Path Node of child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver. RemainingDevicePath is created by this driver.
If the first Device Path Node of RemainingDevicePath is If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this the End of Device Path Node, no child handle is created by this
driver. driver.
@ -508,7 +508,7 @@ EmuBlockIoDriverBindingStart (
// //
// Grab the protocols we need // Grab the protocols we need
// //
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Handle, Handle,
&gEmuIoThunkProtocolGuid, &gEmuIoThunkProtocolGuid,
@ -520,7 +520,7 @@ EmuBlockIoDriverBindingStart (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
if (!CompareGuid (EmuIoThunk->Protocol, &gEmuBlockIoProtocolGuid)) { if (!CompareGuid (EmuIoThunk->Protocol, &gEmuBlockIoProtocolGuid)) {
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
goto Done; goto Done;
@ -540,7 +540,7 @@ EmuBlockIoDriverBindingStart (
Private->IoThunk = EmuIoThunk; Private->IoThunk = EmuIoThunk;
Private->Io = EmuIoThunk->Interface; Private->Io = EmuIoThunk->Interface;
Private->EfiHandle = Handle; Private->EfiHandle = Handle;
Private->BlockIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION2; Private->BlockIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION2;
Private->BlockIo.Media = &Private->Media; Private->BlockIo.Media = &Private->Media;
Private->BlockIo.Reset = EmuBlockIoReset; Private->BlockIo.Reset = EmuBlockIoReset;
@ -568,7 +568,7 @@ EmuBlockIoDriverBindingStart (
EmuIoThunk->ConfigString, EmuIoThunk->ConfigString,
TRUE TRUE
); );
AddUnicodeString2 ( AddUnicodeString2 (
"en", "en",
gEmuBlockIoComponentName2.SupportedLanguages, gEmuBlockIoComponentName2.SupportedLanguages,
@ -590,11 +590,11 @@ Done:
if (Private->ControllerNameTable != NULL) { if (Private->ControllerNameTable != NULL) {
FreeUnicodeStringTable (Private->ControllerNameTable); FreeUnicodeStringTable (Private->ControllerNameTable);
} }
gBS->FreePool (Private); gBS->FreePool (Private);
} }
gBS->CloseProtocol ( gBS->CloseProtocol (
Handle, Handle,
&gEmuIoThunkProtocolGuid, &gEmuIoThunkProtocolGuid,
@ -609,10 +609,10 @@ Done:
/** /**
Stops a device controller or a bus controller. Stops a device controller or a bus controller.
The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
As a result, much of the error checking on the parameters to Stop() has been moved As a result, much of the error checking on the parameters to Stop() has been moved
into this common boot service. It is legal to call Stop() from other locations, into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic. but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function. same driver's Start() function.
@ -620,13 +620,13 @@ Done:
EFI_HANDLE. In addition, all of these handles must have been created in this driver's EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle A handle to the device being stopped. The handle must @param[in] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver support a bus specific I/O protocol for the driver
to use to stop the device. to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0. if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped. @retval EFI_SUCCESS The device was stopped.
@ -678,7 +678,7 @@ EmuBlockIoDriverBindingStop (
Handle Handle
); );
} }
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
// //
// Free our instance data // Free our instance data
@ -709,9 +709,9 @@ EFI_DRIVER_BINDING_PROTOCOL gEmuBlockIoDriverBinding = {
/** /**
The user Entry Point for module EmuBlockIo . The user code starts with this function. The user Entry Point for module EmuBlockIo . The user code starts with this function.
@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.
@retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point. @retval other Some error occurs when executing this entry point.

View File

@ -1,13 +1,13 @@
/*++ /*++
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR> Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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:
@ -16,8 +16,8 @@ Module Name:
Abstract: Abstract:
Produce block IO abstractions for real devices on your PC using Posix APIs. Produce block IO abstractions for real devices on your PC using Posix APIs.
The configuration of what devices to mount or emulate comes from UNIX The configuration of what devices to mount or emulate comes from UNIX
environment variables. The variables must be visible to the Microsoft* environment variables. The variables must be visible to the Microsoft*
Developer Studio for them to work. Developer Studio for them to work.
* Other names and brands may be claimed as the property of others. * Other names and brands may be claimed as the property of others.

View File

@ -30,9 +30,9 @@
# #
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
# DRIVER_BINDING = gUnixBlockIoDriverBinding # DRIVER_BINDING = gUnixBlockIoDriverBinding
# COMPONENT_NAME = gUnixBlockIoComponentName # COMPONENT_NAME = gUnixBlockIoComponentName
# DRIVER_DIAG = gUnixBlockIoDriverDiagnostics # DRIVER_DIAG = gUnixBlockIoDriverDiagnostics
# #
[Sources] [Sources]

View File

@ -1,11 +1,11 @@
/** @file /** @file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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
**/ **/
#include "EmuBusDriverDxe.h" #include "EmuBusDriverDxe.h"

View File

@ -50,7 +50,7 @@ EmuBusDriverBindingSupported (
// //
if (RemainingDevicePath != NULL) { if (RemainingDevicePath != NULL) {
// //
// Check if RemainingDevicePath is the End of Device Path Node, // Check if RemainingDevicePath is the End of Device Path Node,
// if yes, go on checking other conditions // if yes, go on checking other conditions
// //
if (!IsDevicePathEnd (RemainingDevicePath)) { if (!IsDevicePathEnd (RemainingDevicePath)) {
@ -65,7 +65,7 @@ EmuBusDriverBindingSupported (
} }
} }
} }
// //
// Open the IO Abstraction(s) needed to perform the supported test // Open the IO Abstraction(s) needed to perform the supported test
// //
@ -226,8 +226,8 @@ EmuBusDriverBindingStart (
if (RemainingDevicePath != NULL) { if (RemainingDevicePath != NULL) {
CreateDevice = FALSE; CreateDevice = FALSE;
// //
// Check if RemainingDevicePath is the End of Device Path Node, // Check if RemainingDevicePath is the End of Device Path Node,
// if yes, don't create any child device // if yes, don't create any child device
// //
if (!IsDevicePathEnd (RemainingDevicePath)) { if (!IsDevicePathEnd (RemainingDevicePath)) {
// //
@ -259,7 +259,7 @@ EmuBusDriverBindingStart (
EmuDevice->ControllerHandle = ControllerHandle; EmuDevice->ControllerHandle = ControllerHandle;
EmuDevice->ParentDevicePath = ParentDevicePath; EmuDevice->ParentDevicePath = ParentDevicePath;
CopyMem (&EmuDevice->EmuIoThunk, EmuIoThunk, sizeof (EMU_IO_THUNK_PROTOCOL)); CopyMem (&EmuDevice->EmuIoThunk, EmuIoThunk, sizeof (EMU_IO_THUNK_PROTOCOL));
EmuDevice->ControllerNameTable = NULL; EmuDevice->ControllerNameTable = NULL;
StrnCpy (ComponentName, EmuIoThunk->ConfigString, sizeof (ComponentName)/sizeof (CHAR16)); StrnCpy (ComponentName, EmuIoThunk->ConfigString, sizeof (ComponentName)/sizeof (CHAR16));
@ -455,7 +455,7 @@ Arguments:
Returns: Returns:
EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL
**/ **/
EFI_DEVICE_PATH_PROTOCOL * EFI_DEVICE_PATH_PROTOCOL *
@ -493,9 +493,9 @@ EmuBusCreateDevicePath (
/** /**
The user Entry Point for module EmuBusDriver. The user code starts with this function. The user Entry Point for module EmuBusDriver. The user code starts with this function.
@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.
@retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point. @retval other Some error occurs when executing this entry point.

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, 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 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.
**/ **/

View File

@ -2,7 +2,7 @@
# Emu Bus driver # Emu Bus driver
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -28,14 +28,14 @@
# #
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
# DRIVER_BINDING = gEmuBusDriverBinding # DRIVER_BINDING = gEmuBusDriverBinding
# COMPONENT_NAME = gEmuBusDriverComponentName # COMPONENT_NAME = gEmuBusDriverComponentName
# #
[Sources] [Sources]
ComponentName.c ComponentName.c
EmuBusDriverDxe.c EmuBusDriverDxe.c
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR> Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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:

View File

@ -2,7 +2,7 @@
# GOP driver # GOP driver
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -28,8 +28,8 @@
# #
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
# DRIVER_BINDING = gEmuGopDriverBinding # DRIVER_BINDING = gEmuGopDriverBinding
# COMPONENT_NAME = gEmuGopComponentName # COMPONENT_NAME = gEmuGopComponentName
# #
[Sources] [Sources]
@ -54,7 +54,7 @@
BaseLib BaseLib
DebugLib DebugLib
KeyMapLib KeyMapLib
[Guids] [Guids]
gEfiEventExitBootServicesGuid # SOMETIMES_CONSUMED Create Event: EVENT_GROUP_GUID gEfiEventExitBootServicesGuid # SOMETIMES_CONSUMED Create Event: EVENT_GROUP_GUID

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR> Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/
@ -54,7 +54,7 @@ typedef struct _EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
EFI_EVENT Event; EFI_EVENT Event;
LIST_ENTRY NotifyEntry; LIST_ENTRY NotifyEntry;
} EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY; } EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY;
#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff #define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
typedef struct { typedef struct {
@ -103,7 +103,7 @@ typedef struct {
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx; EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx;
EFI_KEY_STATE KeyState; EFI_KEY_STATE KeyState;
LIST_ENTRY NotifyList; LIST_ENTRY NotifyList;
} GOP_PRIVATE_DATA; } GOP_PRIVATE_DATA;

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR> Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/
@ -42,47 +42,47 @@ Returns:
} }
while (!IsListEmpty (ListHead)) { while (!IsListEmpty (ListHead)) {
NotifyNode = CR ( NotifyNode = CR (
ListHead->ForwardLink, ListHead->ForwardLink,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY, EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY,
NotifyEntry, NotifyEntry,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
); );
RemoveEntryList (ListHead->ForwardLink); RemoveEntryList (ListHead->ForwardLink);
gBS->FreePool (NotifyNode); gBS->FreePool (NotifyNode);
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
Tests to see if this driver supports a given controller. If a child device is provided, Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device. it further tests to see if this driver supports creating a handle for the specified child device.
This function checks to see if the driver specified by This supports the device specified by This function checks to see if the driver specified by This supports the device specified by
ControllerHandle. Drivers will typically use the device path attached to ControllerHandle. Drivers will typically use the device path attached to
ControllerHandle and/or the services from the bus I/O abstraction attached to ControllerHandle and/or the services from the bus I/O abstraction attached to
ControllerHandle to determine if the driver supports ControllerHandle. This function ControllerHandle to determine if the driver supports ControllerHandle. This function
may be called many times during platform initialization. In order to reduce boot times, the tests may be called many times during platform initialization. In order to reduce boot times, the tests
performed by this function must be very small, and take as little time as possible to execute. This performed by this function must be very small, and take as little time as possible to execute. This
function must not change the state of any hardware devices, and this function must be aware that the function must not change the state of any hardware devices, and this function must be aware that the
device specified by ControllerHandle may already be managed by the same driver or a device specified by ControllerHandle may already be managed by the same driver or a
different driver. This function must match its calls to AllocatePages() with FreePages(), different driver. This function must match its calls to AllocatePages() with FreePages(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
Because ControllerHandle may have been previously started by the same driver, if a protocol is Because ControllerHandle may have been previously started by the same driver, if a protocol is
already in the opened state, then it must not be closed with CloseProtocol(). This is required already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function. to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle The handle of the controller to test. This handle @param[in] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies must support a protocol interface that supplies
an I/O abstraction to the driver. an I/O abstraction to the driver.
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus parameter is ignored by device drivers, and is optional for bus
drivers. For bus drivers, if this parameter is not NULL, then drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by this by RemainingDevicePath are both supported by this
bus driver. bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and @retval EFI_SUCCESS The device specified by ControllerHandle and
@ -143,28 +143,28 @@ EmuGopDriverBindingSupported (
Starts a device controller or a bus controller. Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController(). The Start() function is designed to be invoked from the EFI boot service ConnectController().
As a result, much of the error checking on the parameters to Start() has been moved into this As a result, much of the error checking on the parameters to Start() has been moved into this
common boot service. It is legal to call Start() from other locations, common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic. but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE. 1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL. EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must 3. Prior to calling Start(), the Supported() function for the driver specified by This must
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle The handle of the controller to start. This handle @param[in] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies must support a protocol interface that supplies
an I/O abstraction to the driver. an I/O abstraction to the driver.
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus parameter is ignored by device drivers, and is optional for bus
drivers. For a bus driver, if this parameter is NULL, then handles drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver. for all the children of Controller are created by this driver.
If this parameter is not NULL and the first Device Path Node is If this parameter is not NULL and the first Device Path Node is
not the End of Device Path Node, then only the handle for the not the End of Device Path Node, then only the handle for the
child device specified by the first Device Path Node of child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver. RemainingDevicePath is created by this driver.
If the first Device Path Node of RemainingDevicePath is If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this the End of Device Path Node, no child handle is created by this
driver. driver.
@ -288,10 +288,10 @@ Done:
/** /**
Stops a device controller or a bus controller. Stops a device controller or a bus controller.
The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
As a result, much of the error checking on the parameters to Stop() has been moved As a result, much of the error checking on the parameters to Stop() has been moved
into this common boot service. It is legal to call Stop() from other locations, into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic. but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function. same driver's Start() function.
@ -299,13 +299,13 @@ Done:
EFI_HANDLE. In addition, all of these handles must have been created in this driver's EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle A handle to the device being stopped. The handle must @param[in] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver support a bus specific I/O protocol for the driver
to use to stop the device. to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0. if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped. @retval EFI_SUCCESS The device was stopped.
@ -376,13 +376,13 @@ EmuGopDriverBindingStop (
// Free our instance data // Free our instance data
// //
FreeUnicodeStringTable (Private->ControllerNameTable); FreeUnicodeStringTable (Private->ControllerNameTable);
Status = gBS->CloseEvent (Private->SimpleTextIn.WaitForKey); Status = gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = gBS->CloseEvent (Private->SimpleTextInEx.WaitForKeyEx); Status = gBS->CloseEvent (Private->SimpleTextInEx.WaitForKeyEx);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
FreeNotifyList (&Private->NotifyList); FreeNotifyList (&Private->NotifyList);
gBS->FreePool (Private); gBS->FreePool (Private);
@ -394,7 +394,7 @@ EmuGopDriverBindingStop (
/// ///
/// This protocol provides the services required to determine if a driver supports a given controller. /// This protocol provides the services required to determine if a driver supports a given controller.
/// If a controller is supported, then it also provides routines to start and stop the controller. /// If a controller is supported, then it also provides routines to start and stop the controller.
/// ///
EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = { EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = {
@ -411,9 +411,9 @@ EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = {
/** /**
The user Entry Point for module EmuGop. The user code starts with this function. The user Entry Point for module EmuGop. The user code starts with this function.
@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.
@retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point. @retval other Some error occurs when executing this entry point.

View File

@ -27,36 +27,36 @@ Routine Description:
Arguments: Arguments:
RegsiteredData - A pointer to a buffer that is filled in with the keystroke RegsiteredData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was registered. state data for the key that was registered.
InputData - A pointer to a buffer that is filled in with the keystroke InputData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed. state data for the key that was pressed.
Returns: Returns:
TRUE - Key be pressed matches a registered key. TRUE - Key be pressed matches a registered key.
FLASE - Match failed. FLASE - Match failed.
**/ **/
{ {
ASSERT (RegsiteredData != NULL && InputData != NULL); ASSERT (RegsiteredData != NULL && InputData != NULL);
if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) || if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) ||
(RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) { (RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
return FALSE; return FALSE;
} }
// //
// Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored. // Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored.
// //
if (RegsiteredData->KeyState.KeyShiftState != 0 && if (RegsiteredData->KeyState.KeyShiftState != 0 &&
RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) { RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) {
return FALSE; return FALSE;
} }
if (RegsiteredData->KeyState.KeyToggleState != 0 && if (RegsiteredData->KeyState.KeyToggleState != 0 &&
RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) { RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) {
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
@ -68,26 +68,26 @@ GopPrivateMakeCallbackFunction (
IN VOID *Context, IN VOID *Context,
IN EFI_KEY_DATA *KeyData IN EFI_KEY_DATA *KeyData
) )
{ {
LIST_ENTRY *Link; LIST_ENTRY *Link;
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify; EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
GOP_PRIVATE_DATA *Private = (GOP_PRIVATE_DATA *)Context; GOP_PRIVATE_DATA *Private = (GOP_PRIVATE_DATA *)Context;
KeyMapMake (KeyData); KeyMapMake (KeyData);
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) { for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR ( CurrentNotify = CR (
Link, Link,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY, EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY,
NotifyEntry, NotifyEntry,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
); );
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
// We could be called at a high TPL so signal an event to call the registered function // We could be called at a high TPL so signal an event to call the registered function
// at a lower TPL. // at a lower TPL.
gBS->SignalEvent (CurrentNotify->Event); gBS->SignalEvent (CurrentNotify->Event);
} }
} }
} }
@ -97,7 +97,7 @@ GopPrivateBreakCallbackFunction (
IN VOID *Context, IN VOID *Context,
IN EFI_KEY_DATA *KeyData IN EFI_KEY_DATA *KeyData
) )
{ {
KeyMapBreak (KeyData); KeyMapBreak (KeyData);
} }
@ -202,7 +202,7 @@ EmuGopSimpleTextInReadKeyStroke (
/** /**
SimpleTextIn and SimpleTextInEx Notify Wait Event SimpleTextIn and SimpleTextInEx Notify Wait Event
@param Event Event whose notification function is being invoked. @param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA. @param Context Pointer to GOP_PRIVATE_DATA.
@ -268,7 +268,7 @@ EmuGopSimpleTextInWaitForKey (
@retval EFI_SUCCESS The device was reset. @retval EFI_SUCCESS The device was reset.
@retval EFI_DEVICE_ERROR The device is not functioning @retval EFI_DEVICE_ERROR The device is not functioning
correctly and could not be reset. correctly and could not be reset.
@ -296,7 +296,7 @@ EmuGopSimpleTextInExResetEx (
GOP_PRIVATE_DATA *Private; GOP_PRIVATE_DATA *Private;
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This); Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -333,17 +333,17 @@ EmuGopSimpleTextInExResetEx (
state information, and in those cases the high order bit in the state information, and in those cases the high order bit in the
respective Toggle and Shift state fields should not be active. respective Toggle and Shift state fields should not be active.
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param KeyData A pointer to a buffer that is filled in with @param KeyData A pointer to a buffer that is filled in with
the keystroke state data for the key that was the keystroke state data for the key that was
pressed. pressed.
@retval EFI_SUCCESS The keystroke information was @retval EFI_SUCCESS The keystroke information was
returned. returned.
@retval EFI_NOT_READY There was no keystroke data available. @retval EFI_NOT_READY There was no keystroke data available.
EFI_DEVICE_ERROR The keystroke EFI_DEVICE_ERROR The keystroke
information was not returned due to information was not returned due to
@ -360,20 +360,20 @@ EmuGopSimpleTextInExReadKeyStrokeEx (
/*++ /*++
Routine Description: Routine Description:
Reads the next keystroke from the input device. The WaitForKey Event can Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call. be used to test for existance of a keystroke via WaitForEvent () call.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed. state data for the key that was pressed.
Returns: Returns:
EFI_SUCCESS - The keystroke information was returned. EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable. EFI_NOT_READY - There was no keystroke data availiable.
EFI_DEVICE_ERROR - The keystroke information was not returned due to EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors. hardware errors.
EFI_INVALID_PARAMETER - KeyData is NULL. EFI_INVALID_PARAMETER - KeyData is NULL.
**/ **/
{ {
@ -411,13 +411,13 @@ EmuGopSimpleTextInExReadKeyStrokeEx (
/** /**
The SetState() function allows the input device hardware to The SetState() function allows the input device hardware to
have state settings adjusted. have state settings adjusted.
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to @param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to
set the state for the input device. set the state for the input device.
@retval EFI_SUCCESS The device state was set appropriately. @retval EFI_SUCCESS The device state was set appropriately.
@retval EFI_DEVICE_ERROR The device is not functioning @retval EFI_DEVICE_ERROR The device is not functioning
@ -460,7 +460,7 @@ EmuGopSimpleTextInExSetState (
/** /**
SimpleTextIn and SimpleTextInEx Notify Wait Event SimpleTextIn and SimpleTextInEx Notify Wait Event
@param Event Event whose notification function is being invoked. @param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA. @param Context Pointer to GOP_PRIVATE_DATA.
@ -474,7 +474,7 @@ EmuGopRegisterKeyCallback (
) )
{ {
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *ExNotify = (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *)Context; EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *ExNotify = (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *)Context;
ExNotify->KeyNotificationFn (&ExNotify->KeyData); ExNotify->KeyNotificationFn (&ExNotify->KeyData);
} }
@ -483,21 +483,21 @@ EmuGopRegisterKeyCallback (
/** /**
The RegisterKeystrokeNotify() function registers a function The RegisterKeystrokeNotify() function registers a function
which will be called when a specified keystroke will occur. which will be called when a specified keystroke will occur.
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param KeyData A pointer to a buffer that is filled in with @param KeyData A pointer to a buffer that is filled in with
the keystroke information for the key that was the keystroke information for the key that was
pressed. pressed.
@param KeyNotificationFunction Points to the function to be @param KeyNotificationFunction Points to the function to be
called when the key sequence called when the key sequence
is typed specified by KeyData. is typed specified by KeyData.
@param NotifyHandle Points to the unique handle assigned to @param NotifyHandle Points to the unique handle assigned to
the registered notification. the registered notification.
@retval EFI_SUCCESS The device state was set @retval EFI_SUCCESS The device state was set
appropriately. appropriately.
@ -531,33 +531,33 @@ EmuGopSimpleTextInExRegisterKeyNotify (
// //
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) { for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR ( CurrentNotify = CR (
Link, Link,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY, EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY,
NotifyEntry, NotifyEntry,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
); );
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) { if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle; *NotifyHandle = CurrentNotify->NotifyHandle;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
} }
} }
// //
// Allocate resource to save the notification function // Allocate resource to save the notification function
// //
NewNotify = (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) AllocateZeroPool (sizeof (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY)); NewNotify = (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) AllocateZeroPool (sizeof (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY));
if (NewNotify == NULL) { if (NewNotify == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
NewNotify->Signature = EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE; NewNotify->Signature = EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction; NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify; NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData)); CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry); InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL, EVT_NOTIFY_SIGNAL,
TPL_NOTIFY, TPL_NOTIFY,
@ -568,24 +568,24 @@ EmuGopSimpleTextInExRegisterKeyNotify (
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
*NotifyHandle = NewNotify->NotifyHandle; *NotifyHandle = NewNotify->NotifyHandle;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
The UnregisterKeystrokeNotify() function removes the The UnregisterKeystrokeNotify() function removes the
notification which was previously registered. notification which was previously registered.
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param NotificationHandle The handle of the notification @param NotificationHandle The handle of the notification
function being unregistered. function being unregistered.
@retval EFI_SUCCESS The device state was set appropriately. @retval EFI_SUCCESS The device state was set appropriately.
@retval EFI_INVALID_PARAMETER The NotificationHandle is @retval EFI_INVALID_PARAMETER The NotificationHandle is
invalid. invalid.
@ -602,14 +602,14 @@ EmuGopSimpleTextInExUnregisterKeyNotify (
Remove a registered notification function from a particular keystroke. Remove a registered notification function from a particular keystroke.
Arguments: Arguments:
This - Protocol instance pointer. This - Protocol instance pointer.
NotificationHandle - The handle of the notification function being unregistered. NotificationHandle - The handle of the notification function being unregistered.
Returns: Returns:
EFI_SUCCESS - The notification function was unregistered successfully. EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid. EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
**/ **/
{ {
GOP_PRIVATE_DATA *Private; GOP_PRIVATE_DATA *Private;
LIST_ENTRY *Link; LIST_ENTRY *Link;
@ -617,30 +617,30 @@ EmuGopSimpleTextInExUnregisterKeyNotify (
if (NotificationHandle == NULL) { if (NotificationHandle == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (((EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) { if (((EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This); Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) { for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR ( CurrentNotify = CR (
Link, Link,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY, EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY,
NotifyEntry, NotifyEntry,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
); );
if (CurrentNotify->NotifyHandle == NotificationHandle) { if (CurrentNotify->NotifyHandle == NotificationHandle) {
// //
// Remove the notification function from NotifyList and free resources // Remove the notification function from NotifyList and free resources
// //
RemoveEntryList (&CurrentNotify->NotifyEntry); RemoveEntryList (&CurrentNotify->NotifyEntry);
gBS->CloseEvent (CurrentNotify->Event); gBS->CloseEvent (CurrentNotify->Event);
gBS->FreePool (CurrentNotify); gBS->FreePool (CurrentNotify);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
} }
@ -657,7 +657,7 @@ EmuGopSimpleTextInExUnregisterKeyNotify (
Initialize SimplelTextIn and SimpleTextInEx protocols in the Private Initialize SimplelTextIn and SimpleTextInEx protocols in the Private
context structure. context structure.
@param Private Context structure to fill in. @param Private Context structure to fill in.
@return EFI_SUCCESS Initialization was a success @return EFI_SUCCESS Initialization was a success
@ -683,12 +683,12 @@ EmuGopInitializeSimpleTextInForWindow (
&Private->SimpleTextIn.WaitForKey &Private->SimpleTextIn.WaitForKey
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
// //
// Initialize Simple Text In Ex // Initialize Simple Text In Ex
// //
Private->SimpleTextInEx.Reset = EmuGopSimpleTextInExResetEx; Private->SimpleTextInEx.Reset = EmuGopSimpleTextInExResetEx;
Private->SimpleTextInEx.ReadKeyStrokeEx = EmuGopSimpleTextInExReadKeyStrokeEx; Private->SimpleTextInEx.ReadKeyStrokeEx = EmuGopSimpleTextInExReadKeyStrokeEx;
Private->SimpleTextInEx.SetState = EmuGopSimpleTextInExSetState; Private->SimpleTextInEx.SetState = EmuGopSimpleTextInExSetState;
@ -696,7 +696,7 @@ EmuGopInitializeSimpleTextInForWindow (
Private->SimpleTextInEx.UnregisterKeyNotify = EmuGopSimpleTextInExUnregisterKeyNotify; Private->SimpleTextInEx.UnregisterKeyNotify = EmuGopSimpleTextInExUnregisterKeyNotify;
Private->SimpleTextInEx.Reset (&Private->SimpleTextInEx, FALSE); Private->SimpleTextInEx.Reset (&Private->SimpleTextInEx, FALSE);
InitializeListHead (&Private->NotifyList); InitializeListHead (&Private->NotifyList);
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
@ -723,17 +723,17 @@ EmuGopInitializeSimpleTextInForWindow (
// //
/** /**
Resets the pointer device hardware. Resets the pointer device hardware.
@param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
instance. instance.
@param ExtendedVerification Indicates that the driver may perform a more exhaustive @param ExtendedVerification Indicates that the driver may perform a more exhaustive
verification operation of the device during reset. verification operation of the device during reset.
@retval EFI_SUCCESS The device was reset. @retval EFI_SUCCESS The device was reset.
@retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -770,19 +770,19 @@ EmuGopSimplePointerReset (
} }
/** /**
Retrieves the current state of a pointer device. Retrieves the current state of a pointer device.
@param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
instance. instance.
@param State A pointer to the state information on the pointer device. @param State A pointer to the state information on the pointer device.
@retval EFI_SUCCESS The state of the pointer device was returned in State. @retval EFI_SUCCESS The state of the pointer device was returned in State.
@retval EFI_NOT_READY The state of the pointer device has not changed since the last call to @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to
GetState(). GetState().
@retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's
current state. current state.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -816,7 +816,7 @@ EmuGopSimplePointerGetState (
/** /**
SimplePointer Notify Wait Event SimplePointer Notify Wait Event
@param Event Event whose notification function is being invoked. @param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA. @param Context Pointer to GOP_PRIVATE_DATA.
@ -858,11 +858,11 @@ EmuGopSimplePointerWaitForInput (
/** /**
SimplePointer constructor SimplePointer constructor
@param Private Context structure to fill in. @param Private Context structure to fill in.
@retval EFI_SUCCESS Constructor had success @retval EFI_SUCCESS Constructor had success
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -88,7 +88,7 @@ EmuGopQuerytMode (
/** /**
Set the video device into the specified mode and clears the visible portions of Set the video device into the specified mode and clears the visible portions of
the output display to black. the output display to black.
@param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
@ -137,8 +137,8 @@ EmuGopSetMode (
Private->HardwareNeedsStarting = FALSE; Private->HardwareNeedsStarting = FALSE;
} }
Status = Private->EmuGraphicsWindow->Size( Status = Private->EmuGraphicsWindow->Size(
Private->EmuGraphicsWindow, Private->EmuGraphicsWindow,
ModeData->HorizontalResolution, ModeData->HorizontalResolution,
@ -168,7 +168,7 @@ EmuGopSetMode (
/** /**
Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer. Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param BltBuffer Buffer containing data to blit into video buffer. This @param BltBuffer Buffer containing data to blit into video buffer. This
buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
@ -302,12 +302,12 @@ EmuGopStartWindow (
Status = Private->EmuIoThunk->Open (Private->EmuIoThunk); Status = Private->EmuIoThunk->Open (Private->EmuIoThunk);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Private->EmuGraphicsWindow = Private->EmuIoThunk->Interface; Private->EmuGraphicsWindow = Private->EmuIoThunk->Interface;
// Register callback to support RegisterKeyNotify() // Register callback to support RegisterKeyNotify()
Status = Private->EmuGraphicsWindow->RegisterKeyNotify ( Status = Private->EmuGraphicsWindow->RegisterKeyNotify (
Private->EmuGraphicsWindow, Private->EmuGraphicsWindow,
GopPrivateMakeCallbackFunction, GopPrivateMakeCallbackFunction,
GopPrivateBreakCallbackFunction, GopPrivateBreakCallbackFunction,
Private Private
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
@ -369,7 +369,7 @@ EmuGopDestructor (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
if (!Private->HardwareNeedsStarting) { if (!Private->HardwareNeedsStarting) {
Status = Private->EmuIoThunk->Close (Private->EmuIoThunk); Status = Private->EmuIoThunk->Close (Private->EmuIoThunk);

View File

@ -1,13 +1,13 @@
/** @file /** @file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/

View File

@ -1,7 +1,7 @@
/*++ @file /*++ @file
Produce Simple File System abstractions for directories on your PC using Posix APIs. Produce Simple File System abstractions for directories on your PC using Posix APIs.
The configuration of what devices to mount or emulate comes from UNIX The configuration of what devices to mount or emulate comes from UNIX
environment variables. The variables must be visible to the Microsoft* environment variables. The variables must be visible to the Microsoft*
Developer Studio for them to work. Developer Studio for them to work.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
@ -120,7 +120,7 @@ EmuSimpleFileSystemClose (
} }
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);
return Status; return Status;
} }
@ -129,7 +129,7 @@ EmuSimpleFileSystemClose (
Close and delete the file handle. Close and delete the file handle.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@retval EFI_SUCCESS The file was closed and deleted. @retval EFI_SUCCESS The file was closed and deleted.
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted. @retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
@ -149,7 +149,7 @@ EmuSimpleFileSystemDelete (
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->Delete (PrivateFile->Io); Status = PrivateFile->Io->Delete (PrivateFile->Io);
@ -192,14 +192,14 @@ EmuSimpleFileSystemRead (
if (This == NULL || BufferSize == NULL) { if (This == NULL || BufferSize == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if ((*BufferSize != 0) && (Buffer == NULL)) { if ((*BufferSize != 0) && (Buffer == NULL)) {
// Buffer can be NULL if *BufferSize is zero // Buffer can be NULL if *BufferSize is zero
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->Read (PrivateFile->Io, BufferSize, Buffer); Status = PrivateFile->Io->Read (PrivateFile->Io, BufferSize, Buffer);
@ -259,7 +259,7 @@ EmuSimpleFileSystemWrite (
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param Position Byte position from the start of the file. @param Position Byte position from the start of the file.
@retval EFI_SUCCESS Position was updated. @retval EFI_SUCCESS Position was updated.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open. @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
@ -280,7 +280,7 @@ EmuSimpleFileSystemGetPosition (
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->GetPosition (PrivateFile->Io, Position); Status = PrivateFile->Io->GetPosition (PrivateFile->Io, Position);
@ -296,7 +296,7 @@ EmuSimpleFileSystemGetPosition (
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param Position Byte position from the start of the file. @param Position Byte position from the start of the file.
@retval EFI_SUCCESS Position was updated. @retval EFI_SUCCESS Position was updated.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.. @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open..
@ -317,7 +317,7 @@ EmuSimpleFileSystemSetPosition (
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->SetPosition (PrivateFile->Io, Position); Status = PrivateFile->Io->SetPosition (PrivateFile->Io, Position);
@ -363,7 +363,7 @@ EmuSimpleFileSystemGetInfo (
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->GetInfo (PrivateFile->Io, InformationType, BufferSize, Buffer); Status = PrivateFile->Io->GetInfo (PrivateFile->Io, InformationType, BufferSize, Buffer);
@ -411,12 +411,12 @@ EmuSimpleFileSystemSetInfo (
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->SetInfo (PrivateFile->Io, InformationType, BufferSize, Buffer); Status = PrivateFile->Io->SetInfo (PrivateFile->Io, InformationType, BufferSize, Buffer);
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);
return Status; return Status;
} }
@ -451,7 +451,7 @@ EmuSimpleFileSystemFlush (
} }
OldTpl = gBS->RaiseTPL (TPL_CALLBACK); OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->Flush (PrivateFile->Io); Status = PrivateFile->Io->Flush (PrivateFile->Io);
@ -503,7 +503,7 @@ EmuSimpleFileSystemOpenVolume (
if (PrivateFile == NULL) { if (PrivateFile == NULL) {
goto Done; goto Done;
} }
PrivateFile->Signature = EMU_EFI_FILE_PRIVATE_SIGNATURE; PrivateFile->Signature = EMU_EFI_FILE_PRIVATE_SIGNATURE;
PrivateFile->IoThunk = Private->IoThunk; PrivateFile->IoThunk = Private->IoThunk;
PrivateFile->SimpleFileSystem = This; PrivateFile->SimpleFileSystem = This;
@ -525,7 +525,7 @@ EmuSimpleFileSystemOpenVolume (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto Done; goto Done;
} }
AddUnicodeString2 ( AddUnicodeString2 (
"eng", "eng",
gEmuSimpleFileSystemComponentName.SupportedLanguages, gEmuSimpleFileSystemComponentName.SupportedLanguages,
@ -548,7 +548,7 @@ Done:
if (PrivateFile) { if (PrivateFile) {
gBS->FreePool (PrivateFile); gBS->FreePool (PrivateFile);
} }
*Root = NULL; *Root = NULL;
} }
@ -558,33 +558,33 @@ Done:
} }
/** /**
Tests to see if this driver supports a given controller. If a child device is provided, Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device. it further tests to see if this driver supports creating a handle for the specified child device.
This function checks to see if the driver specified by This supports the device specified by This function checks to see if the driver specified by This supports the device specified by
ControllerHandle. Drivers will typically use the device path attached to ControllerHandle. Drivers will typically use the device path attached to
ControllerHandle and/or the services from the bus I/O abstraction attached to ControllerHandle and/or the services from the bus I/O abstraction attached to
ControllerHandle to determine if the driver supports ControllerHandle. This function ControllerHandle to determine if the driver supports ControllerHandle. This function
may be called many times during platform initialization. In order to reduce boot times, the tests may be called many times during platform initialization. In order to reduce boot times, the tests
performed by this function must be very small, and take as little time as possible to execute. This performed by this function must be very small, and take as little time as possible to execute. This
function must not change the state of any hardware devices, and this function must be aware that the function must not change the state of any hardware devices, and this function must be aware that the
device specified by ControllerHandle may already be managed by the same driver or a device specified by ControllerHandle may already be managed by the same driver or a
different driver. This function must match its calls to AllocatePages() with FreePages(), different driver. This function must match its calls to AllocatePages() with FreePages(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
Because ControllerHandle may have been previously started by the same driver, if a protocol is Because ControllerHandle may have been previously started by the same driver, if a protocol is
already in the opened state, then it must not be closed with CloseProtocol(). This is required already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function. to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle The handle of the controller to test. This handle @param[in] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies must support a protocol interface that supplies
an I/O abstraction to the driver. an I/O abstraction to the driver.
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus parameter is ignored by device drivers, and is optional for bus
drivers. For bus drivers, if this parameter is not NULL, then drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by this by RemainingDevicePath are both supported by this
bus driver. bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and @retval EFI_SUCCESS The device specified by ControllerHandle and
@ -652,28 +652,28 @@ EmuSimpleFileSystemDriverBindingSupported (
Starts a device controller or a bus controller. Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController(). The Start() function is designed to be invoked from the EFI boot service ConnectController().
As a result, much of the error checking on the parameters to Start() has been moved into this As a result, much of the error checking on the parameters to Start() has been moved into this
common boot service. It is legal to call Start() from other locations, common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic. but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE. 1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL. EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must 3. Prior to calling Start(), the Supported() function for the driver specified by This must
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle The handle of the controller to start. This handle @param[in] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies must support a protocol interface that supplies
an I/O abstraction to the driver. an I/O abstraction to the driver.
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
parameter is ignored by device drivers, and is optional for bus parameter is ignored by device drivers, and is optional for bus
drivers. For a bus driver, if this parameter is NULL, then handles drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver. for all the children of Controller are created by this driver.
If this parameter is not NULL and the first Device Path Node is If this parameter is not NULL and the first Device Path Node is
not the End of Device Path Node, then only the handle for the not the End of Device Path Node, then only the handle for the
child device specified by the first Device Path Node of child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver. RemainingDevicePath is created by this driver.
If the first Device Path Node of RemainingDevicePath is If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this the End of Device Path Node, no child handle is created by this
driver. driver.
@ -733,7 +733,7 @@ EmuSimpleFileSystemDriverBindingStart (
Private->Signature = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE; Private->Signature = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE;
Private->IoThunk = EmuIoThunk; Private->IoThunk = EmuIoThunk;
Private->Io = EmuIoThunk->Interface; Private->Io = EmuIoThunk->Interface;
Private->SimpleFileSystem.Revision = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION; Private->SimpleFileSystem.Revision = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION;
Private->SimpleFileSystem.OpenVolume = EmuSimpleFileSystemOpenVolume; Private->SimpleFileSystem.OpenVolume = EmuSimpleFileSystemOpenVolume;
@ -746,7 +746,7 @@ EmuSimpleFileSystemDriverBindingStart (
EmuIoThunk->ConfigString, EmuIoThunk->ConfigString,
TRUE TRUE
); );
AddUnicodeString2 ( AddUnicodeString2 (
"en", "en",
gEmuSimpleFileSystemComponentName2.SupportedLanguages, gEmuSimpleFileSystemComponentName2.SupportedLanguages,
@ -767,9 +767,9 @@ Done:
if (Private->ControllerNameTable != NULL) { if (Private->ControllerNameTable != NULL) {
FreeUnicodeStringTable (Private->ControllerNameTable); FreeUnicodeStringTable (Private->ControllerNameTable);
} }
gBS->FreePool (Private); gBS->FreePool (Private);
} }
gBS->CloseProtocol ( gBS->CloseProtocol (
@ -786,10 +786,10 @@ Done:
/** /**
Stops a device controller or a bus controller. Stops a device controller or a bus controller.
The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
As a result, much of the error checking on the parameters to Stop() has been moved As a result, much of the error checking on the parameters to Stop() has been moved
into this common boot service. It is legal to call Stop() from other locations, into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic. but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function. same driver's Start() function.
@ -797,13 +797,13 @@ Done:
EFI_HANDLE. In addition, all of these handles must have been created in this driver's EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
@param[in] ControllerHandle A handle to the device being stopped. The handle must @param[in] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver support a bus specific I/O protocol for the driver
to use to stop the device. to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0. if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped. @retval EFI_SUCCESS The device was stopped.
@ -885,9 +885,9 @@ EFI_DRIVER_BINDING_PROTOCOL gEmuSimpleFileSystemDriverBinding = {
/** /**
The user Entry Point for module EmuSimpleFileSystem. The user code starts with this function. The user Entry Point for module EmuSimpleFileSystem. The user code starts with this function.
@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.
@retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point. @retval other Some error occurs when executing this entry point.

View File

@ -1,17 +1,17 @@
/*++ @file /*++ @file
Produce Simple File System abstractions for a directory on your PC using Unix APIs. Produce Simple File System abstractions for a directory on your PC using Unix APIs.
The configuration of what devices to mount or emulate comes from The configuration of what devices to mount or emulate comes from
environment variables. environment variables.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2009, 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 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.
**/ **/
@ -77,4 +77,4 @@ typedef struct {
#endif #endif

View File

@ -2,7 +2,7 @@
# Simple filesystem driver # Simple filesystem driver
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -24,20 +24,20 @@ Abstract:
EFI_SIMPLE_NETWORK_PROTOCOL gEmuSnpTemplate = { EFI_SIMPLE_NETWORK_PROTOCOL gEmuSnpTemplate = {
EFI_SIMPLE_NETWORK_PROTOCOL_REVISION, EFI_SIMPLE_NETWORK_PROTOCOL_REVISION,
EmuSnpStart, EmuSnpStart,
EmuSnpStop, EmuSnpStop,
EmuSnpInitialize, EmuSnpInitialize,
EmuSnpReset, EmuSnpReset,
EmuSnpShutdown, EmuSnpShutdown,
EmuSnpReceiveFilters, EmuSnpReceiveFilters,
EmuSnpStationAddress, EmuSnpStationAddress,
EmuSnpStatistics, EmuSnpStatistics,
EmuSnpMcastIptoMac, EmuSnpMcastIptoMac,
EmuSnpNvdata, EmuSnpNvdata,
EmuSnpGetStatus, EmuSnpGetStatus,
EmuSnpTransmit, EmuSnpTransmit,
EmuSnpReceive, EmuSnpReceive,
NULL, // WaitForPacket NULL, // WaitForPacket
NULL // Mode NULL // Mode
}; };
@ -94,8 +94,8 @@ EmuSnpStop (
/** /**
Resets a network adapter and allocates the transmit and receive buffers Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers. of additional transmit and receive buffers.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -131,8 +131,8 @@ EmuSnpInitialize (
} }
/** /**
Resets a network adapter and re-initializes it with the parameters that were Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize(). provided in the previous call to Initialize().
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more @param ExtendedVerification Indicates that the driver may perform a more
@ -159,7 +159,7 @@ EmuSnpReset (
} }
/** /**
Resets a network adapter and leaves it in a state that is safe for Resets a network adapter and leaves it in a state that is safe for
another driver to initialize. another driver to initialize.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -334,7 +334,7 @@ EmuSnpMcastIptoMac (
/** /**
Performs read and write operations on the NVRAM device attached to a Performs read and write operations on the NVRAM device attached to a
network interface. network interface.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -370,7 +370,7 @@ EmuSnpNvdata (
/** /**
Reads the current interrupt status and recycled transmit buffer status from Reads the current interrupt status and recycled transmit buffer status from
a network interface. a network interface.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -568,8 +568,8 @@ EmuSnpDriverBindingSupported (
} }
} }
} }
// //
// Open the IO Abstraction(s) needed to perform the supported test // Open the IO Abstraction(s) needed to perform the supported test
// //
@ -602,8 +602,8 @@ EmuSnpDriverBindingSupported (
This->DriverBindingHandle, This->DriverBindingHandle,
ControllerHandle ControllerHandle
); );
// //
// Open the EFI Device Path protocol needed to perform the supported test // Open the EFI Device Path protocol needed to perform the supported test
// //
@ -724,7 +724,7 @@ EmuSnpDriverBindingStart (
Private->Snp.Mode = &Private->Mode; Private->Snp.Mode = &Private->Mode;
Private->ControllerNameTable = NULL; Private->ControllerNameTable = NULL;
Status = Private->Io->CreateMapping (Private->Io, &Private->Mode); Status = Private->Io->CreateMapping (Private->Io, &Private->Mode);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto Done; goto Done;
@ -760,7 +760,7 @@ EmuSnpDriverBindingStart (
EmuIoThunk->ConfigString, EmuIoThunk->ConfigString,
TRUE TRUE
); );
AddUnicodeString2 ( AddUnicodeString2 (
"en", "en",
gEmuSnpDriverComponentName2.SupportedLanguages, gEmuSnpDriverComponentName2.SupportedLanguages,
@ -819,7 +819,7 @@ Done:
restrictions for this service. DisconnectController() restrictions for this service. DisconnectController()
must follow these calling restrictions. If any other agent wishes must follow these calling restrictions. If any other agent wishes
to call Stop() it must also follow these calling restrictions. to call Stop() it must also follow these calling restrictions.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on @param ControllerHandle Handle of device to stop driver on
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
@ -867,8 +867,8 @@ EmuSnpDriverBindingStop (
} }
ASSERT (NumberOfChildren == 1); ASSERT (NumberOfChildren == 1);
// //
// Get our context back. // Get our context back.
// //

View File

@ -56,7 +56,7 @@ typedef struct {
EFI_SIMPLE_NETWORK_PROTOCOL Snp; EFI_SIMPLE_NETWORK_PROTOCOL Snp;
EFI_SIMPLE_NETWORK_MODE Mode; EFI_SIMPLE_NETWORK_MODE Mode;
EFI_UNICODE_STRING_TABLE *ControllerNameTable; EFI_UNICODE_STRING_TABLE *ControllerNameTable;
} EMU_SNP_PRIVATE_DATA; } EMU_SNP_PRIVATE_DATA;
@ -124,7 +124,7 @@ EmuSnpDriverBindingStart (
restrictions for this service. DisconnectController() restrictions for this service. DisconnectController()
must follow these calling restrictions. If any other agent wishes must follow these calling restrictions. If any other agent wishes
to call Stop() it must also follow these calling restrictions. to call Stop() it must also follow these calling restrictions.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on @param ControllerHandle Handle of device to stop driver on
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
@ -156,7 +156,7 @@ EFIAPI
EmuSnpStart( EmuSnpStart(
IN EFI_SIMPLE_NETWORK_PROTOCOL* This IN EFI_SIMPLE_NETWORK_PROTOCOL* This
); );
/** /**
Changes the state of a network interface from "started" to "stopped". Changes the state of a network interface from "started" to "stopped".
@ -170,10 +170,10 @@ EFIAPI
EmuSnpStop( EmuSnpStop(
IN EFI_SIMPLE_NETWORK_PROTOCOL* This IN EFI_SIMPLE_NETWORK_PROTOCOL* This
); );
/** /**
Resets a network adapter and allocates the transmit and receive buffers Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers. of additional transmit and receive buffers.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -198,10 +198,10 @@ EmuSnpInitialize(
IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL IN UINTN ExtraTxBufferSize OPTIONAL
); );
/** /**
Resets a network adapter and re-initializes it with the parameters that were Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize(). provided in the previous call to Initialize().
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more @param ExtendedVerification Indicates that the driver may perform a more
@ -219,7 +219,7 @@ EmuSnpReset(
); );
/** /**
Resets a network adapter and leaves it in a state that is safe for Resets a network adapter and leaves it in a state that is safe for
another driver to initialize. another driver to initialize.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -311,10 +311,10 @@ EmuSnpStatistics(
IN OUT UINTN* StatisticsSize OPTIONAL, IN OUT UINTN* StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL
); );
/** /**
Converts a multicast IP address to a multicast HW MAC address. Converts a multicast IP address to a multicast HW MAC address.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param Ipv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set @param Ipv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set
to FALSE if the multicast IP address is IPv4 [RFC 791]. to FALSE if the multicast IP address is IPv4 [RFC 791].
@ -341,7 +341,7 @@ EmuSnpMcastIptoMac(
); );
/** /**
Performs read and write operations on the NVRAM device attached to a Performs read and write operations on the NVRAM device attached to a
network interface. network interface.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -367,7 +367,7 @@ EmuSnpNvdata(
); );
/** /**
Reads the current interrupt status and recycled transmit buffer status from Reads the current interrupt status and recycled transmit buffer status from
a network interface. a network interface.
@param This Protocol instance pointer. @param This Protocol instance pointer.

View File

@ -2,20 +2,20 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, 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 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.
**/ **/
#include <PiDxe.h> #include <PiDxe.h>
#include <Protocol/DevicePath.h> #include <Protocol/DevicePath.h>
#include <Protocol/EmuThunk.h> #include <Protocol/EmuThunk.h>
#include <Library/DebugLib.h> #include <Library/DebugLib.h>
#include <Library/UefiLib.h> #include <Library/UefiLib.h>
@ -69,7 +69,7 @@ Arguments:
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT) (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
Returns: Returns:
EFI_SUCEESS - UnixThunk protocol is added or error status from EFI_SUCEESS - UnixThunk protocol is added or error status from
gBS->InstallMultiProtocolInterfaces(). gBS->InstallMultiProtocolInterfaces().
**/ **/

View File

@ -2,7 +2,7 @@
# A DXE driver to produce EMU_THUNK_PROTOCOL # A DXE driver to produce EMU_THUNK_PROTOCOL
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -3,9 +3,9 @@
# This is the Emu Emulation Environment Platform # This is the Emu Emulation Environment Platform
# #
# Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2008 - 2011, 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 # This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this distribution. # 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 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 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES
@ -60,7 +60,7 @@
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize|0x0|UINT32|0x00001011 gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize|0x0|UINT32|0x00001011
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x0|UINT32|0x00001012 gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x0|UINT32|0x00001012
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0|UINT32|0x00001013 gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0|UINT32|0x00001013
## Number of Application Processors (APs) in the system 0 means Uniprocessor mode ## Number of Application Processors (APs) in the system 0 means Uniprocessor mode
gEmulatorPkgTokenSpaceGuid.PcdEmuApCount|L"0"|VOID*|0x00001019 gEmulatorPkgTokenSpaceGuid.PcdEmuApCount|L"0"|VOID*|0x00001019
@ -70,13 +70,13 @@
## Size of the packet filter ## Size of the packet filter
gEmulatorPkgTokenSpaceGuid.PcdNetworkPacketFilterSize|524288|UINT32|0x0000101c gEmulatorPkgTokenSpaceGuid.PcdNetworkPacketFilterSize|524288|UINT32|0x0000101c
[PcdsFixedAtBuild, PcdsPatchableInModule]
[PcdsFixedAtBuild, PcdsPatchableInModule]
gEmulatorPkgTokenSpaceGuid.PcdEmuBootMode|1|UINT32|0x00001006 gEmulatorPkgTokenSpaceGuid.PcdEmuBootMode|1|UINT32|0x00001006
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume|L"..\\Fv\\Fv_Recovery.fd"|VOID*|0x00001009 gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume|L"..\\Fv\\Fv_Recovery.fd"|VOID*|0x00001009
gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize|L"64!64"|VOID*|0x0000100c gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize|L"64!64"|VOID*|0x0000100c
# #
# filename[:[R|F][O|W]][:BlockSize] # filename[:[R|F][O|W]][:BlockSize]
# filename can be a device node, like /dev/disk1 # filename can be a device node, like /dev/disk1
@ -85,11 +85,11 @@
# Default is Fixed Media, Writable # Default is Fixed Media, Writable
# For a file the default BlockSize is 512, and can be overridden via BlockSize, # For a file the default BlockSize is 512, and can be overridden via BlockSize,
# for example 2048 for an ISO CD image. The block size for a device comes from # for example 2048 for an ISO CD image. The block size for a device comes from
# the device and is not configurable. # the device and is not configurable.
# Device Size comes from file or device. # Device Size comes from file or device.
# On Mac OS X you can use Disk Utility to create .dmg files and mount them like disks # On Mac OS X you can use Disk Utility to create .dmg files and mount them like disks
gEmulatorPkgTokenSpaceGuid.PcdEmuVirtualDisk|L"disk.dmg:FW"|VOID*|0x00001001 gEmulatorPkgTokenSpaceGuid.PcdEmuVirtualDisk|L"disk.dmg:FW"|VOID*|0x00001001
gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window"|VOID*|0x00001018 gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window"|VOID*|0x00001018
gEmulatorPkgTokenSpaceGuid.PcdEmuFileSystem|L".!../../../../../EdkShellBinPkg/bin/ia32/Apps"|VOID*|0x00001004 gEmulatorPkgTokenSpaceGuid.PcdEmuFileSystem|L".!../../../../../EdkShellBinPkg/bin/ia32/Apps"|VOID*|0x00001004
gEmulatorPkgTokenSpaceGuid.PcdEmuSerialPort|L"/dev/ttyS0"|VOID*|0x00001002 gEmulatorPkgTokenSpaceGuid.PcdEmuSerialPort|L"/dev/ttyS0"|VOID*|0x00001002

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 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 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.
**/ **/
@ -35,7 +35,7 @@ Routine Description:
Arguments: Arguments:
FfsHeader - Ffs Header availible to every PEIM FfsHeader - Ffs Header availible to every PEIM
PeiServices - General purpose services available to every PEIM. PeiServices - General purpose services available to every PEIM.
Returns: Returns:
None None
@ -90,8 +90,8 @@ Returns:
EFI_RESOURCE_FIRMWARE_DEVICE, EFI_RESOURCE_FIRMWARE_DEVICE,
(EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), (EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),
FdBase, FdBase,
( (
FvHeader->FvLength + FvHeader->FvLength +
PcdGet32 (PcdFlashNvStorageVariableSize) + PcdGet32 (PcdFlashNvStorageVariableSize) +
PcdGet32 (PcdFlashNvStorageFtwWorkingSize) + PcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
PcdGet32 (PcdFlashNvStorageFtwSpareSize) + PcdGet32 (PcdFlashNvStorageFtwSpareSize) +
@ -103,7 +103,7 @@ Returns:
// Hard code the address of the spare block and variable services. // Hard code the address of the spare block and variable services.
// Assume it's a hard coded offset from FV0 in FD0. // Assume it's a hard coded offset from FV0 in FD0.
// //
FdSize = FdSize =
PcdGet32 (PcdFlashNvStorageVariableSize) + PcdGet32 (PcdFlashNvStorageVariableSize) +
PcdGet32 (PcdFlashNvStorageFtwWorkingSize) + PcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
PcdGet32 (PcdFlashNvStorageFtwSpareSize) + PcdGet32 (PcdFlashNvStorageFtwSpareSize) +

View File

@ -4,7 +4,7 @@
# This PEIM will produce the HOB to describe Firmware Volume, Firmware Devices # This PEIM will produce the HOB to describe Firmware Volume, Firmware Devices
# on the Emu emulator. # on the Emu emulator.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -3,13 +3,13 @@
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 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 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.
**/ **/
@ -37,11 +37,11 @@ PeimInitializeFlashMap (
Routine Description: Routine Description:
Build GUIDed HOBs for platform specific flash map Build GUIDed HOBs for platform specific flash map
Arguments: Arguments:
FfsHeader - A pointer to the EFI_FFS_FILE_HEADER structure. FfsHeader - A pointer to the EFI_FFS_FILE_HEADER structure.
PeiServices - General purpose services available to every PEIM. PeiServices - General purpose services available to every PEIM.
Returns: Returns:
EFI_STATUS EFI_STATUS
@ -74,7 +74,7 @@ Returns:
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
PcdSet64 (PcdFlashNvStorageVariableBase64, PcdGet64 (PcdEmuFlashNvStorageVariableBase) + FdFixUp); PcdSet64 (PcdFlashNvStorageVariableBase64, PcdGet64 (PcdEmuFlashNvStorageVariableBase) + FdFixUp);
PcdSet64 (PcdFlashNvStorageFtwWorkingBase64, PcdGet64 (PcdEmuFlashNvStorageFtwWorkingBase) + FdFixUp); PcdSet64 (PcdFlashNvStorageFtwWorkingBase64, PcdGet64 (PcdEmuFlashNvStorageFtwWorkingBase) + FdFixUp);
PcdSet64 (PcdFlashNvStorageFtwSpareBase64, PcdGet64 (PcdEmuFlashNvStorageFtwSpareBase) + FdFixUp); PcdSet64 (PcdFlashNvStorageFtwSpareBase64, PcdGet64 (PcdEmuFlashNvStorageFtwSpareBase) + FdFixUp);

View File

@ -3,7 +3,7 @@
# #
# This module installs FlashMap PPI which is used to get flash layout information. # This module installs FlashMap PPI which is used to get flash layout information.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2009, 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 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.
**/ **/
@ -90,14 +90,14 @@ Routine Description:
date items to there virtual address. date items to there virtual address.
mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] - Physical copy of instance data mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] - Physical copy of instance data
mFvbModuleGlobal->FvInstance[FVB_VIRTUAL] - Virtual pointer to common mFvbModuleGlobal->FvInstance[FVB_VIRTUAL] - Virtual pointer to common
instance data. instance data.
Arguments: Arguments:
(Standard EFI notify event - EFI_EVENT_NOTIFY) (Standard EFI notify event - EFI_EVENT_NOTIFY)
Returns: Returns:
None None
@ -146,7 +146,7 @@ Arguments:
FwhInstance - The EFI_FW_VOL_INSTANCE fimrware instance structure FwhInstance - The EFI_FW_VOL_INSTANCE fimrware instance structure
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found EFI_INVALID_PARAMETER - Instance not found
@ -190,14 +190,14 @@ Routine Description:
Arguments: Arguments:
Instance - The FV instance whose base address is going to be Instance - The FV instance whose base address is going to be
returned returned
Address - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS Address - 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.
Global - Pointer to ESAL_FWB_GLOBAL that contains all Global - Pointer to ESAL_FWB_GLOBAL that contains all
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found EFI_INVALID_PARAMETER - Instance not found
@ -230,14 +230,14 @@ Routine Description:
resulting attributes in output parameter resulting attributes in output parameter
Arguments: Arguments:
Instance - The FV instance whose attributes is going to be Instance - The FV instance whose attributes is going to be
returned returned
Attributes - Output buffer which contains attributes Attributes - Output buffer which contains attributes
Global - Pointer to ESAL_FWB_GLOBAL that contains all Global - Pointer to ESAL_FWB_GLOBAL that contains all
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found EFI_INVALID_PARAMETER - Instance not found
@ -274,7 +274,7 @@ Routine Description:
Arguments: Arguments:
Instance - The FV instance which the Lba belongs to Instance - The FV instance which the Lba belongs to
Lba - The logical block address Lba - The logical block address
LbaAddress - On output, contains the physical starting address LbaAddress - On output, contains the physical starting address
of the Lba of the Lba
LbaLength - On output, contains the length of the block LbaLength - On output, contains the length of the block
NumOfBlocks - A pointer to a caller allocated UINTN in which the NumOfBlocks - A pointer to a caller allocated UINTN in which the
@ -285,7 +285,7 @@ Arguments:
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found EFI_INVALID_PARAMETER - Instance not found
@ -377,14 +377,14 @@ Arguments:
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - The firmware volume was read successfully and EFI_SUCCESS - The firmware volume was read successfully and
contents are in Buffer contents are in Buffer
EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output, EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes returned NumBytes contains the total number of bytes returned
in Buffer in Buffer
EFI_ACCESS_DENIED - The firmware volume is in the ReadDisabled state EFI_ACCESS_DENIED - The firmware volume is in the ReadDisabled state
EFI_DEVICE_ERROR - The block device is not functioning correctly and EFI_DEVICE_ERROR - The block device is not functioning correctly and
could not be read could not be read
EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL
@ -463,13 +463,13 @@ Arguments:
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - The firmware volume was written successfully EFI_SUCCESS - The firmware volume was written successfully
EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output, EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes NumBytes contains the total number of bytes
actually written actually written
EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state
EFI_DEVICE_ERROR - The block device is not functioning correctly and EFI_DEVICE_ERROR - The block device is not functioning correctly and
could not be written could not be written
EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL
@ -541,10 +541,10 @@ Arguments:
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - The erase request was successfully completed EFI_SUCCESS - The erase request was successfully completed
EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state
EFI_DEVICE_ERROR - The block device is not functioning correctly and EFI_DEVICE_ERROR - The block device is not functioning correctly and
could not be written. Firmware device may have been could not be written. Firmware device may have been
partially erased partially erased
EFI_INVALID_PARAMETER - Instance not found EFI_INVALID_PARAMETER - Instance not found
@ -596,13 +596,13 @@ FvbSetVolumeAttributes (
/*++ /*++
Routine Description: Routine Description:
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
Arguments: Arguments:
Instance - The FV instance whose attributes is going to be Instance - The FV instance whose attributes is going to be
modified modified
Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES_2 Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES_2
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
@ -610,7 +610,7 @@ Arguments:
instance data instance data
Virtual - Whether CPU is in virtual or physical mode Virtual - Whether CPU is in virtual or physical mode
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
EFI_ACCESS_DENIED - The volume setting is locked and cannot be modified EFI_ACCESS_DENIED - The volume setting is locked and cannot be modified
EFI_INVALID_PARAMETER - Instance not found, or The attributes requested are EFI_INVALID_PARAMETER - Instance not found, or The attributes requested are
@ -742,7 +742,7 @@ Arguments:
Returns: Returns:
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
**/ **/
@ -777,8 +777,8 @@ Arguments:
returned. All blocks in this range have a size of returned. All blocks in this range have a size of
BlockSize BlockSize
Returns: Returns:
EFI_SUCCESS - The firmware volume was read successfully and EFI_SUCCESS - The firmware volume was read successfully and
contents are in Buffer contents are in Buffer
**/ **/
@ -813,7 +813,7 @@ Arguments:
This - Calling context This - Calling context
Attributes - output buffer which contains attributes Attributes - output buffer which contains attributes
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
**/ **/
@ -840,7 +840,7 @@ Arguments:
This - Calling context This - Calling context
Attributes - output buffer which contains attributes Attributes - output buffer which contains attributes
Returns: Returns:
EFI_SUCCESS - Successfully returns EFI_SUCCESS - Successfully returns
**/ **/
@ -856,28 +856,28 @@ EFI_STATUS
EFIAPI EFIAPI
FvbProtocolEraseBlocks ( FvbProtocolEraseBlocks (
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
... ...
) )
/*++ /*++
Routine Description: Routine Description:
The EraseBlock() function erases one or more blocks as denoted by the The EraseBlock() function erases one or more blocks as denoted by the
variable argument list. The entire parameter list of blocks must be verified variable argument list. The entire parameter list of blocks must be verified
prior to erasing any blocks. If a block is requested that does not exist prior to erasing any blocks. If a block is requested that does not exist
within the associated firmware volume (it has a larger index than the last within the associated firmware volume (it has a larger index than the last
block of the firmware volume), the EraseBlock() function must return block of the firmware volume), the EraseBlock() function must return
EFI_INVALID_PARAMETER without modifying the contents of the firmware volume. EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.
Arguments: Arguments:
This - Calling context This - Calling context
... - Starting LBA followed by Number of Lba to erase. ... - Starting LBA followed by Number of Lba to erase.
a -1 to terminate the list. a -1 to terminate the list.
Returns: Returns:
EFI_SUCCESS - The erase request was successfully completed EFI_SUCCESS - The erase request was successfully completed
EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state
EFI_DEVICE_ERROR - The block device is not functioning correctly and EFI_DEVICE_ERROR - The block device is not functioning correctly and
could not be written. Firmware device may have been could not be written. Firmware device may have been
partially erased partially erased
@ -978,13 +978,13 @@ Arguments:
output, indicates the actual number of bytes written output, indicates the actual number of bytes written
Buffer - Buffer containing source data for the write. Buffer - Buffer containing source data for the write.
Returns: Returns:
EFI_SUCCESS - The firmware volume was written successfully EFI_SUCCESS - The firmware volume was written successfully
EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output, EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes NumBytes contains the total number of bytes
actually written actually written
EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state
EFI_DEVICE_ERROR - The block device is not functioning correctly and EFI_DEVICE_ERROR - The block device is not functioning correctly and
could not be written could not be written
EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL
@ -1026,14 +1026,14 @@ Arguments:
output, indicates the actual number of bytes Read output, indicates the actual number of bytes Read
Buffer - Buffer containing source data for the Read. Buffer - Buffer containing source data for the Read.
Returns: Returns:
EFI_SUCCESS - The firmware volume was read successfully and EFI_SUCCESS - The firmware volume was read successfully and
contents are in Buffer contents are in Buffer
EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output, EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes returned NumBytes contains the total number of bytes returned
in Buffer in Buffer
EFI_ACCESS_DENIED - The firmware volume is in the ReadDisabled state EFI_ACCESS_DENIED - The firmware volume is in the ReadDisabled state
EFI_DEVICE_ERROR - The block device is not functioning correctly and EFI_DEVICE_ERROR - The block device is not functioning correctly and
could not be read could not be read
EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL
@ -1058,7 +1058,7 @@ Routine Description:
Arguments: Arguments:
FwVolHeader - A pointer to a firmware volume header FwVolHeader - A pointer to a firmware volume header
Returns: Returns:
EFI_SUCCESS - The firmware volume is consistent EFI_SUCCESS - The firmware volume is consistent
EFI_NOT_FOUND - The firmware volume has corrupted. So it is not an FV EFI_NOT_FOUND - The firmware volume has corrupted. So it is not an FV

View File

@ -4,13 +4,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 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 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.
**/ **/

View File

@ -1,10 +1,10 @@
## @file ## @file
# Component description file for Emu Fimware Volume Block DXE driver module. # Component description file for Emu Fimware Volume Block DXE driver module.
# #
# This DXE runtime driver implements and produces the Fimware Volue Block Protocol on # This DXE runtime driver implements and produces the Fimware Volue Block Protocol on
# Emu emulator. # Emu emulator.
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -3,13 +3,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2009, 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 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.
**/ **/

View File

@ -2,13 +2,13 @@
Setup Variable data structure for Emu platform. Setup Variable data structure for Emu platform.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/

View File

@ -2,13 +2,13 @@
Setup Variable data structure for Emu platform. Setup Variable data structure for Emu platform.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/

View File

@ -2,13 +2,13 @@
Setup Variable data structure for Emu platform. Setup Variable data structure for Emu platform.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/

View File

@ -1,16 +1,16 @@
/*++ @file /*++ @file
The PCD, gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage, points to a magic page The PCD, gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage, points to a magic page
of memory that is like SRAM on an embedded system. This file defines what goes of memory that is like SRAM on an embedded system. This file defines what goes
where in the magic page. where in the magic page.
Copyright (c) 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/
@ -23,12 +23,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
typedef struct { typedef struct {
// Used by PEI Core and PEIMs to store the PEI Services pointer. // Used by PEI Core and PEIMs to store the PEI Services pointer.
// Privilege issues prevent using the PI mechanism in the emulator. // Privilege issues prevent using the PI mechanism in the emulator.
CONST EFI_PEI_SERVICES **PeiServicesTablePointer; CONST EFI_PEI_SERVICES **PeiServicesTablePointer;
// Used by SecPeiServicesLib // Used by SecPeiServicesLib
EFI_PEI_PPI_DESCRIPTOR *PpiList; EFI_PEI_PPI_DESCRIPTOR *PpiList;
// Needed by PEI PEI PeCoffLoaderExtraActionLib // Needed by PEI PEI PeCoffLoaderExtraActionLib
EMU_THUNK_PROTOCOL *Thunk; EMU_THUNK_PROTOCOL *Thunk;
} EMU_MAGIC_PAGE_LAYOUT; } EMU_MAGIC_PAGE_LAYOUT;

View File

@ -1,13 +1,13 @@
/*++ @file /*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/
@ -21,7 +21,7 @@ extern EMU_THUNK_PROTOCOL *gEmuThunk;
/** /**
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. Protocol instance.
@param Protocol Protocol to search for. @param Protocol Protocol to search for.

View File

@ -1,6 +1,6 @@
/*++ @file /*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved. Copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials 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

View File

@ -1,13 +1,13 @@
/*++ @file /*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/

View File

@ -2,7 +2,7 @@
All 3rd parties to register the PPIs passed into PEI Core All 3rd parties to register the PPIs passed into PEI Core
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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
@ -20,7 +20,7 @@
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
AddThunkProtocol ( AddThunkProtocol (
IN EMU_IO_THUNK_PROTOCOL *ThunkIo, IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
IN CHAR16 *ConfigString, IN CHAR16 *ConfigString,
IN BOOLEAN EmuBusDriver IN BOOLEAN EmuBusDriver
); );
@ -29,7 +29,7 @@ EFI_STATUS
EFIAPI EFIAPI
GetNextThunkProtocol ( GetNextThunkProtocol (
IN BOOLEAN EmuBusDriver, IN BOOLEAN EmuBusDriver,
OUT EMU_IO_THUNK_PROTOCOL **Instance OUT EMU_IO_THUNK_PROTOCOL **Instance
); );

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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
@ -49,7 +49,7 @@ EFI_STATUS
/*++ /*++
Routine Description: Routine Description:
Return the FD Size and base address. Since the FD is loaded from a Return the FD Size and base address. Since the FD is loaded from a
file into host memory only the SEC will know it's address. file into host memory only the SEC will know it's address.
Arguments: Arguments:

View File

@ -6,13 +6,13 @@
manner. manner.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/
@ -51,7 +51,7 @@ EFI_STATUS
/** /**
Read BufferSize bytes from Lba into Buffer. Read BufferSize bytes from Lba into Buffer.
This function reads the requested number of blocks from the device. All the This function reads the requested number of blocks from the device. All the
blocks are read, or an error is returned. blocks are read, or an error is returned.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and
@ -59,13 +59,13 @@ EFI_STATUS
not be signaled. not be signaled.
@param[in] This Indicates a pointer to the calling context. @param[in] This Indicates a pointer to the calling context.
@param[in] MediaId Id of the media, changes every time the media is @param[in] MediaId Id of the media, changes every time the media is
replaced. replaced.
@param[in] Lba The starting Logical Block Address to read from. @param[in] Lba The starting Logical Block Address to read from.
@param[in, out] Token A pointer to the token associated with the transaction. @param[in, out] Token A pointer to the token associated with the transaction.
@param[in] BufferSize Size of Buffer, must be a multiple of device block size. @param[in] BufferSize Size of Buffer, must be a multiple of device block size.
@param[out] Buffer A pointer to the destination buffer for the data. The @param[out] Buffer A pointer to the destination buffer for the data. The
caller is responsible for either having implicit or caller is responsible for either having implicit or
explicit ownership of the buffer. explicit ownership of the buffer.
@retval EFI_SUCCESS The read request was queued if Token->Event is @retval EFI_SUCCESS The read request was queued if Token->Event is
@ -77,7 +77,7 @@ EFI_STATUS
@retval EFI_MEDIA_CHANGED The MediaId is not for the current media. @retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
intrinsic block size of the device. intrinsic block size of the device.
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
or the buffer is not on proper alignment. or the buffer is not on proper alignment.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources. of resources.
@ -118,7 +118,7 @@ EFI_STATUS
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
@retval EFI_DEVICE_ERROR The device reported an error while performing the write. @retval EFI_DEVICE_ERROR The device reported an error while performing the write.
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
or the buffer is not on proper alignment. or the buffer is not on proper alignment.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources. of resources.
@ -137,10 +137,10 @@ EFI_STATUS
/** /**
Flush the Block Device. Flush the Block Device.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED
is returned and non-blocking I/O is being used, the Event associated with is returned and non-blocking I/O is being used, the Event associated with
this request will not be signaled. this request will not be signaled.
@param[in] This Indicates a pointer to the calling context. @param[in] This Indicates a pointer to the calling context.
@param[in,out] Token A pointer to the token associated with the transaction @param[in,out] Token A pointer to the token associated with the transaction

View File

@ -1,21 +1,21 @@
/** @file /** @file
SimpleFileSystem protocol as defined in the UEFI 2.0 specification. SimpleFileSystem protocol as defined in the UEFI 2.0 specification.
The SimpleFileSystem protocol is the programmatic access to the FAT (12,16,32) The SimpleFileSystem protocol is the programmatic access to the FAT (12,16,32)
file system specified in UEFI 2.0. It can also be used to abstract a file file system specified in UEFI 2.0. It can also be used to abstract a file
system other than FAT. system other than FAT.
UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem. UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 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 This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution. the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at 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.
**/ **/
@ -41,8 +41,8 @@ EFI_STATUS
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)( (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
UINT32 Width, UINT32 Width,
UINT32 Height UINT32 Height
); );
@ -55,19 +55,19 @@ EFI_STATUS
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)( (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
EFI_KEY_DATA *key EFI_KEY_DATA *key
); );
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_KEY_SET_STATE) ( (EFIAPI *EMU_GRAPHICS_WINDOWS_KEY_SET_STATE) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState IN EFI_KEY_TOGGLE_STATE *KeyToggleState
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK) ( (EFIAPI *EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK) (
IN VOID *Context, IN VOID *Context,
@ -77,7 +77,7 @@ VOID
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_REGISTER_KEY_NOTIFY) ( (EFIAPI *EMU_GRAPHICS_WINDOWS_REGISTER_KEY_NOTIFY) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK CallBack, IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK CallBack,
IN VOID *Context IN VOID *Context
); );
@ -104,8 +104,8 @@ EFI_STATUS
typedef typedef
BOOLEAN BOOLEAN
(EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) ( (EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EFI_KEY_DATA *KeyData IN EFI_KEY_DATA *KeyData
); );

View File

@ -34,8 +34,8 @@ EFI_STATUS
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)( (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
UINT32 Width, UINT32 Width,
UINT32 Height UINT32 Height
); );
@ -48,19 +48,19 @@ EFI_STATUS
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)( (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
EFI_KEY_DATA *key EFI_KEY_DATA *key
); );
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_KEY_SET_STATE) ( (EFIAPI *EMU_GRAPHICS_WINDOWS_KEY_SET_STATE) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState IN EFI_KEY_TOGGLE_STATE *KeyToggleState
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK) ( (EFIAPI *EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK) (
IN VOID *Context, IN VOID *Context,
@ -70,7 +70,7 @@ VOID
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_REGISTER_KEY_NOTIFY) ( (EFIAPI *EMU_GRAPHICS_WINDOWS_REGISTER_KEY_NOTIFY) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK MakeCallBack, IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK MakeCallBack,
IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK BreakCallBack, IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK BreakCallBack,
IN VOID *Context IN VOID *Context
@ -98,8 +98,8 @@ EFI_STATUS
typedef typedef
BOOLEAN BOOLEAN
(EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) ( (EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EFI_KEY_DATA *KeyData IN EFI_KEY_DATA *KeyData
); );

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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
@ -13,7 +13,7 @@
**/ **/
#ifndef __EMU_IO_THUNK__ #ifndef __EMU_IO_THUNK__
#define __EMU_IO_THUNK__ #define __EMU_IO_THUNK__
@ -24,13 +24,13 @@
typedef struct _EMU_IO_THUNK_PROTOCOL EMU_IO_THUNK_PROTOCOL; typedef struct _EMU_IO_THUNK_PROTOCOL EMU_IO_THUNK_PROTOCOL;
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN) ( (EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN) (
IN EMU_IO_THUNK_PROTOCOL *This IN EMU_IO_THUNK_PROTOCOL *This
); );
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE) ( (EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE) (
IN EMU_IO_THUNK_PROTOCOL *This IN EMU_IO_THUNK_PROTOCOL *This
@ -43,7 +43,7 @@ struct _EMU_IO_THUNK_PROTOCOL {
UINT16 Instance; UINT16 Instance;
EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN Open; EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN Open;
EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE Close; EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE Close;
VOID *Private; /// Used by implementation VOID *Private; /// Used by implementation
}; };
extern EFI_GUID gEmuIoThunkProtocolGuid; extern EFI_GUID gEmuIoThunkProtocolGuid;

View File

@ -1,17 +1,17 @@
/** @file /** @file
The EMU_SNP_PROTOCOL provides services to initialize a network interface, The EMU_SNP_PROTOCOL provides services to initialize a network interface,
transmit packets, receive packets, and close a network interface. transmit packets, receive packets, and close a network interface.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portitions copyright (c) 2011, Apple Inc. All rights reserved. Portitions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution. the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at 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.
**/ **/
@ -81,8 +81,8 @@ EFI_STATUS
); );
/** /**
Resets a network adapter and allocates the transmit and receive buffers Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers. of additional transmit and receive buffers.
@param This The protocol instance pointer. @param This The protocol instance pointer.
@ -115,8 +115,8 @@ EFI_STATUS
); );
/** /**
Resets a network adapter and re-initializes it with the parameters that were Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize(). provided in the previous call to Initialize().
@param This The protocol instance pointer. @param This The protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more @param ExtendedVerification Indicates that the driver may perform a more
@ -138,7 +138,7 @@ EFI_STATUS
); );
/** /**
Resets a network adapter and leaves it in a state that is safe for Resets a network adapter and leaves it in a state that is safe for
another driver to initialize. another driver to initialize.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@ -275,7 +275,7 @@ EFI_STATUS
); );
/** /**
Performs read and write operations on the NVRAM device attached to a Performs read and write operations on the NVRAM device attached to a
network interface. network interface.
@param This The protocol instance pointer. @param This The protocol instance pointer.
@ -305,7 +305,7 @@ EFI_STATUS
); );
/** /**
Reads the current interrupt status and recycled transmit buffer status from Reads the current interrupt status and recycled transmit buffer status from
a network interface. a network interface.
@param This The protocol instance pointer. @param This The protocol instance pointer.
@ -363,7 +363,7 @@ EFI_STATUS
@retval EFI_SUCCESS The packet was placed on the transmit queue. @retval EFI_SUCCESS The packet was placed on the transmit queue.
@retval EFI_NOT_STARTED The network interface has not been started. @retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_NOT_READY The network interface is too busy to accept this transmit request. @retval EFI_NOT_READY The network interface is too busy to accept this transmit request.
@retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface. @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@ -430,11 +430,11 @@ EFI_STATUS
// //
// Revision defined in EFI1.1 // Revision defined in EFI1.1
// //
#define EMU_SNP_INTERFACE_REVISION EMU_SNP_PROTOCOL_REVISION #define EMU_SNP_INTERFACE_REVISION EMU_SNP_PROTOCOL_REVISION
/// ///
/// The EMU_SNP_PROTOCOL protocol abstracts OS network sercices /// The EMU_SNP_PROTOCOL protocol abstracts OS network sercices
/// from the EFI driver that produces EFI Simple Network Protocol. /// from the EFI driver that produces EFI Simple Network Protocol.
/// ///
struct _EMU_SNP_PROTOCOL { struct _EMU_SNP_PROTOCOL {

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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
@ -44,34 +44,34 @@ typedef struct _EMU_THUNK_PROTOCOL EMU_THUNK_PROTOCOL;
typedef typedef
UINTN UINTN
(EFIAPI *EMU_WRITE_STD_ERROR) ( (EFIAPI *EMU_WRITE_STD_ERROR) (
IN UINT8 *Buffer, IN UINT8 *Buffer,
IN UINTN NumberOfBytes IN UINTN NumberOfBytes
); );
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_CONFIG_STD_IN) ( (EFIAPI *EMU_CONFIG_STD_IN) (
VOID VOID
); );
typedef typedef
UINTN UINTN
(EFIAPI *EMU_WRITE_STD_OUT) ( (EFIAPI *EMU_WRITE_STD_OUT) (
IN UINT8 *Buffer, IN UINT8 *Buffer,
IN UINTN NumberOfBytes IN UINTN NumberOfBytes
); );
typedef typedef
UINTN UINTN
(EFIAPI *EMU_READ_STD_IN) ( (EFIAPI *EMU_READ_STD_IN) (
OUT UINT8 *Buffer, OUT UINT8 *Buffer,
IN UINTN NumberOfBytes IN UINTN NumberOfBytes
); );
typedef typedef
BOOLEAN BOOLEAN
(EFIAPI *EMU_POLL_STD_IN) ( (EFIAPI *EMU_POLL_STD_IN) (
VOID VOID
@ -89,28 +89,28 @@ VOID *
(EFIAPI *EMU_OS_VMALLOC) ( (EFIAPI *EMU_OS_VMALLOC) (
IN UINTN Size IN UINTN Size
); );
typedef typedef
BOOLEAN BOOLEAN
(EFIAPI *EMU_OS_FREE) ( (EFIAPI *EMU_OS_FREE) (
IN VOID *Ptr IN VOID *Ptr
); );
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EMU_PE_COFF_GET_ENTRY_POINT) ( (EFIAPI *EMU_PE_COFF_GET_ENTRY_POINT) (
IN VOID *Pe32Data, IN VOID *Pe32Data,
IN OUT VOID **EntryPoint IN OUT VOID **EntryPoint
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_PE_COFF_RELOCATE_EXTRA_ACTION) ( (EFIAPI *EMU_PE_COFF_RELOCATE_EXTRA_ACTION) (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_PE_COFF_UNLOAD_EXTRA_ACTION) ( (EFIAPI *EMU_PE_COFF_UNLOAD_EXTRA_ACTION) (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
@ -121,7 +121,7 @@ VOID
(EFIAPI *EMU_ENABLE_INERRUPTS) ( (EFIAPI *EMU_ENABLE_INERRUPTS) (
VOID VOID
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_DISABLE_INERRUPTS) ( (EFIAPI *EMU_DISABLE_INERRUPTS) (
@ -157,14 +157,14 @@ VOID
(EFIAPI *EMU_EXIT) ( (EFIAPI *EMU_EXIT) (
IN UINTN Status IN UINTN Status
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_GET_TIME) ( (EFIAPI *EMU_GET_TIME) (
OUT EFI_TIME *Time, OUT EFI_TIME *Time,
OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
); );
typedef typedef
VOID VOID
(EFIAPI *EMU_SET_TIME) ( (EFIAPI *EMU_SET_TIME) (
@ -184,23 +184,23 @@ VOID
IN UINT64 PeriodMs, IN UINT64 PeriodMs,
IN EMU_SET_TIMER_CALLBACK CallBack IN EMU_SET_TIMER_CALLBACK CallBack
); );
/** /**
Enumerates the current set of protocol instances that abstract OS services from EFI. Enumerates the current set of protocol instances that abstract OS services from EFI.
A given protocol can have multiple instances. Usually a protocol is configured via a A given protocol can have multiple instances. Usually a protocol is configured via a
single PCD string. The data associated for each instance is seperated via a ! in the string. single PCD string. The data associated for each instance is seperated via a ! in the string.
EMU_IO_THUNK_PROTOCOL_CLOSE.ConfigString will contain the information in the PCD string up to the next !. EMU_IO_THUNK_PROTOCOL_CLOSE.ConfigString will contain the information in the PCD string up to the next !.
Thus each instance has a unique ConfigString. Thus each instance has a unique ConfigString.
@param EmuBusDriver TRUE means only return protocol instances that need to be produced @param EmuBusDriver TRUE means only return protocol instances that need to be produced
by the EmuBusDriver. FALSE means return all possible protocols by the EmuBusDriver. FALSE means return all possible protocols
@param Instance On input the protocol to search for, or NULL to start a search @param Instance On input the protocol to search for, or NULL to start a search
of all the supported protocol instances. of all the supported protocol instances.
@param NextProtocol On output it represents the next value to be passed into Protocol. @param NextProtocol On output it represents the next value to be passed into Protocol.
@param Interface A pointer to the EMU_IO_THUNK_PROTOCOL_CLOSE interface. @param Interface A pointer to the EMU_IO_THUNK_PROTOCOL_CLOSE interface.
@retval EFI_SUCCESS The function completed successfully. @retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The next protocol instance was not found. @retval EFI_NOT_FOUND The next protocol instance was not found.
@ -213,7 +213,7 @@ EFI_STATUS
IN BOOLEAN EmuBusDriver, IN BOOLEAN EmuBusDriver,
OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL
); );
struct _EMU_THUNK_PROTOCOL { struct _EMU_THUNK_PROTOCOL {
// Used for early debug printing // Used for early debug printing
@ -222,22 +222,22 @@ struct _EMU_THUNK_PROTOCOL {
EMU_WRITE_STD_OUT WriteStdOut; EMU_WRITE_STD_OUT WriteStdOut;
EMU_READ_STD_IN ReadStdIn; EMU_READ_STD_IN ReadStdIn;
EMU_POLL_STD_IN PollStdIn; EMU_POLL_STD_IN PollStdIn;
// //
// Map OS malloc/free so we can use OS based guard malloc // Map OS malloc/free so we can use OS based guard malloc
// //
EMU_OS_MALLOC Malloc; EMU_OS_MALLOC Malloc;
EMU_OS_VMALLOC Valloc; EMU_OS_VMALLOC Valloc;
EMU_OS_FREE Free; EMU_OS_FREE Free;
/// ///
/// PE/COFF loader hooks to get symbols loaded /// PE/COFF loader hooks to get symbols loaded
/// ///
EMU_PE_COFF_GET_ENTRY_POINT PeCoffGetEntryPoint; EMU_PE_COFF_GET_ENTRY_POINT PeCoffGetEntryPoint;
EMU_PE_COFF_RELOCATE_EXTRA_ACTION PeCoffRelocateImageExtraAction; EMU_PE_COFF_RELOCATE_EXTRA_ACTION PeCoffRelocateImageExtraAction;
EMU_PE_COFF_UNLOAD_EXTRA_ACTION PeCoffUnloadImageExtraAction; EMU_PE_COFF_UNLOAD_EXTRA_ACTION PeCoffUnloadImageExtraAction;
/// ///
/// DXE Architecture Protocol Services /// DXE Architecture Protocol Services
/// ///
@ -249,10 +249,10 @@ struct _EMU_THUNK_PROTOCOL {
EMU_SLEEP Sleep; EMU_SLEEP Sleep;
EMU_CPU_SLEEP CpuSleep; EMU_CPU_SLEEP CpuSleep;
EMU_EXIT Exit; EMU_EXIT Exit;
EMU_GET_TIME GetTime; EMU_GET_TIME GetTime;
EMU_SET_TIME SetTime; EMU_SET_TIME SetTime;
EMU_SET_TIMER SetTimer; EMU_SET_TIMER SetTimer;
/// ///
/// Generic System Services /// Generic System Services
/// ///

View File

@ -74,7 +74,7 @@ DevPathToTextVendorLib (
CatPrint (Str, L"EmuThread()"); CatPrint (Str, L"EmuThread()");
return EFI_SUCCESS; return EFI_SUCCESS;
} }
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
@ -160,10 +160,10 @@ DevPathFromTextEmuFs (
/** /**
Register the Filter function Register the Filter function
@param ImageHandle The firmware allocated handle for the EFI image. @param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table. @param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor executed correctly. @retval EFI_SUCCESS The constructor executed correctly.
**/ **/

View File

@ -121,7 +121,7 @@ GetPerformanceCounterProperties (
if (EndValue != NULL) { if (EndValue != NULL) {
*EndValue = (UINT64)-1LL; *EndValue = (UINT64)-1LL;
} }
return gEmuThunk->QueryPerformanceFrequency (); return gEmuThunk->QueryPerformanceFrequency ();
} }

View File

@ -41,4 +41,4 @@
[LibraryClasses] [LibraryClasses]
DebugLib DebugLib
EmuThunkLib EmuThunkLib

View File

@ -1,7 +1,7 @@
/*++ @file /*++ @file
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 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 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
@ -42,16 +42,16 @@ DxeEmuLibConstructor (
GuidHob = GetFirstGuidHob (&gEmuThunkProtocolGuid); GuidHob = GetFirstGuidHob (&gEmuThunkProtocolGuid);
ASSERT (GuidHob != NULL); ASSERT (GuidHob != NULL);
gEmuThunk = (EMU_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob))); gEmuThunk = (EMU_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));
ASSERT (gEmuThunk != NULL); ASSERT (gEmuThunk != NULL);
return EFI_SUCCESS; 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. Protocol instance.
@param Protocol Protocol to search for. @param Protocol Protocol to search for.
@ -70,19 +70,19 @@ GetIoThunkInstance (
{ {
EFI_STATUS Status; EFI_STATUS Status;
EMU_IO_THUNK_PROTOCOL *EmuIoThunk; EMU_IO_THUNK_PROTOCOL *EmuIoThunk;
for (Status = EFI_SUCCESS, EmuIoThunk = NULL; !EFI_ERROR (Status); ) { for (Status = EFI_SUCCESS, EmuIoThunk = NULL; !EFI_ERROR (Status); ) {
Status = gEmuThunk->GetNextProtocol (FALSE, &EmuIoThunk); Status = gEmuThunk->GetNextProtocol (FALSE, &EmuIoThunk);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
break; break;
} }
if (EmuIoThunk->Instance == Instance) { if (EmuIoThunk->Instance == Instance) {
if (CompareGuid (EmuIoThunk->Protocol, Protocol)) { if (CompareGuid (EmuIoThunk->Protocol, Protocol)) {
return EmuIoThunk; return EmuIoThunk;
} }
} }
} }
return NULL; return NULL;
} }

View File

@ -1,10 +1,10 @@
## @file ## @file
# A library to produce the global variable 'gEmuThunk' # 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. # initialize that global.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -22,7 +22,7 @@
FILE_GUID = 31479AFD-B06F-4E4A-863B-A8F7E7710778 FILE_GUID = 31479AFD-B06F-4E4A-863B-A8F7E7710778
MODULE_TYPE = DXE_DRIVER MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = EmuThunkLib LIBRARY_CLASS = EmuThunkLib
CONSTRUCTOR = DxeEmuLibConstructor CONSTRUCTOR = DxeEmuLibConstructor

View File

@ -1,7 +1,7 @@
/** @file /** @file
Provides services to perform additional actions to relocate and unload Provides services to perform additional actions to relocate and unload
PE/Coff image for Emu environment specific purpose such as souce level debug. 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> Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2011, Apple Inc. 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> #include <Library/PeCoffExtraActionLib.h>
// //
// Cache of UnixThunk protocol // Cache of UnixThunk protocol
// //
EMU_THUNK_PROTOCOL *mThunk = NULL; EMU_THUNK_PROTOCOL *mThunk = NULL;
@ -84,9 +84,9 @@ PeCoffLoaderRelocateImageExtraAction (
/** /**
Performs additional actions just before a PE/COFF image is unloaded. Any resources Performs additional actions just before a PE/COFF image is unloaded. Any resources
that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed. that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
If ImageContext is NULL, then ASSERT(). If ImageContext is NULL, then ASSERT().
@param ImageContext Pointer to the image context structure that describes the @param ImageContext Pointer to the image context structure that describes the
PE/COFF image that is being unloaded. PE/COFF image that is being unloaded.

View File

@ -2,7 +2,7 @@
# PeCoff extra action libary for DXE phase that run Emu emulator. # PeCoff extra action libary for DXE phase that run Emu emulator.
# #
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -1,6 +1,6 @@
/** @file /** @file
Serial Port Lib that thunks back to Emulator services to write to StdErr. Serial Port Lib that thunks back to Emulator services to write to StdErr.
All read functions are stubed out. All read functions are stubed out.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR> Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR>
@ -24,11 +24,11 @@
/** /**
Initialize the serial device hardware. Initialize the serial device hardware.
If no initialization is required, then return RETURN_SUCCESS. If no initialization is required, then return RETURN_SUCCESS.
If the serial device was successfully initialized, 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. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
@retval RETURN_SUCCESS The serial device was initialized. @retval RETURN_SUCCESS The serial device was initialized.
@retval RETURN_DEVICE_ERROR The serial device could not be initialized. @retval RETURN_DEVICE_ERROR The serial device could not be initialized.
@ -43,19 +43,19 @@ SerialPortInitialize (
} }
/** /**
Write data from buffer to serial device. Write data from buffer to serial device.
Writes NumberOfBytes data bytes from Buffer to the serial device. Writes NumberOfBytes data bytes from Buffer to the serial device.
The number of bytes actually written to the serial device is returned. 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 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. If NumberOfBytes is zero, then return 0.
@param Buffer The pointer to the data buffer to be written. @param Buffer The pointer to the data buffer to be written.
@param NumberOfBytes The number of bytes to written to the serial device. @param NumberOfBytes The number of bytes to written to the serial device.
@retval 0 NumberOfBytes is 0. @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. 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. Read data from serial device and save the datas in buffer.
Reads NumberOfBytes data bytes from a serial device into the 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 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. If NumberOfBytes is zero, then return 0.
@param Buffer The pointer to the data buffer to store the data read from the serial device. @param Buffer The pointer to the data buffer to store the data read from the serial device.

View File

@ -2,7 +2,7 @@
# Write only instance of Serial Port Library with empty functions. # Write only instance of Serial Port Library with empty functions.
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -30,11 +30,11 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec EmulatorPkg/EmulatorPkg.dec
[LibraryClasses] [LibraryClasses]
EmuThunkLib EmuThunkLib

View File

@ -1,6 +1,6 @@
/** @file /** @file
Serial Port Lib that thunks back to Emulator services to write to StdErr. Serial Port Lib that thunks back to Emulator services to write to StdErr.
All read functions are stubed out. All read functions are stubed out.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR> Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR>
@ -24,11 +24,11 @@
/** /**
Initialize the serial device hardware. Initialize the serial device hardware.
If no initialization is required, then return RETURN_SUCCESS. If no initialization is required, then return RETURN_SUCCESS.
If the serial device was successfully initialized, 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. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
@retval RETURN_SUCCESS The serial device was initialized. @retval RETURN_SUCCESS The serial device was initialized.
@retval RETURN_DEVICE_ERROR The serial device could not be initialized. @retval RETURN_DEVICE_ERROR The serial device could not be initialized.
@ -43,19 +43,19 @@ SerialPortInitialize (
} }
/** /**
Write data from buffer to serial device. Write data from buffer to serial device.
Writes NumberOfBytes data bytes from Buffer to the serial device. Writes NumberOfBytes data bytes from Buffer to the serial device.
The number of bytes actually written to the serial device is returned. 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 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. If NumberOfBytes is zero, then return 0.
@param Buffer The pointer to the data buffer to be written. @param Buffer The pointer to the data buffer to be written.
@param NumberOfBytes The number of bytes to written to the serial device. @param NumberOfBytes The number of bytes to written to the serial device.
@retval 0 NumberOfBytes is 0. @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. 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. Read data from serial device and save the datas in buffer.
Reads NumberOfBytes data bytes from a serial device into the 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 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. If NumberOfBytes is zero, then return 0.
@param Buffer The pointer to the data buffer to store the data read from the serial device. @param Buffer The pointer to the data buffer to store the data read from the serial device.

View File

@ -2,7 +2,7 @@
# Write only instance of Serial Port Library with empty functions. # Write only instance of Serial Port Library with empty functions.
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -30,11 +30,11 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec EmulatorPkg/EmulatorPkg.dec
[LibraryClasses] [LibraryClasses]
EmuThunkLib EmuThunkLib

View File

@ -36,15 +36,15 @@ RegisterTimerArchProtocol (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
Status = gBS->LocateProtocol (&gEfiTimerArchProtocolGuid, NULL, (VOID **)&gTimerAp); Status = gBS->LocateProtocol (&gEfiTimerArchProtocolGuid, NULL, (VOID **)&gTimerAp);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Status = gTimerAp->GetTimerPeriod (gTimerAp, &gTimerPeriod); Status = gTimerAp->GetTimerPeriod (gTimerAp, &gTimerPeriod);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
// Convert to Nanoseconds. // Convert to Nanoseconds.
gTimerPeriod = MultU64x32 (gTimerPeriod, 100); gTimerPeriod = MultU64x32 (gTimerPeriod, 100);
if (gTimerEvent == NULL) { if (gTimerEvent == NULL) {
Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, (VOID **)&gTimerEvent); Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, (VOID **)&gTimerEvent);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
@ -93,21 +93,21 @@ NanoSecondDelay (
EFI_STATUS Status; EFI_STATUS Status;
UINT64 HundredNanoseconds; UINT64 HundredNanoseconds;
UINTN Index; UINTN Index;
if ((gTimerPeriod != 0) && if ((gTimerPeriod != 0) &&
((UINT64)NanoSeconds > gTimerPeriod) && ((UINT64)NanoSeconds > gTimerPeriod) &&
(EfiGetCurrentTpl () == TPL_APPLICATION)) { (EfiGetCurrentTpl () == TPL_APPLICATION)) {
// //
// This stall is long, so use gBS->WaitForEvent () to yield CPU to DXE Core // This stall is long, so use gBS->WaitForEvent () to yield CPU to DXE Core
// //
HundredNanoseconds = DivU64x32 (NanoSeconds, 100); HundredNanoseconds = DivU64x32 (NanoSeconds, 100);
Status = gBS->SetTimer (gTimerEvent, TimerRelative, HundredNanoseconds); Status = gBS->SetTimer (gTimerEvent, TimerRelative, HundredNanoseconds);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = gBS->WaitForEvent (sizeof (gTimerEvent)/sizeof (EFI_EVENT), &gTimerEvent, &Index); Status = gBS->WaitForEvent (sizeof (gTimerEvent)/sizeof (EFI_EVENT), &gTimerEvent, &Index);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
} else { } else {
gEmuThunk->Sleep (NanoSeconds); gEmuThunk->Sleep (NanoSeconds);
} }
@ -172,7 +172,7 @@ GetPerformanceCounterProperties (
if (EndValue != NULL) { if (EndValue != NULL) {
*EndValue = (UINT64)-1LL; *EndValue = (UINT64)-1LL;
} }
return gEmuThunk->QueryPerformanceFrequency (); return gEmuThunk->QueryPerformanceFrequency ();
} }

View File

@ -46,6 +46,6 @@
EmuThunkLib EmuThunkLib
UefiLib UefiLib
UefiBootServicesTableLib UefiBootServicesTableLib
[Protocols] [Protocols]
gEfiTimerArchProtocolGuid gEfiTimerArchProtocolGuid

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2009, 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 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.
**/ **/
@ -93,14 +93,14 @@ Routine Description:
Arguments: Arguments:
PlatformConsole - Predfined platform default console device array. PlatformConsole - Predfined platform default console device array.
Returns: Returns:
EFI_SUCCESS - Success connect at least one ConIn and ConOut EFI_SUCCESS - Success connect at least one ConIn and ConOut
device, there must have one ConOut device is device, there must have one ConOut device is
active vga device. active vga device.
EFI_STATUS - Return the status of EFI_STATUS - Return the status of
BdsLibConnectAllDefaultConsoles () BdsLibConnectAllDefaultConsoles ()
**/ **/
@ -149,17 +149,17 @@ PlatformBdsConnectSequence (
Routine Description: Routine Description:
Connect with predeined platform connect sequence, Connect with predeined platform connect sequence,
the OEM/IBV can customize with their own connect sequence. the OEM/IBV can customize with their own connect sequence.
Arguments: Arguments:
None. None.
Returns: Returns:
None. None.
**/ **/
{ {
UINTN Index; UINTN Index;
@ -195,15 +195,15 @@ Routine Description:
Load the predefined driver option, OEM/IBV can customize this Load the predefined driver option, OEM/IBV can customize this
to load their own drivers to load their own drivers
Arguments: Arguments:
BdsDriverLists - The header of the driver option link list. BdsDriverLists - The header of the driver option link list.
Returns: Returns:
None. None.
**/ **/
{ {
UINTN Index; UINTN Index;
@ -235,19 +235,19 @@ Routine Description:
Perform the platform diagnostic, such like test memory. OEM/IBV also Perform the platform diagnostic, such like test memory. OEM/IBV also
can customize this fuction to support specific platform diagnostic. can customize this fuction to support specific platform diagnostic.
Arguments: Arguments:
MemoryTestLevel - The memory test intensive level MemoryTestLevel - The memory test intensive level
QuietBoot - Indicate if need to enable the quiet boot QuietBoot - Indicate if need to enable the quiet boot
BaseMemoryTest - A pointer to BdsMemoryTest() BaseMemoryTest - A pointer to BdsMemoryTest()
Returns: Returns:
None. None.
**/ **/
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -291,11 +291,11 @@ Routine Description:
The function will excute with as the platform policy, current policy 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 is driven by boot mode. IBV/OEM can customize this code for their specific
policy action. policy action.
Arguments: Arguments:
DriverOptionList - The header of the driver option link list DriverOptionList - The header of the driver option link list
BootOptionList - The header of the boot option link list BootOptionList - The header of the boot option link list
ProcessCapsules - A pointer to ProcessCapsules() ProcessCapsules - A pointer to ProcessCapsules()
@ -305,7 +305,7 @@ Arguments:
Returns: Returns:
None. None.
**/ **/
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -431,7 +431,7 @@ PlatformBdsBootSuccess (
/*++ /*++
Routine Description: Routine Description:
Hook point after a boot attempt succeeds. We don't expect a boot option to 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 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 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. Option - Pointer to Boot Option that succeeded to boot.
Returns: Returns:
None. None.
**/ **/
@ -471,11 +471,11 @@ PlatformBdsBootFail (
/*++ /*++
Routine Description: Routine Description:
Hook point after a boot attempt fails. Hook point after a boot attempt fails.
Arguments: Arguments:
Option - Pointer to Boot Option that failed to boot. Option - Pointer to Boot Option that failed to boot.
Status - Status returned from failed boot. Status - Status returned from failed boot.
@ -485,7 +485,7 @@ Arguments:
ExitDataSize - Exit data size returned from failed boot. ExitDataSize - Exit data size returned from failed boot.
Returns: Returns:
None. None.
**/ **/
@ -510,16 +510,16 @@ PlatformBdsNoConsoleAction (
/*++ /*++
Routine Description: Routine Description:
This function is remained for IBV/OEM to do some platform action, This function is remained for IBV/OEM to do some platform action,
if there no console device can be connected. if there no console device can be connected.
Arguments: Arguments:
None. None.
Returns: Returns:
EFI_SUCCESS - Direct return success now. EFI_SUCCESS - Direct return success now.
**/ **/

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, 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 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.
**/ **/

View File

@ -3,7 +3,7 @@
# #
# Do platform action customized by IBV/OEM. # Do platform action customized by IBV/OEM.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -21,7 +21,7 @@
FILE_GUID = 59569181-CBF8-2E44-9C3E-C2AB2F5608E1 FILE_GUID = 59569181-CBF8-2E44-9C3E-C2AB2F5608E1
MODULE_TYPE = DXE_DRIVER MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
# #
@ -61,6 +61,6 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
[Depex] [Depex]
gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2009, 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 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.
**/ **/

View File

@ -1,23 +1,23 @@
/** @file /** @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. on boot services for Dxe phase drivers using OS malloc.
OS malloc is used so OS based malloc debugging tools can be used. OS malloc is used so OS based malloc debugging tools can be used.
If a single driver links against this lib protocols from other If a single driver links against this lib protocols from other
drivers, or EFI boot services can return a buffer that needs to drivers, or EFI boot services can return a buffer that needs to
freed using the EFI scheme. This is why the gEmuThunk->Free () 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 can detect if the memory rang is for EFI so the right free can be
called. called.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2009, 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 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.
**/ **/
@ -46,12 +46,12 @@
**/ **/
VOID * VOID *
InternalAllocatePages ( InternalAllocatePages (
IN EFI_MEMORY_TYPE MemoryType, IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages IN UINTN Pages
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS Memory; EFI_PHYSICAL_ADDRESS Memory;
if (Pages == 0) { if (Pages == 0) {
return NULL; return NULL;
@ -134,11 +134,11 @@ AllocateReservedPages (
must have been allocated on a previous call to the page allocation services of the Memory 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 Allocation Library. If it is not possible to free allocated pages, then this function will
perform no actions. perform no actions.
If Buffer was not allocated with a page allocation function in the Memory Allocation Library, If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
then ASSERT(). then ASSERT().
If Pages is zero, then ASSERT(). If Pages is zero, then ASSERT().
@param Buffer The pointer to the buffer of pages to free. @param Buffer The pointer to the buffer of pages to free.
@param Pages The number of 4 KB pages to free. @param Pages The number of 4 KB pages to free.
@ -155,7 +155,7 @@ FreePages (
ASSERT (Pages != 0); ASSERT (Pages != 0);
if (!gEmuThunk->Free (Buffer)) { if (!gEmuThunk->Free (Buffer)) {
// The Free thunk will not free memory allocated in emulated EFI memory. // 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. // times protocols or EFI BootServices can return dynamically allocated buffers.
Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
@ -181,7 +181,7 @@ FreePages (
**/ **/
VOID * VOID *
InternalAllocateAlignedPages ( InternalAllocateAlignedPages (
IN EFI_MEMORY_TYPE MemoryType, IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages, IN UINTN Pages,
IN UINTN Alignment IN UINTN Alignment
) )
@ -197,7 +197,7 @@ InternalAllocateAlignedPages (
// Alignment must be a power of two or zero. // Alignment must be a power of two or zero.
// //
ASSERT ((Alignment & (Alignment - 1)) == 0); ASSERT ((Alignment & (Alignment - 1)) == 0);
if (Pages == 0) { if (Pages == 0) {
return NULL; return NULL;
} }
@ -211,7 +211,7 @@ InternalAllocateAlignedPages (
// Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.
// //
ASSERT (RealPages > Pages); ASSERT (RealPages > Pages);
Memory = gEmuThunk->Valloc (Pages * EFI_PAGE_SIZE); Memory = gEmuThunk->Valloc (Pages * EFI_PAGE_SIZE);
if (Memory != NULL) { if (Memory != NULL) {
return NULL; return NULL;
@ -252,7 +252,7 @@ InternalAllocateAlignedPages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is 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 returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned. request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT(). 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. @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 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 returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned. request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT(). 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. @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 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 returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned. request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT(). 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. @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 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 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. perform no actions.
If Buffer was not allocated with an aligned page allocation function in the Memory Allocation If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
Library, then ASSERT(). Library, then ASSERT().
If Pages is zero, then ASSERT(). If Pages is zero, then ASSERT().
@param Buffer The pointer to the buffer of pages to free. @param Buffer The pointer to the buffer of pages to free.
@param Pages The number of 4 KB pages to free. @param Pages The number of 4 KB pages to free.
@ -368,7 +368,7 @@ FreeAlignedPages (
**/ **/
VOID * VOID *
InternalAllocatePool ( InternalAllocatePool (
IN EFI_MEMORY_TYPE MemoryType, IN EFI_MEMORY_TYPE MemoryType,
IN UINTN AllocationSize IN UINTN AllocationSize
) )
{ {
@ -454,9 +454,9 @@ AllocateReservedPool (
**/ **/
VOID * VOID *
InternalAllocateZeroPool ( InternalAllocateZeroPool (
IN EFI_MEMORY_TYPE PoolType, IN EFI_MEMORY_TYPE PoolType,
IN UINTN AllocationSize IN UINTN AllocationSize
) )
{ {
VOID *Memory; VOID *Memory;
@ -541,7 +541,7 @@ AllocateReservedZeroPool (
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there 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. is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT(). 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 PoolType The type of pool to allocate.
@param AllocationSize The number of bytes to allocate and zero. @param AllocationSize The number of bytes to allocate and zero.
@ -552,10 +552,10 @@ AllocateReservedZeroPool (
**/ **/
VOID * VOID *
InternalAllocateCopyPool ( InternalAllocateCopyPool (
IN EFI_MEMORY_TYPE PoolType, IN EFI_MEMORY_TYPE PoolType,
IN UINTN AllocationSize, IN UINTN AllocationSize,
IN CONST VOID *Buffer IN CONST VOID *Buffer
) )
{ {
VOID *Memory; VOID *Memory;
@ -567,7 +567,7 @@ InternalAllocateCopyPool (
Memory = CopyMem (Memory, Buffer, AllocationSize); Memory = CopyMem (Memory, Buffer, AllocationSize);
} }
return Memory; return Memory;
} }
/** /**
Copies a buffer to an allocated buffer of type EfiBootServicesData. 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 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 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. is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT(). 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 AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer. @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 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 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. is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT(). 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 AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer. @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 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 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. is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT(). 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 AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer. @param Buffer The buffer to copy to the allocated buffer.
@ -654,19 +654,19 @@ AllocateReservedCopyPool (
Reallocates a buffer of a specified memory type. Reallocates a buffer of a specified memory type.
Allocates and zeros the number bytes specified by NewSize from memory of the 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 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 NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned. 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 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. 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 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(). is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
@param PoolType The type of pool to allocate. @param PoolType The type of pool to allocate.
@param OldSize The size, in bytes, of OldBuffer. @param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate. @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. parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails. @return A pointer to the allocated buffer or NULL if allocation fails.
@ -674,7 +674,7 @@ AllocateReservedCopyPool (
**/ **/
VOID * VOID *
InternalReallocatePool ( InternalReallocatePool (
IN EFI_MEMORY_TYPE PoolType, IN EFI_MEMORY_TYPE PoolType,
IN UINTN OldSize, IN UINTN OldSize,
IN UINTN NewSize, IN UINTN NewSize,
IN VOID *OldBuffer OPTIONAL IN VOID *OldBuffer OPTIONAL
@ -694,18 +694,18 @@ InternalReallocatePool (
Reallocates a buffer of type EfiBootServicesData. Reallocates a buffer of type EfiBootServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type 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 EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, 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. 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 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. 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 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(). is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
@param OldSize The size, in bytes, of OldBuffer. @param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate. @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. parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails. @return A pointer to the allocated buffer or NULL if allocation fails.
@ -726,10 +726,10 @@ ReallocatePool (
Reallocates a buffer of type EfiRuntimeServicesData. Reallocates a buffer of type EfiRuntimeServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type 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 EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, 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. 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 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. 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 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 OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate. @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. parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails. @return A pointer to the allocated buffer or NULL if allocation fails.
@ -758,10 +758,10 @@ ReallocateRuntimePool (
Reallocates a buffer of type EfiReservedMemoryType. Reallocates a buffer of type EfiReservedMemoryType.
Allocates and zeros the number bytes specified by NewSize from memory of type 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 EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, 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. 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 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. 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 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 OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate. @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. parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails. @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 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 pool allocation services of the Memory Allocation Library. If it is not possible to free pool
resources, then this function will perform no actions. resources, then this function will perform no actions.
If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
then ASSERT(). then ASSERT().
@ -810,7 +810,7 @@ FreePool (
if (!gEmuThunk->Free (Buffer)) { if (!gEmuThunk->Free (Buffer)) {
// The Free thunk will not free memory allocated in emulated EFI memory. // 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. // times protocols or EFI BootServices can return dynamically allocated buffers.
Status = gBS->FreePool (Buffer); Status = gBS->FreePool (Buffer);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);

View File

@ -1,6 +1,6 @@
/*++ @file /*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved. Copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials 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

View File

@ -1,10 +1,10 @@
## @file ## @file
# A library to produce the global variable 'gEmuThunk' # 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. # initialize that global.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -22,7 +22,7 @@
FILE_GUID = 6B7067C7-A843-A34C-9530-48446963B740 FILE_GUID = 6B7067C7-A843-A34C-9530-48446963B740
MODULE_TYPE = DXE_DRIVER MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = KeyMapLib LIBRARY_CLASS = KeyMapLib
[Sources] [Sources]
KeyMapLibNull.c KeyMapLibNull.c

View File

@ -6,7 +6,7 @@
# read-only memory. # read-only memory.
# #
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -1,6 +1,6 @@
/** @file /** @file
PEI Services Table Pointer Library. PEI Services Table Pointer Library.
This library is used for PEIM which does executed from flash device directly but This library is used for PEIM which does executed from flash device directly but
executed in memory. executed in memory.
@ -22,14 +22,14 @@
CONST EFI_PEI_SERVICES **gPeiServices; CONST EFI_PEI_SERVICES **gPeiServices;
/** /**
Caches a pointer PEI Services Table. Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer 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 in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification. Pre-EFI Initialization Core Interface Specification.
If PeiServicesTablePointer is NULL, then ASSERT(). If PeiServicesTablePointer is NULL, then ASSERT().
@param PeiServicesTablePointer The address of PeiServices pointer. @param PeiServicesTablePointer The address of PeiServices pointer.
**/ **/
VOID VOID
@ -45,10 +45,10 @@ SetPeiServicesTablePointer (
/** /**
Retrieves the cached value of the PEI Services Table pointer. 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 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 as specified in the CPU binding section of the Platform Initialization Pre-EFI
Initialization Core Interface Specification. Initialization Core Interface Specification.
If the cached PEI Services Table pointer is NULL, then ASSERT(). If the cached PEI Services Table pointer is NULL, then ASSERT().
@return The pointer to PeiServices. @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.
The constructor function caches the pointer to PEI services. The constructor function caches the pointer to PEI services.
It will always return EFI_SUCCESS. It will always return EFI_SUCCESS.

View File

@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/EmuMagicPageLib.h> #include <Library/EmuMagicPageLib.h>
// //
// Cache of UnixThunk protocol // Cache of UnixThunk protocol
// //
EMU_THUNK_PROTOCOL *mThunk = NULL; EMU_THUNK_PROTOCOL *mThunk = NULL;
@ -45,7 +45,7 @@ EmuPeCoffGetThunkStucture (
EMU_THUNK_PPI *ThunkPpi; EMU_THUNK_PPI *ThunkPpi;
EFI_STATUS Status; EFI_STATUS Status;
// //
// Locate Unix ThunkPpi for retrieving standard output handle // 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 Performs additional actions just before a PE/COFF image is unloaded. Any resources
that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed. that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
If ImageContext is NULL, then ASSERT(). If ImageContext is NULL, then ASSERT().
@param ImageContext Pointer to the image context structure that describes the @param ImageContext Pointer to the image context structure that describes the
PE/COFF image that is being unloaded. PE/COFF image that is being unloaded.

View File

@ -3,7 +3,7 @@
# #
# Lib to provide memory journal status code reporting Routines # Lib to provide memory journal status code reporting Routines
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -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. 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 The reason is Emu package needs to load the image to memory to support source
level debug. level debug.
@param Pe32Data Pointer to a PE/COFF header @param Pe32Data Pointer to a PE/COFF header
@ -84,7 +84,7 @@ EFIAPI
PeCoffLoaderGetMachineType ( PeCoffLoaderGetMachineType (
IN VOID *Pe32Data IN VOID *Pe32Data
) )
{ {
EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr;
EFI_IMAGE_DOS_HEADER *DosHdr; EFI_IMAGE_DOS_HEADER *DosHdr;
@ -270,7 +270,7 @@ PeCoffGetSizeOfHeaders (
UINTN SizeOfHeaders; UINTN SizeOfHeaders;
ASSERT (Pe32Data != NULL); ASSERT (Pe32Data != NULL);
DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data; DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;
if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) { if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
// //

View File

@ -3,7 +3,7 @@
# #
# PeCoffGetEntryPointLib library class for NT32 instance implemented by use NTPeiLoadFile PPI. # PeCoffGetEntryPointLib library class for NT32 instance implemented by use NTPeiLoadFile PPI.
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -21,7 +21,7 @@
FILE_GUID = 1CBED347-7DE6-BC48-AC68-3758598124D2 FILE_GUID = 1CBED347-7DE6-BC48-AC68-3758598124D2
MODULE_TYPE = PEIM MODULE_TYPE = PEIM
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = PeCoffGetEntryPointLib LIBRARY_CLASS = PeCoffGetEntryPointLib
# #

View File

@ -1,6 +1,6 @@
/** @file /** @file
Serial Port Lib that thunks back to Emulator services to write to StdErr. 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 All read functions are stubed out. There is no constructor so this lib can
be linked with PEI Core. be linked with PEI Core.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
@ -27,11 +27,11 @@
/** /**
Initialize the serial device hardware. Initialize the serial device hardware.
If no initialization is required, then return RETURN_SUCCESS. If no initialization is required, then return RETURN_SUCCESS.
If the serial device was successfully initialized, 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. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
@retval RETURN_SUCCESS The serial device was initialized. @retval RETURN_SUCCESS The serial device was initialized.
@retval RETURN_DEVICE_ERROR The serial device could not be initialized. @retval RETURN_DEVICE_ERROR The serial device could not be initialized.
@ -46,19 +46,19 @@ SerialPortInitialize (
} }
/** /**
Write data from buffer to serial device. Write data from buffer to serial device.
Writes NumberOfBytes data bytes from Buffer to the serial device. Writes NumberOfBytes data bytes from Buffer to the serial device.
The number of bytes actually written to the serial device is returned. 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 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. If NumberOfBytes is zero, then return 0.
@param Buffer The pointer to the data buffer to be written. @param Buffer The pointer to the data buffer to be written.
@param NumberOfBytes The number of bytes to written to the serial device. @param NumberOfBytes The number of bytes to written to the serial device.
@retval 0 NumberOfBytes is 0. @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. If this value is less than NumberOfBytes, then the read operation failed.
**/ **/
@ -86,18 +86,18 @@ SerialPortWrite (
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk (); Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
return Thunk->WriteStdErr (Buffer, NumberOfBytes); return Thunk->WriteStdErr (Buffer, NumberOfBytes);
} }
return 0; return 0;
} }
/** /**
Read data from serial device and save the datas in buffer. Read data from serial device and save the datas in buffer.
Reads NumberOfBytes data bytes from a serial device into the 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 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. If NumberOfBytes is zero, then return 0.
@param Buffer The pointer to the data buffer to store the data read from the serial device. @param Buffer The pointer to the data buffer to store the data read from the serial device.

View File

@ -2,7 +2,7 @@
# Write only instance of Serial Port Library with empty functions. # Write only instance of Serial Port Library with empty functions.
# #
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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
@ -33,7 +33,7 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec EmulatorPkg/EmulatorPkg.dec
[LibraryClasses] [LibraryClasses]
PeiServicesLib PeiServicesLib
@ -41,5 +41,5 @@
gEmuThunkPpiGuid # PPI ALWAYS_CONSUMED gEmuThunkPpiGuid # PPI ALWAYS_CONSUMED

View File

@ -1,11 +1,11 @@
/** @file /** @file
PEI Services Table Pointer Library. PEI Services Table Pointer Library.
This library is used for PEIM which does executed from flash device directly but This library is used for PEIM which does executed from flash device directly but
executed in memory. executed in memory.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 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 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
@ -26,14 +26,14 @@
CONST EFI_PEI_SERVICES **gPeiServices = NULL; CONST EFI_PEI_SERVICES **gPeiServices = NULL;
/** /**
Caches a pointer PEI Services Table. Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer 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 in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification. Pre-EFI Initialization Core Interface Specification.
If PeiServicesTablePointer is NULL, then ASSERT(). If PeiServicesTablePointer is NULL, then ASSERT().
@param PeiServicesTablePointer The address of PeiServices pointer. @param PeiServicesTablePointer The address of PeiServices pointer.
**/ **/
VOID VOID
@ -50,10 +50,10 @@ SetPeiServicesTablePointer (
/** /**
Retrieves the cached value of the PEI Services Table pointer. 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 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 as specified in the CPU binding section of the Platform Initialization Pre-EFI
Initialization Core Interface Specification. Initialization Core Interface Specification.
If the cached PEI Services Table pointer is NULL, then ASSERT(). If the cached PEI Services Table pointer is NULL, then ASSERT().
@return The pointer to PeiServices. @return The pointer to PeiServices.
@ -101,13 +101,13 @@ PeiServicesTablePointerNotifyCallback (
EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnThunkList = { EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnThunkList = {
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiPeiMemoryDiscoveredPpiGuid, &gEfiPeiMemoryDiscoveredPpiGuid,
PeiServicesTablePointerNotifyCallback PeiServicesTablePointerNotifyCallback
}; };
/** /**
Constructor register notification on when PPI updates. If PPI is Constructor register notification on when PPI updates. If PPI is
alreay installed registering the notify will cause the handle to alreay installed registering the notify will cause the handle to
run. run.
@param FileHandle The handle of FFS header the loaded driver. @param FileHandle The handle of FFS header the loaded driver.

View File

@ -6,7 +6,7 @@
# read-only memory. # read-only memory.
# #
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -1,12 +1,12 @@
/** @file /** @file
PEI Services Table Pointer Library. PEI Services Table Pointer Library.
Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage. Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage.
This emulates a platform SRAM. The PI mechaism does not work in the emulator due to This emulates a platform SRAM. The PI mechaism does not work in the emulator due to
lack of privledge. lack of privledge.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 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 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
@ -24,14 +24,14 @@
/** /**
Caches a pointer PEI Services Table. Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer 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 in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification. Pre-EFI Initialization Core Interface Specification.
If PeiServicesTablePointer is NULL, then ASSERT(). If PeiServicesTablePointer is NULL, then ASSERT().
@param PeiServicesTablePointer The address of PeiServices pointer. @param PeiServicesTablePointer The address of PeiServices pointer.
**/ **/
VOID VOID
@ -48,10 +48,10 @@ SetPeiServicesTablePointer (
/** /**
Retrieves the cached value of the PEI Services Table pointer. 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 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 as specified in the CPU binding section of the Platform Initialization Pre-EFI
Initialization Core Interface Specification. Initialization Core Interface Specification.
If the cached PEI Services Table pointer is NULL, then ASSERT(). If the cached PEI Services Table pointer is NULL, then ASSERT().
@return The pointer to PeiServices. @return The pointer to PeiServices.
@ -64,7 +64,7 @@ GetPeiServicesTablePointer (
) )
{ {
CONST EFI_PEI_SERVICES **PeiServicesTablePointer; CONST EFI_PEI_SERVICES **PeiServicesTablePointer;
PeiServicesTablePointer = EMU_MAGIC_PAGE()->PeiServicesTablePointer; PeiServicesTablePointer = EMU_MAGIC_PAGE()->PeiServicesTablePointer;
ASSERT (PeiServicesTablePointer != NULL); ASSERT (PeiServicesTablePointer != NULL);
ASSERT (*PeiServicesTablePointer != NULL); ASSERT (*PeiServicesTablePointer != NULL);

View File

@ -1,12 +1,12 @@
## @file ## @file
# PEI Services Table Pointer Library. # PEI Services Table Pointer Library.
# #
# Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage. # Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage.
# This emulates a platform SRAM. The PI mechaism does not work in the emulator due to # This emulates a platform SRAM. The PI mechaism does not work in the emulator due to
# lack of privledge. # lack of privledge.
# #
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -60,7 +60,7 @@ NanoSecondDelay (
EMU_THUNK_PROTOCOL *Thunk; EMU_THUNK_PROTOCOL *Thunk;
// //
// Locate EmuThunkPpi for // Locate EmuThunkPpi for
// //
Status = PeiServicesLocatePpi ( Status = PeiServicesLocatePpi (
&gEmuThunkPpiGuid, &gEmuThunkPpiGuid,
@ -68,7 +68,7 @@ NanoSecondDelay (
NULL, NULL,
(VOID **) &ThunkPpi (VOID **) &ThunkPpi
); );
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk (); Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
Thunk->Sleep (NanoSeconds * 100); Thunk->Sleep (NanoSeconds * 100);
return NanoSeconds; return NanoSeconds;
@ -99,7 +99,7 @@ GetPerformanceCounter (
EMU_THUNK_PROTOCOL *Thunk; EMU_THUNK_PROTOCOL *Thunk;
// //
// Locate EmuThunkPpi for // Locate EmuThunkPpi for
// //
Status = PeiServicesLocatePpi ( Status = PeiServicesLocatePpi (
&gEmuThunkPpiGuid, &gEmuThunkPpiGuid,
@ -107,7 +107,7 @@ GetPerformanceCounter (
NULL, NULL,
(VOID **) &ThunkPpi (VOID **) &ThunkPpi
); );
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk (); Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
return Thunk->QueryPerformanceCounter (); return Thunk->QueryPerformanceCounter ();
} }
@ -150,7 +150,7 @@ GetPerformanceCounterProperties (
EMU_THUNK_PROTOCOL *Thunk; EMU_THUNK_PROTOCOL *Thunk;
// //
// Locate EmuThunkPpi for // Locate EmuThunkPpi for
// //
Status = PeiServicesLocatePpi ( Status = PeiServicesLocatePpi (
&gEmuThunkPpiGuid, &gEmuThunkPpiGuid,
@ -165,7 +165,7 @@ GetPerformanceCounterProperties (
if (EndValue != NULL) { if (EndValue != NULL) {
*EndValue = (UINT64)-1LL; *EndValue = (UINT64)-1LL;
} }
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk (); Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
return Thunk->QueryPerformanceFrequency (); return Thunk->QueryPerformanceFrequency ();
} }

View File

@ -3,13 +3,13 @@
FV. FV.
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/
@ -70,7 +70,7 @@ Arguments:
Returns: Returns:
Checksum of the header. Checksum of the header.
**/ **/
{ {
UINT8 *ptr; UINT8 *ptr;

View File

@ -87,8 +87,8 @@ PeiServicesReInstallPpi (
/** /**
This service enables PEIMs to discover a given instance of an interface. 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 So this is, well a hack, so we can reuse the same libraries as the PEI Core
for XIP modules.... for XIP modules....
@param Guid A pointer to the GUID whose corresponding interface needs to be @param Guid A pointer to the GUID whose corresponding interface needs to be
found. found.
@ -110,11 +110,11 @@ PeiServicesLocatePpi (
) )
{ {
EFI_PEI_PPI_DESCRIPTOR *PpiList; EFI_PEI_PPI_DESCRIPTOR *PpiList;
if (Instance != 0) { if (Instance != 0) {
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
for (PpiList = EMU_MAGIC_PAGE()->PpiList; ; PpiList++) { for (PpiList = EMU_MAGIC_PAGE()->PpiList; ; PpiList++) {
if (CompareGuid (PpiList->Guid, Guid)) { if (CompareGuid (PpiList->Guid, Guid)) {
if (PpiDescriptor != NULL) { if (PpiDescriptor != NULL) {
@ -125,13 +125,13 @@ PeiServicesLocatePpi (
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) == EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) { if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) == EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {
break; break;
} }
} }
return EFI_NOT_FOUND; 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 This service enables PEIMs to register a given service to be invoked when another service is
installed or reinstalled. 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. that the caller shall install.
@retval EFI_SUCCESS The interface was successfully installed. @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. 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. will initialize.
@retval EFI_SUCCESS The list was successfully returned. @retval EFI_SUCCESS The list was successfully returned.
@retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published. @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 Type The type of HOB to be installed.
@param Length The length of the HOB to be added. @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. HOB header.
@retval EFI_SUCCESS The HOB was successfully created. @retval EFI_SUCCESS The HOB was successfully created.
@ -244,7 +244,7 @@ PeiServicesCreateHob (
/** /**
This service enables PEIMs to discover additional firmware volumes. 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). value 0 is the Boot Firmware Volume (BFV).
@param VolumeHandle Handle of the firmware volume header of the volume @param VolumeHandle Handle of the firmware volume header of the volume
to return. to return.
@ -269,9 +269,9 @@ PeiServicesFfsFindNextVolume (
This service enables PEIMs to discover additional firmware files. This service enables PEIMs to discover additional firmware files.
@param SearchType A filter to find files only of this type. @param SearchType A filter to find files only of this type.
@param VolumeHandle The pointer to the firmware volume header of the @param VolumeHandle The pointer to the firmware volume header of the
volume to search. This parameter must point to a volume to search. This parameter must point to a
valid FFS volume. valid FFS volume.
@param FileHandle Handle of the current file from which to begin searching. @param FileHandle Handle of the current file from which to begin searching.
@retval EFI_SUCCESS The file was found. @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. 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 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. of sections to be searched.
@param SectionData A pointer to the discovered section, if successful. @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. This service allocates memory from the Hand-Off Block (HOB) heap.
@param Size The number of bytes to allocate from the pool. @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. the allocate buffer; otherwise, undefined.
@retval EFI_SUCCESS The allocation was successful @retval EFI_SUCCESS The allocation was successful
@ -402,13 +402,13 @@ PeiServicesResetSystem (
} }
/** /**
This service is a wrapper for the PEI Service RegisterForShadow(), except the This service is a wrapper for the PEI Service RegisterForShadow(), except the
pointer to the PEI Services Table has been removed. See the Platform pointer to the PEI Services Table has been removed. See the Platform
Initialization Pre-EFI Initialization Core Interface Specification for details. Initialization Pre-EFI Initialization Core Interface Specification for details.
@param FileHandle PEIM's file handle. Must be the currently @param FileHandle PEIM's file handle. Must be the currently
executing PEIM. executing PEIM.
@retval EFI_SUCCESS The PEIM was successfully registered for @retval EFI_SUCCESS The PEIM was successfully registered for
shadowing. shadowing.
@ -429,9 +429,9 @@ PeiServicesRegisterForShadow (
} }
/** /**
This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services 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 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
Specification for details. Specification for details.
@param FileHandle The handle of the file. @param FileHandle The handle of the file.
@ -439,15 +439,15 @@ PeiServicesRegisterForShadow (
information. information.
@retval EFI_SUCCESS File information returned. @retval EFI_SUCCESS File information returned.
@retval EFI_INVALID_PARAMETER If FileHandle does not @retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file. represent a valid file.
@retval EFI_INVALID_PARAMETER FileInfo is NULL. @retval EFI_INVALID_PARAMETER FileInfo is NULL.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiServicesFfsGetFileInfo ( PeiServicesFfsGetFileInfo (
IN CONST EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo 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 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 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
Specification for details. Specification for details.
@param FileName A pointer to the name of the file to @param FileName A pointer to the name of the file to
find within the firmware volume. find within the firmware volume.
@ -469,7 +469,7 @@ PeiServicesFfsGetFileInfo (
@param VolumeHandle The firmware volume to search FileHandle @param VolumeHandle The firmware volume to search FileHandle
Upon exit, points to the found file's Upon exit, points to the found file's
handle or NULL if it could not be found. 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. @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 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 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
Specification for details. Specification for details.
@param VolumeHandle Handle of the volume. @param VolumeHandle Handle of the volume.
@ -503,10 +503,10 @@ PeiServicesFfsFindFileByName (
information. information.
@retval EFI_SUCCESS File information returned. @retval EFI_SUCCESS File information returned.
@retval EFI_INVALID_PARAMETER If FileHandle does not @retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file. represent a valid file.
@retval EFI_INVALID_PARAMETER If FileInfo is NULL. @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. 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. 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 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(). 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 @param FvFormat Unique identifier of the format of the memory-mapped
firmware volume. This parameter is optional and firmware volume. This parameter is optional and
may be NULL. If NULL is specified, the may be NULL. If NULL is specified, the
EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed. EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.
@param FvInfo Points to a buffer which allows the @param FvInfo Points to a buffer which allows the
EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume. EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.
The format of this buffer is specific to the FvFormat. The format of this buffer is specific to the FvFormat.
For memory-mapped firmware volumes, this typically For memory-mapped firmware volumes, this typically
points to the first byte of the firmware volume. points to the first byte of the firmware volume.
@param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped @param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped
firmware volumes, this is typically the size of firmware volumes, this is typically the size of
the firmware volume. the firmware volume.
@param ParentFvName If the new firmware volume originated from a file @param ParentFvName If the new firmware volume originated from a file
in a different firmware volume, then this parameter in a different firmware volume, then this parameter
specifies the GUID name of the originating firmware specifies the GUID name of the originating firmware
volume. Otherwise, this parameter must be NULL. volume. Otherwise, this parameter must be NULL.
@param ParentFileName If the new firmware volume originated from a file @param ParentFileName If the new firmware volume originated from a file
in a different firmware volume, then this parameter in a different firmware volume, then this parameter
specifies the GUID file name of the originating specifies the GUID file name of the originating
firmware file. Otherwise, this parameter must be NULL. firmware file. Otherwise, this parameter must be NULL.
**/ **/
VOID VOID

View File

@ -19,7 +19,7 @@
FILE_GUID = E3E4A441-8465-0F41-8AF4-F67EBE984099 FILE_GUID = E3E4A441-8465-0F41-8AF4-F67EBE984099
MODULE_TYPE = PEIM MODULE_TYPE = PEIM
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = PeiServicesLib|SEC PEIM PEI_CORE LIBRARY_CLASS = PeiServicesLib|SEC PEIM PEI_CORE
PI_SPECIFICATION_VERSION = 0x0001000A PI_SPECIFICATION_VERSION = 0x0001000A
# #

View File

@ -1,13 +1,13 @@
/*++ @file /*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials 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.
**/ **/

View File

@ -2,7 +2,7 @@
# Place thunk PPI in HOB. # Place thunk PPI in HOB.
# #
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -3,7 +3,7 @@
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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
@ -30,14 +30,14 @@ GetThunkPpiList (
) )
{ {
UINTN Index; UINTN Index;
if (gThunkPpiList == NULL) { if (gThunkPpiList == NULL) {
return NULL; return NULL;
} }
Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR)) - 1; Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR)) - 1;
gThunkPpiList[Index].Flags |= EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; gThunkPpiList[Index].Flags |= EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
return gThunkPpiList; return gThunkPpiList;
} }
@ -60,7 +60,7 @@ AddThunkPpi (
if (gThunkPpiList == NULL) { if (gThunkPpiList == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR)); Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR));
gThunkPpiList[Index].Flags = Flags; gThunkPpiList[Index].Flags = Flags;
gThunkPpiList[Index].Guid = Guid; gThunkPpiList[Index].Guid = Guid;

View File

@ -2,7 +2,7 @@
# Place thunk PPI in HOB. # Place thunk PPI in HOB.
# #
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # 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 # 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

View File

@ -3,7 +3,7 @@
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials 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
@ -38,7 +38,7 @@ LIST_ENTRY mThunkList = INITIALIZE_LIST_HEAD_VARIABLE (mThunkList);
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
AddThunkProtocol ( AddThunkProtocol (
IN EMU_IO_THUNK_PROTOCOL *ThunkIo, IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
IN CHAR16 *ConfigString, IN CHAR16 *ConfigString,
IN BOOLEAN EmuBusDriver IN BOOLEAN EmuBusDriver
) )
@ -47,11 +47,11 @@ AddThunkProtocol (
CHAR16 *SubString; CHAR16 *SubString;
UINTN Instance; UINTN Instance;
EMU_IO_THUNK_PROTOCOL_DATA *Private; EMU_IO_THUNK_PROTOCOL_DATA *Private;
if (ThunkIo == NULL) { if (ThunkIo == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
Instance = 0; Instance = 0;
StartString = AllocatePool (StrSize (ConfigString)); StartString = AllocatePool (StrSize (ConfigString));
StrCpy (StartString, ConfigString); StrCpy (StartString, ConfigString);
@ -81,10 +81,10 @@ AddThunkProtocol (
Private->Signature = EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE; Private->Signature = EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE;
Private->EmuBusDriver = EmuBusDriver; 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.Instance = Instance++;
Private->Data.ConfigString = StartString; Private->Data.ConfigString = StartString;
InsertTailList (&mThunkList, &Private->Link); InsertTailList (&mThunkList, &Private->Link);
// //
@ -104,14 +104,14 @@ GetNextThunkProtocol (
OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL
) )
{ {
LIST_ENTRY *Link; LIST_ENTRY *Link;
EMU_IO_THUNK_PROTOCOL_DATA *Private; EMU_IO_THUNK_PROTOCOL_DATA *Private;
if (mThunkList.ForwardLink == &mThunkList) { if (mThunkList.ForwardLink == &mThunkList) {
// Skip parsing an empty list // Skip parsing an empty list
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
for (Link = mThunkList.ForwardLink; Link != &mThunkList; Link = Link->ForwardLink) { for (Link = mThunkList.ForwardLink; Link != &mThunkList; Link = Link->ForwardLink) {
Private = CR (Link, EMU_IO_THUNK_PROTOCOL_DATA, Link, EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE); Private = CR (Link, EMU_IO_THUNK_PROTOCOL_DATA, Link, EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE);
if (EmuBusDriver & !Private->EmuBusDriver) { if (EmuBusDriver & !Private->EmuBusDriver) {
@ -131,8 +131,8 @@ GetNextThunkProtocol (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
} }
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }

Some files were not shown because too many files have changed in this diff Show More