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