]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Include/Ppi/ArmGlobalVariable.h
ArmPlatformPkg: Introduce ArmPlatformGlobalVariableLib
[mirror_edk2.git] / ArmPlatformPkg / Include / Ppi / ArmGlobalVariable.h
diff --git a/ArmPlatformPkg/Include/Ppi/ArmGlobalVariable.h b/ArmPlatformPkg/Include/Ppi/ArmGlobalVariable.h
new file mode 100644 (file)
index 0000000..8a29b83
--- /dev/null
@@ -0,0 +1,55 @@
+/** @file\r
+*\r
+*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+*\r
+*  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
+**/\r
+\r
+#ifndef __ARM_GLOBAL_VARIABLE_H__\r
+#define __ARM_GLOBAL_VARIABLE_H__\r
+\r
+#define ARM_GLOBAL_VARIABLE_PPI_GUID  \\r
+  { 0xab1c1816, 0xd542, 0x4e6f, {0x9b, 0x1e, 0x8e, 0xcd, 0x92, 0x53, 0xe2, 0xe7} }\r
+\r
+\r
+/**\r
+  This service of the EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RAM into\r
+  permanent memory.\r
+\r
+  @param PeiServices            Pointer to the PEI Services Table.\r
+  @param TemporaryMemoryBase    Source Address in temporary memory from which the SEC or PEIM will copy the\r
+                                Temporary RAM contents.\r
+  @param PermanentMemoryBase    Destination Address in permanent memory into which the SEC or PEIM will copy the\r
+                                Temporary RAM contents.\r
+  @param CopySize               Amount of memory to migrate from temporary to permanent memory.\r
+\r
+  @retval EFI_SUCCESS           The data was successfully returned.\r
+  @retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize > TemporaryMemoryBase when\r
+                                TemporaryMemoryBase > PermanentMemoryBase.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI * ARM_GLOBAL_VARIABLE_GET_MEMORY) (\r
+  OUT EFI_PHYSICAL_ADDRESS    *GlobalVariableBase\r
+);\r
+\r
+///\r
+/// This service abstracts the ability to migrate contents of the platform early memory store.\r
+/// Note: The name EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI is different from the current PI 1.2 spec.\r
+///       This PPI was optional.\r
+///\r
+typedef struct {\r
+  ARM_GLOBAL_VARIABLE_GET_MEMORY   GetGlobalVariableMemory;\r
+} ARM_GLOBAL_VARIABLE_PPI;\r
+\r
+extern EFI_GUID gArmGlobalVariablePpiGuid;\r
+\r
+#endif\r