From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web11.6174.1588859033566378680 for ; Thu, 07 May 2020 06:43:53 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0396a12c16=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047Dai1j011792; Thu, 7 May 2020 13:43:48 GMT Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0b-002e3701.pphosted.com with ESMTP id 30vcsjayhf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 13:43:48 +0000 Received: from G9W8456.americas.hpqcorp.net (g9w8456.houston.hp.com [16.216.161.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5008.houston.hpe.com (Postfix) with ESMTPS id 0D42D76; Thu, 7 May 2020 13:43:47 +0000 (UTC) Received: from G4W9119.americas.hpqcorp.net (2002:10d2:14d6::10d2:14d6) by G9W8456.americas.hpqcorp.net (2002:10d8:a15f::10d8:a15f) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 7 May 2020 13:43:39 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.11) by G4W9119.americas.hpqcorp.net (16.210.20.214) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 7 May 2020 13:43:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VsA2NsGlyr2t0HenO3gPzzYIzsSgZntQdhr5QRwE6IQTxbVFVhVFaak+VsA4sV6CD4hvqpn9tMlLJbJz6yLesoADRpFfWczktsIMXjDSawR3JK3WOidTrblnp6j+WMMrjQdkgPFMxHf4mJnE83V9g4aJAq5j5xZkTC+Rm3t6De5H0iwZ4GjpdnFfTAHxDHBy0f9Vwg+/GPYca9viXBb5uGs+YposHwIzbKAtX0eO9tNBKsc4xNV7FXgf5p0EJ9RT8TvWGee9sKxwMOa9Tk1f6iF7DjSH2u/2s5cvJp+GXL3HZW0ivWEKugQ83MnxLvyT3j8Q6zxzl+nhi5/nWxTGBA== 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=7mfeXjci7iXfc4B0zlXY66Wk087I8wLD2gO8Wb6t0+s=; b=FFxpRicV5k1/aZtw2RzcyxTdSZbA2vfLoZrR3nBGAv03EuXOxxUAPif4KM1iITZ1aBGaqxPqi1kMiQTmGZ5lGPUewQqKYT9EZT/5NfdJ90nIoCWcwHAdsMY6JrMC4Qn1x6RbV9iRe39Wf2BYWMKpzQxEeaev/gF9tDt3PKwhOMOmR+wQwBdhvCBSoJCuVEECyHX924WB1onRf8dNiVSQahquRUOPEgDjlXjFn5k97c52z6gkCert7GHCOplJgD0h03BSY7bpWqhir/jl+tr7XUU8b8NRhFAW+Va7MfXeHwJNgNSFAmKDVBwSWj9xiUQRem5JJjPCoh/zDoKrCkUhnQ== 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 CS1PR8401MB1207.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7515::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Thu, 7 May 2020 13:43:38 +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:43:37 +0000 Subject: Re: [edk2-devel] 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" , References: <20200224221949.28826-1-atish.patra@wdc.com> <4de513ea-26fb-c830-2348-c0f57946fd3d@hpe.com> <3cb1d47e-983f-dd93-33d2-5a7896791dde@arm.com> From: "Daniel Schaefer" Message-ID: Date: Thu, 7 May 2020 15:43:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 In-Reply-To: <3cb1d47e-983f-dd93-33d2-5a7896791dde@arm.com> X-ClientProxiedBy: FR2P281CA0029.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::16) To CS1PR8401MB0726.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:750c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.178.165] (93.215.218.74) by FR2P281CA0029.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28 via Frontend Transport; Thu, 7 May 2020 13:43:35 +0000 X-Originating-IP: [93.215.218.74] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 68f8f970-1b3f-46c5-0b8f-08d7f28ca521 X-MS-TrafficTypeDiagnostic: CS1PR8401MB1207: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 03965EFC76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xdMVlT+Gbnoh/g1t+0Vr295k2WRVTyBt7bSTePjpwetgAnr8fYLV8S+btZLXBEuBPSO1Uvzyp+2CnXrSxWMFl3d1mnHsJpp4cEq203zMdt82gQM7Xx7RowX4j6uJjP8c9RPN/MOA4nrQ3UGldTubB3g8Vd2E1m9edsCzCamTrM0+053mTF9VAlAZydD2UVjtMbMNWUPkLH3YiuQldNq4KD2g/15DFKSZt8n1TqNPoiHi4pJ44976rYEl5Uww5fxZto6JgZV7d2K21hGgDjV8q4H0cz9QCSH47yNoJtZpp3JTBrMH/y14KRSqzJRJW1nttbUtqMP8DebLCFv8tymrzTTFDNDsneIrD0ZoZi63u6EHxEBuUQZViL1t3q9ty56TR+T635f6g4OGHS4HrJTfB6oHVExlJximnqCJ5jt9BR/cwU48Wtok+r0J7uv5Szg1KgG4M9ghiF/sINWFcRyBnSd9zAqou7fJeoFFQhUYZMbDZK4M5TIOBuB9IUG3p9oj6FFwwMuUORRy2x6+dcuMrKArKSXtQeNxfB0N6/lRIe7hJfKMCE8W0syc4CR6Jozb 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:(366004)(136003)(346002)(396003)(39860400002)(376002)(33430700001)(8936002)(44832011)(16576012)(316002)(956004)(53546011)(5660300002)(86362001)(2616005)(33440700001)(6486002)(52116002)(4326008)(54906003)(8676002)(478600001)(26005)(186003)(16526019)(36756003)(31696002)(31686004)(83320400001)(83280400001)(83310400001)(83290400001)(66556008)(66946007)(6666004)(66476007)(83300400001)(2906002)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: PoMSTUvC/bsDg+u59OGT93XLlJ5h+LSrrBLl4SZNtvu3eBX2IJFb/9Ktcf0EuIe9f+8Hnq0soduRR4VJXdQjNr3SGEwwXIxua/vEhuGL4RpV7KZaMS4jg3s1iv2BVH/Bqzwqswz28isHquAQUGMPjTrNntsFN5CvIpUoBdnxb/uFdPEZSQ8z7NoJGqTBvBgKmGWnZWtlP4+c52DU2Z3h03QtdkteUrLvC3vtv7aSHtSfjod0tYqOy+i6pimahSPKw9T0xEVgwwwRBfC648ckszMINjf2PUoBE0yKkm6pf82/fRw8coriFUxGHOawq2ZvzKBwXSy7yze6dr9VGSUetAdsfK3q4q3bw3JFRDNhuZazwbQdtrtZlyhV/kT38QMKXCtQT15BaR1Z27W8IU4KHx/FTDYYeer8W0fVx8tq+lh0YC0WKFBUKnaQ7vVg0utRZEJrziTxEZLkaBBkzYC8MEduXD7+nh89P8tBczYt2pFWtgaMnv6ynOB9Oufd0zyAY9cuyKSlb+FZMxwe6181jFo1H97I6QQ/xJ48haFPnzvRBqJAWiotjGn9Kko7iWit2oaPjcNPKRbtpp0I9wxjcLS/h4xVLborMMOZc9a0qJMXiGB1FnuU7qqRMUwAsU2znPBbwuu4VlYt7VPjt8WaOTBP1wyvfY/QikLg89RMIMPx1aeKEUt3+gSzRxCVAElUufWHM2Ho57NhQcj2ZTyeFMuo+7NrILaxBld2PKbCWAMLcGgxgVI+B3ti6oheVmuE1F++VuiXeh1J6IrOLkayU2yjEzLiwoju8U+CGfSdslU= X-MS-Exchange-CrossTenant-Network-Message-Id: 68f8f970-1b3f-46c5-0b8f-08d7f28ca521 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2020 13:43:37.8123 (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: BkYid7oqQn7GLhIuZvsDPmQ63uJMXZQetu18McGZCMoWvg3PVjfBO3ITBFUanZF9SJSNxIPTSh4HvCTLk5NqzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1207 X-OriginatorOrg: hpe.com 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 spamscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 suspectscore=2 lowpriorityscore=0 clxscore=1011 mlxlogscore=622 bulkscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070111 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-002e3701.pphosted.com id 047Dai1j011792 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/7/20 3:24 PM, Ard Biesheuvel wrote: > On 5/7/20 3:18 PM, Daniel Schaefer via groups.io wrote: >> Hi Ard and others, >> >> TLDR; We have APRIORI definitions from other places in EDK2 but=20 >> there's 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: >> =C2=A0> What I did notice is the use of APRIORI PEI and APRIORI DXE se= ctions >> =C2=A0> in your platform descriptions. I recommend you try to avoid th= at, as >> =C2=A0> it is a maintenance burden going forward: instead, please use = dummy >> =C2=A0> protocols and NULL library class resolutions if you need to ma= ke >> =C2=A0> generic components depend on platform specific protocols. Also= ,=20 >> please >> =C2=A0> document this - the APRIORI section does not explain *why* you= =20 >> have to >> =C2=A0> 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=20 >> other >> places in EDK2.This is what we currently have: >> >> APRIORI PEI { >> =C2=A0=C2=A0 INF=20 >> MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRout= erPei.inf=20 >> >> =C2=A0=C2=A0 INF=20 >> MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf >> =C2=A0=C2=A0 INF=C2=A0 MdeModulePkg/Universal/PCD/Pei/Pcd.inf >> } >> APRIORI DXE { >> =C2=A0=C2=A0 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.in= f >> =C2=A0=C2=A0 INF=C2=A0 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf >> =C2=A0=C2=A0 INF=20 >> Platform/SiFive/U5SeriesPkg/Universal/Dxe/RamFvbServicesRuntimeDxe/Fvb= ServicesRuntimeDxe.inf=20 >> >> } >> >> I can remove all of APRIORI PEI and it boots properly. Of the DXEs I=20 >> can only >> remove FvbServicesRuntimeDxe, otherwise some DXEs are dispatched in=20 >> the wrong >> order and boot fails. > > This means some modules have an undeclared dependency on one of the=20 > remaining modules. Can you elaborate on how the boot fails in this case= ? > The error is =C2=A0 ASSERT [FvbServicesRuntimeDxe]=20 /edk2/MdePkg/Library/DxePcdLib/DxePcdLib.c(72): !EFI_ERROR (Status) In this line, DxePcdLib tries to consume gPcdProtocolGuid. Therefor if I = add the following to FvbServicesRuntimeDxe.inf: [Depex] =C2=A0 gEfiPcdProtocolGuid [Protocols] =C2=A0 gPcdProtocolGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ## SOMETIMES_CONSUMES =C2=A0 gEfiPcdProtocolGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ## CONSUMES =C2=A0 gGetPcdInfoProtocolGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 ## SOMETIMES_CONSUMES =C2=A0 gEfiGetPcdInfoProtocolGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ## SOMETIMES_CONSUMES I can boot without error. Looking at MdePkg/Library/DxePcdLib/DxePcdLib.inf I see that the library = has exactly the same Depex and Protocols specified. Do DXEs have re-specify=20 them? If yes, of what use is it to declare them for the library? Documentation=20 only? Should I/we try to remove the APRIORI entries from OVMF in a similar way? Thanks, Daniel