Add dependency for RealAsm file build rules and Use the module name in place of macro...
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / Cpu / CpuDriver.h
1 /*++
2
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
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
14 CpuDriver.h
15
16 Abstract:
17
18 NT Emulation Architectural Protocol Driver as defined in Tiano.
19
20 --*/
21
22 #ifndef _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_
23 #define _CPU_ARCHITECTURAL_PROTOCOL_DRIVER_H_
24
25
26
27 extern UINT8 CpuStrings[];
28
29 //
30 // Internal Data Structures
31 //
32 #define CPU_ARCH_PROT_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('c', 'a', 'p', 'd')
33
34 typedef struct {
35 UINTN Signature;
36 EFI_HANDLE Handle;
37
38 EFI_CPU_ARCH_PROTOCOL Cpu;
39 EFI_CPU_IO_PROTOCOL CpuIo;
40
41 //
42 // Local Data for CPU interface goes here
43 //
44 CRITICAL_SECTION NtCriticalSection;
45 BOOLEAN InterruptState;
46
47 } CPU_ARCH_PROTOCOL_PRIVATE;
48
49 #define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \
50 CR (a, \
51 CPU_ARCH_PROTOCOL_PRIVATE, \
52 Cpu, \
53 CPU_ARCH_PROT_PRIVATE_SIGNATURE \
54 )
55
56 EFI_STATUS
57 EFIAPI
58 CpuMemoryServiceRead (
59 IN EFI_CPU_IO_PROTOCOL *This,
60 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
61 IN UINT64 Address,
62 IN UINTN Count,
63 IN OUT VOID *Buffer
64 );
65
66 EFI_STATUS
67 EFIAPI
68 CpuMemoryServiceWrite (
69 IN EFI_CPU_IO_PROTOCOL *This,
70 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
71 IN UINT64 Address,
72 IN UINTN Count,
73 IN OUT VOID *Buffer
74 );
75
76 EFI_STATUS
77 EFIAPI
78 CpuIoServiceRead (
79 IN EFI_CPU_IO_PROTOCOL *This,
80 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
81 IN UINT64 UserAddress,
82 IN UINTN Count,
83 IN OUT VOID *UserBuffer
84 );
85
86 EFI_STATUS
87 EFIAPI
88 CpuIoServiceWrite (
89 IN EFI_CPU_IO_PROTOCOL *This,
90 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
91 IN UINT64 UserAddress,
92 IN UINTN Count,
93 IN OUT VOID *UserBuffer
94 );
95
96
97 #endif