Updating ArmLib.h to add functions needed to turn on paging in CpuDxe. Also added...
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / CpuDxe.h
CommitLineData
2ef2b01e
A
1/** @file\r
2\r
3 Copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\r
4\r
5 All rights reserved. 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_DXE_ARM_EXCEPTION_H__\r
16#define __CPU_DXE_ARM_EXCEPTION_H__\r
17\r
18#include <Uefi.h>\r
19\r
20#include <Library/ArmLib.h>\r
21#include <Library/BaseMemoryLib.h>\r
22#include <Library/CacheMaintenanceLib.h>\r
23#include <Library/DebugLib.h>\r
24#include <Library/PcdLib.h>\r
25#include <Library/UefiBootServicesTableLib.h>\r
26\r
27#include <Protocol/Cpu.h>\r
28#include <Protocol/DebugSupport.h>\r
29#include <Protocol/DebugSupportPeriodicCallback.h>\r
30\r
31\r
32/**\r
33 This function registers and enables the handler specified by InterruptHandler for a processor \r
34 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
35 handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
36 The installed handler is called once for each processor interrupt or exception.\r
37\r
38 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
39 are enabled and FALSE if interrupts are disabled.\r
40 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
41 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
42 will be uninstalled.\r
43\r
44 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
45 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
46 previously installed.\r
47 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
48 previously installed.\r
49 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
50\r
51**/\r
52EFI_STATUS\r
53RegisterInterruptHandler (\r
54 IN EFI_EXCEPTION_TYPE InterruptType,\r
55 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
56 );\r
57\r
58\r
59/**\r
60 This function registers and enables the handler specified by InterruptHandler for a processor \r
61 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
62 handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
63 The installed handler is called once for each processor interrupt or exception.\r
64\r
65 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
66 are enabled and FALSE if interrupts are disabled.\r
67 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
68 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
69 will be uninstalled.\r
70\r
71 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
72 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
73 previously installed.\r
74 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
75 previously installed.\r
76 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
77\r
78**/\r
79EFI_STATUS\r
80RegisterDebuggerInterruptHandler (\r
81 IN EFI_EXCEPTION_TYPE InterruptType,\r
82 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
83 );\r
84\r
85\r
86EFI_STATUS\r
87InitializeExceptions (\r
88 IN EFI_CPU_ARCH_PROTOCOL *Cpu\r
89 );\r
90\r
91#endif // __CPU_DXE_ARM_EXCEPTION_H__\r