3 Copyright (c) 2006 - 2011, 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
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.
18 NT Emulation Architectural Protocol Driver as defined in Tiano.
22 #ifndef _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_
23 #define _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_
26 #include <FrameworkDxe.h>
27 #include <IndustryStandard/SmBios.h>
28 #include <Protocol/Cpu.h>
29 #include <Protocol/Smbios.h>
30 #include <Protocol/FrameworkHii.h>
31 #include <Guid/DataHubRecords.h>
32 #include <Protocol/CpuIo2.h>
33 #include <Protocol/WinNtIo.h>
34 #include <Library/BaseLib.h>
35 #include <Library/DebugLib.h>
36 #include <Library/HiiLib.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>
42 #include <Library/WinNtLib.h>
45 extern UINT8 CpuStrings
[];
48 // Internal Data Structures
50 #define CPU_ARCH_PROT_PRIVATE_SIGNATURE SIGNATURE_32 ('c', 'a', 'p', 'd')
56 EFI_CPU_ARCH_PROTOCOL Cpu
;
57 EFI_CPU_IO2_PROTOCOL CpuIo
;
60 // Local Data for CPU interface goes here
62 CRITICAL_SECTION NtCriticalSection
;
63 BOOLEAN InterruptState
;
65 } CPU_ARCH_PROTOCOL_PRIVATE
;
67 #define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \
69 CPU_ARCH_PROTOCOL_PRIVATE, \
71 CPU_ARCH_PROT_PRIVATE_SIGNATURE \
76 CpuMemoryServiceRead (
77 IN EFI_CPU_IO2_PROTOCOL
*This
,
78 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
86 CpuMemoryServiceWrite (
87 IN EFI_CPU_IO2_PROTOCOL
*This
,
88 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
97 IN EFI_CPU_IO2_PROTOCOL
*This
,
98 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
99 IN UINT64 UserAddress
,
101 IN OUT VOID
*UserBuffer
107 IN EFI_CPU_IO2_PROTOCOL
*This
,
108 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
109 IN UINT64 UserAddress
,
111 IN OUT VOID
*UserBuffer
118 IN EFI_HANDLE ImageHandle
,
119 IN EFI_SYSTEM_TABLE
*SystemTable
124 WinNtFlushCpuDataCache (
125 IN EFI_CPU_ARCH_PROTOCOL
*This
,
126 IN EFI_PHYSICAL_ADDRESS Start
,
128 IN EFI_CPU_FLUSH_TYPE FlushType
133 WinNtEnableInterrupt (
134 IN EFI_CPU_ARCH_PROTOCOL
*This
139 WinNtDisableInterrupt (
140 IN EFI_CPU_ARCH_PROTOCOL
*This
145 WinNtGetInterruptState (
146 IN EFI_CPU_ARCH_PROTOCOL
*This
,
153 IN EFI_CPU_ARCH_PROTOCOL
*This
,
154 IN EFI_CPU_INIT_TYPE InitType
159 WinNtRegisterInterruptHandler (
160 IN EFI_CPU_ARCH_PROTOCOL
*This
,
161 IN EFI_EXCEPTION_TYPE InterruptType
,
162 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
168 IN EFI_CPU_ARCH_PROTOCOL
*This
,
169 IN UINT32 TimerIndex
,
170 OUT UINT64
*TimerValue
,
171 OUT UINT64
*TimerPeriod OPTIONAL
176 WinNtSetMemoryAttributes (
177 IN EFI_CPU_ARCH_PROTOCOL
*This
,
178 IN EFI_PHYSICAL_ADDRESS BaseAddress
,