]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/LegacyRegion.h
automagically convert ELF to PE/COFF (i386 only)
[mirror_edk2.git] / MdePkg / 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 @param Start Start of region to decode.
36 @param Length Size in bytes of the region.
37 @param On Decode/nondecode flag.
38
39 @retval EFI_SUCCESS Decode range successfully changed.
40
41 **/
42 typedef
43 EFI_STATUS
44 (EFIAPI *EFI_LEGACY_REGION_DECODE) (
45 IN EFI_LEGACY_REGION_PROTOCOL *This,
46 IN UINT32 Start,
47 IN UINT32 Length,
48 IN BOOLEAN *On
49 );
50
51 /**
52 Sets a region to read only.
53
54 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
55 @param Start Start of region to lock.
56 @param Length Size in bytes of the region.
57 @param Granularity Lock attribute affects this granularity in bytes.
58
59 @retval EFI_SUCCESS The region was made read only.
60
61 **/
62 typedef
63 EFI_STATUS
64 (EFIAPI *EFI_LEGACY_REGION_LOCK) (
65 IN EFI_LEGACY_REGION_PROTOCOL *This,
66 IN UINT32 Start,
67 IN UINT32 Length,
68 OUT UINT32 *Granularity OPTIONAL
69 );
70
71 /**
72 Sets a region to read only and ensures that flash is locked from being
73 inadvertently modified.
74
75 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
76 @param Start Start of region to lock.
77 @param Length Size in bytes of the region.
78 @param Granularity Lock attribute affects this granularity in bytes.
79
80 @retval EFI_SUCCESS The region was made read only and flash is locked.
81
82 **/
83 typedef
84 EFI_STATUS
85 (EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK) (
86 IN EFI_LEGACY_REGION_PROTOCOL *This,
87 IN UINT32 Start,
88 IN UINT32 Length,
89 OUT UINT32 *Granularity OPTIONAL
90 );
91
92 /**
93 Sets a region to read-write.
94
95 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
96 @param Start Start of region to lock.
97 @param Length Size in bytes of the region.
98 @param Granularity Lock attribute affects this granularity in bytes.
99
100 @retval EFI_SUCCESS The region was successfully made read-write.
101
102 **/
103 typedef
104 EFI_STATUS
105 (EFIAPI *EFI_LEGACY_REGION_UNLOCK) (
106 IN EFI_LEGACY_REGION_PROTOCOL *This,
107 IN UINT32 Start,
108 IN UINT32 Length,
109 OUT UINT32 *Granularity OPTIONAL
110 );
111
112 /**
113 @par Protocol Description:
114 Abstracts the hardware control of the physical address region 0xC0000-C0xFFFFF
115 for the traditional BIOS.
116
117 @param Decode
118 Specifies a region for the chipset to decode
119
120 @param Lock
121 Makes the specified OpROM region read only or locked.
122
123 @param BootLock
124 Sets a region to read only and ensures tat flash is locked from
125 inadvertent modification.
126
127 @param Unlock
128 Makes the specified OpROM region read-write or unlocked.
129
130 **/
131 struct _EFI_LEGACY_REGION_PROTOCOL {
132 EFI_LEGACY_REGION_DECODE Decode;
133 EFI_LEGACY_REGION_LOCK Lock;
134 EFI_LEGACY_REGION_BOOT_LOCK BootLock;
135 EFI_LEGACY_REGION_UNLOCK UnLock;
136 };
137
138 extern EFI_GUID gEfiLegacyRegionProtocolGuid;
139
140 #endif