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.web12.5651.1588857575688621794 for ; Thu, 07 May 2020 06:19:35 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0396a12c16=daniel.schaefer@hpe.com) Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047DDaPj022985; Thu, 7 May 2020 13:19:31 GMT Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0a-002e3701.pphosted.com with ESMTP id 30vhjtrr53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 13:19:31 +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 g2t2353.austin.hpe.com (Postfix) with ESMTPS id D19C493; Thu, 7 May 2020 13:19:29 +0000 (UTC) Received: from G4W9326.americas.hpqcorp.net (16.208.32.96) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 7 May 2020 13:18:58 +0000 Received: from G4W10205.americas.hpqcorp.net (2002:10cf:520f::10cf:520f) by G4W9326.americas.hpqcorp.net (2002:10d0:2060::10d0:2060) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 7 May 2020 13:18:57 +0000 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (15.241.52.10) by G4W10205.americas.hpqcorp.net (16.207.82.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 7 May 2020 13:18:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aimDHUV8gFAEsVTz1ZQGnWQu07kG+ZAQCn+K7+nL8Dur7D8zYR4SGl5wxZ6touZscbBB2w5YIEfeT6JDY6nYailJKeSVN/CzAVasTb5j00HIUAkk+XE2++sL67p0fCiGgKFQjC1se17AP974KOSDD9EIv3cknB/r9RpUSK/Dxcggne3JcipIsPO+A7CUkDP4vxUU+Tj4iCIDnpDUioRfYQa0ZaoeTnC4NnYdBnxWwUBMAxg4Z98hfpIMVMtQvAlvHo2HxlGFBS+mtXyXaivqxQlPEL8ovlhNHIaboULHGOHMZ/Ifg9XvyGWBxVw+hBD8JJMutoS+XUWhDBPkB5reqA== 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=I8h9LmcmPxtRnNOE6tlv1yKr4vyeaLJXPr8XLXgf300=; b=P5VRK+xvP6tx+dxRb7k2dz6pqbDQw4z8jcKaV2Dj+KskwHcS6XKBc+PDm6ScsUUfGZbpHMjmCR0x3dZmoC1ev6KxgZyYfXXLNtbKvmLbyXBl/RjUm6iBBb8xClnZEHyjvZfhm0mRHxXwQP4XtfF98AEfVM5VdcV6LF9yIpE7tWMM/xWpJczAir1MIX/HrLQDhcX2blzCvxr3bnGQj+GzgcFjSpqG2JXSITF7onD2Hv0qRsWCWWjlTFDxlcBW/nHZC0HDpA+Qai+AhomxfBm1N7Is4qOYQ2tvuhWjSr1lH5BEKwcJfzic9L5y9+RbZ8bxs8WsEv8Fk6tZ7ESFvDy2EQ== 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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; Received: from CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:750c::23) by CS1PR8401MB0344.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7515::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Thu, 7 May 2020 13:18:56 +0000 Received: from CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM ([fe80::940c:db10:af3c:c3f5]) by CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM ([fe80::940c:db10:af3c:c3f5%4]) with mapi id 15.20.2958.033; Thu, 7 May 2020 13:18:56 +0000 Subject: APRIORI in RISC-V or Where did OVMF APRIORIs come from? To: Ard Biesheuvel CC: "Chang, Abner (HPS SW/FW Technologist)" , Atish Patra , Heinrich Schuchardt , "Atish Patra" , Alexander Graf , Anup Patel , "leif@nuviainc.com" , "devel@edk2.groups.io" , References: <20200224221949.28826-1-atish.patra@wdc.com> From: "Daniel Schaefer" Message-ID: <4de513ea-26fb-c830-2348-c0f57946fd3d@hpe.com> Date: Thu, 7 May 2020 15:18:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 In-Reply-To: X-ClientProxiedBy: FRYP281CA0017.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::27) To CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:750c::23) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.178.165] (93.215.218.74) by FRYP281CA0017.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26 via Frontend Transport; Thu, 7 May 2020 13:18:54 +0000 X-Originating-IP: [93.215.218.74] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a78796fe-e67e-460a-1490-08d7f2893252 X-MS-TrafficTypeDiagnostic: CS1PR8401MB0344: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 03965EFC76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IjZmKifN4kZSmshRYXXwZ7Xn5gdrHvSSEy/I7s6boHCuSOfYoc547GpjK//oaireJM2czjprg8dh/OMVsYCaaKui9YXgcmj+rfWe44vG7hEiCfUhRS/d1r85QWvsBt2NpuJt1atpZ9jsgsWxdXJ9BiVIFK9yVvHOhMtrD8YvslZAJvgFrKqm5i+sg/gBD5x9iLdZD2tKfBEFoZX622yzpePPvHhNob5g5zFLEIVbJDgFNM5OG02N5Fa8KjlRqMoSfqNv6Nc0jwh163hJxPqlTZTTKKHpIjXISxV754p5G3LJKFsYaYa7VaoERo3HUkj7PPmI7mIIUDB4L7FR35uwXLQ2sBH23K+I1yCITv0PNXMuUEVYIKDXL/tBFX2/9Rf5kQNYjSdGgVglDlB8RRff/tIj8zKs9Xd7JmHAps3KgWylvTMHXT5lgAZSAqkctVgRoiIISfmJuPSdnolMvYbZpgEdy7AXG8FHpkDBsulP/ERE5kgoKWxiuM4TvTMhEB7urE8PbszAv7OoiM4v8iOh2lkkY189cJNdmL0ssl1KJ1x/DrmE2PTejagSsyZusr5kNvnTCbG+VQ52vU/JPiW9hmnOo+RwKQ6XrDTlsJyZ7yaB1rN61qS1EaGtAgrnIcXeBcVhgaK3ik5wX8zRtx+hHA== 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:(376002)(346002)(39860400002)(366004)(396003)(136003)(33430700001)(36756003)(478600001)(16526019)(966005)(66476007)(66556008)(5660300002)(6916009)(8676002)(6486002)(8936002)(31686004)(2906002)(31696002)(66946007)(52116002)(86362001)(316002)(186003)(6666004)(44832011)(956004)(2616005)(16576012)(83320400001)(83280400001)(83310400001)(83290400001)(54906003)(33440700001)(26005)(53546011)(4326008)(83300400001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: XUinZetHnMFkyCvjhLP5E/E1OYObL5B+Ll0wRJA9BjbkwVrs7Kemv5WTTQ8oAqnWzGZO9givbmbdiDjsVNny9UxHG+rksOlQ7uuUdkqxns7ame5M91e/wc2kruAUkPqJeN2CkvpYkEOL+FB1mPqjSVB/K0o7kJRJJfaWxu1cP7QZQP7WyYeZS/UW35DW4oBmWp9+P5kGQ6tCYY41dXg3NElGNRStyccD+rFPgSGzipXtz6Kk+GkHBmMjVyk7wgM5jP+OMwcV1Ir3nsrx3sWB81MZb84z8YG0FbY28PdfjIyaf3g6NDfGrEFdClw0TK1b8G/sKLIguOHs8a76EeBAMV6OSN5GpB9xJRbO5KxJ6UQnWgHpyp0L275/jmuJ4T7JoebqMtSMkZAsKOO1+sA5FQUfyHzcebYwMMZmSI6z4kCawIH8MpaQ7/PHT1qxy/RL4Qo7BJK4HNoPjUwUP4/nvXc4vySgbaD71sJ75NoGTU2Nkne0qs+OtiZRTaJTlfkmTVxq8D/YZVnR7GxxN3pbNDx23d+HNa7IRIdQ9pnZyc2Ibd9meLcRiWPa7H5Qv0/46l/8y3X898hhyq5I/PaqH2hc8rzJpUDP0Wj44Tkwcw7nO8f2mUnGCW2qZzbvILSfo362HD13SDrHGXWFtpO8COz8nH8/Kwcj2swxW5TO2eVm/WiIPuzPTEMEWa8aEUz4x+/gwMZQU4Ud9fR/fZnSUh5RWLMBklaT5XesypaJ5xwWI8y//cADOCBBzDAR9RB4phYDFIbNX3QocJ2s4tmexgPVLV1WqeSp2gV4zVmrpV0= X-MS-Exchange-CrossTenant-Network-Message-Id: a78796fe-e67e-460a-1490-08d7f2893252 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2020 13:18:56.7374 (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: sWX6DF0zNeJOG7TN0LOIn1D/d6JjhmaNqJdk2bGWmfAACadrv8B7ANkHekahfASZLR7Hrary8VwzVWi6NDdcjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0344 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-07_08:2020-05-07,2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=706 malwarescore=0 suspectscore=0 clxscore=1011 priorityscore=1501 adultscore=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070108 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-002e3701.pphosted.com id 047DDaPj022985 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Ard and others, TLDR; We have APRIORI definitions from other places in EDK2 but there's=20 no explanation as to why they are there. I'm taking this to the EDK2 list, since it doesn't concern U-Boot. I kept some other people related to UEFI, maybe you're interested ;) On 2/25/20 10:07 AM, Ard Biesheuvel wrote: > What I did notice is the use of APRIORI PEI and APRIORI DXE sections > in your platform descriptions. I recommend you try to avoid that, as > it is a maintenance burden going forward: instead, please use dummy > protocols and NULL library class resolutions if you need to make > generic components depend on platform specific protocols. Also, please > document this - the APRIORI section does not explain *why* you have to > circumvent the ordinary dependency tree based module dispatch. I'm taking a look at this right now. You're absolutely right - we should reduce or document APRIORIs. However, Abner told me that he had only copied most of the FDF from other places in EDK2.This is what we currently have: APRIORI PEI { =C2=A0 INF=20 MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterP= ei.inf =C2=A0 INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandle= rPei.inf =C2=A0 INF=C2=A0 MdeModulePkg/Universal/PCD/Pei/Pcd.inf } APRIORI DXE { =C2=A0 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf =C2=A0 INF=C2=A0 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf =C2=A0 INF=20 Platform/SiFive/U5SeriesPkg/Universal/Dxe/RamFvbServicesRuntimeDxe/FvbSer= vicesRuntimeDxe.inf } I can remove all of APRIORI PEI and it boots properly. Of the DXEs I can=20 only remove FvbServicesRuntimeDxe, otherwise some DXEs are dispatched in the=20 wrong order and boot fails. If we compare our APRIORIs with OVMF (OvmfPkg/OvmfPkgX64.fdf) we can see=20 that it contains the same DXEs from MdeModulePkg in APRIORI, as well as the OV= MF version of FvbServicesRuntimeDxe: APRIORI PEI { =C2=A0 INF=C2=A0 MdeModulePkg/Universal/PCD/Pei/Pcd.inf } APRIORI DXE { =C2=A0 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf =C2=A0 INF=C2=A0 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf =C2=A0 INF=C2=A0 OvmfPkg/AmdSevDxe/AmdSevDxe.inf !if $(SMM_REQUIRE) =3D=3D FALSE =C2=A0 INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.= inf !endif } I conclude, that we cannot give an explanation for why we added them.=20 I'm not sure whether to remove as many as possible now or to keep a similar list = as OvmfPkg. If we keep them, people can just add DXEs like they do in OVMF a= nd they will behave the same. If we remove them, we might expose some=20 dependency issues in existing DXEs. That would be an advantage, so I would vote for=20 this option. By the way, currently our most recent code is here: https://github.com/changab/edk2-platforms/tree/riscv-smode-lib/Platform/S= iFive/U5SeriesPkg https://github.com/changab/edk2-platforms/tree/riscv-smode-lib/Silicon/RI= SC-V/ProcessorPkg https://github.com/changab/edk2-platforms/tree/riscv-smode-lib/Platform/R= ISC-V/PlatformPkg Thanks, Daniel