Clean up gEfiHotPlugDeviceGuid in ConPlatformDxe.
[edk2.git] / Nt32Pkg / CpuRuntimeDxe / CpuDriver.h
blob33d9c0d3827d37b83c400e236a0786f7d1e050ec
1 /**@file
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. 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
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.
12 Module Name:
14 CpuDriver.h
16 Abstract:
18 NT Emulation Architectural Protocol Driver as defined in Tiano.
20 **/
22 #ifndef _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_
23 #define _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_
26 #include <FrameworkDxe.h>
27 #include <Protocol/Cpu.h>
28 #include <Protocol/DataHub.h>
29 #include <Protocol/FrameworkHii.h>
30 #include <Guid/DataHubRecords.h>
31 #include <Guid/DataHubProducer.h>
32 #include <Protocol/CpuIo.h>
33 #include <Protocol/WinNtIo.h>
34 #include <Library/BaseLib.h>
35 #include <Library/DebugLib.h>
36 #include <Library/FrameworkHiiLib.h>
37 #include <Library/UefiDriverEntryPoint.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/MemoryAllocationLib.h>
40 #include <Library/UefiBootServicesTableLib.h>
41 #include <Library/PcdLib.h>
44 extern UINT8 CpuStrings[];
47 // Internal Data Structures
49 #define CPU_ARCH_PROT_PRIVATE_SIGNATURE SIGNATURE_32 ('c', 'a', 'p', 'd')
51 typedef struct {
52 UINTN Signature;
53 EFI_HANDLE Handle;
55 EFI_CPU_ARCH_PROTOCOL Cpu;
56 EFI_CPU_IO_PROTOCOL CpuIo;
59 // Local Data for CPU interface goes here
61 CRITICAL_SECTION NtCriticalSection;
62 BOOLEAN InterruptState;
64 } CPU_ARCH_PROTOCOL_PRIVATE;
66 #define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \
67 CR (a, \
68 CPU_ARCH_PROTOCOL_PRIVATE, \
69 Cpu, \
70 CPU_ARCH_PROT_PRIVATE_SIGNATURE \
73 EFI_STATUS
74 EFIAPI
75 CpuMemoryServiceRead (
76 IN EFI_CPU_IO_PROTOCOL *This,
77 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
78 IN UINT64 Address,
79 IN UINTN Count,
80 IN OUT VOID *Buffer
83 EFI_STATUS
84 EFIAPI
85 CpuMemoryServiceWrite (
86 IN EFI_CPU_IO_PROTOCOL *This,
87 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
88 IN UINT64 Address,
89 IN UINTN Count,
90 IN OUT VOID *Buffer
93 EFI_STATUS
94 EFIAPI
95 CpuIoServiceRead (
96 IN EFI_CPU_IO_PROTOCOL *This,
97 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
98 IN UINT64 UserAddress,
99 IN UINTN Count,
100 IN OUT VOID *UserBuffer
103 EFI_STATUS
104 EFIAPI
105 CpuIoServiceWrite (
106 IN EFI_CPU_IO_PROTOCOL *This,
107 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
108 IN UINT64 UserAddress,
109 IN UINTN Count,
110 IN OUT VOID *UserBuffer
114 EFI_STATUS
115 EFIAPI
116 InitializeCpu (
117 IN EFI_HANDLE ImageHandle,
118 IN EFI_SYSTEM_TABLE *SystemTable
121 EFI_STATUS
122 EFIAPI
123 WinNtFlushCpuDataCache (
124 IN EFI_CPU_ARCH_PROTOCOL *This,
125 IN EFI_PHYSICAL_ADDRESS Start,
126 IN UINT64 Length,
127 IN EFI_CPU_FLUSH_TYPE FlushType
130 EFI_STATUS
131 EFIAPI
132 WinNtEnableInterrupt (
133 IN EFI_CPU_ARCH_PROTOCOL *This
136 EFI_STATUS
137 EFIAPI
138 WinNtDisableInterrupt (
139 IN EFI_CPU_ARCH_PROTOCOL *This
142 EFI_STATUS
143 EFIAPI
144 WinNtGetInterruptState (
145 IN EFI_CPU_ARCH_PROTOCOL *This,
146 OUT BOOLEAN *State
149 EFI_STATUS
150 EFIAPI
151 WinNtInit (
152 IN EFI_CPU_ARCH_PROTOCOL *This,
153 IN EFI_CPU_INIT_TYPE InitType
156 EFI_STATUS
157 EFIAPI
158 WinNtRegisterInterruptHandler (
159 IN EFI_CPU_ARCH_PROTOCOL *This,
160 IN EFI_EXCEPTION_TYPE InterruptType,
161 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
164 EFI_STATUS
165 EFIAPI
166 WinNtGetTimerValue (
167 IN EFI_CPU_ARCH_PROTOCOL *This,
168 IN UINT32 TimerIndex,
169 OUT UINT64 *TimerValue,
170 OUT UINT64 *TimerPeriod OPTIONAL
173 EFI_STATUS
174 EFIAPI
175 WinNtSetMemoryAttributes (
176 IN EFI_CPU_ARCH_PROTOCOL *This,
177 IN EFI_PHYSICAL_ADDRESS BaseAddress,
178 IN UINT64 Length,
179 IN UINT64 Attributes
187 #endif