]>
Commit | Line | Data |
---|---|---|
1e172d6b | 1 | /** @file\r |
2 | CPU Exception Handler library implementition with empty functions.\r | |
3 | \r | |
57f360f2 | 4 | Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR>\r |
1e172d6b | 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 | |
57f360f2 JF |
14 | #include <PiPei.h>\r |
15 | #include <Library/CpuExceptionHandlerLib.h>\r | |
1e172d6b | 16 | \r |
57f360f2 JF |
17 | /**\r |
18 | Initializes all CPU exceptions entries and provides the default exception handlers.\r | |
19 | \r | |
20 | Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r | |
21 | persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r | |
22 | If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. \r | |
23 | If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r | |
24 | \r | |
25 | @param[in] VectorInfo Pointer to reserved vector list.\r | |
26 | \r | |
27 | @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized \r | |
28 | with default exception handlers.\r | |
29 | @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r | |
30 | @retval EFI_UNSUPPORTED This function is not supported.\r | |
31 | \r | |
32 | **/\r | |
33 | EFI_STATUS\r | |
34 | EFIAPI\r | |
35 | InitializeCpuExceptionHandlers (\r | |
36 | IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL\r | |
37 | )\r | |
38 | {\r | |
39 | return EFI_SUCCESS;\r | |
40 | }\r | |
1e172d6b | 41 | \r |
42 | /**\r | |
57f360f2 JF |
43 | Initializes all CPU interrupt/exceptions entries and provides the default interrupt/exception handlers.\r |
44 | \r | |
45 | Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r | |
46 | persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r | |
47 | If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. \r | |
48 | If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r | |
49 | \r | |
50 | @param[in] VectorInfo Pointer to reserved vector list.\r | |
51 | \r | |
52 | @retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized \r | |
53 | with default interrupt/exception handlers.\r | |
54 | @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r | |
55 | @retval EFI_UNSUPPORTED This function is not supported.\r | |
56 | \r | |
1e172d6b | 57 | **/\r |
57f360f2 JF |
58 | EFI_STATUS\r |
59 | EFIAPI\r | |
60 | InitializeCpuInterruptHandlers (\r | |
61 | IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL\r | |
62 | )\r | |
63 | {\r | |
64 | return EFI_SUCCESS;\r | |
65 | }\r | |
66 | \r | |
67 | /**\r | |
68 | Registers a function to be called from the processor interrupt handler.\r | |
69 | \r | |
70 | This function registers and enables the handler specified by InterruptHandler for a processor \r | |
71 | interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r | |
72 | handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r | |
73 | The installed handler is called once for each processor interrupt or exception.\r | |
74 | NOTE: This function should be invoked after InitializeCpuExceptionHandlers() or\r | |
75 | InitializeCpuInterruptHandlers() invoked, otherwise EFI_UNSUPPORTED returned.\r | |
76 | \r | |
77 | @param[in] InterruptType Defines which interrupt or exception to hook.\r | |
78 | @param[in] InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r | |
79 | when a processor interrupt occurs. If this parameter is NULL, then the handler\r | |
80 | will be uninstalled.\r | |
81 | \r | |
82 | @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r | |
83 | @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r | |
84 | previously installed.\r | |
85 | @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r | |
86 | previously installed.\r | |
87 | @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported,\r | |
88 | or this function is not supported.\r | |
3f25e6ea | 89 | **/\r |
57f360f2 | 90 | EFI_STATUS\r |
1e172d6b | 91 | EFIAPI\r |
57f360f2 JF |
92 | RegisterCpuInterruptHandler (\r |
93 | IN EFI_EXCEPTION_TYPE InterruptType,\r | |
94 | IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r | |
1e172d6b | 95 | )\r |
57f360f2 JF |
96 | {\r |
97 | return EFI_SUCCESS;\r | |
1e172d6b | 98 | }\r |
99 | \r |