1 | /** @file
|
---|
2 | Migrated FV information
|
---|
3 |
|
---|
4 | Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #ifndef __EDKII_MIGRATED_FV_INFO_GUID_H__
|
---|
10 | #define __EDKII_MIGRATED_FV_INFO_GUID_H__
|
---|
11 |
|
---|
12 | //
|
---|
13 | // FLAGS_FV_RAW_DATA_COPY indicates FV raw data will be copied to permanent memory
|
---|
14 | // or not. When FV is migrated to permanent memory, it will be rebased and raw
|
---|
15 | // data will be lost. This bit can be configured as below values:
|
---|
16 | // 0: FV raw data will not be used in later phase, and the copy will be skipped to
|
---|
17 | // optimize boot performance.
|
---|
18 | // 1: FV raw data will be copied to permanent memory for later phase use (such as
|
---|
19 | // FV measurement).
|
---|
20 | //
|
---|
21 | #define FLAGS_FV_RAW_DATA_COPY BIT0
|
---|
22 |
|
---|
23 | ///
|
---|
24 | /// In real use cases, not all FVs need migrate to permanent memory before TempRam tears
|
---|
25 | /// down. EDKII_MIGRATION_INFO hob should be published by platform to indicate which
|
---|
26 | /// FVs need migration to optimize boot performance. If this hob is not detected by Pei
|
---|
27 | /// Core, all FVs on TempRam will be migrated and FV raw data will also be copied.
|
---|
28 | /// Only one EDKII_MIGRATION_INFO hob should be published by platform, and this hob will
|
---|
29 | /// take effect only when migration feature is enabled by PCD.
|
---|
30 | ///
|
---|
31 | typedef struct {
|
---|
32 | UINT32 FvOrgBaseOnTempRam; // Original FV address on Temporary Ram
|
---|
33 | //
|
---|
34 | // FV Migration Flags:
|
---|
35 | // Bit0: Indicate to copy FV raw data or not
|
---|
36 | // Others: Reserved bits
|
---|
37 | //
|
---|
38 | UINT32 FvMigrationFlags;
|
---|
39 | } TO_MIGRATE_FV_INFO;
|
---|
40 |
|
---|
41 | typedef struct {
|
---|
42 | BOOLEAN MigrateAll; // Migrate all FVs and also copy FV raw data
|
---|
43 | //
|
---|
44 | // ToMigrateFvCount and ToMigrateFvInfo array indicate which FVs need be migrated, and
|
---|
45 | // these info should be ignored when MigrateAll field is set to TRUE.
|
---|
46 | //
|
---|
47 | UINT32 ToMigrateFvCount;
|
---|
48 | // TO_MIGRATE_FV_INFO ToMigrateFvInfo[];
|
---|
49 | } EDKII_MIGRATION_INFO;
|
---|
50 |
|
---|
51 | typedef struct {
|
---|
52 | UINT32 FvOrgBase; // original FV address
|
---|
53 | UINT32 FvNewBase; // new FV address
|
---|
54 | UINT32 FvDataBase; // original FV data, 0 means raw data is not copied
|
---|
55 | UINT32 FvLength; // Fv Length
|
---|
56 | } EDKII_MIGRATED_FV_INFO;
|
---|
57 |
|
---|
58 | extern EFI_GUID gEdkiiMigrationInfoGuid;
|
---|
59 | extern EFI_GUID gEdkiiMigratedFvInfoGuid;
|
---|
60 |
|
---|
61 | #endif // #ifndef __EDKII_MIGRATED_FV_INFO_GUID_H__
|
---|