From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4239DD818D2 for ; Mon, 24 Jul 2023 08:04:11 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fqxuWHkhayXQ1ygOcuTqEbrbU1zeW+xQf/FJolcTFdY=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-IronPort-AV:X-IronPort-AV:X-Received:X-ExtLoop1:X-IronPort-AV:X-IronPort-AV:X-Received:X-Received:X-Received:X-Received:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:X-Received:X-Received:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator:x-ms-publictraffictype:x-ms-traffictypediagnostic:x-ms-office365-filtering-correlation-id:x-ms-exchange-senderadcheck:x-ms-exchange-antispam-relay:x-microsoft-antispam-message-info:x-ms-exchange-antispam-messagedata-chunkcount:x-ms-exchange-antispam-messagedata-0:MIME-Version:X-MS-Exchange-CrossTenant-AuthAs:X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-Network-Message-Id:X-MS-Exchange-CrossTenant-originalarrivaltime:X-MS-Exchange-CrossTenant-fromentityheader:X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype:X-MS-Exchange-CrossTenant-userprincipalname:X-MS-Exchange-Transport-CrossTenantHeaders Stamped:X-OriginatorOrg:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:X-Gm-Message-State:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1690185849; v=1; b=On7ovNXxNp16u17CNbHff1X3LjYSbq9rR1RapZS3a90/bsSrUIJOkwKg9REa0AC13Ij1qUs0 vbRVmiOkyN3d4EWl1ZCwXqthEh2uzqeGmtATQw2CghOSuKzfWzq5vka14Ge+A9ryeXOuvFMV5ek VlksHFIyxtlHT0dylva8ypK8= X-Received: by 127.0.0.2 with SMTP id O6QCYY7687511xNOPALfhFIh; Mon, 24 Jul 2023 01:04:09 -0700 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.42928.1690185848878308894 for ; Mon, 24 Jul 2023 01:04:09 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10780"; a="433620276" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="433620276" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2023 01:04:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10780"; a="702774299" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="702774299" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 24 Jul 2023 01:03:58 -0700 X-Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 24 Jul 2023 01:03:58 -0700 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Mon, 24 Jul 2023 01:03:58 -0700 X-Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.49) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Mon, 24 Jul 2023 01:03:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKIjnwx+7myC78cYLV81CTV2lD3UoRyc40boKO5j9VIg4aW1pU+oYtx/xXbV1Np4JqpFzx5mH8xtx5bi1rTqYhm2gj7+u0+SoXNki8M5wYONo/uFTu8u0+9ZinWGEegmMNzR5fctnLGasSrRvbWQjiVl0cQV0aIbU5/abmmHcRwBlkjLIxxUolhagV3gMJJWtKyK8FWH8HHd0rTmG+MT13oVbDuHwuDiQngGYEnG7duyXDMfmDoMRkd6koh38zUI6jmFFiYPAkBTNtZ+qc7Xm4ZZ0tQjN6ioZQDts8BdYIO033rYh5ah1fjgzEq4URgZo0mCyS5TOu6KqC5CofsQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=h9llYtFXVyJXo4WlgtC1PftOKumGgq67iU0dGkiv0qM=; b=bw6O3VJ4X2bvkL+VRUIuQchRyQMsI4B05ydaY0vSVa4A9YhaS3AMO0q1HkI+bRxzbFnPOQcR0jLMPm3OSYJtKgLFoqdj6kdJtlxJe6xWyRIsUX8NO3nGPFhKMcrRZ2G/vbICfaGwRE/M7PnMyVHBHLHFTflG25Levv7dMjBe9vPN0mL7AvxbcwYry+qJd5O4I2Bb9hV/nRgW6pNgam0gNRODuadRPW8CCyCqPw50FqyQCi6TbDvLoT8Pc+3WQJ0bottocK42j2Q34T1aaMbpkZKtza/0e91himaCBZpn1UnKoLO6y9H3oRsvYO/c52nbZrsd4wWXE2OteM0n6gnJsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MW4PR11MB5776.namprd11.prod.outlook.com (2603:10b6:303:183::9) by SA1PR11MB8447.namprd11.prod.outlook.com (2603:10b6:806:3ac::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Mon, 24 Jul 2023 08:03:55 +0000 X-Received: from MW4PR11MB5776.namprd11.prod.outlook.com ([fe80::5842:74bc:4aaf:a4fb]) by MW4PR11MB5776.namprd11.prod.outlook.com ([fe80::5842:74bc:4aaf:a4fb%7]) with mapi id 15.20.6609.031; Mon, 24 Jul 2023 08:03:55 +0000 From: "Chaganty, Rangasai V" To: "Kasbekar, Saloni" , "devel@edk2.groups.io" CC: "Desimone, Nathaniel L" , "Oram, Isaac W" , "Chuang, Rosen" Subject: Re: [edk2-devel] [PATCH 7/8] AlderlakeSiliconPkg/SystemAgent: Add include headers Thread-Topic: [PATCH 7/8] AlderlakeSiliconPkg/SystemAgent: Add include headers Thread-Index: AQHZn7JJ13UblptKD0eFfoC61CO0la/Iy1sg Date: Mon, 24 Jul 2023 08:03:55 +0000 Message-ID: References: <6b58dd187980204b74c6ec718dad122674c213e1.1686851565.git.saloni.kasbekar@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5776:EE_|SA1PR11MB8447:EE_ x-ms-office365-filtering-correlation-id: 6864d31b-105e-4a81-685a-08db8c1c86c6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: XKYEDisyWTJKaVDuoP/vKkzBR6aIytOmuSgBCbb1nSUOAoPAIAWekMNv55OeomeXja1f71tdH8i0DJL4Yel+nJeu080U/hTBwOqIsWj7FuAx+EBxosfg94HuTvPaNU9OW/DaKZT4Ywzxx5VJGS19KEgPvVS7jjkhNrHSnJEI3X8PQ4AgxocAZtUaC2MLHUdS1CPtrlCaKkMucUvo/RxwKgandiPKz1dfI3rRuamwG2lph7126dZ575s/DDnS8nmOXZTlFate5rHVpT3NF6QHSAh0thWqPQntkq0IY5PsrAD0OMTLP2lWcl9kFf1acs8hxa2JF0I/jsZxjkbKfO24EPlttScM3I9VqiGAWYc+0vQqVbyUsKofZ6kJzr3w3J2WU1YMgK9R6p3s8O/bY0hi95GUMsv6MYgdnOEnzNMvg8hu+sf1crLOCdR2jgTsEzx9TZ1/5sYjPezQWsmSGsZuT7BOYfFeDNugL10hIpBY3lCXx8+KL0ngXWK6u0o5CAwQx0807LuS2vT2kbC2fWq52VoTL/MvN5djNCDv8ogvE+7HCAxhcA90J+tiN22Z2p0dOJ7pXyMFNI69XD2NA0uukLSac6s++A4gMoxj6IHxuwAPjOlYO2nCBBeBYjcbZRPj x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?H984h8Kc+eTRxgVyPTAX0oEJPQ4IYbCQsgMUsdLShyQ1XPZqNvoJI3udB9aK?= =?us-ascii?Q?URKUHoPcmwB9Sx92dxmC7X2HNyifJZHPEfDQZU+wL5twKf3fS9aCg6CnUQpw?= =?us-ascii?Q?bnIrGP3DOPPozUj9JOqXwDQ0h34YLghKIBd53F0ijpReNdV3EKW4rqH2URtK?= =?us-ascii?Q?z4oSrjfgOjcuWLQTrFpSlWmpjLOGCOyCk5Plkcy/CqrMcm07XBjhV/oZ9msN?= =?us-ascii?Q?71mReJje5QobWZNv5azin7M+fMAvM2dp2Y4g9fsnAaV/u1s0ZxEq1c3p5Iwe?= =?us-ascii?Q?amRhW29UD1m6JeEaIW9layT2pvY49PoeE4BTf6nMGnl2OmhthszW/wGEo43y?= =?us-ascii?Q?JI8w/5zS2Z4qdALpyESaK8V0/t65cNxdYqO3+i//YKvKDA4ESZcsq78m9iz/?= =?us-ascii?Q?kusw7BeomzFwyo6r4/2TY3p5Oq56BgBQLmMOhS0FGR4pMDb7hcdUbXsPFIx7?= =?us-ascii?Q?YK7lG5+yz0vdlrpzSClUNhLBtFHtgNYFyNE7iWPJ9O2xD8uVexSX0sTimcDz?= =?us-ascii?Q?SQTYbc0Qib+w4I/mKKvE8de7HfuXxwdr83021AYzGTMIug3tB5SV2UDxWLr6?= =?us-ascii?Q?Cv2lQYq40Rvsca51co1HPf9dV5175+veEdWd2u2PXvoPC9bvYsJQSmX+w2ZN?= =?us-ascii?Q?PLn05BwtIHgvw7dKbv53Ryi5MGaj8EXcTuvJs4oCQnch9kJ23iouWsuXWmJq?= =?us-ascii?Q?E6Qhwq9isdr7eavHR9OFim5cbkAqN9S+J2/n4sZjsTTNoCQuCMtrY1SYQHfG?= =?us-ascii?Q?Ed4SYwmKs0ldRz6zNqzCcz/5Fb+mLpq454DkMTZASSix+iIPvg10ihLijdtc?= =?us-ascii?Q?aS/ZwIEL5N3UQEFFEgEXAbcwRMmAsprvSFpo6rjC6AmapfxglMM4P8aGmyFt?= =?us-ascii?Q?jtbM9RA425z18BcPE4fFtCIS8Fq1sPu11+Jo5BpHb3j7A3YH7r1QntSa+yvl?= =?us-ascii?Q?7nUxSKHY3mpnHjCXYdryyM/dEsHfoTtcXIrBSjVMXhxFsck8enGsDeKGPMW+?= =?us-ascii?Q?eAUY8bQ0rUz+GR4S41m5Ys+MOgOhJOo4x8/m7DscQ4jRESodQImklWGneH2b?= =?us-ascii?Q?FBWtwGK62Kcxifg2lOMzqMKyJeUn7eThy7ILxOqxZBdNMWib7FXJ3MPv5bKc?= =?us-ascii?Q?Va6gFHFvHmE62t4pgJcTLMTaEVbnOnE7d1HdbHBlOSf2oQURncHNMf3YvsnH?= =?us-ascii?Q?Kc4o112eHxXtaOsyeJKU3f0lfQzi8UKyNQfvLMs0YiZp/FB9+NGY3cEsHDkQ?= =?us-ascii?Q?MeX+46TFKw20EdejFURmVOpnMgT9iR9cqv46qiYI5sQEVtjXE5TV5AckbMYd?= =?us-ascii?Q?U4cB+XYiyZYn2mxEY9GtOAFWMOJ9j+F3wLVn22TnHYA1vJsyDAiOHy1qHQuV?= =?us-ascii?Q?7QH9iqwmzlqGPIGAoORGJdfcFo9xpJvzakEM0wux3WaZED41i/NXiau9hzzr?= =?us-ascii?Q?f3KsyGZJ/D8GrxL0lIAfggbmJEhP7tzUG/cuRcuMu9F+FFiolhRAxRS9yk21?= =?us-ascii?Q?zIVumlhYN3GJE52IXT7QvzFniFuo5UV/UGwb9caxW/MObLOf3q10YjzSlSUF?= =?us-ascii?Q?D+HQ5+eH98YiDotON3aDsqHsMv1qyvXRl6jFGCm90aGQ79lffnud5w39JPf7?= =?us-ascii?Q?9g=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5776.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6864d31b-105e-4a81-685a-08db8c1c86c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2023 08:03:55.0596 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ydGDxN+JPxY1A9g3A5npT0/ik6cfqwzn+N7Saye4rE0/Pq0R5PjftjhrwpLkRAEMDdbfAD3HGVO8Fi92QSIof59QqxoisBM5t1yUEOFbOic= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8447 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rangasai.v.chaganty@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: rFw4KRswyliELlYG2NgaklaAx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=On7ovNXx; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Reviewed-by: Sai Chaganty -----Original Message----- From: Kasbekar, Saloni =20 Sent: Thursday, June 15, 2023 10:53 AM To: devel@edk2.groups.io Cc: Kasbekar, Saloni ; Chaganty, Rangasai V ; Desimone, Nathaniel L ; Oram, Isaac W ; Chuang, Rosen Subject: [PATCH 7/8] AlderlakeSiliconPkg/SystemAgent: Add include headers Adds the following header files: * SystemAgent/Include Cc: Sai Chaganty Cc: Nate DeSimone Cc: Isaac Oram Cc: Rosen Chuang Signed-off-by: Saloni Kasbekar --- .../Include/ConfigBlock/MemoryDxeConfig.h | 126 ++++++++++ .../ConfigBlock/SaMiscPeiPreMemConfig.h | 112 +++++++++ .../Include/Library/DxeSaPolicyLib.h | 58 +++++ .../Include/Library/PeiSaPolicyLib.h | 13 ++ .../SystemAgent/Include/MemInfoHob.h | 220 ++++++++++++++++++ .../SystemAgent/Include/Protocol/SaPolicy.h | 54 +++++ .../SystemAgent/Include/SaDataHob.h | 28 +++ 7 files changed, 611 insertions(+) create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/C= onfigBlock/MemoryDxeConfig.h create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/C= onfigBlock/SaMiscPeiPreMemConfig.h create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/L= ibrary/DxeSaPolicyLib.h create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/L= ibrary/PeiSaPolicyLib.h create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/M= emInfoHob.h create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/P= rotocol/SaPolicy.h create mode 100644 Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/S= aDataHob.h diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/ConfigBl= ock/MemoryDxeConfig.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Inclu= de/ConfigBlock/MemoryDxeConfig.h new file mode 100644 index 0000000000..eca0c2f1ba --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/ConfigBlock/ +++ MemoryDxeConfig.h @@ -0,0 +1,126 @@ +/** @file + Memory DXE Policy definitions + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_MEMORY_DXE_CONFIG_H_ #define _MEMORY_DXE_CONFIG_H_ + +#pragma pack(push, 1) + +/** + Making any setup structure change after code frozen will need to=20 +maintain backward compatibility, bump up structure revision and update=20 +below history table\n + Revision 1: - Initial version. +**/ +#define MEMORY_DXE_CONFIG_REVISION 2 + +typedef struct _MEMORY_DXE_CONFIG MEMORY_DXE_CONFIG; + +/** + Retrieves the OEM custom string for the SMBIOS Type 17 Table DeviceLocat= or field. + Implementation of this function is optional, if this function pointer=20 +is NULL then + the reference implementation of DeviceLocator will be used. + + @param[in] This A pointer to this instance of = MEMORY_DXE_CONFIG. + @param[in] Controller Desired Controller to get a De= viceLocator string for. + @param[in] Dimm Desired DIMM to get a DeviceLo= cator string for. + @param[in] MdSocket 0 =3D Memory Down, 1 =3D Socke= ted. + + @retval The DeviceLocator string + @retval NULL If the return value is NULL, t= he default value will be used. +**/ +typedef +CHAR8* +(EFIAPI *MEMORY_DXE_CONFIG_GET_DEVICE_LOCATOR_STRING)( + IN CONST MEMORY_DXE_CONFIG *This, + IN UINT8 Controller, + IN UINT8 Dimm, + IN UINT8 MdSocket + ); + +/** + Retrieves the OEM custom string for the SMBIOS Type 17 Table BankLocator= field. + Implementation of this function is optional, if this function pointer=20 +is NULL then + the reference implementation of DeviceLocator will be used. + + @param[in] This A pointer to this instance of = MEMORY_DXE_CONFIG. + @param[in] Controller Desired Controller to get a Ba= nkLocator string for. + @param[in] Dimm Desired DIMM to get a BankLoca= tor string for. + @param[in] MdSocket 0 =3D Memory Down, 1 =3D Socke= ted. + + @retval The BankLocator string + @retval NULL If the return value is NULL, t= he default value will be used. +**/ +typedef +CHAR8* +(EFIAPI *MEMORY_DXE_CONFIG_GET_BANK_LOCATOR_STRING)( + IN CONST MEMORY_DXE_CONFIG *This, + IN UINT8 Controller, + IN UINT8 Dimm, + IN UINT8 MdSocket + ); + +/** + The Memory Configuration includes DIMM SPD address Map and DIMM Slot Mec= hanical present bit map. + The data elements should be initialized by a Platform Module.\n + Revision 1: + - Initial version. +**/ +struct _MEMORY_DXE_CONFIG { + CONFIG_BLOCK_HEADER Header; ///< Offset 0-27: Config= Block Header +/** + Offset 28: + Dimm SPD address + Only Server support 2 channels * 3 slots per channel =3D 6 sockets=20 +totally + The Desktop and mobile only support 2 channels * 2 slots per channel=20 +=3D 4 sockets totally + So there is mapping rule here for Desktop and mobile that there are no m= ore 4 DIMMS totally in a system: + Channel A/ Slot 0 --> Dimm 0 --> SpdAddressTable[0] + Channel A/ Slot 1 --> Dimm 1 --> SpdAddressTable[1] + Channel B/ Slot 0 --> Dimm 2 --> SpdAddressTable[2] + Channel B/ Slot 1 --> Dimm 3 --> SpdAddressTable[3] + Refer to SmbiosMemory.c for use + If change the mapping rule, please update the Revision number. +**/ + UINT8 *SpdAddressTable; +/** + Offset 36: + ChannelASlotMap and ChannelBSlotMap change to use SlotMap as the DIMM sl= ot map solution. + Reserve 2-bytes in order to comply with 4-bytes alignment and keep the o= ffset of other members. +**/ + UINT8 ChannelASlotMap; + UINT8 ChannelBSlotMap; +/** + Offset 38: + MRC execution time measurement: 0=3DDisable, 1=3DEnable **/ + UINT8 MrcTimeMeasure; +/** + Offset 39: + Fast boot: 0=3DDisable, 1=3DEnable **/ + UINT8 MrcFastBoot; +/** + Offset 40: + Retrieves the OEM custom string for the SMBIOS Type 17 Table DeviceLocat= or field. +**/ + MEMORY_DXE_CONFIG_GET_DEVICE_LOCATOR_STRING GetDeviceLocatorString; +/** + Offset 48: + Retrieves the OEM custom string for the SMBIOS Type 17 Table BankLocator= field. +**/ + MEMORY_DXE_CONFIG_GET_BANK_LOCATOR_STRING GetBankLocatorString; +/** + Offset 56: + Each DIMM Slot Mechanical present bit map, bit 0 -> DIMM 0, bit 1 -> DIM= M1, ... + if the bit is 1, the related DIMM slot is present. + E.g. if memory controller 0 channel 3 has 2 DIMMs, SlotMap[0][3] =3D=20 +0x03; + E.g. if memory controller 1 channel 2 has only 1 DIMMs, =20 +SlotMap[1][2] =3D 0x0; **/ + UINT8 **SlotMap; +}; +#pragma pack(pop) + +#endif // _MEMORY_DXE_CONFIG_H_ diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/ConfigBl= ock/SaMiscPeiPreMemConfig.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent= /Include/ConfigBlock/SaMiscPeiPreMemConfig.h new file mode 100644 index 0000000000..cb75696b61 --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/ConfigBlock/ +++ SaMiscPeiPreMemConfig.h @@ -0,0 +1,112 @@ +/** @file + Policy details for miscellaneous configuration in System Agent + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_SA_MISC_PEI_PREMEM_CONFIG_H_ #define _SA_MISC_PEI_PREMEM_CONFIG_H_ + +#pragma pack(push, 1) + +#ifndef MEM_CFG_MAX_SOCKETS +#define MEM_CFG_MAX_SOCKETS 16 +#endif + +#define SA_MISC_PEI_PREMEM_CONFIG_REVISION 1 + +/** + This configuration block is to configure SA Miscellaneous variables=20 +during PEI Pre-Mem phase like programming + different System Agent BARs, TsegSize, MmioSize required etc. + Revision 1: + - Initial version. +**/ +typedef struct { + CONFIG_BLOCK_HEADER Header; ///< Offset 0-27 Config Block= Header + /** + Offset 28 Memory DIMMs' SPD address for reading SPD data. + TGL Mapping + 0 - Controller 0 Channel 0 Dimm 0 - DDR4 - DDR5 - LPDDR4 - LPDDR5 + 1 - Controller 0 Channel 0 Dimm 1 - DDR4 + 2 - Controller 0 Channel 1 Dimm 0 -------- DDR5 - LPDDR4 - LPDDR5 + 3 - Controller 0 Channel 1 Dimm 1 -------- DDR5 2DPC + 4 - Controller 0 Channel 2 Dimm 0 --------------- LPDDR4 - LPDDR5 + 6 - Controller 0 Channel 3 Dimm 0 --------------- LPDDR4 - LPDDR5 + 8 - Controller 1 Channel 0 Dimm 0 - DDR4 - DDR5 - LPDDR4 - LPDDR5 + 9 - Controller 1 Channel 0 Dimm 1 - DDR4 + 10 - Controller 1 Channel 1 Dimm 0 -------- DDR5 - LPDDR4 - LPDDR5 + 11 - Controller 1 Channel 1 Dimm 1 -------- DDR5 2DPC + 12 - Controller 1 Channel 2 Dimm 0 --------------- LPDDR4 - LPDDR5 + 14 - Controller 1 Channel 3 Dimm 0 --------------- LPDDR4 - LPDDR5 + **/ + UINT8 SpdAddressTable[MEM_CFG_MAX_SOCKETS]; + VOID *S3DataPtr; ///< Offset 44 Memory data sa= ve pointer for S3 resume. The memory space should be allocated and filled w= ith proper S3 resume data on a resume path + UINT32 SmbusBar; ///< Offset 48 Address of Sys= tem Agent SMBUS BAR: 0xEFA0 + /** + Offset 52 Size of TSEG in bytes. (Must be power of 2) + 0x400000: 4MB for Release build (When IED enabled, it will be 8= MB) + 0x1000000 : 16MB for Debug build (Regardless IED enabled or disab= led) + **/ + UINT32 TsegSize; + /** + Offset 56 + (Test) Size of IED region in bytes. + 0 : IED Disabled (no memory occupied) + 0x400000 : 4MB SMM memory occupied by IED (Part of TSEG) + Note: Enabling IED may also enlarge TsegSize together. + @deprecated + **/ + UINT32 IedSize; + UINT32 SkipExtGfxScan:1; ///< (Test) OFfset 60:= 0 :1=3DSkip External Gfx Device Scan; 0=3DScan for external graphics dev= ices. Set this policy to skip External Graphics card scanning if the pl= atform uses Internal Graphics only. + UINT32 BdatEnable:1; ///< Offset 60:1 :This field = enables the generation of the BIOS DATA ACPI Tables: 0=3DFALSE, 1=3D= TRUE. + UINT32 TxtImplemented:1; ///< OFfset 60:2 :This field = currently is used to tell MRC if it should run after TXT initializatoin com= pleted: 0=3DRun without waiting for TXT, 1=3DRun after TXT initializ= ation by callback + /** + Offset 60:3 : + (Test) Scan External Discrete Graphics Devices for Legacy=20 +Only VGA OpROMs + + When enabled, if the primary graphics device is an external discrete gr= aphics device, Si will scan the + graphics device for legacy only VGA OpROMs. + + This is intended to ease the implementation of a BIOS feature to automa= tically enable CSM if the Primary Gfx device + only supports Legacy VBIOS (No UEFI GOP Present). Otherwise disabling = CSM won't result in no video being displayed. + This is useful for platforms that implement PCIe slots that allow the e= nd user to install an arbitrary Gfx device. + + This setting will only take effect if SkipExtGfxScan =3D=3D 0. It is i= gnored otherwise. + + - Disabled (0x0) : Don't Scan for Legacy Only VGA OpROMs (Defaul= t) + - Enabled (0x1) : Scan External Gfx for Legacy Only VGA=20 + OpROM **/ + UINT32 ScanExtGfxForLegacyOpRom:1; + UINT32 RsvdBits0 :28; ///< Offset 60:4 :Reserved fo= r future use + UINT8 UserBd; ///< Offset 64 0=3DMobile/= Mobile Halo, 1=3DDesktop/DT Halo, 2=3DDesktop 2DPC DDR5, 5=3DULT/ULX/Mo= bile Halo Type3, 6=3DULT/ULX/Mobile Halo Type4, 8=3DUP Server + UINT8 LockPTMregs; ///< (Test) Offset 65 = Lock PCU Thermal Management registers: 0=3DFALSE, 1=3DTRUE + UINT8 BdatTestType; ///< Offset 66 When BdatEnabl= e is set to TRUE, this option selects the type of data which will be popula= ted in the BIOS Data ACPI Tables: 0=3DRMT, 1=3DRMT Per Bit, 2=3DMarg= in 2D. + UINT8 CridEnable; ///< Offset 67 For Platforms = supporting Intel(R) SIPP, this policy is use control enable/disable Compati= bility Revision ID (CRID) feature: 0=3DFALSE, 1=3DTRUE + UINT32 AcpiReservedMemorySize; ///< Offset 68 The Size of a = Reserved memory buffer allocated in previous boot for S3 resume used. Origi= nally it is retrieved from AcpiVariableCompatibility variable. + UINT64 AcpiReservedMemoryBase; ///< Offset 80 The Base addre= ss of a Reserved memory buffer allocated in previous boot for S3 resume use= d. Originally it is retrieved from AcpiVariableCompatibility variable. + UINT64 SystemMemoryLength; ///< Offset 88 Total system m= emory length from previous boot, this is required for S3 resume. Originally= it is retrieved from AcpiVariableCompatibility variable. + + UINT8 WrcFeatureEnable; ///< Offset 96: Enable/Disab= le WRC (Write Cache) feature of IOP. When enabled, supports IO devices allo= cating onto the ring and into LLC. + UINT8 FirstDimmBitMask; ///< Offset 97: Defines whic= h DIMM should be populated first on a 2DPC board. + ///< 4 bit mask: = Bit[0]: MC0 DIMM0, Bit[1]: MC0 DIMM1, Bit[2]: MC1 DIMM0, Bit[3]: MC1 DIMM1. + ///< For each MC,= the first DIMM to be populated should be set to '1'. + ///< Note: this m= ask is only for non-ECC DIMM. + UINT8 FirstDimmBitMaskEcc; ///< Offset 98: Defines whic= h ECC DIMM should be populated first on a 2DPC board. + ///< 4 bit mask: = Bit[0]: MC0 DIMM0, Bit[1]: MC0 DIMM1, Bit[2]: MC1 DIMM0, Bit[3]: MC1 DIMM1. + ///< For each MC,= the first DIMM to be populated should be set to '1'. + ///< For example,= if one MC is T-topology, there is no special population rule, can put it a= s 11 for this MC and it means either D0 or D1 can be + ///< be populated= firstly. + ///< Note: this m= ask is only for ECC DIMM, not for non-ECC DIMM. + + UINT8 DisableMrcRetrainingOnRtcPowerLoss; ///< Offset 99: Enable/Disab= le DisableMrcRetrainingOnRtcPowerLoss. + + + // Since the biggest element is UINT64, this structure should be aligned= with 64 bits. + UINT8 Rsvd[4]; ///< Reserved for config bloc= k alignment. + UINT8 ResizableBarSupport; + + UINT8 Rsrvd1[7]; +} SA_MISC_PEI_PREMEM_CONFIG; +#pragma pack(pop) + +#endif // _SA_MISC_PEI_PREMEM_CONFIG_H_ diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Library/= DxeSaPolicyLib.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Li= brary/DxeSaPolicyLib.h new file mode 100644 index 0000000000..5f5eeeeb63 --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Library/DxeS +++ aPolicyLib.h @@ -0,0 +1,58 @@ +/** @file + Prototype of the DxeSaPolicyLib library. + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_DXE_SA_POLICY_LIB_H_ #define _DXE_SA_POLICY_LIB_H_ + +#include + +/** + This function prints the DXE phase policy. + + @param[in] SaPolicy - SA DXE Policy protocol +**/ +VOID +SaPrintPolicyProtocol ( + IN SA_POLICY_PROTOCOL *SaPolicy + ) +; + +/** + CreateSaDxeConfigBlocks generates the config blocksg of SA DXE Policy. + It allocates and zero out buffer, and fills in the Intel default setting= s. + + @param[out] SaPolicy The pointer to get SA Policy Proto= col instance + + @retval EFI_SUCCESS The policy default is initialized. + @retval EFI_OUT_OF_RESOURCES Insufficient resources to create b= uffer +**/ +EFI_STATUS +EFIAPI +CreateSaDxeConfigBlocks( + IN OUT SA_POLICY_PROTOCOL **SaPolicy +); + +/** + SaInstallPolicyProtocol installs SA Policy. + While installed, RC assumes the Policy is ready and finalized. So=20 +please update and override + any setting before calling this function. + + @param[in] ImageHandle Image handle of this driver. + @param[in] SaPolicy The pointer to SA Policy Protocol = instance + + @retval EFI_SUCCESS The policy is installed. + @retval EFI_OUT_OF_RESOURCES Insufficient resources to create b= uffer + +**/ +EFI_STATUS +EFIAPI +SaInstallPolicyProtocol ( + IN EFI_HANDLE ImageHandle, + IN SA_POLICY_PROTOCOL *SaPolicy + ) +; + +#endif // _DXE_SA_POLICY_LIB_H_ diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Library/= PeiSaPolicyLib.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Li= brary/PeiSaPolicyLib.h new file mode 100644 index 0000000000..8b941b4420 --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Library/PeiS +++ aPolicyLib.h @@ -0,0 +1,13 @@ +/** @file + Prototype of the PeiSaPolicy library. + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_PEI_SA_POLICY_LIB_H_ #define _PEI_SA_POLICY_LIB_H_ + +#include +#include + +#endif // _PEI_SA_POLICY_LIBRARY_H_ diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/MemInfoH= ob.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/MemInfoHob.h new file mode 100644 index 0000000000..d6c670d4ce --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/MemInfoHob.h @@ -0,0 +1,220 @@ +/** @file + This file contains definitions required for creation of + Memory S3 Save data, Memory Info data and Memory Platform + data hobs. + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_MEM_INFO_HOB_H_ #define _MEM_INFO_HOB_H_ + + +#pragma pack (push, 1) + +extern EFI_GUID gSiMemoryS3DataGuid; +extern EFI_GUID gSiMemoryInfoDataGuid; +extern EFI_GUID gSiMemoryPlatformDataGuid; + +#define MAX_NODE 2 +#define MAX_CH 4 +#define MAX_DIMM 2 +#define HOB_MAX_SAGV_POINTS 4 + +/// +/// Defines taken from MRC so avoid having to include MrcInterface.h=20 +/// + +// +// Matches MAX_SPD_SAVE define in MRC +// +#ifndef MAX_SPD_SAVE +#define MAX_SPD_SAVE 29 +#endif + +// +// MRC version description. +// +typedef struct { + UINT8 Major; ///< Major version number + UINT8 Minor; ///< Minor version number + UINT8 Rev; ///< Revision number + UINT8 Build; ///< Build number +} SiMrcVersion; + +// +// Matches MrcChannelSts enum in MRC +// +#ifndef CHANNEL_NOT_PRESENT +#define CHANNEL_NOT_PRESENT 0 // There is no channel present on the c= ontroller. +#endif +#ifndef CHANNEL_DISABLED +#define CHANNEL_DISABLED 1 // There is a channel present but it is= disabled. +#endif +#ifndef CHANNEL_PRESENT +#define CHANNEL_PRESENT 2 // There is a channel present and it is= enabled. +#endif + +// +// Matches MrcDimmSts enum in MRC +// +#ifndef DIMM_ENABLED +#define DIMM_ENABLED 0 // DIMM/rank Pair is enabled, presence will be= detected. +#endif +#ifndef DIMM_DISABLED +#define DIMM_DISABLED 1 // DIMM/rank Pair is disabled, regardless of p= resence. +#endif +#ifndef DIMM_PRESENT +#define DIMM_PRESENT 2 // There is a DIMM present in the slot/rank pa= ir and it will be used. +#endif +#ifndef DIMM_NOT_PRESENT +#define DIMM_NOT_PRESENT 3 // There is no DIMM present in the slot/rank p= air. +#endif + +// +// Matches MrcDdrType enum in MRC +// +#ifndef MRC_DDR_TYPE_DDR5 +#define MRC_DDR_TYPE_DDR5 1 +#endif +#ifndef MRC_DDR_TYPE_LPDDR5 +#define MRC_DDR_TYPE_LPDDR5 2 +#endif +#ifndef MRC_DDR_TYPE_LPDDR4 +#define MRC_DDR_TYPE_LPDDR4 3 +#endif +#ifndef MRC_DDR_TYPE_UNKNOWN +#define MRC_DDR_TYPE_UNKNOWN 4 +#endif + +#define MAX_PROFILE_NUM 7 // number of memory profiles supported +#define MAX_XMP_PROFILE_NUM 5 // number of XMP profiles supported + +// +// DIMM timings +// +typedef struct { + UINT32 tCK; ///< Memory cycle time, in femtoseconds. + UINT16 NMode; ///< Number of tCK cycles for the channel DIMM's comma= nd rate mode. + UINT16 tCL; ///< Number of tCK cycles for the channel DIMM's CAS l= atency. + UINT16 tCWL; ///< Number of tCK cycles for the channel DIMM's minim= um CAS write latency time. + UINT16 tFAW; ///< Number of tCK cycles for the channel DIMM's minim= um four activate window delay time. + UINT16 tRAS; ///< Number of tCK cycles for the channel DIMM's minim= um active to precharge delay time. + UINT16 tRCDtRP; ///< Number of tCK cycles for the channel DIMM's minim= um RAS# to CAS# delay time and Row Precharge delay time. + UINT16 tREFI; ///< Number of tCK cycles for the channel DIMM's minim= um Average Periodic Refresh Interval. + UINT16 tRFC; ///< Number of tCK cycles for the channel DIMM's minim= um refresh recovery delay time. + UINT16 tRFCpb; ///< Number of tCK cycles for the channel DIMM's minim= um per bank refresh recovery delay time. + UINT16 tRFC2; ///< Number of tCK cycles for the channel DIMM's minim= um refresh recovery delay time. + UINT16 tRFC4; ///< Number of tCK cycles for the channel DIMM's minim= um refresh recovery delay time. + UINT16 tRPab; ///< Number of tCK cycles for the channel DIMM's minim= um row precharge delay time for all banks. + UINT16 tRRD; ///< Number of tCK cycles for the channel DIMM's minim= um row active to row active delay time. + UINT16 tRRD_L; ///< Number of tCK cycles for the channel DIMM's minim= um row active to row active delay time for same bank groups. + UINT16 tRRD_S; ///< Number of tCK cycles for the channel DIMM's minim= um row active to row active delay time for different bank groups. + UINT16 tRTP; ///< Number of tCK cycles for the channel DIMM's minim= um internal read to precharge command delay time. + UINT16 tWR; ///< Number of tCK cycles for the channel DIMM's minim= um write recovery time. + UINT16 tWTR; ///< Number of tCK cycles for the channel DIMM's minim= um internal write to read command delay time. + UINT16 tWTR_L; ///< Number of tCK cycles for the channel DIMM's minim= um internal write to read command delay time for same bank groups. + UINT16 tWTR_S; ///< Number of tCK cycles for the channel DIMM's minim= um internal write to read command delay time for different bank groups. + UINT16 tCCD_L; ///< Number of tCK cycles for the channel DIMM's minimum= CAS-to-CAS delay for same bank group. +} MRC_CH_TIMING; + +typedef struct { + UINT16 tRDPRE; ///< Read CAS to Precharge cmd delay +} MRC_IP_TIMING; + +/// +/// Memory SMBIOS & OC Memory Data Hob +/// +typedef struct { + UINT8 Status; ///< See MrcDimmStatus for the= definition of this field. + UINT8 DimmId; + UINT32 DimmCapacity; ///< DIMM size in MBytes. + UINT16 MfgId; + UINT8 ModulePartNum[20]; ///< Module part number for DD= R3 is 18 bytes however for DRR4 20 bytes as per JEDEC Spec, so reserving 20= bytes + UINT8 RankInDimm; ///< The number of ranks in th= is DIMM. + UINT8 SpdDramDeviceType; ///< Save SPD DramDeviceType i= nformation needed for SMBIOS structure creation. + UINT8 SpdModuleType; ///< Save SPD ModuleType infor= mation needed for SMBIOS structure creation. + UINT8 SpdModuleMemoryBusWidth; ///< Save SPD ModuleMemoryBusW= idth information needed for SMBIOS structure creation. + UINT8 SpdSave[MAX_SPD_SAVE]; ///< Save SPD Manufacturing in= formation needed for SMBIOS structure creation. + UINT16 Speed; ///< The maximum capable speed= of the device, in MHz + UINT8 MdSocket; ///< MdSocket: 0 =3D Memory Do= wn, 1 =3D Socketed. Needed for SMBIOS structure creation. +} DIMM_INFO; + +typedef struct { + UINT8 Status; ///< Indicates whether this ch= annel should be used. + UINT8 ChannelId; + UINT8 DimmCount; ///< Number of valid DIMMs tha= t exist in the channel. + MRC_CH_TIMING Timing[MAX_PROFILE_NUM]; ///< The channel timing values= . + DIMM_INFO DimmInfo[MAX_DIMM]; ///< Save the DIMM output char= acteristics. +} CHANNEL_INFO; + +typedef struct { + UINT8 Status; ///< Indicates whether this co= ntroller should be used. + UINT16 DeviceId; ///< The PCI device id of this= memory controller. + UINT8 RevisionId; ///< The PCI revision id of th= is memory controller. + UINT8 ChannelCount; ///< Number of valid channels = that exist on the controller. + CHANNEL_INFO ChannelInfo[MAX_CH]; ///< The following are channel= level definitions. +} CONTROLLER_INFO; + +/// This data structure contains per-SaGv timing values that are considere= d output by the MRC. +typedef struct { + UINT32 DataRate; ///< The memory rate for the current SaGv Poi= nt in units of MT/s + MRC_CH_TIMING JedecTiming; ///< Timings used for this entry's correspond= ing SaGv Point - derived from JEDEC SPD spec + MRC_IP_TIMING IpTiming; ///< Timings used for this entry's correspond= ing SaGv Point - IP specific +} HOB_SAGV_TIMING_OUT; + +/// This data structure contains SAGV config values that are considered ou= tput by the MRC. +typedef struct { + UINT32 NumSaGvPointsEnabled; ///< Count of the total number= of SAGV Points enabled. + UINT32 SaGvPointMask; ///< Bit mask where each bit i= ndicates an enabled SAGV point. + HOB_SAGV_TIMING_OUT SaGvTiming[HOB_MAX_SAGV_POINTS]; } HOB_SAGV_INFO; + +typedef struct { + UINT8 Revision; + UINT16 DataWidth; ///< Data width, in bits, of t= his memory device + /** As defined in SMBIOS 3.0 spec + Section 7.18.2 and Table 75 + **/ + UINT8 MemoryType; ///< DDR type: DDR3, DDR4, or = LPDDR3 + UINT16 MaximumMemoryClockSpeed;///< The maximum capable speed= of the device, in megahertz (MHz) + UINT16 ConfiguredMemoryClockSpeed; ///< The configured clock = speed to the memory device, in megahertz (MHz) + /** As defined in SMBIOS 3.0 spec + Section 7.17.3 and Table 72 + **/ + UINT8 ErrorCorrectionType; + + SiMrcVersion Version; + BOOLEAN EccSupport; + UINT8 MemoryProfile; + UINT8 IsDMBRunning; ///< Deprecated. + UINT32 TotalPhysicalMemorySize; + UINT32 DefaultXmptCK[MAX_XMP_PROFILE_NUM];///< Stores the tCK= value read from SPD XMP profiles if they exist. + /// + /// Set of bit flags showing XMP and User Profile capability status for = the DIMMs detected in system. For each bit, 1 is supported, 0 is unsupporte= d. + /// Bit 0: XMP Profile 1 capability status + /// Bit 1: XMP Profile 2 capability status + /// Bit 2: XMP Profile 3 capability status + /// Bit 3: User Profile 4 capability status + /// Bit 4: User Profile 5 capability status + /// + UINT8 XmpProfileEnable; + UINT8 XmpConfigWarning; ///< If XMP capable= DIMMs config support only 1DPC, but 2DPC is installed + UINT8 Ratio; ///< DDR Frequency = Ratio, Max Value 255 + UINT8 RefClk; + UINT32 VddVoltage[MAX_PROFILE_NUM]; + UINT32 VddqVoltage[MAX_PROFILE_NUM]; + UINT32 VppVoltage[MAX_PROFILE_NUM]; + CONTROLLER_INFO Controller[MAX_NODE]; + UINT16 Ratio_UINT16; ///< DDR Frequency = Ratio, used for programs that require ratios higher then 255 + UINT32 NumPopulatedChannels; ///< Total number o= f memory channels populated + HOB_SAGV_INFO SagvConfigInfo; ///< This data stru= cture contains SAGV config values that are considered output by the MRC. + UINT16 TotalMemWidth; ///< Total Memory W= idth in bits from all populated channels + BOOLEAN MemorySpeedReducedWrongDimmSlot; ///< Can be used by= OEM BIOS to display a warning on the screen that DDR speed was reduced due= to wrong DIMM population + BOOLEAN MemorySpeedReducedMixedConfig; ///< Can be used by= OEM BIOS to display a warning on the screen that DDR speed was reduced due= to mixed DIMM config + BOOLEAN DynamicMemoryBoostTrainingFailed; ///< TRUE if Dynami= c Memory Boost failed to train and was force disabled on the last full trai= ning boot. FALSE otherwise. +} MEMORY_INFO_DATA_HOB; + +#pragma pack (pop) + +#endif // _MEM_INFO_HOB_H_ diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Protocol= /SaPolicy.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Protoco= l/SaPolicy.h new file mode 100644 index 0000000000..cc258debe1 --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/Protocol/SaP +++ olicy.h @@ -0,0 +1,54 @@ +/** @file + Interface definition details between System Agent and platform drivers d= uring DXE phase. + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_SA_POLICY_H_ #define _SA_POLICY_H_ + +#include +#include +#include +#include + +/// +/// Extern the GUID for protocol users. +/// +extern EFI_GUID gSaPolicyProtocolGuid; +extern EFI_GUID gGraphicsDxeConfigGuid; extern EFI_GUID=20 +gMemoryDxeConfigGuid; + +/** + Don't change the original SA_POLICY_PROTOCOL_REVISION macro, external + modules maybe have consumed this macro in their source code. =20 +Directly + update the SA_POLICY_PROTOCOL_REVISION version number may cause those + external modules to auto mark themselves wrong version info. + Always create new version macro for new Policy protocol interface. +**/ +#define SA_POLICY_PROTOCOL_REVISION 1 + + + + +/** + SA DXE Policy + + The SA_POLICY_PROTOCOL producer drvier is recommended to set all the=20 + SA_POLICY_PROTOCOL size buffer zero before init any member parameter,=20 + this clear step can make sure no random value for those unknow new versio= n parameters. + + Make sure to update the Revision if any change to the protocol,=20 +including the existing internal structure definations.\n + Note: Here revision will be bumped up when adding/removing any config=20 +block under this structure.\n + Revision 1: + - Initial version. +**/ +typedef struct { + CONFIG_BLOCK_TABLE_HEADER TableHeader; ///< Offset 0-31 +/* + Individual Config Block Structures are added here in memory as part=20 +of AddConfigBlock() */ } SA_POLICY_PROTOCOL; + +#endif diff --git a/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/SaDataHo= b.h b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/SaDataHob.h new file mode 100644 index 0000000000..bded1851f4 --- /dev/null +++ b/Silicon/Intel/AlderlakeSiliconPkg/SystemAgent/Include/SaDataHob.h @@ -0,0 +1,28 @@ +/** @file + The GUID definition for SaDataHob + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef=20 +_SA_DATA_HOB_H_ #define _SA_DATA_HOB_H_ + +#include +#include +#include + +extern EFI_GUID gSaDataHobGuid; +#pragma pack (push,1) + +/// +/// System Agent Data Hob +/// +typedef struct { + EFI_HOB_GUID_TYPE EfiHobGuidType; ///< GUID= Hob type structure for gSaDataHobGuid + UINT8 PrimaryDisplay; + BOOLEAN ResizableBarSupport; ///< Resi= zable BAR Support + UINT8 Rsvd1[2]; ///< Rese= rved for future use +} SA_DATA_HOB; + +#pragma pack (pop) +#endif -- 2.36.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107163): https://edk2.groups.io/g/devel/message/107163 Mute This Topic: https://groups.io/mt/99554478/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-