Re: [edk2] AARCH64 MMU TCR configuration questions

2015-11-09 Thread Leif Lindholm
On Mon, Nov 09, 2015 at 04:00:51PM +0800, Heyi Guo wrote: > Hi All, > > In AARCH64 MMU configuration code, sharable attribute will be set to > inner sharable when memory attribute is write back. However, I have > 2 questions about this code: > 1. Why is it set to inner sharable only when memory at

Re: [edk2] [PATCH 00/10] ARM cache maintenance cleanup

2015-11-09 Thread Leif Lindholm
CacheMaintenanceLib: disallow whole D-cache maintenance operations > ArmVirtPkg/PrePi: do not invalidate the entire data cache at startup > ArmPlatformPkg: do not invalidate the entire data cache at startup With the above addressed, for the series: Reviewed-by: Leif Lindhol

Re: [edk2] [PATCH] ArmPkg/BdsLib: Increase fallback tftp buffer size

2015-11-09 Thread Leif Lindholm
Hi Michael, On Fri, Nov 06, 2015 at 05:24:02PM +, Kinney, Michael D wrote: > Hi, > > There are macros in MdePkg/Include/Base.h that help align values and pointers > to the next boundary. > This patch could use the following: > > TftpBufferSize = ALIGN_VALUE (TftpBufferSize, SIZE_16M

Re: [edk2] ShellPkg: Network commands (ifconfig/ping) broken

2015-11-09 Thread Leif Lindholm
On Mon, Nov 09, 2015 at 09:30:03PM +0100, Laszlo Ersek wrote: > > after switching from UDK2014 to UDK2015, I noticed that the network > > commands (ifconfig / ping) don't work anymore. ifconfig just exits > > with no feedback and ping says "Config no mapping" (logical, as it is > > not possible to

Re: [edk2] ShellPkg: Network commands (ifconfig/ping) broken

2015-11-10 Thread Leif Lindholm
_CONFIG2_PROTOCOL is not available? Regards, Leif > Thanks > Laszlo > > > > > Greetings > > Johannes > > > > -Ursprüngliche Nachricht- > > Von: Laszlo Ersek [mailto:ler...@redhat.com] > > Gesendet: Dienstag, 10. November 2015 11:06 >

Re: [edk2] [PATCH] ArmPlatformPkg: bring DS-5 scripts in line with linker script changes

2015-11-10 Thread Leif Lindholm
On 10 November 2015 at 18:10, Ard Biesheuvel wrote: > On 6 November 2015 at 08:25, Ard Biesheuvel wrote: >> The ARM and AARCH64 linker scripts have recently been updated so that >> the memory layouts of the ELF and PE/COFF versions of each module are >> identical. In particular, this means that t

Re: [edk2] [PATCH] ArmPkg/ArmLib: mark all cached mappings as (inner) shareable

2015-11-12 Thread Leif Lindholm
nice code cleanup. I ran into an issue while testing this, which is why I haven't responded to this, but I've bisected it down to r18503/3a05b13, and am looking into what causes an issue with Linux booting. Regardless - this patch wasn't the cause of my issue, and it loo

Re: [edk2] [PATCH] ArmPkg/ArmLib: mark all cached mappings as (inner) shareable

2015-11-16 Thread Leif Lindholm
On Sat, Nov 14, 2015 at 08:04:19PM +0100, Ard Biesheuvel wrote: > On 14 November 2015 at 15:23, Ard Biesheuvel > wrote: > >> I have an issue with this commit too on my ARMv7 device. > >> It causes the whole system to get extremely slow. > > > > OK, thanks for the report. > > > > This means I will

Re: [edk2] [PATCH] ArmPkg/ArmV7Mmu: introduce feature PCD to map normal memory non-shareable

2015-11-16 Thread Leif Lindholm
On Mon, Nov 16, 2015 at 05:29:42PM +0100, Ard Biesheuvel wrote: > Even though mapping normal memory (inner) shareable is usually the > correct choice on coherent systems, it may be desirable in some cases > to use non-shareable mappings for normal memory, e.g., when hardware > managed coherency is

Re: [edk2] [PATCH v2] ArmPkg/ArmV7Mmu: introduce feature PCD to map normal memory non-shareable

2015-11-16 Thread Leif Lindholm
iesheuvel > --- > v2: just clear the TT_DESCRIPTOR_[PAGE|SECTION]_S_SHARED bit for all types, > rather than using the more abstract manipulation using masking and or'ing I would have been happy for you to keep the masking and or:ing, it was the switching on memory types I mind

Re: [edk2] [PATCH V2 00/12] Upstream SerialDxe from EmbeddedPkg to MdeModulePkg

2015-11-17 Thread Leif Lindholm
Hi Star, First of all - thank you for posting On Tue, Nov 17, 2015 at 07:07:16PM +0800, Star Zeng wrote: > Generally, this patch series are to upstream SerialDxe from EmbeddedPkg to > MdeModulePkg, > relatively, they are also to upstream SerialPortExtLib.h from EmbeddedPkg to > SerialPortLib.h

Re: [edk2] [PATCH v3 2/3] ArmPkg/ArmV7Mmu: make cached translation table accesses shareable

2015-11-17 Thread Leif Lindholm
Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > ArmPkg/Include/Chipset/ArmV7Mmu.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/ArmPkg/Include/Chipset/ArmV7Mmu.h > b/ArmPkg/Include/Chipset/ArmV7Mmu.h > index 4cd35bd0e36e..2374b0acd54e 1

Re: [edk2] [PATCH v3 1/3] ArmPkg/ArmV7Mmu: fix write-through translation table accesses

2015-11-17 Thread Leif Lindholm
n equals the definition of TTBR_WRITE_BACK_ALLOC > > So instead, rename it to TTBR_WRITE_THROUGH and update the definition > to reflect the name. This is an improvement on existing code, so: Reviewed-by: Leif Lindholm ...but I would have been just as happy for a patch that deleted t

Re: [edk2] [PATCH v3 0/4] improve handling of device attributes on ARM/AARCH64

2015-11-18 Thread Leif Lindholm
ter changing the device mapping attribute set to include the non-exec > attributes. (new in v2) > > Patch #3 does the same for FVP-AArch64 and RTSM-A15_MPCore. (new in v2) Thanks Ard. For 1-3: Reviewed-by: Leif Lindholm > Patch #4 makes the changes to ensure that all device mapping

Re: [edk2] [PATCH v3 0/4] improve handling of device attributes on ARM/AARCH64

2015-11-18 Thread Leif Lindholm
On Wed, Nov 18, 2015 at 11:29:15AM +, Leif Lindholm wrote: > On Wed, Nov 18, 2015 at 09:25:55AM +0100, Ard Biesheuvel wrote: > > This series fixes some issues that exist in the code with regard to how > > device > > mappings are created. According to the architecture, r

Re: [edk2] [PATCH v3 0/7] ArmPkg: ARMv7 MMU fixes

2015-11-18 Thread Leif Lindholm
atch #7 changes the TTBR memory attributes on systems without the > multiprocessing extensions. Thanks Ard, this is looking really good. For those patches that didn't already have it: Reviewed-by: Leif Lindholm > Ard Biesheuvel (7): > ArmPkg/ArmV7Mmu: fix write-through translation

Re: [edk2] [PATCH] ArmPkg/ArmV7Mmu: handle memory regions over 4 GB correctly

2015-11-18 Thread Leif Lindholm
T(MemoryRegion->Length > 0); And shouldn't this ASSERT remain at the very start of the function? Adjust on check-in if you agree. Reviewed-by: Leif Lindholm > > -- > 1.9.1 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] ArmPkg: Dead code stripping

2015-11-19 Thread Leif Lindholm
On Thu, Nov 19, 2015 at 03:45:16PM +0100, Ard Biesheuvel wrote: > (+ Leif) > > On 19 November 2015 at 15:42, Cohen, Eugene wrote: > > Ok, I created a script after all - I went ahead and created a > > script to add AREA directives whenever an exported label is found. > > > > Same question as befor

[edk2] [PATCH] ArmPkg: ArmLib: purge incorrect ArmDrainWriteBuffer () alias

2015-11-19 Thread Leif Lindholm
. Through the power of code reuse, this name slipped into the AArch64 variant as well. Expunge it from the codebase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm --- ArmPkg/Include/Library/ArmLib.h| 6 -- ArmPkg/Library/ArmLib/AArch64

Re: [edk2] [PATCH] ArmPkg: Flush cache after allocating UC memory

2015-11-20 Thread Leif Lindholm
2015 at 06:32, Heyi Guo wrote: > >>> > >>> It is implied that the memory returned from UncachedMemoryAllocationLib > >>> should have cache cleaned. So we clean and invalidate memory range after > >>> changing memory attribute to uncached. > >>

Re: [edk2] [PATCH] ArmPkg: ArmLib: purge incorrect ArmDrainWriteBuffer () alias

2015-11-20 Thread Leif Lindholm
On 20 November 2015 at 12:08, Ard Biesheuvel wrote: > On 19 November 2015 at 17:25, Leif Lindholm wrote: >> In ArmLib, there exists an alias for ArmDataSynchronizationBarrier, >> named after one of several names for the pre-ARMv6 cp15 operation that >> was for

[edk2] [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update.

2015-11-23 Thread Leif Lindholm
The binaries of ShellBinPkg are generated with ShellPkg from r18915. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm --- Patch generated with --no-binary, actual binaries available from https://git.linaro.org/people/leif.lindholm/edk2.git/shortlog/refs/heads

Re: [edk2] [PATCH 2/6] ArmLib/ArmV7Mmu: use 64-bit type for mapping region size

2015-11-23 Thread Leif Lindholm
ad. I'd argue this is a useful code clarification even without the Xen reason - RemainLength is derived from MemoryRegion->Length, which is UINT64. Reviewed-by: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPkg

Re: [edk2] [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update.

2015-11-23 Thread Leif Lindholm
linaro.org] > > Sent: Monday, November 23, 2015 5:22 AM > > To: Leif Lindholm > > Cc: edk2-devel@lists.01.org; Carsey, Jaben ; Qiu, > > Shumin > > Subject: Re: [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update. > > Importance: High > > > > O

Re: [edk2] [PATCH 1/3] Code to detect what juno revision we are running on.

2015-11-24 Thread Leif Lindholm
Hi Jeremy, Thanks for this reworked version. A few minor comment below. On Fri, Nov 20, 2015 at 04:18:51PM -0600, Jeremy Linton wrote: > The code to detect what juno revision we are running on > is fairly small. Put it in a common header, where it may be > shared by a couple modules. > > Contrib

Re: [edk2] [PATCH 3/3] ArmPlatformPkg/ArmJunoPkg: Create SMBIOS/DMI data for Juno

2015-11-24 Thread Leif Lindholm
On Fri, Nov 20, 2015 at 04:18:53PM -0600, Jeremy Linton wrote: > SMBIOS data is consumed by a wide range of enterprise applications. > > Fill in the basic requirements of the SMBIOS specification by hardcoding > the minimum required structures and data using Juno information. With > this change bo

Re: [edk2] [PATCH] ArmPlatformPkg/PrePeiCore: add missing entries to AArch64 vector table

2015-11-26 Thread Leif Lindholm
> Mark. > >> > > >> > >> Ping? > > > > Applied locally. > > > > Thanks, > > Mark. > > > > p.s. I assume you're asking Leif to apply this upstream? > > > > Well, I can apply it myself, but not without his ack (or R-b, in fact) Demands, demands :) Reviewed-by: Leif Lindholm ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [PATCH 0/3] ArmVirtPkg: add support for UEFI secure boot to 32-bit ARM

2015-11-27 Thread Leif Lindholm
ptoPkg: add softfloat dependency for ARM > ArmVirtPkg: add secure boot support to 32-bit ARM targets For 1(+2 if needed)/3: Reviewed-by: Leif Lindholm > {StdLib/LibC/Softfloat => > ArmPkg/Library/ArmSoftFloatLib}/Arm/__aeabi_dcmpeq.c| 0 > {StdLib/LibC/Softfloat =>

Re: [edk2] [PATCH 0/3] ArmVirtPkg: add support for UEFI secure boot to 32-bit ARM

2015-11-27 Thread Leif Lindholm
On Fri, Nov 27, 2015 at 01:26:51PM +0100, Ard Biesheuvel wrote: > On 27 November 2015 at 12:56, Leif Lindholm wrote: > > On Fri, Nov 27, 2015 at 09:51:50AM +0100, Ard Biesheuvel wrote: > >> Since UEFI on 32-bit ARM does not allow floating point arithmetic in > >

Re: [edk2] [PATCH 00/23] ArmPkg|ArmPlatformPkg|ArmVirtPkg: remove ArmGlobalVariableLib

2015-11-27 Thread Leif Lindholm
Spectacular :) For anywhere in the series you want/need it: Reviewed-by: Leif Lindholm As a side note, this means the pruning of pre-v7 support from EDK2 was actually completely non-controversial, since the PI spec does not permit such platforms. Thanks! / Leif _

Re: [edk2] [PATCH v2 2/4] ArmPkg/ArmSoftFloatLib: add support for RVCT

2015-11-27 Thread Leif Lindholm
is actually used by the library when built in SOFTFLOAT_FOR_GCC mode, > so we can just drop all of them. Looks plausible. If you can confirm you've tested it as well: Reviewed-by: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuve

Re: [edk2] [PATCH v2 2/4] ArmPkg/ArmSoftFloatLib: add support for RVCT

2015-11-28 Thread Leif Lindholm
On Fri, Nov 27, 2015 at 05:57:24PM +0100, Ard Biesheuvel wrote: > On 27 November 2015 at 17:09, Leif Lindholm wrote: > > On Fri, Nov 27, 2015 at 04:21:55PM +0100, Ard Biesheuvel wrote: > >> The ARM softfloat library in ArmSoftfloatLib currently does not build > >> und

Re: [edk2] [PATCH] ArmPkg/BdsLib: Send RemainingDevicePath to PXE Load File protocol

2015-12-07 Thread Leif Lindholm
parameter will be returned directly. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Heyi Guo > Cc: Leif Lindholm > Cc: Ard Biesheuvel > --- > ArmPkg/Library/BdsLib/BdsFilePath.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [edk2] [PATCH] ArmPkg/PrePeiCore: adhere to architectural stack alignment requirement

2015-12-07 Thread Leif Lindholm
r as soon as > we switch to the PEI stack. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > > This issue was masked before by the fact that some of the stack space was used > by the ArmPlat

Re: [edk2] [PATCH] ArmPlatformPkg/ArmVExpress-CTA15-A7: remove stale ArmPlatformGlobalVariable PCD

2015-12-08 Thread Leif Lindholm
ned-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc > b/ArmPlatformPkg/ArmVExpressPkg

Re: [edk2] [PATCH] ArmPkg/PrePeiCore: use explicit UINTN cast in VOID* arithmetic

2015-12-08 Thread Leif Lindholm
uvel Reviewed-by: Leif Lindholm > --- > ArmPlatformPkg/PrePeiCore/MainMPCore.c | 2 +- > ArmPlatformPkg/PrePeiCore/MainUniCore.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c > b/ArmPlatformPkg/PrePeiCo

Re: [edk2] [PATCH] ArmPkg/ArmV7Mmu: prefer non shareable memory on non-coherent hardware

2015-12-08 Thread Leif Lindholm
On Tue, Dec 08, 2015 at 03:03:05PM +0100, Ard Biesheuvel wrote: > Commit SVN r18778 made all mappings of normal memory (inner) shareable, > even on hardware that implements shareability as uncached accesses. > The original concerns that prompted the change, regarding coherent DMA > and virt guests

Re: [edk2] [PATCH] ArmPkg: update InvalidateInstructionCacheRange to flush only to PoU

2015-12-08 Thread Leif Lindholm
On Tue, Dec 08, 2015 at 04:19:47PM +0100, Ard Biesheuvel wrote: > On 8 December 2015 at 14:05, Cohen, Eugene wrote: > > Reviewed-by: Eugene Cohen > > > > Thanks Eugene > > @Leif: any concerns? None - just stuck in a meeting :) Thanks. Reviewed-by: Leif Lindholm

Re: [edk2] [PATCH] ArmPlatformPkg: Fix stack switch bug after commit 7945b29

2015-12-10 Thread Leif Lindholm
it may cause fatal data corruption like PHIT HOB lost and stack > pointer unaligned. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Heyi Guo > Cc: Leif Lindholm > Cc: Ard Biesheuvel Many thanks for this fix - committed as SVN r19213. / Leif >

Re: [edk2] [PATCH 0/5] ArmPlatformPkg: fix gArmMpCoreInfoPpiGuid declaration

2015-12-14 Thread Leif Lindholm
dule local var > ArmPlatformPkg/RTSM: use declared PPI rather than module local var For the series: Reviewed-by: Leif Lindholm > ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJuno.c > | 4 +--- > ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoL

Re: [edk2] [PATCH] ArmPlatformPkg/Sec: fix return_from_exception code and comment

2015-12-14 Thread Leif Lindholm
y nor at the same time. > > So bring the GCC version in line with the RVCT version, and at the > same time, deobfuscate the comment. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- Looks sensible: Reviewed-by: L

Re: [edk2] [PATCH 1/5] ArmPkg: use unified asm syntax for CLANG

2015-12-14 Thread Leif Lindholm
ent 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S| 9 > + Since we've killed pre-ARMv7 support, should we not now also kill ArmPkg/Drivers/CpuDxe/ArmV4/ and rename ArmPkg/Drivers/CpuDxe/ArmV6/ Arm? Apa

Re: [edk2] [PATCH 2/5] ArmPkg/CompilerIntrinsicsLib: add GCC version of __aeabi_memset()

2015-12-14 Thread Leif Lindholm
On Mon, Dec 14, 2015 at 05:25:03PM +0100, Ard Biesheuvel wrote: > CLANG for ARM may emit calls to __aeabi_memset(), which is subtly different > from the default memset() [arguments 2 and 3 are reversed] > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel >

Re: [edk2] [PATCH 3/5] ArmPkg/ArmV7Lib: add CLANG alternative for FPEXC access

2015-12-14 Thread Leif Lindholm
ng__ > is defined. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Oh dear... Reviewed-by: Leif Lindholm > --- > ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S | 4 > 1 file changed, 4 insertions(+) > > diff --git a/ArmPkg/Libr

Re: [edk2] [PATCH 4/5] ArmPkg/ArmSoftfloatLib: restrict -fno-tree-vrp option to GCC46

2015-12-14 Thread Leif Lindholm
On Mon, Dec 14, 2015 at 05:25:05PM +0100, Ard Biesheuvel wrote: > The -fno-tree-vrp option is not required for GCC 4.7 or later, and is not > supported by CLANG. So restrict its use to GCC 4.6, which is the oldest > version we support for ARM. Can you provide a reference to the discussion declarin

Re: [edk2] [PATCH 5/5] BaseTools ARM: add CLANG35 support

2015-12-14 Thread Leif Lindholm
not support it, and uses '-mllvm > -marm-use-movt=0' instead. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Looks sensible: Reviewed-by: Leif Lindholm > --- > BaseTools/Conf/tools_def.template | 28 +

Re: [edk2] [PATCH] ArmPkg/CpuDxe: drop ARMv4 exception handling code

2015-12-15 Thread Leif Lindholm
ted-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Thanks! Reviewed-by: Leif Lindholm > --- > ArmPkg/Drivers/CpuDxe/{ArmV6 => Arm}/Exception.c | 0 > ArmPkg/Drivers/CpuDxe/{ArmV6 => Arm}/ExceptionSupport.S | 0 > ArmPkg/Drivers/C

Re: [edk2] [PATCH v2] ArmPkg/ArmV7Mmu: prefer non shareable memory on non-coherent hardware

2015-12-15 Thread Leif Lindholm
ff-by: Ard Biesheuvel > > --- > > v2: use symbolic constants for the various shift and mask values > > default to shareable on unexpected values, but ASSERT() as well > > > > Any more comment on this version? Thanks If Eugene is happy - for my pa

Re: [edk2] [PATCH 1/3] ArmPkg/ArmGic: fix bug in GICv3 distributor configuration

2015-12-15 Thread Leif Lindholm
>} > } > -- > 1.9.1 So, this is a bugfix, and you shouldn't have to fix the world for it, but I dislike the magic hex values. Maybe time to make a note to go back and clean this stuff up later on. Reviewed-by: Leif Lindholm / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [PATCH 2/3] ArmVExpressPkg/ArmVExpress-FVP-AArch64: run GICv3 in v3 mode

