]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Drivers/CpuDxe/CpuDxe.h
Add in commented out hooks for Shell and FatPkg.
[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
2ef2b01e
A
22#include <Library/DebugLib.h>\r
23#include <Library/PcdLib.h>\r
24#include <Library/UefiBootServicesTableLib.h>\r
f659880b
A
25#include <Library/DxeServicesTableLib.h>\r
26#include <Library/CacheMaintenanceLib.h>\r
27#include <Library/PeCoffGetEntryPointLib.h>\r
28#include <Library/UefiLib.h>\r
29#include <Library/CpuLib.h>\r
2ef2b01e 30\r
f659880b 31#include <Guid/DebugImageInfoTable.h>\r
2ef2b01e
A
32#include <Protocol/Cpu.h>\r
33#include <Protocol/DebugSupport.h>\r
34#include <Protocol/DebugSupportPeriodicCallback.h>\r
f659880b
A
35#include <Protocol/VirtualUncachedPages.h>\r
36#include <Protocol/LoadedImage.h>\r
37\r
38\r
39#define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | \\r
40 EFI_MEMORY_WC | \\r
41 EFI_MEMORY_WT | \\r
42 EFI_MEMORY_WB | \\r
43 EFI_MEMORY_UCE \\r
44 )\r
2ef2b01e
A
45\r
46\r
47/**\r
48 This function registers and enables the handler specified by InterruptHandler for a processor \r
49 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
50 handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
51 The installed handler is called once for each processor interrupt or exception.\r
52\r
53 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
54 are enabled and FALSE if interrupts are disabled.\r
55 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
56 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
57 will be uninstalled.\r
58\r
59 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
60 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
61 previously installed.\r
62 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
63 previously installed.\r
64 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
65\r
66**/\r
67EFI_STATUS\r
68RegisterInterruptHandler (\r
69 IN EFI_EXCEPTION_TYPE InterruptType,\r
70 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
71 );\r
72\r
73\r
74/**\r
75 This function registers and enables the handler specified by InterruptHandler for a processor \r
76 interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
77 handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
78 The installed handler is called once for each processor interrupt or exception.\r
79\r
80 @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts\r
81 are enabled and FALSE if interrupts are disabled.\r
82 @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
83 when a processor interrupt occurs. If this parameter is NULL, then the handler\r
84 will be uninstalled.\r
85\r
86 @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.\r
87 @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was\r
88 previously installed.\r
89 @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
90 previously installed.\r
91 @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.\r
92\r
93**/\r
94EFI_STATUS\r
95RegisterDebuggerInterruptHandler (\r
96 IN EFI_EXCEPTION_TYPE InterruptType,\r
97 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
98 );\r
99\r
100\r
f659880b
A
101EFI_STATUS\r
102EFIAPI\r
103CpuSetMemoryAttributes (\r
104 IN EFI_CPU_ARCH_PROTOCOL *This,\r
105 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
106 IN UINT64 Length,\r
107 IN UINT64 Attributes\r
108 );\r
109\r
2ef2b01e
A
110EFI_STATUS\r
111InitializeExceptions (\r
112 IN EFI_CPU_ARCH_PROTOCOL *Cpu\r
113 );\r
114\r
f659880b
A
115EFI_STATUS\r
116SyncCacheConfig (\r
117 IN EFI_CPU_ARCH_PROTOCOL *CpuProtocol\r
118 );\r
119\r
120EFI_STATUS \r
121ConvertSectionToPages (\r
122 IN EFI_PHYSICAL_ADDRESS BaseAddress\r
123 );\r
124\r
125\r
126extern VIRTUAL_UNCACHED_PAGES_PROTOCOL gVirtualUncachedPages;\r
127\r
2ef2b01e 128#endif // __CPU_DXE_ARM_EXCEPTION_H__\r