]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Library / CpuExceptionHandlerLibNull / CpuExceptionHandlerLibNull.c
... / ...
CommitLineData
1/** @file\r
2 CPU Exception Handler library implementition with empty functions.\r
3\r
4 Copyright (c) 2012 - 2022, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8#include <PiPei.h>\r
9#include <Library/CpuExceptionHandlerLib.h>\r
10\r
11/**\r
12 Initializes all CPU exceptions entries and provides the default exception handlers.\r
13\r
14 Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r
15 persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r
16 If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.\r
17 If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r
18\r
19 @param[in] VectorInfo Pointer to reserved vector list.\r
20\r
21 @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized\r
22 with default exception handlers.\r
23 @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r
24 @retval EFI_UNSUPPORTED This function is not supported.\r
25\r
26**/\r
27EFI_STATUS\r
28EFIAPI\r
29InitializeCpuExceptionHandlers (\r
30 IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL\r
31 )\r
32{\r
33 return EFI_SUCCESS;\r
34}\r
35\r
36/**\r
37 Registers a function to be called from the processor interrupt handler.\r
38\r
39 This function registers and enables the handler specified by InterruptHandler for a processor\r
40 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the\r
41 handler for the processor interrupt or exception type specified by InterruptType is uninstalled.\r
42 The installed handler is called once for each processor interrupt or exception.\r
43 NOTE: This function should be invoked after InitializeCpuExceptionHandlers() is invoked,\r
44 otherwise EFI_UNSUPPORTED returned.\r
45\r
46 @param[in] InterruptType Defines which interrupt or exception to hook.\r
47 @param[in] InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
48 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
49 will be uninstalled.\r
50\r
51 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
52 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
53 previously installed.\r
54 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
55 previously installed.\r
56 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported,\r
57 or this function is not supported.\r
58**/\r
59EFI_STATUS\r
60EFIAPI\r
61RegisterCpuInterruptHandler (\r
62 IN EFI_EXCEPTION_TYPE InterruptType,\r
63 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
64 )\r
65{\r
66 return EFI_UNSUPPORTED;\r
67}\r
68\r
69/**\r
70 Display processor context.\r
71\r
72 @param[in] ExceptionType Exception type.\r
73 @param[in] SystemContext Processor context to be display.\r
74**/\r
75VOID\r
76EFIAPI\r
77DumpCpuContext (\r
78 IN EFI_EXCEPTION_TYPE ExceptionType,\r
79 IN EFI_SYSTEM_CONTEXT SystemContext\r
80 )\r
81{\r
82}\r
83\r
84/**\r
85 Setup separate stacks for certain exception handlers.\r
86 If the input Buffer and BufferSize are both NULL, use global variable if possible.\r
87\r
88 @param[in] Buffer Point to buffer used to separate exception stack.\r
89 @param[in, out] BufferSize On input, it indicates the byte size of Buffer.\r
90 If the size is not enough, the return status will\r
91 be EFI_BUFFER_TOO_SMALL, and output BufferSize\r
92 will be the size it needs.\r
93\r
94 @retval EFI_SUCCESS The stacks are assigned successfully.\r
95 @retval EFI_UNSUPPORTED This function is not supported.\r
96 @retval EFI_BUFFER_TOO_SMALL This BufferSize is too small.\r
97**/\r
98EFI_STATUS\r
99EFIAPI\r
100InitializeSeparateExceptionStacks (\r
101 IN VOID *Buffer,\r
102 IN OUT UINTN *BufferSize\r
103 )\r
104{\r
105 return EFI_UNSUPPORTED;\r
106}\r