]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / IntelFsp2WrapperPkg / Library / SecFspWrapperPlatformSecLibSample / SecRamInitData.c
1 /** @file
2 Sample to provide TempRamInitParams data.
3
4 Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <Library/PcdLib.h>
10 #include <FspEas.h>
11
12 typedef struct {
13 EFI_PHYSICAL_ADDRESS MicrocodeRegionBase;
14 UINT64 MicrocodeRegionSize;
15 EFI_PHYSICAL_ADDRESS CodeRegionBase;
16 UINT64 CodeRegionSize;
17 } FSPT_CORE_UPD;
18
19 typedef struct {
20 FSP_UPD_HEADER FspUpdHeader;
21 //
22 // If FSP spec version < 2.2, remove FSPT_ARCH_UPD structure.
23 // Else If FSP spec version >= 2.2 and FSP spec version < 2.4, use FSPT_ARCH_UPD structure.
24 // Else, use FSPT_ARCH2_UPD structure.
25 //
26 FSPT_ARCH2_UPD FsptArchUpd;
27 FSPT_CORE_UPD FsptCoreUpd;
28 } FSPT_UPD_CORE_DATA;
29
30 GLOBAL_REMOVE_IF_UNREFERENCED CONST FSPT_UPD_CORE_DATA FsptUpdDataPtr = {
31 {
32 0x4450555F54505346,
33 //
34 // UPD header revision must be equal or greater than 2 when the structure is compliant with FSP spec 2.2.
35 //
36 0x02,
37 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
38 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
39 },
40 //
41 // If FSP spec version < 2.2, remove FSPT_ARCH_UPD structure.
42 // Else If FSP spec version >= 2.2 and FSP spec version < 2.4, use FSPT_ARCH_UPD structure.
43 // Else, use FSPT_ARCH2_UPD structure.
44 //
45 {
46 0x02,
47 {
48 0x00, 0x00, 0x00
49 },
50 0x00000020,
51 0x00000000,
52 {
53 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
54 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
55 }
56 },
57 {
58 FixedPcdGet32 (PcdCpuMicrocodePatchAddress),
59 FixedPcdGet32 (PcdCpuMicrocodePatchRegionSize),
60 FixedPcdGet32 (PcdFlashCodeCacheAddress),
61 FixedPcdGet32 (PcdFlashCodeCacheSize),
62 }
63 };