]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Include/Protocol/LegacyRegion.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / LegacyRegion.h
diff --git a/OldMdePkg/Include/Protocol/LegacyRegion.h b/OldMdePkg/Include/Protocol/LegacyRegion.h
new file mode 100644 (file)
index 0000000..e7e24ad
--- /dev/null
@@ -0,0 +1,140 @@
+/** @file\r
+  This protocol manages the legacy memory regions between 0xc0000 - 0xfffff\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.    \r
+\r
+  Module Name:  LegacyRegion.h\r
+\r
+  @par Revision Reference:\r
+  This protocol is defined in Framework for EFI Compatibility Support Module spec\r
+  Version 0.96\r
+\r
+**/\r
+\r
+#ifndef _EFI_LEGACY_REGION_H_\r
+#define _EFI_LEGACY_REGION_H_\r
+\r
+#define EFI_LEGACY_REGION_PROTOCOL_GUID \\r
+  { \\r
+    0xfc9013a, 0x568, 0x4ba9, {0x9b, 0x7e, 0xc9, 0xc3, 0x90, 0xa6, 0x60, 0x9b } \\r
+  }\r
+\r
+typedef struct _EFI_LEGACY_REGION_PROTOCOL EFI_LEGACY_REGION_PROTOCOL;\r
+\r
+/**\r
+  Sets hardware to decode or not decode a region.\r
+\r
+  @param  This                  Indicates the EFI_LEGACY_REGION_PROTOCOL instance\r
+  @param  Start                 Start of region to decode.\r
+  @param  Length                Size in bytes of the region.\r
+  @param  On                    Decode/nondecode flag.\r
+\r
+  @retval EFI_SUCCESS           Decode range successfully changed.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_LEGACY_REGION_DECODE) (\r
+  IN EFI_LEGACY_REGION_PROTOCOL           *This,\r
+  IN  UINT32                              Start,\r
+  IN  UINT32                              Length,\r
+  IN  BOOLEAN                             *On\r
+  );\r
+\r
+/**\r
+  Sets a region to read only.\r
+\r
+  @param  This                  Indicates the EFI_LEGACY_REGION_PROTOCOL instance\r
+  @param  Start                 Start of region to lock.\r
+  @param  Length                Size in bytes of the region.\r
+  @param  Granularity           Lock attribute affects this granularity in bytes.\r
+\r
+  @retval EFI_SUCCESS           The region was made read only.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_LEGACY_REGION_LOCK) (\r
+  IN EFI_LEGACY_REGION_PROTOCOL           *This,\r
+  IN  UINT32                              Start,\r
+  IN  UINT32                              Length,\r
+  OUT UINT32                              *Granularity OPTIONAL\r
+  );\r
+\r
+/**\r
+  Sets a region to read only and ensures that flash is locked from being \r
+  inadvertently modified.\r
+\r
+  @param  This                  Indicates the EFI_LEGACY_REGION_PROTOCOL instance\r
+  @param  Start                 Start of region to lock.\r
+  @param  Length                Size in bytes of the region.\r
+  @param  Granularity           Lock attribute affects this granularity in bytes.\r
+\r
+  @retval EFI_SUCCESS           The region was made read only and flash is locked.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK) (\r
+  IN EFI_LEGACY_REGION_PROTOCOL           *This,\r
+  IN  UINT32                              Start,\r
+  IN  UINT32                              Length,\r
+  OUT UINT32                              *Granularity OPTIONAL\r
+  );\r
+\r
+/**\r
+  Sets a region to read-write.\r
+\r
+  @param  This                  Indicates the EFI_LEGACY_REGION_PROTOCOL instance\r
+  @param  Start                 Start of region to lock.\r
+  @param  Length                Size in bytes of the region.\r
+  @param  Granularity           Lock attribute affects this granularity in bytes.\r
+\r
+  @retval EFI_SUCCESS           The region was successfully made read-write.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_LEGACY_REGION_UNLOCK) (\r
+  IN EFI_LEGACY_REGION_PROTOCOL           *This,\r
+  IN  UINT32                              Start,\r
+  IN  UINT32                              Length,\r
+  OUT UINT32                              *Granularity OPTIONAL\r
+  );\r
+\r
+/**\r
+  @par Protocol Description:\r
+  Abstracts the hardware control of the physical address region 0xC0000-C0xFFFFF \r
+  for the traditional BIOS.\r
+\r
+  @param Decode\r
+  Specifies a region for the chipset to decode\r
+\r
+  @param Lock\r
+  Makes the specified OpROM region read only or locked.\r
+\r
+  @param BootLock\r
+  Sets a region to read only and ensures tat flash is locked from \r
+  inadvertent modification.\r
+\r
+  @param Unlock\r
+  Makes the specified OpROM region read-write or unlocked. \r
+\r
+**/\r
+struct _EFI_LEGACY_REGION_PROTOCOL {\r
+  EFI_LEGACY_REGION_DECODE    Decode;\r
+  EFI_LEGACY_REGION_LOCK      Lock;\r
+  EFI_LEGACY_REGION_BOOT_LOCK BootLock;\r
+  EFI_LEGACY_REGION_UNLOCK    UnLock;\r
+};\r
+\r
+extern EFI_GUID gEfiLegacyRegionProtocolGuid;\r
+\r
+#endif\r