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.web11.591.1589991489620776832 for ; Wed, 20 May 2020 09:18:09 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0409d44702=daniel.schaefer@hpe.com) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04KGD4hn010651; Wed, 20 May 2020 16:18:09 GMT Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0a-002e3701.pphosted.com with ESMTP id 314qjjetgq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 May 2020 16:18:09 +0000 Received: from G2W6311.americas.hpqcorp.net (g2w6311.austin.hp.com [16.197.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id 2E45D66; Wed, 20 May 2020 16:18:08 +0000 (UTC) Received: from G2W6311.americas.hpqcorp.net (2002:10c5:4035::10c5:4035) by G2W6311.americas.hpqcorp.net (2002:10c5:4035::10c5:4035) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 20 May 2020 16:18:06 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (15.241.52.12) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 20 May 2020 16:18:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BHLLAiEynH+Jm67LnS6hg2CPVQ0N2dJIRP9cwh0PwHTI/jyA3S8i/qBIjYWzCCz7aUdU21ZoRyrV2R/YT75PvVV1FXV4u02sufRbu+LDicM0Y9zzIaywYHDJxdK0Mg+7ACA+4JyQNL80e7p15qL10TyYsoc78hPv9YjvU3LbK/0aW4qsefDtI+1cSp4VBtQ4J+S0UsKLFOz6t67ncZZsUl7K7+mwKAIAN9jskTw2Sy1CUq0VXdEF5d2MUr+hn2Co1LRwHxa763tKsxoCYz5aI2t0hTN3QY5D12v5aoaEhG4nbx90oRtb6JF6jQZ/6dAVh7k3hHvpp3CLcGH9IU2t2g== 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=43m0l1hAxBLNbUhinfgoumqEOjE0QlFDHK8OU0FTQUo=; b=AgPlhfW5h4huZ65zNo+u6II3pTfZVUgfWWjZ6SEQY1nXLLU/CZqnmGMihpwVJWvc0CWMUbIBiUmNXsJjuW9xdTG5Yqsmmh/oi3+tyuVyAmlIqK1U6w0LQ7gtS05bLd+JcO3ZtrkoMXp7CIQmCGLmsNsK/SmlAtMPjvynUpKj24tJZ/PoMrB9PtoPVa5MqNUHDpPrm0SJtW4TBBYvDY8+4LcLfK+/SDKWq/YdcrMVwnG0uBLSf2DUtFd6jiAHzeifVAj77S5ZSjbNl2ISihCbDjbZn/v9XY5ygA2mtTs1ahLBf9nkndlXcUsi/n6q3lgkerHGwD6aQuAm7ybw84BgNA== 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: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=hpe.com; Received: from CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:750c::23) by CS1PR8401MB0984.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7511::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.24; Wed, 20 May 2020 16:18:05 +0000 Received: from CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM ([fe80::6d01:dcc0:65e:ef77]) by CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM ([fe80::6d01:dcc0:65e:ef77%7]) with mapi id 15.20.3000.034; Wed, 20 May 2020 16:18:05 +0000 Subject: Re: [edk2-devel] [PATCH v2 0/3] New RISC-V Patches - Why in edk2-platforms From: "Daniel Schaefer" To: Leif Lindholm , CC: Abner Chang , Gilbert Chen , "Kinney, Michael D" , , References: <20200515133937.29909-1-daniel.schaefer@hpe.com> <20200520114336.GK1923@vanye> <6f0d755e-4e69-5080-ef69-caf7259ce9ee@hpe.com> <27d3bf55-eb2e-75e1-e5fa-17af59e105aa@hpe.com> Message-ID: Date: Wed, 20 May 2020 18:17:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: <27d3bf55-eb2e-75e1-e5fa-17af59e105aa@hpe.com> X-ClientProxiedBy: AM0PR04CA0058.eurprd04.prod.outlook.com (2603:10a6:208:1::35) To CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:750c::23) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.178.165] (93.215.202.37) by AM0PR04CA0058.eurprd04.prod.outlook.com (2603:10a6:208:1::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.24 via Frontend Transport; Wed, 20 May 2020 16:18:03 +0000 X-Originating-IP: [93.215.202.37] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 40a69ef6-5f4b-4062-7fb6-08d7fcd96086 X-MS-TrafficTypeDiagnostic: CS1PR8401MB0984: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2r7twGu+loNA1kIh2sy9QX2T5ChIzv/0MTneSAdZSMaok0oNSMMgIunbFYJlrNQM0OVRqMsepAercOK7i3a1pTWrjgEKKNWz3sQrugDAcKDobczrLRksjpMZAfNlounkgwV6Ci8edZgZsB5US2HTxi5qhPVn/RC5h8LZ48wCLq4dqxgw2yFmCkq4cMsDsttzJRYs9ouRlwd6iBYJ7uqxAO/HQHPzGMXSQStbH6DDWOFVeis35BWt8lnz7MlnpUs2eVgIUw8MXjjcw0oRjuevYUleHBZN4+m5tyJWaC1f17kDnHmml47v3g0CcPQKNiB/88IzsTEzrb3hCIefJD2Uh5zRxj0FuThZRsAws9CQtzgCPeZqtYlEsfrgtTemxlXZ0MmPJQaTTBbO+iWlu044RH0WdJo+MuPmE5cikPc7Bz28gHVMcM3IogH+nIwPrliHMe/+T1PF5P9tQ/Z9YGiq1Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFTY:;SFS:(136003)(39860400002)(366004)(346002)(376002)(396003)(66556008)(66946007)(66476007)(6666004)(6486002)(8676002)(86362001)(52116002)(44832011)(54906003)(16576012)(966005)(31686004)(4326008)(8936002)(478600001)(186003)(16526019)(2906002)(26005)(36756003)(2616005)(5660300002)(53546011)(956004)(31696002)(316002)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: jae/To++RSWkhLOYc63wU4UkkHElxTdhU/e+66tRPHlwxNdrEOiA8vo6pt9nKr0r5yfJUBLFYy85lCJL1EA0zLqXCqs4EpjeLqjqCr+f0LEs9IMgLr1ch3fLG4ox4zyxeF4XX3ZtSmnRrEQgxBV+GKY/2sUJmTkxiEXwke8k91y5LU7Sy9L086GWNeH3YxEM80Wke57r6b9Pavxxvengd8zOak3mipEEFLXAiGAsSJe8ZbwwesbJQJ9Wp+8gjxg66yEcCVFYSqWich5zFBlr2boO8zm463XByzHjvgWdYDCUjYk3ncATh6+VsQQWwuotWsTfXzcJJRtuEUFB6CIvr6ZvfL2PO/Ot/e2V+4tNZW04UGepVmdb6IqDjY0EbyF/HrWtgl0rJ0vIsu24xoz5UD/C7A59D8ZmaQQ2Y3ywGb0YwDzqPw82xeORfklmGS34kqNncFOPz6tPKm/AGu5ap5i5P5aegcR3OlpJODP/RVs= X-MS-Exchange-CrossTenant-Network-Message-Id: 40a69ef6-5f4b-4062-7fb6-08d7fcd96086 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 16:18:05.6423 (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: u3dBXUHikcTOddbgDhJig2ZGjokyIVO+61rhrcrj83btjSIQgWVAvpTzfYm4R8AEeSbShRsJrXOVyom9k1vL0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0984 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-20_12:2020-05-20,2020-05-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 adultscore=0 cotscore=-2147483648 phishscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005200131 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-002e3701.pphosted.com id 04KGD4hn010651 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/20/20 6:07 PM, Daniel Schaefer wrote: > please reply here, fixed Mike's email address, sorry... >=20 > On 5/20/20 6:03 PM, Daniel Schaefer wrote: >> On 5/20/20 1:43 PM, Leif Lindholm wrote: >>> On Fri, May 15, 2020 at 15:39:34 +0200, Daniel Schaefer wrote: >>>> Previously we had two packages just for RISC-V on our edk2 branch: >>>> =C2=A0=C2=A0 RiscVPkg and RiscVPlatformPkg >>>> They are now under >>>> =C2=A0=C2=A0 Platform/RISC-V/PlatformPkg and Silicon/RISC-V/Processo= rPkg >>>> in edk2-platforms. >>> >>> Understood. I took my eye off the ball there for a while, but I'm a >>> bit confused as to why RiscVPkg isn't going into EDK2. That is very >>> counterintuitive. And clearly it will need revisiting if we are to ad= d >>> first-class CI checks like those we do with OvmfPkg/ArmVirtPkg. >> >> Yes, I understand your concern. Personally I'd like it also to be in=20 >> EDK2 straight away, however Mike, Bret and Sean have raised valid=20 >> concerns: >> >> 1. RISC-V is very new and potentially unstable - it's quicker to make=20 >> changes in edk2-platforms. >> >> 2. If we define new interfaces and libraries in edk2, we can't remove=20 >> them easily because it would be a backwards-incompatible change.=20 >> edk2-platforms isn't quite as strict. >> >> 3. Long-term, I think many agree, we should aim to move much of the=20 >> RISC-V code into UefiCpuPkg and OvmfPkg. Mike mentioned that would=20 >> need coordination with ARM maintainers because it might make sense to=20 >> move their code there as well. >> >> Maybe Mike, Bret or Sean would like to provide some more comments? >> >>> I *did* have some outstanding comments specifically with regards to >>> large amounts of code duplication between the SMBIOS implementation o= f >>> some closely related RISC-V platforms. That now needs to be revisited. >> >> The SMBIOS code hasn't changed. It has moved to >> =C2=A0=C2=A0 Silicon/SiFive/{E51,U54,U54MCCoreplex}/Library/PeiCoreInf= oHobLib >> You're referring to this library, right? >> >> They build the SMBIOS entries for a particular processor. Yes, the=20 >> values do have a lot of overlap but these files are like configuration= =20 >> files. They don't do much, they only set the values of the properties. >> >> Currently it is not possible to let the UEFI firmware get this=20 >> information from the hardware at runtime, especially now, since we're=20 >> running in S-Mode. >> To allow that, we created a RISC-V working group to be able to=20 >> retrieve all of this information dynamically from the processor (among= =20 >> other goals). Then the vendor will not have to modify these files and=20 >> hardcode the values anymore. Which enables us to create a single=20 >> library for all processors. >> See: https://github.com/riscv/configuration-structure >> >> I hope I described everything properly, please correct me otherwise,=20 >> Abner. >> >>> >>>> In the previous version of this patchseries I forgot to attach the=20 >>>> biggest new >>>> commit, which adds RiscVEdk2SbiLib. It wraps the ecall interface for= =20 >>>> calling >>>> SBI in a C API and lets PEI and DXE call SBI interfaces. Because we=20 >>>> need more >>>> M-Mode capabilities in PEI and DXE than SBI gives us, we register=20 >>>> another SBI >>>> extension, that gives us access to the mscratch register. >>> >>> Without looking at it yet, it sounds like that may resolve the only >>> remaining major issue I had with RiscVPkg. >>> >>>> I hope now it makes more sense. >>> >>> It is more clear, as per above I am not sure it makes more sense :) >>> Thanks! >> >> Your concerns are very valid, however due to the mentioned trade-offs=20 >> it might not make sense to address them. >> >> - Daniel