From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.75]) by mx.groups.io with SMTP id smtpd.web12.20275.1658932123473772069 for ; Wed, 27 Jul 2022 07:28:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=oAamU6lg; spf=pass (domain: arm.com, ip: 40.107.7.75, mailfrom: samer.el-haj-mahmoud@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=GrUrtdDsXTp4mxOT+C/3BVXoewgsnXytgVRRWPhiAtqAb0wya7EsH8jzRZ9OslTIAHBQsMPLutcaRqIDU4YuZWyilKG1KBwMJkRn1r6gL77IDmCl/xnSiU3w+k1yEoazhf8w6znZkkiHYQy0XIKBHAlHcwLRjDnV6Gqp7jCyzuOuL5BQwQHQHQrqjG0Xv/3l8E/uYNpDCz/W7LH2y/Uxgt9+nNGcpPr7Y6RNYADyBz+xaX3ek8+/qGfiOx0+XAd4S5zaAYtpBy+cX0LWaWDmGZnmJ5TbDiFB+dcBFgFf6DyDveeoDNd3ScHmEHeHVyfqc0dsbLq50v57kboCC54UcA== ARC-Message-Signature: i=2; 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=eN4x4eimBhOozAUUaWu2bVsciBUlCN+6+r4pN5YyRgo=; b=h4aFPBlhRRBkRgXJ6/HBQV4bIkI+Ji/hRywrQ+4DFXv2vy7avrQT+zviFNaaPaYF4Ou/S/Kkg/z8n9UZNQkvKdZFznqySHMD1d9aJNjYo27C28IctPipElkdkHq8UaX8S41OWIeyPyZ0JWPtgN70QillTh8sVSW598sLBgwAOoIDyuSCtv28nNAptZ0Ztdw0tr9KlvF04NxElWKbF+qrR5TEX9bqFvbvx67RLIzFLk77ifwbs+lQvvWGEeAPI9VuLW+eTRfIcvZ4rIiZe4pmRBpN+3mSNw+U9rH8u8NiOW6Xl6lRTr5z1rfM71GU949+Xbb3mRhrTkPMeYoCZoCPPA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eN4x4eimBhOozAUUaWu2bVsciBUlCN+6+r4pN5YyRgo=; b=oAamU6lgGamnidZ3mOh1VWnpTnpoB0xiZKjUGEnXeR7MmwZrwsLjdyVoe+CR4UXZ5bfD3UQTBUOnTKqv8fNh00kLOWum9quiZK5i2LzlQplOHuEv5EAzOHJ445zEzFD7N/ruyPqJPdWyHpOpkbCMpZcRon2b0ip7X9v/reG8AM4= Received: from DB6PR07CA0018.eurprd07.prod.outlook.com (2603:10a6:6:2d::28) by DU0PR08MB7860.eurprd08.prod.outlook.com (2603:10a6:10:3b0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Wed, 27 Jul 2022 14:28:23 +0000 Received: from DBAEUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2d:cafe::d0) by DB6PR07CA0018.outlook.office365.com (2603:10a6:6:2d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.10 via Frontend Transport; Wed, 27 Jul 2022 14:28:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT058.mail.protection.outlook.com (100.127.142.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 27 Jul 2022 14:28:23 +0000 Received: ("Tessian outbound 2af316122c7a:v123"); Wed, 27 Jul 2022 14:28:23 +0000 X-CR-MTA-TID: 64aa7808 Received: from 8e3fe029691a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C7B9E193-8D7E-463D-AAD2-7F6D2E5ED4CA.1; Wed, 27 Jul 2022 14:28:17 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8e3fe029691a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Jul 2022 14:28:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PbU1vbx4X/xUoAJZH1ta6n6LkdSOyje0R8cgshMbaoNv0KIiz8fk/KszxtkAULLWqEiFQQc3og94mVKw2P+eYN+DQQZc8Noo8FpyxG2Yq7UaSJ1rzprxpApxKXBgOBsybAOi5fQYqobBppGnr6EgBwGEeGtdB5TmzN53xZEuLVf5onDWiKgDFVsG5tCpODKITetI7W+4p++tNg3/0nLkPtRcrDzbqR9h+NmVpGADY262Nw/xjwvMdTizj8xmCMOm/eZhOTltcr9CFWOUFL6e1QTqKdDudxK1fqCLUvTxMCSgBQnmlLeIgPaLFocJy0Qszs0+NBTboOAt9/DD6L8TkQ== 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=eN4x4eimBhOozAUUaWu2bVsciBUlCN+6+r4pN5YyRgo=; b=fSLX/dki8W+EEyYd1Ho7BEdNNrVtsKmvmPlrxcUu6qTwhv5FzIkSXIbkb3NGsnifk2HdW81E4Jn0LDB5oNLFM29sP++Vrl/24WkEul/YXlscYSo/PJajStZkZ2YJvXeTf+/InAypqYak8khdbOqTUTl948LRFrs7V0v3C3FUORyTmIOSv1ebIwrrYsIaLzKlhdxy9TEPZK6FV3J7lfnQRiYSMbqM9J9dfMW1fi/2xNDIVOjdhJnPu0ruwBpcakvaEw/jtgUzwXhjFw+Uf8qUWzJ4Yv19KcZBSFTSXSiSr5fnfXk5Z2LbiaUXzmZmj7/0Ebq9e2BRPIW0vf1S5wbEsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eN4x4eimBhOozAUUaWu2bVsciBUlCN+6+r4pN5YyRgo=; b=oAamU6lgGamnidZ3mOh1VWnpTnpoB0xiZKjUGEnXeR7MmwZrwsLjdyVoe+CR4UXZ5bfD3UQTBUOnTKqv8fNh00kLOWum9quiZK5i2LzlQplOHuEv5EAzOHJ445zEzFD7N/ruyPqJPdWyHpOpkbCMpZcRon2b0ip7X9v/reG8AM4= Received: from VI1PR08MB5312.eurprd08.prod.outlook.com (2603:10a6:803:139::24) by AM6PR08MB5543.eurprd08.prod.outlook.com (2603:10a6:20b:b5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17; Wed, 27 Jul 2022 14:28:15 +0000 Received: from VI1PR08MB5312.eurprd08.prod.outlook.com ([fe80::64c0:10c6:d45c:9fc2]) by VI1PR08MB5312.eurprd08.prod.outlook.com ([fe80::64c0:10c6:d45c:9fc2%8]) with mapi id 15.20.5458.025; Wed, 27 Jul 2022 14:28:14 +0000 From: "Samer El-Haj-Mahmoud" To: Dimitrije Pavlov , "devel@edk2.groups.io" CC: Ard Biesheuvel , Leif Lindholm , Graeme Gregory , Radoslaw Biernacki , Jeff Booher-Kaeding , Sunny Wang , Jeremy Linton , Samer El-Haj-Mahmoud , nd Subject: Re: [edk2-platforms][PATCH v1 1/1] Silicon/Qemu: Add SMBIOS tables of types 16, 17, and 19 Thread-Topic: [edk2-platforms][PATCH v1 1/1] Silicon/Qemu: Add SMBIOS tables of types 16, 17, and 19 Thread-Index: AQHYnITV9tZEvh/FwUOf5lZkmvxcWK2SUKGg Date: Wed, 27 Jul 2022 14:28:14 +0000 Message-ID: References: <20220720220518.14686-1-Dimitrije.Pavlov@arm.com> In-Reply-To: <20220720220518.14686-1-Dimitrije.Pavlov@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 502DDBC7EAE5FF4CAEA6744509928029.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 84dbe486-a5b3-43f4-a427-08da6fdc42db x-ms-traffictypediagnostic: AM6PR08MB5543:EE_|DBAEUR03FT058:EE_|DU0PR08MB7860:EE_ x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: SFDRnXVPIOEoqbdZsDO7gm6l7pSuVl5cf3tj/PuxFj58VbgDHeXtQ+/fozcqlyVoIroJ3kEAve8edUg5Y63w5XOhka6/DSq+nFBqXKjkS83i+jyB2R2a0jIFEkISlhS2tD6uJhiBWquhLlLqEBvv2n18Q6llj8y/drd70BWkZQctNoSudbPT294B+3D2fFsBkq95itSUM6unjb7h3st46HyZNYEVp+2pAm5E51LORkpZbr0Uv9SbQbnPVe/JdFTJXYfyyYYTUI/baqTG8Q/6JwS8lup5xCHDpoQmqz3GRCz9RMybj7njuSHgnxWDSKgGWqRVVtQWjVaT02GvOOGCUu5f3y/SR55THX4rH5IG3w1WFyOMJ0vnAK1noTf5zBX57T1PCma1P3PyXf3VZSnaKYM6LSRS7t199VGgo4s5D8kTL+S93ZamhqxWUElDw0bVZKaviRriOViDvIxn85Z3VHF6OBJSULgl5ATGz2EH5nWK9hO0lvmjZ3s1hXYrBfOKSUn158Z9tK0uTSI/NHVBgR2LAdBFHOyYk1nOorTroCcOwJ49Qr45/2jkEYufx7Xi1nd4C+8icHqfsUep0OeftHV+Vo5Q4TA5FnQYbwxB1Aht26DAdqmkE16JLE08A2ZYmdlIOBbTOpnthEkeDg79HDwSxxAVMl9oLTB+OMdZ8SJ70MpNWyQ3iUSx+crF2VkOMuJZDGUbzq+BU1z2MIcp2Dt1JGzcWvK398QiZsaMDy2I5jJU208aqLDP340Vpam187qmdgHjUO9Yo1XTvkx2ypnuUEW+YeRH87dpN8c5OsAd4dH9PMH06dMibtAYgc4/ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB5312.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(39860400002)(396003)(136003)(376002)(366004)(52536014)(5660300002)(55016003)(7696005)(122000001)(33656002)(76116006)(38100700002)(26005)(54906003)(53546011)(71200400001)(9686003)(4326008)(8936002)(19627235002)(66446008)(66556008)(86362001)(41300700001)(30864003)(478600001)(38070700005)(316002)(64756008)(6506007)(83380400001)(8676002)(66476007)(110136005)(186003)(66946007)(2906002)(579004);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5543 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b2594dfd-c1bc-485f-e8ca-08da6fdc3d95 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qDCS5oDstbxidA8N/1Vhj2PXUxyfYdOHPaxL+UAffdcl20dGO57i8z9kDC92VllDIHoptb5Jihj3L0ZvtDe08ZzR5ezV5RNmFUBkF1g8hV1xaynDPGBdTXooK9Cr2nkiFlCWtBwscz3xPLdVg1C4Rdub33/cRX08bs5w8xpMoh7Qg8OOf0MilWm4795SEcB8emh8EynlS3t1zBjaCp+18Gb+19TZq+DsClYW0t5uQSK4gVWCWRUXylh8+dhxIEuSs9P6BuwsypT5L9i65NaXcImzpAgQpqiAeK/3KWVp9YTLyceTP4m2RZLApeZMTk8gcE3MlXmvzX2XiOaFpEpz8MzU8YWUlZrsPD5+sQiI7NmCpEOcUe1tZ0naT1yfc6BTlD13dpU3gRMBM33c0eg/hgtqH3VCUgSWZqe0x/cFhnKVsH90WtELZXqcheA2WNqUOltxW2FboaRW5wwfrhpCMMe6ebLOqBuwdeCVR/ibX9grY6y5E8Kg8F6SwGb/z/iLtsuqXALQHed41hx3SgCHPr+SAv7/9WWcRV6hgwSCQRMFJQuTF7u8DzzIGLLJCKxx8v9UTaQAi4cLAnZEDd5D4TpVCa7VdWo1lb7Do/YB0gd4oelTJ+kEXAl57Kr7E+QZnO7wDa0/wkAXVhYad708kvdhMnJ8cjYM5C5FHITh1NW9axbAclXrG9TR4FrtTwnHUSsW7K4IzN+ecH8mSwfySCeiCws66AUJti6F9m/7/dlxxy13OoO3Hi86QeGoSZJ74j2fSbGNCJOWAlpFp+mjgHvY4CiLkfUEr/OdgSwuEB64TIt4KA6szhqCHOOiJNnl X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230016)(4636009)(396003)(136003)(346002)(39860400002)(376002)(36840700001)(40470700004)(46966006)(82310400005)(54906003)(6506007)(26005)(53546011)(336012)(83380400001)(2906002)(40460700003)(316002)(47076005)(33656002)(7696005)(478600001)(5660300002)(19627235002)(41300700001)(70206006)(70586007)(4326008)(8676002)(8936002)(52536014)(30864003)(40480700001)(81166007)(9686003)(356005)(36860700001)(110136005)(55016003)(82740400003)(186003)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2022 14:28:23.1369 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 84dbe486-a5b3-43f4-a427-08da6fdc42db X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7860 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Dimitrije for the patch! Reviewed-By: Samer El-Haj-Mahmoud > -----Original Message----- > From: Dimitrije Pavlov > Sent: Wednesday, July 20, 2022 6:05 PM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Leif Lindholm > ; Graeme Gregory ; > Radoslaw Biernacki ; Jeff Booher-Kaeding Kaeding@arm.com>; Samer El-Haj-Mahmoud Mahmoud@arm.com>; Sunny Wang ; Jeremy Linton > > Subject: [edk2-platforms][PATCH v1 1/1] Silicon/Qemu: Add SMBIOS tables o= f > types 16, 17, and 19 >=20 > Arm SBBR specification includes the list of required and recommended > SMBIOS tables. Tables of types 16 (Physical Memory Array), > 17 (Memory Device), and 19 (Memory Array Mapped Address) are required, > but are not included in the current SbsaQemu SMBIOS driver. The current > SMBIOS driver provides a limited number of tables using ArmPkg. >=20 > This patch adds SbsaQemu-specific tables of types 16, 17, and 19. >=20 > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Graeme Gregory > Cc: Radoslaw Biernacki > Cc: Jeff Booher-Kaeding > Cc: Samer El-Haj-Mahmoud > Cc: Sunny Wang > Cc: Jeremy Linton >=20 > Signed-off-by: Dimitrije Pavlov > --- > Platform/Qemu/SbsaQemu/SbsaQemu.dsc | = 1 + > Platform/Qemu/SbsaQemu/SbsaQemu.fdf | = 1 + >=20 > Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.i > nf | 48 +++ >=20 > Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c > | 405 ++++++++++++++++++++ > 4 files changed, 455 insertions(+) >=20 > diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > index 97014e2fb630..b7050d911708 100644 > --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > @@ -721,6 +721,7 @@ [Components.common] > ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf > EmbeddedPkg/Library/FdtLib/FdtLib.inf > MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > + > Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.i > nf >=20 > # > # PCI support > diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf > b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf > index c35e3ed44054..9f031c3e6649 100644 > --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf > +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf > @@ -242,6 +242,7 @@ [FV.FvMain] > INF > ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf > INF ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf > INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > + INF > Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.i > nf >=20 > # > # PCI support > diff --git > a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDx > e.inf > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDx > e.inf > new file mode 100644 > index 000000000000..b5d156f6654e > --- /dev/null > +++ > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDx > e.inf > @@ -0,0 +1,48 @@ > +#/** @file > +# > +# Static SMBIOS tables for the SbsaQemu platform. > +# > +# Copyright (c) 2022, ARM Limited. All rights reserved. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +#**/ > + > +[Defines] > + INF_VERSION =3D 0x0001001A > + BASE_NAME =3D SbsaQemuSmbiosDxe > + FILE_GUID =3D DDE1ACCB-0555-4CAA-85E7-3CBC8962026= E > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + ENTRY_POINT =3D SbsaQemuSmbiosDriverEntryPoint > + > +[Sources] > + SbsaQemuSmbiosDxe.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > + ArmPkg/ArmPkg.dec > + > +[LibraryClasses] > + ArmLib > + ArmPlatformLib > + UefiBootServicesTableLib > + MemoryAllocationLib > + BaseMemoryLib > + BaseLib > + UefiLib > + UefiDriverEntryPoint > + DebugLib > + PrintLib > + > +[Protocols] > + gEfiSmbiosProtocolGuid > + > +[Depex] > + gEfiSmbiosProtocolGuid > + > +[Pcd] > + gArmTokenSpaceGuid.PcdSystemMemorySize > + gArmTokenSpaceGuid.PcdSystemMemoryBase > diff --git > a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDx > e.c > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDx > e.c > new file mode 100644 > index 000000000000..9ef5168b79f6 > --- /dev/null > +++ > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDx > e.c > @@ -0,0 +1,405 @@ > +/** @file > + * > + * Static SMBIOS tables for the SbsaQemu platform. > + * > + * Note: Some tables are provided by ArmPkg. The tables that are not pr= ovided > by > + * ArmPkg, but are required by SBBR, are as follows: > + * Physical Memory Array (Type 16) > + * Memory Device (Type 17) - For each socketed system-memory Device > + * Memory Array Mapped Address (Type 19) - One per contiguous block p= er > Physical Memory Array > + * > + * Copyright (c) 2022, ARM Limited. All rights reserved. > + * > + * SPDX-License-Identifier: BSD-2-Clause-Patent > + * > + **/ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +/** > + A global variable to store the SMBIOS handle for table Type 16. This v= ariable > should > + only be modified by calling PhyMemArrayInfoUpdateSmbiosType16. > +**/ > +STATIC SMBIOS_HANDLE mPhyMemArrayInfoType16Handle =3D > SMBIOS_HANDLE_PI_RESERVED; > + > +/** > + SMBIOS data definition, TYPE16, Physical Memory Array > +**/ > +SMBIOS_TABLE_TYPE16 mPhyMemArrayInfoType16 =3D { > + { EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY, sizeof > (SMBIOS_TABLE_TYPE16), 0 }, > + MemoryArrayLocationSystemBoard, // Location; (system board) > + MemoryArrayUseSystemMemory, // Use; (system memory) > + MemoryErrorCorrectionUnknown, // MemoryErrorCorrection; (unknown). > + 0x80000000, // MaximumCapacity; (capacity is repr= esented in the > ExtendedMaximumCapacity field) > + 0xFFFE, // MemoryErrorInformationHandle; (not= provided) > + 1, // NumberOfMemoryDevices > + 0x0000080000000000ULL // ExtendedMaximumCapacity; (fixed at= 8 TiB for > SbsaQemu) > +}; > +CHAR8 *mPhyMemArrayInfoType16Strings[] =3D { > + NULL > +}; > + > +/** > + SMBIOS data definition, TYPE17, Physical Memory Array > +**/ > +SMBIOS_TABLE_TYPE17 mMemDevInfoType17 =3D { > + { EFI_SMBIOS_TYPE_MEMORY_DEVICE, sizeof (SMBIOS_TABLE_TYPE17), 0 }, > + 0, // MemoryArrayHandle; should match > SMBIOS_TABLE_TYPE16.Handle, > + // initialized at runtime, refer to > MemDevInfoUpdateSmbiosType17 > + 0xFFFE, // MemoryErrorInformationHandle; (not provid= ed) > + 0xFFFF, // TotalWidth; (unknown) > + 0xFFFF, // DataWidth; (unknown) > + 0x0, // Size; initialized at runtime, refer to > MemDevInfoUpdateSmbiosType17 > + MemoryFormFactorUnknown, // FormFactor; (unknown) > + 0, // DeviceSet; (not part of a set) > + 0, // DeviceLocator String > + 0, // BankLocator String > + MemoryTypeUnknown, // MemoryType; (unknown) > + { // TypeDetail; > + 0, // Reserved :1; > + 0, // Other :1; > + 1, // Unknown :1; > + 0, // FastPaged :1; > + 0, // StaticColumn :1; > + 0, // PseudoStatic :1; > + 0, // Rambus :1; > + 0, // Synchronous :1; > + 0, // Cmos :1; > + 0, // Edo :1; > + 0, // WindowDram :1; > + 0, // CacheDram :1; > + 0, // Nonvolatile :1; > + 0, // Registered :1; > + 0, // Unbuffered :1; > + 0, // Reserved1 :1; > + }, > + 0, // Speed; (unknown) > + 0, // Manufacturer String > + 0, // SerialNumber String > + 0, // AssetTag String > + 0, // PartNumber String > + 0, // Attributes; (unknown rank) > + 0, // ExtendedSize; potentially initialized at = runtime if size is >=3D 32 > GiB - 1 MiB, > + // refer to MemDevInfoUpdateSmbiosType17 > + 0, // ConfiguredMemoryClockSpeed; (unknown) > + 0, // MinimumVoltage; (unknown) > + 0, // MaximumVoltage; (unknown) > + 0, // ConfiguredVoltage; (unknown) > + MemoryTechnologyDram, // MemoryTechnology; (DRAM) > + {{ // MemoryOperatingModeCapability > + 0, // Reserved :1; > + 0, // Other :1; > + 0, // Unknown :1; > + 1, // VolatileMemory :1; > + 0, // ByteAccessiblePersistentMemory :1; > + 0, // BlockAccessiblePersistentMemory :1; > + 0 // Reserved :10; > + }}, > + 0, // FirwareVersion > + 0, // ModuleManufacturerID (unknown) > + 0, // ModuleProductID (unknown) > + 0, // MemorySubsystemControllerManufacturerID (= unknown) > + 0, // MemorySubsystemControllerProductID (unkno= wn) > + 0, // NonVolatileSize > + 0, // VolatileSize; initialized at runtime, ref= er to > MemDevInfoUpdateSmbiosType17 > + 0, // CacheSize > + 0, // LogicalSize (since MemoryType is not > MemoryTypeLogicalNonVolatileDevice) > + 0, // ExtendedSpeed > + 0 // ExtendedConfiguredMemorySpeed > +}; > +CHAR8 *mMemDevInfoType17Strings[] =3D { > + NULL > +}; > + > + > +SMBIOS_TABLE_TYPE19 mMemArrMapInfoType19 =3D { > + { EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS, sizeof > (SMBIOS_TABLE_TYPE19), 0 }, > + 0, // StartingAddress; initialized at runtime, refer to > MemArrMapInfoUpdateSmbiosType19 > + 0, // EndingAddress; initialized at runtime, refer to > MemArrMapInfoUpdateSmbiosType19 > + 0, // MemoryArrayHandle; should match SMBIOS_TABLE_TYPE16.Handle, > + // initialized at runtime, refer to MemDevInfoUpdateSmbiosType17 > + 1, // PartitionWidth > + 0, // ExtendedStartingAddress; potentially initialized at runtime, > + // refer to MemDevInfoUpdateSmbiosType17 > + 0, // ExtendedEndingAddress; potentially initialized at runtime, > + // refer to MemDevInfoUpdateSmbiosType17 > +}; > +CHAR8 *mMemArrMapInfoType19Strings[] =3D { > + NULL > +}; > + > + > +/** > + Create an SMBIOS record. > + > + Converts a fixed SMBIOS structure and an array of pointers to strings = into > + an SMBIOS record where the strings are cat'ed on the end of the fixed = record > + and terminated via a double NULL and add to SMBIOS table. > + > + @param Template Fixed SMBIOS structure, required. > + @param StringPack Array of strings to convert to an SMBIOS str= ing pack. > + NULL is OK. > + @param DataSmbiosHandle The new SMBIOS record handle. > + NULL is OK. > + > + @return EFI_SUCCESS on success, other values on error. > +**/ > + > +STATIC > +EFI_STATUS > +EFIAPI > +LogSmbiosData ( > + IN EFI_SMBIOS_TABLE_HEADER *Template, > + IN CHAR8 **StringPack, > + OUT EFI_SMBIOS_HANDLE *DataSmbiosHandle > + ) > +{ > + EFI_STATUS Status; > + EFI_SMBIOS_PROTOCOL *Smbios; > + EFI_SMBIOS_HANDLE SmbiosHandle; > + EFI_SMBIOS_TABLE_HEADER *Record; > + UINTN Index; > + UINTN StringSize; > + UINTN Size; > + CHAR8 *Str; > + > + Status =3D gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, > (VOID**)&Smbios); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "Failed to locate SMBIOS protocol: %r\n", Statu= s)); > + return Status; > + } > + > + // > + // Calculate the size of the fixed record and optional string pack > + // > + Size =3D Template->Length; > + if (StringPack =3D=3D NULL) { > + // > + // If there are no strings, allow for a double-NULL > + // > + Size +=3D 2; > + } else { > + for (Index =3D 0; StringPack[Index] !=3D NULL; Index++) { > + StringSize =3D AsciiStrSize (StringPack[Index]); > + Size +=3D StringSize; > + } > + if (StringPack[0] =3D=3D NULL) { > + // > + // If the only string is NULL, include it in size calculation > + // > + Size +=3D 1; > + } > + > + // > + // Add an additional NULL for a terminating double NULL > + // > + Size +=3D 1; > + } > + > + // > + // Copy over the template > + // > + Record =3D (EFI_SMBIOS_TABLE_HEADER*)AllocateZeroPool (Size); > + if (Record =3D=3D NULL) { > + DEBUG ((DEBUG_ERROR, "Failed to allocate memory for SMBIOS table\n")= ); > + return EFI_OUT_OF_RESOURCES; > + } > + CopyMem (Record, Template, Template->Length); > + > + // > + // Append the string pack > + // > + Str =3D ((CHAR8*)Record) + Record->Length; > + for (Index =3D 0; StringPack[Index] !=3D NULL; Index++) { > + StringSize =3D AsciiStrSize (StringPack[Index]); > + CopyMem (Str, StringPack[Index], StringSize); > + Str +=3D StringSize; > + } > + // > + // Add an additional NULL for a terminating double NULL > + // > + *Str =3D 0; > + > + // > + // Add the table to SMBIOS > + // > + SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; > + Status =3D Smbios->Add ( > + Smbios, > + gImageHandle, > + &SmbiosHandle, > + Record > + ); > + > + if ((Status =3D=3D EFI_SUCCESS) && (DataSmbiosHandle !=3D NULL)) { > + *DataSmbiosHandle =3D SmbiosHandle; > + } > + > + ASSERT_EFI_ERROR (Status); > + FreePool (Record); > + return Status; > +} > + > + > +/** > + Updates SMBIOS table Type 16 and creates an SMBIOS record for it. > + > + Stores the SMBIOS handle for table Type 16 in > mPhyMemArrayInfoType16Handle. > +**/ > +STATIC > +VOID > +PhyMemArrayInfoUpdateSmbiosType16 ( > + VOID > + ) > +{ > + LogSmbiosData ( > + (EFI_SMBIOS_TABLE_HEADER*)&mPhyMemArrayInfoType16, > + mPhyMemArrayInfoType16Strings, > + &mPhyMemArrayInfoType16Handle > + ); > +} > + > + > +/** > + Updates SMBIOS table Type 17 and creates an SMBIOS record for it. > + > + Must be called after PhyMemArrayInfoUpdateSmbiosType16. > +**/ > +STATIC > +VOID > +MemDevInfoUpdateSmbiosType17 ( > + VOID > + ) > +{ > + UINT64 MemorySize; > + > + // > + // PhyMemArrayInfoUpdateSmbiosType16 must be called before > MemDevInfoUpdateSmbiosType17 > + // > + if (mPhyMemArrayInfoType16Handle =3D=3D SMBIOS_HANDLE_PI_RESERVED) { > + DEBUG ((DEBUG_ERROR, "%a: mPhyMemArrayInfoType16Handle is not > initialized\n", __FUNCTION__)); > + return; > + } > + > + mMemDevInfoType17.MemoryArrayHandle =3D > mPhyMemArrayInfoType16Handle; > + > + MemorySize =3D PcdGet64 (PcdSystemMemorySize); > + if (MemorySize >=3D SIZE_32GB - SIZE_1MB) { > + // > + // If memory size is >=3D 32 GiB - 1 MiB, we need to use ExtendedSiz= e to > represent it. > + // In this case, Size is set to 0x7FFF. > + // > + mMemDevInfoType17.Size =3D 0x7FFF; > + mMemDevInfoType17.ExtendedSize =3D MemorySize / SIZE_1MB; > + } else { > + // > + // If memory size is < 32 GiB - 1 MiB, we use just Size. > + // > + mMemDevInfoType17.Size =3D MemorySize / SIZE_1MB; > + mMemDevInfoType17.ExtendedSize =3D 0; > + } > + > + // > + // All memory on SbsaQemu is volatile > + // > + mMemDevInfoType17.VolatileSize =3D MemorySize; > + > + LogSmbiosData ( > + (EFI_SMBIOS_TABLE_HEADER*)&mMemDevInfoType17, > + mMemDevInfoType17Strings, > + NULL > + ); > +} > + > + > +/** > + Updates SMBIOS table Type 19 and creates an SMBIOS record for it. > + > + Must be called after PhyMemArrayInfoUpdateSmbiosType16. > +**/ > +VOID > +MemArrMapInfoUpdateSmbiosType19 ( > + VOID > + ) > +{ > + UINT64 MemorySize; > + UINT64 MemoryBase; > + UINT64 StartingAddressKiB; > + UINT64 EndingAddressKiB; > + > + // > + // PhyMemArrayInfoUpdateSmbiosType16 must be called before > MemDevInfoUpdateSmbiosType17 > + // > + if (mPhyMemArrayInfoType16Handle =3D=3D SMBIOS_HANDLE_PI_RESERVED) { > + DEBUG ((DEBUG_ERROR, "%a: mPhyMemArrayInfoType16Handle is not > initialized\n", __FUNCTION__)); > + return; > + } > + > + mMemArrMapInfoType19.MemoryArrayHandle =3D > mPhyMemArrayInfoType16Handle; > + > + MemorySize =3D PcdGet64 (PcdSystemMemorySize); > + MemoryBase =3D PcdGet64 (PcdSystemMemoryBase); > + StartingAddressKiB =3D MemoryBase / SIZE_1KB; > + EndingAddressKiB =3D StartingAddressKiB + (MemorySize / SIZE_1KB) - = 1; > + if (EndingAddressKiB > MAX_UINT32) { > + // > + // If the ending address cannot fit in a 32-bit unsigned integer, we= use > + // ExtendedStartingAddress and ExtendedEndingAddress fields, which a= re 64 > bits. > + // In this case, StartingAddress and EndingAddress fields are set to > 0xFFFFFFFF. > + // Note that, since always starting address < ending address, if the= ending > address > + // can fit into 32 bits, then so can the starting address. > + // > + mMemArrMapInfoType19.StartingAddress =3D 0xFFFFFFFF; > + mMemArrMapInfoType19.EndingAddress =3D 0xFFFFFFFF; > + mMemArrMapInfoType19.ExtendedStartingAddress =3D StartingAddressKiB; > + mMemArrMapInfoType19.ExtendedEndingAddress =3D EndingAddressKiB; > + } else { > + // > + // If the starting address and the ending address can fit into 32 bi= ts, we just > use > + // StartingAddress and EndingAddress fields. > + // > + mMemArrMapInfoType19.StartingAddress =3D StartingAddressKiB; > + mMemArrMapInfoType19.EndingAddress =3D EndingAddressKiB; > + mMemArrMapInfoType19.ExtendedStartingAddress =3D 0; > + mMemArrMapInfoType19.ExtendedEndingAddress =3D 0; > + } > + > + LogSmbiosData ( > + (EFI_SMBIOS_TABLE_HEADER*)&mMemArrMapInfoType19, > + mMemArrMapInfoType19Strings, > + NULL > + ); > +} > + > + > +/** > + Driver entry point. > +**/ > +EFI_STATUS > +EFIAPI > +SbsaQemuSmbiosDriverEntryPoint ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + PhyMemArrayInfoUpdateSmbiosType16 (); > + MemDevInfoUpdateSmbiosType17 (); > + MemArrMapInfoUpdateSmbiosType19 (); > + > + return EFI_SUCCESS; > +} > -- > 2.34.1