From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web11.53188.1688454107465068704 for ; Tue, 04 Jul 2023 00:01:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=GTjBVBqs; spf=pass (domain: ventanamicro.com, ip: 209.85.210.177, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6682909acadso2539858b3a.3 for ; Tue, 04 Jul 2023 00:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688454107; x=1691046107; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=wk8n/eaGvZn5vNLwdg18gGza5fV/OwS28MPYQ0VlLnY=; b=GTjBVBqsV+B3nrS0Q38kT+D/2DlrE7NnkaWZceFr1fl2ge8RfZ4NMwqqSCP0wsHxye IGRLDzK/NDL7usXlIRgGY+QlIhM+HkidlCEbcW6MeMsasS8NgEhBKM55mLMbsnw51Z2N SGeS3zXV+34hnq5teR6YCz5m/XGwJLvEHxntY2d6WNXHNC+CqMroV0oU2MIE0SiOmRO5 A0MHc/PQDfA8mRAE5R9BA2L/DR3GBtWL+j4m9HZg4etgMSIEq882cwI041GE0Uv91zrj Xgw2jNLqBGbSddhGkr/TTJzKERGNVt+X//SZLEVXncsZhrJ2qio9y+UkzB653h1kTnJD G7dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688454107; x=1691046107; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wk8n/eaGvZn5vNLwdg18gGza5fV/OwS28MPYQ0VlLnY=; b=OW8Tg6Jnybya0LadNRj+eRk4Bc8Miz3MsJ/m3VFxx7ibhfAxPbluLtccQd0htHalDW vU63b5f7a7XE5+g9PCjKKBL0YR2HaBJa+y5dmehf5/A4DG3V61Bchl5zuwl0T6Ip9x+h S8SxTiGO7fsAnHbXVccMpBni45iw3ID4SBw9E6jG7W11kwqwXMsdZhgod/WlyGT03syI nxGTu4DVR94rPXkaoFKVF0jw9mWEE0ACkkghhN5bYJlSazaYk0Eoel+3fNcVl5ar99iI fI2ClSJzMag++Ma6twCLRcNXTxB8oWthHn2k5nvaetUyOb32tBs2KbIohRVt8XZ/D2yD az0Q== X-Gm-Message-State: AC+VfDzK0I0u1Js7ASSh1J8bidJv0zzdIgTzoPOUCarLYkezVgUJa045 ZXY61J2zwwA+GU/glJrevCIFJQ== X-Google-Smtp-Source: ACHHUZ69fXraEp/orpKm9Be7nSZI5VTspF0fRnT5MZJBK1bYcejjzhEAU11SaGcSarzQ+sGP4G2Twg== X-Received: by 2002:a05:6a20:13c7:b0:11f:ed0:132 with SMTP id ho7-20020a056a2013c700b0011f0ed00132mr9862153pzc.9.1688454106860; Tue, 04 Jul 2023 00:01:46 -0700 (PDT) Return-Path: Received: from sunil-laptop ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id o11-20020a170902bccb00b001a0448731c2sm16385087pls.47.2023.07.04.00.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 00:01:46 -0700 (PDT) Date: Tue, 4 Jul 2023 12:31:40 +0530 From: "Sunil V L" To: Tuan Phan Cc: andrei.warkentin@intel.com, ardb+tianocore@kernel.org, devel@edk2.groups.io, gaoliming@byosoft.com.cn, git@danielschaefer.me, michael.d.kinney@intel.com, zhiguang.liu@intel.com Subject: Re: [PATCH v4 5/7] OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list Message-ID: References: <20230623183934.23905-1-tphan@ventanamicro.com> <20230623183934.23905-6-tphan@ventanamicro.com> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Jul 03, 2023 at 11:45:45PM -0700, Tuan Phan wrote: > As i said, VirtNorFlashDxe needed to be loaded before VariableRuntimeDxe so > your suggestion will not work. > Okay, at least for me, by removing APRIORI patch and adding this depex, edk2 boots fine with your series. I am not sure what won't work. Hi Ard, any thoughts? If no better way, may be we have to use APRIORI. Thanks, Sunil > On Mon, Jul 3, 2023 at 10:07 PM Sunil V L wrote: > > > On Wed, Jun 28, 2023 at 02:27:10PM -0700, Tuan Phan wrote: > > > On Wed, Jun 28, 2023 at 9:47 AM Sunil V L > > wrote: > > > > > > > On Fri, Jun 23, 2023 at 11:39:32AM -0700, Tuan Phan wrote: > > > > > Make sure VirtNorFlashDxe loaded before VariableRuntimeDxe as it > > > > > is the backend flash driver. > > > > > > > > > > Signed-off-by: Tuan Phan > > > > > --- > > > > > OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 10 ++++++++++ > > > > > 1 file changed, 10 insertions(+) > > > > > > > > > > diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > > index 21e4ba67379f..9ab8eb3ba7d8 100644 > > > > > --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > > +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > > @@ -53,6 +53,16 @@ READ_STATUS = TRUE > > > > > READ_LOCK_CAP = TRUE > > > > > READ_LOCK_STATUS = TRUE > > > > > > > > > > +APRIORI DXE { > > > > > + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf > > > > > + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf > > > > > + INF > > > > > > MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > > > > > + INF > > > > > > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > > > > + INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf > > > > > + INF UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf > > > > > + INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf > > > > > +} > > > > > + > > > > Hi Tuan, > > > > > > > > Actually, Ard had recommended not to use APRIORI and hence we avoided > > > > it when we upstreamed RiscVVirt. So, I am wondering whether this can be > > > > avoided by using depex in CpuDxe on gEfiVariableArchProtocolGuid? > > > > > > > > Hi Sunil, > > > Not sure what the reason behind avoiding APRIORI besides it is a > > workaround > > > for broken DEPEX. BTW, what we need is to put VirtNorFlashDxe loaded > > before > > > VariableRuntimeDxe which doesn't depend on any modules. I don't see any > > > other clearer way than modifying VirNorFlashDxe as shown in the first > > > version of this series. > > > > > > The CpuDxeRiscV64 in the aprioriy list as VirNorFlashDxe depends on it. > > > > > Hi Tuan, > > > > I couldn't locate old mail from Ard recommending to remove APRIORI in > > RISC-V. But here is the recent mail on different context but those > > reasons are still valid in any case. > > https://edk2.groups.io/g/devel/message/104543 > > > > IMO, there is no dependency between VirtNorFlashDxe and > > VariableRuntimeDxe. I think what we need is CpuDxeRiscV64 loaded after > > VariableRuntimeDxe and before VirtNorFlashDxe. A simple depex like I > > suggested in previous mail should work. I still prefer this than > > introducing APRIORI unless there are other issues I am now aware of. > > What do you think? > > > > Thanks! > > Sunil > >