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