From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.42]) by mx.groups.io with SMTP id smtpd.web10.700.1610744974371670405 for ; Fri, 15 Jan 2021 13:09:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Ss8kVH6y; spf=pass (domain: arm.com, ip: 40.107.20.42, mailfrom: samer.el-haj-mahmoud@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=ufB8zbWNd0b5rwaJh8rWgF6C42K+iVc0ZBJKtiPYS2I=; b=Ss8kVH6ytJScRiqvlMo7iQQH/aYtQmYtuUkXGHgy7fTk47N4t7cagdpdMD7SExXjfWY/4QkQkiGoC+k084bAFGUgxxpRnHXTv5wx0VXDPWqYJV0gm2A6lIurVGox1mjq7AHQj5WVdzX02K6iGblnrU6+Fl1qo3tgsqqsg1MTT2Q= Received: from AM6PR02CA0019.eurprd02.prod.outlook.com (2603:10a6:20b:6e::32) by AM6PR08MB4549.eurprd08.prod.outlook.com (2603:10a6:20b:b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Fri, 15 Jan 2021 21:09:32 +0000 Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:6e:cafe::40) by AM6PR02CA0019.outlook.office365.com (2603:10a6:20b:6e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10 via Frontend Transport; Fri, 15 Jan 2021 21:09:32 +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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.12 via Frontend Transport; Fri, 15 Jan 2021 21:09:31 +0000 Received: ("Tessian outbound 28c96a6c9d2e:v71"); Fri, 15 Jan 2021 21:09:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a6cc114638916c06 X-CR-MTA-TID: 64aa7808 Received: from aa6fd206c65a.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2E75DE4A-C0AC-4A83-A85C-063A789B2CE0.1; Fri, 15 Jan 2021 21:09:20 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id aa6fd206c65a.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 15 Jan 2021 21:09:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NsC9p+bM2gzbiRdvp7XP0EQtVp77p8StcIIxMnBfcNeOCPf3MLX8gMFHcWSPaKjNZn5vD4/yT64rGIsNFOjezWFQa04xiN2swMuV4Ij4LHtXElq176T/uvRduWiVW+KuSST3FaXtIfHPAmzDZrM76BfwtS73Ct+t5Zh6ZQIOsr6JKkhmh6oRrdD1f7WeaOwCbFxDPSHfMLnZaguL1brMXrpYxgtCWB9ZLr1qQrTGoapwO1PZj9Ol9aTuISqgLab3p5cz0pKEKm6RIko58+s+Ui4sPO0CoUur0m/gaQ3496Dqd2s1iYIgTRP/qv2gOVCRJmCDpOVHsUzni79gNNjrzw== 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=ufB8zbWNd0b5rwaJh8rWgF6C42K+iVc0ZBJKtiPYS2I=; b=RVAXhh5r+xMcI8xLHuEhe28fmhRsgB+2uNpdm3q+6W2dLiO/1E6Z3frUYOCwJSRVmyM8XbGsgFP1Pr0WFGA0TJiK4FR/FHFVxmqC+RibbNHmSHpE76SuaNWkgJnhHd8LM3zY2GlPF33azX0JERlTzFIb0Cyvkfz5Od/EKnJYEvmEwTmp5HQyv2z1MYrl10Bopgya1ZqypA9glBHH9BXQymfAvGPRlyytRO8rev0dVbuvFExnnbMaCHSLJLz1pbOTlQy7x6Waqgg/BkZd1I54mBBc0VqMIbnUgvwWvldePyhd9pDD7nXmgIEHp4Q3fx+s91S2IGs2wcMP64Wmehiceg== 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=ufB8zbWNd0b5rwaJh8rWgF6C42K+iVc0ZBJKtiPYS2I=; b=Ss8kVH6ytJScRiqvlMo7iQQH/aYtQmYtuUkXGHgy7fTk47N4t7cagdpdMD7SExXjfWY/4QkQkiGoC+k084bAFGUgxxpRnHXTv5wx0VXDPWqYJV0gm2A6lIurVGox1mjq7AHQj5WVdzX02K6iGblnrU6+Fl1qo3tgsqqsg1MTT2Q= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB7PR08MB3259.eurprd08.prod.outlook.com (2603:10a6:5:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Fri, 15 Jan 2021 21:09:17 +0000 Received: from DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::a1f1:ccfd:b17f:a490]) by DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::a1f1:ccfd:b17f:a490%5]) with mapi id 15.20.3763.011; Fri, 15 Jan 2021 21:09:17 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , "rebecca@nuviainc.com" CC: Leif Lindholm , Ard Biesheuvel , nd , Sami Mujawar , Liming Gao , Michael D Kinney , Zhiguang Liu , Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [PATCH v6 15/22] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type00 Thread-Topic: [edk2-devel] [PATCH v6 15/22] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type00 Thread-Index: AQHW6pS9ZlvYrT3c506JlVfdfSyvY6opLZlQ Date: Fri, 15 Jan 2021 21:09:17 +0000 Message-ID: References: <20210114163628.31952-1-rebecca@nuviainc.com> <20210114163628.31952-16-rebecca@nuviainc.com> In-Reply-To: <20210114163628.31952-16-rebecca@nuviainc.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; x-originating-ip: [99.132.126.10] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ccb86b8a-f21b-4f3a-a12f-08d8b999da51 x-ms-traffictypediagnostic: DB7PR08MB3259:|AM6PR08MB4549: 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: FIjkZilmYAe3qmkplGtBJ417ho/7MevBpWpR2aoNyiCdsR+HGl7CizHfWVPoAHp8AcX+Ja5Rdjtcpu1lwsb27HNTA8Ujv5Qad23SV1uMxHKaEKrX3sSt0hSydJQLeeq7CchCqksRj0EaztyJN57djHg2ICgYMwnkOvVX9vTn+jftNPb590iqQOG+l+dKP5Ir4togdYe2cuvdbCfeN9fIvSvy/P4vlWr2mEegGQOjcwsxbH44zJY1zD2FhKHaE7Isc4z2Jy4skjeM7EqXNl6rHUCQ+vIGv0alYzmA/Sd50Q936yqMpaij1TvS0XL1Iy5Mm4ejGtSA2fhNGqJ7uxYqJ5EJOjD+QZAFhW6O7BiSpvarq7/FN58RJP6fAeKHpYGPaPx0Gyg7mxtul+fIYRuAmzONIc1ekWd6TZe6Hhnu3GnRkU+ufb4m0ysIT9OLDs1mgwOgpOgocwaPf3yMiqhjDq21v81ZS2iIv06wwQeVqdZR3nAdHe9RI05kubnzHSEsWNnX21RXTdoHL9QQXY2qDg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3260.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(346002)(136003)(39860400002)(366004)(376002)(966005)(8936002)(4326008)(86362001)(71200400001)(55016002)(66556008)(478600001)(52536014)(7696005)(19627235002)(8676002)(5660300002)(2906002)(33656002)(54906003)(26005)(6506007)(186003)(64756008)(110136005)(66476007)(9686003)(66446008)(316002)(76116006)(66946007)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?M+zxg4qfbnlX1Zj9kKbr3C0CSHTl7E4w+Q7tIG+efDK/PBWiD3czmgk41hoK?= =?us-ascii?Q?282JGQtNn4xKQvmN4wJfSpYyc8l/zc5t/rfiITKuXL9iHmut25hM08AGHtml?= =?us-ascii?Q?q4KBHeG53LxI5+7g3mofMDfpHRNBZRf1wkhhQtQPrYEVjyWbWFGv2sUk2pC3?= =?us-ascii?Q?8P9pJQIQVK0iKDfwiBDiKz8I3Rm1f7kpUntH0+gby4qioWsomDYFXvH9EOBg?= =?us-ascii?Q?yhJWY2pKErHxyhO4/zo6oQrXwYsIt4TIOFwhc5pE8NO/JyPFx+KtZxEVs7Vy?= =?us-ascii?Q?X0TC1f3boYgHsXnTZ+SQeFQZ02/zvQ6EgrEqBx4S8iQTOzIldg1dgdE2gpwL?= =?us-ascii?Q?VoFMZbD1/nMvDtpu2rGfsGextBBkeVh30gManp2E80vwEBHc3+wwtSGnD2SY?= =?us-ascii?Q?QBGAae64gZw5EsxXQn3aB0UzWSCqgfrcBgBP7x5UMAm5Jl0n1yf7PGYMR1C+?= =?us-ascii?Q?R8th/ZuEnkk/x6doQIdNxZ4D0PrAk/lCng6q9gizsm09Z63y7KB/0yR8tirZ?= =?us-ascii?Q?LNVx7e0AF0dKcZ0dWKNINb8/lX/AyTGa4f/XESvctamerGzAvVAWse85um+K?= =?us-ascii?Q?2iXmPuJegsQuF9GOBPhdlIWvOaIR4im6fEbkL70MmRW/xtfTY/mYLm3cDrnL?= =?us-ascii?Q?cWRzzHNxpDnCAi9+87WaZBwXWhQ8UNoBe8L6H6nUm5QidesszmCRjabP7Mey?= =?us-ascii?Q?wP3stpGgTP2xQvFwHJmKCsTQAzdnksc/HwU8EPX8ZkBN3lMTEdOW9OfTO8Lh?= =?us-ascii?Q?o4poxkmjuBNNWJFS2YPzHrEYhgL6URYrFihNogDw5XfaufFfz95wWg7b2E9T?= =?us-ascii?Q?fR+g9VWrNFVp9zvluTlFX4hay49Pl5KCoLydb3opWFejNmyu4cTe6zBde/Q9?= =?us-ascii?Q?1snyB0glMeen1XyQ8GRWUQaooZkox5D/+MgYOE3a61rQLUk2tbdWzpwp0X8W?= =?us-ascii?Q?xg5MmXwW4evZpaVRV8oTNJV5nrPFu08v4OyekKivnDc=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3259 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; Return-Path: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 64a4fdfe-9f40-4615-415c-08d8b999d1e4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: urTz71vUwiAcZnLyfzJOI9cbXe3FH1NUG7Qv/5oIo64mm4DcWYABGUfpSkrCoCwOjCo1jLgixJyv1OARVjVVhB/OqD8APOWzXSEi//sj3f+dfAprm0nPs3hxNGSIfzUkCC6qbuhLvJJJC8cpH8BTkfq6HkCDbz1D+JMgo1SRzImXSFU0w7QKUtaX7M1xRxB56O1WsmL8lCZONolH4E6gWDCLlzyRh5G1BydaEjrg4adboe5Ty9tgtHuSP3K847n8WFWiQuPd6eks6c2y+uUH/LakIrevx+MtzxT4jT4/NOp5NrM2qBQ/G0cCsSeFzndY2n3ZH6tUyAlk1EE4MNUBv6+yemjzQceVNmKxdgE++Mw6kLMCXcXK+8bE7b8ezHjH5uyNGhlvu0E+IGTrp3d8UQWpXSsX54y6LmfIT0iTwBFZju/4HA9CbLw/ByaOVAWbeT/PtHpfFgDYaSQopv42uLkrsPF8DdyKShAi+YW/mwjzyHbKjAlSJz6RE19sQT64BLJC/Gt5a6MCLqBYqAs737r9gi1Z2pVI6GirekbZAAfoevsQWW7qITDSfxn9W5f+beJyaD6z6QXBQbcecEvraF8X+bn8GUkVHQO3jr8UxU4= 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)(376002)(136003)(39860400002)(396003)(46966006)(186003)(9686003)(4326008)(86362001)(52536014)(54906003)(110136005)(55016002)(47076005)(19627235002)(81166007)(356005)(336012)(966005)(82740400003)(70586007)(6506007)(82310400003)(26005)(2906002)(34020700004)(33656002)(70206006)(7696005)(5660300002)(8936002)(316002)(478600001)(8676002)(44824005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2021 21:09:31.6263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ccb86b8a-f21b-4f3a-a12f-08d8b999da51 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: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4549 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable With a minor feedback below: Reviewed-by: Samer El-Haj-Mahmoud + } > + > + (VOID)CopyMem (SmbiosRecord, InputData, sizeof (SMBIOS_TABLE_TYPE0)); > + > + SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE0); > + SmbiosRecord->BiosSegment =3D (UINT16)(FixedPcdGet32 (PcdFdBaseAddress) > + / SIZE_64KB); if (BiosPhysicalSize < SIZE_16MB) { > + SmbiosRecord->BiosSize =3D Base2ToByteWith64KUnit (BiosPhysicalSize)= - 1; > + SmbiosRecord->ExtendedBiosSize.Size =3D BiosPhysicalSize / SIZE_1MB; > + SmbiosRecord->ExtendedBiosSize.Unit =3D 0; // Size is in MB } else = { > + SmbiosRecord->BiosSize =3D 0xFF; > + if (BiosPhysicalSize > 0x3FFF) { > + SmbiosRecord->ExtendedBiosSize.Size =3D BiosPhysicalSize / SIZE_1G= B; > + SmbiosRecord->ExtendedBiosSize.Unit =3D 1; // Size is in GB > + } > + } > + > + SmbiosRecord->SystemBiosMajorRelease =3D (UINT8) (PcdGet16 > + (PcdSystemBiosRelease) >> 8); SmbiosRecord->SystemBiosMinorRelease =3D > + (UINT8) (PcdGet16 (PcdSystemBiosRelease) & 0xFF); > + > + SmbiosRecord->EmbeddedControllerFirmwareMajorRelease =3D (UINT16) > + (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) >> 8); > + SmbiosRecord->EmbeddedControllerFirmwareMinorRelease =3D (UINT16) > + (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) & 0xFF); > + Not really an issue, but a function in OemMiscLib is possibly a better opti= on than using PCDs for these. Platforms may have an easy way to build the M= ajor.Minor FW values (such as by parsing PcdFirmwareVersionString and split= ting into major and minor values). See for example for RPi4 at: https://git= hub.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/Drivers/P= latformSmbiosDxe/PlatformSmbiosDxe.c#L754 Using PCDs will still work, but the platform will need to put this code in = some other module/library just to initialize the dynamic PCD.