]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Framework/Protocol/CpuIo/CpuIo.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / CpuIo / CpuIo.h
1 /*++
2
3 Copyright (c) 2004, 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 CpuIO.h
15
16 Abstract:
17
18 CPU IO Protocol as defined in Tiano
19
20 This code abstracts the CPU IO Protocol
21
22 --*/
23
24 #ifndef _CPUIO_H_
25 #define _CPUIO_H_
26
27 #define EFI_CPU_IO_PROTOCOL_GUID \
28 { \
29 0xB0732526, 0x38C8, 0x4b40, 0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 \
30 }
31
32 EFI_FORWARD_DECLARATION (EFI_CPU_IO_PROTOCOL);
33
34 //
35 // *******************************************************
36 // EFI_CPU_IO_PROTOCOL_WIDTH
37 // *******************************************************
38 //
39 typedef enum {
40 EfiCpuIoWidthUint8,
41 EfiCpuIoWidthUint16,
42 EfiCpuIoWidthUint32,
43 EfiCpuIoWidthUint64,
44 EfiCpuIoWidthFifoUint8,
45 EfiCpuIoWidthFifoUint16,
46 EfiCpuIoWidthFifoUint32,
47 EfiCpuIoWidthFifoUint64,
48 EfiCpuIoWidthFillUint8,
49 EfiCpuIoWidthFillUint16,
50 EfiCpuIoWidthFillUint32,
51 EfiCpuIoWidthFillUint64,
52 EfiCpuIoWidthMaximum
53 } EFI_CPU_IO_PROTOCOL_WIDTH;
54
55 //
56 // *******************************************************
57 // EFI_CPU_IO_PROTOCOL_IO_MEM
58 // *******************************************************
59 //
60 typedef
61 EFI_STATUS
62 EFI_RUNTIMESERVICE
63 (EFIAPI *EFI_CPU_IO_PROTOCOL_IO_MEM) (
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 //
72 // *******************************************************
73 // EFI_CPU_IO_PROTOCOL_ACCESS
74 // *******************************************************
75 //
76 typedef struct {
77 EFI_CPU_IO_PROTOCOL_IO_MEM Read;
78 EFI_CPU_IO_PROTOCOL_IO_MEM Write;
79 } EFI_CPU_IO_PROTOCOL_ACCESS;
80
81 //
82 // *******************************************************
83 // EFI_CPU_IO_PROTOCOL
84 // *******************************************************
85 //
86 typedef struct _EFI_CPU_IO_PROTOCOL {
87 EFI_CPU_IO_PROTOCOL_ACCESS Mem;
88 EFI_CPU_IO_PROTOCOL_ACCESS Io;
89 } EFI_CPU_IO_PROTOCOL;
90
91 extern EFI_GUID gEfiCpuIoProtocolGuid;
92
93 #endif