]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Framework/Ppi/TemporaryRamSupport/TemporaryRamSupport.h
635c3f8f2588dc30cff50af17ba6ddec80352e5d
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Ppi / TemporaryRamSupport / TemporaryRamSupport.h
1 /*++
2
3 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 TemporaryRamSupport.h
15
16 Abstract:
17
18 This file declares Temporary RAM Support PPI.
19 This Ppi provides the service that migrates temporary RAM into permanent memory.
20
21 --*/
22
23 #ifndef __TEMPORARY_RAM_SUPPORT_H__
24 #define __TEMPORARY_RAM_SUPPORT_H__
25
26 #include "Tiano.h"
27
28 #define TEMPORARY_RAM_SUPPORT_PPI_GUID \
29 { \
30 0xdbe23aa9, 0xa345, 0x4b97, {0x85, 0xb6, 0xb2, 0x26, 0xf1, 0x61, 0x73, 0x89} \
31 }
32
33 /**
34 This service of the TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RAM into
35 permanent memory.
36
37 @param PeiServices Pointer to the PEI Services Table.
38 @param TemporaryMemoryBase Source Address in temporary memory from which the SEC or PEIM will copy the
39 Temporary RAM contents.
40 @param PermanentMemoryBase Destination Address in permanent memory into which the SEC or PEIM will copy the
41 Temporary RAM contents.
42 @param CopySize Amount of memory to migrate from temporary to permanent memory.
43
44 @retval EFI_SUCCESS The data was successfully returned.
45 @retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize > TemporaryMemoryBase when TemporaryMemoryBase > PermanentMemoryBase.
46
47 **/
48 typedef
49 EFI_STATUS
50 (EFIAPI * TEMPORARY_RAM_MIGRATION)(
51 IN CONST EFI_PEI_SERVICES **PeiServices,
52 IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
53 IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
54 IN UINTN CopySize
55 );
56
57 ///
58 /// This service abstracts the ability to migrate contents of the platform early memory store.
59 ///
60 typedef struct {
61 TEMPORARY_RAM_MIGRATION TemporaryRamMigration;
62 } TEMPORARY_RAM_SUPPORT_PPI;
63
64 extern EFI_GUID gEfiTemporaryRamSupportPpiGuid;
65
66 #endif