Message ID | 20171116143546.2409-1-ard.biesheuvel@linaro.org |
---|---|
State | Accepted |
Commit | 302e8eda3b2f848e54bd21d0a8b2e5d8b891bffd |
Headers | show |
Series | [edk2] ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib | expand |
On Thu, Nov 16, 2017 at 02:35:46PM +0000, Ard Biesheuvel wrote: > Currently, each ARM platform built with RVCT that uses ArmHvcLib > or ArmSmcLib needs to specify a CPU target that implements both the > security and virtualization extensions, so that the assembler does > not choke on the 'hvc' and 'smc' instructions in ArmHvcLib/ArmSvcLib. > Let's move these overrides into the module .INFs so we can lift this > requirement at the platform side. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > ArmPkg/ArmPkg.dsc | 2 -- > ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf | 3 +++ > ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf | 3 +++ > 3 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc > index 382e99868453..622720ab2aef 100644 > --- a/ArmPkg/ArmPkg.dsc > +++ b/ArmPkg/ArmPkg.dsc > @@ -33,8 +33,6 @@ [Defines] > [BuildOptions] > XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 > GCC:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon > - # We use A15 to get the Secure and Virtualization extensions > - RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 > > RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG > *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES > diff --git a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf > index 92efac5741c8..d046ef3ba253 100644 > --- a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf > +++ b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf > @@ -30,3 +30,6 @@ [Sources.AARCH64] > [Packages] > MdePkg/MdePkg.dec > ArmPkg/ArmPkg.dec > + > +[BuildOptions] > + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 > diff --git a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf > index 9f9ba729967c..0aa64d467129 100644 > --- a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf > +++ b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf > @@ -29,3 +29,6 @@ [Sources.AARCH64] > [Packages] > MdePkg/MdePkg.dec > ArmPkg/ArmPkg.dec > + > +[BuildOptions] > + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 For this one, you should be able to get away with --cpu 7-A.security rather than listing a random CPU that happens to implement the required extension. This on the surface minor cleanup makes me unreasonably happy - thanks. So if you can fold that in: Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> For whatever reason, a --cpu 7-A.virtualization never seems to have been implemented... / Leif _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 16 November 2017 at 15:44, Leif Lindholm <leif.lindholm@linaro.org> wrote: > On Thu, Nov 16, 2017 at 02:35:46PM +0000, Ard Biesheuvel wrote: >> Currently, each ARM platform built with RVCT that uses ArmHvcLib >> or ArmSmcLib needs to specify a CPU target that implements both the >> security and virtualization extensions, so that the assembler does >> not choke on the 'hvc' and 'smc' instructions in ArmHvcLib/ArmSvcLib. >> Let's move these overrides into the module .INFs so we can lift this >> requirement at the platform side. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> --- >> ArmPkg/ArmPkg.dsc | 2 -- >> ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf | 3 +++ >> ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf | 3 +++ >> 3 files changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc >> index 382e99868453..622720ab2aef 100644 >> --- a/ArmPkg/ArmPkg.dsc >> +++ b/ArmPkg/ArmPkg.dsc >> @@ -33,8 +33,6 @@ [Defines] >> [BuildOptions] >> XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 >> GCC:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon >> - # We use A15 to get the Secure and Virtualization extensions >> - RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 >> >> RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG >> *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES >> diff --git a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf >> index 92efac5741c8..d046ef3ba253 100644 >> --- a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf >> +++ b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf >> @@ -30,3 +30,6 @@ [Sources.AARCH64] >> [Packages] >> MdePkg/MdePkg.dec >> ArmPkg/ArmPkg.dec >> + >> +[BuildOptions] >> + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 >> diff --git a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf >> index 9f9ba729967c..0aa64d467129 100644 >> --- a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf >> +++ b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf >> @@ -29,3 +29,6 @@ [Sources.AARCH64] >> [Packages] >> MdePkg/MdePkg.dec >> ArmPkg/ArmPkg.dec >> + >> +[BuildOptions] >> + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 > > For this one, you should be able to get away with --cpu 7-A.security > rather than listing a random CPU that happens to implement the > required extension. > > This on the surface minor cleanup makes me unreasonably happy - thanks. > So if you can fold that in: > Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> > > For whatever reason, a --cpu 7-A.virtualization never seems to have > been implemented... > Thanks Pushed as 302e8eda3b2f848e54bd21d0a8b2e5d8b891bffd _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 382e99868453..622720ab2aef 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -33,8 +33,6 @@ [Defines] [BuildOptions] XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 GCC:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon - # We use A15 to get the Secure and Virtualization extensions - RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES diff --git a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf index 92efac5741c8..d046ef3ba253 100644 --- a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf +++ b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf @@ -30,3 +30,6 @@ [Sources.AARCH64] [Packages] MdePkg/MdePkg.dec ArmPkg/ArmPkg.dec + +[BuildOptions] + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 diff --git a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf index 9f9ba729967c..0aa64d467129 100644 --- a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf +++ b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf @@ -29,3 +29,6 @@ [Sources.AARCH64] [Packages] MdePkg/MdePkg.dec ArmPkg/ArmPkg.dec + +[BuildOptions] + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15
Currently, each ARM platform built with RVCT that uses ArmHvcLib or ArmSmcLib needs to specify a CPU target that implements both the security and virtualization extensions, so that the assembler does not choke on the 'hvc' and 'smc' instructions in ArmHvcLib/ArmSvcLib. Let's move these overrides into the module .INFs so we can lift this requirement at the platform side. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPkg/ArmPkg.dsc | 2 -- ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf | 3 +++ ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel