]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Drivers/CpuDxe/CpuDxe.h
BeagleBoardPkg: drop unused EmbeddedPkg Pcds
[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
38#include <Protocol/DebugSupportPeriodicCallback.h>\r
f659880b
A
39#include <Protocol/LoadedImage.h>\r
40\r
3b44bb55 41extern BOOLEAN mIsFlushingGCD;\r
f659880b 42\r
2ef2b01e 43/**\r
3402aac7
RC
44 This function registers and enables the handler specified by InterruptHandler for a processor\r
45 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the\r
46 handler for the processor interrupt or exception type specified by InterruptType is uninstalled.\r
2ef2b01e
A
47 The installed handler is called once for each processor interrupt or exception.\r
48\r
49 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
50 are enabled and FALSE if interrupts are disabled.\r
51 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
52 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
53 will be uninstalled.\r
54\r
55 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
56 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
57 previously installed.\r
58 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
59 previously installed.\r
60 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
61\r
62**/\r
63EFI_STATUS\r
64RegisterInterruptHandler (\r
65 IN EFI_EXCEPTION_TYPE InterruptType,\r
66 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
67 );\r
68\r
69\r
70/**\r
3402aac7
RC
71 This function registers and enables the handler specified by InterruptHandler for a processor\r
72 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the\r
73 handler for the processor interrupt or exception type specified by InterruptType is uninstalled.\r
2ef2b01e
A
74 The installed handler is called once for each processor interrupt or exception.\r
75\r
76 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
77 are enabled and FALSE if interrupts are disabled.\r
78 @param 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\r
89**/\r
90EFI_STATUS\r
91RegisterDebuggerInterruptHandler (\r
92 IN EFI_EXCEPTION_TYPE InterruptType,\r
93 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
94 );\r
95\r
96\r
f659880b
A
97EFI_STATUS\r
98EFIAPI\r
99CpuSetMemoryAttributes (\r
100 IN EFI_CPU_ARCH_PROTOCOL *This,\r
101 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
102 IN UINT64 Length,\r
103 IN UINT64 Attributes\r
104 );\r
105\r
2ef2b01e
A
106EFI_STATUS\r
107InitializeExceptions (\r
2ac288f9 108 IN EFI_CPU_ARCH_PROTOCOL *Cpu\r
109 );\r
2ef2b01e 110\r
f659880b
A
111EFI_STATUS\r
112SyncCacheConfig (\r
113 IN EFI_CPU_ARCH_PROTOCOL *CpuProtocol\r
114 );\r
115\r
44788bae 116/**\r
117 * Publish ARM Processor Data table in UEFI SYSTEM Table.\r
118 * @param HobStart Pointer to the beginning of the HOB List from PEI.\r
119 *\r
120 * Description : This function iterates through HOB list and finds ARM processor Table Entry HOB.\r
121 * If the ARM processor Table Entry HOB is found, the HOB data is copied to run-time memory\r
122 * and a pointer is assigned to it in ARM processor table. Then the ARM processor table is\r
123 * installed in EFI configuration table.\r
124**/\r
125VOID\r
126EFIAPI\r
127PublishArmProcessorTable(\r
128 VOID\r
129 );\r
f659880b 130\r
2e969d2e
OM
131// The ARM Attributes might be defined on 64-bit (case of the long format description table)\r
132UINT64\r
133EfiAttributeToArmAttribute (\r
134 IN UINT64 EfiAttributes\r
135 );\r
136\r
137EFI_STATUS\r
138GetMemoryRegion (\r
139 IN OUT UINTN *BaseAddress,\r
140 OUT UINTN *RegionLength,\r
141 OUT UINTN *RegionAttributes\r
142 );\r
143\r
25402f5d
HL
144VOID\r
145GetRootTranslationTableInfo (\r
146 IN UINTN T0SZ,\r
147 OUT UINTN *TableLevel,\r
148 OUT UINTN *TableEntryCount\r
149 );\r
150\r
591fb378
OM
151EFI_STATUS\r
152SetGcdMemorySpaceAttributes (\r
25402f5d 153 IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap,\r
591fb378
OM
154 IN UINTN NumberOfDescriptors,\r
155 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
156 IN UINT64 Length,\r
157 IN UINT64 Attributes\r
158 );\r
159\r
2ef2b01e 160#endif // __CPU_DXE_ARM_EXCEPTION_H__\r