]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/LegacyRegion.h
Clean the public header files to remove the unnecessary include files.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / LegacyRegion.h
1 /** @file
2 This protocol manages the legacy memory regions between 0xc0000 - 0xfffff
3
4 Copyright (c) 2007 - 2009, 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.97.
18
19 **/
20
21 #ifndef _EFI_LEGACY_REGION_H_
22 #define _EFI_LEGACY_REGION_H_
23
24
25 #define EFI_LEGACY_REGION_PROTOCOL_GUID \
26 { \
27 0xfc9013a, 0x568, 0x4ba9, {0x9b, 0x7e, 0xc9, 0xc3, 0x90, 0xa6, 0x60, 0x9b } \
28 }
29
30 typedef struct _EFI_LEGACY_REGION_PROTOCOL EFI_LEGACY_REGION_PROTOCOL;
31
32 /**
33 Sets hardware to decode or not decode a region.
34
35 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
36 @param Start Start of region to decode.
37 @param Length Size in bytes of the region.
38 @param On Decode/nondecode flag.
39
40 @retval EFI_SUCCESS Decode range successfully changed.
41
42 **/
43 typedef
44 EFI_STATUS
45 (EFIAPI *EFI_LEGACY_REGION_DECODE)(
46 IN EFI_LEGACY_REGION_PROTOCOL *This,
47 IN UINT32 Start,
48 IN UINT32 Length,
49 IN BOOLEAN *On
50 );
51
52 /**
53 Sets a region to read only.
54
55 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
56 @param Start Start of region to lock.
57 @param Length Size in bytes of the region.
58 @param Granularity Lock attribute affects this granularity in bytes.
59
60 @retval EFI_SUCCESS The region was made read only.
61
62 **/
63 typedef
64 EFI_STATUS
65 (EFIAPI *EFI_LEGACY_REGION_LOCK)(
66 IN EFI_LEGACY_REGION_PROTOCOL *This,
67 IN UINT32 Start,
68 IN UINT32 Length,
69 OUT UINT32 *Granularity OPTIONAL
70 );
71
72 /**
73 Sets a region to read only and ensures that flash is locked from being
74 inadvertently modified.
75
76 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
77 @param Start Start of region to lock.
78 @param Length Size in bytes of the region.
79 @param Granularity Lock attribute affects this granularity in bytes.
80
81 @retval EFI_SUCCESS The region was made read only and flash is locked.
82
83 **/
84 typedef
85 EFI_STATUS
86 (EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK)(
87 IN EFI_LEGACY_REGION_PROTOCOL *This,
88 IN UINT32 Start,
89 IN UINT32 Length,
90 OUT UINT32 *Granularity OPTIONAL
91 );
92
93 /**
94 Sets a region to read-write.
95
96 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
97 @param Start Start of region to lock.
98 @param Length Size in bytes of the region.
99 @param Granularity Lock attribute affects this granularity in bytes.
100
101 @retval EFI_SUCCESS The region was successfully made read-write.
102
103 **/
104 typedef
105 EFI_STATUS
106 (EFIAPI *EFI_LEGACY_REGION_UNLOCK)(
107 IN EFI_LEGACY_REGION_PROTOCOL *This,
108 IN UINT32 Start,
109 IN UINT32 Length,
110 OUT UINT32 *Granularity OPTIONAL
111 );
112
113 /**
114 Abstracts the hardware control of the physical address region 0xC0000-C0xFFFFF
115 for the traditional BIOS.
116 **/
117 struct _EFI_LEGACY_REGION_PROTOCOL {
118 EFI_LEGACY_REGION_DECODE Decode; ///< Specifies a region for the chipset to decode
119 EFI_LEGACY_REGION_LOCK Lock; ///< Makes the specified OpROM region read only or locked.
120 EFI_LEGACY_REGION_BOOT_LOCK BootLock; ///< Sets a region to read only and ensures tat flash is locked from
121 ///< inadvertent modification.
122 EFI_LEGACY_REGION_UNLOCK UnLock; ///< Makes the specified OpROM region read-write or unlocked.
123 };
124
125 extern EFI_GUID gEfiLegacyRegionProtocolGuid;
126
127 #endif