]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Protocol/IsaHc.h
MdeModulePkg: Move IsaBusDxe driver to MdeModulePkg.
[mirror_edk2.git] / MdePkg / Include / Protocol / Protocol / IsaHc.h
CommitLineData
42c9d9f8
RN
1/** @file\r
2 ISA HC Protocol as defined in the PI 1.2.1 specification.\r
3\r
4 This protocol provides registration for ISA devices on a positive- or\r
5 subtractive-decode ISA bus. It allows devices to be registered and also\r
6 handles opening and closing the apertures which are positively-decoded.\r
7\r
8 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
9 This program and the accompanying materials \r
10 are licensed and made available under the terms and conditions of the BSD License \r
11 which accompanies this distribution. The full text of the license may be found at \r
12 http://opensource.org/licenses/bsd-license.php \r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
16\r
17 @par Revision Reference:\r
18 This protocol is from PI Version 1.2.1.\r
19\r
20**/\r
21\r
22#ifndef __ISA_HC_PROTOCOL_H__\r
23#define __ISA_HC_PROTOCOL_H__\r
24\r
25#define EFI_ISA_HC_PROTOCOL_GUID \\r
26 { \\r
27 0xbcdaf080, 0x1bde, 0x4e22, {0xae, 0x6a, 0x43, 0x54, 0x1e, 0x12, 0x8e, 0xc4} \\r
28 }\r
29\r
30#define EFI_ISA_HC_SERVICE_BINDING_PROTOCOL_GUID \\r
31 { \\r
32 0xfad7933a, 0x6c21, 0x4234, {0xa4, 0x34, 0x0a, 0x8a, 0x0d, 0x2b, 0x07, 0x81} \\r
33 }\r
34\r
35typedef struct _EFI_ISA_HC_PROTOCOL EFI_ISA_HC_PROTOCOL;\r
36typedef struct _EFI_ISA_HC_PROTOCOL *PEFI_ISA_HC_PROTOCOL;\r
37\r
38/**\r
39 Open I/O aperture.\r
40\r
41 This function opens an I/O aperture in a ISA Host Controller for the I/O addresses\r
42 specified by IoAddress to IoAddress + IoLength - 1. It may be possible that a\r
43 single hardware aperture may be used for more than one device. This function\r
44 tracks the number of times that each aperture is referenced, and does not close\r
45 the hardware aperture (via CloseIoAperture()) until there are no more references to it.\r
46\r
47 @param This A pointer to this instance of the EFI_ISA_HC_PROTOCOL.\r
48 @param IoAddress An unsigned integer that specifies the first byte of the\r
49 I/O space required.\r
50 @param IoLength An unsigned integer that specifies the number of bytes\r
51 of the I/O space required.\r
52 @param IoApertureHandle A pointer to the returned I/O aperture handle. This\r
53 value can be used on subsequent calls to CloseIoAperture().\r
54\r
55 @retval EFI_SUCCESS The I/O aperture was opened successfully.\r
56 @retval EFI_UNSUPPORTED The ISA Host Controller is a subtractive-decode controller.\r
57 @retval EFI_OUT_OF_RESOURCES There is no available I/O aperture.\r
58**/\r
59typedef\r
60EFI_STATUS\r
61(EFIAPI *EFI_ISA_HC_OPEN_IO) (\r
62 IN CONST EFI_ISA_HC_PROTOCOL *This,\r
63 IN UINT16 IoAddress,\r
64 IN UINT16 IoLength,\r
65 OUT UINT64 *IoApertureHandle\r
66 );\r
67\r
68/**\r
69 Close I/O aperture.\r
70\r
71 This function closes a previously opened I/O aperture handle. If there are no\r
72 more I/O aperture handles that refer to the hardware I/O aperture resource,\r
73 then the hardware I/O aperture is closed. It may be possible that a single\r
74 hardware aperture may be used for more than one device. This function tracks\r
75 the number of times that each aperture is referenced, and does not close the\r
76 hardware aperture (via CloseIoAperture()) until there are no more references to it.\r
77\r
78 @param This A pointer to this instance of the EFI_ISA_HC_PROTOCOL.\r
79 @param IoApertureHandle The I/O aperture handle previously returned from a \r
80 call to OpenIoAperture().\r
81\r
82 @retval EFI_SUCCESS The IO aperture was closed successfully.\r
83**/\r
84typedef\r
85EFI_STATUS\r
86(EFIAPI *EFI_ISA_HC_CLOSE_IO) (\r
87 IN CONST EFI_ISA_HC_PROTOCOL *This,\r
88 IN UINT64 IoApertureHandle\r
89 );\r
90\r
91///\r
92/// ISA HC Protocol\r
93///\r
94struct _EFI_ISA_HC_PROTOCOL {\r
95 ///\r
96 /// The version of this protocol. Higher version numbers are backward\r
97 /// compatible with lower version numbers.\r
98 ///\r
99 UINT32 Version;\r
100 ///\r
101 /// Open an I/O aperture.\r
102 ///\r
103 EFI_ISA_HC_OPEN_IO OpenIoAperture;\r
104 ///\r
105 /// Close an I/O aperture.\r
106 ///\r
107 EFI_ISA_HC_CLOSE_IO CloseIoAperture;\r
108};\r
109\r
110///\r
111/// Reference to variable defined in the .DEC file\r
112///\r
113extern EFI_GUID gEfiIsaHcProtocolGuid;\r
114extern EFI_GUID gEfiIsaHcServiceBindingProtocolGuid;\r
115\r
116#endif // __ISA_HC_H__\r