2015-12-15 Thread Leif Lindholm
ned-off-by: Ard Biesheuvel I think there could be interaction issues with certain versions of ARM Trusted Firmware, but this just flips the default, and I'm happy for anyone running into issues to have to add an option for their platform. Reviewed-by: Leif Lindholm > --- > Arm

Re: [edk2] [PATCH 3/3] ArmPkg/ArmGic: remove GICv3 legacy override

2015-12-15 Thread Leif Lindholm
On Thu, Dec 03, 2015 at 02:58:38PM +0100, Ard Biesheuvel wrote: > The need for a v2 legacy override to drive a GICv3 in v2 mode is no > longer necessary, now that the code that enabled the GIC distributor no > longer inadvertently kicks a v2 capable GICv3 into v2 mode. So remove > the PCD and all r

Re: [edk2] [PATCH v2 2/5] ArmPkg/CompilerIntrinsicsLib: add GCC version of __aeabi_memset()

2015-12-15 Thread Leif Lindholm
Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/memset.S > b/ArmPkg/Library/CompilerI

Re: [edk2] [PATCH v2 4/5] ArmPkg/ArmSoftfloatLib: restrict -fno-tree-vrp option to GCC46

2015-12-15 Thread Leif Lindholm
On Tue, Dec 15, 2015 at 03:24:55PM +0100, Ard Biesheuvel wrote: > The -fno-tree-vrp option is not required for GCC 4.7 or later, and is not > supported by CLANG. So restrict its use to GCC 4.6, which is the oldest > version we support for ARM. > > Contributed-under: TianoCore Contribution Agreemen

