2 CPU Exception Library provides SEC/PEIM CPU exception handler.
4 Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "CpuExceptionCommon.h"
19 // Image Aglinment size for SEC/PEI phase
21 CONST UINTN mImageAlignSize
= 4;
24 Common exception handler.
26 @param ExceptionType Exception type.
27 @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
31 CommonExceptionHandler (
32 IN EFI_EXCEPTION_TYPE ExceptionType
,
33 IN EFI_SYSTEM_CONTEXT SystemContext
37 // Display ExceptionType, CPU information and Image information
39 DumpCpuContent (ExceptionType
, SystemContext
);
48 Setup CPU exception handlers.
50 This API will setups the CPU exception handler to display CPU contents and run into
52 @Note: Before invoking this API, caller must allocate memory for IDT table and load
53 IDTR by AsmWriteIdtr().
58 SetupCpuExceptionHandlers (
62 InternalSetupCpuExceptionHandlers ();