Fix the definition differences issue of termios.h in different version of kernel...
[mirror_edk2.git] / EdkUnixPkg / Dxe / UnixThunk / 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 UNIX 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 BOOLEAN InterruptState;
45
46 } CPU_ARCH_PROTOCOL_PRIVATE;
47
48 #define CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS(a) \
49 CR (a, \
50 CPU_ARCH_PROTOCOL_PRIVATE, \
51 Cpu, \
52 CPU_ARCH_PROT_PRIVATE_SIGNATURE \
53 )
54
55 EFI_STATUS
56 EFIAPI
57 CpuMemoryServiceRead (
58 IN EFI_CPU_IO_PROTOCOL *This,
59 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
60 IN UINT64 Address,
61 IN UINTN Count,
62 IN OUT VOID *Buffer
63 );
64
65 EFI_STATUS
66 EFIAPI
67 CpuMemoryServiceWrite (
68 IN EFI_CPU_IO_PROTOCOL *This,
69 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
70 IN UINT64 Address,
71 IN UINTN Count,
72 IN OUT VOID *Buffer
73 );
74
75 EFI_STATUS
76 EFIAPI
77 CpuIoServiceRead (
78 IN EFI_CPU_IO_PROTOCOL *This,
79 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
80 IN UINT64 UserAddress,
81 IN UINTN Count,
82 IN OUT VOID *UserBuffer
83 );
84
85 EFI_STATUS
86 EFIAPI
87 CpuIoServiceWrite (
88 IN EFI_CPU_IO_PROTOCOL *This,
89 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
90 IN UINT64 UserAddress,
91 IN UINTN Count,
92 IN OUT VOID *UserBuffer
93 );
94
95
96 #endif