Re: [edk2] [PATCH v2 4/5] ArmPkg/ArmSoftfloatLib: restrict -fno-tree-vrp option to GCC46

2015-12-15 Thread Leif Lindholm
On Tue, Dec 15, 2015 at 03:50:43PM +0100, Ard Biesheuvel wrote: > On 15 December 2015 at 15:47, Leif Lindholm wrote: > > On Tue, Dec 15, 2015 at 03:24:55PM +0100, Ard Biesheuvel wrote: > >> The -fno-tree-vrp option is not required for GCC 4.7 or later, and is not > >

Re: [edk2] [PATCH] ArmPkg: rewrite vector table population macros

2015-12-16 Thread Leif Lindholm
t; > > > Do we overwrite this? If not, it could just be "ax" rather than "awx". > > > > > > > Ah yes, I meant "ax" not "aw" > > Ok. With that: > > Acked-by: Mark Rutland If Mark's happy: Reviewed-by: Leif Lindholm / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [Patch] NetworkPkg: Fix suspicious dereference of pointer before NULL check

2015-12-27 Thread Leif Lindholm
Hi Jiaxin, On Thu, Dec 24, 2015 at 02:16:53PM +0800, Jiaxin Wu wrote: > This patch is used to fix suspicious dereference of pointer before > NULL check in IScsiDxe driver. So, I realise this has already been committed, and I don't see anything wrong with the code - but the commit message does not

