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 772A478003C for ; Tue, 6 Feb 2024 15:24:58 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cg9kR33EaJgVVyJsZNojuQTo40nQpRHJhwHvXJW85AU=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1707233097; v=1; b=Jc4otiVQDTX1k9UzyJx404CR3ETFE8XQ54jI5Tt0NNS8TnbE6Zw9rdDr4EmGHNnZXMDAguIg fIL+pehiLuBD33vX+0th8Pf8ZkBYkvyjq5Hf1kJO8YUASIbjWZaANoQXihSE9y8fxYQN73jLUqm nvMbpSizKE0PhLs2CiGBYp1U= X-Received: by 127.0.0.2 with SMTP id LHINYY7687511xyXLdedVzK4; Tue, 06 Feb 2024 07:24:57 -0800 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.85]) by mx.groups.io with SMTP id smtpd.web10.24119.1707233096477799556 for ; Tue, 06 Feb 2024 07:24:56 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EmzcquJGYYarQ8LOhOc6VMd4hvzQQoLf/7Cmda4UHXcFZ4UiFbmzQmFEJ3rVzdJtLsOQSsbXa2ZAm8RM5WKMgH1iaC/D89jQXFtOFL+LBImkWowPZx10uafdyhBHsBOnR5A0dWn2ulpy2rxPHBxrhj3Chu/Ncnj09qRJdupZJ9SCZKnZj2CypfpqpBKS646V/I4DBaOBeqcvxRc3or9WENUQs60LMZViHBjZ3ExP6YkwS7J5ko7pZ+91G2o/gx5itu8nVmzzkcWZSQFX29pqBEb5y11mF6fzebOeV38Silv17mkeNj7hdIm1KpUSd3ltPk3QvuTG2hBt6lWIMdz+rw== 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=VU2/I9xKaS8mlZVgg7B0t6MdRMq6ftR3DNMQOSrgb7Y=; b=R9s+l09e9JE5XsJtS1VpHPXhwIOlp7zB+txIhKO4cCArkyHnBi2exqBBvHNziKiBRV+kfnbUJ1tw2WCEfv21SHU+96BUr2aUoIPImdfJispC9WrZ4GHneCX3XdriQaXf/07h3EETMxnQs8yQZ+KXimtZEvWJL1pveJPS2Jo/YC8wuTT8XIo8be7IrXopfW4mj8PgWaoEr/8wXybWn0+MDMg/UHRZXYrPzh7MYKusUIWPkbLM5YQKQ+eJbMMyd9qT1mASmzqUKwtaNNViBI5l4qT9DwKQsIl2HQNUkOfmg1EsFd2IDvH8E47HUzAV8btrnllKK3nvpbDVJyHf1wRmRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from MW4PR03CA0259.namprd03.prod.outlook.com (2603:10b6:303:b4::24) by CYYPR12MB8853.namprd12.prod.outlook.com (2603:10b6:930:cb::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Tue, 6 Feb 2024 15:24:52 +0000 X-Received: from MWH0EPF000989E7.namprd02.prod.outlook.com (2603:10b6:303:b4:cafe::a2) by MW4PR03CA0259.outlook.office365.com (2603:10b6:303:b4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend Transport; Tue, 6 Feb 2024 15:24:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000989E7.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Tue, 6 Feb 2024 15:24:52 +0000 X-Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 6 Feb 2024 07:24:35 -0800 X-Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 6 Feb 2024 07:24:35 -0800 X-Received: from 80d647148241.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Tue, 6 Feb 2024 07:24:34 -0800 From: "Jeff Brasen via groups.io" To: CC: , , , Jeff Brasen Subject: [edk2-devel] [PATCH v2] ArmPkg/ProcessorSubClassDxe: Limit counts to 0xFF Date: Tue, 6 Feb 2024 07:24:32 -0800 Message-ID: <4268474daea2f8a4b7756c8182ea305278675478.1707233024.git.jbrasen@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E7:EE_|CYYPR12MB8853:EE_ X-MS-Office365-Filtering-Correlation-Id: 912a4913-4160-48d5-d134-08dc2727c3eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 8UZOZk7jiBOnAMJWmSRKGu/68uSOo+b/gjGnHL0spF5YVX3j9js8Go4DtBNdq/FFhWnB3XzJZFkCXRo41lTzS+kNK1mcjBNgzSCJECQvmbjklaDjk/sNjCeWYhaiIR1xGNwYkDknXuDwMLsTJQwZFtlxaxVxsboHDcJ7mzc8n3BJcjuEwYs+8qeJB5NvgrlvFeYWn2gyrZua8F6ajtYXsdcofENBZ384kTDH5jBb0eqD0M083YEKA370lHkPhQ8UBpmgTF/FDbX0PiRhc353XERkIndg9GfQbnbGp82tMFDQPdC/+mh9Otw10TUXK3/Y17Tg+K9MrqTMMJgpPicgumqa7rzjUPJBae7ODPUyy9z8DYUKA6jmdlbLTJ2eV6YaR3uax9QbX59kHob4dw3BMNgHxRCR9fh3FgzJrcJjSQAbY4tVXqQj1BI0QXKTRuPN2U0LbYdm+O/ATSlcIc3o3yZTETt7qXGVS/+fxweJk+SBOaMEuL81YPgE1lxmB2C5iwwJnDI9XhVwKM+u0SRIjGo5IwKoJKgM0+PoJnQgZY2uMW/wWsQHZCstOJGS1cYcBrQqURQla/DQ4EoaWSAAfcbtedqQcSpeoBcNhNkwvmKifJwNj0ZsV9jBYwU5fKA4yLAK3FipRo/Zhqhj/erISMCIgaf/i7/6hxdQjslww20Kip87E/lA7u5vK0cF7JbQhCZfr+Jj35UPZ02COLT542AZHZjxw04h/QNMvXiSlHI3S6ZWcO4VllnZm8/l5fOH X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 15:24:52.3205 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 912a4913-4160-48d5-d134-08dc2727c3eb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989E7.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8853 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,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: JeWZGwfUJTfPCrBpWyL8nYmkx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Jc4otiVQ; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=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 The CoreCount, EnabledCore and ThreadCount counts should be set to 0xFF if value is greater than 255 per the SMBIOS specification. Signed-off-by: Jeff Brasen --- .../ProcessorSubClassDxe/ProcessorSubClass.c | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass= .c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 9050588500..abb4c726de 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -702,19 +702,37 @@ AddSmbiosProcessorTypeTable ( =20 LegacyVoltage =3D (UINT8 *)&Type4Record->Voltage; =20 - *LegacyVoltage =3D MiscProcessorData.Voltage; - Type4Record->CurrentSpeed =3D MiscProcessorData.CurrentSpeed; - Type4Record->MaxSpeed =3D MiscProcessorData.MaxSpeed; - Type4Record->Status =3D ProcessorStatus.Data; - Type4Record->L1CacheHandle =3D L1CacheHandle; - Type4Record->L2CacheHandle =3D L2CacheHandle; - Type4Record->L3CacheHandle =3D L3CacheHandle; - Type4Record->CoreCount =3D MiscProcessorData.CoreCount; - Type4Record->CoreCount2 =3D MiscProcessorData.CoreCount; - Type4Record->EnabledCoreCount =3D MiscProcessorData.CoresEnabled; + *LegacyVoltage =3D MiscProcessorData.Voltage; + Type4Record->CurrentSpeed =3D MiscProcessorData.CurrentSpeed; + Type4Record->MaxSpeed =3D MiscProcessorData.MaxSpeed; + Type4Record->Status =3D ProcessorStatus.Data; + Type4Record->L1CacheHandle =3D L1CacheHandle; + Type4Record->L2CacheHandle =3D L2CacheHandle; + Type4Record->L3CacheHandle =3D L3CacheHandle; + + if (MiscProcessorData.CoreCount > 255) { + Type4Record->CoreCount =3D 0xFF; + } else { + Type4Record->CoreCount =3D MiscProcessorData.CoreCount; + } + + Type4Record->CoreCount2 =3D MiscProcessorData.CoreCount; + + if (MiscProcessorData.CoresEnabled > 255) { + Type4Record->EnabledCoreCount =3D 0xFF; + } else { + Type4Record->EnabledCoreCount =3D MiscProcessorData.CoresEnabled; + } + Type4Record->EnabledCoreCount2 =3D MiscProcessorData.CoresEnabled; - Type4Record->ThreadCount =3D MiscProcessorData.ThreadCount; - Type4Record->ThreadCount2 =3D MiscProcessorData.ThreadCount; + + if (MiscProcessorData.ThreadCount > 255) { + Type4Record->ThreadCount =3D 0xFF; + } else { + Type4Record->ThreadCount =3D MiscProcessorData.ThreadCount; + } + + Type4Record->ThreadCount2 =3D MiscProcessorData.ThreadCount; =20 Type4Record->CurrentSpeed =3D GetCpuFrequency (ProcessorIndex); Type4Record->ExternalClock =3D --=20 2.34.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 (#115174): https://edk2.groups.io/g/devel/message/115174 Mute This Topic: https://groups.io/mt/104199497/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-