]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / SecPeiCpuException.c
CommitLineData
8f07f895 1/** @file\r
2 CPU Exception Library provides SEC/PEIM CPU exception handler.\r
3\r
4Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials are licensed and made available under\r
6the terms and conditions of the BSD License that accompanies this distribution.\r
7The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php.\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <PiPei.h>\r
16#include "CpuExceptionCommon.h"\r
17\r
18//\r
19// Image Aglinment size for SEC/PEI phase\r
20//\r
21CONST UINTN mImageAlignSize = 4;\r
22\r
23/**\r
24 Common exception handler.\r
25\r
26 @param ExceptionType Exception type.\r
27 @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.\r
28**/\r
29VOID\r
30EFIAPI\r
31CommonExceptionHandler (\r
32 IN EFI_EXCEPTION_TYPE ExceptionType, \r
33 IN EFI_SYSTEM_CONTEXT SystemContext\r
34 )\r
35{\r
36 //\r
37 // Display ExceptionType, CPU information and Image information\r
38 // \r
39 DumpCpuContent (ExceptionType, SystemContext);\r
40 \r
41 //\r
42 // Enter a dead loop.\r
43 //\r
44 CpuDeadLoop ();\r
45}\r
46\r
47/**\r
48 Setup CPU exception handlers.\r
49\r
50 This API will setups the CPU exception handler to display CPU contents and run into\r
51 CpuDeadLoop(). \r
a9c7ab95 52 Note: Before invoking this API, caller must allocate memory for IDT table and load \r
53 IDTR by AsmWriteIdtr().\r
8f07f895 54 \r
55**/\r
56VOID\r
57EFIAPI\r
58SetupCpuExceptionHandlers (\r
59 IN VOID\r
60 )\r
61{\r
62 InternalSetupCpuExceptionHandlers ();\r
63}\r