From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web09.7826.1621405242146492458 for ; Tue, 18 May 2021 23:20:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=w2+uI7vc; spf=pass (domain: linaro.org, ip: 209.85.208.43, mailfrom: etienne.carriere@linaro.org) Received: by mail-ed1-f43.google.com with SMTP id h16so13965724edr.6 for ; Tue, 18 May 2021 23:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wgl6n+WzGu4aHpCRZEOMOYvrKPITEkBaHhvt1oDK+h4=; b=w2+uI7vcD8GtGlX5UajQ/Ax99nvzfGMy+yviw/OH6h6wLClfPOBvLoz3/yg7pXaOuz EXzQZ0VOx163g5t5WaT3pZtsMFZMvVfWvXRHM+PT1IJ764JT9lcuZRRwfkdsmCCrJWmz Me/zZOXknw+AWdwAPdgRbmFsSBOmftu5Xq5wZ3/woWSGuImg4x9ixFgpYKROcGFFYpDo Bf3BAOr8PLhQeeQy6LcIXsNYGnYa5ngYOjia+XaQpoHK6zAEIyINoMr/LFYDBN5W425/ /gl62aFrO3Wc5DjpP4YV5UFES88iUf25F3vgnOYiC/OuCrbCrHeNj8/MiSDEVvqajpWM i1qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wgl6n+WzGu4aHpCRZEOMOYvrKPITEkBaHhvt1oDK+h4=; b=RxCcssiTaaGZcmga0qaVs5YRIQAIYFvDJLqhheNrrougSkliJygRj6nOSx+SABQ6DM EOR/qPdhSatFIcTuppk3lTIigf0i0VWxFKGp5epl0zuXVPfk8epgUZiMkIDVdeg9nohF pm63E+tRS6lW699aENajr7381RTMVqWR/KxOU6BFFCIfHFeRrY9k/e7S5fuJ06N9cEaw 30q5uT0hu4fJP6BiovelVFHJeJAYZu3/9zOdsg9IDLx6LX+M5Zq3MP/Qo+qa67nCSjld BOiPFufUwPGT0ahUoNcjPH/7nKVPDxpThBX+5eJW8NH7d3wNJX5hX+5CQJ05QFvRRY/E 8CEA== X-Gm-Message-State: AOAM530ZhrDq6cGg3S46Ubx9md1vH9hD2ZYo2uhlpmOYDlinmx6wcMPe 0a4KGxhyV+umLI33pSvNKp7wmDvpZNP6Ir7aRjhcpQ== X-Google-Smtp-Source: ABdhPJyWWzIh9lS2R/DHZGEQtpAL4749uRN7yo9+hRzR6f5n6ZQ6U5jPQPfbk56epqtB02ex+7GRpzdVPRNVoF696Yo= X-Received: by 2002:aa7:d803:: with SMTP id v3mr12734789edq.150.1621405240574; Tue, 18 May 2021 23:20:40 -0700 (PDT) MIME-Version: 1.0 References: <20210517074054.30281-1-etienne.carriere@linaro.org> <20210517074054.30281-5-etienne.carriere@linaro.org> In-Reply-To: From: "Etienne Carriere" Date: Wed, 19 May 2021 08:20:29 +0200 Message-ID: Subject: Re: [PATCH v3 5/5] StandaloneMmPkg: build for 32bit arm machines To: Sami Mujawar Cc: devel@edk2.groups.io, Achin Gupta , Ard Biesheuvel , Jiewen Yao , Leif Lindholm , Sughosh Ganu , nd@arm.com Content-Type: text/plain; charset="UTF-8" Hello Sami, Thanks for the catch. I missed that. My comment below. On Tue, 18 May 2021 at 13:07, Sami Mujawar wrote: > > Hi Etienne, > > Please find my response inline marked [SAMI]. > > Regards, > > Sami Mujawar > > On 17/05/2021 08:40 AM, Etienne Carriere wrote: > > This change allows to build StandaloneMmPkg components for 32bit Arm > > StandaloneMm firmware. > > > > This change mainly moves AArch64/ source files to Arm/ side directory > > for several components: StandaloneMmCpu, StandaloneMmCoreEntryPoint > > and StandaloneMmMemLib. The source file is built for both 32b and 64b > > Arm targets. > > (snip) > > --- a/StandaloneMmPkg/StandaloneMmPkg.dsc > > +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc > > (snip) > > @@ -131,7 +131,7 @@ > > # module style (EDK or EDKII) specified in [Components] section. > > # > > ################################################################################################### > > -[BuildOptions.AARCH64] > > +[BuildOptions.AARCH64, BuildOptions.ARM] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv8-a+nofp -mstrict-align > [SAMI] Looks like I missed this in my previous review, sorry. > Is '-march=armv8-axxx' correct here? or we need another ARM section with > -march=armv7-a? > Can you also check if '-mstrict-align' is right and if > '-fno-stack-protector' is needed instead, please? > > I used the following setting from your edk2-platforms patch v1 4/4, file > Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc > and was able to build on a Windows host PC using > gcc-arm-9.2-2019.12-mingw-w64-i686-arm-none-eabi compiler. > [BuildOptions.ARM] > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv7-a > GCC:*_*_*_CC_FLAGS = -fno-stack-protector > [/SAMI] You are right. I saw that I build with these same directive but inherited from my edk2-platforms platform that override these. Indeed BuildOptions.ARM must be updated. I am preparing a patch v4 series. Regards, Etienne > > GCC:*_*_*_CC_FLAGS = -mstrict-align > > >