Rename Protocol/FrameworkHii.h to Protocol/HiiFramework.h to follow the naming conven...
[mirror_edk2.git] / Nt32Pkg / CpuRuntimeDxe / 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 //
28 // Include common header file for this module.
29 //
30 #include "CommonHeader.h"
31
32 extern UINT8 CpuStrings[];
33
34 //
35 // Internal Data Structures
36 //
37 #define CPU_ARCH_PROT_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('c', 'a', 'p', 'd')
38
39 typedef struct {
40 UINTN Signature;
41 EFI_HANDLE Handle;
42
43 EFI_CPU_ARCH_PROTOCOL Cpu;
44 EFI_CPU_IO_PROTOCOL CpuIo;
45
46 //
47 // Local Data for CPU interface goes here
48 //
49 CRITICAL_SECTION NtCriticalSection;
50 BOOLEAN InterruptState;
51
52 } CPU_ARCH_PROTOCOL_PRIVATE;
53
54 #define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \
55 CR (a, \
56 CPU_ARCH_PROTOCOL_PRIVATE, \
57 Cpu, \
58 CPU_ARCH_PROT_PRIVATE_SIGNATURE \
59 )
60
61 EFI_STATUS
62 EFIAPI
63 CpuMemoryServiceRead (
64 IN EFI_CPU_IO_PROTOCOL *This,
65 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
66 IN UINT64 Address,
67 IN UINTN Count,
68 IN OUT VOID *Buffer
69 );
70
71 EFI_STATUS
72 EFIAPI
73 CpuMemoryServiceWrite (
74 IN EFI_CPU_IO_PROTOCOL *This,
75 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
76 IN UINT64 Address,
77 IN UINTN Count,
78 IN OUT VOID *Buffer
79 );
80
81 EFI_STATUS
82 EFIAPI
83 CpuIoServiceRead (
84 IN EFI_CPU_IO_PROTOCOL *This,
85 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
86 IN UINT64 UserAddress,
87 IN UINTN Count,
88 IN OUT VOID *UserBuffer
89 );
90
91 EFI_STATUS
92 EFIAPI
93 CpuIoServiceWrite (
94 IN EFI_CPU_IO_PROTOCOL *This,
95 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
96 IN UINT64 UserAddress,
97 IN UINTN Count,
98 IN OUT VOID *UserBuffer
99 );
100
101
102 #endif