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>
This commit is contained in:
committed by
mergify[bot]
parent
e7108d0e96
commit
a550d468a6
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user