]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This protocol manages the legacy memory regions between 0xc0000 - 0xfffff\r | |
3 | \r | |
4 | Copyright (c) 2007 - 2009, Intel Corporation\r | |
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 | @par Revision Reference:\r | |
14 | This protocol is defined in Framework for EFI Compatibility Support Module spec\r | |
15 | Version 0.97.\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef _EFI_LEGACY_REGION_H_\r | |
20 | #define _EFI_LEGACY_REGION_H_\r | |
21 | \r | |
22 | \r | |
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 | |
28 | typedef 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 | |
34 | @param Start Start of region to decode.\r | |
35 | @param Length Size in bytes of the region.\r | |
36 | @param On Decode/nondecode flag.\r | |
37 | \r | |
38 | @retval EFI_SUCCESS Decode range successfully changed.\r | |
39 | \r | |
40 | **/\r | |
41 | typedef\r | |
42 | EFI_STATUS\r | |
43 | (EFIAPI *EFI_LEGACY_REGION_DECODE)(\r | |
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 | |
53 | @param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance\r | |
54 | @param Start Start of region to lock.\r | |
55 | @param Length Size in bytes of the region.\r | |
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 | |
61 | typedef\r | |
62 | EFI_STATUS\r | |
63 | (EFIAPI *EFI_LEGACY_REGION_LOCK)(\r | |
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 | |
75 | @param Start Start of region to lock.\r | |
76 | @param Length Size in bytes of the region.\r | |
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 | |
82 | typedef\r | |
83 | EFI_STATUS\r | |
84 | (EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK)(\r | |
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 | |
95 | @param Start Start of region to lock.\r | |
96 | @param Length Size in bytes of the region.\r | |
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 | |
102 | typedef\r | |
103 | EFI_STATUS\r | |
104 | (EFIAPI *EFI_LEGACY_REGION_UNLOCK)(\r | |
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 | |
112 | Abstracts the hardware control of the physical address region 0xC0000-C0xFFFFF\r | |
113 | for the traditional BIOS.\r | |
114 | **/\r | |
115 | struct _EFI_LEGACY_REGION_PROTOCOL {\r | |
116 | EFI_LEGACY_REGION_DECODE Decode; ///< Specifies a region for the chipset to decode\r | |
117 | EFI_LEGACY_REGION_LOCK Lock; ///< Makes the specified OpROM region read only or locked.\r | |
118 | EFI_LEGACY_REGION_BOOT_LOCK BootLock; ///< Sets a region to read only and ensures tat flash is locked from\r | |
119 | ///< inadvertent modification.\r | |
120 | EFI_LEGACY_REGION_UNLOCK UnLock; ///< Makes the specified OpROM region read-write or unlocked.\r | |
121 | };\r | |
122 | \r | |
123 | extern EFI_GUID gEfiLegacyRegionProtocolGuid;\r | |
124 | \r | |
125 | #endif\r |