]> git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/CpuDxe/CpuDxe.h
Update the copyright notice format
[mirror_edk2.git] / DuetPkg / CpuDxe / CpuDxe.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13 CpuDxe.h
14
15 Abstract:
16
17 --*/
18 #ifndef _CPU_DXE_H
19 #define _CPU_DXE_H
20
21 #include <FrameworkDxe.h>
22
23 #include <Protocol/Cpu.h>
24 #include <Protocol/Legacy8259.h>
25
26 #include <Protocol/LegacyBios.h>
27
28
29 #include <Library/BaseLib.h>
30 #include <Library/BaseMemoryLib.h>
31 #include <Library/DebugLib.h>
32 #include <Library/PrintLib.h>
33 #include <Library/UefiBootServicesTableLib.h>
34
35 #define CPU_EXCEPTION_DEBUG_OUTPUT 1
36 #define CPU_EXCEPTION_VGA_SWITCH 0
37
38 #define INTERRUPT_VECTOR_NUMBER 0x100
39
40 //
41 // Print primitives
42 //
43 //#define LEFT_JUSTIFY 0x01
44 #define PREFIX_SIGN 0x02
45 #define PREFIX_BLANK 0x04
46 //#define COMMA_TYPE 0x08
47 #define LONG_TYPE 0x10
48 //#define PREFIX_ZERO 0x20
49 #define OUTPUT_UNICODE 0x40
50 //#define RADIX_HEX 0x80
51 #define FORMAT_UNICODE 0x100
52 #define PAD_TO_WIDTH 0x200
53 #define ARGUMENT_UNICODE 0x400
54 #define PRECISION 0x800
55 #define ARGUMENT_REVERSED 0x1000
56
57 //
58 // Function declarations
59 //
60 EFI_STATUS
61 EFIAPI
62 InitializeCpu (
63 IN EFI_HANDLE ImageHandle,
64 IN EFI_SYSTEM_TABLE *SystemTable
65 );
66
67 EFI_STATUS
68 EFIAPI
69 CpuFlushCpuDataCache (
70 IN EFI_CPU_ARCH_PROTOCOL *This,
71 IN EFI_PHYSICAL_ADDRESS Start,
72 IN UINT64 Length,
73 IN EFI_CPU_FLUSH_TYPE FlushType
74 );
75
76 EFI_STATUS
77 EFIAPI
78 CpuEnableInterrupt (
79 IN EFI_CPU_ARCH_PROTOCOL *This
80 );
81
82 EFI_STATUS
83 EFIAPI
84 CpuDisableInterrupt (
85 IN EFI_CPU_ARCH_PROTOCOL *This
86 );
87
88 EFI_STATUS
89 EFIAPI
90 CpuGetInterruptState (
91 IN EFI_CPU_ARCH_PROTOCOL *This,
92 OUT BOOLEAN *State
93 );
94
95 EFI_STATUS
96 EFIAPI
97 CpuInit (
98 IN EFI_CPU_ARCH_PROTOCOL *This,
99 IN EFI_CPU_INIT_TYPE InitType
100 );
101
102 EFI_STATUS
103 EFIAPI
104 CpuRegisterInterruptHandler (
105 IN EFI_CPU_ARCH_PROTOCOL *This,
106 IN EFI_EXCEPTION_TYPE InterruptType,
107 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
108 );
109
110 EFI_STATUS
111 EFIAPI
112 CpuGetTimerValue (
113 IN EFI_CPU_ARCH_PROTOCOL *This,
114 IN UINT32 TimerIndex,
115 OUT UINT64 *TimerValue,
116 OUT UINT64 *TimerPeriod OPTIONAL
117 );
118
119 EFI_STATUS
120 EFIAPI
121 CpuSetMemoryAttributes(
122 IN EFI_CPU_ARCH_PROTOCOL *This,
123 IN EFI_PHYSICAL_ADDRESS BaseAddress,
124 IN UINT64 Length,
125 IN UINT64 Attributes
126 );
127
128 VOID
129 InstallInterruptHandler (
130 UINTN Vector,
131 VOID (*Handler)(VOID)
132 );
133
134 VOID
135 SystemExceptionHandler (
136 VOID
137 );
138
139 VOID
140 SystemTimerHandler (
141 VOID
142 );
143
144 VOID
145 InitDescriptor (
146 VOID
147 );
148
149 #endif