Re: [edk2] [PATCH 3/6] BaseTools AARCH64: reduce tiny model function alignment

2015-12-27 Thread Leif Lindholm
On Thu, Dec 24, 2015 at 02:03:16PM +0100, Ard Biesheuvel wrote: > The tiny code model for AARCH64 is the most efficient model, since its > symbol references are relative via a single 32-bit ADR instruction. This > gives us a range of only +/- 1 MB, but this is sufficient for the vast > majority of

Re: [edk2] [PATCH 6/6] BaseTools AARCH64: add -mstrict-align to all AARCH64 GCC flavors

2015-12-27 Thread Leif Lindholm
turn the MMU on. > > So move the -mstrict-align compiler switch to the shared define for > all AARCH64 GCC versions. Happy with the change, but could you tweak the commit message so it does not suggest REV instructions can cause unaligned accesses? With that: Reviewed-by: Leif Lindholm

Re: [edk2] [PATCH 1/6] BaseTools CLANG35: use GNU target triplets explicitly

2015-12-27 Thread Leif Lindholm
On Thu, Dec 24, 2015 at 02:03:14PM +0100, Ard Biesheuvel wrote: > Since we are combining Clang with the GNU linker, make that explicit in > the target triplet. This affects certain builtin defines and other compiler > behavior that may be unspecified otherwise. Are there any potential conflicts he

