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>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -38,7 +38,7 @@ Routine Description:
Arguments:
FfsHeader - General purpose data available to every PEIM
PeiServices - General purpose services available to every PEIM.
Returns:
None
@ -89,7 +89,7 @@ Returns:
Attributes |= EFI_RESOURCE_ATTRIBUTE_TESTED;
}
BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY,
Attributes,
@ -104,6 +104,6 @@ Returns:
// Build the CPU hob with 36-bit addressing and 16-bits of IO space.
//
BuildCpuHob (36, 16);
return Status;
}

View File

@ -3,7 +3,7 @@
#
# This module abstracts memory auto-scan in a Emu environment.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -65,7 +65,7 @@ Routine Description:
Arguments:
PeiServices - General purpose services available to every PEIM.
Returns:
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.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

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

View File

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

View File

@ -3,13 +3,13 @@
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -91,7 +91,7 @@ typedef struct {
VOID *StateLock;
VOID *ProcedureLock;
PROCESSOR_STATE State;
EFI_EVENT CheckThisAPEvent;
EFI_EVENT CheckThisAPEvent;
} PROCESSOR_DATA_BLOCK;

View File

@ -1,20 +1,20 @@
/*++ @file
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
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
Bridge I/O Protocol.
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -74,12 +74,12 @@ Returns:
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.
EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL.
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.
**/
@ -132,7 +132,7 @@ Returns:
EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL.
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.
**/
@ -166,7 +166,7 @@ CpuIoServiceRead (
/*++
Routine Description:
This is the service that implements the I/O read
Arguments:
@ -184,7 +184,7 @@ Returns:
EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL.
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.
**/
{
@ -225,7 +225,7 @@ CpuIoServiceWrite (
Routine Description:
This is the service that implements the I/O Write
Arguments:
@ -245,7 +245,7 @@ Returns:
EFI_INVALID_PARAMETER - Width is invalid for this EFI System.
EFI_INVALID_PARAMETER - Buffer is NULL.
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.
**/

View File

@ -15,16 +15,16 @@
The Protocol is available only during boot time.
MP Services Protocol is hardware-independent. Most of the logic of this protocol
is architecturally neutral. It abstracts the multi-processor environment and
status of processors, and provides interfaces to retrieve information, maintain,
is architecturally neutral. It abstracts the multi-processor environment and
status of processors, and provides interfaces to retrieve information, maintain,
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.
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.
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
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
APs to help test system memory in parallel with other device initialization.
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;
EMU_THREAD_THUNK_PROTOCOL *gThread = NULL;
EMU_THREAD_THUNK_PROTOCOL *gThread = NULL;
EFI_EVENT gReadToBootEvent;
BOOLEAN gReadToBoot = FALSE;
UINTN gPollInterval;
@ -58,12 +58,12 @@ IsBSP (
{
EFI_STATUS Status;
UINTN ProcessorNumber;
Status = CpuMpServicesWhoAmI (&mMpSercicesTemplate, &ProcessorNumber);
if (EFI_ERROR (Status)) {
return FALSE;
}
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:
- 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.
Because MP Service Protocol provides services to enable and disable processors
dynamically, the number of enabled logical processors may vary during the
Because MP Service Protocol provides services to enable and disable processors
dynamically, the number of enabled logical processors may vary during the
course of a boot session.
If this service is called from an AP, then EFI_DEVICE_ERROR is returned.
If NumberOfProcessors or NumberOfEnabledProcessors is NULL, then
EFI_INVALID_PARAMETER is returned. Otherwise, the total number of processors
is returned in NumberOfProcessors, the number of currently enabled processor
If this service is called from an AP, then EFI_DEVICE_ERROR is returned.
If NumberOfProcessors or NumberOfEnabledProcessors is NULL, then
EFI_INVALID_PARAMETER is returned. Otherwise, the total number of processors
is returned in NumberOfProcessors, the number of currently enabled processor
is returned in NumberOfEnabledProcessors, and EFI_SUCCESS is returned.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
@ -143,7 +143,7 @@ GetNextBlockedNumber (
processors that exist in system, including
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.
@retval EFI_DEVICE_ERROR The calling processor is an AP.
@retval EFI_INVALID_PARAMETER NumberOfProcessors is NULL.
@ -161,11 +161,11 @@ CpuMpServicesGetNumberOfProcessors (
if ((NumberOfProcessors == NULL) || (NumberOfEnabledProcessors == NULL)) {
return EFI_INVALID_PARAMETER;
}
if (!IsBSP ()) {
return EFI_DEVICE_ERROR;
}
*NumberOfProcessors = gMPSystem.NumberOfProcessors;
*NumberOfEnabledProcessors = gMPSystem.NumberOfEnabledProcessors;
return EFI_SUCCESS;
@ -177,13 +177,13 @@ CpuMpServicesGetNumberOfProcessors (
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.
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:
- The processor information may change during the course of a boot session.
- The information presented here is entirely MP related.
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.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
@ -210,152 +210,152 @@ CpuMpServicesGetProcessorInfo (
if (ProcessorInfoBuffer == NULL) {
return EFI_INVALID_PARAMETER;
}
if (!IsBSP ()) {
return EFI_DEVICE_ERROR;
}
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND;
}
CopyMem (ProcessorInfoBuffer, &gMPSystem.ProcessorData[ProcessorNumber], sizeof (EFI_PROCESSOR_INFORMATION));
return EFI_SUCCESS;
}
/**
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
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
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
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
be called from the BSP.
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
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
immediately and Procedure is not started on any AP.
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,
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,
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
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
non-blocking mode is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT
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
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
is signaled, then EFI_UNSUPPORTED must be returned.
If the timeout specified by TimeoutInMicroseconds expires before all APs return
from Procedure, then Procedure on the failed APs is terminated. All enabled APs
If the timeout specified by TimeoutInMicroseconds expires before all APs return
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()
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
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
terminated.
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
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
parallel are limited to certain independent tasks and well-controlled exclusive
code. EFI services and protocols may not be called by APs unless otherwise
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
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
parallel are limited to certain independent tasks and well-controlled exclusive
code. EFI services and protocols may not be called by APs unless otherwise
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.
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
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
sequence needs to occur in a non-blocking execution mode:
-# The caller that intends to use this MP Services Protocol in non-blocking
mode creates WaitEvent by calling the EFI CreateEvent() service. The caller
invokes EFI_MP_SERVICES_PROTOCOL.StartupAllAPs(). If the parameter WaitEvent
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 caller that intends to use this MP Services Protocol in non-blocking
mode creates WaitEvent by calling the EFI CreateEvent() service. The caller
invokes EFI_MP_SERVICES_PROTOCOL.StartupAllAPs(). If the parameter WaitEvent
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,
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.
-# When the APs complete their task or TimeoutInMicroSecondss expires, the MP
Service signals WaitEvent by calling the EFI SignalEvent() function. If
FailedCpuList is not NULL, its content is available when WaitEvent is
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
the timeout, then FailedCpuList is filled in with the list of the failed
APs. The buffer is allocated by MP Service Protocol using AllocatePool().
-# When the APs complete their task or TimeoutInMicroSecondss expires, the MP
Service signals WaitEvent by calling the EFI SignalEvent() function. If
FailedCpuList is not NULL, its content is available when WaitEvent is
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
the timeout, then FailedCpuList is filled in with the list of the failed
APs. The buffer is allocated by MP Service Protocol using AllocatePool().
It is the caller's responsibility to free the buffer with FreePool() service.
-# This invocation of SignalEvent() function informs the caller that invoked
EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() that either all the APs completed
the specified task or a timeout occurred. The contents of FailedCpuList
can be examined to determine which APs did not complete the specified task
the specified task or a timeout occurred. The contents of FailedCpuList
can be examined to determine which APs did not complete the specified task
prior to the timeout.
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
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
EFI_AP_PROCEDURE.
@param[in] SingleThread If TRUE, then all the enabled APs execute
the function specified by Procedure one by
one, in ascending order of processor handle
number. If FALSE, then all the enabled APs
@param[in] SingleThread If TRUE, then all the enabled APs execute
the function specified by Procedure one by
one, in ascending order of processor handle
number. If FALSE, then all the enabled APs
execute the function specified by Procedure
simultaneously.
@param[in] WaitEvent The event created by the caller with CreateEvent()
service. If it is NULL, then execute in
blocking mode. BSP waits until all APs finish
or TimeoutInMicroseconds expires. If it's
not NULL, then execute in non-blocking mode.
BSP requests the function specified by
Procedure to be started on all the enabled
APs, and go on executing immediately. If
service. If it is NULL, then execute in
blocking mode. BSP waits until all APs finish
or TimeoutInMicroseconds expires. If it's
not NULL, then execute in non-blocking mode.
BSP requests the function specified by
Procedure to be started on all the enabled
APs, and go on executing immediately. If
all return from Procedure, or TimeoutInMicroseconds
expires, this event is signaled. The BSP
can use the CheckEvent() or WaitForEvent()
services to check the state of event. Type
EFI_EVENT is defined in CreateEvent() in
the Unified Extensible Firmware Interface
Specification.
@param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for
APs to return from Procedure, either for
blocking or non-blocking mode. Zero means
infinity. If the timeout expires before
expires, this event is signaled. The BSP
can use the CheckEvent() or WaitForEvent()
services to check the state of event. Type
EFI_EVENT is defined in CreateEvent() in
the Unified Extensible Firmware Interface
Specification.
@param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for
APs to return from Procedure, either for
blocking or non-blocking mode. Zero means
infinity. If the timeout expires before
all APs return from Procedure, then Procedure
on the failed APs is terminated. All enabled
APs are available for next function assigned
by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
on the failed APs is terminated. All enabled
APs are available for next function assigned
by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
or EFI_MP_SERVICES_PROTOCOL.StartupThisAP().
If the timeout expires in blocking mode,
BSP returns EFI_TIMEOUT. If the timeout
expires in non-blocking mode, WaitEvent
If the timeout expires in blocking mode,
BSP returns EFI_TIMEOUT. If the timeout
expires in non-blocking mode, WaitEvent
is signaled with SignalEvent().
@param[in] ProcedureArgument The parameter passed into Procedure for
@param[in] ProcedureArgument The parameter passed into Procedure for
all APs.
@param[out] FailedCpuList If NULL, this parameter is ignored. Otherwise,
if all APs finish successfully, then its
content is set to NULL. If not all APs
finish before timeout expires, then its
content is set to address of the buffer
holding handle numbers of the failed APs.
The buffer is allocated by MP Service Protocol,
and it's the caller's responsibility to
@param[out] FailedCpuList If NULL, this parameter is ignored. Otherwise,
if all APs finish successfully, then its
content is set to NULL. If not all APs
finish before timeout expires, then its
content is set to address of the buffer
holding handle numbers of the failed APs.
The buffer is allocated by MP Service Protocol,
and it's the caller's responsibility to
free the buffer with FreePool() service.
In blocking mode, it is ready for consumption
when the call returns. In non-blocking mode,
it is ready when WaitEvent is signaled. The
list of failed CPU is terminated by
In blocking mode, it is ready for consumption
when the call returns. In non-blocking mode,
it is ready when WaitEvent is signaled. The
list of failed CPU is terminated by
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.
@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.
@retval EFI_UNSUPPORTED A non-blocking mode request was made after the
UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was
@retval EFI_UNSUPPORTED A non-blocking mode request was made after the
UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was
signaled.
@retval EFI_DEVICE_ERROR Caller processor is AP.
@retval EFI_NOT_STARTED No enabled APs exist in the system.
@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.
@retval EFI_INVALID_PARAMETER Procedure is NULL.
@ -385,7 +385,7 @@ CpuMpServicesStartupAllAps (
if (!IsBSP ()) {
return EFI_DEVICE_ERROR;
}
if (gMPSystem.NumberOfProcessors == 1) {
return EFI_NOT_STARTED;
}
@ -393,12 +393,12 @@ CpuMpServicesStartupAllAps (
if (Procedure == NULL) {
return EFI_INVALID_PARAMETER;
}
if ((WaitEvent != NULL) && gReadToBoot) {
return EFI_UNSUPPORTED;
}
if (FailedCpuList != NULL) {
gMPSystem.FailedList = AllocatePool ((gMPSystem.NumberOfProcessors + 1) * sizeof (UINTN));
if (gMPSystem.FailedList == NULL) {
@ -453,10 +453,10 @@ CpuMpServicesStartupAllAps (
return EFI_NOT_READY;
}
}
if (WaitEvent != NULL) {
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) {
// Skip BSP
continue;
@ -466,7 +466,7 @@ CpuMpServicesStartupAllAps (
// Skip Disabled processors
continue;
}
SetApProcedure (ProcessorData, Procedure, ProcedureArgument);
}
@ -489,7 +489,7 @@ CpuMpServicesStartupAllAps (
while (TRUE) {
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) {
// Skip BSP
continue;
@ -553,86 +553,86 @@ Done:
/**
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
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
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
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
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
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
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
is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled,
This function is used to dispatch one enabled AP to the function specified by
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
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
is requested after the UEFI Event EFI_EVENT_GROUP_READY_TO_BOOT is signaled,
then EFI_UNSUPPORTED must be returned.
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
available for subsequent calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() and
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
available for subsequent calls to EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() and
EFI_MP_SERVICES_PROTOCOL.StartupThisAP().
@param[in] This A pointer to the EFI_MP_SERVICES_PROTOCOL
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
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
processors minus 1. The total number of
processors minus 1. The total number of
logical processors can be retrieved by
EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors().
@param[in] WaitEvent The event created by the caller with CreateEvent()
service. If it is NULL, then execute in
blocking mode. BSP waits until all APs finish
or TimeoutInMicroseconds expires. If it's
not NULL, then execute in non-blocking mode.
BSP requests the function specified by
Procedure to be started on all the enabled
APs, and go on executing immediately. If
service. If it is NULL, then execute in
blocking mode. BSP waits until all APs finish
or TimeoutInMicroseconds expires. If it's
not NULL, then execute in non-blocking mode.
BSP requests the function specified by
Procedure to be started on all the enabled
APs, and go on executing immediately. If
all return from Procedure or TimeoutInMicroseconds
expires, this event is signaled. The BSP
can use the CheckEvent() or WaitForEvent()
services to check the state of event. Type
EFI_EVENT is defined in CreateEvent() in
the Unified Extensible Firmware Interface
Specification.
@param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for
APs to return from Procedure, either for
blocking or non-blocking mode. Zero means
infinity. If the timeout expires before
expires, this event is signaled. The BSP
can use the CheckEvent() or WaitForEvent()
services to check the state of event. Type
EFI_EVENT is defined in CreateEvent() in
the Unified Extensible Firmware Interface
Specification.
@param[in] TimeoutInMicrosecsond Indicates the time limit in microseconds for
APs to return from Procedure, either for
blocking or non-blocking mode. Zero means
infinity. If the timeout expires before
all APs return from Procedure, then Procedure
on the failed APs is terminated. All enabled
APs are available for next function assigned
by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
on the failed APs is terminated. All enabled
APs are available for next function assigned
by EFI_MP_SERVICES_PROTOCOL.StartupAllAPs()
or EFI_MP_SERVICES_PROTOCOL.StartupThisAP().
If the timeout expires in blocking mode,
BSP returns EFI_TIMEOUT. If the timeout
expires in non-blocking mode, WaitEvent
If the timeout expires in blocking mode,
BSP returns EFI_TIMEOUT. If the timeout
expires in non-blocking mode, WaitEvent
is signaled with SignalEvent().
@param[in] ProcedureArgument The parameter passed into Procedure for
@param[in] ProcedureArgument The parameter passed into Procedure for
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.
In non-blocking mode, if AP returns from
In non-blocking mode, if AP returns from
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
determine if the AP returned from Procedure
determine if the AP returned from Procedure
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.
@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.
@retval EFI_UNSUPPORTED A non-blocking mode request was made after the
UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was
@retval EFI_UNSUPPORTED A non-blocking mode request was made after the
UEFI event EFI_EVENT_GROUP_READY_TO_BOOT was
signaled.
@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.
@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.
@retval EFI_INVALID_PARAMETER ProcessorNumber specifies the BSP or disabled AP.
@retval EFI_INVALID_PARAMETER Procedure is NULL.
@ -652,19 +652,19 @@ CpuMpServicesStartupThisAP (
{
EFI_STATUS Status;
INTN Timeout;
if (!IsBSP ()) {
return EFI_DEVICE_ERROR;
}
if (Procedure == NULL) {
return EFI_INVALID_PARAMETER;
}
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND;
}
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
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 changes the BSP for all purposes. This call can only be performed
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
by the current BSP.
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
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
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
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
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.
@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
BSP. The range is from 0 to the total number of
logical processors minus 1. The total number of
@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
logical processors minus 1. The total number of
logical processors can be retrieved by
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.
@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.
@retval EFI_UNSUPPORTED Switching the BSP is not supported.
@retval EFI_SUCCESS The calling processor is an AP.
@retval EFI_NOT_FOUND The processor with the handle specified by
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.
@retval EFI_NOT_READY The specified AP is busy.
@ -763,15 +763,15 @@ CpuMpServicesSwitchBSP (
)
{
UINTN Index;
if (!IsBSP ()) {
return EFI_DEVICE_ERROR;
}
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND;
}
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0) {
return EFI_INVALID_PARAMETER;
}
@ -779,18 +779,18 @@ CpuMpServicesSwitchBSP (
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
return EFI_INVALID_PARAMETER;
}
for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) {
if ((gMPSystem.ProcessorData[Index].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
break;
}
}
ASSERT (Index != gMPSystem.NumberOfProcessors);
if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) {
return EFI_NOT_READY;
}
// Skip for now as we need switch a bunch of stack stuff around and it's complex
// May not be worth it?
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 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
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
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
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
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
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
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.
@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
BSP. The range is from 0 to the total number of
logical processors minus 1. The total number of
@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
logical processors minus 1. The total number of
logical processors can be retrieved by
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.
@param[in] HealthFlag If not NULL, a pointer to a value that specifies
the new health status of the AP. This flag
corresponds to StatusFlag defined in
EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo(). Only
the PROCESSOR_HEALTH_STATUS_BIT is used. All other
bits are ignored. If it is NULL, this parameter
@param[in] HealthFlag If not NULL, a pointer to a value that specifies
the new health status of the AP. This flag
corresponds to StatusFlag defined in
EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo(). Only
the PROCESSOR_HEALTH_STATUS_BIT is used. All other
bits are ignored. If it is NULL, this parameter
is ignored.
@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.
@retval EFI_UNSUPPORTED Enabling or disabling an AP is not supported.
@retval EFI_DEVICE_ERROR The calling processor is an AP.
@ -850,21 +850,21 @@ CpuMpServicesEnableDisableAP (
if (!IsBSP ()) {
return EFI_DEVICE_ERROR;
}
if (ProcessorNumber >= gMPSystem.NumberOfProcessors) {
return EFI_NOT_FOUND;
}
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
return EFI_INVALID_PARAMETER;
}
}
if (gMPSystem.ProcessorData[ProcessorNumber].State != CPU_STATE_IDLE) {
return EFI_UNSUPPORTED;
}
gThread->MutexLock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
if (EnableAP) {
if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0 ) {
gMPSystem.NumberOfEnabledProcessors++;
@ -876,38 +876,38 @@ CpuMpServicesEnableDisableAP (
}
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag &= ~PROCESSOR_ENABLED_BIT;
}
if (HealthFlag != NULL) {
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag &= ~PROCESSOR_HEALTH_STATUS_BIT;
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= (*HealthFlag & PROCESSOR_HEALTH_STATUS_BIT);
}
gThread->MutexUnlock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
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.
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
processors minus 1. The total number of logical processors can be retrieved
with EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). This service may be
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
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
processors minus 1. The total number of logical processors can be retrieved
with EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors(). This service may be
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
ProcessorNumber, and EFI_SUCCESS is returned.
@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
BSP. The range is from 0 to the total number of
logical processors minus 1. The total number of
@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
logical processors minus 1. The total number of
logical processors can be retrieved by
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.
@retval EFI_INVALID_PARAMETER ProcessorNumber is NULL.
@ -921,11 +921,11 @@ CpuMpServicesWhoAmI (
{
UINTN Index;
UINT64 ProcessorId;
if (ProcessorNumber == NULL) {
return EFI_INVALID_PARAMETER;
}
ProcessorId = gThread->Self ();
for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) {
if (gMPSystem.ProcessorData[Index].Info.ProcessorId == ProcessorId) {
@ -976,7 +976,7 @@ CpuCheckAllAPsStatus (
if (gMPSystem.TimeoutActive) {
gMPSystem.Timeout -= gPollInterval;
}
ProcessorData = (PROCESSOR_DATA_BLOCK *) Context;
for (ProcessorNumber = 0; ProcessorNumber < gMPSystem.NumberOfProcessors; ProcessorNumber++) {
@ -1029,7 +1029,7 @@ CpuCheckAllAPsStatus (
break;
}
}
if (gMPSystem.TimeoutActive && gMPSystem.Timeout < 0) {
//
// Timeout
@ -1045,15 +1045,15 @@ CpuCheckAllAPsStatus (
// Skip Disabled processors
continue;
}
// Mark the
// Mark the
Status = gThread->MutexTryLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
if (EFI_ERROR(Status)) {
return;
}
ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State;
gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
if (ProcessorState != CPU_STATE_IDLE) {
// If we are retrying make sure we don't double count
for (Cpu = 0, Found = FALSE; Cpu < gMPSystem.NumberOfProcessors; Cpu++) {
@ -1078,7 +1078,7 @@ CpuCheckAllAPsStatus (
if (gMPSystem.FinishCount != gMPSystem.StartCount) {
return;
}
gBS->SetTimer (
gMPSystem.CheckAllAPsEvent,
TimerCancel,
@ -1127,10 +1127,10 @@ CpuCheckThisAPStatus (
if (ProcessorState == CPU_STATE_FINISHED) {
Status = gBS->SetTimer (ProcessorData->CheckThisAPEvent, TimerCancel, 0);
ASSERT_EFI_ERROR (Status);
Status = gBS->SignalEvent (gMPSystem.WaitEvent);
ASSERT_EFI_ERROR (Status);
gThread->MutexLock (ProcessorData->StateLock);
ProcessorData->State = CPU_STATE_IDLE;
gThread->MutexUnlock (ProcessorData->StateLock);
@ -1158,18 +1158,18 @@ FillInProcessorInformation (
PROCESSOR_DATA_BLOCK *ProcessorData;
ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
gMPSystem.ProcessorData[ProcessorNumber].Info.ProcessorId = gThread->Self ();
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag = PROCESSOR_ENABLED_BIT | PROCESSOR_HEALTH_STATUS_BIT;
if (BSP) {
gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= PROCESSOR_AS_BSP_BIT;
}
gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Package = ProcessorNumber;
gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Core = 0;
gMPSystem.ProcessorData[ProcessorNumber].Info.Location.Thread = 0;
gMPSystem.ProcessorData[ProcessorNumber].State = BSP ? CPU_STATE_BUSY : CPU_STATE_IDLE;
gMPSystem.ProcessorData[ProcessorNumber].Procedure = NULL;
gMPSystem.ProcessorData[ProcessorNumber].Parameter = NULL;
gMPSystem.ProcessorData[ProcessorNumber].StateLock = gThread->MutexInit ();
@ -1188,12 +1188,12 @@ CpuDriverApIdolLoop (
VOID *Parameter;
UINTN ProcessorNumber;
PROCESSOR_DATA_BLOCK *ProcessorData;
ProcessorNumber = (UINTN)Context;
ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
ProcessorData->Info.ProcessorId = gThread->Self ();
while (TRUE) {
//
// Make a local copy on the stack to be extra safe
@ -1202,28 +1202,28 @@ CpuDriverApIdolLoop (
Procedure = ProcessorData->Procedure;
Parameter = ProcessorData->Parameter;
gThread->MutexUnlock (ProcessorData->ProcedureLock);
if (Procedure != NULL) {
gThread->MutexLock (ProcessorData->StateLock);
ProcessorData->State = CPU_STATE_BUSY;
gThread->MutexUnlock (ProcessorData->StateLock);
Procedure (Parameter);
gThread->MutexLock (ProcessorData->ProcedureLock);
ProcessorData->Procedure = NULL;
gThread->MutexUnlock (ProcessorData->ProcedureLock);
gThread->MutexLock (ProcessorData->StateLock);
ProcessorData->State = CPU_STATE_FINISHED;
gThread->MutexUnlock (ProcessorData->StateLock);
gThread->MutexUnlock (ProcessorData->StateLock);
}
// Poll 5 times a seconds, 200ms
// Don't want to burn too many system resources doing nothing.
gEmuThunk->Sleep (200 * 1000);
}
return 0;
}
@ -1236,7 +1236,7 @@ InitializeMpSystemData (
EFI_STATUS Status;
UINTN Index;
//
// Clear the data structure area first.
//
@ -1247,12 +1247,12 @@ InitializeMpSystemData (
//
gMPSystem.NumberOfProcessors = NumberOfProcessors;
gMPSystem.NumberOfEnabledProcessors = NumberOfProcessors;
gMPSystem.ProcessorData = AllocateZeroPool (gMPSystem.NumberOfProcessors * sizeof (PROCESSOR_DATA_BLOCK));
ASSERT (gMPSystem.ProcessorData != NULL);
FillInProcessorInformation (TRUE, 0);
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
@ -1261,24 +1261,24 @@ InitializeMpSystemData (
&gMPSystem.CheckAllAPsEvent
);
ASSERT_EFI_ERROR (Status);
for (Index = 0; Index < gMPSystem.NumberOfProcessors; Index++) {
if ((gMPSystem.ProcessorData[Index].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
// Skip BSP
continue;
}
FillInProcessorInformation (FALSE, Index);
Status = gThread->CreateThread (
(VOID *)&gMPSystem.ProcessorData[Index].Info.ProcessorId,
(VOID *)&gMPSystem.ProcessorData[Index].Info.ProcessorId,
NULL,
CpuDriverApIdolLoop,
(VOID *)Index
);
Status = gBS->CreateEvent (
EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
@ -1324,7 +1324,7 @@ CpuMpServicesInit (
UINTN MaxCpus;
MaxCpus = 1; // BSP
IoThunk = GetIoThunkInstance (&gEmuThreadThunkProtocolGuid, 0);
if (IoThunk != NULL) {
Status = IoThunk->Open (IoThunk);

View File

@ -1,13 +1,13 @@
/**@file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:

View File

@ -1,13 +1,13 @@
/**@file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@ -63,46 +63,46 @@ EFI_DRIVER_CONFIGURATION_PROTOCOL gEmuBlockIoDriverConfiguration = {
/*++
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.
Arguments:
This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
ControllerHandle - The handle of the controller to set options on.
ChildHandle - The handle of the child controller to set options on. This
is an optional parameter that may be NULL. It will be NULL
for device drivers, and for a bus drivers that wish to set
options for the bus controller. It will not be NULL for a
bus driver that wishes to set options for one of its child
is an optional parameter that may be NULL. It will be NULL
for device drivers, and for a bus drivers that wish to set
options for the bus controller. It will not be NULL for a
bus driver that wishes to set options for one of its child
controllers.
Language - A pointer to a three character ISO 639-2 language identifier.
This is the language of the user interface that should be
presented to the user, and it must match one of the languages
specified in SupportedLanguages. The number of languages
This is the language of the user interface that should be
presented to the user, and it must match one of the languages
specified in SupportedLanguages. The number of languages
supported by a driver is up to the driver writer.
ActionRequired - A pointer to the action that the calling agent is required
to perform when this function returns. See "Related
Definitions" for a list of the actions that the calling
agent is required to perform prior to accessing
ActionRequired - A pointer to the action that the calling agent is required
to perform when this function returns. See "Related
Definitions" for a list of the actions that the calling
agent is required to perform prior to accessing
ControllerHandle again.
Returns:
EFI_SUCCESS - The driver specified by This successfully set the
configuration options for the controller specified
EFI_SUCCESS - The driver specified by This successfully set the
configuration options for the controller specified
by ControllerHandle..
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 - ActionRequired is NULL.
EFI_UNSUPPORTED - The driver specified by This does not support setting
configuration options for the controller specified by
EFI_UNSUPPORTED - The driver specified by This does not support setting
configuration options for the controller specified 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
language specified by Language.
EFI_DEVICE_ERROR - A device error occurred while attempt to set the
configuration options for the controller specified
EFI_DEVICE_ERROR - A device error occurred while attempt to set the
configuration options for the controller specified
by ControllerHandle and ChildHandle.
EFI_OUT_RESOURCES - There are not enough resources available to set the
configuration options for the controller specified
EFI_OUT_RESOURCES - There are not enough resources available to set the
configuration options for the controller specified
by ControllerHandle and ChildHandle.
--*/
@ -183,29 +183,29 @@ EmuBlockIoDriverConfigurationSetOptions (
Arguments:
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.
ChildHandle - The handle of the child controller to test if it's current
configuration options are valid. This is an optional
parameter that may be NULL. It will be NULL for device
configuration options are valid. This is an optional
parameter that may be NULL. It will be NULL for device
drivers. It will also be NULL for a bus drivers that wish
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.
Returns:
EFI_SUCCESS - The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver
EFI_SUCCESS - The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver
specified by This has a valid set of configuration
options.
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_UNSUPPORTED - The driver specified by This is not currently
managing the controller specified by ControllerHandle
EFI_UNSUPPORTED - The driver specified by This is not currently
managing the controller specified by ControllerHandle
and ChildHandle.
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver
specified by This has an invalid set of configuration
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver
specified by This has an invalid set of configuration
options.
--*/

View File

@ -1,13 +1,13 @@
/**@file
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@ -71,54 +71,54 @@ EmuBlockIoDriverDiagnosticsRunDiagnostics (
Arguments:
This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
ControllerHandle - The handle of the 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
be NULL for device drivers. It will also be NULL for a
bus drivers that wish to run diagnostics on the bus
controller. It will not be NULL for a bus driver that
ChildHandle - The handle of the child controller to run diagnostics on
This is an optional parameter that may be NULL. It will
be NULL for device drivers. It will also be NULL for a
bus drivers that wish to run diagnostics on the bus
controller. It will not be NULL for a bus driver that
wishes to run diagnostics on one of its child controllers.
DiagnosticType - Indicates type of diagnostics to perform on the controller
specified by ControllerHandle and ChildHandle. See
DiagnosticType - Indicates type of diagnostics to perform on the controller
specified by ControllerHandle and ChildHandle. See
"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
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.
The number of languages supported by a driver is up to
the driver writer.
ErrorType - A GUID that defines the format 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
plus some additional data whose format is defined by
ErrorType. Buffer is allocated by this function with
AllocatePool(), and it is the caller's responsibility
to free it with a call to FreePool().
The number of languages supported by a driver is up to
the driver writer.
ErrorType - A GUID that defines the format 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
plus some additional data whose format is defined by
ErrorType. Buffer is allocated by this function with
AllocatePool(), and it is the caller's responsibility
to free it with a call to FreePool().
Returns:
EFI_SUCCESS - The controller specified by ControllerHandle and
EFI_SUCCESS - The controller specified by ControllerHandle and
ChildHandle passed the diagnostic.
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_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ErrorType is NULL.
EFI_INVALID_PARAMETER - BufferType is NULL.
EFI_INVALID_PARAMETER - Buffer is NULL.
EFI_UNSUPPORTED - The driver specified by This does not support
running diagnostics for the controller specified
EFI_UNSUPPORTED - The driver specified by This does not support
running diagnostics for the controller specified
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.
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.
EFI_OUT_OF_RESOURCES - There are not enough resources available to complete
the diagnostics.
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.
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
ChildHandle did not pass the diagnostic.
--*/

View File

@ -1,13 +1,13 @@
/**@file
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
bbe
**/
@ -50,7 +50,7 @@ EmuBlockIo2Reset (
/**
Read BufferSize bytes from Lba into Buffer.
This function reads the requested number of blocks from the device. All the
blocks are read, or an error is returned.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and
@ -58,13 +58,13 @@ EmuBlockIo2Reset (
not be signaled.
@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.
@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] 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
caller is responsible for either having implicit or
@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
caller is responsible for either having implicit or
explicit ownership of the buffer.
@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_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
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.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources.
@ -132,14 +132,14 @@ EmuBlockIo2ReadBlocksEx (
@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_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.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources.
**/
EFI_STATUS
EFIAPI
EFIAPI
EmuBlockIo2WriteBlocksEx (
IN EFI_BLOCK_IO2_PROTOCOL *This,
IN UINT32 MediaId,
@ -167,10 +167,10 @@ EmuBlockIo2WriteBlocksEx (
/**
Flush the Block Device.
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
this request will not be signaled.
this request will not be signaled.
@param[in] This Indicates a pointer to the calling context.
@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_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_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.
**/
@ -305,7 +305,7 @@ EmuBlockIoReadBlocks (
@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_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.
**/
@ -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.
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 and/or the services from the bus I/O abstraction attached to
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
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
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(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
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
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 and/or the services from the bus I/O abstraction attached to
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
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
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(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
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
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] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies
@param[in] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies
an I/O abstraction to the driver.
@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
drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by 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
drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@ -462,28 +462,28 @@ EmuBlockIoDriverBindingSupported (
Starts a device controller or a bus controller.
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
common boot service. It is legal to call Start() from other locations,
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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies
@param[in] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies
an I/O abstraction to the driver.
@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
drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver.
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
child device specified by the first Device Path Node of
@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
drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver.
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
child device specified by the first Device Path Node of
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
driver.
@ -508,7 +508,7 @@ EmuBlockIoDriverBindingStart (
//
// Grab the protocols we need
//
Status = gBS->OpenProtocol (
Handle,
&gEmuIoThunkProtocolGuid,
@ -520,7 +520,7 @@ EmuBlockIoDriverBindingStart (
if (EFI_ERROR (Status)) {
return Status;
}
if (!CompareGuid (EmuIoThunk->Protocol, &gEmuBlockIoProtocolGuid)) {
Status = EFI_UNSUPPORTED;
goto Done;
@ -540,7 +540,7 @@ EmuBlockIoDriverBindingStart (
Private->IoThunk = EmuIoThunk;
Private->Io = EmuIoThunk->Interface;
Private->EfiHandle = Handle;
Private->BlockIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION2;
Private->BlockIo.Media = &Private->Media;
Private->BlockIo.Reset = EmuBlockIoReset;
@ -568,7 +568,7 @@ EmuBlockIoDriverBindingStart (
EmuIoThunk->ConfigString,
TRUE
);
AddUnicodeString2 (
"en",
gEmuBlockIoComponentName2.SupportedLanguages,
@ -590,11 +590,11 @@ Done:
if (Private->ControllerNameTable != NULL) {
FreeUnicodeStringTable (Private->ControllerNameTable);
}
gBS->FreePool (Private);
}
gBS->CloseProtocol (
Handle,
&gEmuIoThunkProtocolGuid,
@ -609,10 +609,10 @@ Done:
/**
Stops a device controller or a bus controller.
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
into this common boot service. It is legal to call Stop() from other locations,
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
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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver
@param[in] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@ -678,7 +678,7 @@ EmuBlockIoDriverBindingStop (
Handle
);
}
if (!EFI_ERROR (Status)) {
//
// 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.
@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.
@retval EFI_SUCCESS The entry point is executed successfully.
@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>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@ -16,8 +16,8 @@ Module Name:
Abstract:
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
environment variables. The variables must be visible to the Microsoft*
The configuration of what devices to mount or emulate comes from UNIX
environment variables. The variables must be visible to the Microsoft*
Developer Studio for them to work.
* Other names and brands may be claimed as the property of others.

View File

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

View File

@ -1,11 +1,11 @@
/** @file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
**/
#include "EmuBusDriverDxe.h"

View File

@ -50,7 +50,7 @@ EmuBusDriverBindingSupported (
//
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 (!IsDevicePathEnd (RemainingDevicePath)) {
@ -65,7 +65,7 @@ EmuBusDriverBindingSupported (
}
}
}
//
// Open the IO Abstraction(s) needed to perform the supported test
//
@ -226,8 +226,8 @@ EmuBusDriverBindingStart (
if (RemainingDevicePath != NULL) {
CreateDevice = FALSE;
//
// Check if RemainingDevicePath is the End of Device Path Node,
// if yes, don't create any child device
// Check if RemainingDevicePath is the End of Device Path Node,
// if yes, don't create any child device
//
if (!IsDevicePathEnd (RemainingDevicePath)) {
//
@ -259,7 +259,7 @@ EmuBusDriverBindingStart (
EmuDevice->ControllerHandle = ControllerHandle;
EmuDevice->ParentDevicePath = ParentDevicePath;
CopyMem (&EmuDevice->EmuIoThunk, EmuIoThunk, sizeof (EMU_IO_THUNK_PROTOCOL));
EmuDevice->ControllerNameTable = NULL;
StrnCpy (ComponentName, EmuIoThunk->ConfigString, sizeof (ComponentName)/sizeof (CHAR16));
@ -455,7 +455,7 @@ Arguments:
Returns:
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.
@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.
@retval EFI_SUCCESS The entry point is executed successfully.
@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>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -2,7 +2,7 @@
# Emu Bus driver
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -28,14 +28,14 @@
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
# DRIVER_BINDING = gEmuBusDriverBinding
# COMPONENT_NAME = gEmuBusDriverComponentName
# DRIVER_BINDING = gEmuBusDriverBinding
# COMPONENT_NAME = gEmuBusDriverComponentName
#
[Sources]
ComponentName.c
EmuBusDriverDxe.c
[Packages]
MdePkg/MdePkg.dec

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:

View File

@ -2,7 +2,7 @@
# GOP driver
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -28,8 +28,8 @@
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
# DRIVER_BINDING = gEmuGopDriverBinding
# COMPONENT_NAME = gEmuGopComponentName
# DRIVER_BINDING = gEmuGopDriverBinding
# COMPONENT_NAME = gEmuGopComponentName
#
[Sources]
@ -54,7 +54,7 @@
BaseLib
DebugLib
KeyMapLib
[Guids]
gEfiEventExitBootServicesGuid # SOMETIMES_CONSUMED Create Event: EVENT_GROUP_GUID

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -54,7 +54,7 @@ typedef struct _EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
EFI_EVENT Event;
LIST_ENTRY NotifyEntry;
} EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY;
#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
typedef struct {
@ -103,7 +103,7 @@ typedef struct {
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx;
EFI_KEY_STATE KeyState;
LIST_ENTRY NotifyList;
LIST_ENTRY NotifyList;
} GOP_PRIVATE_DATA;

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010,Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -42,47 +42,47 @@ Returns:
}
while (!IsListEmpty (ListHead)) {
NotifyNode = CR (
ListHead->ForwardLink,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY,
NotifyEntry,
ListHead->ForwardLink,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY,
NotifyEntry,
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
);
RemoveEntryList (ListHead->ForwardLink);
gBS->FreePool (NotifyNode);
}
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.
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 and/or the services from the bus I/O abstraction attached to
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
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
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(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
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
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 and/or the services from the bus I/O abstraction attached to
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
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
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(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
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
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] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies
@param[in] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies
an I/O abstraction to the driver.
@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
drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by 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
drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@ -143,28 +143,28 @@ EmuGopDriverBindingSupported (
Starts a device controller or a bus controller.
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
common boot service. It is legal to call Start() from other locations,
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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies
@param[in] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies
an I/O abstraction to the driver.
@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
drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver.
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
child device specified by the first Device Path Node of
@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
drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver.
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
child device specified by the first Device Path Node of
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
driver.
@ -288,10 +288,10 @@ Done:
/**
Stops a device controller or a bus controller.
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
into this common boot service. It is legal to call Stop() from other locations,
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
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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver
@param[in] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@ -376,13 +376,13 @@ EmuGopDriverBindingStop (
// Free our instance data
//
FreeUnicodeStringTable (Private->ControllerNameTable);
Status = gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);
ASSERT_EFI_ERROR (Status);
Status = gBS->CloseEvent (Private->SimpleTextInEx.WaitForKeyEx);
ASSERT_EFI_ERROR (Status);
FreeNotifyList (&Private->NotifyList);
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.
///
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.
@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.
@retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point.

View File

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

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

View File

@ -1,13 +1,13 @@
/** @file
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -1,7 +1,7 @@
/*++ @file
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
environment variables. The variables must be visible to the Microsoft*
The configuration of what devices to mount or emulate comes from UNIX
environment variables. The variables must be visible to the Microsoft*
Developer Studio for them to work.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
@ -120,7 +120,7 @@ EmuSimpleFileSystemClose (
}
gBS->RestoreTPL (OldTpl);
return Status;
}
@ -129,7 +129,7 @@ EmuSimpleFileSystemClose (
Close and delete the file handle.
@param This Protocol instance pointer.
@retval EFI_SUCCESS The file was closed and 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);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->Delete (PrivateFile->Io);
@ -192,14 +192,14 @@ EmuSimpleFileSystemRead (
if (This == NULL || BufferSize == NULL) {
return EFI_INVALID_PARAMETER;
}
if ((*BufferSize != 0) && (Buffer == NULL)) {
// Buffer can be NULL if *BufferSize is zero
return EFI_INVALID_PARAMETER;
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->Read (PrivateFile->Io, BufferSize, Buffer);
@ -259,7 +259,7 @@ EmuSimpleFileSystemWrite (
@param This Protocol instance pointer.
@param Position Byte position from the start of the file.
@retval EFI_SUCCESS Position was updated.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
@ -280,7 +280,7 @@ EmuSimpleFileSystemGetPosition (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->GetPosition (PrivateFile->Io, Position);
@ -296,7 +296,7 @@ EmuSimpleFileSystemGetPosition (
@param This Protocol instance pointer.
@param Position Byte position from the start of the file.
@retval EFI_SUCCESS Position was updated.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open..
@ -317,7 +317,7 @@ EmuSimpleFileSystemSetPosition (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->SetPosition (PrivateFile->Io, Position);
@ -363,7 +363,7 @@ EmuSimpleFileSystemGetInfo (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->GetInfo (PrivateFile->Io, InformationType, BufferSize, Buffer);
@ -411,12 +411,12 @@ EmuSimpleFileSystemSetInfo (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->SetInfo (PrivateFile->Io, InformationType, BufferSize, Buffer);
gBS->RestoreTPL (OldTpl);
gBS->RestoreTPL (OldTpl);
return Status;
}
@ -451,7 +451,7 @@ EmuSimpleFileSystemFlush (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This);
Status = PrivateFile->Io->Flush (PrivateFile->Io);
@ -503,7 +503,7 @@ EmuSimpleFileSystemOpenVolume (
if (PrivateFile == NULL) {
goto Done;
}
PrivateFile->Signature = EMU_EFI_FILE_PRIVATE_SIGNATURE;
PrivateFile->IoThunk = Private->IoThunk;
PrivateFile->SimpleFileSystem = This;
@ -525,7 +525,7 @@ EmuSimpleFileSystemOpenVolume (
if (EFI_ERROR (Status)) {
goto Done;
}
AddUnicodeString2 (
"eng",
gEmuSimpleFileSystemComponentName.SupportedLanguages,
@ -548,7 +548,7 @@ Done:
if (PrivateFile) {
gBS->FreePool (PrivateFile);
}
*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.
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 and/or the services from the bus I/O abstraction attached to
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
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
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(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
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
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 and/or the services from the bus I/O abstraction attached to
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
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
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(),
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
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
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] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies
@param[in] ControllerHandle The handle of the controller to test. This handle
must support a protocol interface that supplies
an I/O abstraction to the driver.
@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
drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by 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
drivers. For bus drivers, if this parameter is not NULL, then
the bus driver must determine if the bus controller specified
by ControllerHandle and the child controller specified
by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@ -652,28 +652,28 @@ EmuSimpleFileSystemDriverBindingSupported (
Starts a device controller or a bus controller.
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
common boot service. It is legal to call Start() from other locations,
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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies
@param[in] ControllerHandle The handle of the controller to start. This handle
must support a protocol interface that supplies
an I/O abstraction to the driver.
@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
drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver.
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
child device specified by the first Device Path Node of
@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
drivers. For a bus driver, if this parameter is NULL, then handles
for all the children of Controller are created by this driver.
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
child device specified by the first Device Path Node of
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
driver.
@ -733,7 +733,7 @@ EmuSimpleFileSystemDriverBindingStart (
Private->Signature = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE;
Private->IoThunk = EmuIoThunk;
Private->Io = EmuIoThunk->Interface;
Private->SimpleFileSystem.Revision = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION;
Private->SimpleFileSystem.OpenVolume = EmuSimpleFileSystemOpenVolume;
@ -746,7 +746,7 @@ EmuSimpleFileSystemDriverBindingStart (
EmuIoThunk->ConfigString,
TRUE
);
AddUnicodeString2 (
"en",
gEmuSimpleFileSystemComponentName2.SupportedLanguages,
@ -767,9 +767,9 @@ Done:
if (Private->ControllerNameTable != NULL) {
FreeUnicodeStringTable (Private->ControllerNameTable);
}
gBS->FreePool (Private);
}
gBS->CloseProtocol (
@ -786,10 +786,10 @@ Done:
/**
Stops a device controller or a bus controller.
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
into this common boot service. It is legal to call Stop() from other locations,
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
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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver
@param[in] ControllerHandle A handle to the device being stopped. The handle must
support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
@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.
@retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point.

View File

@ -1,17 +1,17 @@
/*++ @file
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.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -77,4 +77,4 @@ typedef struct {
#endif
#endif

View File

@ -2,7 +2,7 @@
# Simple filesystem driver
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

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

View File

@ -56,7 +56,7 @@ typedef struct {
EFI_SIMPLE_NETWORK_PROTOCOL Snp;
EFI_SIMPLE_NETWORK_MODE Mode;
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
} EMU_SNP_PRIVATE_DATA;
@ -124,7 +124,7 @@ EmuSnpDriverBindingStart (
restrictions for this service. DisconnectController()
must follow these calling restrictions. If any other agent wishes
to call Stop() it must also follow these calling restrictions.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
@ -156,7 +156,7 @@ EFIAPI
EmuSnpStart(
IN EFI_SIMPLE_NETWORK_PROTOCOL* This
);
/**
Changes the state of a network interface from "started" to "stopped".
@ -170,10 +170,10 @@ EFIAPI
EmuSnpStop(
IN EFI_SIMPLE_NETWORK_PROTOCOL* This
);
/**
Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation
Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers.
@param This Protocol instance pointer.
@ -198,10 +198,10 @@ EmuSnpInitialize(
IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL
);
/**
Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize().
Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize().
@param This Protocol instance pointer.
@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.
@param This Protocol instance pointer.
@ -311,10 +311,10 @@ EmuSnpStatistics(
IN OUT UINTN* StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS* StatisticsTable OPTIONAL
);
/**
Converts a multicast IP address to a multicast HW MAC address.
@param This Protocol instance pointer.
@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].
@ -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.
@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.
@param This Protocol instance pointer.

View File

@ -2,20 +2,20 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <PiDxe.h>
#include <Protocol/DevicePath.h>
#include <Protocol/EmuThunk.h>
#include <Protocol/EmuThunk.h>
#include <Library/DebugLib.h>
#include <Library/UefiLib.h>
@ -69,7 +69,7 @@ Arguments:
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
Returns:
EFI_SUCEESS - UnixThunk protocol is added or error status from
EFI_SUCEESS - UnixThunk protocol is added or error status from
gBS->InstallMultiProtocolInterfaces().
**/

View File

@ -2,7 +2,7 @@
# A DXE driver to produce EMU_THUNK_PROTOCOL
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -3,9 +3,9 @@
# This is the Emu Emulation Environment Platform
#
# 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.
# 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
@ -60,7 +60,7 @@
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize|0x0|UINT32|0x00001011
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x0|UINT32|0x00001012
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0|UINT32|0x00001013
## Number of Application Processors (APs) in the system 0 means Uniprocessor mode
gEmulatorPkgTokenSpaceGuid.PcdEmuApCount|L"0"|VOID*|0x00001019
@ -70,13 +70,13 @@
## Size of the packet filter
gEmulatorPkgTokenSpaceGuid.PcdNetworkPacketFilterSize|524288|UINT32|0x0000101c
[PcdsFixedAtBuild, PcdsPatchableInModule]
[PcdsFixedAtBuild, PcdsPatchableInModule]
gEmulatorPkgTokenSpaceGuid.PcdEmuBootMode|1|UINT32|0x00001006
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume|L"..\\Fv\\Fv_Recovery.fd"|VOID*|0x00001009
gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize|L"64!64"|VOID*|0x0000100c
#
# filename[:[R|F][O|W]][:BlockSize]
# filename can be a device node, like /dev/disk1
@ -85,11 +85,11 @@
# Default is Fixed Media, Writable
# 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
# the device and is not configurable.
# Device Size comes from file or device.
# the device and is not configurable.
# 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
gEmulatorPkgTokenSpaceGuid.PcdEmuVirtualDisk|L"disk.dmg:FW"|VOID*|0x00001001
gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window"|VOID*|0x00001018
gEmulatorPkgTokenSpaceGuid.PcdEmuFileSystem|L".!../../../../../EdkShellBinPkg/bin/ia32/Apps"|VOID*|0x00001004
gEmulatorPkgTokenSpaceGuid.PcdEmuSerialPort|L"/dev/ttyS0"|VOID*|0x00001002

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -35,7 +35,7 @@ Routine Description:
Arguments:
FfsHeader - Ffs Header availible to every PEIM
PeiServices - General purpose services available to every PEIM.
Returns:
None
@ -90,8 +90,8 @@ Returns:
EFI_RESOURCE_FIRMWARE_DEVICE,
(EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),
FdBase,
(
FvHeader->FvLength +
(
FvHeader->FvLength +
PcdGet32 (PcdFlashNvStorageVariableSize) +
PcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
PcdGet32 (PcdFlashNvStorageFtwSpareSize) +
@ -103,7 +103,7 @@ Returns:
// Hard code the address of the spare block and variable services.
// Assume it's a hard coded offset from FV0 in FD0.
//
FdSize =
FdSize =
PcdGet32 (PcdFlashNvStorageVariableSize) +
PcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
PcdGet32 (PcdFlashNvStorageFtwSpareSize) +

View File

@ -4,7 +4,7 @@
# This PEIM will produce the HOB to describe Firmware Volume, Firmware Devices
# on the Emu emulator.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -3,13 +3,13 @@
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -37,11 +37,11 @@ PeimInitializeFlashMap (
Routine Description:
Build GUIDed HOBs for platform specific flash map
Arguments:
FfsHeader - A pointer to the EFI_FFS_FILE_HEADER structure.
PeiServices - General purpose services available to every PEIM.
Returns:
EFI_STATUS
@ -74,7 +74,7 @@ Returns:
if (EFI_ERROR (Status)) {
return Status;
}
PcdSet64 (PcdFlashNvStorageVariableBase64, PcdGet64 (PcdEmuFlashNvStorageVariableBase) + FdFixUp);
PcdSet64 (PcdFlashNvStorageFtwWorkingBase64, PcdGet64 (PcdEmuFlashNvStorageFtwWorkingBase) + 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.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -90,14 +90,14 @@ Routine Description:
date items to there virtual address.
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.
Arguments:
(Standard EFI notify event - EFI_EVENT_NOTIFY)
Returns:
Returns:
None
@ -146,7 +146,7 @@ Arguments:
FwhInstance - The EFI_FW_VOL_INSTANCE fimrware instance structure
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found
@ -190,14 +190,14 @@ Routine Description:
Arguments:
Instance - The FV instance whose base address is going to be
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
of the firmware volume.
of the firmware volume.
Global - Pointer to ESAL_FWB_GLOBAL that contains all
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found
@ -230,14 +230,14 @@ Routine Description:
resulting attributes in output parameter
Arguments:
Instance - The FV instance whose attributes is going to be
Instance - The FV instance whose attributes is going to be
returned
Attributes - Output buffer which contains attributes
Global - Pointer to ESAL_FWB_GLOBAL that contains all
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found
@ -274,7 +274,7 @@ Routine Description:
Arguments:
Instance - The FV instance which the Lba belongs to
Lba - The logical block address
LbaAddress - On output, contains the physical starting address
LbaAddress - On output, contains the physical starting address
of the Lba
LbaLength - On output, contains the length of the block
NumOfBlocks - A pointer to a caller allocated UINTN in which the
@ -285,7 +285,7 @@ Arguments:
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - Successfully returns
EFI_INVALID_PARAMETER - Instance not found
@ -377,14 +377,14 @@ Arguments:
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
EFI_SUCCESS - The firmware volume was read successfully and
Returns:
EFI_SUCCESS - The firmware volume was read successfully and
contents are in Buffer
EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes returned
in Buffer
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
EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL
@ -463,13 +463,13 @@ Arguments:
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - The firmware volume was written successfully
EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes
actually written
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
EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL
@ -541,10 +541,10 @@ Arguments:
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - The erase request was successfully completed
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
partially erased
EFI_INVALID_PARAMETER - Instance not found
@ -596,13 +596,13 @@ FvbSetVolumeAttributes (
/*++
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
Arguments:
Instance - The FV instance whose attributes is going to be
Instance - The FV instance whose attributes is going to be
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.
On successful return, it contains the new settings
of the firmware volume
@ -610,7 +610,7 @@ Arguments:
instance data
Virtual - Whether CPU is in virtual or physical mode
Returns:
Returns:
EFI_SUCCESS - Successfully returns
EFI_ACCESS_DENIED - The volume setting is locked and cannot be modified
EFI_INVALID_PARAMETER - Instance not found, or The attributes requested are
@ -742,7 +742,7 @@ Arguments:
Returns:
Returns:
Returns:
EFI_SUCCESS - Successfully returns
**/
@ -777,8 +777,8 @@ Arguments:
returned. All blocks in this range have a size of
BlockSize
Returns:
EFI_SUCCESS - The firmware volume was read successfully and
Returns:
EFI_SUCCESS - The firmware volume was read successfully and
contents are in Buffer
**/
@ -813,7 +813,7 @@ Arguments:
This - Calling context
Attributes - output buffer which contains attributes
Returns:
Returns:
EFI_SUCCESS - Successfully returns
**/
@ -840,7 +840,7 @@ Arguments:
This - Calling context
Attributes - output buffer which contains attributes
Returns:
Returns:
EFI_SUCCESS - Successfully returns
**/
@ -856,28 +856,28 @@ EFI_STATUS
EFIAPI
FvbProtocolEraseBlocks (
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
...
...
)
/*++
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
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
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
block of the firmware volume), the EraseBlock() function must return
EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.
Arguments:
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.
Returns:
Returns:
EFI_SUCCESS - The erase request was successfully completed
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
partially erased
@ -978,13 +978,13 @@ Arguments:
output, indicates the actual number of bytes written
Buffer - Buffer containing source data for the write.
Returns:
Returns:
EFI_SUCCESS - The firmware volume was written successfully
EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes
actually written
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
EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL
@ -1026,14 +1026,14 @@ Arguments:
output, indicates the actual number of bytes Read
Buffer - Buffer containing source data for the Read.
Returns:
EFI_SUCCESS - The firmware volume was read successfully and
Returns:
EFI_SUCCESS - The firmware volume was read successfully and
contents are in Buffer
EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output,
NumBytes contains the total number of bytes returned
in Buffer
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
EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL
@ -1058,7 +1058,7 @@ Routine Description:
Arguments:
FwVolHeader - A pointer to a firmware volume header
Returns:
Returns:
EFI_SUCCESS - The firmware volume is consistent
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>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -1,10 +1,10 @@
## @file
# 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.
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -3,13 +3,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -2,13 +2,13 @@
Setup Variable data structure for Emu platform.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -2,13 +2,13 @@
Setup Variable data structure for Emu platform.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -2,13 +2,13 @@
Setup Variable data structure for Emu platform.
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -1,16 +1,16 @@
/*++ @file
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.
Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -23,12 +23,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
typedef struct {
// 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;
// Used by SecPeiServicesLib
EFI_PEI_PPI_DESCRIPTOR *PpiList;
// Needed by PEI PEI PeCoffLoaderExtraActionLib
EMU_THUNK_PROTOCOL *Thunk;
} EMU_MAGIC_PAGE_LAYOUT;

View File

@ -1,13 +1,13 @@
/*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -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.
@param Protocol Protocol to search for.

View File

@ -1,6 +1,6 @@
/*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.
Copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at

View File

@ -1,13 +1,13 @@
/*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -2,7 +2,7 @@
All 3rd parties to register the PPIs passed into PEI Core
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -20,7 +20,7 @@
EFI_STATUS
EFIAPI
AddThunkProtocol (
IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
IN CHAR16 *ConfigString,
IN BOOLEAN EmuBusDriver
);
@ -29,7 +29,7 @@ EFI_STATUS
EFIAPI
GetNextThunkProtocol (
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
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -49,7 +49,7 @@ EFI_STATUS
/*++
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.
Arguments:

View File

@ -6,13 +6,13 @@
manner.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -51,7 +51,7 @@ EFI_STATUS
/**
Read BufferSize bytes from Lba into Buffer.
This function reads the requested number of blocks from the device. All the
blocks are read, or an error is returned.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and
@ -59,13 +59,13 @@ EFI_STATUS
not be signaled.
@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.
@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] 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
caller is responsible for either having implicit or
@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
caller is responsible for either having implicit or
explicit ownership of the buffer.
@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_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
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.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources.
@ -118,7 +118,7 @@ EFI_STATUS
@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_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.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources.
@ -137,10 +137,10 @@ EFI_STATUS
/**
Flush the Block Device.
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
this request will not be signaled.
this request will not be signaled.
@param[in] This Indicates a pointer to the calling context.
@param[in,out] Token A pointer to the token associated with the transaction

View File

@ -1,21 +1,21 @@
/** @file
SimpleFileSystem protocol as defined in the UEFI 2.0 specification.
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
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
system other than FAT.
UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -41,8 +41,8 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
UINT32 Width,
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
UINT32 Width,
UINT32 Height
);
@ -55,19 +55,19 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
EFI_KEY_DATA *key
);
typedef
EFI_STATUS
(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
);
typedef
typedef
VOID
(EFIAPI *EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK) (
IN VOID *Context,
@ -77,7 +77,7 @@ VOID
typedef
EFI_STATUS
(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 VOID *Context
);
@ -104,8 +104,8 @@ EFI_STATUS
typedef
BOOLEAN
(EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
(EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EFI_KEY_DATA *KeyData
);

View File

@ -34,8 +34,8 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
UINT32 Width,
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
UINT32 Width,
UINT32 Height
);
@ -48,19 +48,19 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)(
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
EMU_GRAPHICS_WINDOW_PROTOCOL *Uga,
EFI_KEY_DATA *key
);
typedef
EFI_STATUS
(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
);
typedef
typedef
VOID
(EFIAPI *EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK) (
IN VOID *Context,
@ -70,7 +70,7 @@ VOID
typedef
EFI_STATUS
(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 BreakCallBack,
IN VOID *Context
@ -98,8 +98,8 @@ EFI_STATUS
typedef
BOOLEAN
(EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
(EFIAPI *EMU_GRAPHICS_WINDOWS_IS_KEY_PRESSED) (
IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows,
IN EFI_KEY_DATA *KeyData
);

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -13,7 +13,7 @@
**/
#ifndef __EMU_IO_THUNK__
#ifndef __EMU_IO_THUNK__
#define __EMU_IO_THUNK__
@ -24,13 +24,13 @@
typedef struct _EMU_IO_THUNK_PROTOCOL EMU_IO_THUNK_PROTOCOL;
typedef
typedef
EFI_STATUS
(EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN) (
IN EMU_IO_THUNK_PROTOCOL *This
);
typedef
typedef
EFI_STATUS
(EFIAPI *EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE) (
IN EMU_IO_THUNK_PROTOCOL *This
@ -43,7 +43,7 @@ struct _EMU_IO_THUNK_PROTOCOL {
UINT16 Instance;
EMU_IO_THUNK_PROTOCOL_CLOSE_OPEN Open;
EMU_IO_THUNK_PROTOCOL_CLOSE_CLOSE Close;
VOID *Private; /// Used by implementation
VOID *Private; /// Used by implementation
};
extern EFI_GUID gEmuIoThunkProtocolGuid;

View File

@ -1,17 +1,17 @@
/** @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.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portitions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
Portitions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -81,8 +81,8 @@ EFI_STATUS
);
/**
Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation
Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers.
@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
provided in the previous call to Initialize().
Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize().
@param This The protocol instance pointer.
@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.
@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.
@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.
@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_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_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.
@ -430,11 +430,11 @@ EFI_STATUS
//
// Revision defined in EFI1.1
//
//
#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.
///
struct _EMU_SNP_PROTOCOL {

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -44,34 +44,34 @@ typedef struct _EMU_THUNK_PROTOCOL EMU_THUNK_PROTOCOL;
typedef
typedef
UINTN
(EFIAPI *EMU_WRITE_STD_ERROR) (
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
);
typedef
);
typedef
EFI_STATUS
(EFIAPI *EMU_CONFIG_STD_IN) (
VOID
);
typedef
typedef
UINTN
(EFIAPI *EMU_WRITE_STD_OUT) (
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
);
typedef
typedef
UINTN
(EFIAPI *EMU_READ_STD_IN) (
OUT UINT8 *Buffer,
IN UINTN NumberOfBytes
);
typedef
typedef
BOOLEAN
(EFIAPI *EMU_POLL_STD_IN) (
VOID
@ -89,28 +89,28 @@ VOID *
(EFIAPI *EMU_OS_VMALLOC) (
IN UINTN Size
);
typedef
typedef
BOOLEAN
(EFIAPI *EMU_OS_FREE) (
IN VOID *Ptr
);
typedef
typedef
EFI_STATUS
(EFIAPI *EMU_PE_COFF_GET_ENTRY_POINT) (
IN VOID *Pe32Data,
IN OUT VOID **EntryPoint
);
typedef
typedef
VOID
(EFIAPI *EMU_PE_COFF_RELOCATE_EXTRA_ACTION) (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
);
typedef
typedef
VOID
(EFIAPI *EMU_PE_COFF_UNLOAD_EXTRA_ACTION) (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
@ -121,7 +121,7 @@ VOID
(EFIAPI *EMU_ENABLE_INERRUPTS) (
VOID
);
typedef
VOID
(EFIAPI *EMU_DISABLE_INERRUPTS) (
@ -157,14 +157,14 @@ VOID
(EFIAPI *EMU_EXIT) (
IN UINTN Status
);
typedef
VOID
(EFIAPI *EMU_GET_TIME) (
OUT EFI_TIME *Time,
OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
);
typedef
VOID
(EFIAPI *EMU_SET_TIME) (
@ -184,23 +184,23 @@ VOID
IN UINT64 PeriodMs,
IN EMU_SET_TIMER_CALLBACK CallBack
);
/**
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
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 !.
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
by the EmuBusDriver. FALSE means return all possible protocols
@param Instance On input the protocol to search for, or NULL to start a search
of all the supported protocol instances.
@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 Instance On input the protocol to search for, or NULL to start a search
of all the supported protocol instances.
@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.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The next protocol instance was not found.
@ -213,7 +213,7 @@ EFI_STATUS
IN BOOLEAN EmuBusDriver,
OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL
);
struct _EMU_THUNK_PROTOCOL {
// Used for early debug printing
@ -222,22 +222,22 @@ struct _EMU_THUNK_PROTOCOL {
EMU_WRITE_STD_OUT WriteStdOut;
EMU_READ_STD_IN ReadStdIn;
EMU_POLL_STD_IN PollStdIn;
//
// Map OS malloc/free so we can use OS based guard malloc
//
EMU_OS_MALLOC Malloc;
EMU_OS_VMALLOC Valloc;
EMU_OS_FREE Free;
///
/// PE/COFF loader hooks to get symbols loaded
///
EMU_PE_COFF_GET_ENTRY_POINT PeCoffGetEntryPoint;
EMU_PE_COFF_RELOCATE_EXTRA_ACTION PeCoffRelocateImageExtraAction;
EMU_PE_COFF_UNLOAD_EXTRA_ACTION PeCoffUnloadImageExtraAction;
///
/// DXE Architecture Protocol Services
///
@ -249,10 +249,10 @@ struct _EMU_THUNK_PROTOCOL {
EMU_SLEEP Sleep;
EMU_CPU_SLEEP CpuSleep;
EMU_EXIT Exit;
EMU_GET_TIME GetTime;
EMU_GET_TIME GetTime;
EMU_SET_TIME SetTime;
EMU_SET_TIMER SetTimer;
EMU_SET_TIMER SetTimer;
///
/// Generic System Services
///

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
/*++ @file
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -42,16 +42,16 @@ DxeEmuLibConstructor (
GuidHob = GetFirstGuidHob (&gEmuThunkProtocolGuid);
ASSERT (GuidHob != NULL);
gEmuThunk = (EMU_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));
ASSERT (gEmuThunk != NULL);
return EFI_SUCCESS;
}
/**
Serach the EMU IO Thunk database for a matching EMU IO Thunk
Serach the EMU IO Thunk database for a matching EMU IO Thunk
Protocol instance.
@param Protocol Protocol to search for.
@ -70,19 +70,19 @@ GetIoThunkInstance (
{
EFI_STATUS Status;
EMU_IO_THUNK_PROTOCOL *EmuIoThunk;
for (Status = EFI_SUCCESS, EmuIoThunk = NULL; !EFI_ERROR (Status); ) {
Status = gEmuThunk->GetNextProtocol (FALSE, &EmuIoThunk);
if (EFI_ERROR (Status)) {
break;
}
if (EmuIoThunk->Instance == Instance) {
if (CompareGuid (EmuIoThunk->Protocol, Protocol)) {
return EmuIoThunk;
}
}
}
return NULL;
}

View File

@ -1,10 +1,10 @@
## @file
# A library to produce the global variable 'gEmuThunk'
#
# This library contains a single global variable 'gEmuThunk' along with a constructor to
# This library contains a single global variable 'gEmuThunk' along with a constructor to
# initialize that global.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -22,7 +22,7 @@
FILE_GUID = 31479AFD-B06F-4E4A-863B-A8F7E7710778
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = EmuThunkLib
LIBRARY_CLASS = EmuThunkLib
CONSTRUCTOR = DxeEmuLibConstructor

View File

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

View File

@ -2,7 +2,7 @@
# PeCoff extra action libary for DXE phase that run Emu emulator.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at

View File

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

View File

@ -2,7 +2,7 @@
# Write only instance of Serial Port Library with empty functions.
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -30,11 +30,11 @@
[Packages]
MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec
[LibraryClasses]
EmuThunkLib

View File

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

View File

@ -2,7 +2,7 @@
# Write only instance of Serial Port Library with empty functions.
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -30,11 +30,11 @@
[Packages]
MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec
[LibraryClasses]
EmuThunkLib

View File

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

View File

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

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -93,14 +93,14 @@ Routine Description:
Arguments:
PlatformConsole - Predfined platform default console device array.
Returns:
EFI_SUCCESS - Success connect at least one ConIn and ConOut
device, there must have one ConOut device is
EFI_SUCCESS - Success connect at least one ConIn and ConOut
device, there must have one ConOut device is
active vga device.
EFI_STATUS - Return the status of
EFI_STATUS - Return the status of
BdsLibConnectAllDefaultConsoles ()
**/
@ -149,17 +149,17 @@ PlatformBdsConnectSequence (
Routine Description:
Connect with predeined platform connect sequence,
Connect with predeined platform connect sequence,
the OEM/IBV can customize with their own connect sequence.
Arguments:
None.
Returns:
None.
**/
{
UINTN Index;
@ -195,15 +195,15 @@ Routine Description:
Load the predefined driver option, OEM/IBV can customize this
to load their own drivers
Arguments:
BdsDriverLists - The header of the driver option link list.
Returns:
None.
**/
{
UINTN Index;
@ -235,19 +235,19 @@ Routine Description:
Perform the platform diagnostic, such like test memory. OEM/IBV also
can customize this fuction to support specific platform diagnostic.
Arguments:
MemoryTestLevel - The memory test intensive level
QuietBoot - Indicate if need to enable the quiet boot
BaseMemoryTest - A pointer to BdsMemoryTest()
Returns:
None.
**/
{
EFI_STATUS Status;
@ -291,11 +291,11 @@ Routine Description:
The function will excute with as the platform policy, current policy
is driven by boot mode. IBV/OEM can customize this code for their specific
policy action.
Arguments:
DriverOptionList - The header of the driver option link list
BootOptionList - The header of the boot option link list
ProcessCapsules - A pointer to ProcessCapsules()
@ -305,7 +305,7 @@ Arguments:
Returns:
None.
**/
{
EFI_STATUS Status;
@ -431,7 +431,7 @@ PlatformBdsBootSuccess (
/*++
Routine Description:
Hook point after a boot attempt succeeds. We don't expect a boot option to
return, so the EFI 1.0 specification defines that you will default to an
interactive mode and stop processing the BootOrder list in this case. This
@ -442,7 +442,7 @@ Arguments:
Option - Pointer to Boot Option that succeeded to boot.
Returns:
None.
**/
@ -471,11 +471,11 @@ PlatformBdsBootFail (
/*++
Routine Description:
Hook point after a boot attempt fails.
Arguments:
Option - Pointer to Boot Option that failed to boot.
Status - Status returned from failed boot.
@ -485,7 +485,7 @@ Arguments:
ExitDataSize - Exit data size returned from failed boot.
Returns:
None.
**/
@ -510,16 +510,16 @@ PlatformBdsNoConsoleAction (
/*++
Routine Description:
This function is remained for IBV/OEM to do some platform action,
if there no console device can be connected.
Arguments:
None.
Returns:
EFI_SUCCESS - Direct return success now.
**/

View File

@ -2,13 +2,13 @@
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -3,7 +3,7 @@
#
# Do platform action customized by IBV/OEM.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -21,7 +21,7 @@
FILE_GUID = 59569181-CBF8-2E44-9C3E-C2AB2F5608E1
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
#
@ -61,6 +61,6 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
[Depex]
gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid

View File

@ -2,13 +2,13 @@
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -1,23 +1,23 @@
/** @file
Support routines for memory allocation routines based
Support routines for memory allocation routines based
on boot services for Dxe phase drivers using OS malloc.
OS malloc is used so OS based malloc debugging tools can be used.
If a single driver links against this lib protocols from other
drivers, or EFI boot services can return a buffer that needs to
freed using the EFI scheme. This is why the gEmuThunk->Free ()
OS malloc is used so OS based malloc debugging tools can be used.
If a single driver links against this lib protocols from other
drivers, or EFI boot services can return a buffer that needs to
freed using the EFI scheme. This is why the gEmuThunk->Free ()
can detect if the memory rang is for EFI so the right free can be
called.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -46,12 +46,12 @@
**/
VOID *
InternalAllocatePages (
IN EFI_MEMORY_TYPE MemoryType,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages
)
{
EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS Memory;
EFI_PHYSICAL_ADDRESS Memory;
if (Pages == 0) {
return NULL;
@ -134,11 +134,11 @@ AllocateReservedPages (
must have been allocated on a previous call to the page allocation services of the Memory
Allocation Library. If it is not possible to free allocated pages, then this function will
perform no actions.
If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
then ASSERT().
If Pages is zero, then ASSERT().
@param Buffer The pointer to the buffer of pages to free.
@param Pages The number of 4 KB pages to free.
@ -155,7 +155,7 @@ FreePages (
ASSERT (Pages != 0);
if (!gEmuThunk->Free (Buffer)) {
// The Free thunk will not free memory allocated in emulated EFI memory.
// The assmuption is this was allocated directly by EFI. We need this as some
// The assmuption is this was allocated directly by EFI. We need this as some
// times protocols or EFI BootServices can return dynamically allocated buffers.
Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);
ASSERT_EFI_ERROR (Status);
@ -181,7 +181,7 @@ FreePages (
**/
VOID *
InternalAllocateAlignedPages (
IN EFI_MEMORY_TYPE MemoryType,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
IN UINTN Alignment
)
@ -197,7 +197,7 @@ InternalAllocateAlignedPages (
// Alignment must be a power of two or zero.
//
ASSERT ((Alignment & (Alignment - 1)) == 0);
if (Pages == 0) {
return NULL;
}
@ -211,7 +211,7 @@ InternalAllocateAlignedPages (
// Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.
//
ASSERT (RealPages > Pages);
Memory = gEmuThunk->Valloc (Pages * EFI_PAGE_SIZE);
if (Memory != NULL) {
return NULL;
@ -252,7 +252,7 @@ InternalAllocateAlignedPages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@ -279,7 +279,7 @@ AllocateAlignedPages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@ -306,7 +306,7 @@ AllocateAlignedRuntimePages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
@param Pages The number of 4 KB pages to allocate.
@ -332,13 +332,13 @@ AllocateAlignedReservedPages (
Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
must have been allocated on a previous call to the aligned page allocation services of the Memory
Allocation Library. If it is not possible to free allocated pages, then this function will
Allocation Library. If it is not possible to free allocated pages, then this function will
perform no actions.
If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
Library, then ASSERT().
If Pages is zero, then ASSERT().
@param Buffer The pointer to the buffer of pages to free.
@param Pages The number of 4 KB pages to free.
@ -368,7 +368,7 @@ FreeAlignedPages (
**/
VOID *
InternalAllocatePool (
IN EFI_MEMORY_TYPE MemoryType,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN AllocationSize
)
{
@ -454,9 +454,9 @@ AllocateReservedPool (
**/
VOID *
InternalAllocateZeroPool (
IN EFI_MEMORY_TYPE PoolType,
IN EFI_MEMORY_TYPE PoolType,
IN UINTN AllocationSize
)
)
{
VOID *Memory;
@ -541,7 +541,7 @@ AllocateReservedZeroPool (
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param PoolType The type of pool to allocate.
@param AllocationSize The number of bytes to allocate and zero.
@ -552,10 +552,10 @@ AllocateReservedZeroPool (
**/
VOID *
InternalAllocateCopyPool (
IN EFI_MEMORY_TYPE PoolType,
IN EFI_MEMORY_TYPE PoolType,
IN UINTN AllocationSize,
IN CONST VOID *Buffer
)
)
{
VOID *Memory;
@ -567,7 +567,7 @@ InternalAllocateCopyPool (
Memory = CopyMem (Memory, Buffer, AllocationSize);
}
return Memory;
}
}
/**
Copies a buffer to an allocated buffer of type EfiBootServicesData.
@ -576,9 +576,9 @@ InternalAllocateCopyPool (
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer.
@ -603,9 +603,9 @@ AllocateCopyPool (
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer.
@ -630,9 +630,9 @@ AllocateRuntimeCopyPool (
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer.
@ -654,19 +654,19 @@ AllocateReservedCopyPool (
Reallocates a buffer of a specified memory type.
Allocates and zeros the number bytes specified by NewSize from memory of the type
specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
@param PoolType The type of pool to allocate.
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -674,7 +674,7 @@ AllocateReservedCopyPool (
**/
VOID *
InternalReallocatePool (
IN EFI_MEMORY_TYPE PoolType,
IN EFI_MEMORY_TYPE PoolType,
IN UINTN OldSize,
IN UINTN NewSize,
IN VOID *OldBuffer OPTIONAL
@ -694,18 +694,18 @@ InternalReallocatePool (
Reallocates a buffer of type EfiBootServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -726,10 +726,10 @@ ReallocatePool (
Reallocates a buffer of type EfiRuntimeServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
@ -737,7 +737,7 @@ ReallocatePool (
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -758,10 +758,10 @@ ReallocateRuntimePool (
Reallocates a buffer of type EfiReservedMemoryType.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
@ -769,7 +769,7 @@ ReallocateRuntimePool (
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -793,7 +793,7 @@ ReallocateReservedPool (
Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the
pool allocation services of the Memory Allocation Library. If it is not possible to free pool
resources, then this function will perform no actions.
If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
then ASSERT().
@ -810,7 +810,7 @@ FreePool (
if (!gEmuThunk->Free (Buffer)) {
// The Free thunk will not free memory allocated in emulated EFI memory.
// The assmuption is this was allocated directly by EFI. We need this as some
// The assmuption is this was allocated directly by EFI. We need this as some
// times protocols or EFI BootServices can return dynamically allocated buffers.
Status = gBS->FreePool (Buffer);
ASSERT_EFI_ERROR (Status);

View File

@ -1,6 +1,6 @@
/*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.
Copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at

View File

@ -1,10 +1,10 @@
## @file
# A library to produce the global variable 'gEmuThunk'
#
# This library contains a single global variable 'gEmuThunk' along with a constructor to
# This library contains a single global variable 'gEmuThunk' along with a constructor to
# initialize that global.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -22,7 +22,7 @@
FILE_GUID = 6B7067C7-A843-A34C-9530-48446963B740
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = KeyMapLib
LIBRARY_CLASS = KeyMapLib
[Sources]
KeyMapLibNull.c

View File

@ -6,7 +6,7 @@
# read-only memory.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

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

View File

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

View File

@ -3,7 +3,7 @@
#
# Lib to provide memory journal status code reporting Routines
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at

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

View File

@ -3,7 +3,7 @@
#
# PeCoffGetEntryPointLib library class for NT32 instance implemented by use NTPeiLoadFile PPI.
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -21,7 +21,7 @@
FILE_GUID = 1CBED347-7DE6-BC48-AC68-3758598124D2
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
LIBRARY_CLASS = PeCoffGetEntryPointLib
LIBRARY_CLASS = PeCoffGetEntryPointLib
#

View File

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

View File

@ -2,7 +2,7 @@
# Write only instance of Serial Port Library with empty functions.
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@ -33,7 +33,7 @@
[Packages]
MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec
[LibraryClasses]
PeiServicesLib
@ -41,5 +41,5 @@
gEmuThunkPpiGuid # PPI ALWAYS_CONSUMED

View File

@ -1,11 +1,11 @@
/** @file
PEI Services Table Pointer Library.
This library is used for PEIM which does executed from flash device directly but
executed in memory.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -26,14 +26,14 @@
CONST EFI_PEI_SERVICES **gPeiServices = NULL;
/**
Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification.
Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification.
If PeiServicesTablePointer is NULL, then ASSERT().
@param PeiServicesTablePointer The address of PeiServices pointer.
**/
VOID
@ -50,10 +50,10 @@ SetPeiServicesTablePointer (
/**
Retrieves the cached value of the PEI Services Table pointer.
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
as specified in the CPU binding section of the Platform Initialization Pre-EFI
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
as specified in the CPU binding section of the Platform Initialization Pre-EFI
Initialization Core Interface Specification.
If the cached PEI Services Table pointer is NULL, then ASSERT().
@return The pointer to PeiServices.
@ -101,13 +101,13 @@ PeiServicesTablePointerNotifyCallback (
EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnThunkList = {
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiPeiMemoryDiscoveredPpiGuid,
PeiServicesTablePointerNotifyCallback
PeiServicesTablePointerNotifyCallback
};
/**
Constructor register notification on when PPI updates. If PPI is
alreay installed registering the notify will cause the handle to
Constructor register notification on when PPI updates. If PPI is
alreay installed registering the notify will cause the handle to
run.
@param FileHandle The handle of FFS header the loaded driver.

View File

@ -6,7 +6,7 @@
# read-only memory.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -1,12 +1,12 @@
/** @file
PEI Services Table Pointer Library.
Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage.
This emulates a platform SRAM. The PI mechaism does not work in the emulator due to
lack of privledge.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
Portiions copyrigth (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -24,14 +24,14 @@
/**
Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification.
Caches a pointer PEI Services Table.
Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
Pre-EFI Initialization Core Interface Specification.
If PeiServicesTablePointer is NULL, then ASSERT().
@param PeiServicesTablePointer The address of PeiServices pointer.
**/
VOID
@ -48,10 +48,10 @@ SetPeiServicesTablePointer (
/**
Retrieves the cached value of the PEI Services Table pointer.
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
as specified in the CPU binding section of the Platform Initialization Pre-EFI
Returns the cached value of the PEI Services Table pointer in a CPU specific manner
as specified in the CPU binding section of the Platform Initialization Pre-EFI
Initialization Core Interface Specification.
If the cached PEI Services Table pointer is NULL, then ASSERT().
@return The pointer to PeiServices.
@ -64,7 +64,7 @@ GetPeiServicesTablePointer (
)
{
CONST EFI_PEI_SERVICES **PeiServicesTablePointer;
PeiServicesTablePointer = EMU_MAGIC_PAGE()->PeiServicesTablePointer;
ASSERT (PeiServicesTablePointer != NULL);
ASSERT (*PeiServicesTablePointer != NULL);

View File

@ -1,12 +1,12 @@
## @file
# PEI Services Table Pointer Library.
#
#
# Store PEI Services Table pointer via gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage.
# This emulates a platform SRAM. The PI mechaism does not work in the emulator due to
# lack of privledge.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

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

View File

@ -3,13 +3,13 @@
FV.
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@ -70,7 +70,7 @@ Arguments:
Returns:
Checksum of the header.
**/
{
UINT8 *ptr;

View File

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

View File

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

View File

@ -1,13 +1,13 @@
/*++ @file
Copyright (c) 2011, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

View File

@ -2,7 +2,7 @@
# Place thunk PPI in HOB.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -3,7 +3,7 @@
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -30,14 +30,14 @@ GetThunkPpiList (
)
{
UINTN Index;
if (gThunkPpiList == NULL) {
return NULL;
}
Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR)) - 1;
gThunkPpiList[Index].Flags |= EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
return gThunkPpiList;
}
@ -60,7 +60,7 @@ AddThunkPpi (
if (gThunkPpiList == NULL) {
return EFI_OUT_OF_RESOURCES;
}
Index = (gThunkPpiListSize/sizeof (EFI_PEI_PPI_DESCRIPTOR));
gThunkPpiList[Index].Flags = Flags;
gThunkPpiList[Index].Guid = Guid;

View File

@ -2,7 +2,7 @@
# Place thunk PPI in HOB.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License

View File

@ -3,7 +3,7 @@
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -38,7 +38,7 @@ LIST_ENTRY mThunkList = INITIALIZE_LIST_HEAD_VARIABLE (mThunkList);
EFI_STATUS
EFIAPI
AddThunkProtocol (
IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
IN EMU_IO_THUNK_PROTOCOL *ThunkIo,
IN CHAR16 *ConfigString,
IN BOOLEAN EmuBusDriver
)
@ -47,11 +47,11 @@ AddThunkProtocol (
CHAR16 *SubString;
UINTN Instance;
EMU_IO_THUNK_PROTOCOL_DATA *Private;
if (ThunkIo == NULL) {
return EFI_INVALID_PARAMETER;
}
Instance = 0;
StartString = AllocatePool (StrSize (ConfigString));
StrCpy (StartString, ConfigString);
@ -81,10 +81,10 @@ AddThunkProtocol (
Private->Signature = EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE;
Private->EmuBusDriver = EmuBusDriver;
CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL));
CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL));
Private->Data.Instance = Instance++;
Private->Data.ConfigString = StartString;
InsertTailList (&mThunkList, &Private->Link);
//
@ -104,14 +104,14 @@ GetNextThunkProtocol (
OUT EMU_IO_THUNK_PROTOCOL **Instance OPTIONAL
)
{
LIST_ENTRY *Link;
EMU_IO_THUNK_PROTOCOL_DATA *Private;
LIST_ENTRY *Link;
EMU_IO_THUNK_PROTOCOL_DATA *Private;
if (mThunkList.ForwardLink == &mThunkList) {
// Skip parsing an empty list
return EFI_NOT_FOUND;
}
for (Link = mThunkList.ForwardLink; Link != &mThunkList; Link = Link->ForwardLink) {
Private = CR (Link, EMU_IO_THUNK_PROTOCOL_DATA, Link, EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE);
if (EmuBusDriver & !Private->EmuBusDriver) {
@ -131,8 +131,8 @@ GetNextThunkProtocol (
return EFI_SUCCESS;
}
}
return EFI_NOT_FOUND;
}

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