]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
Fix doxgen format issue.
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / CpuExceptionCommon.h
CommitLineData
8f07f895 1/** @file\r
2 Common header file for CPU Exception Handler Library.\r
3\r
4 Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _CPU_EXCEPTION_COMMON_H_\r
16#define _CPU_EXCEPTION_COMMON_H_\r
17\r
18#include <Library/BaseLib.h>\r
19#include <Library/SerialPortLib.h>\r
20#include <Library/PrintLib.h>\r
21#include <Library/LocalApicLib.h>\r
22#include <Library/PeCoffGetEntryPointLib.h>\r
23\r
24#define CPU_EXCEPTION_NUM 32\r
25//\r
26// Record exception handler information\r
27//\r
28typedef struct {\r
29 UINTN ExceptionStart;\r
30 UINTN ExceptionStubHeaderSize;\r
31} EXCEPTION_HANDLER_TEMPLATE_MAP;\r
32\r
33extern UINT32 mErrorCodeFlag;\r
34extern CONST UINTN mImageAlignSize;\r
35\r
36/**\r
37 Return address map of exception handler template so that C code can generate\r
38 exception tables.\r
39\r
40 @param AddressMap Pointer to a buffer where the address map is returned.\r
41**/\r
42VOID\r
43EFIAPI\r
44GetTemplateAddressMap (\r
45 OUT EXCEPTION_HANDLER_TEMPLATE_MAP *AddressMap\r
46 );\r
47\r
48/**\r
49 Internal function to setup CPU exception handlers.\r
50\r
51**/\r
52VOID\r
53InternalSetupCpuExceptionHandlers (\r
54 VOID\r
55 );\r
56\r
57/**\r
58 Prints a message to the serial port.\r
59\r
60 @param Format Format string for the message to print.\r
61 @param ... Variable argument list whose contents are accessed \r
62 based on the format string specified by Format.\r
63\r
64**/\r
65VOID\r
66EFIAPI\r
67InternalPrintMessage (\r
68 IN CONST CHAR8 *Format,\r
69 ...\r
70 );\r
71\r
72/**\r
73 Find and display image base address and return image base and its entry point.\r
74 \r
a9c7ab95 75 @param CurrentEip Current instruction pointer.\r
76 @param EntryPoint Return module entry point if module header is found.\r
77 \r
78 @return !0 Image base address.\r
79 @return 0 Image header cannot be found.\r
8f07f895 80**/\r
81UINTN \r
82FindModuleImageBase (\r
83 IN UINTN CurrentEip,\r
84 OUT UINTN *EntryPoint\r
85 );\r
86\r
87/**\r
88 Display CPU information.\r
89\r
90 @param InterruptType Exception type.\r
91 @param SystemContext Pointer to EFI_SYSTEM_CONTEXT.\r
92**/\r
93VOID\r
94DumpCpuContent (\r
95 IN UINTN InterruptType,\r
96 IN EFI_SYSTEM_CONTEXT SystemContext\r
97 );\r
98\r
99#endif\r