Re: [edk2] [PATCH 3/6] BaseTools AARCH64: reduce tiny model function alignment

2015-12-27 Thread Leif Lindholm
On Sun, Dec 27, 2015 at 08:02:34PM +0100, Ard Biesheuvel wrote: > On 27 December 2015 at 18:58, Leif Lindholm wrote: > > On Thu, Dec 24, 2015 at 02:03:16PM +0100, Ard Biesheuvel wrote: > >> The tiny code model for AARCH64 is the most efficient model, since its > >> sym

Re: [edk2] [PATCH 1/6] BaseTools CLANG35: use GNU target triplets explicitly

2015-12-27 Thread Leif Lindholm
On Sun, Dec 27, 2015 at 08:08:27PM +0100, Ard Biesheuvel wrote: > On 27 December 2015 at 19:06, Leif Lindholm wrote: > > On Thu, Dec 24, 2015 at 02:03:14PM +0100, Ard Biesheuvel wrote: > >> Since we are combining Clang with the GNU linker, make that explicit in > >&g

Re: [edk2] [Patch] NetworkPkg: Fix suspicious dereference of pointer before NULL check

2015-12-31 Thread Leif Lindholm
ve - replacing the additional test and the ASSERT() with a comment? Regards, Leif > Thanks. > Jiaxin > > -Original Message- > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > Sent: Monday, December 28, 2015 12:48 AM > To: Wu, Jiaxin > Cc: edk2-devel@lists.

Re: [edk2] [PATCH 3/6] BaseTools AARCH64: reduce tiny model function alignment

2015-12-31 Thread Leif Lindholm
On Thu, Dec 31, 2015 at 12:01:15PM +0100, Ard Biesheuvel wrote: > >>> > My GCC manpage claims that > >>> > "-Os disables the following optimization flags: -falign-functions ..." > >>> > and -Os is set in GCC_ALL_CC_FLAGS, and as far as I can see not > >>> > overridden for AARCH64, except for DEBUG

