From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web10.46082.1681929119095166595 for ; Wed, 19 Apr 2023 11:31:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=mTnjdHWP; spf=pass (domain: posteo.de, ip: 185.67.36.65, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 38272240253 for ; Wed, 19 Apr 2023 20:31:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1681929117; bh=FzMHIqGPO6yT0JQb/8mtSGwOdTFw8wG+lvEb+osYEjE=; h=From:Subject:Date:Cc:To:From; b=mTnjdHWPoLilS/OVEpCFfkzEHzhxFw8PmAJcdvLtljLKftErhz81YAGewpGQIQDbs UmJW4z6IM8YQXLSTs2DtcXBuMeAA5FxntlsdkUojYj0X5ov+URiyO+Hhrn6E/KPszy +AZVdg2Ee8tp5xvgxksM5h2XRMs72t0lYnLkjjca+FT5ok0G+6TX36aojVr49c0mpm bb9MF79LMBhnSnwThLduVmzsP+uzdoubBnfc5AI7h+98diWcuSK2I17vwxTu3weWvO nn0VxSiub9JaDyRB5ySLPjdXCO99tcvDx0qAduAIFThb+ifuvStrTna1Mfl8jmI78s FFoKgeE7azYOQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q1qBg65cKz6txw; Wed, 19 Apr 2023 20:31:55 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= Message-Id: <12934A9D-8ABE-426A-8F0D-DFCB5836F642@posteo.de> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: [edk2-devel] [PATCH 1/2] ArmPkg/AsmMacroIoLibV8: Introduce ASM_FUNC_ALIGN() Date: Wed, 19 Apr 2023 18:31:45 +0000 In-Reply-To: Cc: edk2-devel-groups-io , Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Vitaly Cheptsov To: Ard Biesheuvel References: <46CED01C-BEA6-49F3-9634-051DC63D248C@posteo.de> <696924B3-EF5B-4799-AAD9-E090C97D9AA9@posteo.de> <1CE9D3E9-4D3E-49B7-B66B-527B16322980@posteo.de> Content-Type: multipart/alternative; boundary="Apple-Mail=_21D0EF8D-E22A-41F0-9CD6-AF3F37C99074" --Apple-Mail=_21D0EF8D-E22A-41F0-9CD6-AF3F37C99074 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 19. Apr 2023, at 20:26, Ard Biesheuvel wrote: >=20 > On Wed, 19 Apr 2023 at 20:25, Marvin H=C3=A4user = wrote: >>=20 >>=20 >> On 19. Apr 2023, at 20:03, Ard Biesheuvel wrote: >>=20 >> Your branch seems to be missing = 16e0969ef775b898ac700f3261d76030b8ab9ef0 >>=20 >> "ArmVirtPkg/ArmVirtQemu: Use PEI flavor of ArmMmuLib for all PEIMs" >>=20 >>=20 >> That's correct (because that commit is after the last commit I = managed to reproduce the issue with), but I don't see how this commit = would fix the issue. As I said, the symptom is that PeiCore memory is = badly corrupted and the stall happens due to executing said corruption, = not due to jumping to NULL. Those broken branches I linked can all be = made work by rolling back the change to MemoryAllocationLib (which = changes the code size, thus misaligns *something*). In fact, using the = broken variant only for MemoryInitPei is sufficient to reproduce the = issue, other modules don't seem to be involved. >>=20 >=20 > Applying that commit made your branch work for me. Yes, that might very well be - applying ae2c904 also "fixes" the issue = as per = https://github.com/mhaeuser/edk2/tree/arm_corruption-earliest-fixed And technically, so does reverting this line :) = https://github.com/mhaeuser/edk2/commit/7a96986e024f9c7ccf4774cc6f2ddb47a3= abc86e#diff-1edfe01abdf8e4dcac640db4d9436e17b5f15d037714df7f365b58fcfc91e4= 25R409 I don't understand how the changes would *fix* (rather than hide) the = issue, so I'd attribute it to lucky codegen that doesn't misalign = whatever is misaligned. I unfortunately have absolutely no time to get = back to debugging this. :( Best regards, Marvin= --Apple-Mail=_21D0EF8D-E22A-41F0-9CD6-AF3F37C99074 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On 19. Apr = 2023, at 20:26, Ard Biesheuvel <ardb@kernel.org> wrote:

On Wed, 19 Apr 2023 at = 20:25, Marvin H=C3=A4user <mhaeuser@posteo.de> = wrote:


On 19. Apr 2023, at 20:03, = Ard Biesheuvel <ardb@kernel.org> wrote:

Your branch seems = to be missing = 16e0969ef775b898ac700f3261d76030b8ab9ef0

"ArmVirtPkg/ArmVirtQemu: = Use PEI flavor of ArmMmuLib for all PEIMs"


That's correct = (because that commit is after the last commit I managed to reproduce the = issue with), but I don't see how this commit would fix the issue. As I = said, the symptom is that PeiCore memory is badly corrupted and the = stall happens due to executing said corruption, not due to jumping to = NULL. Those broken branches I linked can all be made work by rolling = back the change to MemoryAllocationLib (which changes the code size, = thus misaligns *something*). In fact, using the broken variant only for = MemoryInitPei is sufficient to reproduce the issue, other modules don't = seem to be involved.


Applying that commit made = your branch work for me.

Yes, = that might very well be - applying ae2c904 also "fixes" the issue as = per https://github.com/mhaeuser/edk2/tree/arm_corruption-earliest-fixed=


I don't understand = how the changes would *fix* (rather than hide) the issue, so I'd = attribute it to lucky codegen that doesn't misalign whatever is = misaligned. I unfortunately have absolutely no time to get back to = debugging this. :(

Best = regards,
Marvin
= --Apple-Mail=_21D0EF8D-E22A-41F0-9CD6-AF3F37C99074--