Skip to content

Commit 246333f

Browse files
committed
BirchStream FSP (0041D92)
1 parent d793185 commit 246333f

34 files changed

+8212
-0
lines changed

BirchStreamFspBinPkg/ap/Fsp.fd

5.5 MB
Binary file not shown.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/** @file
2+
3+
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors may
14+
be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
This file is automatically generated. Please do NOT modify !!!
30+
31+
**/
32+
33+
#ifndef _CXL_NODE_HOB_
34+
#define _CXL_NODE_HOB_
35+
36+
#define CXL_NODE_HOB_GUID { 0xdd8ae009, 0xda5a, 0x44a3, { 0xbe, 0x18, 0xda, 0x0c, 0x16, 0xc5, 0xaf, 0x5c } }
37+
38+
#ifndef MAX_IIO_STACK
39+
#define MAX_IIO_STACK 16
40+
#endif
41+
42+
#ifndef MAX_CXL_HDM_RANGES
43+
#define MAX_CXL_HDM_RANGES 0x2 // Maximum number of CXL HDM ranges per CXL end device.
44+
#endif
45+
46+
#ifndef MAX_CXL_PER_SOCKET
47+
#define MAX_CXL_PER_SOCKET MAX_IIO_STACK
48+
#endif
49+
50+
#define CXL_NODE_ATTR_MEM BIT0
51+
#define CXL_NODE_ATTR_PERSISTENT BIT1
52+
#define CXL_NODE_ATTR_MEM_HW_INIT BIT2
53+
#define CXL_NODE_ATTR_ACCELERATOR BIT3
54+
#define CXL_NODE_ATTR_HOT_PLUGGABLE BIT4
55+
56+
typedef UINT32 CXL_NODE_ATTR;
57+
58+
#pragma pack(1)
59+
60+
//
61+
// CDAT DSEMTS EFI Memory Type and Attribute
62+
//
63+
typedef enum {
64+
CxlEfiConventionalMemory = 0x0,
65+
CxlEfiConventionalMemorySp = 0x1,
66+
CxlEfiReservedMemoryType = 0x2,
67+
MaxCxlEfiMemType
68+
} CXL_EFI_MEM_TYPE;
69+
70+
typedef struct {
71+
UINT32 RdLatency;
72+
UINT32 WrLatency;
73+
UINT32 RdBandwidth;
74+
UINT32 WrBandwidth;
75+
} CXL_PERF_DATA;
76+
77+
typedef struct {
78+
UINT64 SerialNumber;
79+
UINT16 VendorId;
80+
CXL_NODE_ATTR Attr;
81+
UINT32 Address;
82+
UINT32 Size;
83+
UINT8 Ways;
84+
UINT8 SocketBitmap;
85+
BOOLEAN AcpiSratSpMemFlag;
86+
CXL_EFI_MEM_TYPE EfiMemType;
87+
CXL_PERF_DATA InitiatorPerfData; // Performance data between device egress and initiator.
88+
CXL_PERF_DATA TargetPerfData; // Performance data of entire target memory region.
89+
CXL_PERF_DATA InitiatorTargetPerfData; // performance data between initiator and the device memory.
90+
} CXL_NODE_INFO;
91+
92+
typedef struct {
93+
UINT8 CxlNodeCount;
94+
//
95+
// CXL node info for UEFI memory map and ACPI tables construction
96+
//
97+
CXL_NODE_INFO CxlNodeInfo[MAX_IIO_STACK * MAX_CXL_HDM_RANGES];
98+
} CXL_NODE_SOCKET;
99+
100+
#pragma pack()
101+
102+
#endif //#ifndef _CXL_NODE_HOB_
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/** @file
2+
3+
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors may
14+
be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
This file is automatically generated. Please do NOT modify !!!
30+
31+
**/
32+
33+
#ifndef __FSP_ACPI_HOBS__
34+
#define __FSP_ACPI_HOBS__
35+
36+
//Typecast HOB pointer to APEI table structure of ACPI version 6.2
37+
#define FSP_RAS_ACPI_HOB_GUID { 0x826785ee, 0xa8e0, 0x4d8f, { 0x82, 0x6f, 0x54, 0x29, 0x2c, 0xe7, 0x6f, 0xe6 } }
38+
39+
//Typecast HOB pointer to ACPI CXL CEDT table structure
40+
#define FSP_CXL_CEDT_ACPI_HOB_GUID { 0x5CB7A12A, 0x8B2D, 0x485A, { 0xB7, 0x04, 0xC0, 0x52, 0x49, 0x56, 0x81, 0xE7 } }
41+
42+
// Typecast HOB pointer to MEM_TRAINING_DATA_HOB_HEADER.
43+
// User with NDA clearance should refer to RC code for latest structure definition.
44+
#define FSP_MEM_TRAINING_DATA_HOB_GUID { 0x7e8b89e2, 0x8b84, 0x4cb3, { 0x86, 0x8f, 0x10, 0xb6, 0x78, 0x71, 0xa2, 0xc0 }}
45+
46+
// Typecast HOB pointer to EWL_PRIVATE_DATA.
47+
// User with NDA clearance should refer to RC code for latest structure definition.
48+
#define FSP_EWL_ID_HOB_GUID { 0xd8e05800, 0x5e, 0x4462, { 0xaa, 0x3d, 0x9c, 0x6b, 0x47, 0x4, 0x92, 0xb } };
49+
50+
//Typecast HOB pointer to RAS_ACPI_PARAM_HOB_DATA;
51+
#define RAS_ACPI_PARAM_HOB_GUID {0x594dfe5c, 0x7a87, 0x49dc, { 0x8f, 0x33, 0xea, 0x83, 0x4d, 0x6f, 0x18, 0x90 } }
52+
53+
#endif // __FSP_ACPI_HOBS__
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/** @file
2+
3+
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors may
14+
be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
This file is automatically generated. Please do NOT modify !!!
30+
31+
**/
32+
33+
#ifndef __FSP_EDPC_PARAM__
34+
#define __FSP_EDPC_PARAM__
35+
36+
#pragma pack(1)
37+
typedef struct {
38+
UINT8 Segment;
39+
UINT8 Bus;
40+
UINT8 Device;
41+
UINT8 Function;
42+
} EDPC_DEV_INFO;
43+
44+
typedef struct {
45+
//
46+
// There are three possible statuses of Valid infomation
47+
// EPDC_INFO_VALID, EDPC_INFO_NOTIFIED, EDPC_INFO_CLEARED
48+
//
49+
UINT8 Valid;
50+
EDPC_DEV_INFO EdpcTrigger;
51+
EDPC_DEV_INFO EdpcRootPort;
52+
UINT8 NotifyType;
53+
} EDPC_INFO;
54+
55+
typedef struct {
56+
UINT16 OsNativeAerSupport;
57+
UINT16 Reserved;
58+
UINT64 Reserved1[400];
59+
EDPC_INFO EdpcInfo;
60+
UINT64 EmcaL1DirAddr;
61+
UINT8 EmcaEn;
62+
UINT8 ElogEn;
63+
UINT8 WheaEnabled;
64+
UINT8 WheaSupportEn;
65+
UINT64 ReadAckAddress;
66+
UINT64 OobReadAckAddress;
67+
UINT32 SoftwareSmi;
68+
} RAS_ACPI_PARAM;
69+
70+
#pragma pack()
71+
#endif // __FSP_EDPC_PARAM__
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/** @file
2+
3+
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors may
14+
be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
This file is automatically generated. Please do NOT modify !!!
30+
31+
**/
32+
33+
#ifndef _FSP_ERROR_INFO_HOB_H_
34+
#define _FSP_ERROR_INFO_HOB_H_
35+
36+
///
37+
/// GUID value indicating the FSP error information.
38+
///
39+
#define FSP_ERROR_INFO_HOB_GUID { 0x611e6a88, 0xadb7, 0x4301, { 0x93, 0xff, 0xe4, 0x73, 0x04, 0xb4, 0x3d, 0xa6 } }
40+
41+
#define FSP_ERROR_INFO_STATUS_CODE_TYPE (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED)
42+
///
43+
/// FSP Error Information Block.
44+
///
45+
#pragma pack(1)
46+
typedef struct {
47+
///
48+
/// GUID HOB header.
49+
///
50+
EFI_HOB_GUID_TYPE GuidHob;
51+
52+
///
53+
/// ReportStatusCode () type identifier.
54+
///
55+
EFI_STATUS_CODE_TYPE Type;
56+
57+
///
58+
/// ReportStatusCode () value.
59+
///
60+
EFI_STATUS_CODE_VALUE Value;
61+
62+
///
63+
/// ReportStatusCode () Instance number.
64+
///
65+
UINT32 Instance;
66+
67+
///
68+
/// Optional GUID which may be used to identify
69+
/// which internal component of the FSP was
70+
/// executing at the time of the error.
71+
///
72+
EFI_GUID CallerId;
73+
74+
///
75+
/// GUID identifying the nature of the fatal error.
76+
///
77+
EFI_GUID ErrorType;
78+
79+
///
80+
/// EFI_STATUS code describing the error encountered.
81+
///
82+
UINT32 Status;
83+
} FSP_ERROR_INFO_HOB;
84+
85+
#pragma pack()
86+
87+
#endif //_FSP_ERROR_INFO_H_
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/** @file
2+
3+
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors may
14+
be used to endorse or promote products derived from this software without
15+
specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
This file is automatically generated. Please do NOT modify !!!
30+
31+
**/
32+
33+
#ifndef _FSP_EXT_MEMORY_PPR_HOB_H_
34+
#define _FSP_EXT_MEMORY_PPR_HOB_H_
35+
36+
#include "FspGlobals.h"
37+
38+
#define FSP_EXT_MEMORY_PPR_HOB_GUID { 0x3956C6DA, 0x35B6, 0x4036, { 0x93, 0xE4, 0xB1, 0x51, 0x38, 0x60, 0x21, 0x1E } }
39+
40+
#pragma pack(1)
41+
42+
typedef struct FspExtPprAddr {
43+
UINT8 Status;
44+
UINT8 ErrorType;
45+
UINT8 Socket;
46+
UINT8 MemoryController;
47+
UINT8 Channel;
48+
UINT8 Dimm;
49+
UINT8 Bank;
50+
UINT32 Row;
51+
UINT8 Rank;
52+
} FSP_EXT_PPR_ADDR;
53+
54+
typedef struct FspExtPprDdrInfo {
55+
UINT8 Count;
56+
FSP_EXT_PPR_ADDR PprAddresses[FSP_MAX_PPR_ADDR_ENTRIES_DDR];
57+
} FSP_EXT_DDR_PPR_INFO;
58+
59+
typedef struct FspExtMemoryPprData {
60+
FSP_EXT_DDR_PPR_INFO DdrPprInfo;
61+
} FSP_EXT_MEMORY_PPR_DATA;
62+
63+
typedef struct FspExtMemoryPprHob {
64+
FSP_EXT_HEADER Header;
65+
FSP_EXT_MEMORY_PPR_DATA Data;
66+
} FSP_EXT_MEMORY_PPR_HOB;
67+
68+
#pragma pack()
69+
70+
#endif // _FSP_EXT_MEMORY_PPR_HOB_H_

0 commit comments

Comments
 (0)