]> git.proxmox.com Git - mirror_edk2.git/blob - Nt32Pkg/CpuRuntimeDxe/CpuDriver.h
Add build rules for asl file, asm16 file.
[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 #include <FrameworkDxe.h>
27 #include <Protocol/Cpu.h>
28 #include <Protocol/DataHub.h>
29 #include <Protocol/HiiFramework.h>
30 #include <Guid/DataHubRecords.h>
31 #include <Protocol/CpuIo.h>
32 #include <Protocol/WinNtIo.h>
33 #include <Library/DebugLib.h>
34 #include <Library/HiiLibFramework.h>
35 #include <Library/UefiDriverEntryPoint.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/MemoryAllocationLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39
40
41 extern UINT8 CpuStrings[];
42
43 //
44 // Internal Data Structures
45 //
46 #define CPU_ARCH_PROT_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('c', 'a', 'p', 'd')
47
48 typedef struct {
49 UINTN Signature;
50 EFI_HANDLE Handle;
51
52 EFI_CPU_ARCH_PROTOCOL Cpu;
53 EFI_CPU_IO_PROTOCOL CpuIo;
54
55 //
56 // Local Data for CPU interface goes here
57 //
58 CRITICAL_SECTION NtCriticalSection;
59 BOOLEAN InterruptState;
60
61 } CPU_ARCH_PROTOCOL_PRIVATE;
62
63 #define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \
64 CR (a, \
65 CPU_ARCH_PROTOCOL_PRIVATE, \
66 Cpu, \
67 CPU_ARCH_PROT_PRIVATE_SIGNATURE \
68 )
69
70 EFI_STATUS
71 EFIAPI
72 CpuMemoryServiceRead (
73 IN EFI_CPU_IO_PROTOCOL *This,
74 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
75 IN UINT64 Address,
76 IN UINTN Count,
77 IN OUT VOID *Buffer
78 );
79
80 EFI_STATUS
81 EFIAPI
82 CpuMemoryServiceWrite (
83 IN EFI_CPU_IO_PROTOCOL *This,
84 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
85 IN UINT64 Address,
86 IN UINTN Count,
87 IN OUT VOID *Buffer
88 );
89
90 EFI_STATUS
91 EFIAPI
92 CpuIoServiceRead (
93 IN EFI_CPU_IO_PROTOCOL *This,
94 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
95 IN UINT64 UserAddress,
96 IN UINTN Count,
97 IN OUT VOID *UserBuffer
98 );
99
100 EFI_STATUS
101 EFIAPI
102 CpuIoServiceWrite (
103 IN EFI_CPU_IO_PROTOCOL *This,
104 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
105 IN UINT64 UserAddress,
106 IN UINTN Count,
107 IN OUT VOID *UserBuffer
108 );
109
110
111 #endif