Re: [edk2] [PATCH v2 1/5] BaseTools CLANG35: use GNU target triplets explicitly

2015-12-31 Thread Leif Lindholm
ux-gnu in subject and message on commit: Reviewed-by: Leif Lindholm (there are other possible gnu-triplets, and even though I'd be surprised to learn of someone building AARCH64 UEFI on kfreebsd-gnu, I wouldn't want to exclude them :) > Contributed-under: TianoCore Contribution Agreeme

Re: [edk2] [PATCH v2 2/5] BaseTools CLANG35: use -target in PP flags as well

2015-12-31 Thread Leif Lindholm
n Agreement 1.0 > Signed-off-by: Ard Biesheuvel > Reviewed-by: Liming Gao Oh yeah - important fix. If you need it: Reviewed-by: Leif Lindholm > --- > BaseTools/Conf/tools_def.template | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/Ba

Re: [edk2] [PATCH v2 3/5] BaseTools AARCH64: move DEBUG GCC49 to the small code model

2015-12-31 Thread Leif Lindholm
: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Makes sense to me. Reviewed-by: Leif Lindholm > --- > BaseTools/Conf/tools_def.template | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/BaseTools/Conf/tools_def.tem

Re: [edk2] [PATCH v2 4/5] ShellPkg AARCH64: remove DEBUG BuildOptions override

2015-12-31 Thread Leif Lindholm
-by: Liming Gao Nice to get rid of this, thanks! Reviewed-by: Leif Lindholm > --- > ShellPkg/Application/Shell/Shell.inf | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/ShellPkg/Application/Shell/Shell.inf > b/ShellPkg/Application/Shell/Shell.inf > in

Re: [edk2] [PATCH 1/2] ArmPkg/DefaultExceptionHandlerLib: use deadloop rather than ASSERT

2016-05-09 Thread Leif Lindholm
On Mon, May 09, 2016 at 05:15:11PM +0200, Ard Biesheuvel wrote: > I feel for you, brother :-) > > > Anyway, more to the point. The guidance I got from Mike Kinney for the > > exact same kind of issue was: add both the assert and the dead loop. > > This way, in a debug build, the ASSERT() will prov

Re: [edk2] [PATCH 1/5] ArmPkg/ArmDmaLib: deal with NULL return value of UncachedAllocatePages ()

2016-05-09 Thread Leif Lindholm
t; returning EFI_SUCCESS. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel A clear fix which could go in separate from the rest of the series. Reviewed-by: Leif Lindholm > --- > ArmPkg/Library/ArmDmaLib/ArmDmaLib.c | 12 ++-- > 1 fil

Re: [edk2] [PATCH 2/5] ArmPkg/ArmDmaLib: consistently use 'gCacheAlignment - 1' as alignment mask

2016-05-09 Thread Leif Lindholm
On Tue, Apr 19, 2016 at 04:55:31PM +0200, Ard Biesheuvel wrote: > We manage to use both an AND operation with 'gCacheAlignment - 1' and a > modulo operation with 'gCacheAlignment' in the same compound if statement. > Since gCacheAlignment is a global of which the compiler cannot guarantee > that it

Re: [edk2] [PATCH 3/5] ArmPkg/ArmDmaLib: interpret GCD attributes as a bit field

2016-05-09 Thread Leif Lindholm
t explicitly against the flags EFI_MEMORY_WB and EFI_MEMORY_WT, > which must be set if the region may be mapped with cacheable attributes. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Whoops. Reviewed-by: Leif Lindholm > --- > ArmPkg

Re: [edk2] [PATCH 4/5] ArmPkg/ArmDmaLib: reject consistent DMA mappings of cached memory

2016-05-09 Thread Leif Lindholm
On Tue, Apr 19, 2016 at 04:55:33PM +0200, Ard Biesheuvel wrote: > DmaMap () operations of type MapOperationBusMasterCommonBuffer should > return a mapping that is coherent between the CPU and the device. For > this reason, the API only allows DmaMap () to be called with this operation > type if the

Re: [edk2] [PATCH 5/5] ArmPkg/ArmDmaLib: do not remap arbitrary memory regions as uncached

2016-05-09 Thread Leif Lindholm
; controller, we must ensure the memory is uncached > - Status = gDS->SetMemorySpaceAttributes (*DeviceAddress & ~(BASE_4KB - > 1), ALIGN_VALUE (*NumberOfBytes, BASE_4KB), EFI_MEMORY_WC); > - ASSERT_EFI_ERROR (Status); > -} I would be interested in knowing what p

Re: [edk2] [PATCH] ArmPkg/ArmDmaLib: assert that consistent mappings are uncached

2016-05-09 Thread Leif Lindholm
ent. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Looks sane, thanks. Reviewed-by: Leif Lindholm > --- > > This applies on top of the ArmDmaLib patches that I sent out yesterday. > Based on the original code which contained some dodgy

Re: [edk2] [PATCH] ArmPkg/AArch64Mmu: don't let table entries inherit XN permission bits

2016-05-09 Thread Leif Lindholm
appropriate > bits at the lowest level. > > So drop the code that sets the UXN/PXN/XN bits on the table entries. > > Reported-by: "Oliyil Kunnil, Vishal" > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Reviewed-by: Le

