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