]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
Fix doxgen format issue.
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / SecPeiCpuException.c
1 /** @file
2 CPU Exception Library provides SEC/PEIM CPU exception handler.
3
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.
9
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.
12
13 **/
14
15 #include <PiPei.h>
16 #include "CpuExceptionCommon.h"
17
18 //
19 // Image Aglinment size for SEC/PEI phase
20 //
21 CONST UINTN mImageAlignSize = 4;
22
23 /**
24 Common exception handler.
25
26 @param ExceptionType Exception type.
27 @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.
28 **/
29 VOID
30 EFIAPI
31 CommonExceptionHandler (
32 IN EFI_EXCEPTION_TYPE ExceptionType,
33 IN EFI_SYSTEM_CONTEXT SystemContext
34 )
35 {
36 //
37 // Display ExceptionType, CPU information and Image information
38 //
39 DumpCpuContent (ExceptionType, SystemContext);
40
41 //
42 // Enter a dead loop.
43 //
44 CpuDeadLoop ();
45 }
46
47 /**
48 Setup CPU exception handlers.
49
50 This API will setups the CPU exception handler to display CPU contents and run into
51 CpuDeadLoop().
52 Note: Before invoking this API, caller must allocate memory for IDT table and load
53 IDTR by AsmWriteIdtr().
54
55 **/
56 VOID
57 EFIAPI
58 SetupCpuExceptionHandlers (
59 IN VOID
60 )
61 {
62 InternalSetupCpuExceptionHandlers ();
63 }