]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/LegacyRegion.h
Remove IntelFrameworkModulePkg
[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 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 This protocol is defined in Framework for EFI Compatibility Support Module spec
9 Version 0.97.
10
11 **/
12
13 #ifndef _EFI_LEGACY_REGION_H_
14 #define _EFI_LEGACY_REGION_H_
15
16
17 #define EFI_LEGACY_REGION_PROTOCOL_GUID \
18 { \
19 0xfc9013a, 0x568, 0x4ba9, {0x9b, 0x7e, 0xc9, 0xc3, 0x90, 0xa6, 0x60, 0x9b } \
20 }
21
22 typedef struct _EFI_LEGACY_REGION_PROTOCOL EFI_LEGACY_REGION_PROTOCOL;
23
24 /**
25 Sets hardware to decode or not decode a region.
26
27 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
28 @param Start The start of the region to decode.
29 @param Length The size in bytes of the region.
30 @param On The decode/nondecode flag.
31
32 @retval EFI_SUCCESS The decode range successfully changed.
33
34 **/
35 typedef
36 EFI_STATUS
37 (EFIAPI *EFI_LEGACY_REGION_DECODE)(
38 IN EFI_LEGACY_REGION_PROTOCOL *This,
39 IN UINT32 Start,
40 IN UINT32 Length,
41 IN BOOLEAN *On
42 );
43
44 /**
45 Sets a region to read only.
46
47 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance.
48 @param Start The start of region to lock.
49 @param Length The size in bytes of the region.
50 @param Granularity Lock attribute affects this granularity in bytes.
51
52 @retval EFI_SUCCESS The region was made read only.
53
54 **/
55 typedef
56 EFI_STATUS
57 (EFIAPI *EFI_LEGACY_REGION_LOCK)(
58 IN EFI_LEGACY_REGION_PROTOCOL *This,
59 IN UINT32 Start,
60 IN UINT32 Length,
61 OUT UINT32 *Granularity OPTIONAL
62 );
63
64 /**
65 Sets a region to read only and ensures that flash is locked from being
66 inadvertently modified.
67
68 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
69 @param Start The start of region to lock.
70 @param Length The size in bytes of the region.
71 @param Granularity Lock attribute affects this granularity in bytes.
72
73 @retval EFI_SUCCESS The region was made read only and flash is locked.
74
75 **/
76 typedef
77 EFI_STATUS
78 (EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK)(
79 IN EFI_LEGACY_REGION_PROTOCOL *This,
80 IN UINT32 Start,
81 IN UINT32 Length,
82 OUT UINT32 *Granularity OPTIONAL
83 );
84
85 /**
86 Sets a region to read-write.
87
88 @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
89 @param Start The start of region to lock.
90 @param Length The size in bytes of the region.
91 @param Granularity Lock attribute affects this granularity in bytes.
92
93 @retval EFI_SUCCESS The region was successfully made read-write.
94
95 **/
96 typedef
97 EFI_STATUS
98 (EFIAPI *EFI_LEGACY_REGION_UNLOCK)(
99 IN EFI_LEGACY_REGION_PROTOCOL *This,
100 IN UINT32 Start,
101 IN UINT32 Length,
102 OUT UINT32 *Granularity OPTIONAL
103 );
104
105 /**
106 Abstracts the hardware control of the physical address region 0xC0000-C0xFFFFF
107 for the traditional BIOS.
108 **/
109 struct _EFI_LEGACY_REGION_PROTOCOL {
110 EFI_LEGACY_REGION_DECODE Decode; ///< Specifies a region for the chipset to decode.
111 EFI_LEGACY_REGION_LOCK Lock; ///< Makes the specified OpROM region read only or locked.
112 EFI_LEGACY_REGION_BOOT_LOCK BootLock; ///< Sets a region to read only and ensures tat flash is locked from.
113 ///< inadvertent modification.
114 EFI_LEGACY_REGION_UNLOCK UnLock; ///< Makes the specified OpROM region read-write or unlocked.
115 };
116
117 extern EFI_GUID gEfiLegacyRegionProtocolGuid;
118
119 #endif