From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web09.10744.1633521438039784428 for ; Wed, 06 Oct 2021 04:57:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=gbz5a4Uj; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0913d10296=daniel.schaefer@hpe.com) Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 196B9iAn012519; Wed, 6 Oct 2021 11:57:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=pps0720; bh=G6NxDS2tde6gGK1n+nULup8RI0sXyPRZE+95vTDgXa0=; b=gbz5a4Uj86tTsE3I+eVOZ0aVLp/HVF13Cyt0xOgG1Si/6aqcS3l+FXZ40q2i4wgRQjQt /N/gc4nsTwpKSVAqRoUidB/E5hXSo4ZalRECPWuo69LGjS4e8UaEtO0mPlrjF4lIhHM3 ejwN8STJO2oEsp/C1mIZpZf88N2VtGok0QqWTKvJc2fjeIAtRmDK6wi1iHQrpBE8Orxa v4re6UpYhvsk9P6l60wHSk+WwRNUoVnpX8r8pPshd5nG3+TrJw/NLKyYw8uLShg+FKla rqmu7F51vaidjJxioN9sLLMRsC0T6U5ELEL5EJGVIpnUG5Kt3w7Z0HeBdVfhMa2wy8hF gA== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0a-002e3701.pphosted.com with ESMTP id 3bh5d8b8h2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Oct 2021 11:57:17 +0000 Received: from G9W8454.americas.hpqcorp.net (g9w8454.houston.hp.com [16.216.161.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2353.austin.hpe.com (Postfix) with ESMTPS id 50E7482; Wed, 6 Oct 2021 11:57:16 +0000 (UTC) Received: from G1W8107.americas.hpqcorp.net (2002:10c1:483b::10c1:483b) by G9W8454.americas.hpqcorp.net (2002:10d8:a104::10d8:a104) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 6 Oct 2021 11:57:16 +0000 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (15.241.52.12) by G1W8107.americas.hpqcorp.net (16.193.72.59) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Wed, 6 Oct 2021 11:57:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lX7p8kPMIje2oowTedWry4Z6NzuDJi+HdGUywbqOO8EQZRaFZ1vI+Skt5C9HoNGayM3Ke+Z9S9GpqdUDZAzzwh0b6EqJmzkfPF6DhfUfGISIuY8jPcc8GY56tsoAXbRu/VvklkEMACYnw8VE03XGkLA97T/2zoUE51fZz053rWNMhWa1eA6+d5tn8jQEqqeICgfbs58/m5vvVvHSdBc3oCqvCvKgc9nkCpKEtCLDKoBhOGoaqNeREIwh0paz9zGIGWWy+q9pS53LkI3YeF9+spKZMJiTveGiLHqkBVgsitFfZRV7eTk7JvQXo57Q+zX57QRjBz8CiwRoiACvCga28g== 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=G6NxDS2tde6gGK1n+nULup8RI0sXyPRZE+95vTDgXa0=; b=UVmI5PglTdXk30hs+0iOioLvoeWwoMuBa/cOkv73D9EYMrOx6BEzleWyPGhOQR8dXdQSXeUVBINK9Pdg2/avh0aYa2vl5T6GZWR30n2cDPccOr/+eNLIyAE3rQQS95wIORQafcyYineIIUxTjiYphZp9cgcht5/mArIqMCXT4ujw/UwSGuU0qnzlHGmxeZ4Im7SN3qjhs8hobhuCOwVIf4kt3+deNGHNt6Kt5fN1KalgdHQwvmzg2ymAQoJuZvzJRp+WtlB8JY+nF+gkv/UVmosP3RIHbsFdZRLDE4Ij5rTJqEd4K8P+HxuMNtqRY+KCFWMUJgkDGLlViz47J0XoVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) by DF4PR8401MB0331.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7606::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Wed, 6 Oct 2021 11:57:14 +0000 Received: from DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM ([fe80::597f:4786:f1d6:8469]) by DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM ([fe80::597f:4786:f1d6:8469%3]) with mapi id 15.20.4566.023; Wed, 6 Oct 2021 11:57:14 +0000 From: "Daniel Schaefer" To: CC: Abner Chang , Sunil V L Subject: [edk2-platforms][PATCH v2 02/14] RISC-V: Split SMBIOS out of PlatformPei Date: Wed, 6 Oct 2021 19:56:40 +0800 Message-ID: <20211006115652.3635489-3-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006115652.3635489-1-daniel.schaefer@hpe.com> References: <20211006115652.3635489-1-daniel.schaefer@hpe.com> X-ClientProxiedBy: HK2PR0401CA0022.apcprd04.prod.outlook.com (2603:1096:202:2::32) To DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) MIME-Version: 1.0 Received: from localhost.localdomain (123.193.59.220) by HK2PR0401CA0022.apcprd04.prod.outlook.com (2603:1096:202:2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17 via Frontend Transport; Wed, 6 Oct 2021 11:57:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e443e833-8426-4a98-f727-08d988c0701a X-MS-TrafficTypeDiagnostic: DF4PR8401MB0331: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uit8W1AS5SRDEMuXzJWnWU55/E8ZOWNFZXxZE+ljp00yJNbITsdwEpOrvt0F6vSeHoONOm9aaCsnVSeQuu8qNYb9v60lLy0o5ojMWnwrTK7eSRNXdCCRZNPlL7aeyG+V6PBlW5V25M+tBUokOXTQL7HGSTDzyM9PJCuSvV/JwHCOp+1JElIoVmDciQaX8rnXLwH18QC+reWJ7yuGv6/W4OUBRNlGU0azBRs13eJmIgi5O4F6paAb3eoVi/3UVHjMIqPAT3O9D2Mef6xraiThbwFbmVbfM/O8bJgqa+f4+7SmrIUUzFWB+p7WAt/OJL9BD8kzmt0yNfGk6HJAJ2f0qPtR7+Hp9RMocz5Mo74ujpm5eY7TSvBfI0QcSVfdGzD6kPxrcANIKHgtm0qXo7P5K/jaFkzpr/coLXxXrAokX2+ttauE5qi5DJ6YRuMDXb6zkPbaF7XPIDcX4MQ66scjNg7XcXTx1rmXXlbQyE6ghcOzxnrfOskaL8jcH9+IbHKYMDj7KbdMvYjkSjy/T/ijCpEkBViyAigyXqqnnOP64FkuN0j92oF/f/9R+H/yUci5NmOxcLiVLSqBOXTIu6juUeEAUzv3cIYKvPcLrNX4jGaMvY4Cn9qhZrWsob/xwj2OM5W/3aI931oAQLs9UNoYL4EawKVboIvnUv7WwITQH5qEG6p+oBDRp5L2QNRKSFkpCqDyJG4YOTVH+64WOxMvYw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(2616005)(1076003)(8676002)(83380400001)(8936002)(38100700002)(44832011)(38350700002)(6916009)(2906002)(36756003)(5660300002)(508600001)(956004)(86362001)(316002)(54906003)(186003)(66556008)(6486002)(66476007)(52116002)(6506007)(26005)(66946007)(6512007)(4326008)(19627235002)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ky0K8+vqud9dBalERENgLiEPAECeYH3Q84V7rZnxVUthTAfjet+gXA9anhz2?= =?us-ascii?Q?IVkRetphmGnGIBNPTicV99UJEEwLRZTYHlG+G0SYNlTpWZckHN1fSwg279Go?= =?us-ascii?Q?GnPT4+6/KeUPHAtVJM+zygUM7RKMsghZYn4nJwzDfwPd23Ss5RpN4TAZHeuQ?= =?us-ascii?Q?2rZBDdmcETatuF/G3SA+g2eYzgvBy1IpFAFD+z76R71Av47bIy92OTinemlQ?= =?us-ascii?Q?zlphC65aMdQwBsFO6JmTV5oyQ9HNduMGAZbtwSEb2f+GsFSKf+ptw2iNs0df?= =?us-ascii?Q?tayR14FazVqpnjmxi3MmOA8AEQILhxFF1nEPk2SC+KeZUdYP61eVfG5Obg0h?= =?us-ascii?Q?1Ys5pVa6AGS41UIoHjTO2+RnRdYmCx1ug2BVRTW6xkVXIvam1XLDixXGB4Tp?= =?us-ascii?Q?SC2qURYpv3z+cTof1FQjPF/f8Ngsw9gW3I/1FeRt95NZqa4hfat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Su2YtME0?= X-MS-Exchange-CrossTenant-Network-Message-Id: e443e833-8426-4a98-f727-08d988c0701a X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2021 11:57:14.7458 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: U/Ro2k1dOFU6ZkYCP7aLAiBfVjleRg4KLXitghCtu9Nbx8pPQdCIZNrQMBekHNeXt5I0FLoh0z68jKf6F83U+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0331 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: 4dJrgNaB53wKDuikpmobwq5XavYOqtui X-Proofpoint-ORIG-GUID: 4dJrgNaB53wKDuikpmobwq5XavYOqtui X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-06_02,2021-10-06_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110060075 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Cc: Abner Chang Cc: Sunil V L Signed-off-by: Daniel Schaefer --- Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/Platform.c | 17 += --------- Platform/SiFive/U5SeriesPkg/Include/SiFiveU5MCCoreplex.h | 33 += +++---------------- Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c | 32 += +++++++++++++++++- 3 files changed, 38 insertions(+), 44 deletions(-) diff --git a/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/Platform= .c b/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/Platform.c index 24192c692b..8586a94b62 100644 --- a/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/Platform.c +++ b/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/Platform.c @@ -254,22 +254,7 @@ BuildCoreInformationHob ( VOID=0D )=0D {=0D - EFI_STATUS Status;=0D - RISC_V_PROCESSOR_SMBIOS_HOB_DATA *SmbiosHobPtr;=0D -=0D - // TODO: Create SMBIOS libs for non-U540 platforms=0D - Status =3D CreateU5MCCoreplexProcessorSpecificDataHob (0);=0D - if (EFI_ERROR (Status)) {=0D - ASSERT(FALSE);=0D - }=0D - Status =3D CreateU5MCProcessorSmbiosDataHob (0, &SmbiosHobPtr);=0D - if (EFI_ERROR (Status)) {=0D - ASSERT(FALSE);=0D - }=0D -=0D - DEBUG ((DEBUG_INFO, "U5 MC Coreplex SMBIOS DATA HOB at address 0x%x\n", = SmbiosHobPtr));=0D -=0D - return EFI_SUCCESS;=0D + return BuildRiscVSmbiosHobs ();=0D }=0D =0D /**=0D diff --git a/Platform/SiFive/U5SeriesPkg/Include/SiFiveU5MCCoreplex.h b/Pla= tform/SiFive/U5SeriesPkg/Include/SiFiveU5MCCoreplex.h index 5d70e26f83..363b34a8f1 100644 --- a/Platform/SiFive/U5SeriesPkg/Include/SiFiveU5MCCoreplex.h +++ b/Platform/SiFive/U5SeriesPkg/Include/SiFiveU5MCCoreplex.h @@ -1,7 +1,7 @@ /** @file=0D SiFive U54 Coreplex library definitions.=0D =0D - Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D + Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -17,35 +17,14 @@ #define SIFIVE_U5MC_COREPLEX_MC_HART_ID 0=0D =0D /**=0D - Build up U5MC coreplex processor core-specific information.=0D + Build processor and platform information for the U5 platform=0D =0D - @param UniqueId U5MC unique ID.=0D -=0D - @return EFI_STATUS=0D + @return EFI_SUCCESS Status.=0D =0D **/=0D EFI_STATUS=0D -EFIAPI=0D -CreateU5MCCoreplexProcessorSpecificDataHob (=0D - IN UINTN UniqueId=0D - );=0D -=0D -/**=0D - Function to build processor related SMBIOS information. RISC-V SMBIOS DX= E driver collect=0D - this information and build SMBIOS Type4 and Type7 record.=0D -=0D - @param ProcessorUid Unique ID of pysical processor which owns th= is core.=0D - @param SmbiosDataHobPtr Pointer to receive RISC_V_PROCESSOR_SMBIOS_D= ATA_HOB. The pointers=0D - maintained in this structure is only valid b= efore memory is discovered.=0D - Access to those pointers after memory is ins= talled will cause unexpected issues.=0D +BuildRiscVSmbiosHobs (=0D + VOID=0D +);=0D =0D - @return EFI_SUCCESS The PEIM initialized successfully.=0D -=0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -CreateU5MCProcessorSmbiosDataHob (=0D - IN UINTN ProcessorUid,=0D - OUT RISC_V_PROCESSOR_SMBIOS_HOB_DATA **SmbiosDataHobPtr=0D - );=0D #endif=0D diff --git a/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfo= Hob.c b/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c index b2f74c2a74..bc1b252946 100644 --- a/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c +++ b/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c @@ -1,7 +1,7 @@ /**@file=0D Build up platform processor information.=0D =0D - Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D + Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -32,6 +32,7 @@ @return EFI_SUCCESS The PEIM initialized successfully.=0D =0D **/=0D +STATIC=0D EFI_STATUS=0D EFIAPI=0D CreateU5MCCoreplexProcessorSpecificDataHob (=0D @@ -96,6 +97,7 @@ CreateU5MCCoreplexProcessorSpecificDataHob ( @return EFI_SUCCESS The SMBIOS Hobs were created successfully.=0D =0D **/=0D +STATIC=0D EFI_STATUS=0D EFIAPI=0D CreateU5MCProcessorSmbiosDataHob (=0D @@ -163,3 +165,31 @@ CreateU5MCProcessorSmbiosDataHob ( =0D return EFI_SUCCESS;=0D }=0D +=0D +/**=0D + Build processor and platform information for the U5 platform=0D +=0D + @return EFI_SUCCESS Status.=0D +=0D +**/=0D +EFI_STATUS=0D +BuildRiscVSmbiosHobs (=0D + VOID=0D +)=0D +{=0D + EFI_STATUS Status;=0D + RISC_V_PROCESSOR_SMBIOS_HOB_DATA *SmbiosHobPtr;=0D +=0D + Status =3D CreateU5MCCoreplexProcessorSpecificDataHob (0);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT(FALSE);=0D + }=0D + Status =3D CreateU5MCProcessorSmbiosDataHob (0, &SmbiosHobPtr);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT(FALSE);=0D + }=0D +=0D + DEBUG ((DEBUG_INFO, "U5 MC Coreplex SMBIOS DATA HOB at address 0x%x\n", = SmbiosHobPtr));=0D +=0D + return EFI_SUCCESS;=0D +}=0D --=20 2.33.0