Re: [edk2] [PATCH 2/5] ArmPkg/ArmDmaLib: consistently use 'gCacheAlignment - 1' as alignment mask

2016-05-09 Thread Leif Lindholm
On Mon, May 09, 2016 at 06:42:39PM +0200, Ard Biesheuvel wrote: > On 9 May 2016 at 18:22, Leif Lindholm wrote: > > On Tue, Apr 19, 2016 at 04:55:31PM +0200, Ard Biesheuvel wrote: > >> We manage to use both an AND operation with 'gCacheAlignment - 1' and

Re: [edk2] [PATCH 4/5] ArmPkg/ArmDmaLib: reject consistent DMA mappings of cached memory

2016-05-09 Thread Leif Lindholm
On Mon, May 09, 2016 at 06:44:42PM +0200, Ard Biesheuvel wrote: > On 9 May 2016 at 18:37, Leif Lindholm wrote: > > On Tue, Apr 19, 2016 at 04:55:33PM +0200, Ard Biesheuvel wrote: > >> DmaMap () operations of type MapOperationBusMasterCommonBuffer should > >> return

Re: [edk2] [RFC] EDK2 Platforms Proposal

2016-05-10 Thread Leif Lindholm
Hi Mike, Apologies for delay in responding, this was a topic I wanted to leave some time to think about. On Tue, May 03, 2016 at 04:30:36PM +, Kinney, Michael D wrote: > Similar to edk2-staging, we also have a need to manage platforms > that have been ported to edk2. Jordan has created a rep

Re: [edk2] [PATCH 4/5] ArmPkg/ArmDmaLib: reject consistent DMA mappings of cached memory

2016-05-10 Thread Leif Lindholm
On Tue, May 10, 2016 at 12:58:08PM +0200, Ard Biesheuvel wrote: > On 9 May 2016 at 22:17, Leif Lindholm wrote: > > On Mon, May 09, 2016 at 06:44:42PM +0200, Ard Biesheuvel wrote: > >> On 9 May 2016 at 18:37, Leif Lindholm wrote: > >> > On Tue, Apr 19, 2016 at 04

Re: [edk2] [PATCH 1/2] ArmPlatformPkg/PL031RealTimeClockLib: don't clobber gRT table

2016-05-11 Thread Leif Lindholm
t; - // Setup the setters and getters > > - gRT->GetTime = LibGetTime; > > - gRT->SetTime = LibSetTime; > > - gRT->GetWakeupTime = LibGetWakeupTime; > > - gRT->SetWakeupTime = LibSetWakeupTime; > > - > >mRT = gRT; > > > >// Ins

Re: [edk2] [PATCH] ArmPkg/PlatformBootManagerLib: implement new generic version

2016-05-12 Thread Leif Lindholm
//~ &Timeout); >>> + //~ if (!EFI_ERROR (Status)) { >>> +//~ PcdSet16 (PcdPlatformBootTimeOut, Timeout); >>> + //~ } >> >> Forgotten or intentional? >> > > Forgotten. > > I discovered that this

Re: [edk2] [PATCH v2] ArmPkg/ArmLib: don't invalidate entire I-cache on range operation

2016-05-12 Thread Leif Lindholm
. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > v2: > - use correct stride for Icache maintenance by VA > - issue an ISB after completing the Icache maintenance > > ArmPkg/Include/Library/

[edk2] [RFC] MdePkg: BaseLib: don't use aligned pointers for unaligned accessors

2016-05-12 Thread Leif Lindholm
* pointers instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm --- Built and tested for ArmVirtPkg for AArch64/ARM DEBUG/RELEASE. Build tested only for OvmfPkg for Ia32/X64 DEBUG/RELEASE. Not tested at all for IPF. I am not entirely convinced by the

Re: [edk2] [RFC] MdePkg: BaseLib: don't use aligned pointers for unaligned accessors

2016-05-12 Thread Leif Lindholm
27;t warn me about that :) Regards, Leif > Thanks, > > Mike > > > -Original Message- > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > > Sent: Thursday, May 12, 2016 3:22 PM > > To: edk2-devel@lists.01.org > > Cc: Kinney, Michael D ; Ga

Re: [edk2] [RFC] MdePkg: BaseLib: don't use aligned pointers for unaligned accessors

2016-05-23 Thread Leif Lindholm
implementation however deprives it of the information it needs to guarantee it is able to perform its work correctly. Regards, Leif > Thanks, > > Mike > > > -Original Message- > > From: af...@apple.com [mailto:af...@apple.com] > > Sent: Thursday, May 12, 2016 4

Re: [edk2] [RFC] EDK2 Platforms Proposal

2016-05-23 Thread Leif Lindholm
Branch for new platform port > or a port that uses a stable > edk2/udk release. > > Thanks, > > Mike > > > > -Original Message- > > From: Kinney, Michael D > > Sent: Tuesday, May 10, 2016 8:52

Re: [edk2] [RFC] EDK2 Platforms Proposal

2016-06-13 Thread Leif Lindholm
> Let's continue to refine the set of proposals here to address all of > the important issues you have raised. > > Best regards, > > Mike > > > -Original Message- > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > > Sent: Tuesday, May 10, 2

Re: [edk2] [RFC] EDK2 Platforms Proposal

2016-06-15 Thread Leif Lindholm
Comments inline. On Tue, Jun 14, 2016 at 11:12:20PM +, Kinney, Michael D wrote: > Leif, > > Responses below. > > Mike > > > -Original Message- > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > > Sent: Monday, June 13, 2016 9:32 AM >

