summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/Sec
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:57 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commita550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97 (patch)
tree16ea0a059e01bb8af07f41dcea5996424c309a95 /EmulatorPkg/Sec
parente7108d0e9655b1795c94ac372b0449f28dd907df (diff)
downloadedk2-a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97.tar.gz
edk2-a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97.tar.bz2
edk2-a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97.zip
EmulatorPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmulatorPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'EmulatorPkg/Sec')
-rw-r--r--EmulatorPkg/Sec/Ia32/TempRam.c21
-rw-r--r--EmulatorPkg/Sec/Sec.c25
-rw-r--r--EmulatorPkg/Sec/Sec.h12
3 files changed, 24 insertions, 34 deletions
diff --git a/EmulatorPkg/Sec/Ia32/TempRam.c b/EmulatorPkg/Sec/Ia32/TempRam.c
index e8b0d53bb1..13c32b9ca1 100644
--- a/EmulatorPkg/Sec/Ia32/TempRam.c
+++ b/EmulatorPkg/Sec/Ia32/TempRam.c
@@ -15,26 +15,25 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
VOID
EFIAPI
SecSwitchStack (
- UINT32 TemporaryMemoryBase,
- UINT32 PermenentMemoryBase
+ UINT32 TemporaryMemoryBase,
+ UINT32 PermenentMemoryBase
);
-
EFI_STATUS
EFIAPI
SecTemporaryRamSupport (
- IN CONST EFI_PEI_SERVICES **PeiServices,
- IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
- IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
- IN UINTN CopySize
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
+ IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
+ IN UINTN CopySize
)
{
//
// Migrate the whole temporary memory to permanent memory.
//
CopyMem (
- (VOID*)(UINTN)PermanentMemoryBase,
- (VOID*)(UINTN)TemporaryMemoryBase,
+ (VOID *)(UINTN)PermanentMemoryBase,
+ (VOID *)(UINTN)TemporaryMemoryBase,
CopySize
);
@@ -43,7 +42,7 @@ SecTemporaryRamSupport (
// immediately, also we need fixup the stack change caused by new call into
// permanent memory.
//
- SecSwitchStack ((UINT32) TemporaryMemoryBase, (UINT32) PermanentMemoryBase);
+ SecSwitchStack ((UINT32)TemporaryMemoryBase, (UINT32)PermanentMemoryBase);
//
// We need *not* fix the return address because currently,
@@ -53,7 +52,7 @@ SecTemporaryRamSupport (
//
// Simulate to invalid temporary memory, terminate temporary memory
//
- //ZeroMem ((VOID*)(UINTN)TemporaryMemoryBase, CopySize);
+ // ZeroMem ((VOID*)(UINTN)TemporaryMemoryBase, CopySize);
return EFI_SUCCESS;
}
diff --git a/EmulatorPkg/Sec/Sec.c b/EmulatorPkg/Sec/Sec.c
index e1bee4f6b4..3d792adc94 100644
--- a/EmulatorPkg/Sec/Sec.c
+++ b/EmulatorPkg/Sec/Sec.c
@@ -10,13 +10,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "Sec.h"
-
-
-EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = {
+EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = {
SecTemporaryRamSupport
};
-
EFI_PEI_PPI_DESCRIPTOR gPrivateDispatchTable[] = {
{
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
@@ -25,8 +22,6 @@ 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
@@ -62,8 +57,8 @@ EFI_PEI_PPI_DESCRIPTOR gPrivateDispatchTable[] = {
VOID
EFIAPI
_ModuleEntryPoint (
- IN EFI_SEC_PEI_HAND_OFF *SecCoreData,
- IN EFI_PEI_PPI_DESCRIPTOR *PpiList
+ IN EFI_SEC_PEI_HAND_OFF *SecCoreData,
+ IN EFI_PEI_PPI_DESCRIPTOR *PpiList
)
{
EFI_STATUS Status;
@@ -77,7 +72,7 @@ _ModuleEntryPoint (
UINTN Index;
EFI_PEI_PPI_DESCRIPTOR PpiArray[10];
- EMU_MAGIC_PAGE()->PpiList = PpiList;
+ EMU_MAGIC_PAGE ()->PpiList = PpiList;
ProcessLibraryConstructorList ();
DEBUG ((DEBUG_ERROR, "SEC Has Started\n"));
@@ -99,12 +94,12 @@ _ModuleEntryPoint (
// Keep everything on a good alignment
SecReseveredMemorySize = ALIGN_VALUE (SecReseveredMemorySize, CPU_STACK_ALIGNMENT);
-#if 0
+ #if 0
// Tell the PEI Core to not use our buffer in temp RAM
- SecPpiList = (EFI_PEI_PPI_DESCRIPTOR *)SecCoreData->PeiTemporaryRamBase;
- SecCoreData->PeiTemporaryRamBase = (VOID *)((UINTN)SecCoreData->PeiTemporaryRamBase + SecReseveredMemorySize);
+ SecPpiList = (EFI_PEI_PPI_DESCRIPTOR *)SecCoreData->PeiTemporaryRamBase;
+ SecCoreData->PeiTemporaryRamBase = (VOID *)((UINTN)SecCoreData->PeiTemporaryRamBase + SecReseveredMemorySize);
SecCoreData->PeiTemporaryRamSize -= SecReseveredMemorySize;
-#else
+ #else
//
// When I subtrack from SecCoreData->PeiTemporaryRamBase PEI Core crashes? Either there is a bug
// or I don't understand temp RAM correctly?
@@ -112,7 +107,7 @@ _ModuleEntryPoint (
SecPpiList = &PpiArray[0];
ASSERT (sizeof (PpiArray) >= SecReseveredMemorySize);
-#endif
+ #endif
// Copy existing list, and append our entries.
CopyMem (SecPpiList, PpiList, sizeof (EFI_PEI_PPI_DESCRIPTOR) * Index);
CopyMem (&SecPpiList[Index], gPrivateDispatchTable, sizeof (gPrivateDispatchTable));
@@ -120,7 +115,7 @@ _ModuleEntryPoint (
// Find PEI Core and transfer control
VolumeHandle = (EFI_PEI_FV_HANDLE)(UINTN)SecCoreData->BootFirmwareVolumeBase;
FileHandle = NULL;
- Status = PeiServicesFfsFindNextFile (EFI_FV_FILETYPE_PEI_CORE, VolumeHandle, &FileHandle);
+ Status = PeiServicesFfsFindNextFile (EFI_FV_FILETYPE_PEI_CORE, VolumeHandle, &FileHandle);
ASSERT_EFI_ERROR (Status);
Status = PeiServicesFfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);
diff --git a/EmulatorPkg/Sec/Sec.h b/EmulatorPkg/Sec/Sec.h
index 42554e05b5..29272a29ff 100644
--- a/EmulatorPkg/Sec/Sec.h
+++ b/EmulatorPkg/Sec/Sec.h
@@ -11,7 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __SEC_H___
#define __SEC_H___
-
#include <PiPei.h>
#include <Library/EmuMagicPageLib.h>
#include <Library/DebugLib.h>
@@ -21,7 +20,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Ppi/TemporaryRamSupport.h>
-
//
// I think this should be defined in a MdePkg include file?
//
@@ -34,12 +32,10 @@ ProcessLibraryConstructorList (
EFI_STATUS
EFIAPI
SecTemporaryRamSupport (
- IN CONST EFI_PEI_SERVICES **PeiServices,
- IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
- IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
- IN UINTN CopySize
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
+ IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
+ IN UINTN CopySize
);
-
#endif
-