From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.51]) by mx.groups.io with SMTP id smtpd.web08.20917.1621265658143851608 for ; Mon, 17 May 2021 08:34:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=v6loavcs; spf=pass (domain: arm.com, ip: 40.107.6.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=PNaemR/8N33uCaJr1VFQTz9g9w4Tg4YOgE6s+buNEzE=; b=v6loavcsO0Zs1RYC4Vh9meC7Z2OogtQFK13nnzrQJoTzmlzqmPvBkvDI3T3ZMZD+YfG0TqTC5zKIu2egEz74XvBOjvq0lN+hzeAsAO7a3soTnWy147lK0LztbKjEveUD++hr7IfdRQreAwLoiAjtg1t61hEvMpU3CWJJk0hfhBQ= Received: from DBBPR09CA0020.eurprd09.prod.outlook.com (2603:10a6:10:c0::32) by VI1PR0801MB1710.eurprd08.prod.outlook.com (2603:10a6:800:53::20) 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:34:15 +0000 Received: from DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::aa) by DBBPR09CA0020.outlook.office365.com (2603:10a6:10:c0::32) 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:34:15 +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 DB5EUR03FT007.mail.protection.outlook.com (10.152.20.148) 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:34:15 +0000 Received: ("Tessian outbound 504317ef584c:v92"); Mon, 17 May 2021 15:34:15 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 639a7e1d878dd9b2 X-CR-MTA-TID: 64aa7808 Received: from a4dad8fcbe74.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8EF81A38-5725-4875-845B-58E02465237D.1; Mon, 17 May 2021 15:33:32 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a4dad8fcbe74.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 17 May 2021 15:33:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U2O82wh5a9VhxN7BMTarea7PeL+Z+IjiKU0lwfe72ytuLymMTWcFKe/MVqIZbvVLTuyoehGdkULjg0GfOQ0HaNLZXJqW/60V8sXiDTQloow/9h1zTWiod/+K55v1ik0gRNsAVhF8PP3Akj1rrdJTTW4D1WDsZOFDO89MZir163ZZoKxJOcXuv3b5m59r8LRuuTGcXyYKKklSIan230WCfo/3jYIgWxUnsUaoIlwSYKUTkbyloAVuguAJfV6/h9w+9EBSUgaIos3WLEobe0/8SVbOM3suZ1eEDV/GMRsUmeT3scRvNS1M3ezJmMvQ5BwIphLb690wCDiXJ5CKndUZEA== 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=PNaemR/8N33uCaJr1VFQTz9g9w4Tg4YOgE6s+buNEzE=; b=ZhoWWrrDsu7+wQ1dwvojg2SoSFDwDEqbk2qEtfe6Nkn0SLuHAQhDoqph6yPHx9HRvz6wGQ3LltB2WsJX5WKqvhxBI5kz4+IT6XTA99lfjzrY3JiFoYrO37a/RpGTkZbHpWjsNEBkdjrtIE0fn/f+5xDrcx4p4iZnrgQULqOy47rf3vrDft+kK5jh5J0G2+U1zphgCUuCxuF/m1B0BD4OxPhv+saAtbOYGHooZf9UcumsBV+TTl8ZAfcwu20jTXSyh3dZBa5+bizNt/T7hbgz9xPFzL7V8xHIX7pF0oE42yQ+iyCti2Ycy4CB2Vxp7oEvovbs8vGV2/+j1J699lS5tQ== 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=PNaemR/8N33uCaJr1VFQTz9g9w4Tg4YOgE6s+buNEzE=; b=v6loavcsO0Zs1RYC4Vh9meC7Z2OogtQFK13nnzrQJoTzmlzqmPvBkvDI3T3ZMZD+YfG0TqTC5zKIu2egEz74XvBOjvq0lN+hzeAsAO7a3soTnWy147lK0LztbKjEveUD++hr7IfdRQreAwLoiAjtg1t61hEvMpU3CWJJk0hfhBQ= 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:28 +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:28 +0000 Subject: Re: [edk2-platforms][PATCH V2 06/11] Platform/Sgi: Add SMBIOS Type4 Table To: Pranav Madhu , devel@edk2.groups.io Cc: Ard Biesheuvel , nd@arm.com References: <20210516092917.21124-1-pranav.madhu@arm.com> <20210516092917.21124-7-pranav.madhu@arm.com> From: "Sami Mujawar" Message-ID: Date: Mon, 17 May 2021 16:33:27 +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-7-pranav.madhu@arm.com> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO2P123CA0001.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::13) 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 LO2P123CA0001.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::13) 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:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 26bb850b-d6b4-4bfc-227f-08d919493a4e X-MS-TrafficTypeDiagnostic: AM6PR08MB4343:|VI1PR0801MB1710: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1824;OLM:1824; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: AV4pndR/TyUUca4cjSVHu3xhSK93FjTEyfAWh7XhNoxPuxDjoW9tt2QBeJ/7Laj+ksgbDX5qtlJ0fHuXIRhQBtmNAuvOOD3SqFbv+As6epiI2Su6Mdcerx+8p8qhZY3nFlED1+ek1zrOsSHwamwDRDV3YlqUeXVch/llXjk4l2S+7AHvwmwnpOaLiJa0tkkJjcUHw3cMwvba9hNbzDihGPQXNEWVWZxXRG6sq+dG+RPWGiBmgzOunq1VBGL1txZ5lqs7/kQOdnqEfSjG9/sYzrSY+CnjO8lTSP7u285VQfrRFYRqShsmG8VA0ObIDT3C+jPSnqTva25GE2H1Qra+OevjlzhO/F2DY6mPujOtWz8kTtqMJdsySZEr+vaEClf0TQ+zhJMkmPVx6wWCqnpLNLeovRhTJSAk9AusB1le00XQ6iQd//onb8Zst9MH2w/rgWtTZyKUexFY6Tj5TOQAX7vrQhNSZnEv6nG2IHuLvuC5bKLmu22tgLvw4HlmJ0K+kIIWDw5ubc1mEhIM1OBjrMLHOa4ED6cjs+oP6g9FJ601XWgMwG33Gl7fS1nE2U9dE+gpkNakrP2Nl+pbew73iMhBfSEYauOHMNALsEPOkwJjQe4EVD+4sMhQXPrqAceE6cTlHx1Ec8unrix3XUV+vY7UmSmmST5dENz6eWkPukuF/xS5Yl7W3WKTqMLRdKjCXrCZow5eIQ4uK33oMMQRbwTfFAWHMH9tkGa423iSb+c= 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)(5660300002)(66946007)(66476007)(31686004)(478600001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?K0wvWlRoRjBLQWZ5Z2k0WWFqeXNicU1uR0N2L1h0ZTBRZnN5a3Rhano1UFk0?= =?utf-8?B?TElNZHk4ODgxVW5xY1lmVUFDVkh2Z2pTbnNVWTlDVW1CZVBXdVRBL0pXSkd3?= =?utf-8?B?Qi9aVi9UdU4xMFhuSVRTeXZJS01TWkRCNHJjc3hRcjkraWNWbExMYjRvQnBI?= =?utf-8?B?NitMSTNLT0hwVmhjUXpGM0dqTFJJYWJDRHVuMkFsM3NjWGpET01SNi9jRFlm?= =?utf-8?B?cTU2ZzJDSVZmRG1CTzk4RnlEM2V1MjNoelRiVmIvbC96QTZwU1lDejFCM2xj?= =?utf-8?B?SGFWZnl4dmFseHM1bVhqMC9mZVNRaTU2VlpRSHdVTGlTdndOUDN3Y3JkRFcy?= =?utf-8?B?VUt0QmY5ZmRhcjZnaEJIczBqbUwrWkw1bFFwREFLTHhoMW9VSGJwbFpwZTU5?= =?utf-8?B?Vlg3emFRamxqQko0NWp2cC9mU2lyQlhXVjNXR254SUM2NzBzZ1YwcXBMR0N4?= =?utf-8?B?Q1Y1SENBL3NOeGQyYi9PME8rT1NNUlM5QUw1aG50N3lNRVB2RHIyQmxOdzZQ?= =?utf-8?B?OEd6a2Vidm9ubHRMV2xwK0N5THBva0ZzSXRuSUZXRzB0UHFHMG16Q2FRVi9N?= =?utf-8?B?eDN3dHpoZ3RSMGN5NGc0ejhUQzE5U3Fab0FrdkVqNit1VEd2R1FxOTFCMG1r?= =?utf-8?B?bVZ4S050ZVNVeEVPeFhRMlU0RjJFVGxmNkdwUmFTNjhmRzM5azhMaXpKeGdB?= =?utf-8?B?VWhZWGZLaHpEeldtOEMzc2QxS0hQVVlFanpSMVcrVDhQRkN5bzNIaHgwYS9I?= =?utf-8?B?UXkxdUwzbkdSblpXaGN0SWJHZXpNazlzb2RLY1g0TEg4NTlNQlE3eHljMmU2?= =?utf-8?B?TEVQYTByblZ4MWIzbng2L0tHRkFINGs5d0RKZmREcUpYWXp2YzNQc0tzWTEw?= =?utf-8?B?ZHZMRk10T1ZXWVBlSitVdkQ1UHNCV1drUE12SFdDQWhuRHBvZDRCT2Y2OXJD?= =?utf-8?B?WURXNEsxSDg0Wm1UR05Ic1N2U1FEMGxpZ1A4bXM0dGdKT241YzZKbnh6K3kx?= =?utf-8?B?NzZ5WUpyRkVKSjczaWFGS3ZkV2ZqRDBPRVhYNFhsUGNQcE05eGF1Z21UOXdz?= =?utf-8?B?S2JpQkxSOVMrR0c0RWlQMmJhQUF4aUhsZHJyMVo0aTFDNlk2MmNzUUh0Smlu?= =?utf-8?B?cFk5ejZjOXYzQy9VdTNoZVYwRGQvd2FUVWp3cHNKT0VoQUdJQzd3bWpGNGRK?= =?utf-8?B?eHl4UHlwQ3RzY3pwL3ArR3J5M0xlbzlnWmNnR0dBckozT0pKLzNzLy8yei9s?= =?utf-8?B?eWRvcVVNUDRYYmpRWlUvMGlqZmplc2I5dTJqSWhvV1FjSU91MXF1UE0xRmg0?= =?utf-8?B?UGJCYkZ2Zy9YWGl3MmMwL3pZblF5ejBjdTlDY3VkalNvaWcvU1dqT2o3QUlv?= =?utf-8?B?c2FHdkR4bUJCQkpzM1JwanRSMFFwUTdlSHQ3QWtoTU4yamsrMWpDL3dCdEF5?= =?utf-8?B?ZzlFOHVSek5YZk1Cc1U3RXFNZURmYTNsZUQ0Yytyb1dVOUd3U09xS3VCS0hj?= =?utf-8?B?OFRLQXgxSWkrNW5ZdVZvV1NUTExwczdKZ0NMMUZGR1k1VHNENSs1WnlNL3pG?= =?utf-8?B?VnB6eDZ5SWNPYWIyNjVMOVhqQjRhY3RmeVZjVlZ3YVZwMnBPZ3NraTIrUThk?= =?utf-8?B?akhBNUE4U08rOCtDdmhNbTVpd1hacFZub1JqRTkxNmNCOWhJb21rVVhSNm8z?= =?utf-8?B?WUs0MWp4Y0JDU2l2K1EzazI2amR3SWJXZ3NiWHY5ekQwQXR2cXZNVTlFcHZC?= =?utf-8?Q?msRxkhZxXfuKGfV3Jj0CGoB1gzJskBafX/Y8Jkr?= 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: DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ef122c8f-d29f-4688-c356-08d919491e73 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WL38+XKGGK/A/8/iaKwc5p1mL5E2EcRVXy51w14m9gdOhVKE7tYWP/islNqd1kUa8yC4Y/XSxQzp9LjxUe8CluuvzXd0sCOj3ie3Qzp5/htec1dMDXJHCFZkz73Hqb0ztDhhud9dXiASUVbQUp8ShIJK6dTZAb84FwclPtALK4Na5a8rUW07IE2Z8hZ3G+GNWTwvMuCKdaTvPEDeZggDdMpE9n5hCMKHgX42luKeQirmw/MzmHROZmwrSdbeA+NwCB9QbDSoa00FP9T1TCBxHKbLpzGyVxoLZOszzMDZM8WXdCWC5VuBIYFD7Xv80vmF/5PCbAujjIv0i2Za5fAkKkCZVUYOYYoaBQSUr1pBIR0fc8NtYJpcqFq7ttq6IPu97EnW2c/wFDSq5IfFA/md5NuspD8VWO7X/SJEXjXspSOfCYmaKsnAEwEe2/br9O1qUKy0MN0zGH6Gm1snrJoAROZ05xeqWZMBWFn9qxb79k72SG/7E7DKeaICZMomz207J/XMTf1+RcTxSiLAOx4ouhZqpjasZYqFVpGrLI4/UVd4MvyX7mUnr1YSG4S3J7qXytX8eV3W76uyJ3ba5vQ1JuxjNLIRECPgynwjReV8+3ZeKVbpFhT84b+Rq7RuiCwl7VsHZf1BfMYHwWD9jHHtqWNKlAD4K/TdeExoyImSlsA6yyGY9U0bxDWRYSzzkKAL 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)(346002)(396003)(136003)(39850400004)(376002)(46966006)(36840700001)(83380400001)(47076005)(356005)(82740400003)(5660300002)(31686004)(36756003)(26005)(19627235002)(4326008)(82310400003)(81166007)(36860700001)(956004)(2616005)(478600001)(16576012)(8936002)(2906002)(31696002)(16526019)(44832011)(186003)(70586007)(86362001)(70206006)(336012)(6486002)(53546011)(316002)(30864003)(8676002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2021 15:34:15.1072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 26bb850b-d6b4-4bfc-227f-08d919493a4e 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: DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1710 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Pranav, Please find my comments inline marked [SAMI]. Some comments in previous patches apply here as well and are not mentioned. With those addressed. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 16/05/2021 10:29 AM, Pranav Madhu wrote: > Add the SMBIOS type 4 table (Processor Information) that includes > information about manufacture, family, processor id, maximum operating > frequency, and other information related to the processor. > > Signed-off-by: Pranav Madhu > --- > Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 1 + > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 6 + > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h | 12 ++ > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 1 + > Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c | 209 ++++++++++++++++++++ > 5 files changed, 229 insertions(+) > > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > index a0f217f5107c..091de0c99c74 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc > @@ -56,6 +56,7 @@ > HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf > MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > > [LibraryClasses.common.DXE_DRIVER] > FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > index b3c1619ddc66..4652a9c62b88 100644 > --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf > @@ -18,6 +18,7 @@ > Type0BiosInformation.c > Type1SystemInformation.c > Type3SystemEnclosure.c > + Type4ProcessorInformation.c > > [Packages] > ArmPkg/ArmPkg.dec > @@ -27,9 +28,11 @@ > Platform/ARM/SgiPkg/SgiPlatform.dec > > [LibraryClasses] > + ArmLib > ArmPlatformLib > DebugLib > HobLib > + PrintLib > UefiDriverEntryPoint > > [Guids] > @@ -37,6 +40,9 @@ > gArmSgiPlatformIdDescriptorGuid > > [FixedPcd] > + gArmPlatformTokenSpaceGuid.PcdClusterCount > + gArmPlatformTokenSpaceGuid.PcdCoreCount > + gArmSgiTokenSpaceGuid.PcdChipCount > gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision > > [Protocols] > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h > index 4a6f8be2a2c2..8a9be0cfc4c8 100644 > --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h > @@ -29,8 +29,20 @@ InstallSystemEnclosure ( > IN EFI_SMBIOS_PROTOCOL *Smbios > ); > > +EFI_STATUS > +EFIAPI > +InstallProcessorInformation ( > + IN EFI_SMBIOS_PROTOCOL *Smbios > + ); > + > enum SMBIOS_REFRENCE_HANDLES { > SMBIOS_HANDLE_ENCLOSURE = 0x1000, > + SMBIOS_HANDLE_CLUSTER1, > + SMBIOS_HANDLE_L1I_CACHE, > + SMBIOS_HANDLE_L1D_CACHE, > + SMBIOS_HANDLE_L2_CACHE, > + SMBIOS_HANDLE_L3_CACHE, > + SMBIOS_HANDLE_L4_CACHE, > }; > > #endif // SMBIOS_PLATFORM_DXE_H_ > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > index 5f4b833dc9fe..269bd0f9d843 100644 > --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c > @@ -29,6 +29,7 @@ ARM_RD_SMBIOS_TABLE_INSTALL_FPTR mSmbiosTableList[] = { > &InstallBiosInformation, > &InstallSystemInformation, > &InstallSystemEnclosure, > + &InstallProcessorInformation, > }; > > /** > diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c > new file mode 100644 > index 000000000000..fda532b558af > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c > @@ -0,0 +1,209 @@ > +/** @file > + SMBIOS Type 4 (Processor information) table for ARM RD platforms. > + > + This file installs SMBIOS Type 4 (Processor information) Table for Arm's > + Reference Design platforms. It includes information about manufacture, > + family, processor id, maximum operating frequency, and other information > + related to the processor. > + > + 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.5 > +**/ > + > +#include > +#include > +#include > +#include > +#include > + > +#include "SgiPlatform.h" > +#include "SmbiosPlatformDxe.h" > + > +#define NEOVERSE_E1_THREADS_PER_CORE 2 > + > +#define SOCKET_TYPE_BASE 3 > +#define SOCKET_TYPE_NUM 1 > +#define PROCESSOR_VERSION_BASE (SOCKET_TYPE_BASE + SOCKET_TYPE_NUM) > +#define PROCESSOR_VERSION_NUM 8 > +#define SERIAL_NUMBER_BASE (PROCESSOR_VERSION_BASE + PROCESSOR_VERSION_NUM) > +#define TYPE4_STRINGS \ > + "0x000\0" /* Part Number */ \ > + "ARM LTD\0" /* manufactuer */ \ > + "Other\0" /* socket type */ \ > + "Unknown\0" /* Processor Version */ \ > + "Cortex-A75\0" \ > + "Neoverse-N1\0" \ > + "Neoverse-N1\0" \ > + "Neoverse-E1\0" \ > + "Neoverse-V1\0" \ > + "Neoverse-V1\0" \ > + "Neoverse-N2\0" \ > + "000-0\0" /* Serial number */ \ > + "783-3\0" \ > + "786-1\0" \ > + "786-1\0" \ > + "786-2\0" \ > + "78A-1\0" \ > + "78A-2\0" \ > + "7B7-1\0" > + > +/* SMBIOS Type4 structure */ > +#pragma pack(1) > +struct ArmRdSmbiosType4 { > + SMBIOS_TABLE_TYPE4 Base; > + UINT8 Strings[sizeof (TYPE4_STRINGS)]; > +} ARM_TYPE4; > +#pragma pack() > + > +/* Processor information */ > +static struct ArmRdSmbiosType4 mArmRdSmbiosType4 = { > + { > + { > + // SMBIOS header > + EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION, // Type 4 > + sizeof (SMBIOS_TABLE_TYPE4), // Length > + SMBIOS_HANDLE_CLUSTER1, // handle number > + }, > + SOCKET_TYPE_BASE, // Socket type > + CentralProcessor, // Processor type > + ProcessorFamilyIndicatorFamily2, > + // Use Processor Family 2 field > + 2, // Manufacturer string number > + {{0}, {0}}, // Processor id, update dynamically > + PROCESSOR_VERSION_BASE, // Processor version, update dynamically > + {0, 0, 0, 0, 0, 1}, // Non legacy mode for processor voltage > + 0, // External clock frequency unknown > + 2600, // Max speed in MHz > + 2600, // Current speed in MHz > + ( // Status > + (1 << 6) | // CPU Socket Populated > + (1 << 0) // CPU Enabled > + ), > + ProcessorUpgradeOther, // Processor Upgrade > + SMBIOS_HANDLE_L1I_CACHE, // L1 Cache handle > + SMBIOS_HANDLE_L2_CACHE, // L2 Cache handle > + SMBIOS_HANDLE_L3_CACHE, // L3 Cache handle > + 0, // Processor serial number not set > + 0, // Processor asset tag not set > + 1, // Part number, update dynamically > + 0, // Core count, update dynamically > + 0, // Enabled core count, update dynamically > + 0, // Thread per socket count > + ( // Processor characteristics > + (1 << 2) | // 64-bit Capable > + (1 << 3) | // Multi-Core > + (1 << 5) | // Execute Protection > + (1 << 6) | // Enhanced Virtualization > + (1 << 7) // Power/Performance Control > + ), > + ProcessorFamilyARM // Processor Family 2 > + }, > + TYPE4_STRINGS > +}; > + > +/** > + Update the part-number string. > + > + Get the part number from ProcessorId and update TYPE4_STRINGS > + > + @param ProcessorId The processor Id read from MIDR register > +**/ > +STATIC > +VOID > +UpdatePartNumber ( > + IN UINT64 ProcessorId > + ) > +{ > + CHAR8 PartNumber[4] = {0}; > + UINT16 PartNum; > + > + PartNum = (UINT16)((ProcessorId >> 4) & 0xFFF); > + > + /* Convert 3 digit hexadecimal partnumber to ASCII and update TYPE4_STRINGS */ > + AsciiSPrint(PartNumber, sizeof (PartNumber), "%03x", PartNum); [SAMI] Space needed between AsciiSPrintand (. > + CopyMem (&mArmRdSmbiosType4.Strings[2], PartNumber, sizeof (PartNumber)); [SAMI] Is the index for the string correct? Should it be 0? Also can you check if the output works as expected? Can you send the smbiosview dump for this table, please? [/SAMI] > +} > + > +/** > + Install SMBIOS Processor information Table > + > + Install the SMBIOS Processor information (type 4) table for Arm's Reference > + Design platforms. > + > + @param[in] Smbios SMBIOS protocol. > + > + @retval EFI_SUCCESS Record was added. > + @retval EFI_NOT_FOUND Unknown product id. > + @retval EFI_OUT_OF_RESOURCES Record was not added. > + @retval EFI_ALREADY_STARTED The SmbiosHandle passed in is already in use. > +**/ > +EFI_STATUS > +InstallProcessorInformation ( > + IN EFI_SMBIOS_PROTOCOL *Smbios > + ) > +{ > + EFI_STATUS Status; > + EFI_SMBIOS_HANDLE SmbiosHandle; > + UINT32 CoreCount; > + UINT64 *ProcessorId = (UINT64 *)&(mArmRdSmbiosType4.Base.ProcessorId); > + > + SmbiosHandle = ((EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType4)->Handle; > + CoreCount = (FixedPcdGet32 (PcdCoreCount) * FixedPcdGet32 (PcdClusterCount)); > + > + /* Set the core count and processor speed for all platforms */ > + switch (SgiGetProductId ()) { > + case Sgi575: > + case RdN1Edge: > + case RdV1: > + mArmRdSmbiosType4.Base.CoreCount = CoreCount; > + mArmRdSmbiosType4.Base.EnabledCoreCount = CoreCount; > + mArmRdSmbiosType4.Base.ThreadCount = CoreCount; > + break; > + case RdN2: > + mArmRdSmbiosType4.Base.CoreCount = CoreCount; > + mArmRdSmbiosType4.Base.EnabledCoreCount = CoreCount; > + mArmRdSmbiosType4.Base.ThreadCount = CoreCount; > + mArmRdSmbiosType4.Base.MaxSpeed = 3200; // Frequency in MHz > + mArmRdSmbiosType4.Base.CurrentSpeed = 3200; // Frequency in MHz > + break; > + case RdN1EdgeX2: > + case RdV1Mc: > + mArmRdSmbiosType4.Base.CoreCount = CoreCount * FixedPcdGet32 (PcdChipCount); > + mArmRdSmbiosType4.Base.EnabledCoreCount = CoreCount * FixedPcdGet32 (PcdChipCount); > + mArmRdSmbiosType4.Base.ThreadCount = CoreCount * FixedPcdGet32 (PcdChipCount); > + break; > + case RdE1Edge: > + mArmRdSmbiosType4.Base.CoreCount = CoreCount / NEOVERSE_E1_THREADS_PER_CORE; > + mArmRdSmbiosType4.Base.EnabledCoreCount = CoreCount / NEOVERSE_E1_THREADS_PER_CORE; > + mArmRdSmbiosType4.Base.ThreadCount = CoreCount; > + mArmRdSmbiosType4.Base.MaxSpeed = 2300; // Frequency in MHz > + mArmRdSmbiosType4.Base.CurrentSpeed = 2300; // Frequency in MHz > + break; > + } > + > + mArmRdSmbiosType4.Base.ProcessorVersion = PROCESSOR_VERSION_BASE + SgiGetProductId (); > + mArmRdSmbiosType4.Base.SerialNumber = SERIAL_NUMBER_BASE + SgiGetProductId (); [SAMI] Minor optimisation can be achieved by storing the value returned by SgiGetProductId ()in a local variable. > + > + /* Update processor-id and part number */ > + *ProcessorId = ArmReadMidr(); [SAMI] Space needed between ArmReadMidr and (. > + UpdatePartNumber (*ProcessorId); > + > + /* Install type 4 table */ > + Status = Smbios->Add ( > + Smbios, > + NULL, > + &SmbiosHandle, > + (EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType4 > + ); > + if (Status != EFI_SUCCESS) { > + DEBUG (( > + DEBUG_ERROR, > + "SMBIOS: Failed to install Type4 SMBIOS table.\n" > + )); > + } > + > + return Status; > +}