UefiCpuPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the UefiCpuPkg 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
91415a36ae
commit
053e878bfb
@@ -13,11 +13,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
||||
CONST UINTN mDoFarReturnFlag = 0;
|
||||
CONST UINTN mDoFarReturnFlag = 0;
|
||||
|
||||
typedef struct {
|
||||
UINT8 ExceptionStubHeader[HOOKAFTER_STUB_SIZE];
|
||||
EXCEPTION_HANDLER_DATA *ExceptionHandlerData;
|
||||
UINT8 ExceptionStubHeader[HOOKAFTER_STUB_SIZE];
|
||||
EXCEPTION_HANDLER_DATA *ExceptionHandlerData;
|
||||
} EXCEPTION0_STUB_HEADER;
|
||||
|
||||
/**
|
||||
@@ -34,9 +34,9 @@ GetExceptionHandlerData (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
IA32_DESCRIPTOR IdtDescriptor;
|
||||
IA32_IDT_GATE_DESCRIPTOR *IdtTable;
|
||||
EXCEPTION0_STUB_HEADER *Exception0StubHeader;
|
||||
IA32_DESCRIPTOR IdtDescriptor;
|
||||
IA32_IDT_GATE_DESCRIPTOR *IdtTable;
|
||||
EXCEPTION0_STUB_HEADER *Exception0StubHeader;
|
||||
|
||||
AsmReadIdtr (&IdtDescriptor);
|
||||
IdtTable = (IA32_IDT_GATE_DESCRIPTOR *)IdtDescriptor.Base;
|
||||
@@ -56,12 +56,13 @@ GetExceptionHandlerData (
|
||||
**/
|
||||
VOID
|
||||
SetExceptionHandlerData (
|
||||
IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
|
||||
IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData
|
||||
)
|
||||
{
|
||||
EXCEPTION0_STUB_HEADER *Exception0StubHeader;
|
||||
IA32_DESCRIPTOR IdtDescriptor;
|
||||
IA32_IDT_GATE_DESCRIPTOR *IdtTable;
|
||||
EXCEPTION0_STUB_HEADER *Exception0StubHeader;
|
||||
IA32_DESCRIPTOR IdtDescriptor;
|
||||
IA32_IDT_GATE_DESCRIPTOR *IdtTable;
|
||||
|
||||
//
|
||||
// Duplicate the exception #0 stub header in pool and cache the ExceptionHandlerData just after the stub header.
|
||||
// So AP can get the ExceptionHandlerData by reading the IDT[0].
|
||||
@@ -89,8 +90,8 @@ SetExceptionHandlerData (
|
||||
VOID
|
||||
EFIAPI
|
||||
CommonExceptionHandler (
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
EXCEPTION_HANDLER_DATA *ExceptionHandlerData;
|
||||
@@ -120,12 +121,12 @@ CommonExceptionHandler (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeCpuExceptionHandlers (
|
||||
IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
|
||||
IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EXCEPTION_HANDLER_DATA *ExceptionHandlerData;
|
||||
RESERVED_VECTORS_DATA *ReservedVectors;
|
||||
EFI_STATUS Status;
|
||||
EXCEPTION_HANDLER_DATA *ExceptionHandlerData;
|
||||
RESERVED_VECTORS_DATA *ReservedVectors;
|
||||
|
||||
ReservedVectors = AllocatePool (sizeof (RESERVED_VECTORS_DATA) * CPU_EXCEPTION_NUM);
|
||||
ASSERT (ReservedVectors != NULL);
|
||||
@@ -166,7 +167,7 @@ InitializeCpuExceptionHandlers (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeCpuInterruptHandlers (
|
||||
IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
|
||||
IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -198,8 +199,8 @@ InitializeCpuInterruptHandlers (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RegisterCpuInterruptHandler (
|
||||
IN EFI_EXCEPTION_TYPE InterruptType,
|
||||
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
|
||||
IN EFI_EXCEPTION_TYPE InterruptType,
|
||||
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -230,11 +231,11 @@ RegisterCpuInterruptHandler (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeCpuExceptionHandlersEx (
|
||||
IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,
|
||||
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL
|
||||
IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,
|
||||
IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// To avoid repeat initialization of default handlers, the caller should pass
|
||||
@@ -243,7 +244,7 @@ InitializeCpuExceptionHandlersEx (
|
||||
// version instead; or this method must be implemented as a simple wrapper of
|
||||
// non-ex version of it, if this version has to be called.
|
||||
//
|
||||
if (InitData == NULL || InitData->Ia32.InitDefaultHandlers) {
|
||||
if ((InitData == NULL) || InitData->Ia32.InitDefaultHandlers) {
|
||||
Status = InitializeCpuExceptionHandlers (VectorInfo);
|
||||
} else {
|
||||
Status = EFI_SUCCESS;
|
||||
@@ -253,10 +254,10 @@ InitializeCpuExceptionHandlersEx (
|
||||
//
|
||||
// Initializing stack switch is only necessary for Stack Guard functionality.
|
||||
//
|
||||
if (PcdGetBool (PcdCpuStackGuard) && InitData != NULL) {
|
||||
if (PcdGetBool (PcdCpuStackGuard) && (InitData != NULL)) {
|
||||
Status = ArchSetupExceptionStack (InitData);
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
return Status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user