From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table To: Ard Biesheuvel ,devel@edk2.groups.io From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= X-Originating-Location: Berlin, Land Berlin, DE (104.28.62.40) X-Originating-Platform: iPhone Safari 16.3 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 03 Feb 2023 00:25:38 -0800 References: In-Reply-To: Message-ID: <20118.1675412738875218763@groups.io> Content-Type: multipart/alternative; boundary="vzXe8naKJneh5ikF3dAJ" --vzXe8naKJneh5ikF3dAJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Ard, Short story: No, TE is not a concern for RT drivers, at least not upstream = [1]. Long story: Even if a downstream added support for RT relocation=C2=A0itsel= f, TE images are loaded misaligned by DxeCore, because it lacks a (terrible= ) workaround as done in PeiCore [2]. It doesn=E2=80=99t look like anyone tr= ied to use them in DXE at all. Best regards, Marvin [1] https://github.com/tianocore/edk2/blob/11f0014c0e3046e3762eac420b760091= d0cdc063/MdePkg/Library/BasePeCoffLib/BasePeCoff.c#L1759 [2] https://github.com/tianocore/edk2/blob/11f0014c0e3046e3762eac420b760091= d0cdc063/MdeModulePkg/Core/Pei/Image/Image.c#L412 --vzXe8naKJneh5ikF3dAJ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Hi Ard,

Short story: No, TE is not a concern for RT drivers, = at least not upstream [1].

Long story: Even if a downstream adde= d support for RT relocation itself, TE images are loaded misaligned by= DxeCore, because it lacks a (terrible) workaround as done in PeiCore [2]. = It doesn’t look like anyone tried to use them in DXE at all.
Best regards,
Marvin

[1] https://github.com/tianocore/edk2/blob/11f= 0014c0e3046e3762eac420b760091d0cdc063/MdePkg/Library/BasePeCoffLib/BasePeCo= ff.c#L1759

[2] https://github.com/tianocore/edk2/blob/11f0014c0e3046e3762eac42= 0b760091d0cdc063/MdeModulePkg/Core/Pei/Image/Image.c#L412

--vzXe8naKJneh5ikF3dAJ--