Re: [edk2] [PATCH v2] ArmPkg/ArmLib: avoid cache maintenance in PEIMs when executing in place

2016-06-15 Thread Leif Lindholm
nance in its constructor if the module is shadowed in RAM. To avoid > performing the cache maintenance if the MMU code is not used to begin with, > check that explicitly in the constructor. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel

Re: [edk2] [PATCH 4/4] ArmPkg/ArmMmuLib: add PEI specific version of ArmMmuLib

2016-06-17 Thread Leif Lindholm
On Thu, Jun 16, 2016 at 12:29:30PM +0200, Ard Biesheuvel wrote: > This introduces a special version of ArmMmuLib for PEIMs that takes care > only to perform cache maintenance on the live entry replacement routine > if the module is not executing in place. Not only is such cache maintenance > unnece

Re: [edk2] [PATCH 0/4] ArmVirtPkg: add empty varstore definition to ArmVirtQemu

2016-06-22 Thread Leif Lindholm
orFlashDxe: accept both non-secure and secure varstore > GUIDs For 1/4: Reviewed-by: Leif Lindholm > ArmVirtPkg/ArmVirtQemu: switch secure boot build to NorFlashDxe > ArmPlatformPkg/NorFlashAuthenticatedDxe: remove this obsolete module For 3/4: Reviewed-by: Leif Lindholm &

Re: [edk2] [PATCH] ArmPkg/ArmGicV3Dxe: configure all interrupts as non-secure Group-1

2016-06-23 Thread Leif Lindholm
;> --- a/ArmPkg/Include/Library/ArmGicLib.h > >> +++ b/ArmPkg/Include/Library/ArmGicLib.h > >> @@ -47,8 +47,9 @@ > >> // GICv3 specific registers > >> #define ARM_GICD_IROUTER0x6100 // Interrupt Routing Registers > >> > >> -// the Affini

Re: [edk2] [RFC V2] Proposal to organize packages into directories

2016-06-23 Thread Leif Lindholm
On Tue, Jun 21, 2016 at 12:11:14PM -0700, Andrew Fish wrote: > > > On Jun 20, 2016, at 5:58 PM, Jordan Justen > > wrote: > > > > On 2016-06-20 17:08:58, Kinney, Michael D wrote: > >> Jordan, > >> > >> There is a "Driver" directory in the proposal and the types of > >> components you refer to

Re: [edk2] [RFC V3.1] Proposal to organize packages into directories

2016-06-26 Thread Leif Lindholm
So, I managed to miss this thread for the longest time ... sorry about the late comments. On Fri, Jun 17, 2016 at 10:51:47PM +, Kinney, Michael D wrote: > Hello, > > Please review this one. I missed a few updates to the dir changes > in edk2/master near the bottom. > > I have looked through

Re: [edk2] [RFC V3.1] Proposal to organize packages into directories

2016-06-27 Thread Leif Lindholm
On Mon, Jun 27, 2016 at 03:50:02PM +0100, Ryan Harkin wrote: > >> Silicon > >> Arm > >> ArmPkg > > > > Much of ArmPkg should probably move across into UefiCpuPkg and > > MdeModulePkg over time, but this is probably the best thing to do for > > the restructuring. > > > >> ArmJunoPk

Re: [edk2] [PATCH 1/2] ArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) last

2016-07-01 Thread Leif Lindholm
ntributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c > | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [edk2] [PATCH 2/2] ArmPkg/CpuDxe: unmask SErrors in DEBUG builds

2016-07-01 Thread Leif Lindholm
gt; wait for the OS to take it when it unmasks them, especially since the current > arm64/Linux implementation simply panics in that case. So unmask them when > ArmCpuDxe loads. So, I agree with this patch: Reviewed-by: Leif Lindholm But if we're doing this, I wonder if we should not

Re: [edk2] [PATCH 2/2] ArmPkg/CpuDxe: unmask SErrors in DEBUG builds

2016-07-01 Thread Leif Lindholm
On Fri, Jul 01, 2016 at 01:21:36PM +0200, Ard Biesheuvel wrote: > On 1 July 2016 at 13:03, Leif Lindholm wrote: > > On Fri, Jul 01, 2016 at 12:53:13PM +0200, Ard Biesheuvel wrote: > >> SErrors (formerly called asynchronous aborts) are a distinct class of > >> exception

Re: [edk2] [PATCH v2 0/4] ArmPkg: refactor MMU handling routines into separate ArmMmuLib

2016-07-04 Thread Leif Lindholm
mVirtXen to switch to > the new ArmMmuLib (#3) > - added tags from Laszlo and Star (#3) > - dropped ArmLib reference from DxeIp l(#3) [*] > - clarified comment (#4) For the series: Reviewed-by: Leif Lindholm > [*] I have taken the liberty to keep Star's R-b on patch #3 sin

Re: [edk2] [PATCH v2 0/4] ArmPkg: refactor MMU handling routines into separate ArmMmuLib

2016-07-06 Thread Leif Lindholm
On Wed, Jul 06, 2016 at 02:35:30PM +0200, Ard Biesheuvel wrote: > On 4 July 2016 at 16:32, Leif Lindholm wrote: > > On Fri, Jul 01, 2016 at 05:43:52PM +0200, Ard Biesheuvel wrote: > >> The MMU routines are only used by a small subset of the users of ArmLib. > >> In

  1   2   3   4   5   6   7   8   9   10   >