]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Drivers/CpuDxe/CpuDxe.h
ArmPkg: delete references to unused guids/Pcds from CpuDxe
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / CpuDxe.h
CommitLineData
2ef2b01e
A
1/** @file\r
2\r
d6ebcab7 3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
591fb378 4 Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
2ef2b01e 5\r
d6ebcab7 6 This program and the accompanying materials\r
2ef2b01e
A
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __CPU_DXE_ARM_EXCEPTION_H__\r
17#define __CPU_DXE_ARM_EXCEPTION_H__\r
18\r
19#include <Uefi.h>\r
20\r
21#include <Library/ArmLib.h>\r
521f3ced 22#include <Library/ArmMmuLib.h>\r
2ef2b01e 23#include <Library/BaseMemoryLib.h>\r
2ef2b01e
A
24#include <Library/DebugLib.h>\r
25#include <Library/PcdLib.h>\r
26#include <Library/UefiBootServicesTableLib.h>\r
f659880b
A
27#include <Library/DxeServicesTableLib.h>\r
28#include <Library/CacheMaintenanceLib.h>\r
29#include <Library/PeCoffGetEntryPointLib.h>\r
30#include <Library/UefiLib.h>\r
31#include <Library/CpuLib.h>\r
6f72e28d 32#include <Library/DefaultExceptionHandlerLib.h>\r
eeb78924 33#include <Library/DebugLib.h>\r
2ef2b01e 34\r
f659880b 35#include <Guid/DebugImageInfoTable.h>\r
2ef2b01e
A
36#include <Protocol/Cpu.h>\r
37#include <Protocol/DebugSupport.h>\r
f659880b
A
38#include <Protocol/LoadedImage.h>\r
39\r
3b44bb55 40extern BOOLEAN mIsFlushingGCD;\r
f659880b 41\r
2ef2b01e 42/**\r
3402aac7
RC
43 This function registers and enables the handler specified by InterruptHandler for a processor\r
44 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the\r
45 handler for the processor interrupt or exception type specified by InterruptType is uninstalled.\r
2ef2b01e
A
46 The installed handler is called once for each processor interrupt or exception.\r
47\r
48 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
49 are enabled and FALSE if interrupts are disabled.\r
50 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
51 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
52 will be uninstalled.\r
53\r
54 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
55 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
56 previously installed.\r
57 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
58 previously installed.\r
59 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
60\r
61**/\r
62EFI_STATUS\r
63RegisterInterruptHandler (\r
64 IN EFI_EXCEPTION_TYPE InterruptType,\r
65 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
66 );\r
67\r
68\r
69/**\r
3402aac7
RC
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
2ef2b01e
A
73 The installed handler is called once for each processor interrupt or exception.\r
74\r
75 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
76 are enabled and FALSE if interrupts are disabled.\r
77 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
78 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
79 will be uninstalled.\r
80\r
81 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
82 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
83 previously installed.\r
84 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
85 previously installed.\r
86 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
87\r
88**/\r
89EFI_STATUS\r
90RegisterDebuggerInterruptHandler (\r
91 IN EFI_EXCEPTION_TYPE InterruptType,\r
92 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
93 );\r
94\r
95\r
f659880b
A
96EFI_STATUS\r
97EFIAPI\r
98CpuSetMemoryAttributes (\r
99 IN EFI_CPU_ARCH_PROTOCOL *This,\r
100 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
101 IN UINT64 Length,\r
102 IN UINT64 Attributes\r
103 );\r
104\r
2ef2b01e
A
105EFI_STATUS\r
106InitializeExceptions (\r
2ac288f9 107 IN EFI_CPU_ARCH_PROTOCOL *Cpu\r
108 );\r
2ef2b01e 109\r
f659880b
A
110EFI_STATUS\r
111SyncCacheConfig (\r
112 IN EFI_CPU_ARCH_PROTOCOL *CpuProtocol\r
113 );\r
114\r
44788bae 115/**\r
116 * Publish ARM Processor Data table in UEFI SYSTEM Table.\r
117 * @param HobStart Pointer to the beginning of the HOB List from PEI.\r
118 *\r
119 * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB.\r
120 * If the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory\r
121 * and a pointer is assigned to it in ARM processor table. Then the ARM processor table is\r
122 * installed in EFI configuration table.\r
123**/\r
124VOID\r
125EFIAPI\r
126PublishArmProcessorTable(\r
127 VOID\r
128 );\r
f659880b 129\r
2e969d2e
OM
130// The ARM Attributes might be defined on 64-bit (case of the long format description table)\r
131UINT64\r
132EfiAttributeToArmAttribute (\r
133 IN UINT64 EfiAttributes\r
134 );\r
135\r
136EFI_STATUS\r
137GetMemoryRegion (\r
138 IN OUT UINTN *BaseAddress,\r
139 OUT UINTN *RegionLength,\r
140 OUT UINTN *RegionAttributes\r
141 );\r
142\r
25402f5d
HL
143VOID\r
144GetRootTranslationTableInfo (\r
145 IN UINTN T0SZ,\r
146 OUT UINTN *TableLevel,\r
147 OUT UINTN *TableEntryCount\r
148 );\r
149\r
591fb378
OM
150EFI_STATUS\r
151SetGcdMemorySpaceAttributes (\r
25402f5d 152 IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap,\r
591fb378
OM
153 IN UINTN NumberOfDescriptors,\r
154 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
155 IN UINT64 Length,\r
156 IN UINT64 Attributes\r
157 );\r
158\r
2ef2b01e 159#endif // __CPU_DXE_ARM_EXCEPTION_H__\r