From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.51]) by mx.groups.io with SMTP id smtpd.web12.20760.1621265623021507008 for ; Mon, 17 May 2021 08:33:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=11DZV/PE; spf=pass (domain: arm.com, ip: 40.107.15.51, mailfrom: sami.mujawar@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=lo5DSkF8my+Scy8i1pnfiQlMkWQ4HFOE6XTmXQCDKrg=; b=11DZV/PECyXM/CaMPTzE+1fnwFz5GvfDgbg7mOQqcubdNpjnavsdLXTypQpOnfXixbPdeWhAa7kH8XwV9rb3ZWRGwTOP7qq5XXJuPk9mwJ1gS+VTcnnQ0VwCElRlmdmoGDhn6Hv1z3konmB1eM6MFzbd/Ry1KOorNUXSVkvrW9U= Received: from AM5PR0301CA0015.eurprd03.prod.outlook.com (2603:10a6:206:14::28) by AM0PR08MB4225.eurprd08.prod.outlook.com (2603:10a6:208:137::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Mon, 17 May 2021 15:33:39 +0000 Received: from VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:14:cafe::50) by AM5PR0301CA0015.outlook.office365.com (2603:10a6:206:14::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.32 via Frontend Transport; Mon, 17 May 2021 15:33:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT014.mail.protection.outlook.com (10.152.19.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Mon, 17 May 2021 15:33:39 +0000 Received: ("Tessian outbound 6c8a2be3c2e7:v92"); Mon, 17 May 2021 15:33:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5e33c05597419c9e X-CR-MTA-TID: 64aa7808 Received: from 2947a7ee4f54.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 009BCEC1-F2B6-41A3-AD84-0C75057D767E.1; Mon, 17 May 2021 15:33:19 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2947a7ee4f54.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 17 May 2021 15:33:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DO7XcpbqUFkxmyB1LSVFeqQ/OBCHCpfm4VdOgkvHgYYRJyMrswtcB7xIDta/7pf16RXdqEwhAdinnvpvu4LWTOO5eWLb8j48E7TNw7wNBSzNF8hn0yI/wBKNcRIRGcIkUGvUQPuNoqeHSKfZzjtEAFBjgmX1Gu16oCD1hWXaxdM/9g3/Hh2hPSYcB9ubGWNbTK8nN5dhtM/xGRN1zJ7sl0b96NvoeURYfjKMv3g7pZRXxyDhWUinaMWoohit/y4hWteVdX4iNhg0g7BCaRW/9dLIv3bmj7sC5X9uz3v9RCsfc7jX5IE40FvPpFOFhHnB8QFvLxthqanZC7OOfONJ3A== 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-SenderADCheck; bh=lo5DSkF8my+Scy8i1pnfiQlMkWQ4HFOE6XTmXQCDKrg=; b=AVPCm9aLfXvgKbuCSwjTVsqyJKu53t/KGqPnND7agr6/iVFl6AUpiiOQxpjeNrjY76TLde8lVQiKvXzjzg5l8vXBJPUDrxPBw4REC9FQWRpYma6F9q0RCvyGYDySqaIanDgb3modbD6azm5I2cc5rohHYh4JHOj9hkhMoc7jFxp5DodIBc/5st4DmQwvWthbfykyPIi0lx9xTMSH7eGKwMs1T8rEyXCu4q2Hh+ZIx0OmSuJXh85BzF1Lh3iVSlWFNKh/4aWx1bjHf/zg7b1iLLNFnk56WjAe4jig/rBRsuIPR5XGGxuWs2U8iO4VOvZtdKc3S6IpKVWJRM/2WeRY2A== 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=lo5DSkF8my+Scy8i1pnfiQlMkWQ4HFOE6XTmXQCDKrg=; b=11DZV/PECyXM/CaMPTzE+1fnwFz5GvfDgbg7mOQqcubdNpjnavsdLXTypQpOnfXixbPdeWhAa7kH8XwV9rb3ZWRGwTOP7qq5XXJuPk9mwJ1gS+VTcnnQ0VwCElRlmdmoGDhn6Hv1z3konmB1eM6MFzbd/Ry1KOorNUXSVkvrW9U= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB4343.eurprd08.prod.outlook.com (2603:10a6:20b:ba::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Mon, 17 May 2021 15:33:09 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688%7]) with mapi id 15.20.4129.031; Mon, 17 May 2021 15:33:09 +0000 Subject: Re: [edk2-platforms][PATCH V2 03/11] Platform/Sgi: Add Initial SMBIOS support To: Pranav Madhu , devel@edk2.groups.io Cc: Ard Biesheuvel , nd@arm.com References: <20210516092917.21124-1-pranav.madhu@arm.com> <20210516092917.21124-4-pranav.madhu@arm.com> From: "Sami Mujawar" Message-ID: <3c280e2c-1a5c-d062-020b-6bd8c7c6bf4f@arm.com> Date: Mon, 17 May 2021 16:33:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210516092917.21124-4-pranav.madhu@arm.com> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO2P123CA0100.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:139::15) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.1.196.43] (217.140.106.52) by LO2P123CA0100.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:139::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 17 May 2021 15:33:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34e1d5de-d12a-45c6-2312-08d919492524 X-MS-TrafficTypeDiagnostic: AM6PR08MB4343:|AM0PR08MB4225: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /jw4BFhkWQ1Dxxx+ecwux1LMt8Yy92+C4OxQcE4sX/7G+T5YlJe+1zn8msX38/hTW+xfaHhWdb++VDhPuAQiZySCwz3v3XWYNwdQ6oT9K04TzLB2TNNS96UFYzDZfz9jipCxQ1QFtvSBmOe93eNZq1kLkDr8aZHdHt1cMOE0U8bcHsWcbEO3imqTROe2m68DPLPSWvJeEFeDEj2l2Tc3gn6XYt7yaoX06GXQy0/mIMv5ztgT2SnqGdEvjTGPFPCnR0S3AhvHmWI0VYeiqxmu/VkLW/5Jso9c+Ph+EwDqfnagkqAzC0ju+jaRM/Ud2ycRVy/3Rx8udXUYebqfC0rAmHUcneIGGFL+vS180V4+/jvSb3HYwAc+0RrygmfnnNVRh9rugp51Ul1heMgERxQZePsBnxNrP4FaZhcD1INep9pGbf56JYdQ7LRQXUKzGD8XNac4PfhvqSUMExmR+1WP4ZCzbt3rVuAHzpW+xpibY48o6GUS4TYXU4wtRCa0aJ2FqmbG45MAUw77Iu/2Y1gZq29mOj7XzBV/pQuClVPPs8JnDF0+huwk9RP/GOgWLR7Okhjy9EoeJ+ondlNmxKklWHQbl+6j/5/F+HlwQThT9KvYck/zFyTlXPF9NwN/Ou0F8u9mZ5loOgmhdJejM47SnX+p+HXWY68uhGc1CUTu27FX2tVboQQ1F0rIbAFCwBXPWgnfV1LPv6QkGU4hBFP2YTpPHjvTSfCA85rfzau1oi0= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(136003)(366004)(346002)(39850400004)(396003)(186003)(19627235002)(16526019)(36756003)(316002)(83380400001)(52116002)(26005)(38100700002)(38350700002)(6486002)(16576012)(44832011)(66556008)(30864003)(2906002)(53546011)(31696002)(4326008)(86362001)(8936002)(8676002)(956004)(2616005)(33964004)(5660300002)(66946007)(66476007)(31686004)(478600001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?aTBZTExkUUdWMC9heVZrajEyQ054a0Q3dmtGZ2VYNjVJZWg5d25TNFU5MWRH?= =?utf-8?B?LzgwNTlibXBRWGdUTEtHM25jcUhIQ2VtMmFvRFNSOXZkSGNraUhYYmd2ckpy?= =?utf-8?B?Z1dQbjFvdlB4NlkyMUJEYjl2bzdOeGNUNDd3RXJFdk4xdW9IYVc2eDdLOHpJ?= =?utf-8?B?dnZuMjIyK3Babm5yQ240SCtCRnltYjE3MkpwTHpvKzlQeWhRMjdhcllLM0JW?= =?utf-8?B?Z2xUNVdsNThGenhxWkExRkd6MU9pL3lyUCt4Z05FRWluTGxZcHgrL1pmVUVG?= =?utf-8?B?R1hXNGpNbEVwUFlndjBRZFc0dmxVa3ljUm5tMDc5SXVFTk1qci9TRFErbWhz?= =?utf-8?B?Mk5pMUh4NFVmT0RkSlZ4dkNidXhpbFFMc3V4YndHanIvRnVCNmlUUjZWaklF?= =?utf-8?B?aEQ1aFpOckdhMUp6a1NhVEpCUVRZVWxRcldkS3pPMFV0c3NCU08zTmoxYXZ6?= =?utf-8?B?d3k2cTB6cklNVFZqUzZtT0grVzR4Z1IzaFUwMi9qanFiRHk4cDh3RGlJb1J1?= =?utf-8?B?TkhFejJLVjBVWU5rZHBsbVVNVnJrQXAybXhtMW1QekJFRGh6SE9IVTRnaVlF?= =?utf-8?B?Y3pvdzJjenFQOHZGaTNFcFNBNGp2anF5WmxVdXc2MXJIdUxqdDN3dGxaa1F3?= =?utf-8?B?QXhxdmxOSW5Kb0dNU1FjaGVkaExnRWlVVldyZnJYdDZWY0xSd3NZV2hFdWd4?= =?utf-8?B?OVJPL3daOVAvaG0zWWl5cTdiZExmUERicmVqN3ZRT1doNWloUUx4SzlTaTZT?= =?utf-8?B?VTlxUXMwdlNOTzlnL0ZRZ29CajRKVEkxeXVSS3cxeEJMdXl4TnJuMkRxa3lW?= =?utf-8?B?TzhKVUVOcHEwNlJtd0xjbTZFNTJJRkxyblNrUXhMdTJ0RU9ubCtLMCtEbHFH?= =?utf-8?B?WG9NY0c0Uis1OVUrRjg3OWJpYnY4Z3l5WWR6NC80cDd2NTlxVkhxUVR4eldC?= =?utf-8?B?dmdmYkRVUmpNRHBQQ3ZuZDZKK0txTWtIenlpSG1MMnlwTnMydkFxeGFBTUJk?= =?utf-8?B?YkZFaW83TDdsSm43eFRkNDAwZEJaN000MTZTc0FYcmlXMFRtdkozcGcxTmdv?= =?utf-8?B?RENqK1M0WVhhek5Hd3dNRFpGMXloTS9nVzNLVWpuVjM2RHppWEFyOUEveHhQ?= =?utf-8?B?N2dJZDRzdTlHYlhpMTAwODhzN0ZRUVkxbG1scDRlZkF5NWpPMkVyS21RL241?= =?utf-8?B?M09VdGhraXlVbUxYRTBrSVM5QWsxWDJIUWFweDBCU1VVQkp6MHRNVFFOQ3lv?= =?utf-8?B?eEN4ZXU3VGtBakZUYndrTzJFTFUxSkN0WnVzcm5qTmVJOUJRbU1zTzZONHZH?= =?utf-8?B?N1dTMm1Wa1psWnFsY2hubnIyRHlKNmx5WGd3bU52S3lwZ1l0TUk3YUtERnQz?= =?utf-8?B?Q0ZHMjdHdDNmQUEyYUxKVHNvL0ZWT0NmRDFzM21la1dlR1hpZmVKTUtzYU56?= =?utf-8?B?eW1GelJiVTBQTnpjbXA0OStncUFhL0FQT3F1aUdXeWowQlNyRkJiOFFxakox?= =?utf-8?B?emdqQnJxUllmVFpYdStLVDRDeG5sMFUrVDRCRHV6VmcwVVdqUHpBcDhlRnV1?= =?utf-8?B?aDBtdGpyWjZtRWxnU3VRN3cralJzVVBRMUxlRjdsUlRhVkVtVGlzSUM3Z1VU?= =?utf-8?B?Z1ZrNCtuQ2pYdHI5dDVvTGRCOFRkcE9kYVM4Q2lGdnFiZ0hzSTdpYTJiUW1Q?= =?utf-8?B?STF4WUpiUmsvTUdmYk4xeG81WkYzZXZrVkg1L21jOUVDR1RqS05hNzZVaFNx?= =?utf-8?Q?r8zK0f5JMoFGactG99YNm8PIf6IUsQNfoYFshJx?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4343 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 72ab2cd9-90a4-41fd-6b98-08d919491310 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KOCn4RxOCsFJRo7dBq4ecepsy+b13L74YKY5LwQ96AUy1JKLm0hwTghAJcvTKaflAozKR8obONNVphhYAu5PDcXz4+X7dYnwou1+stwHtPnf7gFHCgpFEyv0jXYthVv+y146nNlkF/SimeAITc/bF+Jy1F9rERL403SiHbZ/ciV5dYp7GFqvRsFVVLmhgXi/ljRlBIirKm4wkmkw3R3ni1HQzbbgIgqLQYZ3Se2PuODcHJV71G+NabjnO8Ww1wMbxeAMtd/eyQZ00Zi3H86xp4q+qAowAMwcofRXPBVnW9kJ0g/KR31Re+cDfuYHfvLMEqdzhtKjf+cJKCfHO42JAbH/IhdObRkHzk2QmBxUvg2Hb1ndDIZghhQPVC/YBHR5E3BFT3WgrPm1Q1gI2yDFITwA5KWLVMAVvdTgON87xULh1hDPypEpZFUPtrMkpOzYKEjeno1dXgVXW6NZgHunAFAZ/CpvKom8EvLhGprKI9gkKgu/TyREKUzsaEwHXBQKx6uOZxmnSZOzEx2HSercn8EJzWVj4Pt9oyVHbo0oUwhJHCVb9hyo2mFnbicdYVMeN1khMjhJNusHf1RY+hg8mimfVd5ntbg0K4YK6600MHjRuDlV5z6R4rGgyLXNUVnRC9gI8f+qcW0Zb3ZC79ymlLYWkNmFXJMXfyj0nMf9kKOe3uxItPSM+Y7/+V2F4FtQ 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:(4636009)(136003)(39850400004)(396003)(376002)(346002)(36840700001)(46966006)(33964004)(6486002)(8936002)(82310400003)(53546011)(83380400001)(8676002)(47076005)(31696002)(19627235002)(26005)(356005)(44832011)(336012)(316002)(4326008)(36756003)(2616005)(30864003)(81166007)(5660300002)(2906002)(31686004)(956004)(16526019)(186003)(70586007)(82740400003)(36860700001)(86362001)(70206006)(16576012)(478600001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2021 15:33:39.4086 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34e1d5de-d12a-45c6-2312-08d919492524 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: VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4225 Content-Type: multipart/alternative; boundary="------------2AC6CF8D8CA8FFB6103C4F13" Content-Language: en-GB --------------2AC6CF8D8CA8FFB6103C4F13 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Pranav, Please find my comments inline marked [SAMI]. With those addressed. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 16/05/2021 10:29 AM, Pranav Madhu wrote: > SMBIOS provides basic hardware and firmware configuration information > through table-driven data structure. This patch adds SMBIOS driver > support that allows for installation of multiple SMBIOS types. Also add > SMBIOS Type0 (BIOS Information) table, that include information about > BIOS vendor name, version, SMBIOS version and other information related > to BIOS. > > Signed-off-by: Pranav Madhu > --- > Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 10 ++ > Platform/ARM/SgiPkg/SgiPlatform.fdf | 8 +- > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 46 +++++++ > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h | 20 ++++ > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 98 +++++++++++++++ > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c | 125 ++++++++++++++++++++ > 6 files changed, 306 insertions(+), 1 deletion(-) > > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > index 42e3600d15f4..a0f217f5107c 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > @@ -109,6 +109,10 @@ > # ACPI Table Version > gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 > > + # SMBIOS entry point version > + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0304 > + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 > + > # > # PCIe > # > @@ -247,6 +251,12 @@ > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf > MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf > > + # > + # SMBIOS/DMI > + # > + MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > + Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > + > # > # platform driver > # > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf > index da23804828e5..e11d943d6efc 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf > +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf > @@ -1,5 +1,5 @@ > # > -# Copyright (c) 2018, ARM Limited. All rights reserved. > +# Copyright (c) 2018-2021, ARM Limited. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -102,6 +102,12 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf > !include $(BOARD_DXE_FV_COMPONENTS) > > + # > + # SMBIOS/DMI > + # > + INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > + INF Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > + > # Required by PCI > INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf > > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > new file mode 100644 > index 000000000000..3568380f8404 > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > @@ -0,0 +1,46 @@ > +## @file > +# This driver installs SMBIOS information for RD Platforms > +# > +# Copyright (c) 2021, ARM Limited. All rights reserved. > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +## > + > +[Defines] > + INF_VERSION = 0x0001001A > + BASE_NAME = SmbiosPlatformDxe > + FILE_GUID = 86e0aa8b-4f8d-44a5-a140-1f693d529c76 > + MODULE_TYPE = DXE_DRIVER > + VERSION_STRING = 1.0 > + ENTRY_POINT = SmbiosTableEntryPoint > + > +[Sources] > + SmbiosPlatformDxe.c > + Type0BiosInformation.c > + > +[Packages] > + ArmPkg/ArmPkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > + MdeModulePkg/MdeModulePkg.dec > + MdePkg/MdePkg.dec > + Platform/ARM/SgiPkg/SgiPlatform.dec > + > +[LibraryClasses] > + ArmPlatformLib > + DebugLib > + HobLib > + UefiDriverEntryPoint > + > +[Guids] > + gEfiGlobalVariableGuid > + gArmSgiPlatformIdDescriptorGuid > + > +[FixedPcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision > + > +[Protocols] > + gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED > + > +[Guids] > + > +[Depex] > + gEfiSmbiosProtocolGuid > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h > new file mode 100644 > index 000000000000..091e0ec8314e > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h > @@ -0,0 +1,20 @@ > +/** @file > + Declarations required for SMBIOS DXE driver. > + > + Functions declarations and data type declarations required for SMBIOS DXE > + driver of the Arm Reference Design platforms. > + > + Copyright (c) 2021, ARM Limited. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ > + > +#ifndef SMBIOS_PLATFORM_DXE_H_ > +#define SMBIOS_PLATFORM_DXE_H_ > + > +EFI_STATUS > +EFIAPI > +InstallBiosInformation ( > + IN EFI_SMBIOS_PROTOCOL *Smbios > + ); [SAMI] Doxygen header? Same comment for other patches in this series. [/SAMI] > + > +#endif // SMBIOS_PLATFORM_DXE_H_ > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > new file mode 100644 > index 000000000000..eb3ba45ca654 > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > @@ -0,0 +1,98 @@ > +/** @file > + Install SMBIOS tables for Arm's SGI/RD platforms. > + > + This file is the driver entry point for installing SMBIOS tables on Arm's > + Reference Design platforms. For each SMBIOS table installation handler > + registered, the driver invokes the handler to register the respective table. > + > + Copyright (c) 2021, ARM Limited. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > + @par Specification Reference: > + - SMBIOS Reference Specification 3.4.0 > +**/ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "SgiPlatform.h" > +#include "SmbiosPlatformDxe.h" > + > +typedef EFI_STATUS (*ARM_RD_SMBIOS_TABLE_INSTALL_FPTR)(EFI_SMBIOS_PROTOCOL *); > + > +STATIC > +ARM_RD_SMBIOS_TABLE_INSTALL_FPTR mSmbiosTableList[] = { > + &InstallBiosInformation, > +}; > + > +/** > + Driver entry point. Installs SMBIOS information. > + > + For all the available SMBIOS table installation handlers, invoke each of > + those handlers and let the handlers install the SMBIOS tables. The count > + of handlers that fail to install the SMBIOS tables is maintained for > + additional logging. > + > + @param ImageHandle Module's image handle. > + @param SystemTable Pointer of EFI_SYSTEM_TABLE. > + > + @retval EFI_SUCCESS All SMBIOS table install handlers invoked. > + @retval EFI_NOT_FOUND Unsupported platform. > + @retval Others Failed to invoke SMBIOS table install handlders. > +**/ > +EFI_STATUS > +EFIAPI > +SmbiosTableEntryPoint ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + EFI_STATUS Status; > + EFI_SMBIOS_PROTOCOL *Smbios = NULL; > + UINT8 CountFail = 0; > + UINT8 Idx; > + > + /* Install SMBIOS table only for supported product */ > + if (SgiGetProductId () == UnknownId) { > + DEBUG (( > + DEBUG_ERROR, > + "Failed to install SMBIOS: Unknown product\n" > + )); > + return EFI_NOT_FOUND; > + } > + > + /* Find the SMBIOS protocol */ > + Status = gBS->LocateProtocol ( > + &gEfiSmbiosProtocolGuid, > + NULL, > + (VOID **)&Smbios > + ); > + if (EFI_ERROR (Status)) { > + DEBUG (( > + DEBUG_ERROR, > + "Failed to install SMBIOS: Unable to locate protocol\n" > + )); > + return Status; > + } > + > + /* Install the tables listed in mSmbiosTableList */ > + for (Idx = 0; Idx < ARRAY_SIZE (mSmbiosTableList); Idx++) { > + Status = (*mSmbiosTableList[Idx]) (Smbios); > + if (Status != EFI_SUCCESS) { > + CountFail++; > + } > + } > + > + DEBUG (( > + DEBUG_INFO, > + "Installed %d of %d available SMBIOS tables\n", > + ARRAY_SIZE (mSmbiosTableList) - CountFail, > + ARRAY_SIZE (mSmbiosTableList) > + )); > + > + return EFI_SUCCESS; > +} > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c > new file mode 100644 > index 000000000000..67c20c336c3d > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c > @@ -0,0 +1,125 @@ > +/** @file > + SMBIOS Type 0 (BIOS information) table for ARM RD platforms. > + > + Install SMBIOS Type 0 (BIOS information) table for Arm's Reference Design > + platforms. > + > + Copyright (c) 2021, ARM Limited. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > + @par Specification Reference: > + - SMBIOS Reference Specification 3.4.0, Chapter 7.1 > +**/ > + > +#include > +#include > + > +#define TYPE0_STRINGS \ > + "ARM LTD\0" /* Vendor */ \ > + "EDK II\0" /* BiosVersion */ \ > + __DATE__"\0" /* BiosReleaseDate */ \ > + "\0" > + > +/* SMBIOS Type0 structure */ > +#pragma pack(1) > +struct ArmRdSmbiosType0 { [SAMI] typedef for the struct ? Please also revisit the structure naming convention in the coding standard. Same comment for other patches in this series. [/SAMI] > + SMBIOS_TABLE_TYPE0 Base; > + INT8 Strings[sizeof (TYPE0_STRINGS)]; [SAMI]Can CHAR8 be used instead of INT8? > +}; > +#pragma pack() > + > +/* BIOS information */ > +static struct ArmRdSmbiosType0 mArmRdSmbiosType0 = { [SAMI] STATIC in capital letters. [/SAMI] > + { > + { > + // SMBIOS header > + EFI_SMBIOS_TYPE_BIOS_INFORMATION, // Type 0 > + sizeof (SMBIOS_TABLE_TYPE0), // Length > + SMBIOS_HANDLE_PI_RESERVED, // Assign an unused handle number > + }, > + 1, // String number of vendor name in TYPE0_STRINGS > + 2, // String number of BiosVersion [SAMI] Can enums be used for the string numbers? Same comment for other patches in this series. > + 0, // Bios starting address segment > + 3, // String number of BiosReleaseDate > + 0, // Bios ROM size [SAMI] Neither BIOS ROM size not Extended BIOS ROM size is set. Is this specification compliant? > + { // MISC_BIOS_CHARACTERISTICS BiosCharacteristics > + 0, // Reserved > + 0, // Unknown > + 0, // BIOS Characteristics are not supported > + 0, // ISA is supported > + 0, // MCA is supported > + 0, // EISA is supported [SAMI] Can you revisit the comments for this structure initialisation, please? They look a bit out of place. These look to be copied from the specification wherein the table column header mentions 'Meaning if Set'. See if this can be clarified in the comments Or a suggestion would be to change the comments to something like '// ISA support'. [/SAMI] > + 1, // PCI supported > + 0, // PC card (PCMCIA) is supported > + 1, // Plug and Play is supported > + 0, // APM is supported > + 1, // BIOS upgradable > + 0, // BIOS shadowing is allowed > + 0, // VL-VESA is supported > + 0, // ESCD support is available > + 0, // Boot from CD is supported > + 1, // selectable boot > + }, > + { // BIOSCharacteristicsExtensionBytes > + ( > + (1 << 0) | // ACPI Supported > + (1 << 1) // Legacy USB supported > + ), > + ( > + (1 << 3) | // Content distribution enabled > + (1 << 4) // UEFI spec supported > + ) > + }, > + 0, // SMBIOS Major Release, updated dynamically > + 0, // SMBIOS Minor Release, updated dynamically > + 0xFF, // Embedded Controller Firmware Major Release > + 0xFF // Embedded Controller Firmware Minor Release > + }, > + // Text strings (unformatted area) > + TYPE0_STRINGS > +}; > + > +/** > + Install SMBIOS BIOS information Table. > + > + Install the SMBIOS BIOS information (type 0) table for Arm's reference design > + platforms. > + > + @param[in] Smbios SMBIOS protocol. > + > + @retval EFI_SUCCESS Record was added. > + @retval EFI_OUT_OF_RESOURCES Record was not added. > + @retval EFI_ALREADY_STARTED The SmbiosHandle passed in is already in use. > +**/ > +EFI_STATUS > +InstallBiosInformation ( [SAMI] Would it be good to change the function name to indicate Type0 SMBIOS table? Something like InstallType ? Same comment for other patches in this series. [/SAMI] > + IN EFI_SMBIOS_PROTOCOL *Smbios > + ) > +{ > + EFI_STATUS Status; > + EFI_SMBIOS_HANDLE SmbiosHandle; > + > + SmbiosHandle = ((EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType0)->Handle; > + > + /* Update firmware revision */ > + mArmRdSmbiosType0.Base.SystemBiosMajorRelease = > + (PcdGet32 ( PcdFirmwareRevision ) >> 16) & 0xFF; [SAMI] No space should be there before and after PcdFirmwareRevision. Same comment for the line below. > + mArmRdSmbiosType0.Base.SystemBiosMinorRelease = > + PcdGet32 ( PcdFirmwareRevision ) & 0xFF; > + > + /* Install type 0 table */ > + Status = Smbios->Add ( > + Smbios, > + NULL, > + &SmbiosHandle, > + (EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType0 > + ); > + if (Status != EFI_SUCCESS) { [SAMI] if (EFI_ERROR (Status)) ? > + DEBUG (( > + DEBUG_ERROR, > + "SMBIOS: Failed to install Type0 SMBIOS table.\n" > + )); > + } > + > + return Status; > +} --------------2AC6CF8D8CA8FFB6103C4F13 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi Pranav,

Please find my comments inline marked [SAMI].

With those addressed.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 16/05/2021 10:29 AM, Pranav Madhu wrote:
SMBIOS provides basic hardware and firmware configuration information
through table-driven data structure. This patch adds SMBIOS driver
support that allows for installation of multiple SMBIOS types. Also add
SMBIOS Type0 (BIOS Information) table, that include information about
BIOS vendor name, version, SMBIOS version and other information related
to BIOS.

Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
---
 Platform/ARM/SgiPkg/SgiPlatform.dsc.inc                              |  10 ++
 Platform/ARM/SgiPkg/SgiPlatform.fdf                                  |   8 +-
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf  |  46 +++++++
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h    |  20 ++++
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c    |  98 +++++++++++++++
 Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c | 125 ++++++++++++++++++++
 6 files changed, 306 insertions(+), 1 deletion(-)

diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
index 42e3600d15f4..a0f217f5107c 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
@@ -109,6 +109,10 @@
   # ACPI Table Version
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
 
+  # SMBIOS entry point version
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0304
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
+
   #
   # PCIe
   #
@@ -247,6 +251,12 @@
   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
+  #
+  # SMBIOS/DMI
+  #
+  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+  Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+
   #
   # platform driver
   #
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index da23804828e5..e11d943d6efc 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -1,5 +1,5 @@
 #
-#  Copyright (c) 2018, ARM Limited. All rights reserved.
+#  Copyright (c) 2018-2021, ARM Limited. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -102,6 +102,12 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 !include $(BOARD_DXE_FV_COMPONENTS)
 
+  #
+  # SMBIOS/DMI
+  #
+  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+  INF Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+
   # Required by PCI
   INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
 
diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
new file mode 100644
index 000000000000..3568380f8404
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
@@ -0,0 +1,46 @@
+## @file
+#  This driver installs SMBIOS information for RD Platforms
+#
+#  Copyright (c) 2021, ARM Limited. All rights reserved.
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+  INF_VERSION                    = 0x0001001A
+  BASE_NAME                      = SmbiosPlatformDxe
+  FILE_GUID                      = 86e0aa8b-4f8d-44a5-a140-1f693d529c76
+  MODULE_TYPE                    = DXE_DRIVER
+  VERSION_STRING                 = 1.0
+  ENTRY_POINT                    = SmbiosTableEntryPoint
+
+[Sources]
+  SmbiosPlatformDxe.c
+  Type0BiosInformation.c
+
+[Packages]
+  ArmPkg/ArmPkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  MdePkg/MdePkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[LibraryClasses]
+  ArmPlatformLib
+  DebugLib
+  HobLib
+  UefiDriverEntryPoint
+
+[Guids]
+  gEfiGlobalVariableGuid
+  gArmSgiPlatformIdDescriptorGuid
+
+[FixedPcd]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision
+
+[Protocols]
+  gEfiSmbiosProtocolGuid                      # PROTOCOL ALWAYS_CONSUMED
+
+[Guids]
+
+[Depex]
+  gEfiSmbiosProtocolGuid
diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h
new file mode 100644
index 000000000000..091e0ec8314e
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h
@@ -0,0 +1,20 @@
+/** @file
+  Declarations required for SMBIOS DXE driver.
+
+  Functions declarations and data type declarations required for SMBIOS DXE
+  driver of the Arm Reference Design platforms.
+
+  Copyright (c) 2021, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef SMBIOS_PLATFORM_DXE_H_
+#define SMBIOS_PLATFORM_DXE_H_
+
+EFI_STATUS
+EFIAPI
+InstallBiosInformation (
+  IN     EFI_SMBIOS_PROTOCOL    *Smbios
+  );
[SAMI] Doxygen header? Same comment for other patches in this series.
[/SAMI]
+
+#endif // SMBIOS_PLATFORM_DXE_H_
diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
new file mode 100644
index 000000000000..eb3ba45ca654
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -0,0 +1,98 @@
+/** @file
+  Install SMBIOS tables for Arm's SGI/RD platforms.
+
+  This file is the driver entry point for installing SMBIOS tables on Arm's
+  Reference Design platforms. For each SMBIOS table installation handler
+  registered, the driver invokes the handler to register the respective table.
+
+  Copyright (c) 2021, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Specification Reference:
+    - SMBIOS Reference Specification 3.4.0
+**/
+
+#include <IndustryStandard/SmBios.h>
+#include <Library/DebugLib.h>
+#include <Library/HobLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <PiDxe.h>
+#include <Protocol/Smbios.h>
+
+#include "SgiPlatform.h"
+#include "SmbiosPlatformDxe.h"
+
+typedef EFI_STATUS (*ARM_RD_SMBIOS_TABLE_INSTALL_FPTR)(EFI_SMBIOS_PROTOCOL *);
+
+STATIC
+ARM_RD_SMBIOS_TABLE_INSTALL_FPTR mSmbiosTableList[] = {
+  &InstallBiosInformation,
+};
+
+/**
+  Driver entry point. Installs SMBIOS information.
+
+  For all the available SMBIOS table installation handlers, invoke each of
+  those handlers and let the handlers install the SMBIOS tables. The count
+  of handlers that fail to install the SMBIOS tables is maintained for
+  additional logging.
+
+  @param ImageHandle     Module's image handle.
+  @param SystemTable     Pointer of EFI_SYSTEM_TABLE.
+
+  @retval EFI_SUCCESS    All SMBIOS table install handlers invoked.
+  @retval EFI_NOT_FOUND  Unsupported platform.
+  @retval Others         Failed to invoke SMBIOS table install handlders.
+**/
+EFI_STATUS
+EFIAPI
+SmbiosTableEntryPoint (
+  IN     EFI_HANDLE             ImageHandle,
+  IN     EFI_SYSTEM_TABLE       *SystemTable
+  )
+{
+  EFI_STATUS Status;
+  EFI_SMBIOS_PROTOCOL *Smbios = NULL;
+  UINT8 CountFail = 0;
+  UINT8 Idx;
+
+  /* Install SMBIOS table only for supported product */
+  if (SgiGetProductId () == UnknownId) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "Failed to install SMBIOS: Unknown product\n"
+      ));
+    return EFI_NOT_FOUND;
+  }
+
+  /* Find the SMBIOS protocol */
+  Status = gBS->LocateProtocol (
+                  &gEfiSmbiosProtocolGuid,
+                  NULL,
+                  (VOID **)&Smbios
+                  );
+  if (EFI_ERROR (Status)) {
+    DEBUG ((
+      DEBUG_ERROR,
+      "Failed to install SMBIOS: Unable to locate protocol\n"
+      ));
+    return Status;
+  }
+
+  /* Install the tables listed in mSmbiosTableList */
+  for (Idx = 0; Idx < ARRAY_SIZE (mSmbiosTableList); Idx++) {
+    Status = (*mSmbiosTableList[Idx]) (Smbios);
+    if (Status != EFI_SUCCESS) {
+      CountFail++;
+    }
+  }
+
+  DEBUG ((
+    DEBUG_INFO,
+    "Installed %d of %d available SMBIOS tables\n",
+    ARRAY_SIZE (mSmbiosTableList) - CountFail,
+    ARRAY_SIZE (mSmbiosTableList)
+    ));
+
+  return EFI_SUCCESS;
+}
diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c
new file mode 100644
index 000000000000..67c20c336c3d
--- /dev/null
+++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type0BiosInformation.c
@@ -0,0 +1,125 @@
+/** @file
+  SMBIOS Type 0 (BIOS information) table for ARM RD platforms.
+
+  Install SMBIOS Type 0 (BIOS information) table for Arm's Reference Design
+  platforms.
+
+  Copyright (c) 2021, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Specification Reference:
+    - SMBIOS Reference Specification 3.4.0, Chapter 7.1
+**/
+
+#include <Library/DebugLib.h>
+#include <Protocol/Smbios.h>
+
+#define TYPE0_STRINGS                                   \
+  "ARM LTD\0"                   /* Vendor */            \
+  "EDK II\0"                    /* BiosVersion */       \
+  __DATE__"\0"                  /* BiosReleaseDate */   \
+  "\0"
+
+/* SMBIOS Type0 structure */
+#pragma pack(1)
+struct ArmRdSmbiosType0 {
[SAMI] typedef for the struct ? Please also revisit the structure naming convention in the coding standard.
Same comment for other patches in this series.
[/SAMI]
+  SMBIOS_TABLE_TYPE0  Base;
+  INT8                Strings[sizeof (TYPE0_STRINGS)];
[SAMI] Can CHAR8 be used instead of INT8?
+};
+#pragma pack()
+
+/* BIOS information */
+static struct ArmRdSmbiosType0 mArmRdSmbiosType0 = {
[SAMI] STATIC in capital letters.
[/SAMI]
+  {
+    {
+      // SMBIOS header
+      EFI_SMBIOS_TYPE_BIOS_INFORMATION, // Type 0
+      sizeof (SMBIOS_TABLE_TYPE0),      // Length
+      SMBIOS_HANDLE_PI_RESERVED,        // Assign an unused handle number
+    },
+    1,              // String number of vendor name in TYPE0_STRINGS
+    2,              // String number of BiosVersion
[SAMI] Can enums be used for the string numbers? Same comment for other patches in this series.
+    0,              // Bios starting address segment
+    3,              // String number of BiosReleaseDate
+    0,              // Bios ROM size
[SAMI] Neither BIOS ROM size not Extended BIOS ROM size is set. Is this specification compliant?
+    {               // MISC_BIOS_CHARACTERISTICS BiosCharacteristics
+      0,            // Reserved
+      0,            // Unknown
+      0,            // BIOS Characteristics are not supported
+      0,            // ISA is supported
+      0,            // MCA is supported
+      0,            // EISA is supported
[SAMI] Can you revisit the comments for this structure initialisation, please? They look a bit out of place.
These look to be copied from the specification wherein the table column header mentions 'Meaning if Set'.
See if this can be clarified in the comments Or a suggestion would be to change the comments to something like '// ISA support'.
[/SAMI]
+      1,            // PCI supported
+      0,            // PC card (PCMCIA) is supported
+      1,            // Plug and Play is supported
+      0,            // APM is supported
+      1,            // BIOS upgradable
+      0,            // BIOS shadowing is allowed
+      0,            // VL-VESA is supported
+      0,            // ESCD support is available
+      0,            // Boot from CD is supported
+      1,            // selectable boot
+    },
+    {               // BIOSCharacteristicsExtensionBytes
+      (
+        (1 << 0) |  // ACPI Supported
+        (1 << 1)    // Legacy USB supported
+      ),
+      (
+        (1 << 3) |  // Content distribution enabled
+        (1 << 4)    // UEFI spec supported
+      )
+    },
+    0,              // SMBIOS Major Release, updated dynamically
+    0,              // SMBIOS Minor Release, updated dynamically
+    0xFF,           // Embedded Controller Firmware Major Release
+    0xFF            // Embedded Controller Firmware Minor Release
+  },
+  // Text strings (unformatted area)
+  TYPE0_STRINGS
+};
+
+/**
+  Install SMBIOS BIOS information Table.
+
+  Install the SMBIOS BIOS information (type 0) table for Arm's reference design
+  platforms.
+
+  @param[in] Smbios   SMBIOS protocol.
+
+  @retval EFI_SUCCESS           Record was added.
+  @retval EFI_OUT_OF_RESOURCES  Record was not added.
+  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed in is already in use.
+**/
+EFI_STATUS
+InstallBiosInformation (
[SAMI] Would it be good to change the function name to indicate Type0 SMBIOS table? Something like InstallType<n><Short description> ?
Same comment for other patches in this series.
[/SAMI]
+  IN     EFI_SMBIOS_PROTOCOL    *Smbios
+  )
+{
+  EFI_STATUS Status;
+  EFI_SMBIOS_HANDLE SmbiosHandle;
+
+  SmbiosHandle = ((EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType0)->Handle;
+
+  /* Update firmware revision */
+  mArmRdSmbiosType0.Base.SystemBiosMajorRelease =
+    (PcdGet32 ( PcdFirmwareRevision ) >> 16) & 0xFF;
[SAMI] No space should be there before and after PcdFirmwareRevision. Same comment for the line below.
+  mArmRdSmbiosType0.Base.SystemBiosMinorRelease =
+    PcdGet32 ( PcdFirmwareRevision ) & 0xFF;
+
+  /* Install type 0 table */
+  Status = Smbios->Add (
+                     Smbios,
+                     NULL,
+                     &SmbiosHandle,
+                     (EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType0
+                     );
+  if (Status != EFI_SUCCESS) {
[SAMI] if (EFI_ERROR (Status)) ?
+    DEBUG ((
+      DEBUG_ERROR,
+      "SMBIOS: Failed to install Type0 SMBIOS table.\n"
+      ));
+  }
+
+  return Status;
+}

--------------2AC6CF8D8CA8FFB6103C4F13--