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 90A887803CF for ; Wed, 16 Aug 2023 02:45:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LxeWpl3WtjNFmO4CxGNP7jZNwbPrFm9Pmahb0QCLTtE=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1692153935; v=1; b=WjdnOw8Msx6ZsVnPBGJEI8OMrXlDscUIFdm8xka2rG4MaQa1lwcAuN6wTYxBMuXW9+w1Wi2F z8P33XN1ygACtXQ5sce5mw4qEBrrTlTh/P2H+NF/JDg36dQ0KZYIiG9KQVO2B8n9JxRqwij1faf QGwT2qdEYrHoPHtAxIEC3fYM= X-Received: by 127.0.0.2 with SMTP id qbfCYY7687511xV6wpAPTLft; Tue, 15 Aug 2023 19:45:35 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.153000.1692153934318727178 for ; Tue, 15 Aug 2023 19:45:34 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="375196158" X-IronPort-AV: E=Sophos;i="6.01,175,1684825200"; d="scan'208";a="375196158" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2023 19:45:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="824074083" X-IronPort-AV: E=Sophos;i="6.01,175,1684825200"; d="scan'208";a="824074083" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 15 Aug 2023 19:45:32 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 15 Aug 2023 19:45:32 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Tue, 15 Aug 2023 19:45:32 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Tue, 15 Aug 2023 19:45:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AH8YR+8CpdTYkSDHHij1TmQQ2MKjk8WON/JYrqirOQqVBgOC7ijrDFXc86l/a01Pc8E/5dhkogdv1UC1IO0mEQhCs2lk/8bGz1Yv+pm7rbCSNQu4mIbVeak2XR1wxPT+Nbe1GDVqdxhamwxPTpO1hlpDqU1aAZ6V2X3YbwU4gp3p4vyMPeSNX3qeMR1j3mLn7g9Ai6QDyLY6uTXvsYAty9f24zJIOiyhdPsTD+/2aHL63JZoCF1rgvJ/gAK87g5sv8lIlhm45ObcMeeEok2eDzClDmkV4wdhOxliO1CESfR8rB9MSFm6j4wjkxQMEk2u/30D9abJxsazHJQ3Kog1rA== 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=7V+u1R8ipcdXOmzfTZtbm9ZxNDe88KgXxcRlgAKcS1A=; b=iKir89nzOPZpFk+yGB6fYaej5y0ru+njDBhpi4OsD1btb0Jp4XJk+z/35rHSBFb70ZMw7Cf1uJgNLJazrJfnrGNcnwMKfRKxkKBMGVdNtHEVRON7Gar7DnT0QspNcNXXaq0892Ob4cz0tlgcHxM5dAEokpeHOImTSV4atBu/YicWhLVbf6HnbvPr6BcDhFVYgsLh1GOXb60tgVlrOo492UW76VSjBowdI55GiQUFyac1fhzTpj9oq3jln8UNGnde2SUpTp5GCC03NbAoDXl9RiTa7RMH0rDLM8flMnUi7uG0HrPJ/A4uWBHZjDS1lrqzouWTJN/wbGlrY5BZp/insA== 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 PH0PR11MB5626.namprd11.prod.outlook.com (2603:10b6:510:ee::15) 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.6678.26; Wed, 16 Aug 2023 02:45:29 +0000 X-Received: from PH0PR11MB5626.namprd11.prod.outlook.com ([fe80::68a8:9cc5:ec4d:ca44]) by PH0PR11MB5626.namprd11.prod.outlook.com ([fe80::68a8:9cc5:ec4d:ca44%7]) with mapi id 15.20.6678.025; Wed, 16 Aug 2023 02:45:29 +0000 From: "Chuang, Rosen" To: "Kasbekar, Saloni" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" , "Desimone, Nathaniel L" , "Oram, Isaac W" Subject: Re: [edk2-devel] [PATCH v2 6/7] AlderlakeSiliconPkg/SystemAgent: Add include headers Thread-Topic: [PATCH v2 6/7] AlderlakeSiliconPkg/SystemAgent: Add include headers Thread-Index: AQHZxvpnsW5NViiB5k+PbJkK9Rxsp6/sSWzA Date: Wed, 16 Aug 2023 02:45:29 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5626:EE_|SA1PR11MB8447:EE_ x-ms-office365-filtering-correlation-id: 4f509921-3844-48c2-a85b-08db9e02da62 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 0dzU/m271v2HsBFF+5WdFT6UwvYfX47bvBxahsfwGhtSIewQjZxSlIY7LWT7PuXd9TyZJBKYaB8CjzIgU7lxgZxEuqCDzD14yVR8qHUXjah/bycJLvMeRv0ERLEsbpxOHObLcGZ4OC605REWLaoF0kg1TLCbHJ2kY7eUr/3mS8WFjS/hhCrxQsmuQwgyyqLcq9Nbp40B3M6IEp11nvS49yZJMoEJhG6y+ejstcPF5x0T2prs0zyQ5Y3b1TalcOaBvoiooCq5QpE86cHXkaFva9Cxe018G9MnMAfKTwlYGlwT+k5MQOjkfuln6uU8kS3WL2118iv09oJhaClEOsLWQALVmdku6KZ22oT7lbdBpJ1aSvNWOavKSLMyxSL+ueWTOjQHCsAQkFSCBudqOv5E+dOqHXrrBJlOxW5kcFNu7NRAJs1UYONxHOpMqQBIoyuNBLLFVrkhdZAv9tiIi2CWePkTqoYULU3S1MuJsFwHgne1qFCjynJGBiIl8sqEq7DZLZcSr9d0OBc5zboGtxXqhF0cGOuYjhrfFI1O7vL30/Nzwve52t3HsgXWbXyQIFeKCCqAKYCPZ4VuUVvo5QT1kO3EYfz9xVuSNAaGCva3JbUwuXnqsJeBF39gOGCLeV5M x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?r28+D1sfRCMTEDs0sOBcsD8cLt+5uHrti2oIoPmyPxYVEdhSVuPyxmDFb+nC?= =?us-ascii?Q?1cdLWVFwHg9CJmhOJaod6nBB9C/X2iozn25XgeR1fV34fdVVIxIxkS5+WqQ7?= =?us-ascii?Q?MeoCoVoD+StjsrBwcIi1eulfmPuw2xAycT2nHnvSqtvBq4XT7r+Ldp2TWqUJ?= =?us-ascii?Q?onXNwVGeeHYufd01iShdhRh1ed93BoUBXnvUsn5G/YgMEJmRDmfG4AuyAYxS?= =?us-ascii?Q?S22Pw2PsA/BVt62ljjw1aTCAXeev1kwdFk0YXtWgJHgLa3t23q1WMvnt9Kdi?= =?us-ascii?Q?hz0M0tJnbmjOdC6VqmR7ZAf0kXPGqVBpri5qNopBU/MeyxMpq7uu/KNooeSN?= =?us-ascii?Q?BVoQYt63OPYBH9RwJmgFcJyWfeGrzH/QI1j1Gt5WKbD7Ur713dwminX/ex3h?= =?us-ascii?Q?PEjkB7+lgJTQ80hhFDbVLr3HITrWuN+GctmTr3pKanvcL/HwT2BRbcuu5jal?= =?us-ascii?Q?D5hy8ApIKydZpa1NWQO9slsxS/2aO7nJ8nUpR+leNB7/Hqiv9RD4x849BttN?= =?us-ascii?Q?FDD11oVUtGXLS2Gn7TD/Avcfarkp3JDZiaDxo2INSVEWvFZH+6NvLEaLTe72?= =?us-ascii?Q?/sqsQQ3FT3FDqIbKr6ZYiv9ApQNkbr3UiRJXYmmDjSslER7BL97Zf7M8eS2a?= =?us-ascii?Q?EkI0xNdqVCiEFoYBocG4WqBX+3hxDHJicwCpuoT19UnVlhYeuKwoPHezKKwU?= =?us-ascii?Q?4EZeI1atpnrcqo4gYhk1HKaZUT1t5hhp4iWxHmedz9ej7ftt9yKyVX9Y8Od2?= =?us-ascii?Q?d1Kje2zoNiadWgcwsmP1mzIaks58cKmtB9WXLGgQ99dzNiD/AFk9q54OfM57?= =?us-ascii?Q?iSYtxnxJ/y+6kSz4TsbxE+FH5A4uTxR61hXitGvCCr2BirisVBFjNpDFEOP1?= =?us-ascii?Q?YcUN1LrgZhHHZAGfAh8m2CgkVcyyzBT/YKNX6E5Ugxm8wARqW4riYuyrJ6r1?= =?us-ascii?Q?Pd53Xc7IOQM1fHfAsYS+dlyy5LE34EGo4DbrEsXzlpdFmFUFOh/6OVNclpgz?= =?us-ascii?Q?Dl8k3m5RjXbGphxO22eNU1oTfSn1ODfnjlK7dYukOZa2s1PVdKu4cd2ew3EV?= =?us-ascii?Q?Zvg1UcdgMctZgaeUWztDsKool1hAOgSCB9A5zDypLKr4Vl4pmoNy5GiqsO2p?= =?us-ascii?Q?FGAsRi4Qlv3O0MHDQhahtctKnGgYNxDdnYMtbWuvAPytDj3U0WBq7TR8NUsP?= =?us-ascii?Q?Owo5LM8Bdtxc6NQLFuw19dupVyfMUYhfmwfV7d7stkxhZFi7vBsRM81jjbN+?= =?us-ascii?Q?bPyK3+bxInk7UUheTInB5XygzR95sCzGkyBLYbwXzmMm2M9TNTuMnIl28RJ3?= =?us-ascii?Q?2SxVsa122dO5MvkTaApyjZF+aPmKT/fOQKHs5Uod8ywba/zhRrPflmfDoZDN?= =?us-ascii?Q?vyjYAvfZ2iVVKbT70NNC1x8r4NEq4mTbbHgApwMJ2FDSHC5zQrTcdy5S1vQF?= =?us-ascii?Q?wiyDcpzUegbcGW5ce66Rtnyo6CAVtVVB6rJ3lbY5mzCpNWYdM+jv3GcWz99Z?= =?us-ascii?Q?T1tFq5t8yWRbVtNi/NuV1E0j6Ef/3SFO/iDbZ1lyDasz00ay3PUCyR5fAETG?= =?us-ascii?Q?Ct3Wo1lXCgQeoeWs3ivujQ+7vNTRt5btOim+q0jd?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5626.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f509921-3844-48c2-a85b-08db9e02da62 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2023 02:45:29.3720 (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: it+tdrTSQgoWBNXDnZp1A2Z/hKAOafdkgzrMUDPCBP52QLDDrp91l/baausOjdIaPG0rKgTe8Mc1aD69D6/ibw== 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,rosen.chuang@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: caqAyh2PcseYuzamU5iYkkU9x7686176AA= 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=WjdnOw8M; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Rosen Chuang < rosen.chuang@intel.com> -----Original Message----- From: Kasbekar, Saloni =20 Sent: Saturday, August 5, 2023 1:38 AM To: devel@edk2.groups.io Cc: Kasbekar, Saloni ; Chaganty, Rangasai V ; Desimone, Nathaniel L ; Oram, Isaac W ; Chuang, Rosen Subject: [PATCH v2 6/7] AlderlakeSiliconPkg/SystemAgent: Add include header= s 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 (#107782): https://edk2.groups.io/g/devel/message/107782 Mute This Topic: https://groups.io/mt/100551005/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-