diff options
161 files changed, 2567 insertions, 2567 deletions
diff --git a/EmulatorPkg/AutoScanPei/AutoScanPei.c b/EmulatorPkg/AutoScanPei/AutoScanPei.c index 78cdd34965..78a40db3a2 100644 --- a/EmulatorPkg/AutoScanPei/AutoScanPei.c +++ b/EmulatorPkg/AutoScanPei/AutoScanPei.c @@ -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;
}
diff --git a/EmulatorPkg/AutoScanPei/AutoScanPei.inf b/EmulatorPkg/AutoScanPei/AutoScanPei.inf index 9fd4a7d434..0a5d5f52e8 100644 --- a/EmulatorPkg/AutoScanPei/AutoScanPei.inf +++ b/EmulatorPkg/AutoScanPei/AutoScanPei.inf @@ -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
diff --git a/EmulatorPkg/BootModePei/BootModePei.c b/EmulatorPkg/BootModePei/BootModePei.c index e26e929f07..892e1c6f04 100644 --- a/EmulatorPkg/BootModePei/BootModePei.c +++ b/EmulatorPkg/BootModePei/BootModePei.c @@ -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
diff --git a/EmulatorPkg/BootModePei/BootModePei.inf b/EmulatorPkg/BootModePei/BootModePei.inf index 34172bb4a8..b7d17da97e 100644 --- a/EmulatorPkg/BootModePei/BootModePei.inf +++ b/EmulatorPkg/BootModePei/BootModePei.inf @@ -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
diff --git a/EmulatorPkg/CpuRuntimeDxe/Cpu.c b/EmulatorPkg/CpuRuntimeDxe/Cpu.c index 5ec315bea2..2f7d5368e0 100644 --- a/EmulatorPkg/CpuRuntimeDxe/Cpu.c +++ b/EmulatorPkg/CpuRuntimeDxe/Cpu.c @@ -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,
diff --git a/EmulatorPkg/CpuRuntimeDxe/Cpu.inf b/EmulatorPkg/CpuRuntimeDxe/Cpu.inf index ed8237f916..e87c50a6fc 100644 --- a/EmulatorPkg/CpuRuntimeDxe/Cpu.inf +++ b/EmulatorPkg/CpuRuntimeDxe/Cpu.inf @@ -36,7 +36,7 @@ CpuDriver.h
Strings.uni
MpService.c
-
+
[Packages]
MdePkg/MdePkg.dec
diff --git a/EmulatorPkg/CpuRuntimeDxe/CpuDriver.h b/EmulatorPkg/CpuRuntimeDxe/CpuDriver.h index 69505ff0e4..3ede8473d3 100644 --- a/EmulatorPkg/CpuRuntimeDxe/CpuDriver.h +++ b/EmulatorPkg/CpuRuntimeDxe/CpuDriver.h @@ -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;
diff --git a/EmulatorPkg/CpuRuntimeDxe/CpuIo.c b/EmulatorPkg/CpuRuntimeDxe/CpuIo.c index 6f63375f4f..a8c10ba555 100644 --- a/EmulatorPkg/CpuRuntimeDxe/CpuIo.c +++ b/EmulatorPkg/CpuRuntimeDxe/CpuIo.c @@ -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.
**/
diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c index 7f3b1995f2..b5b1d156c0 100644 --- a/EmulatorPkg/CpuRuntimeDxe/MpService.c +++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c @@ -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);
diff --git a/EmulatorPkg/CpuRuntimeDxe/Strings.uni b/EmulatorPkg/CpuRuntimeDxe/Strings.uni Binary files differindex c8a226e038..f5aa4ddb43 100644 --- a/EmulatorPkg/CpuRuntimeDxe/Strings.uni +++ b/EmulatorPkg/CpuRuntimeDxe/Strings.uni diff --git a/EmulatorPkg/EmuBlockIoDxe/ComponentName.c b/EmulatorPkg/EmuBlockIoDxe/ComponentName.c index 2cad6ca836..7ecce35300 100644 --- a/EmulatorPkg/EmuBlockIoDxe/ComponentName.c +++ b/EmulatorPkg/EmuBlockIoDxe/ComponentName.c @@ -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:
diff --git a/EmulatorPkg/EmuBlockIoDxe/DriverConfiguration.c b/EmulatorPkg/EmuBlockIoDxe/DriverConfiguration.c index 44a3cc33e3..03f94b0288 100644 --- a/EmulatorPkg/EmuBlockIoDxe/DriverConfiguration.c +++ b/EmulatorPkg/EmuBlockIoDxe/DriverConfiguration.c @@ -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.
--*/
diff --git a/EmulatorPkg/EmuBlockIoDxe/DriverDiagnostics.c b/EmulatorPkg/EmuBlockIoDxe/DriverDiagnostics.c index ebb730bf06..77a26e79d2 100644 --- a/EmulatorPkg/EmuBlockIoDxe/DriverDiagnostics.c +++ b/EmulatorPkg/EmuBlockIoDxe/DriverDiagnostics.c @@ -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.
--*/
diff --git a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c index b679d8f72a..e77de2c7bc 100644 --- a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c +++ b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c @@ -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.
diff --git a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.h b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.h index b11f305720..4b2e676953 100644 --- a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.h +++ b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.h @@ -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.
diff --git a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIoDxe.inf b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIoDxe.inf index 0e07822e3f..436afd975c 100644 --- a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIoDxe.inf +++ b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIoDxe.inf @@ -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]
diff --git a/EmulatorPkg/EmuBusDriverDxe/ComponentName.c b/EmulatorPkg/EmuBusDriverDxe/ComponentName.c index e8be214b3c..34275a32bc 100644 --- a/EmulatorPkg/EmuBusDriverDxe/ComponentName.c +++ b/EmulatorPkg/EmuBusDriverDxe/ComponentName.c @@ -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"
diff --git a/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.c b/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.c index 0430ec3dd2..623544508c 100644 --- a/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.c +++ b/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.c @@ -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.
diff --git a/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.h b/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.h index e5eee56254..082a33ee1b 100644 --- a/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.h +++ b/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.h @@ -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.
**/
diff --git a/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf b/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf index 44f2af0cfa..861bc9fa47 100644 --- a/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf +++ b/EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf @@ -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
diff --git a/EmulatorPkg/EmuGopDxe/ComponentName.c b/EmulatorPkg/EmuGopDxe/ComponentName.c index e10f607cec..058e4557ef 100644 --- a/EmulatorPkg/EmuGopDxe/ComponentName.c +++ b/EmulatorPkg/EmuGopDxe/ComponentName.c @@ -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:
diff --git a/EmulatorPkg/EmuGopDxe/EmuGopDxe.inf b/EmulatorPkg/EmuGopDxe/EmuGopDxe.inf index 19c7b2e679..97ebc60f51 100644 --- a/EmulatorPkg/EmuGopDxe/EmuGopDxe.inf +++ b/EmulatorPkg/EmuGopDxe/EmuGopDxe.inf @@ -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
diff --git a/EmulatorPkg/EmuGopDxe/Gop.h b/EmulatorPkg/EmuGopDxe/Gop.h index 03e33ea636..6f7b082618 100644 --- a/EmulatorPkg/EmuGopDxe/Gop.h +++ b/EmulatorPkg/EmuGopDxe/Gop.h @@ -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; diff --git a/EmulatorPkg/EmuGopDxe/GopDriver.c b/EmulatorPkg/EmuGopDxe/GopDriver.c index 8ddaa86cfa..b7cec38938 100644 --- a/EmulatorPkg/EmuGopDxe/GopDriver.c +++ b/EmulatorPkg/EmuGopDxe/GopDriver.c @@ -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.
diff --git a/EmulatorPkg/EmuGopDxe/GopInput.c b/EmulatorPkg/EmuGopDxe/GopInput.c index 0bc2eb5a02..571776b194 100644 --- a/EmulatorPkg/EmuGopDxe/GopInput.c +++ b/EmulatorPkg/EmuGopDxe/GopInput.c @@ -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 diff --git a/EmulatorPkg/EmuGopDxe/GopScreen.c b/EmulatorPkg/EmuGopDxe/GopScreen.c index 7f4333d169..fff07d57fd 100644 --- a/EmulatorPkg/EmuGopDxe/GopScreen.c +++ b/EmulatorPkg/EmuGopDxe/GopScreen.c @@ -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); diff --git a/EmulatorPkg/EmuSimpleFileSystemDxe/ComponentName.c b/EmulatorPkg/EmuSimpleFileSystemDxe/ComponentName.c index fa6404a81a..987658898b 100644 --- a/EmulatorPkg/EmuSimpleFileSystemDxe/ComponentName.c +++ b/EmulatorPkg/EmuSimpleFileSystemDxe/ComponentName.c @@ -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.
**/
diff --git a/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.c b/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.c index 551b54332c..0af4860e4f 100644 --- a/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.c +++ b/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.c @@ -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.
diff --git a/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.h b/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.h index 5a1182c2ad..06369ca3e8 100644 --- a/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.h +++ b/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystem.h @@ -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
diff --git a/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf b/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf index 63bafa870d..6663d6f3b0 100644 --- a/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf +++ b/EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf @@ -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
diff --git a/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.c b/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.c index 4432218b51..7f8a643e8a 100644 --- a/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.c +++ b/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.c @@ -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.
//
diff --git a/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.h b/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.h index 21bfc42c14..e2b3c303bf 100644 --- a/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.h +++ b/EmulatorPkg/EmuSnpDxe/EmuSnpDxe.h @@ -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.
diff --git a/EmulatorPkg/EmuThunkDxe/EmuThunk.c b/EmulatorPkg/EmuThunkDxe/EmuThunk.c index a0661c8726..3a421bfdf3 100644 --- a/EmulatorPkg/EmuThunkDxe/EmuThunk.c +++ b/EmulatorPkg/EmuThunkDxe/EmuThunk.c @@ -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().
**/
diff --git a/EmulatorPkg/EmuThunkDxe/EmuThunk.inf b/EmulatorPkg/EmuThunkDxe/EmuThunk.inf index 394d280912..4e798eef8d 100644 --- a/EmulatorPkg/EmuThunkDxe/EmuThunk.inf +++ b/EmulatorPkg/EmuThunkDxe/EmuThunk.inf @@ -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
diff --git a/EmulatorPkg/EmulatorPkg.dec b/EmulatorPkg/EmulatorPkg.dec index b5f719227a..f005c792cc 100644 --- a/EmulatorPkg/EmulatorPkg.dec +++ b/EmulatorPkg/EmulatorPkg.dec @@ -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
diff --git a/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.c b/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.c index ec9fe5c0b7..91d1197b4f 100644 --- a/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.c +++ b/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.c @@ -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) +
diff --git a/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.inf b/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.inf index 368f947d73..38483918e5 100644 --- a/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.inf +++ b/EmulatorPkg/FirmwareVolumePei/FirmwareVolumePei.inf @@ -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
diff --git a/EmulatorPkg/FlashMapPei/FlashMapPei.c b/EmulatorPkg/FlashMapPei/FlashMapPei.c index 94c1874193..5d8bff8a79 100644 --- a/EmulatorPkg/FlashMapPei/FlashMapPei.c +++ b/EmulatorPkg/FlashMapPei/FlashMapPei.c @@ -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);
diff --git a/EmulatorPkg/FlashMapPei/FlashMapPei.inf b/EmulatorPkg/FlashMapPei/FlashMapPei.inf index 15a872a264..1028e5f579 100644 --- a/EmulatorPkg/FlashMapPei/FlashMapPei.inf +++ b/EmulatorPkg/FlashMapPei/FlashMapPei.inf @@ -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
diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c b/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c index a95b180adb..9513d05bed 100644 --- a/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c +++ b/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c @@ -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
diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c b/EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c index 34f2910643..5668b5472c 100644 --- a/EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c +++ b/EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c @@ -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.
**/
diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf b/EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf index c7c21abbbe..00140b3cb9 100644 --- a/EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +++ b/EmulatorPkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf @@ -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
diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FwBlockService.h b/EmulatorPkg/FvbServicesRuntimeDxe/FwBlockService.h index e4984515a4..62dfcd54a1 100644 --- a/EmulatorPkg/FvbServicesRuntimeDxe/FwBlockService.h +++ b/EmulatorPkg/FvbServicesRuntimeDxe/FwBlockService.h @@ -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.
**/
diff --git a/EmulatorPkg/Include/Guid/EmuPhysicalDisk.h b/EmulatorPkg/Include/Guid/EmuPhysicalDisk.h index 324dc0474f..8461ee7142 100644 --- a/EmulatorPkg/Include/Guid/EmuPhysicalDisk.h +++ b/EmulatorPkg/Include/Guid/EmuPhysicalDisk.h @@ -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.
**/
diff --git a/EmulatorPkg/Include/Guid/EmuSystemConfig.h b/EmulatorPkg/Include/Guid/EmuSystemConfig.h index b3a7d9b09f..0f297d9660 100644 --- a/EmulatorPkg/Include/Guid/EmuSystemConfig.h +++ b/EmulatorPkg/Include/Guid/EmuSystemConfig.h @@ -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.
**/
diff --git a/EmulatorPkg/Include/Guid/EmuVirtualDisk.h b/EmulatorPkg/Include/Guid/EmuVirtualDisk.h index 17b97dc72b..c6d2bea89c 100644 --- a/EmulatorPkg/Include/Guid/EmuVirtualDisk.h +++ b/EmulatorPkg/Include/Guid/EmuVirtualDisk.h @@ -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.
**/
diff --git a/EmulatorPkg/Include/Library/EmuMagicPageLib.h b/EmulatorPkg/Include/Library/EmuMagicPageLib.h index a701b763d3..e0c339a3b8 100644 --- a/EmulatorPkg/Include/Library/EmuMagicPageLib.h +++ b/EmulatorPkg/Include/Library/EmuMagicPageLib.h @@ -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; diff --git a/EmulatorPkg/Include/Library/EmuThunkLib.h b/EmulatorPkg/Include/Library/EmuThunkLib.h index 9d69d4f2eb..98b22e16ee 100644 --- a/EmulatorPkg/Include/Library/EmuThunkLib.h +++ b/EmulatorPkg/Include/Library/EmuThunkLib.h @@ -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. diff --git a/EmulatorPkg/Include/Library/KeyMapLib.h b/EmulatorPkg/Include/Library/KeyMapLib.h index 7bd29a7230..45dbfa4f18 100644 --- a/EmulatorPkg/Include/Library/KeyMapLib.h +++ b/EmulatorPkg/Include/Library/KeyMapLib.h @@ -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
diff --git a/EmulatorPkg/Include/Library/PpiListLib.h b/EmulatorPkg/Include/Library/PpiListLib.h index 061cfca34e..c1271b23c8 100644 --- a/EmulatorPkg/Include/Library/PpiListLib.h +++ b/EmulatorPkg/Include/Library/PpiListLib.h @@ -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. **/ diff --git a/EmulatorPkg/Include/Library/ThunkPpiList.h b/EmulatorPkg/Include/Library/ThunkPpiList.h index febc972e20..cd5af7ac3f 100644 --- a/EmulatorPkg/Include/Library/ThunkPpiList.h +++ b/EmulatorPkg/Include/Library/ThunkPpiList.h @@ -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
diff --git a/EmulatorPkg/Include/Library/ThunkProtocolList.h b/EmulatorPkg/Include/Library/ThunkProtocolList.h index 5b25f9cc86..918970ddb0 100644 --- a/EmulatorPkg/Include/Library/ThunkProtocolList.h +++ b/EmulatorPkg/Include/Library/ThunkProtocolList.h @@ -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
);
-
+
diff --git a/EmulatorPkg/Include/Ppi/EmuThunk.h b/EmulatorPkg/Include/Ppi/EmuThunk.h index 20cdc462f9..7788d7b569 100644 --- a/EmulatorPkg/Include/Ppi/EmuThunk.h +++ b/EmulatorPkg/Include/Ppi/EmuThunk.h @@ -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:
diff --git a/EmulatorPkg/Include/Protocol/EmuBlockIo.h b/EmulatorPkg/Include/Protocol/EmuBlockIo.h index 26d6bb8518..8e5463c74e 100644 --- a/EmulatorPkg/Include/Protocol/EmuBlockIo.h +++ b/EmulatorPkg/Include/Protocol/EmuBlockIo.h @@ -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
diff --git a/EmulatorPkg/Include/Protocol/EmuFileSystem.h b/EmulatorPkg/Include/Protocol/EmuFileSystem.h index 3713acfdc1..6d8717479b 100644 --- a/EmulatorPkg/Include/Protocol/EmuFileSystem.h +++ b/EmulatorPkg/Include/Protocol/EmuFileSystem.h @@ -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 ); diff --git a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h index e1afa0ef5a..844159a766 100644 --- a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h +++ b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h @@ -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 ); diff --git a/EmulatorPkg/Include/Protocol/EmuIoThunk.h b/EmulatorPkg/Include/Protocol/EmuIoThunk.h index af132bea7e..471c13b882 100644 --- a/EmulatorPkg/Include/Protocol/EmuIoThunk.h +++ b/EmulatorPkg/Include/Protocol/EmuIoThunk.h @@ -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;
diff --git a/EmulatorPkg/Include/Protocol/EmuSnp.h b/EmulatorPkg/Include/Protocol/EmuSnp.h index fc8e24cfde..a022c9ecb7 100644 --- a/EmulatorPkg/Include/Protocol/EmuSnp.h +++ b/EmulatorPkg/Include/Protocol/EmuSnp.h @@ -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 {
diff --git a/EmulatorPkg/Include/Protocol/EmuThunk.h b/EmulatorPkg/Include/Protocol/EmuThunk.h index 27921b123c..eccf0f47d9 100644 --- a/EmulatorPkg/Include/Protocol/EmuThunk.h +++ b/EmulatorPkg/Include/Protocol/EmuThunk.h @@ -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
///
diff --git a/EmulatorPkg/Library/DevicePathTextLib/DevicePathTextLib.c b/EmulatorPkg/Library/DevicePathTextLib/DevicePathTextLib.c index ba625aea78..7478a5ef2a 100644 --- a/EmulatorPkg/Library/DevicePathTextLib/DevicePathTextLib.c +++ b/EmulatorPkg/Library/DevicePathTextLib/DevicePathTextLib.c @@ -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.
**/
diff --git a/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.c b/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.c index db3b313829..f4f3c09ddd 100644 --- a/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.c +++ b/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.c @@ -121,7 +121,7 @@ GetPerformanceCounterProperties ( if (EndValue != NULL) {
*EndValue = (UINT64)-1LL;
}
-
+
return gEmuThunk->QueryPerformanceFrequency ();
}
diff --git a/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.inf b/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.inf index 12826edbaf..88ce324c19 100644 --- a/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.inf +++ b/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.inf @@ -41,4 +41,4 @@ [LibraryClasses]
DebugLib
EmuThunkLib
-
+
diff --git a/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.c b/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.c index 2e42ea6151..22f8da7b64 100644 --- a/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.c +++ b/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.c @@ -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;
}
\ No newline at end of file diff --git a/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf b/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf index 731bddae9e..21268a439e 100644 --- a/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf +++ b/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf @@ -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
diff --git a/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.c b/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.c index fdb8d5334d..5a8730c5f7 100644 --- a/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.c +++ b/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.c @@ -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.
diff --git a/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.inf b/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.inf index b5961c5a5f..f79ebc78e2 100644 --- a/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.inf +++ b/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.inf @@ -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 diff --git a/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.c b/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.c index ccf4fa08eb..3d9e85bb36 100644 --- a/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.c +++ b/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.c @@ -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.
diff --git a/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.inf b/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.inf index a4734c558f..81276e6073 100644 --- a/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.inf +++ b/EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.inf @@ -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
-
+
diff --git a/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c b/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c index b4ef86e128..8d95921c03 100644 --- a/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c +++ b/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c @@ -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.
diff --git a/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf b/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf index 5d791bca64..c1514d0b5f 100644 --- a/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf +++ b/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf @@ -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
-
+
diff --git a/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.c b/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.c index 14bb17f00e..032fec4b84 100644 --- a/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.c +++ b/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.c @@ -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 ();
}
diff --git a/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.inf b/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.inf index 51479373ff..19f133e952 100644 --- a/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.inf +++ b/EmulatorPkg/Library/DxeTimerLib/DxeTimerLib.inf @@ -46,6 +46,6 @@ EmuThunkLib
UefiLib
UefiBootServicesTableLib
-
+
[Protocols]
gEfiTimerArchProtocolGuid
diff --git a/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.c b/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.c index 8f47ef9125..46d2a7ee03 100644 --- a/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.c +++ b/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.c @@ -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.
**/
diff --git a/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.h b/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.h index a76ec2e4bd..cf2bb3e81c 100644 --- a/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.h +++ b/EmulatorPkg/Library/EmuBdsLib/BdsPlatform.h @@ -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.
**/
diff --git a/EmulatorPkg/Library/EmuBdsLib/EmuBdsLib.inf b/EmulatorPkg/Library/EmuBdsLib/EmuBdsLib.inf index fecdbecbe6..1e121ee38e 100644 --- a/EmulatorPkg/Library/EmuBdsLib/EmuBdsLib.inf +++ b/EmulatorPkg/Library/EmuBdsLib/EmuBdsLib.inf @@ -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
diff --git a/EmulatorPkg/Library/EmuBdsLib/PlatformData.c b/EmulatorPkg/Library/EmuBdsLib/PlatformData.c index e20099b9f0..37e35f5e06 100644 --- a/EmulatorPkg/Library/EmuBdsLib/PlatformData.c +++ b/EmulatorPkg/Library/EmuBdsLib/PlatformData.c @@ -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.
**/
diff --git a/EmulatorPkg/Library/GuardUefiMemoryAllocationLib/MemoryAllocationLib.c b/EmulatorPkg/Library/GuardUefiMemoryAllocationLib/MemoryAllocationLib.c index c457e7c213..d6e20d6f74 100644 --- a/EmulatorPkg/Library/GuardUefiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EmulatorPkg/Library/GuardUefiMemoryAllocationLib/MemoryAllocationLib.c @@ -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);
diff --git a/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.c b/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.c index 5a80870f0f..e555026601 100644 --- a/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.c +++ b/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.c @@ -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
diff --git a/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf b/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf index f009d8510c..0b03e416ac 100644 --- a/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf +++ b/EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf @@ -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
diff --git a/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiCoreServicesTablePointerLib.inf b/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiCoreServicesTablePointerLib.inf index 04be649b82..f50f8a46de 100644 --- a/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiCoreServicesTablePointerLib.inf +++ b/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiCoreServicesTablePointerLib.inf @@ -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
diff --git a/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiServicesTablePointer.c b/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiServicesTablePointer.c index 9b02316af4..10f588843d 100644 --- a/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiServicesTablePointer.c +++ b/EmulatorPkg/Library/PeiCoreServicesTablePointerLib/PeiServicesTablePointer.c @@ -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.
diff --git a/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.c b/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.c index b398b53e51..b30ec8f0fc 100644 --- a/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.c +++ b/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.c @@ -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.
diff --git a/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.inf b/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.inf index f05dfc1ab4..9a757f7294 100644 --- a/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.inf +++ b/EmulatorPkg/Library/PeiEmuPeCoffExtraActionLib/PeiEmuPeCoffExtraActionLib.inf @@ -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 diff --git a/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.c b/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.c index e229805cfe..2c47a4f006 100644 --- a/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.c +++ b/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.c @@ -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) {
//
diff --git a/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.inf b/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.inf index 9cd1fbbfe4..bf35a35f1e 100644 --- a/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.inf +++ b/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/PeiEmuPeCoffGetEntryPointLib.inf @@ -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
#
diff --git a/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.c b/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.c index aa4e80cf01..4ff7144218 100644 --- a/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.c +++ b/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.c @@ -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.
diff --git a/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.inf b/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.inf index f45ce498c8..16450f6da3 100644 --- a/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.inf +++ b/EmulatorPkg/Library/PeiEmuSerialPortLib/PeiEmuSerialPortLib.inf @@ -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
-
+
diff --git a/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index 3454660fec..c34997854b 100644 --- a/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -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.
diff --git a/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf b/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf index 07f323a393..a4844bab09 100644 --- a/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf +++ b/EmulatorPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf @@ -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
diff --git a/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c b/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c index 4b4db5cafe..38ec0ea137 100644 --- a/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c +++ b/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointer.c @@ -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);
diff --git a/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf b/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf index 60c584e0e5..5c42914b45 100644 --- a/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf +++ b/EmulatorPkg/Library/PeiServicesTablePointerLibMagicPage/PeiServicesTablePointerLibMagicPage.inf @@ -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
diff --git a/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c b/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c index caf8a7c14a..4a212efbef 100644 --- a/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c +++ b/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c @@ -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 ();
}
diff --git a/EmulatorPkg/Library/SecPeiServicesLib/FwVol.c b/EmulatorPkg/Library/SecPeiServicesLib/FwVol.c index ae4ebfbdb5..7fa4ddb594 100644 --- a/EmulatorPkg/Library/SecPeiServicesLib/FwVol.c +++ b/EmulatorPkg/Library/SecPeiServicesLib/FwVol.c @@ -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; diff --git a/EmulatorPkg/Library/SecPeiServicesLib/PeiServicesLib.c b/EmulatorPkg/Library/SecPeiServicesLib/PeiServicesLib.c index bdbf6875c9..f9ae3e64ed 100644 --- a/EmulatorPkg/Library/SecPeiServicesLib/PeiServicesLib.c +++ b/EmulatorPkg/Library/SecPeiServicesLib/PeiServicesLib.c @@ -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
diff --git a/EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf b/EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf index fdf8acca61..5454387eeb 100644 --- a/EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf +++ b/EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf @@ -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
#
diff --git a/EmulatorPkg/Library/SecPpiListLib/PpiListLib.c b/EmulatorPkg/Library/SecPpiListLib/PpiListLib.c index 42c0d97942..f9c0c3d677 100644 --- a/EmulatorPkg/Library/SecPpiListLib/PpiListLib.c +++ b/EmulatorPkg/Library/SecPpiListLib/PpiListLib.c @@ -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. **/ diff --git a/EmulatorPkg/Library/SecPpiListLib/SecPpiListLib.inf b/EmulatorPkg/Library/SecPpiListLib/SecPpiListLib.inf index e4b496755a..6b1dac8efd 100644 --- a/EmulatorPkg/Library/SecPpiListLib/SecPpiListLib.inf +++ b/EmulatorPkg/Library/SecPpiListLib/SecPpiListLib.inf @@ -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
diff --git a/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.c b/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.c index 3c2fd93e7f..ba64608f4d 100644 --- a/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.c +++ b/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.c @@ -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;
diff --git a/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.inf b/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.inf index 54f53ab313..f4a7be77a3 100644 --- a/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.inf +++ b/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.inf @@ -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
diff --git a/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c b/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c index 5aed594b6e..b2daa2bef5 100644 --- a/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c +++ b/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c @@ -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;
}
diff --git a/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.inf b/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.inf index 06668835f3..5a22c2f41f 100644 --- a/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.inf +++ b/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.inf @@ -1,7 +1,7 @@ ## @file
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# Portions copyright (c) 2011, Apple Inc. All rights reserved.
+# Portions copyright (c) 2011, Apple Inc. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerData.c index 52d120429f..d077092740 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscBaseBoardManufacturerData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c index 04f5a1edc5..ce217fa263 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c @@ -18,7 +18,7 @@ This function makes boot time changes to the contents of the
MiscBaseBoardManufacturer (Type 2).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -109,37 +109,37 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) //
// Make handle chosen by smbios protocol.add automatically.
//
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
//
// Manu will be the 1st optional string following the formatted structure.
- //
- SmbiosRecord->Manufacturer = 1;
+ //
+ SmbiosRecord->Manufacturer = 1;
//
// ProductName will be the 2st optional string following the formatted structure.
- //
- SmbiosRecord->ProductName = 2;
+ //
+ SmbiosRecord->ProductName = 2;
//
// Version will be the 3rd optional string following the formatted structure.
//
- SmbiosRecord->Version = 3;
+ SmbiosRecord->Version = 3;
//
// SerialNumber will be the 4th optional string following the formatted structure.
//
- SmbiosRecord->SerialNumber = 4;
+ SmbiosRecord->SerialNumber = 4;
//
// AssertTag will be the 5th optional string following the formatted structure.
//
- SmbiosRecord->AssetTag = 5;
+ SmbiosRecord->AssetTag = 5;
//
// LocationInChassis will be the 6th optional string following the formatted structure.
//
- SmbiosRecord->LocationInChassis = 6;
+ SmbiosRecord->LocationInChassis = 6;
SmbiosRecord->FeatureFlag = (*(BASE_BOARD_FEATURE_FLAGS*)&(ForType2InputData->BaseBoardFeatureFlags));
SmbiosRecord->ChassisHandle = 0;
SmbiosRecord->BoardType = (UINT8)ForType2InputData->BaseBoardType;
SmbiosRecord->NumberOfContainedObjectHandles = 0;
-
+
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
//
// Since we fill NumberOfContainedObjectHandles = 0 for simple, just after this filed to fill string
@@ -156,9 +156,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorData.c index b9a8cede83..48f08ffa91 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscBiosVendorData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c index 6d64ef4632..7fdd47f599 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c @@ -25,9 +25,9 @@ @retval EFI_SUCCESS All parameters were valid and *Value & *Exponent have been set.
@retval EFI_INVALID_PARAMETER Invalid parameter was found.
-
+
**/
-EFI_STATUS
+EFI_STATUS
GetValueExponentBase2(
IN OUT UINTN *Value,
OUT UINTN *Exponent
@@ -36,7 +36,7 @@ GetValueExponentBase2( if ((Value == NULL) || (Exponent == NULL)) {
return EFI_INVALID_PARAMETER;
}
-
+
while ((*Value % 2) == 0) {
*Value=*Value/2;
(*Exponent)++;
@@ -51,15 +51,15 @@ GetValueExponentBase2( @param Base2Data Pointer to Base2_Data
- @retval EFI_SUCCESS Transform successfully.
- @retval EFI_INVALID_PARAMETER Invalid parameter was found.
+ @retval EFI_SUCCESS Transform successfully.
+ @retval EFI_INVALID_PARAMETER Invalid parameter was found.
**/
UINT16
Base2ToByteWith64KUnit (
IN EFI_EXP_BASE2_DATA *Base2Data
)
-{
+{
UINT16 Value;
UINT16 Exponent;
@@ -109,11 +109,11 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) }
Version = (CHAR16 *) PcdGetPtr (PcdFirmwareVersionString);
- if (StrLen (Version) > 0) {
+ if (StrLen (Version) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);
HiiSetString (mHiiHandle, TokenToUpdate, Version, NULL);
}
-
+
ReleaseDate = (CHAR16 *) PcdGetPtr (PcdFirmwareReleaseDateString);
if (StrLen(ReleaseDate) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_RELEASE_DATE);
@@ -140,7 +140,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) if (DateStrLen > SMBIOS_STRING_MAX_LENGTH) {
return EFI_UNSUPPORTED;
}
-
+
//
// Two zeros following the last string.
//
@@ -156,7 +156,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) //
// Vendor will be the 1st optional string following the formatted structure.
//
- SmbiosRecord->Vendor = 1;
+ SmbiosRecord->Vendor = 1;
//
// Version will be the 2nd optional string following the formatted structure.
//
@@ -191,9 +191,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationData.c index 0b7c57a8a7..1c184c856d 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscBootInformationData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c index 65c9792a93..98d6181501 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c @@ -20,7 +20,7 @@ This function makes boot time changes to the contents of the
MiscBootInformation (Type 32).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -34,7 +34,7 @@ MISC_SMBIOS_TABLE_FUNCTION(BootInformationStatus) EFI_SMBIOS_HANDLE SmbiosHandle;
SMBIOS_TABLE_TYPE32 *SmbiosRecord;
EFI_MISC_BOOT_INFORMATION_STATUS* ForType32InputData;
-
+
ForType32InputData = (EFI_MISC_BOOT_INFORMATION_STATUS *)RecordData;
//
@@ -55,7 +55,7 @@ MISC_SMBIOS_TABLE_FUNCTION(BootInformationStatus) //
// Make handle chosen by smbios protocol.add automatically.
//
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->BootStatus = (UINT8)ForType32InputData->BootInformationStatus;
//
@@ -63,9 +63,9 @@ MISC_SMBIOS_TABLE_FUNCTION(BootInformationStatus) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerData.c index 795658bac6..8dfc848ff2 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscChassisManufacturerData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c index fd1262b190..8e57fd5022 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c @@ -19,7 +19,7 @@ This function makes boot time changes to the contents of the
MiscChassisManufacturer (Type 3).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -91,24 +91,24 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer) //
// Make handle chosen by smbios protocol.add automatically.
//
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
//
// Manu will be the 1st optional string following the formatted structure.
- //
- SmbiosRecord->Manufacturer = 1;
+ //
+ SmbiosRecord->Manufacturer = 1;
SmbiosRecord->Type = (UINT8)ForType3InputData->ChassisType.ChassisType;
//
// Version will be the 2nd optional string following the formatted structure.
//
- SmbiosRecord->Version = 2;
+ SmbiosRecord->Version = 2;
//
// SerialNumber will be the 3rd optional string following the formatted structure.
//
- SmbiosRecord->SerialNumber = 3;
+ SmbiosRecord->SerialNumber = 3;
//
// AssertTag will be the 4th optional string following the formatted structure.
//
- SmbiosRecord->AssetTag = 4;
+ SmbiosRecord->AssetTag = 4;
SmbiosRecord->BootupState = (UINT8)ForType3InputData->ChassisBootupState;
SmbiosRecord->PowerSupplyState = (UINT8)ForType3InputData->ChassisPowerSupplyState;
SmbiosRecord->ThermalState = (UINT8)ForType3InputData->ChassisThermalState;
@@ -126,9 +126,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscDevicePath.h b/EmulatorPkg/MiscSubClassPlatformDxe/MiscDevicePath.h index b1a9acfafd..0cd0e68c70 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscDevicePath.h +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscDevicePath.h @@ -1,13 +1,13 @@ /*++
-
+
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:
@@ -15,7 +15,7 @@ Module Name: Abstract:
- Misc class required EFI Device Path definitions (Ports, slots &
+ Misc class required EFI Device Path definitions (Ports, slots &
onboard devices)
**/
@@ -33,7 +33,7 @@ Abstract: #define USB1_1_STR "ACPI(PNP0A03,0)/PCI(1D,0)."
#define USB1_2_STR "ACPI(PNP0A03,0)/PCI(1D,1)."
#define USB1_3_STR "ACPI(PNP0A03,0)/PCI(1D,2)."
-#define USB2_1_STR "ACPI(PNP0A03,0)/PCI(1D,7)."
+#define USB2_1_STR "ACPI(PNP0A03,0)/PCI(1D,7)."
*/
//
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesData.c index 88d9d0fb4b..e56208ae4a 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscNumberOfInstallableLanguagesData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c index 9bd7f4da6a..3c3a5f3ed7 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c @@ -39,7 +39,7 @@ CurrentLanguageMatch ( CHAR8 *MatchLang;
CHAR8 *EndMatchLang;
UINTN CompareLength;
-
+
Languages = HiiGetSupportedLanguages (HiiHandle);
if (Languages == NULL) {
return;
@@ -61,10 +61,10 @@ CurrentLanguageMatch ( CompareLength = AsciiStrLen (BestLanguage);
for (MatchLang = Languages, (*Offset) = 0; MatchLang != '\0'; (*Offset)++) {
//
- // Seek to the end of current match language.
+ // Seek to the end of current match language.
//
for (EndMatchLang = MatchLang; *EndMatchLang != '\0' && *EndMatchLang != ';'; EndMatchLang++);
-
+
if ((EndMatchLang == MatchLang + CompareLength) && AsciiStrnCmp(MatchLang, BestLanguage, CompareLength) == 0) {
//
// Find the current best Language in the supported languages
@@ -144,7 +144,7 @@ GetSupportedLanguageNumber ( CHAR8 *Languages;
CHAR8 *LanguageString;
UINT16 LangNumber;
-
+
Languages = HiiGetSupportedLanguages (HiiHandle);
if (Languages == NULL) {
return 0;
@@ -186,7 +186,7 @@ MISC_SMBIOS_TABLE_FUNCTION(NumberOfInstallableLanguages) EFI_SMBIOS_HANDLE SmbiosHandle;
SMBIOS_TABLE_TYPE13 *SmbiosRecord;
EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES *ForType13InputData;
-
+
ForType13InputData = (EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES *)RecordData;
//
@@ -195,7 +195,7 @@ MISC_SMBIOS_TABLE_FUNCTION(NumberOfInstallableLanguages) if (RecordData == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
ForType13InputData->NumberOfInstallableLanguages = GetSupportedLanguageNumber (mHiiHandle);
//
@@ -216,7 +216,7 @@ MISC_SMBIOS_TABLE_FUNCTION(NumberOfInstallableLanguages) //
// Make handle chosen by smbios protocol.add automatically.
//
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->InstallableLanguages = (UINT8)ForType13InputData->NumberOfInstallableLanguages;
SmbiosRecord->Flags = (UINT8)ForType13InputData->LanguageFlags.AbbreviatedLanguageFormat;
@@ -228,9 +228,9 @@ MISC_SMBIOS_TABLE_FUNCTION(NumberOfInstallableLanguages) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringData.c index 1d0781586f..19c7416a44 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
-
+
MiscOemStringData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c index 94fc71c231..f3291828c3 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c @@ -18,7 +18,7 @@ This function makes boot time changes to the contents of the
MiscOemString (Type 11).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -59,8 +59,8 @@ MISC_SMBIOS_TABLE_FUNCTION(OemString) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE11);
//
// Make handle chosen by smbios protocol.add automatically.
- //
- SmbiosRecord->Hdr.Handle = 0;
+ //
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->StringCount = 1;
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
UnicodeStrToAsciiStr(OemStr, OptionalStrStart);
@@ -70,9 +70,9 @@ MISC_SMBIOS_TABLE_FUNCTION(OemString) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorData.c index 7d511e1912..0b2a22087e 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscPortInternalConnectorDesignatorData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c index 89c8815913..e137887803 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c @@ -1,19 +1,19 @@ /*++
-
+
Copyright (c) 2006 - 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.
Module Name:
MiscPortInternalConnectorDesignatorFunction.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
@@ -69,7 +69,7 @@ Returns: {
CHAR8 *OptionalStrStart;
UINTN InternalRefStrLen;
- UINTN ExternalRefStrLen;
+ UINTN ExternalRefStrLen;
EFI_STRING InternalRef;
EFI_STRING ExternalRef;
STRING_REF TokenForInternal;
@@ -78,7 +78,7 @@ Returns: SMBIOS_TABLE_TYPE8 *SmbiosRecord;
EFI_SMBIOS_HANDLE SmbiosHandle;
EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR *ForType8InputData;
-
+
ForType8InputData = (EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR *)RecordData;
//
// First check for invalid parameters.
@@ -89,8 +89,8 @@ Returns: TokenForInternal = 0;
TokenForExternal = 0;
-
- switch (ForType8InputData->PortInternalConnectorDesignator) {
+
+ switch (ForType8InputData->PortInternalConnectorDesignator) {
case STR_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR:
TokenForInternal = STRING_TOKEN (STR_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR);
@@ -147,13 +147,13 @@ Returns: //
// Make handle chosen by smbios protocol.add automatically.
//
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->InternalReferenceDesignator = 1;
SmbiosRecord->InternalConnectorType = (UINT8)ForType8InputData->PortInternalConnectorType;
SmbiosRecord->ExternalReferenceDesignator = 2;
SmbiosRecord->ExternalConnectorType = (UINT8)ForType8InputData->PortExternalConnectorType;
SmbiosRecord->PortType = (UINT8)ForType8InputData->PortType;
-
+
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
UnicodeStrToAsciiStr(InternalRef, OptionalStrStart);
UnicodeStrToAsciiStr(ExternalRef, OptionalStrStart + InternalRefStrLen + 1);
@@ -163,9 +163,9 @@ Returns: //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesData.c index f591a2e547..ca9ee8caca 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
-
+
MiscResetCapabilitiesData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c index 8303c5a29b..33a43a3e64 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c @@ -18,7 +18,7 @@ This function makes boot time changes to the contents of the
MiscOemString (Type 11).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -31,7 +31,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscResetCapabilities) EFI_SMBIOS_HANDLE SmbiosHandle;
SMBIOS_TABLE_TYPE23 *SmbiosRecord;
EFI_MISC_RESET_CAPABILITIES *ForType23InputData;
-
+
ForType23InputData = (EFI_MISC_RESET_CAPABILITIES *)RecordData;
//
@@ -52,11 +52,11 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscResetCapabilities) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE23);
//
// Make handle chosen by smbios protocol.add automatically.
- //
- SmbiosRecord->Hdr.Handle = 0;
+ //
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->Capabilities = *(UINT8*)&(ForType23InputData->ResetCapabilities);
SmbiosRecord->ResetCount = (UINT16)ForType23InputData->ResetCount;
- SmbiosRecord->ResetLimit = (UINT16)ForType23InputData->ResetLimit;
+ SmbiosRecord->ResetLimit = (UINT16)ForType23InputData->ResetLimit;
SmbiosRecord->TimerInterval = (UINT16)ForType23InputData->ResetTimerInterval;
SmbiosRecord->Timeout = (UINT16)ForType23InputData->ResetTimeout;
@@ -65,9 +65,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscResetCapabilities) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf index dd759851d7..cda0d276ee 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.inf @@ -3,7 +3,7 @@ #
# Parses the MiscSubclassDataTable and reports any generated data to the DataHub.
# All .uni file who tagged with "ToolCode="DUMMY"" in following file list is included by
-# MiscSubclassDriver.uni file, the StrGather tool will expand MiscSubclassDriver.uni file
+# MiscSubclassDriver.uni file, the StrGather tool will expand MiscSubclassDriver.uni file
# and parse all .uni file.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
#
@@ -38,18 +38,18 @@ MiscBiosVendor.uni
MiscBiosVendorData.c
MiscBiosVendorFunction.c
- MiscBootInformationData.c
+ MiscBootInformationData.c
MiscBootInformationFunction.c
MiscChassisManufacturer.uni
MiscChassisManufacturerData.c
MiscChassisManufacturerFunction.c
MiscNumberOfInstallableLanguagesData.c
MiscNumberOfInstallableLanguagesFunction.c
- MiscOemString.uni
- MiscOemStringData.c
- MiscOemStringFunction.c
+ MiscOemString.uni
+ MiscOemStringData.c
+ MiscOemStringFunction.c
MiscPortInternalConnectorDesignator.uni
- MiscPortInternalConnectorDesignatorData.c
+ MiscPortInternalConnectorDesignatorData.c
MiscPortInternalConnectorDesignatorFunction.c
MiscResetCapabilitiesData.c
MiscResetCapabilitiesFunction.c
@@ -95,7 +95,7 @@ [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
- gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
+ gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverDataTable.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverDataTable.c index cb71f7db50..d0be1cdca0 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverDataTable.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverDataTable.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscSubclassDriverDataTable.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
@@ -66,10 +66,10 @@ EFI_MISC_SMBIOS_DATA_TABLE mMiscSubclassDataTable[] = { MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION( MiscResetCapabilities, MiscResetCapabilities),
MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION(SystemLanguageString, SystemLanguageString),
MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION( MiscSystemManufacturer, MiscSystemManufacturer),
- MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION( SystemOptionString, SystemOptionString),
- MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION( MiscSystemSlotDesignation, MiscSystemSlotDesignation),
+ MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION( SystemOptionString, SystemOptionString),
+ MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION( MiscSystemSlotDesignation, MiscSystemSlotDesignation),
};
-
+
//
// Number of Data Table entries.
//
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c index 065ab6fef8..88a99a2108 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c @@ -51,7 +51,7 @@ LogMemorySmbiosRecord ( Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID**)&Smbios);
ASSERT_EFI_ERROR (Status);
-
+
NumSlots = 1;
//
@@ -63,7 +63,7 @@ LogMemorySmbiosRecord ( TotalMemorySize += StrDecimalToUint64 (MemString);
while (*MemString != '\0') {
if (*MemString == '!') {
- MemString++;
+ MemString++;
break;
}
MemString++;
@@ -85,7 +85,7 @@ LogMemorySmbiosRecord ( Type19Record->StartingAddress = 0;
Type19Record->EndingAddress = (UINT32)RShiftU64(TotalMemorySize, 10) - 1;
Type19Record->MemoryArrayHandle = 0;
- Type19Record->PartitionWidth = (UINT8)(NumSlots);
+ Type19Record->PartitionWidth = (UINT8)(NumSlots);
//
// Generate Memory Array Mapped Address info (TYPE 19)
@@ -128,7 +128,7 @@ Returns: {
UINTN Index;
EFI_STATUS EfiStatus;
- EFI_SMBIOS_PROTOCOL *Smbios;
+ EFI_SMBIOS_PROTOCOL *Smbios;
EfiStatus = gBS->LocateProtocol(&gEfiSmbiosProtocolGuid, NULL, (VOID**)&Smbios);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringData.c index 0dc706e659..347767884e 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscSystemLanguageStringData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c index 3e10c63caa..db15a252da 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c @@ -18,7 +18,7 @@ This function makes boot time changes to the contents of the
MiscOemString (Type 11).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -34,7 +34,7 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemLanguageString) CHAR8 *OptionalStrStart;
EFI_STRING Str;
STRING_REF TokenToGet;
-
+
//
// First check for invalid parameters.
@@ -60,23 +60,23 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemLanguageString) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE13);
//
// Make handle chosen by smbios protocol.add automatically.
- //
+ //
SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->InstallableLanguages = 1;
SmbiosRecord->Flags = 1;
SmbiosRecord->CurrentLanguages = 1;
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
UnicodeStrToAsciiStr(Str, OptionalStrStart);
-
+
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerData.c index 13befc45f6..5564ad1471 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscSystemManufacturerData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c index 9d2a3cbdc1..670f379f56 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscSystemManufacturerFunction.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
@@ -26,7 +26,7 @@ Abstract: This function makes boot time changes to the contents of the
MiscSystemManufacturer (Type 1).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -96,8 +96,8 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);
//
// Make handle chosen by smbios protocol.add automatically.
- //
- SmbiosRecord->Hdr.Handle = 0;
+ //
+ SmbiosRecord->Hdr.Handle = 0;
//
// Manu will be the 1st optional string following the formatted structure.
//
@@ -105,11 +105,11 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer) //
// ProductName will be the 2nd optional string following the formatted structure.
//
- SmbiosRecord->ProductName = 2;
+ SmbiosRecord->ProductName = 2;
//
- // Version will be the 3rd optional string following the formatted structure.
+ // Version will be the 3rd optional string following the formatted structure.
//
- SmbiosRecord->Version = 3;
+ SmbiosRecord->Version = 3;
//
// Version will be the 4th optional string following the formatted structure.
//
@@ -128,9 +128,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringData.c index 581586b857..b64181e0fb 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
MiscSystemOptionStringData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c index a910634f00..348a33ec82 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c @@ -20,7 +20,7 @@ This function makes boot time changes to the contents of the
MiscSystemOptionString (Type 12).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -50,7 +50,7 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemOptionString) if (OptStrLen > SMBIOS_STRING_MAX_LENGTH) {
return EFI_UNSUPPORTED;
}
-
+
//
// Two zeros following the last string.
//
@@ -62,7 +62,7 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemOptionString) //
// Make handle chosen by smbios protocol.add automatically.
//
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->StringCount = 1;
OptionalStrStart = (CHAR8*) (SmbiosRecord + 1);
@@ -72,9 +72,9 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemOptionString) //
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationData.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationData.c index 11b2339331..3406fdbe08 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationData.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationData.c @@ -1,19 +1,19 @@ /*++
Copyright (c) 2006 - 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.
Module Name:
-
+
MiscSystemSlotDesignationData.c
-
-Abstract:
+
+Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c index 72c4137c6b..3ed0fa74ca 100644 --- a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c +++ b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c @@ -18,7 +18,7 @@ This function makes boot time changes to the contents of the
MiscSystemSlotDesignator structure (Type 9).
- @param RecordData Pointer to copy of RecordData from the Data Table.
+ @param RecordData Pointer to copy of RecordData from the Data Table.
@retval EFI_SUCCESS All parameters were valid.
@retval EFI_UNSUPPORTED Unexpected RecordType value.
@@ -47,7 +47,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) TokenToGet = 0;
switch (ForType9InputData->SlotDesignation) {
- case STR_MISC_SYSTEM_SLOT_DESIGNATION:
+ case STR_MISC_SYSTEM_SLOT_DESIGNATION:
TokenToGet = STRING_TOKEN (STR_MISC_SYSTEM_SLOT_DESIGNATION);
break;
default:
@@ -59,7 +59,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) if (SlotDesignationStrLen > SMBIOS_STRING_MAX_LENGTH) {
return EFI_UNSUPPORTED;
}
-
+
//
// Two zeros following the last string.
//
@@ -68,28 +68,28 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) SmbiosRecord->Hdr.Type = EFI_SMBIOS_TYPE_SYSTEM_SLOTS;
SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE9);
- SmbiosRecord->Hdr.Handle = 0;
+ SmbiosRecord->Hdr.Handle = 0;
SmbiosRecord->SlotDesignation = 1;
SmbiosRecord->SlotType = ForType9InputData->SlotType;
SmbiosRecord->SlotDataBusWidth = ForType9InputData->SlotDataBusWidth;
SmbiosRecord->CurrentUsage = ForType9InputData->SlotUsage;
SmbiosRecord->SlotLength = ForType9InputData->SlotLength;
SmbiosRecord->SlotID = ForType9InputData->SlotId;
-
+
//
// Slot Characteristics
//
CopyMem ((UINT8 *) &SmbiosRecord->SlotCharacteristics1,(UINT8 *) &ForType9InputData->SlotCharacteristics,2);
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
UnicodeStrToAsciiStr(SlotDesignation, OptionalStrStart);
- //
+ //
// Now we have got the full smbios record, call smbios protocol to add this record.
//
SmbiosHandle = 0;
Status = Smbios-> Add(
- Smbios,
+ Smbios,
NULL,
- &SmbiosHandle,
+ &SmbiosHandle,
(EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
);
FreePool(SmbiosRecord);
diff --git a/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.c index 05c34bdbb5..b7b6c015fd 100644 --- a/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.c +++ b/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.c @@ -3,13 +3,13 @@ Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010 - 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>
@@ -55,14 +55,14 @@ EmuGetTime ( /*++
Routine Description:
- Service routine for RealTimeClockInstance->GetTime
+ Service routine for RealTimeClockInstance->GetTime
Arguments:
Time - A pointer to storage that will receive a snapshot of the current time.
Capabilities - A pointer to storage that will receive the capabilities of the real time clock
- in the platform. This includes the real time clock's resolution and accuracy.
+ in the platform. This includes the real time clock's resolution and accuracy.
All reported device capabilities are rounded up. This is an OPTIONAL argument.
Returns:
@@ -95,7 +95,7 @@ EmuSetTime ( /*++
Routine Description:
- Service routine for RealTimeClockInstance->SetTime
+ Service routine for RealTimeClockInstance->SetTime
Arguments:
@@ -105,7 +105,7 @@ Arguments: Returns:
EFI_SUCEESS - The operation completed successfully.
-
+
EFI_INVALID_PARAMETER - One of the fields in Time is out of range.
EFI_DEVICE_ERROR - The operation could not be complete due to a device error.
@@ -152,7 +152,7 @@ Arguments: Returns:
EFI_SUCEESS - The operation completed successfully.
-
+
EFI_DEVICE_ERROR - The operation could not be complete due to a device error.
EFI_UNSUPPORTED - The operation is not supported on this platform.
@@ -184,7 +184,7 @@ Arguments: Returns:
EFI_SUCEESS - The operation completed successfully.
-
+
EFI_DEVICE_ERROR - The operation could not be complete due to a device error.
EFI_INVALID_PARAMETER - A field in Time is out of range.
@@ -205,7 +205,7 @@ InitializeRealTimeClock ( /*++
Routine Description:
- Install Real Time Clock Protocol
+ Install Real Time Clock Protocol
Arguments:
ImageHandle - Image Handle
@@ -244,8 +244,8 @@ RtcTimeFieldsValid ( Routine Description:
Arguments:
-
- Returns:
+
+ Returns:
**/
{
if (Time->Year < 1998 ||
diff --git a/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.inf b/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.inf index bee90cb5eb..35712ac253 100644 --- a/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.inf +++ b/EmulatorPkg/RealTimeClockRuntimeDxe/RealTimeClock.inf @@ -3,7 +3,7 @@ #
# This real time clock module simulates virtual device by time WinAPI.
# 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
diff --git a/EmulatorPkg/ResetRuntimeDxe/Reset.c b/EmulatorPkg/ResetRuntimeDxe/Reset.c index 14594c7763..369bc86296 100644 --- a/EmulatorPkg/ResetRuntimeDxe/Reset.c +++ b/EmulatorPkg/ResetRuntimeDxe/Reset.c @@ -3,13 +3,13 @@ Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010 - 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.
**/
@@ -54,7 +54,7 @@ EmuResetSystem ( for (Index = 0; Index < HandleCount; Index++) {
Status = gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);
}
-
+
gBS->FreePool (HandleBuffer);
}
diff --git a/EmulatorPkg/ResetRuntimeDxe/Reset.inf b/EmulatorPkg/ResetRuntimeDxe/Reset.inf index f95822b4bd..f23dc46bce 100644 --- a/EmulatorPkg/ResetRuntimeDxe/Reset.inf +++ b/EmulatorPkg/ResetRuntimeDxe/Reset.inf @@ -3,7 +3,7 @@ #
# This Reset module simulates system reset by process exit on 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
diff --git a/EmulatorPkg/Sec/Ia32/SwitchRam.S b/EmulatorPkg/Sec/Ia32/SwitchRam.S index 81e478be82..39304daef1 100644 --- a/EmulatorPkg/Sec/Ia32/SwitchRam.S +++ b/EmulatorPkg/Sec/Ia32/SwitchRam.S @@ -20,7 +20,7 @@ #------------------------------------------------------------------------------
.text
-
+
//------------------------------------------------------------------------------
// VOID
@@ -29,26 +29,26 @@ // UINT32 TemporaryMemoryBase,
// UINT32 PermenentMemoryBase
// )//
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(SecSwitchStack)
ASM_PFX(SecSwitchStack):
#
# Save three register: eax, ebx, ecx
-#
+#
push %eax
push %ebx
push %ecx
push %edx
-
+
#
# !!CAUTION!! this function address's is pushed into stack after
# migration of whole temporary memory, so need save it to permenent
# memory at first!
-#
-
+#
+
movl 20(%esp), %ebx # Save the first parameter
movl 24(%esp), %ecx # Save the second parameter
-
+
#
# Save this function's return address into permenent memory at first.
# Then, Fixup the esp point to permenent memory
@@ -77,16 +77,16 @@ ASM_PFX(SecSwitchStack): subl %ebx, %eax
addl %ecx, %eax
movl %eax, %ebp # From now, ebp is pointed to permenent memory
-
+
#
# Fixup callee's ebp point for PeiDispatch
-#
+#
movl (%ebp), %eax
subl %ebx, %eax
addl %ecx, %eax
movl %eax, (%ebp) # From now, Temporary's PPI caller's stack is in permenent memory
-#endif
-
+#endif
+
pop %edx
pop %ecx
pop %ebx
diff --git a/EmulatorPkg/Sec/Sec.c b/EmulatorPkg/Sec/Sec.c index 4468d6f07b..8a015682dd 100644 --- a/EmulatorPkg/Sec/Sec.c +++ b/EmulatorPkg/Sec/Sec.c @@ -1,7 +1,7 @@ /*++ @file Stub SEC that is called from the OS appliation that is the root of the emulator. - - The OS application will call the SEC with the PEI Entry Point API. + + The OS application will call the SEC with the PEI Entry Point API. Copyright (c) 2011, Apple Inc. All rights reserved.<BR> This program and the accompanying materials @@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = { +EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = { SecTemporaryRamSupport }; @@ -35,8 +35,8 @@ EFI_PEI_PPI_DESCRIPTOR gPrivateDispatchTable[] = { /** The entry point of PE/COFF Image for the PEI Core, that has been hijacked by this - SEC that sits on top of an OS application. So the entry and exit of this module - has the same API. + SEC that sits on top of an OS application. So the entry and exit of this module + has the same API. This function is the entry point for the PEI Foundation, which allows the SEC phase to pass information about the stack, temporary RAM and the Boot Firmware Volume. @@ -54,7 +54,7 @@ EFI_PEI_PPI_DESCRIPTOR gPrivateDispatchTable[] = { @param SecCoreData Points to a data structure containing information about the PEI core's operating environment, such as the size and location of - temporary RAM, the stack location and the BFV location. + temporary RAM, the stack location and the BFV location. @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single @@ -65,11 +65,11 @@ EFI_PEI_PPI_DESCRIPTOR gPrivateDispatchTable[] = { and/or code in these early PPIs. **/ -VOID +VOID EFIAPI _ModuleEntryPoint ( IN EFI_SEC_PEI_HAND_OFF *SecCoreData, - IN EFI_PEI_PPI_DESCRIPTOR *PpiList + IN EFI_PEI_PPI_DESCRIPTOR *PpiList ) { EFI_STATUS Status; @@ -81,29 +81,29 @@ _ModuleEntryPoint ( EFI_PEI_PPI_DESCRIPTOR *SecPpiList; UINTN SecReseveredMemorySize; UINTN Index; - + EMU_MAGIC_PAGE()->PpiList = PpiList; ProcessLibraryConstructorList (); - + DEBUG ((EFI_D_ERROR, "SEC Has Started\n")); - + // // Add Our PPIs to the list // SecReseveredMemorySize = sizeof (gPrivateDispatchTable); for (Ppi = PpiList, Index = 1; ; Ppi++, Index++) { SecReseveredMemorySize += sizeof (EFI_PEI_PPI_DESCRIPTOR); - + if ((Ppi->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) == EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) { // Since we are appending, need to clear out privious list terminator. - Ppi->Flags &= ~EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; + Ppi->Flags &= ~EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; break; } } - + // Keep everything on a good alignment SecReseveredMemorySize = ALIGN_VALUE (SecReseveredMemorySize, CPU_STACK_ALIGNMENT); - + #if 0 // Tell the PEI Core to not use our buffer in temp RAM SecPpiList = (EFI_PEI_PPI_DESCRIPTOR *)SecCoreData->PeiTemporaryRamBase; @@ -116,12 +116,12 @@ _ModuleEntryPoint ( // or I don't understand temp RAM correctly? // EFI_PEI_PPI_DESCRIPTOR PpiArray[10]; - + SecPpiList = &PpiArray[0]; ASSERT (sizeof (PpiArray) >= SecReseveredMemorySize); } #endif - // Copy existing list, and append our entries. + // Copy existing list, and append our entries. CopyMem (SecPpiList, PpiList, sizeof (EFI_PEI_PPI_DESCRIPTOR) * Index); CopyMem (&SecPpiList[Index], gPrivateDispatchTable, sizeof (gPrivateDispatchTable)); @@ -130,16 +130,16 @@ _ModuleEntryPoint ( FileHandle = NULL; Status = PeiServicesFfsFindNextFile (EFI_FV_FILETYPE_PEI_CORE, VolumeHandle, &FileHandle); ASSERT_EFI_ERROR (Status); - + Status = PeiServicesFfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage); ASSERT_EFI_ERROR (Status); Status = PeCoffLoaderGetEntryPoint (PeCoffImage, (VOID **)&EntryPoint); ASSERT_EFI_ERROR (Status); - + // Transfer control to PEI Core EntryPoint (SecCoreData, SecPpiList); - + // PEI Core never returns ASSERT (FALSE); return; diff --git a/EmulatorPkg/Sec/Sec.h b/EmulatorPkg/Sec/Sec.h index 00760121b2..4782578efa 100644 --- a/EmulatorPkg/Sec/Sec.h +++ b/EmulatorPkg/Sec/Sec.h @@ -1,7 +1,7 @@ /*++ @file Stub SEC that is called from the OS appliation that is the root of the emulator. - - The OS application will call the SEC with the PEI Entry Point API. + + The OS application will call the SEC with the PEI Entry Point API. Copyright (c) 2011, Apple Inc. All rights reserved.<BR> This program and the accompanying materials diff --git a/EmulatorPkg/Sec/Sec.inf b/EmulatorPkg/Sec/Sec.inf index b17caea0b5..484e7a0a93 100644 --- a/EmulatorPkg/Sec/Sec.inf +++ b/EmulatorPkg/Sec/Sec.inf @@ -45,6 +45,6 @@ [Ppis]
gEfiTemporaryRamSupportPpiGuid
-
+
[Pcd]
gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage
diff --git a/EmulatorPkg/Sec/X64/SwitchRam.S b/EmulatorPkg/Sec/X64/SwitchRam.S index a7219bf21f..9ed1f911e7 100644 --- a/EmulatorPkg/Sec/X64/SwitchRam.S +++ b/EmulatorPkg/Sec/X64/SwitchRam.S @@ -19,7 +19,7 @@ // SecTemporaryRamSupport (
// IN CONST EFI_PEI_SERVICES **PeiServices, // %rcx
// IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase, // %rdx
-// IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase, // %r8
+// IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase, // %r8
// IN UINTN CopySize // %r9
// )
//
@@ -28,7 +28,7 @@ ASM_PFX(SecTemporaryRamSupport): // Adjust callers %rbp to account for stack move
subq %rdx, %rbp // Calc offset of %rbp in Temp Memory
addq %r8, %rbp // add in permanent base to offset
-
+
pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
@@ -51,13 +51,13 @@ ASM_PFX(SecTemporaryRamSupport): popq %r9 // CopySize (old stack)
popq %r8 // PermanentMemoryBase (old stack)
popq %rdx // TemporaryMemoryBase (old stack)
-
+
movq %rsp, %rcx // Move to new stack
subq %rdx, %rcx // Calc offset of stack in Temp Memory
addq %r8, %rcx // Calc PermanentMemoryBase address
- movq %rcx, %rsp // Update stack
+ movq %rcx, %rsp // Update stack
// Stack now points to permanent memory
-
+
// ZeroMem (TemporaryMemoryBase /* rcx */, CopySize /* rdx */);
movq %rdx, %rcx
movq %r9, %rdx
diff --git a/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.c b/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.c index b2b7801109..33188d5e95 100644 --- a/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.c +++ b/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.c @@ -3,13 +3,13 @@ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010 - 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.
**/
@@ -41,7 +41,7 @@ Routine Description: Arguments:
PeiServices - General purpose services available to every PEIM.
-
+
Returns:
None
diff --git a/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.inf b/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.inf index a3dece4c35..d0fcc952ed 100644 --- a/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.inf +++ b/EmulatorPkg/ThunkPpiToProtocolPei/ThunkPpiToProtocolPei.inf @@ -3,7 +3,7 @@ #
# Tiano PEIM to abstract construction of firmware volume 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
diff --git a/EmulatorPkg/TimerDxe/Timer.h b/EmulatorPkg/TimerDxe/Timer.h index 27fc676b71..ca5b43b025 100644 --- a/EmulatorPkg/TimerDxe/Timer.h +++ b/EmulatorPkg/TimerDxe/Timer.h @@ -5,13 +5,13 @@ Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010 - 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.
**/
diff --git a/EmulatorPkg/TimerDxe/Timer.inf b/EmulatorPkg/TimerDxe/Timer.inf index b18be56e28..713f8eac0b 100644 --- a/EmulatorPkg/TimerDxe/Timer.inf +++ b/EmulatorPkg/TimerDxe/Timer.inf @@ -2,7 +2,7 @@ # Emu Emulation Timer Architectural Protocol Driver as defined in DXE CIS
#
# 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
diff --git a/EmulatorPkg/Unix/GdbRun b/EmulatorPkg/Unix/GdbRun index 428e655631..14a398d62a 100644 --- a/EmulatorPkg/Unix/GdbRun +++ b/EmulatorPkg/Unix/GdbRun @@ -68,9 +68,9 @@ define RemoveFirmwareSymbolFile end if gInXcode == 1 - # in Xcode the program is already runing. Issuing a run command + # in Xcode the program is already runing. Issuing a run command # will cause a fatal debugger error. The break point sciprt that - # is used to source this script sets gInCode to 1. + # is used to source this script sets gInCode to 1. else # # Start the program running diff --git a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c index 519d394e37..b94da9ee82 100644 --- a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c +++ b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c @@ -1,19 +1,19 @@ /**@file
- Berkeley Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the
+ Berkeley Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the
emulator to get on real networks.
- Tested on Mac OS X.
+ Tested on Mac OS X.
Copyright (c) 2004 - 2009, 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
-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.
**/
@@ -87,7 +87,7 @@ EmuSnpCreateMapping ( Private = EMU_SNP_PRIVATE_DATA_FROM_THIS (This);
Private->Mode = Mode;
-
+
//
// Set the broadcast address.
//
@@ -164,11 +164,11 @@ OpenBpfFileDescriptor ( if (errno == EACCES) {
printf (
"SNP: Permissions on '%s' are incorrect. Fix with 'sudo chmod 666 %s'.\n",
- BfpDeviceName,
- BfpDeviceName
+ BfpDeviceName,
+ BfpDeviceName
);
}
-
+
if (errno != EBUSY) {
break;
}
@@ -234,7 +234,7 @@ EmuSnpStart ( if (ioctl (Private->BpfFd, BIOCGBLEN, &ReadBufferSize) < 0) {
goto DeviceErrorExit;
}
-
+
//
// Default value from BIOCGBLEN is usually too small, so use a much larger size, if necessary.
//
@@ -244,7 +244,7 @@ EmuSnpStart ( goto DeviceErrorExit;
}
}
-
+
//
// Associate our interface with this BPF file descriptor.
//
@@ -302,7 +302,7 @@ EmuSnpStart ( if ( FilterProgram == NULL ) {
goto ErrorExit;
}
-
+
CopyMem (FilterProgram, &mFilterInstructionTemplate, sizeof (mFilterInstructionTemplate));
//
@@ -330,7 +330,7 @@ EmuSnpStart ( }
- Private->Mode->State = EfiSimpleNetworkStarted;
+ Private->Mode->State = EfiSimpleNetworkStarted;
}
return Status;
@@ -397,8 +397,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 The protocol instance pointer.
@@ -457,8 +457,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 The protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more
@@ -500,7 +500,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.
@@ -701,7 +701,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 The protocol instance pointer.
@@ -737,7 +737,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 The protocol instance pointer.
@@ -810,7 +810,7 @@ EmuSnpGetStatus ( @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.
@@ -857,7 +857,7 @@ EmuSnpTransmit ( if (write (Private->BpfFd, Buffer, BufferSize) < 0) {
return EFI_DEVICE_ERROR;
}
-
+
return EFI_SUCCESS;
}
@@ -917,13 +917,13 @@ EmuSnpReceive ( }
ZeroMem (&BpfStats, sizeof( BpfStats));
-
+
if (ioctl (Private->BpfFd, BIOCGSTATS, &BpfStats) == 0) {
Private->ReceivedPackets += BpfStats.bs_recv;
if (BpfStats.bs_drop > Private->DroppedPackets) {
printf (
"SNP: STATS: RCVD = %d DROPPED = %d. Probably need to increase BPF PcdNetworkPacketFilterSize?\n",
- BpfStats.bs_recv,
+ BpfStats.bs_recv,
BpfStats.bs_drop - Private->DroppedPackets
);
Private->DroppedPackets = BpfStats.bs_drop;
@@ -1053,26 +1053,26 @@ EmuSnpThunkOpen ( )
{
EMU_SNP_PRIVATE *Private;
-
+
if (This->Private != NULL) {
return EFI_ALREADY_STARTED;
}
-
+
if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = malloc (sizeof (EMU_SNP_PRIVATE));
if (Private == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
Private->Signature = EMU_SNP_PRIVATE_SIGNATURE;
Private->Thunk = This;
CopyMem (&Private->EmuSnp, &gEmuSnpProtocol, sizeof (gEmuSnpProtocol));
GetInterfaceMacAddr (Private);
-
+
This->Interface = &Private->EmuSnp;
This->Private = Private;
return EFI_SUCCESS;
@@ -1089,10 +1089,10 @@ EmuSnpThunkClose ( if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = This->Private;
free (Private);
-
+
return EFI_SUCCESS;
}
diff --git a/EmulatorPkg/Unix/Host/BlockIo.c b/EmulatorPkg/Unix/Host/BlockIo.c index bb2da24d85..657ce34e45 100644 --- a/EmulatorPkg/Unix/Host/BlockIo.c +++ b/EmulatorPkg/Unix/Host/BlockIo.c @@ -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.
**/
@@ -69,7 +69,7 @@ SetFilePointer64 ( res = lseek (Private->fd, offset, (int)MoveMethod);
if (res == -1) {
Status = EFI_INVALID_PARAMETER;
- }
+ }
if (NewFilePointer != NULL) {
*NewFilePointer = res;
@@ -123,13 +123,13 @@ EmuBlockIoOpenDevice ( Status = EFI_UNSUPPORTED;
goto Done;
}
-
+
if (FileSize == 0) {
// lseek fails on a real device. ioctl calls are OS specific
#if __APPLE__
{
UINT32 BlockSize;
-
+
if (ioctl (Private->fd, DKIOCGETBLOCKSIZE, &BlockSize) == 0) {
Private->Media->BlockSize = BlockSize;
}
@@ -141,13 +141,13 @@ EmuBlockIoOpenDevice ( Private->Media->LastBlock = Private->NumberOfBlocks - 1;
}
}
- ioctl (Private->fd, DKIOCGETMAXBLOCKCOUNTWRITE, &Private->Media->OptimalTransferLengthGranularity);
+ ioctl (Private->fd, DKIOCGETMAXBLOCKCOUNTWRITE, &Private->Media->OptimalTransferLengthGranularity);
}
-#else
+#else
{
size_t BlockSize;
UINT64 DiskSize;
-
+
if (ioctl (Private->fd, BLKSSZGET, &BlockSize) == 0) {
Private->Media->BlockSize = BlockSize;
}
@@ -157,12 +157,12 @@ EmuBlockIoOpenDevice ( }
}
#endif
-
+
} else {
Private->Media->BlockSize = Private->BlockSize;
Private->NumberOfBlocks = DivU64x32 (FileSize, Private->Media->BlockSize);
Private->Media->LastBlock = Private->NumberOfBlocks - 1;
-
+
if (fstatfs (Private->fd, &buf) == 0) {
#if __APPLE__
Private->Media->OptimalTransferLengthGranularity = buf.f_iosize/buf.f_bsize;
@@ -170,7 +170,7 @@ EmuBlockIoOpenDevice ( Private->Media->OptimalTransferLengthGranularity = buf.f_bsize/buf.f_bsize;
#endif
}
- }
+ }
DEBUG ((EFI_D_INIT, "%HEmuOpenBlock: opened %a%N\n", Private->Filename));
Status = EFI_SUCCESS;
@@ -198,7 +198,7 @@ EmuBlockIoCreateMapping ( Private = EMU_BLOCK_IO_PRIVATE_DATA_FROM_THIS (This);
Private->Media = Media;
-
+
Media->MediaId = 0;
Media->RemovableMedia = Private->RemovableMedia;
Media->MediaPresent = TRUE;
@@ -207,18 +207,18 @@ EmuBlockIoCreateMapping ( Media->WriteCaching = FALSE;
Media->IoAlign = 1;
Media->LastBlock = 0; // Filled in by OpenDevice
-
+
// EFI_BLOCK_IO_PROTOCOL_REVISION2
Media->LowestAlignedLba = 0;
- Media->LogicalBlocksPerPhysicalBlock = 0;
-
+ Media->LogicalBlocksPerPhysicalBlock = 0;
+
// EFI_BLOCK_IO_PROTOCOL_REVISION3
Media->OptimalTransferLengthGranularity = 0;
-
+
Status = EmuBlockIoOpenDevice (Private);
-
+
return Status;
}
@@ -299,7 +299,7 @@ EmuBlockIoReadWriteCommon ( if ((UINTN) Buffer % Private->Media->IoAlign != 0) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Verify buffer size
//
@@ -336,7 +336,7 @@ EmuBlockIoReadWriteCommon ( /**
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
@@ -344,13 +344,13 @@ EmuBlockIoReadWriteCommon ( 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
@@ -362,7 +362,7 @@ EmuBlockIoReadWriteCommon ( @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.
@@ -438,7 +438,7 @@ Done: @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.
@@ -495,10 +495,10 @@ Done: /**
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
@@ -531,8 +531,8 @@ EmuBlockIoFlushBlocks ( fcntl (Private->fd, F_FULLFSYNC);
#endif
}
-
-
+
+
if (Token != NULL) {
if (Token->Event != NULL) {
// Caller is responcible for signaling EFI Event
@@ -540,7 +540,7 @@ EmuBlockIoFlushBlocks ( return EFI_SUCCESS;
}
}
-
+
return EFI_SUCCESS;
}
@@ -585,18 +585,18 @@ StdDupUnicodeToAscii ( UINTN Size;
char *Ascii;
char *Ptr;
-
+
Size = StrLen (Str) + 1;
Ascii = malloc (Size);
if (Ascii == NULL) {
return NULL;
}
-
+
for (Ptr = Ascii; *Str != '\0'; Ptr++, Str++) {
*Ptr = *Str;
}
*Ptr = 0;
-
+
return Ascii;
}
@@ -616,32 +616,32 @@ EmuBlockIoThunkOpen ( {
EMU_BLOCK_IO_PRIVATE *Private;
char *Str;
-
+
if (This->Private != NULL) {
return EFI_ALREADY_STARTED;
}
-
+
if (!CompareGuid (This->Protocol, &gEmuBlockIoProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = malloc (sizeof (EMU_BLOCK_IO_PRIVATE));
if (Private == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
Private->Signature = EMU_BLOCK_IO_PRIVATE_SIGNATURE;
Private->Thunk = This;
CopyMem (&Private->EmuBlockIo, &gEmuBlockIoProtocol, sizeof (gEmuBlockIoProtocol));
Private->fd = -1;
Private->BlockSize = 512;
-
+
Private->Filename = StdDupUnicodeToAscii (This->ConfigString);
if (Private->Filename == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
Str = strstr (Private->Filename, ":");
if (Str == NULL) {
Private->RemovableMedia = FALSE;
@@ -660,7 +660,7 @@ EmuBlockIoThunkOpen ( }
}
}
-
+
This->Interface = &Private->EmuBlockIo;
This->Private = Private;
return EFI_SUCCESS;
@@ -677,17 +677,17 @@ EmuBlockIoThunkClose ( if (!CompareGuid (This->Protocol, &gEmuBlockIoProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = This->Private;
-
+
if (This->Private != NULL) {
if (Private->Filename != NULL) {
free (Private->Filename);
- }
+ }
free (This->Private);
This->Private = NULL;
}
-
+
return EFI_SUCCESS;
}
diff --git a/EmulatorPkg/Unix/Host/EmuThunk.c b/EmulatorPkg/Unix/Host/EmuThunk.c index fe68603d3f..d9816298d4 100644 --- a/EmulatorPkg/Unix/Host/EmuThunk.c +++ b/EmulatorPkg/Unix/Host/EmuThunk.c @@ -1,5 +1,5 @@ /*++ @file - Since the SEC is the only program in our emulation we + Since the SEC is the only program in our emulation we must use a UEFI/PI mechanism to export APIs to other modules. This is the role of the EFI_EMU_THUNK_PROTOCOL. @@ -11,13 +11,13 @@ Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR> Portions 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 -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. **/ @@ -48,9 +48,9 @@ SecWriteStdErr ( ) { ssize_t Return; - + Return = write (STDERR_FILENO, (const void *)Buffer, (size_t)NumberOfBytes); - + return (Return == -1) ? 0 : Return; } @@ -61,16 +61,16 @@ SecConfigStdIn ( ) { struct termios tty; - + // // Need to turn off line buffering, ECHO, and make it unbuffered. // tcgetattr (STDIN_FILENO, &tty); tty.c_lflag &= ~(ICANON | ECHO); tcsetattr (STDIN_FILENO, TCSANOW, &tty); - + // setvbuf (STDIN_FILENO, NULL, _IONBF, 0); - + // now ioctl FIONREAD will do what we need return EFI_SUCCESS; } @@ -82,9 +82,9 @@ SecWriteStdOut ( ) { ssize_t Return; - + Return = write (STDOUT_FILENO, (const void *)Buffer, (size_t)NumberOfBytes); - + return (Return == -1) ? 0 : Return; } @@ -95,9 +95,9 @@ SecReadStdIn ( ) { ssize_t Return; - + Return = read (STDIN_FILENO, Buffer, (size_t)NumberOfBytes); - + return (Return == -1) ? 0 : Return; } @@ -108,12 +108,12 @@ SecPollStdIn ( { int Result; int Bytes; - + Result = ioctl (STDIN_FILENO, FIONREAD, &Bytes); if (Result == -1) { return FALSE; } - + return (BOOLEAN)(Bytes > 0); } @@ -144,7 +144,7 @@ SecFree ( // So don't free those ranges and let the caller know. return FALSE; } - + free (Ptr); return TRUE; } @@ -158,10 +158,10 @@ settimer_handler (int sig) gettimeofday (&timeval, NULL); delta = ((UINT64)timeval.tv_sec * 1000) + (timeval.tv_usec / 1000) - - ((UINT64)settimer_timeval.tv_sec * 1000) + - ((UINT64)settimer_timeval.tv_sec * 1000) - (settimer_timeval.tv_usec / 1000); settimer_timeval = timeval; - + if (settimer_callback) { ReverseGasketUint64 (settimer_callback, delta); } @@ -196,7 +196,7 @@ SecSetTimer ( timerval.it_value.tv_usec = remainder * 1000; timerval.it_value.tv_sec = DivU64x32(PeriodMs, 1000); timerval.it_interval = timerval.it_value; - + if (setitimer (ITIMER_REAL, &timerval, NULL) != 0) { printf ("SetTimer: setitimer error %s\n", strerror (errno)); } @@ -212,7 +212,7 @@ SecEnableInterrupt ( sigset_t sigset; gEmulatorInterruptEnabled = TRUE; - // Since SetTimer() uses SIGALRM we emulate turning on and off interrupts + // Since SetTimer() uses SIGALRM we emulate turning on and off interrupts // by enabling/disabling SIGALRM. sigemptyset (&sigset); sigaddset (&sigset, SIGALRM); @@ -227,7 +227,7 @@ SecDisableInterrupt ( { sigset_t sigset; - // Since SetTimer() uses SIGALRM we emulate turning on and off interrupts + // Since SetTimer() uses SIGALRM we emulate turning on and off interrupts // by enabling/disabling SIGALRM. sigemptyset (&sigset); sigaddset (&sigset, SIGALRM); @@ -262,11 +262,11 @@ QueryPerformanceCounter ( Nanoseconds elapsedNano; Start = mach_absolute_time (); - + // Convert to nanoseconds. - // Have to do some pointer fun because AbsoluteToNanoseconds - // works in terms of UnsignedWide, which is a structure rather + // Have to do some pointer fun because AbsoluteToNanoseconds + // works in terms of UnsignedWide, which is a structure rather // than a proper 64-bit integer. elapsedNano = AbsoluteToNanoseconds (*(AbsoluteTime *) &Start); @@ -276,7 +276,7 @@ QueryPerformanceCounter ( return 0; #endif } - + VOID @@ -287,12 +287,12 @@ SecSleep ( struct timespec rq, rm; struct timeval start, end; unsigned long MicroSec; - + rq.tv_sec = DivU64x32 (Nanoseconds, 1000000000); rq.tv_nsec = ModU64x32 (Nanoseconds, 1000000000); // - // nanosleep gets interrupted by our timer tic. + // nanosleep gets interrupted by our timer tic. // we need to track wall clock time or we will stall for way too long // gettimeofday (&start, NULL); @@ -314,7 +314,7 @@ SecSleep ( break; } rq = rm; - } + } } @@ -328,7 +328,7 @@ SecCpuSleep ( // nanosleep gets interrupted by the timer tic rq.tv_sec = 1; rq.tv_nsec = 0; - + nanosleep (&rq, &rm); } @@ -364,7 +364,7 @@ SecGetTime ( Time->TimeZone = timezone; Time->Daylight = (daylight ? EFI_TIME_ADJUST_DAYLIGHT : 0) | (tm->tm_isdst > 0 ? EFI_TIME_IN_DAYLIGHT : 0); - + if (Capabilities != NULL) { Capabilities->Resolution = 1; Capabilities->Accuracy = 50000000; @@ -414,9 +414,9 @@ EMU_THUNK_PROTOCOL gEmuThunkProtocol = { GasketSecSleep, GasketSecCpuSleep, GasketSecExit, - GasketSecGetTime, + GasketSecGetTime, GasketSecSetTime, - GasketSecSetTimer, + GasketSecSetTimer, GasketSecGetNextProtocol }; diff --git a/EmulatorPkg/Unix/Host/Gasket.h b/EmulatorPkg/Unix/Host/Gasket.h index 2c59a562e6..f1cf4c7ef4 100644 --- a/EmulatorPkg/Unix/Host/Gasket.h +++ b/EmulatorPkg/Unix/Host/Gasket.h @@ -39,7 +39,7 @@ GasketSecWriteStdOut ( IN UINT8 *Buffer,
IN UINTN NumberOfBytes
);
-
+
UINTN
EFIAPI
GasketSecReadStdIn (
@@ -64,7 +64,7 @@ EFIAPI GasketSecValloc (
IN UINTN Size
);
-
+
BOOLEAN
EFIAPI
GasketSecFree (
@@ -109,8 +109,8 @@ EFIAPI GasketSecDisableInterrupt (
VOID
);
-
-UINT64
+
+UINT64
EFIAPI
GasketQueryPerformanceFrequency (
VOID
@@ -128,7 +128,7 @@ EFIAPI GasketSecSleep (
IN UINT64 Nanoseconds
);
-
+
VOID
EFIAPI
GasketSecCpuSleep (
@@ -162,9 +162,9 @@ GasketSecGetNextProtocol ( );
-// PPIs produced by SEC
+// PPIs produced by SEC
+
-
EFI_STATUS
EFIAPI
GasketSecUnixPeiAutoScan (
@@ -172,21 +172,21 @@ GasketSecUnixPeiAutoScan ( OUT EFI_PHYSICAL_ADDRESS *MemoryBase,
OUT UINT64 *MemorySize
);
-
+
VOID *
EFIAPI
GasketSecEmuThunkAddress (
VOID
);
-
+
EFI_STATUS
EFIAPI
GasketSecUnixUnixFwhAddress (
IN OUT UINT64 *FwhSize,
IN OUT EFI_PHYSICAL_ADDRESS *FwhBase
);
-
+
//
@@ -244,17 +244,17 @@ GasketX11KeySetState ( EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindowsIo,
EFI_KEY_TOGGLE_STATE *KeyToggleState
);
-
+
EFI_STATUS
-EFIAPI
-GasketX11RegisterKeyNotify (
- IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindowsIo,
+EFIAPI
+GasketX11RegisterKeyNotify (
+ IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindowsIo,
IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK MakeCallBack,
IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK BreakCallBack,
IN VOID *Context
);
-
+
EFI_STATUS
EFIAPI
GasketX11Blt (
@@ -270,10 +270,10 @@ GasketX11CheckPointer ( EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindowsIo
);
-EFI_STATUS
-EFIAPI
+EFI_STATUS
+EFIAPI
GasketX11GetPointerState (
- EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindowsIo,
+ EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindowsIo,
EFI_SIMPLE_POINTER_STATE *state
);
@@ -282,7 +282,7 @@ EFIAPI GasketX11GraphicsWindowOpen (
IN EMU_IO_THUNK_PROTOCOL *This
);
-
+
EFI_STATUS
EFIAPI
GasketX11GraphicsWindowClose (
@@ -295,7 +295,7 @@ UINTN EFIAPI
GasketPthreadMutexLock (
IN VOID *Mutex
- );
+ );
@@ -303,30 +303,30 @@ UINTN EFIAPI
GasketPthreadMutexUnLock (
IN VOID *Mutex
- );
+ );
+
-
UINTN
EFIAPI
GasketPthreadMutexTryLock (
IN VOID *Mutex
- );
+ );
+
-
VOID *
EFIAPI
GasketPthreadMutexInit (
IN VOID
- );
+ );
+
-
UINTN
EFIAPI
GasketPthreadMutexDestroy (
IN VOID *Mutex
- );
+ );
+
-
UINTN
EFIAPI
GasketPthreadCreate (
@@ -335,19 +335,19 @@ GasketPthreadCreate ( IN THREAD_THUNK_THREAD_ENTRY Start,
IN VOID *Context
);
-
+
VOID
EFIAPI
GasketPthreadExit (
IN VOID *ValuePtr
- );
+ );
+
-
UINTN
EFIAPI
GasketPthreadSelf (
VOID
- );
+ );
EFI_STATUS
EFIAPI
@@ -370,7 +370,7 @@ GasketPosixOpenVolume ( IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,
OUT EFI_FILE_PROTOCOL **Root
);
-
+
EFI_STATUS
EFIAPI
GasketPosixFileOpen (
@@ -386,7 +386,7 @@ EFIAPI GasketPosixFileCLose (
IN EFI_FILE_PROTOCOL *This
);
-
+
EFI_STATUS
EFIAPI
GasketPosixFileDelete (
@@ -400,7 +400,7 @@ GasketPosixFileRead ( IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
-
+
EFI_STATUS
EFIAPI
GasketPosixFileWrite (
@@ -487,14 +487,14 @@ GasketEmuBlockIoWriteBlocks ( IN UINTN BufferSize,
IN VOID *Buffer
);
-
+
EFI_STATUS
EFIAPI
GasketEmuBlockIoFlushBlocks (
IN EMU_BLOCK_IO_PROTOCOL *This,
IN OUT EFI_BLOCK_IO2_TOKEN *Token
);
-
+
EFI_STATUS
EFIAPI
GasketEmuBlockIoCreateMapping (
@@ -532,7 +532,7 @@ GasketSnpCreateMapping ( IN EMU_SNP_PROTOCOL *This,
IN EFI_SIMPLE_NETWORK_MODE *Media
);
-
+
EFI_STATUS
EFIAPI
GasketSnpStart (
@@ -645,7 +645,7 @@ GasketSnpReceive ( OUT UINT16 *Protocol OPTIONAL
);
-
+
#endif
diff --git a/EmulatorPkg/Unix/Host/Ia32/Gasket.S b/EmulatorPkg/Unix/Host/Ia32/Gasket.S index aa031ecece..aa90ea8095 100644 --- a/EmulatorPkg/Unix/Host/Ia32/Gasket.S +++ b/EmulatorPkg/Unix/Host/Ia32/Gasket.S @@ -3,8 +3,8 @@ # Manage differenced between UNIX ABI and EFI/Windows ABI # # For IA-32 the only difference is Mac OS X requires a 16-byte aligned stack. -# For Linux this stack adjustment is a no-op, but we may as well make the -# the code common. +# For Linux this stack adjustment is a no-op, but we may as well make the +# the code common. # # Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> # This program and the accompanying materials @@ -16,17 +16,17 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # #------------------------------------------------------------------------------ - + .text - + // // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI) // -ASM_GLOBAL ASM_PFX(GasketSecWriteStdErr) +ASM_GLOBAL ASM_PFX(GasketSecWriteStdErr) ASM_PFX(GasketSecWriteStdErr): pushl %ebp movl %esp, %ebp @@ -43,7 +43,7 @@ ASM_PFX(GasketSecWriteStdErr): ret -ASM_GLOBAL ASM_PFX(GasketSecConfigStdIn) +ASM_GLOBAL ASM_PFX(GasketSecConfigStdIn) ASM_PFX(GasketSecConfigStdIn): pushl %ebp movl %esp, %ebp @@ -55,11 +55,11 @@ ASM_PFX(GasketSecConfigStdIn): movl %eax, (%esp) call ASM_PFX(SecConfigStdIn) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecWriteStdOut) +ASM_GLOBAL ASM_PFX(GasketSecWriteStdOut) ASM_PFX(GasketSecWriteStdOut): pushl %ebp movl %esp, %ebp @@ -71,11 +71,11 @@ ASM_PFX(GasketSecWriteStdOut): movl %eax, (%esp) call ASM_PFX(SecWriteStdOut) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecReadStdIn) +ASM_GLOBAL ASM_PFX(GasketSecReadStdIn) ASM_PFX(GasketSecReadStdIn): pushl %ebp movl %esp, %ebp @@ -87,11 +87,11 @@ ASM_PFX(GasketSecReadStdIn): movl %eax, (%esp) call ASM_PFX(SecReadStdIn) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecPollStdIn) +ASM_GLOBAL ASM_PFX(GasketSecPollStdIn) ASM_PFX(GasketSecPollStdIn): pushl %ebp movl %esp, %ebp @@ -103,11 +103,11 @@ ASM_PFX(GasketSecPollStdIn): movl %eax, (%esp) call ASM_PFX(SecPollStdIn) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecMalloc) +ASM_GLOBAL ASM_PFX(GasketSecMalloc) ASM_PFX(GasketSecMalloc): pushl %ebp movl %esp, %ebp @@ -117,11 +117,11 @@ ASM_PFX(GasketSecMalloc): movl %eax, (%esp) call ASM_PFX(SecMalloc) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecValloc) +ASM_GLOBAL ASM_PFX(GasketSecValloc) ASM_PFX(GasketSecValloc): pushl %ebp movl %esp, %ebp @@ -131,11 +131,11 @@ ASM_PFX(GasketSecValloc): movl %eax, (%esp) call ASM_PFX(SecValloc) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecFree) +ASM_GLOBAL ASM_PFX(GasketSecFree) ASM_PFX(GasketSecFree): pushl %ebp movl %esp, %ebp @@ -145,12 +145,12 @@ ASM_PFX(GasketSecFree): movl %eax, (%esp) call ASM_PFX(SecFree) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecSetTimer) +ASM_GLOBAL ASM_PFX(GasketSecSetTimer) ASM_PFX(GasketSecSetTimer): pushl %ebp movl %esp, %ebp @@ -164,12 +164,12 @@ ASM_PFX(GasketSecSetTimer): movl %eax, (%esp) call ASM_PFX(SecSetTimer) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt) +ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt) ASM_PFX(GasketSecEnableInterrupt): pushl %ebp movl %esp, %ebp @@ -177,12 +177,12 @@ ASM_PFX(GasketSecEnableInterrupt): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(SecEnableInterrupt) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt) +ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt) ASM_PFX(GasketSecDisableInterrupt): pushl %ebp movl %esp, %ebp @@ -190,11 +190,11 @@ ASM_PFX(GasketSecDisableInterrupt): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(SecDisableInterrupt) - + leave ret -ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency) +ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency) ASM_PFX(GasketQueryPerformanceFrequency): pushl %ebp movl %esp, %ebp @@ -202,12 +202,12 @@ ASM_PFX(GasketQueryPerformanceFrequency): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(QueryPerformanceFrequency) - + leave ret -ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter) +ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter) ASM_PFX(GasketQueryPerformanceCounter): pushl %ebp movl %esp, %ebp @@ -215,12 +215,12 @@ ASM_PFX(GasketQueryPerformanceCounter): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(QueryPerformanceCounter) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecSleep) +ASM_GLOBAL ASM_PFX(GasketSecSleep) ASM_PFX(GasketSecSleep): pushl %ebp movl %esp, %ebp @@ -232,12 +232,12 @@ ASM_PFX(GasketSecSleep): movl %eax, (%esp) call ASM_PFX(SecSleep) - + leave ret - - -ASM_GLOBAL ASM_PFX(GasketSecCpuSleep) + + +ASM_GLOBAL ASM_PFX(GasketSecCpuSleep) ASM_PFX(GasketSecCpuSleep): pushl %ebp movl %esp, %ebp @@ -245,12 +245,12 @@ ASM_PFX(GasketSecCpuSleep): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(SecCpuSleep) - + leave ret - - -ASM_GLOBAL ASM_PFX(GasketSecExit) + + +ASM_GLOBAL ASM_PFX(GasketSecExit) ASM_PFX(GasketSecExit): pushl %ebp movl %esp, %ebp @@ -263,8 +263,8 @@ ASM_PFX(GasketSecExit): LDEAD_LOOP: jmp LDEAD_LOOP // _exit should never return - -ASM_GLOBAL ASM_PFX(GasketSecGetTime) + +ASM_GLOBAL ASM_PFX(GasketSecGetTime) ASM_PFX(GasketSecGetTime): pushl %ebp movl %esp, %ebp @@ -280,7 +280,7 @@ ASM_PFX(GasketSecGetTime): leave ret -ASM_GLOBAL ASM_PFX(GasketSecSetTime) +ASM_GLOBAL ASM_PFX(GasketSecSetTime) ASM_PFX(GasketSecSetTime): pushl %ebp movl %esp, %ebp @@ -297,7 +297,7 @@ ASM_PFX(GasketSecSetTime): ret -ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol) +ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol) ASM_PFX(GasketSecGetNextProtocol): pushl %ebp movl %esp, %ebp @@ -313,13 +313,13 @@ ASM_PFX(GasketSecGetNextProtocol): movl %eax, (%esp) call ASM_PFX(SecGetNextProtocol) - + leave ret // PPIs produced by SEC -ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint) +ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint) ASM_PFX(GasketSecPeCoffGetEntryPoint): pushl %ebp movl %esp, %ebp @@ -331,11 +331,11 @@ ASM_PFX(GasketSecPeCoffGetEntryPoint): movl %eax, (%esp) call ASM_PFX(SecPeCoffGetEntryPoint) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction) + +ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction) ASM_PFX(GasketSecPeCoffRelocateImageExtraAction): pushl %ebp movl %esp, %ebp @@ -345,11 +345,11 @@ ASM_PFX(GasketSecPeCoffRelocateImageExtraAction): movl %eax, (%esp) call ASM_PFX(SecPeCoffRelocateImageExtraAction) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction) + +ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction) ASM_PFX(GasketSecPeCoffUnloadImageExtraAction): pushl %ebp movl %esp, %ebp @@ -359,12 +359,12 @@ ASM_PFX(GasketSecPeCoffUnloadImageExtraAction): movl %eax, (%esp) call ASM_PFX(SecPeCoffUnloadImageExtraAction) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress) + +ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress) ASM_PFX(GasketSecEmuThunkAddress): pushl %ebp movl %esp, %ebp @@ -372,7 +372,7 @@ ASM_PFX(GasketSecEmuThunkAddress): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(SecEmuThunkAddress) - + leave ret @@ -380,7 +380,7 @@ ASM_PFX(GasketSecEmuThunkAddress): // Gasket functions for EFI_EMU_UGA_IO_PROTOCOL // -ASM_GLOBAL ASM_PFX(GasketX11Size) +ASM_GLOBAL ASM_PFX(GasketX11Size) ASM_PFX(GasketX11Size): pushl %ebp movl %esp, %ebp @@ -396,12 +396,12 @@ ASM_PFX(GasketX11Size): movl %eax, (%esp) call ASM_PFX(X11Size) - + leave ret -ASM_GLOBAL ASM_PFX(GasketX11CheckKey) +ASM_GLOBAL ASM_PFX(GasketX11CheckKey) ASM_PFX(GasketX11CheckKey): pushl %ebp movl %esp, %ebp @@ -411,11 +411,11 @@ ASM_PFX(GasketX11CheckKey): movl %eax, (%esp) call ASM_PFX(X11CheckKey) - + leave ret -ASM_GLOBAL ASM_PFX(GasketX11GetKey) +ASM_GLOBAL ASM_PFX(GasketX11GetKey) ASM_PFX(GasketX11GetKey): pushl %ebp movl %esp, %ebp @@ -427,12 +427,12 @@ ASM_PFX(GasketX11GetKey): movl %eax, (%esp) call ASM_PFX(X11GetKey) - + leave ret -ASM_GLOBAL ASM_PFX(GasketX11KeySetState) +ASM_GLOBAL ASM_PFX(GasketX11KeySetState) ASM_PFX(GasketX11KeySetState): pushl %ebp movl %esp, %ebp @@ -444,12 +444,12 @@ ASM_PFX(GasketX11KeySetState): movl %eax, (%esp) call ASM_PFX(X11KeySetState) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify) + +ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify) ASM_PFX(GasketX11RegisterKeyNotify): pushl %ebp movl %esp, %ebp @@ -465,12 +465,12 @@ ASM_PFX(GasketX11RegisterKeyNotify): movl %eax, (%esp) call ASM_PFX(X11RegisterKeyNotify) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketX11Blt) + +ASM_GLOBAL ASM_PFX(GasketX11Blt) ASM_PFX(GasketX11Blt): pushl %ebp movl %esp, %ebp @@ -486,12 +486,12 @@ ASM_PFX(GasketX11Blt): movl %eax, (%esp) call ASM_PFX(X11Blt) - + leave ret -ASM_GLOBAL ASM_PFX(GasketX11CheckPointer) +ASM_GLOBAL ASM_PFX(GasketX11CheckPointer) ASM_PFX(GasketX11CheckPointer): pushl %ebp movl %esp, %ebp @@ -501,12 +501,12 @@ ASM_PFX(GasketX11CheckPointer): movl %eax, (%esp) call ASM_PFX(X11CheckPointer) - + leave ret -ASM_GLOBAL ASM_PFX(GasketX11GetPointerState) +ASM_GLOBAL ASM_PFX(GasketX11GetPointerState) ASM_PFX(GasketX11GetPointerState): pushl %ebp movl %esp, %ebp @@ -518,12 +518,12 @@ ASM_PFX(GasketX11GetPointerState): movl %eax, (%esp) call ASM_PFX(X11GetPointerState) - + leave ret -ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen) +ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen) ASM_PFX(GasketX11GraphicsWindowOpen): pushl %ebp movl %esp, %ebp @@ -533,12 +533,12 @@ ASM_PFX(GasketX11GraphicsWindowOpen): movl %eax, (%esp) call ASM_PFX(X11GraphicsWindowOpen) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose) + +ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose) ASM_PFX(GasketX11GraphicsWindowClose): pushl %ebp movl %esp, %ebp @@ -550,14 +550,14 @@ ASM_PFX(GasketX11GraphicsWindowClose): movl %eax, (%esp) call ASM_PFX(X11GraphicsWindowClose) - + leave ret // Pthreads -ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock) +ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock) ASM_PFX(GasketPthreadMutexLock): pushl %ebp movl %esp, %ebp @@ -567,12 +567,12 @@ ASM_PFX(GasketPthreadMutexLock): movl %eax, (%esp) call ASM_PFX(PthreadMutexLock) - + leave ret -ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock) +ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock) ASM_PFX(GasketPthreadMutexUnLock): pushl %ebp movl %esp, %ebp @@ -582,11 +582,11 @@ ASM_PFX(GasketPthreadMutexUnLock): movl %eax, (%esp) call ASM_PFX(PthreadMutexUnLock) - + leave ret -ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock) +ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock) ASM_PFX(GasketPthreadMutexTryLock): pushl %ebp movl %esp, %ebp @@ -596,11 +596,11 @@ ASM_PFX(GasketPthreadMutexTryLock): movl %eax, (%esp) call ASM_PFX(PthreadMutexTryLock) - + leave ret -ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit) +ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit) ASM_PFX(GasketPthreadMutexInit): pushl %ebp movl %esp, %ebp @@ -608,13 +608,13 @@ ASM_PFX(GasketPthreadMutexInit): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(PthreadMutexInit) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy) + +ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy) ASM_PFX(GasketPthreadMutexDestroy): pushl %ebp movl %esp, %ebp @@ -624,12 +624,12 @@ ASM_PFX(GasketPthreadMutexDestroy): movl %eax, (%esp) call ASM_PFX(PthreadMutexDestroy) - + leave ret -ASM_GLOBAL ASM_PFX(GasketPthreadCreate) +ASM_GLOBAL ASM_PFX(GasketPthreadCreate) ASM_PFX(GasketPthreadCreate): pushl %ebp movl %esp, %ebp @@ -645,12 +645,12 @@ ASM_PFX(GasketPthreadCreate): movl %eax, (%esp) call ASM_PFX(PthreadCreate) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketPthreadExit) + +ASM_GLOBAL ASM_PFX(GasketPthreadExit) ASM_PFX(GasketPthreadExit): pushl %ebp movl %esp, %ebp @@ -660,13 +660,13 @@ ASM_PFX(GasketPthreadExit): movl %eax, (%esp) call ASM_PFX(PthreadExit) - + leave ret - -ASM_GLOBAL ASM_PFX(GasketPthreadSelf) + +ASM_GLOBAL ASM_PFX(GasketPthreadSelf) ASM_PFX(GasketPthreadSelf): pushl %ebp movl %esp, %ebp @@ -674,12 +674,12 @@ ASM_PFX(GasketPthreadSelf): and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call call ASM_PFX(PthreadSelf) - + leave ret -ASM_GLOBAL ASM_PFX(GasketPthreadOpen) +ASM_GLOBAL ASM_PFX(GasketPthreadOpen) ASM_PFX(GasketPthreadOpen): pushl %ebp movl %esp, %ebp @@ -689,12 +689,12 @@ ASM_PFX(GasketPthreadOpen): movl %eax, (%esp) call ASM_PFX(PthreadOpen) - + leave ret -ASM_GLOBAL ASM_PFX(GasketPthreadClose) +ASM_GLOBAL ASM_PFX(GasketPthreadClose) ASM_PFX(GasketPthreadClose): pushl %ebp movl %esp, %ebp @@ -704,7 +704,7 @@ ASM_PFX(GasketPthreadClose): movl %eax, (%esp) call ASM_PFX(PthreadClose) - + leave ret @@ -761,9 +761,9 @@ ASM_PFX(ReverseGasketUint64Uint64): addl $24, %esp popl %ebp ret - -ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan) + +ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan) ASM_PFX(GasketSecUnixPeiAutoScan): pushl %ebp movl %esp, %ebp @@ -777,12 +777,12 @@ ASM_PFX(GasketSecUnixPeiAutoScan): movl %eax, (%esp) call ASM_PFX(SecUnixPeiAutoScan) - + leave ret -ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress) +ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress) ASM_PFX(GasketSecUnixFdAddress): pushl %ebp movl %esp, %ebp @@ -805,7 +805,7 @@ ASM_PFX(GasketSecUnixFdAddress): // EmuIoThunk SimpleFileSystem -ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume) +ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume) ASM_PFX(GasketPosixOpenVolume): pushl %ebp movl %esp, %ebp @@ -826,7 +826,7 @@ ASM_PFX(GasketPosixOpenVolume): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileOpen) +ASM_GLOBAL ASM_PFX(GasketPosixFileOpen) ASM_PFX(GasketPosixFileOpen): pushl %ebp movl %esp, %ebp @@ -846,14 +846,14 @@ ASM_PFX(GasketPosixFileOpen): movl %eax, 4(%esp) movl 8(%ebp), %eax movl %eax, (%esp) - + call ASM_PFX(PosixFileOpen) leave ret -ASM_GLOBAL ASM_PFX(GasketPosixFileCLose) +ASM_GLOBAL ASM_PFX(GasketPosixFileCLose) ASM_PFX(GasketPosixFileCLose): pushl %ebp movl %esp, %ebp @@ -867,8 +867,8 @@ ASM_PFX(GasketPosixFileCLose): leave ret - -ASM_GLOBAL ASM_PFX(GasketPosixFileDelete) + +ASM_GLOBAL ASM_PFX(GasketPosixFileDelete) ASM_PFX(GasketPosixFileDelete): pushl %ebp movl %esp, %ebp @@ -883,7 +883,7 @@ ASM_PFX(GasketPosixFileDelete): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileRead) +ASM_GLOBAL ASM_PFX(GasketPosixFileRead) ASM_PFX(GasketPosixFileRead): pushl %ebp movl %esp, %ebp @@ -901,8 +901,8 @@ ASM_PFX(GasketPosixFileRead): leave ret - -ASM_GLOBAL ASM_PFX(GasketPosixFileWrite) + +ASM_GLOBAL ASM_PFX(GasketPosixFileWrite) ASM_PFX(GasketPosixFileWrite): pushl %ebp movl %esp, %ebp @@ -921,7 +921,7 @@ ASM_PFX(GasketPosixFileWrite): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition) +ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition) ASM_PFX(GasketPosixFileSetPossition): pushl %ebp movl %esp, %ebp @@ -940,7 +940,7 @@ ASM_PFX(GasketPosixFileSetPossition): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition) +ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition) ASM_PFX(GasketPosixFileGetPossition): pushl %ebp movl %esp, %ebp @@ -957,7 +957,7 @@ ASM_PFX(GasketPosixFileGetPossition): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo) +ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo) ASM_PFX(GasketPosixFileGetInfo): pushl %ebp movl %esp, %ebp @@ -978,7 +978,7 @@ ASM_PFX(GasketPosixFileGetInfo): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo) +ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo) ASM_PFX(GasketPosixFileSetInfo): pushl %ebp movl %esp, %ebp @@ -999,7 +999,7 @@ ASM_PFX(GasketPosixFileSetInfo): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileFlush) +ASM_GLOBAL ASM_PFX(GasketPosixFileFlush) ASM_PFX(GasketPosixFileFlush): pushl %ebp movl %esp, %ebp @@ -1014,7 +1014,7 @@ ASM_PFX(GasketPosixFileFlush): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen) +ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen) ASM_PFX(GasketPosixFileSystmeThunkOpen): pushl %ebp movl %esp, %ebp @@ -1029,7 +1029,7 @@ ASM_PFX(GasketPosixFileSystmeThunkOpen): ret -ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose) +ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose) ASM_PFX(GasketPosixFileSystmeThunkClose): pushl %ebp movl %esp, %ebp @@ -1043,7 +1043,7 @@ ASM_PFX(GasketPosixFileSystmeThunkClose): leave ret -ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset) +ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset) ASM_PFX(GasketEmuBlockIoReset): pushl %ebp movl %esp, %ebp @@ -1060,7 +1060,7 @@ ASM_PFX(GasketEmuBlockIoReset): ret -ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks) +ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks) ASM_PFX(GasketEmuBlockIoReadBlocks): pushl %ebp movl %esp, %ebp @@ -1087,7 +1087,7 @@ ASM_PFX(GasketEmuBlockIoReadBlocks): ret -ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks) +ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks) ASM_PFX(GasketEmuBlockIoWriteBlocks): pushl %ebp movl %esp, %ebp @@ -1114,7 +1114,7 @@ ASM_PFX(GasketEmuBlockIoWriteBlocks): ret -ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks) +ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks) ASM_PFX(GasketEmuBlockIoFlushBlocks): pushl %ebp movl %esp, %ebp subl $24, %esp // sub extra 16 from the stack for alignment @@ -1131,7 +1131,7 @@ ASM_PFX(GasketEmuBlockIoFlushBlocks): pushl %ebp ret -ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping) +ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping) ASM_PFX(GasketEmuBlockIoCreateMapping): pushl %ebp movl %esp, %ebp @@ -1148,7 +1148,7 @@ ASM_PFX(GasketEmuBlockIoCreateMapping): ret -ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen) +ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen) ASM_PFX(GasketBlockIoThunkOpen): pushl %ebp movl %esp, %ebp @@ -1163,7 +1163,7 @@ ASM_PFX(GasketBlockIoThunkOpen): ret -ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose) +ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose) ASM_PFX(GasketBlockIoThunkClose): pushl %ebp movl %esp, %ebp @@ -1179,7 +1179,7 @@ ASM_PFX(GasketBlockIoThunkClose): -ASM_GLOBAL ASM_PFX(GasketSnpCreateMapping) +ASM_GLOBAL ASM_PFX(GasketSnpCreateMapping) ASM_PFX(GasketSnpCreateMapping): pushl %ebp movl %esp, %ebp @@ -1196,7 +1196,7 @@ ASM_PFX(GasketSnpCreateMapping): ret -ASM_GLOBAL ASM_PFX(GasketSnpStart) +ASM_GLOBAL ASM_PFX(GasketSnpStart) ASM_PFX(GasketSnpStart): pushl %ebp movl %esp, %ebp @@ -1211,7 +1211,7 @@ ASM_PFX(GasketSnpStart): ret -ASM_GLOBAL ASM_PFX(GasketSnpStop) +ASM_GLOBAL ASM_PFX(GasketSnpStop) ASM_PFX(GasketSnpStop): pushl %ebp movl %esp, %ebp @@ -1226,7 +1226,7 @@ ASM_PFX(GasketSnpStop): ret -ASM_GLOBAL ASM_PFX(GasketSnpInitialize) +ASM_GLOBAL ASM_PFX(GasketSnpInitialize) ASM_PFX(GasketSnpInitialize): pushl %ebp movl %esp, %ebp @@ -1245,7 +1245,7 @@ ASM_PFX(GasketSnpInitialize): ret -ASM_GLOBAL ASM_PFX(GasketSnpReset) +ASM_GLOBAL ASM_PFX(GasketSnpReset) ASM_PFX(GasketSnpReset): pushl %ebp movl %esp, %ebp @@ -1262,7 +1262,7 @@ ASM_PFX(GasketSnpReset): ret -ASM_GLOBAL ASM_PFX(GasketSnpShutdown) +ASM_GLOBAL ASM_PFX(GasketSnpShutdown) ASM_PFX(GasketSnpShutdown): pushl %ebp movl %esp, %ebp @@ -1277,7 +1277,7 @@ ASM_PFX(GasketSnpShutdown): ret -ASM_GLOBAL ASM_PFX(GasketSnpReceiveFilters) +ASM_GLOBAL ASM_PFX(GasketSnpReceiveFilters) ASM_PFX(GasketSnpReceiveFilters): pushl %ebp movl %esp, %ebp @@ -1302,7 +1302,7 @@ ASM_PFX(GasketSnpReceiveFilters): ret -ASM_GLOBAL ASM_PFX(GasketSnpStationAddress) +ASM_GLOBAL ASM_PFX(GasketSnpStationAddress) ASM_PFX(GasketSnpStationAddress): pushl %ebp movl %esp, %ebp @@ -1320,7 +1320,7 @@ ASM_PFX(GasketSnpStationAddress): -ASM_GLOBAL ASM_PFX(GasketSnpStatistics) +ASM_GLOBAL ASM_PFX(GasketSnpStatistics) ASM_PFX(GasketSnpStatistics): pushl %ebp movl %esp, %ebp @@ -1341,7 +1341,7 @@ ASM_PFX(GasketSnpStatistics): ret -ASM_GLOBAL ASM_PFX(GasketSnpMCastIpToMac) +ASM_GLOBAL ASM_PFX(GasketSnpMCastIpToMac) ASM_PFX(GasketSnpMCastIpToMac): pushl %ebp movl %esp, %ebp @@ -1362,7 +1362,7 @@ ASM_PFX(GasketSnpMCastIpToMac): ret -ASM_GLOBAL ASM_PFX(GasketSnpNvData) +ASM_GLOBAL ASM_PFX(GasketSnpNvData) ASM_PFX(GasketSnpNvData): pushl %ebp movl %esp, %ebp @@ -1385,7 +1385,7 @@ ASM_PFX(GasketSnpNvData): ret -ASM_GLOBAL ASM_PFX(GasketSnpGetStatus) +ASM_GLOBAL ASM_PFX(GasketSnpGetStatus) ASM_PFX(GasketSnpGetStatus): pushl %ebp movl %esp, %ebp @@ -1405,7 +1405,7 @@ ASM_PFX(GasketSnpGetStatus): -ASM_GLOBAL ASM_PFX(GasketSnpTransmit) +ASM_GLOBAL ASM_PFX(GasketSnpTransmit) ASM_PFX(GasketSnpTransmit): pushl %ebp movl %esp, %ebp @@ -1433,7 +1433,7 @@ ASM_PFX(GasketSnpTransmit): -ASM_GLOBAL ASM_PFX(GasketSnpReceive) +ASM_GLOBAL ASM_PFX(GasketSnpReceive) ASM_PFX(GasketSnpReceive): pushl %ebp movl %esp, %ebp @@ -1460,7 +1460,7 @@ ASM_PFX(GasketSnpReceive): ret -ASM_GLOBAL ASM_PFX(GasketSnpThunkOpen) +ASM_GLOBAL ASM_PFX(GasketSnpThunkOpen) ASM_PFX(GasketSnpThunkOpen): pushl %ebp movl %esp, %ebp @@ -1475,7 +1475,7 @@ ASM_PFX(GasketSnpThunkOpen): ret -ASM_GLOBAL ASM_PFX(GasketSnpThunkClose) +ASM_GLOBAL ASM_PFX(GasketSnpThunkClose) ASM_PFX(GasketSnpThunkClose): pushl %ebp movl %esp, %ebp diff --git a/EmulatorPkg/Unix/Host/Ia32/SwitchStack.c b/EmulatorPkg/Unix/Host/Ia32/SwitchStack.c index c75073ac2e..1d36500e78 100644 --- a/EmulatorPkg/Unix/Host/Ia32/SwitchStack.c +++ b/EmulatorPkg/Unix/Host/Ia32/SwitchStack.c @@ -46,7 +46,7 @@ PeiSwitchStacks ( ) { BASE_LIBRARY_JUMP_BUFFER JumpBuffer; - + ASSERT (EntryPoint != NULL); ASSERT (NewStack != NULL); @@ -62,12 +62,12 @@ PeiSwitchStacks ( ((VOID**)JumpBuffer.Esp)[2] = Context2; LongJump (&JumpBuffer, (UINTN)-1); - + // // PeiSwitchStacks () will never return // - ASSERT (FALSE); + ASSERT (FALSE); } diff --git a/EmulatorPkg/Unix/Host/LinuxPacketFilter.c b/EmulatorPkg/Unix/Host/LinuxPacketFilter.c index 20a08c9059..41124f72eb 100644 --- a/EmulatorPkg/Unix/Host/LinuxPacketFilter.c +++ b/EmulatorPkg/Unix/Host/LinuxPacketFilter.c @@ -1,20 +1,20 @@ /**@file
- Linux Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the
+ Linux Packet Filter implementation of the EMU_SNP_PROTOCOL that allows the
emulator to get on real networks.
Currently only the Berkeley Packet Filter is fully implemented and this file
- is just a template that needs to get filled in.
+ is just a template that needs to get filled in.
Copyright (c) 2004 - 2009, 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
-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.
**/
@@ -59,7 +59,7 @@ EmuSnpCreateMapping ( Private = EMU_SNP_PRIVATE_DATA_FROM_THIS (This);
Private->Mode = Mode;
-
+
return EFI_SUCCESS;
}
@@ -112,8 +112,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 The protocol instance pointer.
@@ -152,8 +152,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 The protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more
@@ -181,7 +181,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.
@@ -348,7 +348,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 The protocol instance pointer.
@@ -384,7 +384,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 The protocol instance pointer.
@@ -448,7 +448,7 @@ EmuSnpGetStatus ( @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.
@@ -547,25 +547,25 @@ EmuSnpThunkOpen ( )
{
EMU_SNP_PRIVATE *Private;
-
+
if (This->Private != NULL) {
return EFI_ALREADY_STARTED;
}
-
+
if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = malloc (sizeof (EMU_SNP_PRIVATE));
if (Private == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
Private->Signature = EMU_SNP_PRIVATE_SIGNATURE;
Private->Thunk = This;
CopyMem (&Private->EmuSnp, &gEmuSnpProtocol, sizeof (gEmuSnpProtocol));
-
+
This->Interface = &Private->EmuSnp;
This->Private = Private;
return EFI_SUCCESS;
@@ -582,10 +582,10 @@ EmuSnpThunkClose ( if (!CompareGuid (This->Protocol, &gEmuSnpProtocolGuid)) {
return EFI_UNSUPPORTED;
}
-
+
Private = This->Private;
free (Private);
-
+
return EFI_SUCCESS;
}
diff --git a/EmulatorPkg/Unix/Host/MemoryAllocationLib.c b/EmulatorPkg/Unix/Host/MemoryAllocationLib.c index 76b7271872..9db91b83d9 100644 --- a/EmulatorPkg/Unix/Host/MemoryAllocationLib.c +++ b/EmulatorPkg/Unix/Host/MemoryAllocationLib.c @@ -76,18 +76,18 @@ AllocateZeroPool ( 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. @@ -127,7 +127,7 @@ ReallocatePool ( 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(). diff --git a/EmulatorPkg/Unix/Host/PosixFileSystem.c b/EmulatorPkg/Unix/Host/PosixFileSystem.c index 3141a3cf1a..aab7161b7f 100644 --- a/EmulatorPkg/Unix/Host/PosixFileSystem.c +++ b/EmulatorPkg/Unix/Host/PosixFileSystem.c @@ -127,26 +127,26 @@ PosixOpenVolume ( if (PrivateFile == NULL) { goto Done; } - + PrivateFile->FileName = malloc (AsciiStrSize (Private->FilePath)); if (PrivateFile->FileName == NULL) { goto Done; } AsciiStrCpy (PrivateFile->FileName, Private->FilePath); - + PrivateFile->Signature = EMU_EFI_FILE_PRIVATE_SIGNATURE; PrivateFile->Thunk = Private->Thunk; PrivateFile->SimpleFileSystem = This; PrivateFile->IsRootDirectory = TRUE; PrivateFile->IsDirectoryPath = TRUE; PrivateFile->IsOpenedByRead = TRUE; - + CopyMem (&PrivateFile->EfiFile, &gPosixFileProtocol, sizeof (EFI_FILE_PROTOCOL)); PrivateFile->fd = -1; PrivateFile->Dir = NULL; PrivateFile->Dirent = NULL; - + *Root = &PrivateFile->EfiFile; PrivateFile->Dir = opendir (PrivateFile->FileName); @@ -165,10 +165,10 @@ Done: free (PrivateFile); } - + *Root = NULL; } - + return Status; } @@ -179,13 +179,13 @@ ErrnoToEfiStatus () switch (errno) { case EACCES: return EFI_ACCESS_DENIED; - + case EDQUOT: case ENOSPC: return EFI_VOLUME_FULL; - + default: - return EFI_DEVICE_ERROR; + return EFI_DEVICE_ERROR; } } @@ -225,7 +225,7 @@ PosixSystemTimeToEfiTime ( Time->Minute = tm->tm_min; Time->Second = tm->tm_sec; Time->Nanosecond = 0; - + Time->TimeZone = timezone; Time->Daylight = (daylight ? EFI_TIME_ADJUST_DAYLIGHT : 0) | (tm->tm_isdst > 0 ? EFI_TIME_IN_DAYLIGHT : 0); } @@ -382,7 +382,7 @@ PosixFileOpen ( EFI_FILE_INFO *Info; struct stat finfo; int res; - + PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateRoot = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (PrivateFile->SimpleFileSystem); @@ -393,7 +393,7 @@ PosixFileOpen ( // BUGBUG: assume an open of root // if current location, return current data // - if ((StrCmp (FileName, L"\\") == 0) || + if ((StrCmp (FileName, L"\\") == 0) || (StrCmp (FileName, L".") == 0 && PrivateFile->IsRootDirectory)) { OpenRoot: Status = PosixOpenVolume (PrivateFile->SimpleFileSystem, &Root); @@ -443,7 +443,7 @@ OpenRoot: Src++; } *Dst = 0; - + // // Get rid of . and .., except leading . or .. @@ -509,7 +509,7 @@ OpenRoot: while (RealFileName > NewPrivateFile->FileName && *RealFileName != '/') { RealFileName--; } - + TempChar = *(RealFileName - 1); *(RealFileName - 1) = 0; *(RealFileName - 1) = TempChar; @@ -601,7 +601,7 @@ OpenRoot: Status = EFI_DEVICE_ERROR; goto Done; } - + Info = malloc (InfoSize); if (Info == NULL) { goto Done; @@ -614,7 +614,7 @@ OpenRoot: Info->Attribute = Attributes; PosixFileSetInfo (&NewPrivateFile->EfiFile, &gEfiFileInfoGuid, InfoSize, Info); - + free (Info); } @@ -682,7 +682,7 @@ PosixFileCLose ( Close and delete the file handle. @param This Protocol instance pointer. - + @retval EFI_SUCCESS The device was opened. @retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted. @@ -694,7 +694,7 @@ PosixFileDelete ( { EFI_STATUS Status; EMU_EFI_FILE_PRIVATE *PrivateFile; - + PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); Status = EFI_WARN_DELETE_FAILURE; @@ -806,9 +806,9 @@ PosixFileRead ( FullFileName = malloc (AsciiStrLen(PrivateFile->FileName) + 1 + NameSize); if (FullFileName == NULL) { Status = EFI_OUT_OF_RESOURCES; - goto Done; + goto Done; } - + AsciiStrCpy (FullFileName, PrivateFile->FileName); AsciiStrCat (FullFileName, "/"); AsciiStrCat (FullFileName, PrivateFile->Dirent->d_name); @@ -875,7 +875,7 @@ PosixFileWrite ( if (Res == (UINTN)-1) { return ErrnoToEfiStatus (); } - + *BufferSize = Res; return EFI_SUCCESS; } @@ -887,7 +887,7 @@ PosixFileWrite ( @param This Protocol instance pointer. @param Position Byte position from the start of the file. - + @retval EFI_SUCCESS Data was written. @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open. @@ -933,7 +933,7 @@ PosixFileSetPossition ( @param This Protocol instance pointer. @param Position Byte position from the start of the file. - + @retval EFI_SUCCESS Data was written. @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.. @@ -946,7 +946,7 @@ PosixFileGetPossition ( { EFI_STATUS Status; EMU_EFI_FILE_PRIVATE *PrivateFile; - + PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); if (PrivateFile->IsDirectoryPath) { @@ -1024,7 +1024,7 @@ PosixFileGetInfo ( StrCpy ((CHAR16 *) FileSystemInfoBuffer->VolumeLabel, PrivateRoot->VolumeLabel); *BufferSize = SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (PrivateRoot->VolumeLabel); - + } else if (CompareGuid (InformationType, &gEfiFileSystemVolumeLabelInfoIdGuid)) { if (*BufferSize < StrSize (PrivateRoot->VolumeLabel)) { *BufferSize = StrSize (PrivateRoot->VolumeLabel); @@ -1087,7 +1087,7 @@ PosixFileSetInfo ( CHAR16 *UnicodeFilePtr; int UnixStatus; struct utimbuf Utime; - + PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); PrivateRoot = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (PrivateFile->SimpleFileSystem); @@ -1213,7 +1213,7 @@ PosixFileSetInfo ( AsciiFilePtr = NewFileName + AsciiStrLen(NewFileName); if ((AsciiFilePtr[-1] != '/') && (NewFileInfo->FileName[0] != '/')) { // make sure there is a / between Root FilePath and NewFileInfo Filename - AsciiFilePtr[0] = '/'; + AsciiFilePtr[0] = '/'; AsciiFilePtr[1] = '\0'; AsciiFilePtr++; } @@ -1434,7 +1434,7 @@ PosixFileFlush ( { EMU_EFI_FILE_PRIVATE *PrivateFile; - + PrivateFile = EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS (This); if (PrivateFile->IsDirectoryPath) { @@ -1465,15 +1465,15 @@ PosixFileSystmeThunkOpen ( { EMU_SIMPLE_FILE_SYSTEM_PRIVATE *Private; UINTN i; - + if (This->Private != NULL) { return EFI_ALREADY_STARTED; } - + if (!CompareGuid (This->Protocol, &gEfiSimpleFileSystemProtocolGuid)) { return EFI_UNSUPPORTED; } - + Private = malloc (sizeof (EMU_SIMPLE_FILE_SYSTEM_PRIVATE)); if (Private == NULL) { return EFI_OUT_OF_RESOURCES; @@ -1482,9 +1482,9 @@ PosixFileSystmeThunkOpen ( Private->FilePath = malloc (StrLen (This->ConfigString) + 1); if (Private->FilePath == NULL) { free (Private); - return EFI_OUT_OF_RESOURCES; + return EFI_OUT_OF_RESOURCES; } - + // Convert Unicode to Ascii for (i = 0; This->ConfigString[i] != 0; i++) { Private->FilePath[i] = This->ConfigString[i]; @@ -1499,12 +1499,12 @@ PosixFileSystmeThunkOpen ( return EFI_OUT_OF_RESOURCES; } StrCpy (Private->VolumeLabel, L"EFI_EMULATED"); - + Private->Signature = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE; Private->Thunk = This; CopyMem (&Private->SimpleFileSystem, &gPosixFileSystemProtocol, sizeof (Private->SimpleFileSystem)); Private->FileHandlesOpen = FALSE; - + This->Interface = &Private->SimpleFileSystem; This->Private = Private; return EFI_SUCCESS; @@ -1521,9 +1521,9 @@ PosixFileSystmeThunkClose ( if (!CompareGuid (This->Protocol, &gEfiSimpleFileSystemProtocolGuid)) { return EFI_UNSUPPORTED; } - + Private = This->Private; - + if (Private->FileHandlesOpen) { // // Close only supported if all the EFI_FILE_HANDLEs have been closed. @@ -1534,11 +1534,11 @@ PosixFileSystmeThunkClose ( if (This->Private != NULL) { if (Private->VolumeLabel != NULL) { free (Private->VolumeLabel); - } + } free (This->Private); This->Private = NULL; } - + return EFI_SUCCESS; } diff --git a/EmulatorPkg/Unix/Host/Pthreads.c b/EmulatorPkg/Unix/Host/Pthreads.c index b6b6ae8ef5..36d1298651 100644 --- a/EmulatorPkg/Unix/Host/Pthreads.c +++ b/EmulatorPkg/Unix/Host/Pthreads.c @@ -34,17 +34,17 @@ UINTN EFIAPI PthreadMutexUnLock ( IN VOID *Mutex - ) + ) { return (UINTN)pthread_mutex_unlock ((pthread_mutex_t *)Mutex); } - + UINTN EFIAPI PthreadMutexTryLock ( IN VOID *Mutex - ) + ) { return (UINTN)pthread_mutex_trylock ((pthread_mutex_t *)Mutex); } @@ -57,13 +57,13 @@ PthreadMutexInit ( { pthread_mutex_t *Mutex; int err; - + Mutex = malloc (sizeof (pthread_mutex_t)); err = pthread_mutex_init (Mutex, NULL); if (err == 0) { return Mutex; } - + return NULL; } @@ -76,7 +76,7 @@ PthreadMutexDestroy ( if (Mutex != NULL) { return pthread_mutex_destroy ((pthread_mutex_t *)Mutex); } - + return -1; } @@ -98,26 +98,26 @@ SecFakePthreadStart ( { THREAD_THUNK_THREAD_ENTRY Start; sigset_t SigMask; - + // Save global on the stack before we unlock Start = mThreadMangle.Start; pthread_mutex_unlock (&mThreadMangle.Mutex); - + // Mask all signals to the APs - sigfillset (&SigMask); + sigfillset (&SigMask); pthread_sigmask (SIG_BLOCK, &SigMask, NULL); - + // // We have to start the thread in SEC as we need to follow - // OS X calling conventions. We can then call back into + // OS X calling conventions. We can then call back into // to the callers Start. // - // This is a great example of how all problems in computer + // This is a great example of how all problems in computer // science can be solved by adding another level of indirection // return (VOID *)ReverseGasketUint64 ((CALL_BACK)Start, (UINTN)Context); } - + UINTN PthreadCreate ( IN VOID *Thread, @@ -127,8 +127,8 @@ PthreadCreate ( ) { int err; - BOOLEAN EnabledOnEntry; - + BOOLEAN EnabledOnEntry; + // // Threads inherit interrupt state so disable interrupts before we start thread // @@ -138,21 +138,21 @@ PthreadCreate ( } else { EnabledOnEntry = FALSE; } - + // Aquire lock for global, SecFakePthreadStart runs in a different thread. pthread_mutex_lock (&mThreadMangle.Mutex); mThreadMangle.Start = Start; - + err = pthread_create (Thread, Attribute, SecFakePthreadStart, Context); if (err != 0) { // Thread failed to launch so release the lock; pthread_mutex_unlock (&mThreadMangle.Mutex); } - + if (EnabledOnEntry) { // Restore interrupt state SecEnableInterrupt (); - } + } return err; } @@ -162,21 +162,21 @@ VOID PthreadExit ( IN VOID *ValuePtr ) -{ +{ pthread_exit (ValuePtr); return; } - + UINTN PthreadSelf ( VOID ) { // POSIX currently allows pthread_t to be a structure or arithmetic type. - // Check out sys/types.h to make sure this will work if you are porting. + // Check out sys/types.h to make sure this will work if you are porting. // On OS X (Darwin) pthread_t is a pointer to a structure so this code works. - return (UINTN)pthread_self (); + return (UINTN)pthread_self (); } @@ -201,14 +201,14 @@ PthreadOpen ( // Only single instance is supported return EFI_NOT_FOUND; } - + if (This->ConfigString[0] == L'0') { // If AP count is zero no need for threads return EFI_NOT_FOUND; } - + This->Interface = &gPthreadThunk; - + return EFI_SUCCESS; } diff --git a/EmulatorPkg/Unix/Host/SecMain.c b/EmulatorPkg/Unix/Host/SecMain.c index 2806347941..a0af3e4d53 100644 --- a/EmulatorPkg/Unix/Host/SecMain.c +++ b/EmulatorPkg/Unix/Host/SecMain.c @@ -65,7 +65,7 @@ int gInXcode = 0; /*++ Breakpoint target for Xcode project. Set in the Xcode XML - + Xcode breakpoint will 'source SecMain.gdb' gGdbWorkingFileName is set to SecMain.gdb @@ -116,13 +116,13 @@ main ( CHAR16 *FirmwareVolumesStr; UINTN *StackPointer; FILE *GdbTempFile; - + // - // Xcode does not support sourcing gdb scripts directly, so the Xcode XML + // Xcode does not support sourcing gdb scripts directly, so the Xcode XML // has a break point script to source the GdbRun script. // SecGdbConfigBreak (); - + // // If dlopen doesn't work, then we build a gdb script to allow the // symbols to be loaded. @@ -141,7 +141,7 @@ main ( } printf ("\nEDK II UNIX Host Emulation Environment from edk2.sourceforge.net\n"); - + setbuf (stdout, 0); setbuf (stderr, 0); @@ -154,23 +154,23 @@ main ( AddThunkPpi (EFI_PEI_PPI_DESCRIPTOR_PPI, &gEmuThunkPpiGuid, &mSecEmuThunkPpi); SecInitThunkProtocol (); - + // // Emulator Bus Driver Thunks // - AddThunkProtocol (&gX11ThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuGop), TRUE); - AddThunkProtocol (&gPosixFileSystemThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuFileSystem), TRUE); - AddThunkProtocol (&gBlockIoThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuVirtualDisk), TRUE); - AddThunkProtocol (&gSnpThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuNetworkInterface), TRUE); + AddThunkProtocol (&gX11ThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuGop), TRUE); + AddThunkProtocol (&gPosixFileSystemThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuFileSystem), TRUE); + AddThunkProtocol (&gBlockIoThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuVirtualDisk), TRUE); + AddThunkProtocol (&gSnpThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuNetworkInterface), TRUE); // // Emulator other Thunks // - AddThunkProtocol (&gPthreadThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuApCount), FALSE); + AddThunkProtocol (&gPthreadThunkIo, (CHAR16 *)PcdGetPtr (PcdEmuApCount), FALSE); // EmuSecLibConstructor (); - - gPpiList = GetThunkPpiList (); + + gPpiList = GetThunkPpiList (); // // Allocate space for gSystemMemory Array @@ -272,8 +272,8 @@ main ( // FileHandle = NULL; Status = PeiServicesFfsFindNextFile ( - EFI_FV_FILETYPE_SECURITY_CORE, - (EFI_PEI_FV_HANDLE)(UINTN)gFdInfo[Index].Address, + EFI_FV_FILETYPE_SECURITY_CORE, + (EFI_PEI_FV_HANDLE)(UINTN)gFdInfo[Index].Address, &FileHandle ); if (!EFI_ERROR (Status)) { @@ -408,7 +408,7 @@ MapFile ( perror ("MapFile() Failed"); return EFI_DEVICE_ERROR; } - + *Length = (UINT64) FileSize; *BaseAddress = (EFI_PHYSICAL_ADDRESS) (UINTN) res; @@ -433,16 +433,16 @@ MapFd0 ( return EFI_NOT_FOUND; } FileSize = lseek (fd, 0, SEEK_END); - + FvSize = FixedPcdGet64 (PcdEmuFlashFvRecoverySize); // Assume start of FD is Recovery FV, and make it write protected res = mmap ( - (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase), - FvSize, - PROT_READ | PROT_EXEC, - MAP_PRIVATE, - fd, + (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase), + FvSize, + PROT_READ | PROT_EXEC, + MAP_PRIVATE, + fd, 0 ); if (res == MAP_FAILED) { @@ -453,11 +453,11 @@ MapFd0 ( // We could not load at the build address, so we need to allow writes munmap (res, FvSize); res = mmap ( - (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase), - FvSize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE, - fd, + (void *)(UINTN)FixedPcdGet64 (PcdEmuFlashFvRecoveryBase), + FvSize, + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE, + fd, 0 ); if (res == MAP_FAILED) { @@ -466,14 +466,14 @@ MapFd0 ( return EFI_DEVICE_ERROR; } } - + // Map the rest of the FD as read/write res2 = mmap ( - (void *)(UINTN)(FixedPcdGet64 (PcdEmuFlashFvRecoveryBase) + FvSize), - FileSize - FvSize, - PROT_READ | PROT_WRITE | PROT_EXEC, + (void *)(UINTN)(FixedPcdGet64 (PcdEmuFlashFvRecoveryBase) + FvSize), + FileSize - FvSize, + PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED, - fd, + fd, FvSize ); close (fd); @@ -483,7 +483,7 @@ MapFd0 ( } // - // If enabled use the magic page to communicate between modules + // If enabled use the magic page to communicate between modules // This replaces the PI PeiServicesTable pointer mechanism that // deos not work in the emulator. It also allows the removal of // writable globals from SEC, PEI_CORE (libraries), PEIMs @@ -491,11 +491,11 @@ MapFd0 ( EmuMagicPage = (void *)(UINTN)FixedPcdGet64 (PcdPeiServicesTablePage); if (EmuMagicPage != NULL) { res3 = mmap ( - (void *)EmuMagicPage, - 4096, - PROT_READ | PROT_WRITE, + (void *)EmuMagicPage, + 4096, + PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, - 0, + 0, 0 ); if (res3 != EmuMagicPage) { @@ -503,11 +503,11 @@ MapFd0 ( return EFI_DEVICE_ERROR; } } - + *Length = (UINT64) FileSize; *BaseAddress = (EFI_PHYSICAL_ADDRESS) (UINTN) res; - return EFI_SUCCESS; + return EFI_SUCCESS; } @@ -658,10 +658,10 @@ SecUnixPeiAutoScan ( Routine Description: Check to see if an address range is in the EFI GCD memory map. - - This is all of GCD for system memory passed to DXE Core. FV + + This is all of GCD for system memory passed to DXE Core. FV mapping and other device mapped into system memory are not - inlcuded in the check. + inlcuded in the check. Arguments: Index - Which memory region to use @@ -680,7 +680,7 @@ EfiSystemMemoryRange ( { UINTN Index; EFI_PHYSICAL_ADDRESS MemoryBase; - + MemoryBase = (EFI_PHYSICAL_ADDRESS)(UINTN)MemoryAddress; for (Index = 0; Index < gSystemMemoryCount; Index++) { if ((MemoryBase >= gSystemMemory[Index].Memory) && @@ -688,7 +688,7 @@ EfiSystemMemoryRange ( return TRUE; } } - + return FALSE; } @@ -765,7 +765,7 @@ SecPeCoffGetEntryPoint ( // On Unix a dlopen is done that will change the entry point SecPeCoffRelocateImageExtraAction (&ImageContext); *EntryPoint = (VOID *)(UINTN)ImageContext.EntryPoint; - + return Status; } diff --git a/EmulatorPkg/Unix/Host/SecMain.h b/EmulatorPkg/Unix/Host/SecMain.h index 5cd717818e..aff7c36d79 100644 --- a/EmulatorPkg/Unix/Host/SecMain.h +++ b/EmulatorPkg/Unix/Host/SecMain.h @@ -73,7 +73,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <termio.h>
#include <sys/vfs.h>
#include <linux/fs.h>
-#endif
+#endif
#include <utime.h>
@@ -126,7 +126,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "Gasket.h"
-#define STACK_SIZE 0x20000
+#define STACK_SIZE 0x20000
typedef struct {
EFI_PHYSICAL_ADDRESS Address;
@@ -150,10 +150,10 @@ typedef struct { EFI_STATUS
EFIAPI
SecUnixPeiLoadFile (
- VOID *Pe32Data,
- EFI_PHYSICAL_ADDRESS *ImageAddress,
- UINT64 *ImageSize,
- EFI_PHYSICAL_ADDRESS *EntryPoint
+ VOID *Pe32Data,
+ EFI_PHYSICAL_ADDRESS *ImageAddress,
+ UINT64 *ImageSize,
+ EFI_PHYSICAL_ADDRESS *EntryPoint
);
int
@@ -268,7 +268,7 @@ SecTemporaryRamSupport ( IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
IN UINTN CopySize
);
-
+
EFI_STATUS
EFIAPI
GasketSecTemporaryRamSupport (
@@ -311,8 +311,8 @@ VOID SecInitThunkProtocol (
VOID
);
-
-
+
+
EFI_PHYSICAL_ADDRESS *
MapMemory (
INTN fd,
diff --git a/EmulatorPkg/Unix/Host/SecMain.inf b/EmulatorPkg/Unix/Host/SecMain.inf index 9bda6f8d31..c9ba71dc4e 100644 --- a/EmulatorPkg/Unix/Host/SecMain.inf +++ b/EmulatorPkg/Unix/Host/SecMain.inf @@ -38,7 +38,7 @@ LinuxPacketFilter.c
BerkeleyPacketFilter.c
MemoryAllocationLib.c
-
+
[Sources.X64]
X64/Gasket.S # convert between Emu x86_64 ABI and EFI X64 ABI
X64/SwitchStack.S
diff --git a/EmulatorPkg/Unix/Host/X11GraphicsWindow.c b/EmulatorPkg/Unix/Host/X11GraphicsWindow.c index ddcf1e7675..00d8c58a5b 100644 --- a/EmulatorPkg/Unix/Host/X11GraphicsWindow.c +++ b/EmulatorPkg/Unix/Host/X11GraphicsWindow.c @@ -40,7 +40,7 @@ typedef struct { EMU_GRAPHICS_WINDOW_PROTOCOL GraphicsIo; Display *display; - int screen; // values for window_size in main + int screen; // values for window_size in main Window win; GC gc; Visual *visual; @@ -65,11 +65,11 @@ typedef struct { EFI_KEY_DATA keys[NBR_KEYS]; EFI_KEY_STATE KeyState; - + EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK MakeRegisterdKeyCallback; EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK BreakRegisterdKeyCallback; VOID *RegisterdKeyCallbackContext; - + int previous_x; int previous_y; EFI_SIMPLE_POINTER_STATE pointer_state; @@ -83,7 +83,7 @@ HandleEvents( void fill_shift_mask ( - IN struct uga_drv_shift_mask *sm, + IN struct uga_drv_shift_mask *sm, IN unsigned long mask ) { @@ -134,18 +134,18 @@ TryCreateShmImage ( XDestroyImage(Drv->image); return 0; } - + Drv->image_data = shmat (Drv->xshm_info.shmid, NULL, 0); if(!Drv->image_data) { shmctl (Drv->xshm_info.shmid, IPC_RMID, NULL); XDestroyImage(Drv->image); return 0; } - -#ifndef __APPLE__ + +#ifndef __APPLE__ // // This closes shared memory in real time on OS X. Only closes after folks quit using - // it on Linux. + // it on Linux. // shmctl (Drv->xshm_info.shmid, IPC_RMID, NULL); #endif @@ -164,18 +164,18 @@ TryCreateShmImage ( EFI_STATUS X11Size ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, - IN UINT32 Width, + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN UINT32 Width, IN UINT32 Height ) { GRAPHICS_IO_PRIVATE *Drv; XSizeHints size_hints; - // Destroy current buffer if created. + // Destroy current buffer if created. Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; if (Drv->image != NULL) { - // Before destroy buffer, need to make sure the buffer available for access. + // Before destroy buffer, need to make sure the buffer available for access. XDestroyImage (Drv->image); if (Drv->use_shm) { @@ -190,7 +190,7 @@ X11Size ( Drv->height = Height; XResizeWindow (Drv->display, Drv->win, Width, Height); - // Allocate image. + // Allocate image. if (XShmQueryExtension(Drv->display) && TryCreateShmImage(Drv)) { Drv->use_shm = 1; } else { @@ -202,7 +202,7 @@ X11Size ( } else { Drv->pixel_shift = 0; } - + Drv->image_data = malloc ((Drv->width * Drv->height) << Drv->pixel_shift); Drv->image = XCreateImage ( Drv->display, Drv->visual, Drv->depth, @@ -211,14 +211,14 @@ X11Size ( 8 << Drv->pixel_shift, 0 ); } - + Drv->line_bytes = Drv->image->bytes_per_line; fill_shift_mask (&Drv->r, Drv->image->red_mask); fill_shift_mask (&Drv->g, Drv->image->green_mask); fill_shift_mask (&Drv->b, Drv->image->blue_mask); - // Set WM hints. + // Set WM hints. size_hints.flags = PSize | PMinSize | PMaxSize; size_hints.min_width = size_hints.max_width = size_hints.base_width = Width; size_hints.min_height = size_hints.max_height = size_hints.base_height = Height; @@ -231,15 +231,15 @@ X11Size ( void handleKeyEvent ( - IN GRAPHICS_IO_PRIVATE *Drv, - IN XEvent *ev, + IN GRAPHICS_IO_PRIVATE *Drv, + IN XEvent *ev, IN BOOLEAN Make ) { KeySym *KeySym; EFI_KEY_DATA KeyData; int KeySymArraySize; - + if (Make) { if (Drv->key_count == NBR_KEYS) { return; @@ -252,16 +252,16 @@ handleKeyEvent ( // // Returns an array of KeySymArraySize of KeySym for the keycode. [0] is lower case, [1] is upper case, // [2] and [3] are based on option and command modifiers. The problem we have is command V - // could be mapped to a crazy Unicode character so the old scheme of returning a string. + // could be mapped to a crazy Unicode character so the old scheme of returning a string. // KeySym = XGetKeyboardMapping (Drv->display, ev->xkey.keycode, 1, &KeySymArraySize); - + KeyData.Key.ScanCode = 0; KeyData.Key.UnicodeChar = 0; KeyData.KeyState.KeyShiftState = 0; // - // Skipping EFI_SCROLL_LOCK_ACTIVE & EFI_NUM_LOCK_ACTIVE since they are not on Macs + // Skipping EFI_SCROLL_LOCK_ACTIVE & EFI_NUM_LOCK_ACTIVE since they are not on Macs // if ((ev->xkey.state & LockMask) == 0) { Drv->KeyState.KeyToggleState &= ~EFI_CAPS_LOCK_ACTIVE; @@ -270,9 +270,9 @@ handleKeyEvent ( Drv->KeyState.KeyToggleState |= EFI_CAPS_LOCK_ACTIVE; } } - + // Skipping EFI_MENU_KEY_PRESSED and EFI_SYS_REQ_PRESSED - + switch (*KeySym) { case XK_Control_R: if (Make) { @@ -282,7 +282,7 @@ handleKeyEvent ( } break; case XK_Control_L: - if (Make) { + if (Make) { Drv->KeyState.KeyShiftState |= EFI_LEFT_CONTROL_PRESSED; } else { Drv->KeyState.KeyShiftState &= ~EFI_LEFT_CONTROL_PRESSED; @@ -303,7 +303,7 @@ handleKeyEvent ( Drv->KeyState.KeyShiftState &= ~EFI_LEFT_SHIFT_PRESSED; } break; - + case XK_Mode_switch: if (Make) { Drv->KeyState.KeyShiftState |= EFI_LEFT_ALT_PRESSED; @@ -326,44 +326,44 @@ handleKeyEvent ( Drv->KeyState.KeyShiftState &= ~EFI_LEFT_LOGO_PRESSED; } break; - + case XK_KP_Home: case XK_Home: KeyData.Key.ScanCode = SCAN_HOME; break; - + case XK_KP_End: case XK_End: KeyData.Key.ScanCode = SCAN_END; break; - - case XK_KP_Left: + + case XK_KP_Left: case XK_Left: KeyData.Key.ScanCode = SCAN_LEFT; break; - + case XK_KP_Right: case XK_Right: KeyData.Key.ScanCode = SCAN_RIGHT; break; - + case XK_KP_Up: case XK_Up: KeyData.Key.ScanCode = SCAN_UP; break; - + case XK_KP_Down: case XK_Down: KeyData.Key.ScanCode = SCAN_DOWN; break; - + case XK_KP_Delete: case XK_Delete: KeyData.Key.ScanCode = SCAN_DELETE; break; - - case XK_KP_Insert: + + case XK_KP_Insert: case XK_Insert: KeyData.Key.ScanCode = SCAN_INSERT; break; - + case XK_KP_Page_Up: case XK_Page_Up: KeyData.Key.ScanCode = SCAN_PAGE_UP; break; - + case XK_KP_Page_Down: case XK_Page_Down: KeyData.Key.ScanCode = SCAN_PAGE_DOWN; break; - + case XK_Escape: KeyData.Key.ScanCode = SCAN_ESC; break; case XK_Pause: KeyData.Key.ScanCode = SCAN_PAUSE; break; case XK_KP_F1: case XK_F1: KeyData.Key.ScanCode = SCAN_F1; break; - + case XK_KP_F2: case XK_F2: KeyData.Key.ScanCode = SCAN_F2; break; @@ -376,18 +376,18 @@ handleKeyEvent ( case XK_F5: KeyData.Key.ScanCode = SCAN_F5; break; case XK_F6: KeyData.Key.ScanCode = SCAN_F6; break; case XK_F7: KeyData.Key.ScanCode = SCAN_F7; break; - + // Don't map into X11 by default on a Mac - // System Preferences->Keyboard->Keyboard Shortcuts can be configured + // System Preferences->Keyboard->Keyboard Shortcuts can be configured // to not use higher function keys as shortcuts and the will show up - // in X11. + // in X11. case XK_F8: KeyData.Key.ScanCode = SCAN_F8; break; case XK_F9: KeyData.Key.ScanCode = SCAN_F9; break; case XK_F10: KeyData.Key.ScanCode = SCAN_F10; break; - + case XK_F11: KeyData.Key.ScanCode = SCAN_F11; break; case XK_F12: KeyData.Key.ScanCode = SCAN_F12; break; - + case XK_F13: KeyData.Key.ScanCode = SCAN_F13; break; case XK_F14: KeyData.Key.ScanCode = SCAN_F14; break; case XK_F15: KeyData.Key.ScanCode = SCAN_F15; break; @@ -402,16 +402,16 @@ handleKeyEvent ( case XK_F24: KeyData.Key.ScanCode = SCAN_F24; break; // No mapping in X11 - //case XK_: KeyData.Key.ScanCode = SCAN_MUTE; break; - //case XK_: KeyData.Key.ScanCode = SCAN_VOLUME_UP; break; - //case XK_: KeyData.Key.ScanCode = SCAN_VOLUME_DOWN; break; - //case XK_: KeyData.Key.ScanCode = SCAN_BRIGHTNESS_UP; break; - //case XK_: KeyData.Key.ScanCode = SCAN_BRIGHTNESS_DOWN; break; - //case XK_: KeyData.Key.ScanCode = SCAN_SUSPEND; break; - //case XK_: KeyData.Key.ScanCode = SCAN_HIBERNATE; break; - //case XK_: KeyData.Key.ScanCode = SCAN_TOGGLE_DISPLAY; break; - //case XK_: KeyData.Key.ScanCode = SCAN_RECOVERY; break; - //case XK_: KeyData.Key.ScanCode = SCAN_EJECT; break; + //case XK_: KeyData.Key.ScanCode = SCAN_MUTE; break; + //case XK_: KeyData.Key.ScanCode = SCAN_VOLUME_UP; break; + //case XK_: KeyData.Key.ScanCode = SCAN_VOLUME_DOWN; break; + //case XK_: KeyData.Key.ScanCode = SCAN_BRIGHTNESS_UP; break; + //case XK_: KeyData.Key.ScanCode = SCAN_BRIGHTNESS_DOWN; break; + //case XK_: KeyData.Key.ScanCode = SCAN_SUSPEND; break; + //case XK_: KeyData.Key.ScanCode = SCAN_HIBERNATE; break; + //case XK_: KeyData.Key.ScanCode = SCAN_TOGGLE_DISPLAY; break; + //case XK_: KeyData.Key.ScanCode = SCAN_RECOVERY; break; + //case XK_: KeyData.Key.ScanCode = SCAN_EJECT; break; case XK_BackSpace: KeyData.Key.UnicodeChar = 0x0008; break; @@ -419,28 +419,28 @@ handleKeyEvent ( case XK_Tab: KeyData.Key.UnicodeChar = 0x0009; break; case XK_Linefeed: KeyData.Key.UnicodeChar = 0x000a; break; - + case XK_KP_Enter: case XK_Return: KeyData.Key.UnicodeChar = 0x000d; break; - case XK_KP_Equal : KeyData.Key.UnicodeChar = L'='; break; - case XK_KP_Multiply : KeyData.Key.UnicodeChar = L'*'; break; - case XK_KP_Add : KeyData.Key.UnicodeChar = L'+'; break; - case XK_KP_Separator : KeyData.Key.UnicodeChar = L'~'; break; - case XK_KP_Subtract : KeyData.Key.UnicodeChar = L'-'; break; - case XK_KP_Decimal : KeyData.Key.UnicodeChar = L'.'; break; - case XK_KP_Divide : KeyData.Key.UnicodeChar = L'/'; break; - - case XK_KP_0 : KeyData.Key.UnicodeChar = L'0'; break; - case XK_KP_1 : KeyData.Key.UnicodeChar = L'1'; break; - case XK_KP_2 : KeyData.Key.UnicodeChar = L'2'; break; - case XK_KP_3 : KeyData.Key.UnicodeChar = L'3'; break; - case XK_KP_4 : KeyData.Key.UnicodeChar = L'4'; break; - case XK_KP_5 : KeyData.Key.UnicodeChar = L'5'; break; - case XK_KP_6 : KeyData.Key.UnicodeChar = L'6'; break; - case XK_KP_7 : KeyData.Key.UnicodeChar = L'7'; break; - case XK_KP_8 : KeyData.Key.UnicodeChar = L'8'; break; - case XK_KP_9 : KeyData.Key.UnicodeChar = L'9'; break; + case XK_KP_Equal : KeyData.Key.UnicodeChar = L'='; break; + case XK_KP_Multiply : KeyData.Key.UnicodeChar = L'*'; break; + case XK_KP_Add : KeyData.Key.UnicodeChar = L'+'; break; + case XK_KP_Separator : KeyData.Key.UnicodeChar = L'~'; break; + case XK_KP_Subtract : KeyData.Key.UnicodeChar = L'-'; break; + case XK_KP_Decimal : KeyData.Key.UnicodeChar = L'.'; break; + case XK_KP_Divide : KeyData.Key.UnicodeChar = L'/'; break; + + case XK_KP_0 : KeyData.Key.UnicodeChar = L'0'; break; + case XK_KP_1 : KeyData.Key.UnicodeChar = L'1'; break; + case XK_KP_2 : KeyData.Key.UnicodeChar = L'2'; break; + case XK_KP_3 : KeyData.Key.UnicodeChar = L'3'; break; + case XK_KP_4 : KeyData.Key.UnicodeChar = L'4'; break; + case XK_KP_5 : KeyData.Key.UnicodeChar = L'5'; break; + case XK_KP_6 : KeyData.Key.UnicodeChar = L'6'; break; + case XK_KP_7 : KeyData.Key.UnicodeChar = L'7'; break; + case XK_KP_8 : KeyData.Key.UnicodeChar = L'8'; break; + case XK_KP_9 : KeyData.Key.UnicodeChar = L'9'; break; default: ; @@ -453,23 +453,23 @@ handleKeyEvent ( if (*KeySym < XK_BackSpace) { if (((Drv->KeyState.KeyShiftState & (EFI_LEFT_SHIFT_PRESSED | EFI_RIGHT_SHIFT_PRESSED)) != 0) || ((Drv->KeyState.KeyToggleState & EFI_CAPS_LOCK_ACTIVE) != 0) ) { - + KeyData.Key.UnicodeChar = (CHAR16)KeySym[KEYSYM_UPPER]; - // Per UEFI spec since we converted the Unicode clear the shift bits we pass up + // Per UEFI spec since we converted the Unicode clear the shift bits we pass up KeyData.KeyState.KeyShiftState &= ~(EFI_LEFT_SHIFT_PRESSED | EFI_RIGHT_SHIFT_PRESSED); } else { KeyData.Key.UnicodeChar = (CHAR16)KeySym[KEYSYM_LOWER]; } } else { - // XK_BackSpace is the start of XK_MISCELLANY. These are the XK_? keys we process in this file - ; + // XK_BackSpace is the start of XK_MISCELLANY. These are the XK_? keys we process in this file + ; } - + if (Make) { memcpy (&Drv->keys[Drv->key_wr], &KeyData, sizeof (EFI_KEY_DATA)); Drv->key_wr = (Drv->key_wr + 1) % NBR_KEYS; - Drv->key_count++; + Drv->key_count++; if (Drv->MakeRegisterdKeyCallback != NULL) { ReverseGasketUint64Uint64 (Drv->MakeRegisterdKeyCallback ,Drv->RegisterdKeyCallbackContext, &KeyData); } @@ -483,7 +483,7 @@ handleKeyEvent ( void handleMouseMoved( - IN GRAPHICS_IO_PRIVATE *Drv, + IN GRAPHICS_IO_PRIVATE *Drv, IN XEvent *ev ) { @@ -504,8 +504,8 @@ handleMouseMoved( void handleMouseDown ( - IN GRAPHICS_IO_PRIVATE *Drv, - IN XEvent *ev, + IN GRAPHICS_IO_PRIVATE *Drv, + IN XEvent *ev, IN BOOLEAN Pressed ) { @@ -521,10 +521,10 @@ handleMouseDown ( void Redraw ( - IN GRAPHICS_IO_PRIVATE *Drv, - IN UINTN X, - IN UINTN Y, - IN UINTN Width, + IN GRAPHICS_IO_PRIVATE *Drv, + IN UINTN X, + IN UINTN Y, + IN UINTN Width, IN UINTN Height ) { @@ -597,7 +597,7 @@ HandleEvents ( unsigned long X11PixelToColor ( - IN GRAPHICS_IO_PRIVATE *Drv, + IN GRAPHICS_IO_PRIVATE *Drv, IN EFI_UGA_PIXEL pixel ) { @@ -608,14 +608,14 @@ X11PixelToColor ( EFI_UGA_PIXEL X11ColorToPixel ( - IN GRAPHICS_IO_PRIVATE *Drv, + IN GRAPHICS_IO_PRIVATE *Drv, IN unsigned long val ) { EFI_UGA_PIXEL Pixel; memset (&Pixel, 0, sizeof (EFI_UGA_PIXEL)); - + // Truncation not an issue since X11 and EFI are both using 8 bits per color Pixel.Red = (val >> Drv->r.shift) << Drv->r.csize; Pixel.Green = (val >> Drv->g.shift) << Drv->g.csize; @@ -631,52 +631,52 @@ X11CheckKey ( ) { GRAPHICS_IO_PRIVATE *Drv; - + Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; - + HandleEvents (Drv); - + if (Drv->key_count != 0) { return EFI_SUCCESS; } - + return EFI_NOT_READY; } EFI_STATUS X11GetKey ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, IN EFI_KEY_DATA *KeyData ) { EFI_STATUS EfiStatus; GRAPHICS_IO_PRIVATE *Drv; - + Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; EfiStatus = X11CheckKey (GraphicsIo); if (EFI_ERROR (EfiStatus)) { return EfiStatus; } - + CopyMem (KeyData, &Drv->keys[Drv->key_rd], sizeof (EFI_KEY_DATA)); Drv->key_rd = (Drv->key_rd + 1) % NBR_KEYS; Drv->key_count--; - + return EFI_SUCCESS; } EFI_STATUS X11KeySetState ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, IN EFI_KEY_TOGGLE_STATE *KeyToggleState ) { GRAPHICS_IO_PRIVATE *Drv; - - Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; - + + Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; + if (*KeyToggleState & EFI_CAPS_LOCK_ACTIVE) { if ((Drv->KeyState.KeyToggleState & EFI_CAPS_LOCK_ACTIVE) == 0) { // @@ -685,7 +685,7 @@ X11KeySetState ( // } } - + Drv->KeyState.KeyToggleState = *KeyToggleState; return EFI_SUCCESS; } @@ -693,7 +693,7 @@ X11KeySetState ( EFI_STATUS X11RegisterKeyNotify ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK MakeCallBack, IN EMU_GRAPHICS_WINDOW_REGISTER_KEY_NOTIFY_CALLBACK BreakCallBack, IN VOID *Context @@ -701,7 +701,7 @@ X11RegisterKeyNotify ( { GRAPHICS_IO_PRIVATE *Drv; - Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; + Drv = (GRAPHICS_IO_PRIVATE *)GraphicsIo; Drv->MakeRegisterdKeyCallback = MakeCallBack; Drv->BreakRegisterdKeyCallback = BreakCallBack; @@ -834,10 +834,10 @@ X11Blt ( case EfiUgaVideoToVideo: XCopyArea( Private->display, Private->win, Private->win, Private->gc, - Args->SourceX, Args->SourceY, Args->Width, Args->Height, + Args->SourceX, Args->SourceY, Args->Width, Args->Height, Args->DestinationX, Args->DestinationY ); - + while (1) { XNextEvent (Private->display, &ev); HandleEvent (Private, &ev); @@ -878,14 +878,14 @@ X11CheckPointer ( if (Drv->pointer_state_changed != 0) { return EFI_SUCCESS; } - + return EFI_NOT_READY; } EFI_STATUS X11GetPointerState ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, IN EFI_SIMPLE_POINTER_STATE *State ) { @@ -898,7 +898,7 @@ X11GetPointerState ( if (EfiStatus != EFI_SUCCESS) { return EfiStatus; } - + memcpy (State, &Drv->pointer_state, sizeof (EFI_SIMPLE_POINTER_STATE)); Drv->pointer_state.RelativeMovementX = 0; @@ -932,7 +932,7 @@ X11GraphicsWindowOpen ( Drv->GraphicsIo.Blt = GasketX11Blt; Drv->GraphicsIo.CheckPointer = GasketX11CheckPointer; Drv->GraphicsIo.GetPointerState = GasketX11GetPointerState; - + Drv->key_count = 0; Drv->key_rd = 0; @@ -942,8 +942,8 @@ X11GraphicsWindowOpen ( Drv->MakeRegisterdKeyCallback = NULL; Drv->BreakRegisterdKeyCallback = NULL; Drv->RegisterdKeyCallbackContext = NULL; - - + + Drv->display = XOpenDisplay (display_name); if (Drv->display == NULL) { fprintf (stderr, "uga: cannot connect to X server %s\n", XDisplayName (display_name)); @@ -960,16 +960,16 @@ X11GraphicsWindowOpen ( ); Drv->depth = DefaultDepth (Drv->display, Drv->screen); - XDefineCursor (Drv->display, Drv->win, XCreateFontCursor (Drv->display, XC_pirate)); + XDefineCursor (Drv->display, Drv->win, XCreateFontCursor (Drv->display, XC_pirate)); - Drv->Title = malloc (StrSize (This->ConfigString)); + Drv->Title = malloc (StrSize (This->ConfigString)); UnicodeStrToAsciiStr (This->ConfigString, Drv->Title); XStoreName (Drv->display, Drv->win, Drv->Title); // XAutoRepeatOff (Drv->display); XSelectInput ( Drv->display, Drv->win, - ExposureMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask + ExposureMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask ); Drv->gc = DefaultGC (Drv->display, Drv->screen); @@ -991,7 +991,7 @@ X11GraphicsWindowClose ( if (Drv == NULL) { return EFI_SUCCESS; } - + if (Drv->image != NULL) { XDestroyImage(Drv->image); @@ -1004,12 +1004,12 @@ X11GraphicsWindowClose ( } XDestroyWindow (Drv->display, Drv->win); XCloseDisplay (Drv->display); - + #ifdef __APPLE__ // Free up the shared memory shmctl (Drv->xshm_info.shmid, IPC_RMID, NULL); #endif - + free (Drv); return EFI_SUCCESS; } diff --git a/EmulatorPkg/Unix/Host/X64/Gasket.S b/EmulatorPkg/Unix/Host/X64/Gasket.S index 7ea49bb422..c339461cd8 100644 --- a/EmulatorPkg/Unix/Host/X64/Gasket.S +++ b/EmulatorPkg/Unix/Host/X64/Gasket.S @@ -27,13 +27,13 @@ // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry // Any call with 0 - 4 arguments allocates 40 bytes on the stack. -// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56, +// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56, // 7 or 8 args is 72, and 9 or 10 args is 88 .text - + // // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI) // @@ -49,11 +49,11 @@ ASM_PFX(GasketSecWriteStdErr): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecWriteStdErr) - + popq %rdi // restore state popq %rsi popq %rbp @@ -69,7 +69,7 @@ ASM_PFX(GasketSecConfigStdIn): pushq %rdi call ASM_PFX(SecConfigStdIn) - + popq %rdi // restore state popq %rsi popq %rbp @@ -83,11 +83,11 @@ ASM_PFX(GasketSecWriteStdOut): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecWriteStdOut) - + popq %rdi // restore state popq %rsi popq %rbp @@ -101,11 +101,11 @@ ASM_PFX(GasketSecReadStdIn): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecReadStdIn) - + popq %rdi // restore state popq %rsi popq %rbp @@ -120,7 +120,7 @@ ASM_PFX(GasketSecPollStdIn): pushq %rdi call ASM_PFX(SecPollStdIn) - + popq %rdi // restore state popq %rsi popq %rbp @@ -134,10 +134,10 @@ ASM_PFX(GasketSecMalloc): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecMalloc) - + popq %rdi // restore state popq %rsi popq %rbp @@ -151,10 +151,10 @@ ASM_PFX(GasketSecValloc): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecValloc) - + popq %rdi // restore state popq %rsi popq %rbp @@ -168,10 +168,10 @@ ASM_PFX(GasketSecFree): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecFree) - + popq %rdi // restore state popq %rsi popq %rbp @@ -186,11 +186,11 @@ ASM_PFX(GasketSecSetTimer): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecSetTimer) - + popq %rdi // restore state popq %rsi popq %rbp @@ -206,7 +206,7 @@ ASM_PFX(GasketSecEnableInterrupt): pushq %rdi call ASM_PFX(SecEnableInterrupt) - + popq %rdi // restore state popq %rsi popq %rbp @@ -222,7 +222,7 @@ ASM_PFX(GasketSecDisableInterrupt): pushq %rdi call ASM_PFX(SecDisableInterrupt) - + popq %rdi // restore state popq %rsi popq %rbp @@ -237,7 +237,7 @@ ASM_PFX(GasketQueryPerformanceFrequency): pushq %rdi call ASM_PFX(QueryPerformanceFrequency) - + popq %rdi // restore state popq %rsi popq %rbp @@ -253,7 +253,7 @@ ASM_PFX(GasketQueryPerformanceCounter): pushq %rdi call ASM_PFX(QueryPerformanceCounter) - + popq %rdi // restore state popq %rsi popq %rbp @@ -268,16 +268,16 @@ ASM_PFX(GasketSecSleep): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecSleep) - + popq %rdi // restore state popq %rsi popq %rbp ret - - + + ASM_GLOBAL ASM_PFX(GasketSecCpuSleep) ASM_PFX(GasketSecCpuSleep): pushq %rbp // stack frame is for the debugger @@ -287,24 +287,24 @@ ASM_PFX(GasketSecCpuSleep): pushq %rdi call ASM_PFX(SecCpuSleep) - + popq %rdi // restore state popq %rsi popq %rbp ret - - + + ASM_GLOBAL ASM_PFX(GasketSecExit) ASM_PFX(GasketSecExit): pushq %rbp // stack frame is for the debugger movq %rsp, %rbp - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecExit) // Less to do as we will never return to EFI ABI world LDEAD_LOOP: jmp LDEAD_LOOP // _exit should never return - + ASM_GLOBAL ASM_PFX(GasketSecGetTime) ASM_PFX(GasketSecGetTime): pushq %rbp // stack frame is for the debugger @@ -313,8 +313,8 @@ ASM_PFX(GasketSecGetTime): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecGetTime) @@ -331,8 +331,8 @@ ASM_PFX(GasketSecSetTime): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecSetTime) @@ -350,13 +350,13 @@ ASM_PFX(GasketSecGetNextProtocol): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx call ASM_PFX(SecGetNextProtocol) - + popq %rdi // restore state popq %rsi popq %rbp @@ -372,16 +372,16 @@ ASM_PFX(GasketSecPeCoffGetEntryPoint): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(SecPeCoffGetEntryPoint) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction) ASM_PFX(GasketSecPeCoffRelocateImageExtraAction): pushq %rbp // stack frame is for the debugger @@ -390,15 +390,15 @@ ASM_PFX(GasketSecPeCoffRelocateImageExtraAction): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecPeCoffRelocateImageExtraAction) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction) ASM_PFX(GasketSecPeCoffUnloadImageExtraAction): pushq %rbp // stack frame is for the debugger @@ -407,15 +407,15 @@ ASM_PFX(GasketSecPeCoffUnloadImageExtraAction): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(SecPeCoffUnloadImageExtraAction) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress) ASM_PFX(GasketSecEmuThunkAddress): @@ -426,7 +426,7 @@ ASM_PFX(GasketSecEmuThunkAddress): pushq %rdi call ASM_PFX(SecEmuThunkAddress) - + popq %rdi // restore state popq %rsi popq %rbp @@ -444,13 +444,13 @@ ASM_PFX(GasketX11Size): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx call ASM_PFX(X11Size) - + popq %rdi // restore state popq %rsi popq %rbp @@ -465,10 +465,10 @@ ASM_PFX(GasketX11CheckKey): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(X11CheckKey) - + popq %rdi // restore state popq %rsi popq %rbp @@ -482,11 +482,11 @@ ASM_PFX(GasketX11GetKey): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(X11GetKey) - + popq %rdi // restore state popq %rsi popq %rbp @@ -501,17 +501,17 @@ ASM_PFX(GasketX11KeySetState): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(X11KeySetState) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify) ASM_PFX(GasketX11RegisterKeyNotify): pushq %rbp // stack frame is for the debugger @@ -520,19 +520,19 @@ ASM_PFX(GasketX11RegisterKeyNotify): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx call ASM_PFX(X11RegisterKeyNotify) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketX11Blt) ASM_PFX(GasketX11Blt): pushq %rbp // stack frame is for the debugger @@ -541,13 +541,13 @@ ASM_PFX(GasketX11Blt): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx call ASM_PFX(X11Blt) - + popq %rdi // restore state popq %rsi popq %rbp @@ -562,10 +562,10 @@ ASM_PFX(GasketX11CheckPointer): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(X11CheckPointer) - + popq %rdi // restore state popq %rsi popq %rbp @@ -580,11 +580,11 @@ ASM_PFX(GasketX11GetPointerState): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(X11GetPointerState) - + popq %rdi // restore state popq %rsi popq %rbp @@ -599,16 +599,16 @@ ASM_PFX(GasketX11GraphicsWindowOpen): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(X11GraphicsWindowOpen) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose) ASM_PFX(GasketX11GraphicsWindowClose): pushq %rbp // stack frame is for the debugger @@ -617,11 +617,11 @@ ASM_PFX(GasketX11GraphicsWindowClose): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args movq %r9, %rcx call ASM_PFX(X11GraphicsWindowClose) - + popq %rdi // restore state popq %rsi popq %rbp @@ -638,10 +638,10 @@ ASM_PFX(GasketPthreadMutexLock): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadMutexLock) - + popq %rdi // restore state popq %rsi popq %rbp @@ -656,10 +656,10 @@ ASM_PFX(GasketPthreadMutexUnLock): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadMutexUnLock) - + popq %rdi // restore state popq %rsi popq %rbp @@ -673,10 +673,10 @@ ASM_PFX(GasketPthreadMutexTryLock): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadMutexTryLock) - + popq %rdi // restore state popq %rsi popq %rbp @@ -692,14 +692,14 @@ ASM_PFX(GasketPthreadMutexInit): call ASM_PFX(PthreadMutexInit) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy) ASM_PFX(GasketPthreadMutexDestroy): pushq %rbp // stack frame is for the debugger @@ -708,10 +708,10 @@ ASM_PFX(GasketPthreadMutexDestroy): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadMutexDestroy) - + popq %rdi // restore state popq %rsi popq %rbp @@ -726,19 +726,19 @@ ASM_PFX(GasketPthreadCreate): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx call ASM_PFX(PthreadCreate) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketPthreadExit) ASM_PFX(GasketPthreadExit): pushq %rbp // stack frame is for the debugger @@ -747,17 +747,17 @@ ASM_PFX(GasketPthreadExit): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadExit) - + popq %rdi // restore state popq %rsi popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketPthreadSelf) ASM_PFX(GasketPthreadSelf): pushq %rbp // stack frame is for the debugger @@ -768,7 +768,7 @@ ASM_PFX(GasketPthreadSelf): call ASM_PFX(PthreadSelf) - + popq %rdi // restore state popq %rsi popq %rbp @@ -783,10 +783,10 @@ ASM_PFX(GasketPthreadOpen): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadOpen) - + popq %rdi // restore state popq %rsi popq %rbp @@ -801,10 +801,10 @@ ASM_PFX(GasketPthreadClose): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PthreadClose) - + popq %rdi // restore state popq %rsi popq %rbp @@ -826,14 +826,14 @@ ASM_PFX(ReverseGasketUint64): pushq %rbp // stack frame is for the debugger movq %rsp, %rbp - movq %rdi, %rax // Swizzle args - movq %rsi, %rcx + movq %rdi, %rax // Swizzle args + movq %rsi, %rcx subq $32, %rsp // 32-byte shadow space call *%rax addq $32, %rsp - popq %rbp + popq %rbp ret // @@ -850,16 +850,16 @@ ASM_PFX(ReverseGasketUint64Uint64): pushq %rbp // stack frame is for the debugger movq %rsp, %rbp - movq %rdi, %rax // Swizzle args - movq %rsi, %rcx + movq %rdi, %rax // Swizzle args + movq %rsi, %rcx subq $32, %rsp // 32-byte shadow space call *%rax addq $32, %rsp - popq %rbp + popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan) ASM_PFX(GasketSecUnixPeiAutoScan): @@ -869,12 +869,12 @@ ASM_PFX(GasketSecUnixPeiAutoScan): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx call ASM_PFX(SecUnixPeiAutoScan) - + popq %rdi // restore state popq %rsi popq %rbp @@ -889,8 +889,8 @@ ASM_PFX(GasketSecUnixFdAddress): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx @@ -912,8 +912,8 @@ ASM_PFX(GasketPosixOpenVolume): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx @@ -933,12 +933,12 @@ ASM_PFX(GasketPosixFileOpen): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 - + movq 48(%rbp), %r8 + call ASM_PFX(PosixFileOpen) popq %rdi // restore state @@ -955,7 +955,7 @@ ASM_PFX(GasketPosixFileCLose): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PosixFileCLose) @@ -964,7 +964,7 @@ ASM_PFX(GasketPosixFileCLose): popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketPosixFileDelete) ASM_PFX(GasketPosixFileDelete): pushq %rbp // stack frame is for the debugger @@ -973,7 +973,7 @@ ASM_PFX(GasketPosixFileDelete): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PosixFileDelete) @@ -991,8 +991,8 @@ ASM_PFX(GasketPosixFileRead): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx call ASM_PFX(PosixFileRead) @@ -1002,7 +1002,7 @@ ASM_PFX(GasketPosixFileRead): popq %rbp ret - + ASM_GLOBAL ASM_PFX(GasketPosixFileWrite) ASM_PFX(GasketPosixFileWrite): pushq %rbp // stack frame is for the debugger @@ -1011,8 +1011,8 @@ ASM_PFX(GasketPosixFileWrite): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx call ASM_PFX(PosixFileWrite) @@ -1031,8 +1031,8 @@ ASM_PFX(GasketPosixFileSetPossition): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(PosixFileSetPossition) @@ -1050,8 +1050,8 @@ ASM_PFX(GasketPosixFileGetPossition): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(PosixFileGetPossition) @@ -1069,8 +1069,8 @@ ASM_PFX(GasketPosixFileGetInfo): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx @@ -1090,8 +1090,8 @@ ASM_PFX(GasketPosixFileSetInfo): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx @@ -1111,7 +1111,7 @@ ASM_PFX(GasketPosixFileFlush): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PosixFileFlush) @@ -1129,7 +1129,7 @@ ASM_PFX(GasketPosixFileSystmeThunkOpen): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PosixFileSystmeThunkOpen) @@ -1147,7 +1147,7 @@ ASM_PFX(GasketPosixFileSystmeThunkClose): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(PosixFileSystmeThunkClose) @@ -1164,8 +1164,8 @@ ASM_PFX(GasketEmuBlockIoReset): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(EmuBlockIoReset) @@ -1183,12 +1183,12 @@ ASM_PFX(GasketEmuBlockIoReadBlocks): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 - movq 56(%rbp), %r9 + movq 48(%rbp), %r8 + movq 56(%rbp), %r9 call ASM_PFX(EmuBlockIoReadBlocks) @@ -1206,12 +1206,12 @@ ASM_PFX(GasketEmuBlockIoWriteBlocks): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 - movq 56(%rbp), %r9 + movq 48(%rbp), %r8 + movq 56(%rbp), %r9 call ASM_PFX(EmuBlockIoWriteBlocks) @@ -1229,8 +1229,8 @@ ASM_PFX(GasketEmuBlockIoFlushBlocks): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(EmuBlockIoFlushBlocks) @@ -1248,8 +1248,8 @@ ASM_PFX(GasketEmuBlockIoCreateMapping): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(EmuBlockIoCreateMapping) @@ -1267,7 +1267,7 @@ ASM_PFX(GasketBlockIoThunkOpen): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuBlockIoThunkOpen) @@ -1285,7 +1285,7 @@ ASM_PFX(GasketBlockIoThunkClose): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuBlockIoThunkClose) @@ -1304,8 +1304,8 @@ ASM_PFX(GasketSnpCreateMapping): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(EmuSnpCreateMapping) @@ -1323,7 +1323,7 @@ ASM_PFX(GasketSnpStart): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuSnpStart) @@ -1341,7 +1341,7 @@ ASM_PFX(GasketSnpStop): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuSnpStop) @@ -1359,8 +1359,8 @@ ASM_PFX(GasketSnpInitialize): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx call ASM_PFX(EmuSnpInitialize) @@ -1380,8 +1380,8 @@ ASM_PFX(GasketSnpReset): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi call ASM_PFX(EmuSnpReset) @@ -1399,7 +1399,7 @@ ASM_PFX(GasketSnpShutdown): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuSnpShutdown) @@ -1417,12 +1417,12 @@ ASM_PFX(GasketSnpReceiveFilters): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 - movq 56(%rbp), %r9 + movq 48(%rbp), %r8 + movq 56(%rbp), %r9 call ASM_PFX(EmuSnpReceiveFilters) @@ -1440,8 +1440,8 @@ ASM_PFX(GasketSnpStationAddress): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx call ASM_PFX(EmuSnpStationAddress) @@ -1461,8 +1461,8 @@ ASM_PFX(GasketSnpStatistics): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx @@ -1482,8 +1482,8 @@ ASM_PFX(GasketSnpMCastIpToMac): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx @@ -1503,11 +1503,11 @@ ASM_PFX(GasketSnpNvData): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 + movq 48(%rbp), %r8 call ASM_PFX(EmuSnpNvData) @@ -1525,8 +1525,8 @@ ASM_PFX(GasketSnpGetStatus): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx call ASM_PFX(EmuSnpGetStatus) @@ -1542,17 +1542,17 @@ ASM_GLOBAL ASM_PFX(GasketSnpTransmit) ASM_PFX(GasketSnpTransmit): pushq %rbp // stack frame is for the debugger movq %rsp, %rbp - subq $16, %rsp // Allocate space for args on the stack + subq $16, %rsp // Allocate space for args on the stack pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 - movq 56(%rbp), %r9 + movq 48(%rbp), %r8 + movq 56(%rbp), %r9 movq 64(%rbp), %rax movq %rax, (%rsp) @@ -1575,12 +1575,12 @@ ASM_PFX(GasketSnpReceive): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args - movq %rdx, %rsi + movq %rcx, %rdi // Swizzle args + movq %rdx, %rsi movq %r8, %rdx movq %r9, %rcx - movq 48(%rbp), %r8 - movq 56(%rbp), %r9 + movq 48(%rbp), %r8 + movq 56(%rbp), %r9 movq 64(%rbp), %rax movq %rax, (%rsp) @@ -1601,7 +1601,7 @@ ASM_PFX(GasketSnpThunkOpen): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuSnpThunkOpen) @@ -1619,7 +1619,7 @@ ASM_PFX(GasketSnpThunkClose): pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI pushq %rdi - movq %rcx, %rdi // Swizzle args + movq %rcx, %rdi // Swizzle args call ASM_PFX(EmuSnpThunkClose) diff --git a/EmulatorPkg/Unix/Host/X64/SwitchStack.S b/EmulatorPkg/Unix/Host/X64/SwitchStack.S index 8a57b781b5..e82b352b6a 100644 --- a/EmulatorPkg/Unix/Host/X64/SwitchStack.S +++ b/EmulatorPkg/Unix/Host/X64/SwitchStack.S @@ -23,7 +23,7 @@ #
# (rdi) EntryPoint - Entry point with new stack.
# (rsi) Context1 - Parameter1 for entry point. (rcx)
-# (rdx) Context2 - Parameter2 for entry point. (rdx)
+# (rdx) Context2 - Parameter2 for entry point. (rdx)
# (rcx) NewStack - The pointer to new stack.
#
# Returns:
@@ -37,11 +37,11 @@ ASM_PFX(PeiSwitchStacks): movq %rsp, %rbp
movq %rcx, %rsp // update stack pointer
-
+
movq %rdi, %rax // entry point to %rax
movq %rsi, %rcx // Adjust Context1
// Context2 already in the rigth spot
-
+
#
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
@@ -49,5 +49,5 @@ ASM_PFX(PeiSwitchStacks): subq $32, %rsp // 32-byte shadow space plus alignment pad
call *%rax
-
+
diff --git a/EmulatorPkg/Unix/UnixX64.dsc b/EmulatorPkg/Unix/UnixX64.dsc index 922df012fa..0b08a7357c 100644 --- a/EmulatorPkg/Unix/UnixX64.dsc +++ b/EmulatorPkg/Unix/UnixX64.dsc @@ -105,7 +105,7 @@ #
PlatformBdsLib|EmulatorPkg/Library/EmuBdsLib/EmuBdsLib.inf
KeyMapLib|EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf
-
+
#
# Misc
#
@@ -178,7 +178,7 @@ [LibraryClasses.common.UEFI_DRIVER]
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-
+
[LibraryClasses.common.UEFI_APPLICATION]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
@@ -204,7 +204,7 @@ gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x002a0000
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0x10000
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume|L"../FV/FV_RECOVERY.fd"
-
+
gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySizeForSecMain|L"64!64"
!if $(BUILD_NEW_SHELL)
@@ -227,7 +227,7 @@ #define BOOT_ON_FLASH_UPDATE 0x12
#define BOOT_IN_RECOVERY_MODE 0x20
gEmulatorPkgTokenSpaceGuid.PcdEmuBootMode|0
-
+
gEmulatorPkgTokenSpaceGuid.PcdEmuApCount|L"1"
# For a CD-ROM/DVD use L"diag.dmg:RO:2048"
@@ -288,7 +288,7 @@ }
[Components.IA32]
- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+ MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
!endif
[Components]
@@ -314,8 +314,8 @@ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
}
MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
- MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
-
+ MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
+
IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
EmulatorPkg/BootModePei/BootModePei.inf
MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
@@ -342,7 +342,7 @@ MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf {
<LibraryClasses>
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
- SerialPortLib|EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf
+ SerialPortLib|EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf
}
MdeModulePkg/Universal/Metronome/Metronome.inf
@@ -370,17 +370,17 @@ EmbeddedPkg/SerialDxe/SerialDxe.inf {
<LibraryClasses>
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- SerialPortLib|EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.inf
+ SerialPortLib|EmulatorPkg/Library/DxeEmuSerialPortLib/DxeEmuSerialPortLib.inf
}
-
+
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
- MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+ MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
#{
- # <LibraryClasses>
+ # <LibraryClasses>
# NULL|EmulatorPkg/Library/DevicePathTextLib/DevicePathTextLib.inf
#}
-
+
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
diff --git a/EmulatorPkg/Unix/UnixX64.fdf b/EmulatorPkg/Unix/UnixX64.fdf index 2977a9ff7b..0778612f58 100644 --- a/EmulatorPkg/Unix/UnixX64.fdf +++ b/EmulatorPkg/Unix/UnixX64.fdf @@ -28,7 +28,7 @@ ################################################################################
[FD.Fv_Recovery]
#
-# In OS X PEIMs are really XIP, so we need to make this address match the malloced
+# In OS X PEIMs are really XIP, so we need to make this address match the malloced
# buffer for the FD (0x41000000). If this address does not match the FV will get
# relocated in place (works, but not a great idea).
#
@@ -184,7 +184,7 @@ INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf # DXE Phase modules
##
INF MdeModulePkg/Core/Dxe/DxeMain.inf
-INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
INF MdeModulePkg/Universal/Metronome/Metronome.inf
@@ -220,7 +220,7 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf INF IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-INF EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf
+INF EmulatorPkg/EmuBusDriverDxe/EmuBusDriverDxe.inf
INF EmulatorPkg/EmuGopDxe/EmuGopDxe.inf
INF EmulatorPkg/EmuSimpleFileSystemDxe/EmuSimpleFileSystemDxe.inf
INF EmulatorPkg/EmuBlockIoDxe/EmuBlockIoDxe.inf
@@ -229,7 +229,7 @@ INF EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
-INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
INF MdeModulePkg/Application/HelloWorld/HelloWorld.inf
@@ -250,7 +250,7 @@ INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-
+
!if $(BUILD_FAT)
INF FatPkg/EnhancedFatDxe/Fat.inf
!else
@@ -270,22 +270,22 @@ INF RuleOverride = BINARY EdkShellBinPkg/FullShell/FullShell.inf FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
SECTION RAW = MdeModulePkg/Logo/Logo.bmp
}
-
-
+
+
################################################################################
-#
+#
# Rules are use with the [FV] section's module INF type to define
# how an FFS file is created for a given INF file. The following Rule are the default
# rules for the different module type. User can add the customized rules to define the
# content of the FFS file.
-#
+#
################################################################################
-
-
+
+
############################################################################
-# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
+# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
############################################################################
-#
+#
#[Rule.Common.DXE_DRIVER]
# FILE DRIVER = $(NAMED_GUID) {
# DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
@@ -302,24 +302,24 @@ FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) { [Rule.Common.SEC]
FILE SEC = $(NAMED_GUID) {
PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING ="$(MODULE_NAME)" Optional
- VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ UI STRING ="$(MODULE_NAME)" Optional
+ VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}
[Rule.Common.PEI_CORE]
FILE PEI_CORE = $(NAMED_GUID) {
PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING ="$(MODULE_NAME)" Optional
- VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ UI STRING ="$(MODULE_NAME)" Optional
+ VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}
[Rule.Common.PEIM]
FILE PEIM = $(NAMED_GUID) {
PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}
[Rule.Common.DXE_CORE]
|