From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.5330.1659998862694693989 for ; Mon, 08 Aug 2022 15:47:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=kjHme2tj; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.195.228.134]) by linux.microsoft.com (Postfix) with ESMTPSA id BE366210927D; Mon, 8 Aug 2022 15:47:40 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BE366210927D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1659998862; bh=dBjZ4USqdtVvE4EG81jB8DHrTDK60IEPH2ifKLPIPNo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kjHme2tjor09jtA1+ZWZWPYOCwRaRVOWWACUQgjM/zRUKzVKX1lckXvqB5Ltp3aFP Puw9ncjmLAFZy8Nd2VjU+1Mb3Ym4VDFYTRgt1uDg/rdrEF+lbZIGcgfvrz79l8O9Tq EJMlm195gDFcYTYLrG2J4kX7yZnGUe5l4eN/2fSs= Message-ID: <933389a1-67f8-1085-b00a-00141c8baf2c@linux.microsoft.com> Date: Mon, 8 Aug 2022 18:47:39 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [edk2-devel] [PATCH v1 0/5] Add support to build PRM for AARCH64 using GCC To: devel@edk2.groups.io, sami.mujawar@arm.com Cc: ardb+tianocore@kernel.org, nathaniel.l.desimone@intel.com, ankit.sinha@intel.com, npham@amperecomputing.com, loc.ho@amperecomputing.com, jose.marinho@arm.com, Samer.El-Haj-Mahmoud@arm.com, Matteo.Carlini@arm.com, Akanksha.Jain2@arm.com, Ben.Adderson@arm.com, nd@arm.com References: <20220803143547.27772-1-sami.mujawar@arm.com> <569735e2-394f-7be0-1530-40f8a2caacf3@arm.com> From: "Michael Kubacki" In-Reply-To: <569735e2-394f-7be0-1530-40f8a2caacf3@arm.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Responses inline. On 8/8/2022 6:35 AM, Sami Mujawar wrote: > Hi Michael, >=20 > Please find my response inline marked [SAMI]. >=20 > Regards, >=20 > Sami Mujawar >=20 > On 04/08/2022 05:09 am, Michael Kubacki wrote: >> For the series: Reviewed-by: Michael Kubacki=20 >> >> >> The patch formatting seems a little strange: >> >> 1. The patches don't have "Cc" lines. >> > [SAMI] I have not been following the convention to add Cc lines to the=20 > patches. However, I will start from the next patch series. >> 2. What is this GUID message at the bottom of each patch? >> >> =C2=A0=C2=A0 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > [SAMI] I have added this so that I can easily search my patches. It does= =20 > not affect the patch though. >> Okay, no problem I had just not seen it before. >> By the way, I tested the AARCH64 PRM build with sample modules on=20 >> VS2019 a while back, so I see that you mentioned only testing GCC=20 >> (thanks for helping get the functions in the export table there) but=20 >> it should work in VS as well. >=20 > [SAMI] I have tried building PrmPkg with VS2019 and found that the=20 > AARCH64 builds do not work. >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "C:\Program Files (x86)\Micro= soft Visual=20 > Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\bin\Hostx86\arm64\arma= sm64.exe"=20 > /Fow:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemo= ryLibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.obj=20 > /nologo /g=20 > /Iw:\edk2-exports\edk2\MdePkg\Library\BaseMemoryLibOptDxe\AArch64=20 > /Iw:\edk2-exports\edk2\MdePkg\Library\BaseMemoryLibOptDxe\Arm=20 > /Iw:\edk2-exports\edk2\MdePkg\Library\BaseMemoryLibOptDxe\AArch64=20 > /Iw:\edk2-exports\edk2\MdePkg\Library\BaseMemoryLibOptDxe=20 > /Iw:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemor= yLibOptDxe\BaseMemoryLibOptDxe\DEBUG=20 > /Iw:\edk2-exports\edk2\MdePkg /Iw:\edk2-exports\edk2\MdePkg\Include=20 > /Iw:\edk2-exports\edk2\MdePkg\Test\UnitTest\Include=20 > /Iw:\edk2-exports\edk2\MdePkg\Include\AArch64=20 > w:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemoryL= ibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.iiii=20 >=20 > w:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemoryL= ibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.iiii(7)=20 > : error A2034: unknown opcode: . > =C2=A0=C2=A0=C2=A0 .text > w:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemoryL= ibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.iiii(8)=20 > : error A2034: unknown opcode: . > =C2=A0=C2=A0=C2=A0 .align=C2=A0 5 > w:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemoryL= ibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.iiii(9)=20 > : error A2034: unknown opcode: InternalMemCompareGuid > ASM_GLOBAL InternalMemCompareGuid > w:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemoryL= ibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.iiii(13)=20 > : error A2173: syntax error in expression > =C2=A0=C2=A0=C2=A0 cbz=C2=A0=C2=A0=C2=A0=C2=A0 x1, 0f > w:\edk2-exports\Build\Prm\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseMemoryL= ibOptDxe\BaseMemoryLibOptDxe\OUTPUT\AArch64\CompareGuid.iiii(19)=20 > : warning A4045: missing END directive > =C2=A0=C2=A0=C2=A0 ret > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual=20 > Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\bin\Hostx86\arm64\arma= sm64.exe"'=20 > : return code '0x1' > Stop. >=20 > Can you please let me know if this is a configuration/environment issue= =20 > or the AARCH64 assembly files need to be ported for Visual Studio? >=20 > I have tried building other Arm packages and though the assembler files= =20 > need porting, which I believe has been done as part of ProjectMu=20 > (https://github.com/microsoft/mu_silicon_arm_tiano). >=20 > It would be good to have AARCH64 builds of edk2 with Visual Studio as=20 > this would allow to use the VS static analysis tool. >=20 > Can you let me know if you have any plans to enable this support in=20 > Tianocore\edk2 project, please? >=20 > [/SAMI] >=20 I did build it with Project Mu picking up PrmPkg as a submodule. Yes, I=20 will investigate enabling this in edk2. >> Regards, >> Michael >> >> On 8/3/2022 10:35 AM, Sami Mujawar wrote: >>> This patch series adds support to build PRM for AARCH64 using GCC. >>> >>> The changes can be seen at: >>> https://github.com/samimujawar/edk2/tree/2238_aarch64_prm_support_v1 >>> >>> Jose Marinho (5): >>> =C2=A0=C2=A0 Basetools/GenFw: Allow AARCH64 builds to use the --prm fla= g >>> =C2=A0=C2=A0 PrmPkg: Enable external visibility on PRM symbols >>> =C2=A0=C2=A0 PrmPkg: Build Prm Samples with GCC for AARCH64 >>> =C2=A0=C2=A0 PrmPkg: Support AArch64 builds using GCC >>> =C2=A0=C2=A0 PrmPkg: Add details on AArch64 build to the Readme. >>> >>> BaseTools/Source/C/GenFw/Elf64Convert.c |=C2=A0 6 ++--- >>> PrmPkg/Include/Prm.h |=C2=A0 3 +++ >>> PrmPkg/PrmPkg.ci.yaml |=C2=A0 1 + >>> PrmPkg/PrmPkg.dsc | 24 +++++++++++++++++--- >>> PrmPkg/Readme.md | 11 +++++++++ >>> PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParamete= rBufferModule.inf=20 >>> |=C2=A0 4 ++++ >>> PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModul= e.inf=20 >>> |=C2=A0 4 ++++ >>> =C2=A0 7 files changed, 47 insertions(+), 6 deletions(-) >>> >=20 >=20 >=20 >=20