From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: michael.d.kinney@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Fri, 19 Apr 2019 10:36:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 10:36:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,370,1549958400"; d="scan'208";a="137212999" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga006.jf.intel.com with ESMTP; 19 Apr 2019 10:36:56 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.24]) by ORSMSX102.amr.corp.intel.com ([169.254.3.144]) with mapi id 14.03.0415.000; Fri, 19 Apr 2019 10:36:56 -0700 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "ard.biesheuvel@linaro.org" , "Kinney, Michael D" CC: "ming.huang@linaro.org" , "Wu, Hao A" , "Wang, Jian J" Subject: Re: [edk2-devel] [PATCH resend] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory Thread-Topic: [edk2-devel] [PATCH resend] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory Thread-Index: AQHU9roUvahxA3SJQ02Z6I3dcA5rS6ZDvvOw Date: Fri, 19 Apr 2019 17:36:55 +0000 Message-ID: References: <20190419141319.11084-1-ard.biesheuvel@linaro.org> In-Reply-To: <20190419141319.11084-1-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ard, The UEFI Specification Section 23.3 says: "The ESRT shall be stored in memory of type EfiBootServicesData." If an RT driver needs ESRT info after ExitBootServices(), then the RT driver should collect that information before ExitBootServices(). Best regards, Mike > -----Original Message----- > From: devel@edk2.groups.io > [mailto:devel@edk2.groups.io] On Behalf Of Ard > Biesheuvel > Sent: Friday, April 19, 2019 7:13 AM > To: devel@edk2.groups.io > Cc: ming.huang@linaro.org; Wu, Hao A > ; Wang, Jian J > ; Ard Biesheuvel > > Subject: [edk2-devel] [PATCH resend] > MdeModulePkg/EsrtDxe: allocate ESRT table from > RtServicesData memory >=20 > Given that the firmware itself may access the ESRT > table when the OS > invokes the UpdateCapsule () boot service, it requires > a virtual mapping > and so it needs to be allocated from RtServicesData > memory. >=20 > Signed-off-by: Ard Biesheuvel > > --- > MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c > b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c > index a386a9770583..1741cbe8f2b5 100644 > --- a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c > +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c > @@ -571,7 +571,8 @@ EsrtReadyToBootEventNotify ( > goto EXIT; > } >=20 > - EsrtTable =3D > AllocatePool(sizeof(EFI_SYSTEM_RESOURCE_TABLE) + > NonFmpRepositorySize + FmpRepositorySize); > + EsrtTable =3D AllocateRuntimePool > (sizeof(EFI_SYSTEM_RESOURCE_TABLE) + > + > NonFmpRepositorySize + FmpRepositorySize); > if (EsrtTable =3D=3D NULL) { > DEBUG ((EFI_D_ERROR, "Esrt table memory allocation > failure\n")); > goto EXIT; > -- > 2.20.1 >=20 >=20 >=20