]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/Include/Protocol/LegacyRegion.h
Remove the dependence to MdePkg
[mirror_edk2.git] / Tools / Source / TianoTools / Include / Protocol / LegacyRegion.h
1 /** @file
2 This protocol manages the legacy memory regions between 0xc0000 - 0xfffff
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: LegacyRegion.h
14
15 @par Revision Reference:
16 This protocol is defined in Framework for EFI Compatibility Support Module spec
17 Version 0.96
18
19 **/
20
21 #ifndef _EFI_LEGACY_REGION_H_
22 #define _EFI_LEGACY_REGION_H_
23
24 #define EFI_LEGACY_REGION_PROTOCOL_GUID \
25 { \
26 0xfc9013a, 0x568, 0x4ba9, {0x9b, 0x7e, 0xc9, 0xc3, 0x90, 0xa6, 0x60, 0x9b } \
27 }
28
29 typedef struct _EFI_LEGACY_REGION_PROTOCOL EFI_LEGACY_REGION_PROTOCOL;
30
31 /**
32 Sets hardware to decode or not decode a region.
33
34 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
35
36 @param Start Start of region to decode.
37
38 @param Length Size in bytes of the region.
39
40 @param On Decode/nondecode flag.
41
42 @retval EFI_SUCCESS Decode range successfully changed.
43
44 **/
45 typedef
46 EFI_STATUS
47 (EFIAPI *EFI_LEGACY_REGION_DECODE) (
48 IN EFI_LEGACY_REGION_PROTOCOL *This,
49 IN UINT32 Start,
50 IN UINT32 Length,
51 IN BOOLEAN *On
52 );
53
54 /**
55 Sets a region to read only.
56
57 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
58
59 @param Start Start of region to lock.
60
61 @param Length Size in bytes of the region.
62
63 @param Granularity Lock attribute affects this granularity in bytes.
64
65 @retval EFI_SUCCESS The region was made read only.
66
67 **/
68 typedef
69 EFI_STATUS
70 (EFIAPI *EFI_LEGACY_REGION_LOCK) (
71 IN EFI_LEGACY_REGION_PROTOCOL *This,
72 IN UINT32 Start,
73 IN UINT32 Length,
74 OUT UINT32 *Granularity OPTIONAL
75 );
76
77 /**
78 Sets a region to read only and ensures that flash is locked from being
79 inadvertently modified.
80
81 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
82
83 @param Start Start of region to lock.
84
85 @param Length Size in bytes of the region.
86
87 @param Granularity Lock attribute affects this granularity in bytes.
88
89 @retval EFI_SUCCESS The region was made read only and flash is locked.
90
91 **/
92 typedef
93 EFI_STATUS
94 (EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK) (
95 IN EFI_LEGACY_REGION_PROTOCOL *This,
96 IN UINT32 Start,
97 IN UINT32 Length,
98 OUT UINT32 *Granularity OPTIONAL
99 );
100
101 /**
102 Sets a region to read-write.
103
104 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
105
106 @param Start Start of region to lock.
107
108 @param Length Size in bytes of the region.
109
110 @param Granularity Lock attribute affects this granularity in bytes.
111
112 @retval EFI_SUCCESS The region was successfully made read-write.
113
114 **/
115 typedef
116 EFI_STATUS
117 (EFIAPI *EFI_LEGACY_REGION_UNLOCK) (
118 IN EFI_LEGACY_REGION_PROTOCOL *This,
119 IN UINT32 Start,
120 IN UINT32 Length,
121 OUT UINT32 *Granularity OPTIONAL
122 );
123
124 /**
125 @par Protocol Description:
126 Abstracts the hardware control of the physical address region 0xC0000¨C0xFFFFF
127 for the traditional BIOS.
128
129 @param Decode
130 Specifies a region for the chipset to decode
131
132 @param Lock
133 Makes the specified OpROM region read only or locked.
134
135 @param BootLock
136 Sets a region to read only and ensures tat flash is locked from
137 inadvertent modification.
138
139 @param Unlock
140 Makes the specified OpROM region read-write or unlocked.
141
142 **/
143 struct _EFI_LEGACY_REGION_PROTOCOL {
144 EFI_LEGACY_REGION_DECODE Decode;
145 EFI_LEGACY_REGION_LOCK Lock;
146 EFI_LEGACY_REGION_BOOT_LOCK BootLock;
147 EFI_LEGACY_REGION_UNLOCK UnLock;
148 };
149
150 extern EFI_GUID gEfiLegacyRegionProtocolGuid;
151
152 #endif