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