* [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() @ 2016-08-31 9:07 Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib Ard Biesheuvel ` (3 more replies) 0 siblings, 4 replies; 10+ messages in thread From: Ard Biesheuvel @ 2016-08-31 9:07 UTC (permalink / raw) To: edk2-devel, leif.lindholm; +Cc: Ard Biesheuvel The BaseMemoryLib API has recently been extended with IsZeroGuid() and IsZeroBuffer(), so copy the generic implementations into the ArmPkg version of this library. Ard Biesheuvel (3): ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function ArmPkg/ArmPkg.dsc | 2 - ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} | 28 ++- ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++ ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 +++ ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++ ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- 26 files changed, 91 insertions(+), 1921 deletions(-) rename ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} (53%) delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c -- 2.7.4 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib 2016-08-31 9:07 [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Ard Biesheuvel @ 2016-08-31 9:07 ` Ard Biesheuvel 2016-09-01 12:58 ` Leif Lindholm 2016-08-31 9:07 ` [PATCH 2/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function Ard Biesheuvel ` (2 subsequent siblings) 3 siblings, 1 reply; 10+ messages in thread From: Ard Biesheuvel @ 2016-08-31 9:07 UTC (permalink / raw) To: edk2-devel, leif.lindholm; +Cc: Ard Biesheuvel The BaseMemoryLibVstm implementation of BaseMemoryLib is ARM only, uses the NEON register file despite the fact that the UEFI spec does not allow it, and is currently not used anywhere. So remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPkg/ArmPkg.dsc | 2 - ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c | 52 ---- 22 files changed, 1960 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 7b278cdd4124..6f9fc661fbdc 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -150,8 +150,6 @@ [Components.common] ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf [Components.ARM] - ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf - ArmPkg/Drivers/ArmCpuLib/ArmCortexA8Lib/ArmCortexA8Lib.inf ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S deleted file mode 100644 index 69de4c1fd48e..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S +++ /dev/null @@ -1,112 +0,0 @@ -#------------------------------------------------------------------------------ -# -# CopyMem() worker for ARM -# -# This file started out as C code that did 64 bit moves if the buffer was -# 32-bit aligned, else it does a byte copy. It also does a byte copy for -# any trailing bytes. Update using VSTM/SLDM to do 128 byte copies. -# -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -#------------------------------------------------------------------------------ - -#include <AsmMacroIoLib.h> - -/** - Copy Length bytes from Source to Destination. Overlap is OK. - - This implementation - - @param Destination Target of copy - @param Source Place to copy from - @param Length Number of bytes to copy - - @return Destination - - -VOID * -EFIAPI -InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ) -**/ -ASM_FUNC(InternalMemCopyMem) - stmfd sp!, {r4, r9, lr} - tst r0, #3 - mov r4, r0 - mov r9, r0 - mov ip, r2 - mov lr, r1 - movne r0, #0 - bne L4 - tst r1, #3 - movne r3, #0 - moveq r3, #1 - cmp r2, #127 - movls r0, #0 - andhi r0, r3, #1 -L4: - cmp r4, r1 - bcc L26 - bls L7 - rsb r3, r1, r4 - cmp ip, r3 - bcc L26 - cmp ip, #0 - beq L7 - add r9, r4, ip - add lr, ip, r1 - b L16 -L29: - sub ip, ip, #8 - cmp ip, #7 - ldrd r2, [lr, #-8]! - movls r0, #0 - cmp ip, #0 - strd r2, [r9, #-8]! - beq L7 -L16: - cmp r0, #0 - bne L29 - sub r3, lr, #1 - sub ip, ip, #1 - ldrb r3, [r3, #0] - sub r2, r9, #1 - cmp ip, #0 - sub r9, r9, #1 - sub lr, lr, #1 - strb r3, [r2, #0] - bne L16 - b L7 -L11: - ldrb r3, [lr], #1 - sub ip, ip, #1 - strb r3, [r9], #1 -L26: - cmp ip, #0 - beq L7 -L30: - cmp r0, #0 - beq L11 - sub ip, ip, #128 // 32 - cmp ip, #127 // 31 - vldm lr!, {d0-d15} - movls r0, #0 - cmp ip, #0 - vstm r9!, {d0-d15} - bne L30 -L7: - dsb - mov r0, r4 - ldmfd sp!, {r4, r9, pc} - - diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm deleted file mode 100644 index 5afd1e5f2bc1..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm +++ /dev/null @@ -1,114 +0,0 @@ -;------------------------------------------------------------------------------ -; -; CopyMem() worker for ARM -; -; This file started out as C code that did 64 bit moves if the buffer was -; 32-bit aligned, else it does a byte copy. It also does a byte copy for -; any trailing bytes. Update using VSTM/SLDM to do 128 byte copies. -; -; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> -; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -;------------------------------------------------------------------------------ - -/** - Copy Length bytes from Source to Destination. Overlap is OK. - - This implementation - - @param Destination Target of copy - @param Source Place to copy from - @param Length Number of bytes to copy - - @return Destination - - -VOID * -EFIAPI -InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ) -**/ - - INCLUDE AsmMacroExport.inc - - RVCT_ASM_EXPORT InternalMemCopyMem - stmfd sp!, {r4, r9, lr} - tst r0, #3 - mov r4, r0 - mov r9, r0 - mov ip, r2 - mov lr, r1 - movne r0, #0 - bne L4 - tst r1, #3 - movne r3, #0 - moveq r3, #1 - cmp r2, #127 - movls r0, #0 - andhi r0, r3, #1 -L4 - cmp r4, r1 - bcc L26 - bls L7 - rsb r3, r1, r4 - cmp ip, r3 - bcc L26 - cmp ip, #0 - beq L7 - add r9, r4, ip - add lr, ip, r1 - b L16 -L29 - sub ip, ip, #8 - cmp ip, #7 - ldrd r2, [lr, #-8]! - movls r0, #0 - cmp ip, #0 - strd r2, [r9, #-8]! - beq L7 -L16 - cmp r0, #0 - bne L29 - sub r3, lr, #1 - sub ip, ip, #1 - ldrb r3, [r3, #0] - sub r2, r9, #1 - cmp ip, #0 - sub r9, r9, #1 - sub lr, lr, #1 - strb r3, [r2, #0] - bne L16 - b L7 -L11 - ldrb r3, [lr], #1 - sub ip, ip, #1 - strb r3, [r9], #1 -L26 - cmp ip, #0 - beq L7 -L30 - cmp r0, #0 - beq L11 - sub ip, ip, #128 // 32 - cmp ip, #127 // 31 - vldm lr!, {d0-d15} - movls r0, #0 - cmp ip, #0 - vstm r9!, {d0-d15} - bne L30 -L7 - dsb - mov r0, r4 - ldmfd sp!, {r4, r9, pc} - - END - diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S deleted file mode 100644 index 28ba38b79c6a..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S +++ /dev/null @@ -1,76 +0,0 @@ -#------------------------------------------------------------------------------ -# -# SemMem() worker for ARM -# -# This file started out as C code that did 64 bit moves if the buffer was -# 32-bit aligned, else it does a byte copy. It also does a byte copy for -# any trailing bytes. Update to use VSTM/VLDM to do 128 byte writes. -# -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -#------------------------------------------------------------------------------ - -#include <AsmMacroIoLib.h> - -/** - Set Buffer to Value for Size bytes. - - @param Buffer Memory to set. - @param Length Number of bytes to set - @param Value Value of the set operation. - - @return Buffer - -VOID * -EFIAPI -InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ) -**/ -ASM_FUNC(InternalMemSetMem) - stmfd sp!, {r4-r7, lr} - tst r0, #3 - movne r3, #0 - moveq r3, #1 - cmp r1, #127 - movls lr, #0 - andhi lr, r3, #1 - cmp lr, #0 - mov r12, r0 - bne L31 -L32: - mov r3, #0 - b L43 -L31: - vdup.8 q0,r2 - vmov q1,q0 - vmov q2,q0 - vmov q3,q0 - vmov q4,q0 - vmov q5,q0 - vmov q6,q0 - vmov q7,q0 - b L32 -L34: - cmp lr, #0 - streqb r2, [r12], #1 - subeq r1, r1, #1 - beq L43 - sub r1, r1, #128 - cmp r1, #127 - cmp r1, #31 - movls lr, r3 - vstm r12!, {d0-d15} -L43: - cmp r1, #0 - bne L34 - ldmfd sp!, {pc} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm deleted file mode 100644 index c4a7c2b72008..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm +++ /dev/null @@ -1,78 +0,0 @@ -;------------------------------------------------------------------------------ -; -; SetMem() worker for ARM -; -; This file started out as C code that did 64 bit moves if the buffer was -; 32-bit aligned, else it does a byte copy. It also does a byte copy for -; any trailing bytes. Update to use VSTM/VLDM to do 128 byte writes. -; -; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> -; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; - -/** - Set Buffer to Value for Size bytes. - - @param Buffer Memory to set. - @param Length Number of bytes to set - @param Value Value of the set operation. - - @return Buffer - -VOID * -EFIAPI -InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ) -**/ - - - INCLUDE AsmMacroExport.inc - - RVCT_ASM_EXPORT InternalMemSetMem - stmfd sp!, {lr} - tst r0, #3 - movne r3, #0 - moveq r3, #1 - cmp r1, #127 - movls lr, #0 - andhi lr, r3, #1 - cmp lr, #0 - mov r12, r0 - bne L31 -L32 - mov r3, #0 - b L43 -L31 - vdup.8 q0,r2 - vmov q1,q0 - vmov q2,q0 - vmov q3,q0 - vmov q4,q0 - vmov q5,q0 - vmov q6,q0 - vmov q7,q0 - b L32 -L34 - cmp lr, #0 - streqb r2, [r12], #1 - subeq r1, r1, #1 - beq L43 - sub r1, r1, #128 - cmp r1, #127 - movls lr, r3 - vstm r12!, {d0-d15} -L43 - cmp r1, #0 - bne L34 - ldmfd sp!, {pc} - - END diff --git a/ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf b/ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf deleted file mode 100644 index 4c388fa8984d..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf +++ /dev/null @@ -1,70 +0,0 @@ -## @file -# Instance of Base Memory Library with some ARM vldm/vstm assembly. -# -# This is a copy of the MdePkg BaseMemoryLib with the CopyMem and -# SetMem worker functions replaced with assembler that uses -# vldm/vstm (part of NEON SIMD, optional in ARMv7-A). -# -# Note: You need to enable NEON in SEC to use this library -# // Enable NEON register in case folks want to use them for optimizations (CopyMem) -# mrc p15, 0, r0, c1, c0, 2 -# orr r0, r0, #0x00f00000 // Enable VPF access (V* instructions) -# mcr p15, 0, r0, c1, c0, 2 -# mov r0, #0x40000000 // Set EN bit in FPEXC -# msr FPEXC,r0 -# -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> -# Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR> -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = BaseMemoryLibVstm - FILE_GUID = 09EE1E8D-7A2E-4573-8117-68A18569C1F5 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = BaseMemoryLib - - -# -# VALID_ARCHITECTURES = ARM -# - -[Sources.ARM] - ScanMem64Wrapper.c - ScanMem32Wrapper.c - ScanMem16Wrapper.c - ScanMem8Wrapper.c - ZeroMemWrapper.c - CompareMemWrapper.c - SetMem64Wrapper.c - SetMem32Wrapper.c - SetMem16Wrapper.c - SetMemWrapper.c - CopyMemWrapper.c - MemLibGeneric.c - MemLibGuid.c - MemLibInternals.h - Arm/CopyMem.asm - Arm/CopyMem.S - Arm/SetMem.asm - Arm/SetMem.S - - -[Packages] - MdePkg/MdePkg.dec - ArmPkg/ArmPkg.dec - -[LibraryClasses] - DebugLib - BaseLib - diff --git a/ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c deleted file mode 100644 index c83988f59ecb..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c +++ /dev/null @@ -1,66 +0,0 @@ -/** @file - CompareMem() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Compares the contents of two buffers. - - This function compares Length bytes of SourceBuffer to Length bytes of DestinationBuffer. - If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the - value returned is the first mismatched byte in SourceBuffer subtracted from the first - mismatched byte in DestinationBuffer. - - If Length > 0 and DestinationBuffer is NULL, then ASSERT(). - If Length > 0 and SourceBuffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). - If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). - - @param DestinationBuffer Pointer to the destination buffer to compare. - @param SourceBuffer Pointer to the source buffer to compare. - @param Length Number of bytes to compare. - - @return 0 All Length bytes of the two buffers are identical. - @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first - mismatched byte in DestinationBuffer. - -**/ -INTN -EFIAPI -CompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ) -{ - if (Length == 0 || DestinationBuffer == SourceBuffer) { - return 0; - } - ASSERT (DestinationBuffer != NULL); - ASSERT (SourceBuffer != NULL); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); - - return InternalMemCompareMem (DestinationBuffer, SourceBuffer, Length); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c b/ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c deleted file mode 100644 index b30faed5607d..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c +++ /dev/null @@ -1,62 +0,0 @@ -/** @file - Implementation of the InternalMemCopyMem routine. This function is broken - out into its own source file so that it can be excluded from a build for a - particular platform easily if an optimized version is desired. - - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - - - - -#include "MemLibInternals.h" - -/** - Copy Length bytes from Source to Destination. - - @param DestinationBuffer Target of copy - @param SourceBuffer Place to copy from - @param Length Number of bytes to copy - - @return Destination - -**/ -VOID * -EFIAPI -InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ) -{ - // - // Declare the local variables that actually move the data elements as - // volatile to prevent the optimizer from replacing this function with - // the intrinsic memcpy() - // - volatile UINT8 *Destination8; - CONST UINT8 *Source8; - - if (SourceBuffer > DestinationBuffer) { - Destination8 = (UINT8*)DestinationBuffer; - Source8 = (CONST UINT8*)SourceBuffer; - while (Length-- != 0) { - *(Destination8++) = *(Source8++); - } - } else if (SourceBuffer < DestinationBuffer) { - Destination8 = (UINT8*)DestinationBuffer + Length; - Source8 = (CONST UINT8*)SourceBuffer + Length; - while (Length-- != 0) { - *(--Destination8) = *(--Source8); - } - } - return DestinationBuffer; -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c deleted file mode 100644 index 2adfb3114910..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c +++ /dev/null @@ -1,63 +0,0 @@ -/** @file - CopyMem() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Copies a source buffer to a destination buffer, and returns the destination buffer. - - This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns - DestinationBuffer. The implementation must be reentrant, and it must handle the case - where SourceBuffer overlaps DestinationBuffer. - - If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). - If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). - - @param DestinationBuffer Pointer to the destination buffer of the memory copy. - @param SourceBuffer Pointer to the source buffer of the memory copy. - @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer. - - @return DestinationBuffer. - -**/ -VOID * -EFIAPI -CopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ) -{ - if (Length == 0) { - return DestinationBuffer; - } - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); - - if (DestinationBuffer == SourceBuffer) { - return DestinationBuffer; - } - return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c deleted file mode 100644 index 54c27012955f..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c +++ /dev/null @@ -1,264 +0,0 @@ -/** @file - Architecture Independent Base Memory Library Implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Fills a target buffer with a 16-bit value, and returns the target buffer. - - @param Buffer Pointer to the target buffer to fill. - @param Length Count of 16-bit value to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value - ) -{ - do { - ((UINT16*)Buffer)[--Length] = Value; - } while (Length != 0); - return Buffer; -} - -/** - Fills a target buffer with a 32-bit value, and returns the target buffer. - - @param Buffer Pointer to the target buffer to fill. - @param Length Count of 32-bit value to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value - ) -{ - do { - ((UINT32*)Buffer)[--Length] = Value; - } while (Length != 0); - return Buffer; -} - -/** - Fills a target buffer with a 64-bit value, and returns the target buffer. - - @param Buffer Pointer to the target buffer to fill. - @param Length Count of 64-bit value to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value - ) -{ - do { - ((UINT64*)Buffer)[--Length] = Value; - } while (Length != 0); - return Buffer; -} - -/** - Set Buffer to 0 for Size bytes. - - @param Buffer Memory to set. - @param Length Number of bytes to set - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length - ) -{ - return InternalMemSetMem (Buffer, Length, 0); -} - -/** - Compares two memory buffers of a given length. - - @param DestinationBuffer First memory buffer - @param SourceBuffer Second memory buffer - @param Length Length of DestinationBuffer and SourceBuffer memory - regions to compare. Must be non-zero. - - @return 0 All Length bytes of the two buffers are identical. - @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first - mismatched byte in DestinationBuffer. - -**/ -INTN -EFIAPI -InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ) -{ - while ((--Length != 0) && - (*(INT8*)DestinationBuffer == *(INT8*)SourceBuffer)) { - DestinationBuffer = (INT8*)DestinationBuffer + 1; - SourceBuffer = (INT8*)SourceBuffer + 1; - } - return (INTN)*(UINT8*)DestinationBuffer - (INTN)*(UINT8*)SourceBuffer; -} - -/** - Scans a target buffer for an 8-bit value, and returns a pointer to the - matching 8-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 8-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ) -{ - CONST UINT8 *Pointer; - - Pointer = (CONST UINT8*)Buffer; - do { - if (*Pointer == Value) { - return Pointer; - } - Pointer++; - } while (--Length != 0); - return NULL; -} - -/** - Scans a target buffer for a 16-bit value, and returns a pointer to the - matching 16-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 16-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value - ) -{ - CONST UINT16 *Pointer; - - Pointer = (CONST UINT16*)Buffer; - do { - if (*Pointer == Value) { - return Pointer; - } - Pointer++; - } while (--Length != 0); - return NULL; -} - -/** - Scans a target buffer for a 32-bit value, and returns a pointer to the - matching 32-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 32-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value - ) -{ - CONST UINT32 *Pointer; - - Pointer = (CONST UINT32*)Buffer; - do { - if (*Pointer == Value) { - return Pointer; - } - Pointer++; - } while (--Length != 0); - return NULL; -} - -/** - Scans a target buffer for a 64-bit value, and returns a pointer to the - matching 64-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 64-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value - ) -{ - CONST UINT64 *Pointer; - - Pointer = (CONST UINT64*)Buffer; - do { - if (*Pointer == Value) { - return Pointer; - } - Pointer++; - } while (--Length != 0); - return NULL; -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c deleted file mode 100644 index dc9e2c319ba9..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c +++ /dev/null @@ -1,132 +0,0 @@ -/** @file - Implementation of GUID functions. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Copies a source GUID to a destination GUID. - - This function copies the contents of the 128-bit GUID specified by SourceGuid to - DestinationGuid, and returns DestinationGuid. - - If DestinationGuid is NULL, then ASSERT(). - If SourceGuid is NULL, then ASSERT(). - - @param DestinationGuid Pointer to the destination GUID. - @param SourceGuid Pointer to the source GUID. - - @return DestinationGuid. - -**/ -GUID * -EFIAPI -CopyGuid ( - OUT GUID *DestinationGuid, - IN CONST GUID *SourceGuid - ) -{ - WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) - ); - WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) - ); - return DestinationGuid; -} - -/** - Compares two GUIDs. - - This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned. - If there are any bit differences in the two GUIDs, then FALSE is returned. - - If Guid1 is NULL, then ASSERT(). - If Guid2 is NULL, then ASSERT(). - - @param Guid1 A pointer to a 128 bit GUID. - @param Guid2 A pointer to a 128 bit GUID. - - @retval TRUE Guid1 and Guid2 are identical. - @retval FALSE Guid1 and Guid2 are not identical. - -**/ -BOOLEAN -EFIAPI -CompareGuid ( - IN CONST GUID *Guid1, - IN CONST GUID *Guid2 - ) -{ - return (CompareMem(Guid1, Guid2, sizeof(GUID) == 0)) ? TRUE : FALSE; -} - -/** - Scans a target buffer for a GUID, and returns a pointer to the matching GUID - in the target buffer. - - This function searches the target buffer specified by Buffer and Length from - the lowest address to the highest address at 128-bit increments for the 128-bit - GUID value that matches Guid. If a match is found, then a pointer to the matching - GUID in the target buffer is returned. If no match is found, then NULL is returned. - If Length is 0, then NULL is returned. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Buffer is not aligned on a 32-bit boundary, then ASSERT(). - If Length is not aligned on a 128-bit boundary, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. - @param Guid Value to search for in the target buffer. - - @return A pointer to the matching Guid in the target buffer or NULL otherwise. - -**/ -VOID * -EFIAPI -ScanGuid ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN CONST GUID *Guid - ) -{ - CONST GUID *GuidPtr; - - ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); - ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); - ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - - GuidPtr = (GUID*)Buffer; - Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { - if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; - } - GuidPtr++; - } - return NULL; -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h b/ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h deleted file mode 100644 index 10c741f2c311..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h +++ /dev/null @@ -1,234 +0,0 @@ -/** @file - Declaration of internal functions for Base Memory Library. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __MEM_LIB_INTERNALS__ -#define __MEM_LIB_INTERNALS__ - -#include <Base.h> -#include <Library/BaseMemoryLib.h> -#include <Library/BaseLib.h> -#include <Library/DebugLib.h> - -/** - Copy Length bytes from Source to Destination. - - @param DestinationBuffer Target of copy - @param SourceBuffer Place to copy from - @param Length Number of bytes to copy - - @return Destination - -**/ -VOID * -EFIAPI -InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ); - -/** - Set Buffer to Value for Size bytes. - - @param Buffer Memory to set. - @param Length Number of bytes to set - @param Value Value of the set operation. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ); - -/** - Fills a target buffer with a 16-bit value, and returns the target buffer. - - @param Buffer Pointer to the target buffer to fill. - @param Length Count of 16-bit value to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value - ); - -/** - Fills a target buffer with a 32-bit value, and returns the target buffer. - - @param Buffer Pointer to the target buffer to fill. - @param Length Count of 32-bit value to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value - ); - -/** - Fills a target buffer with a 64-bit value, and returns the target buffer. - - @param Buffer Pointer to the target buffer to fill. - @param Length Count of 64-bit value to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value - ); - -/** - Set Buffer to 0 for Size bytes. - - @param Buffer Memory to set. - @param Length Number of bytes to set - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length - ); - -/** - Compares two memory buffers of a given length. - - @param DestinationBuffer First memory buffer - @param SourceBuffer Second memory buffer - @param Length Length of DestinationBuffer and SourceBuffer memory - regions to compare. Must be non-zero. - - @return 0 All Length bytes of the two buffers are identical. - @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first - mismatched byte in DestinationBuffer. - -**/ -INTN -EFIAPI -InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length - ); - -/** - Scans a target buffer for an 8-bit value, and returns a pointer to the - matching 8-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 8-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ); - -/** - Scans a target buffer for a 16-bit value, and returns a pointer to the - matching 16-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 16-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value - ); - -/** - Scans a target buffer for a 32-bit value, and returns a pointer to the - matching 32-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 32-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value - ); - -/** - Scans a target buffer for a 64-bit value, and returns a pointer to the - matching 64-bit value in the target buffer. - - @param Buffer Pointer to the target buffer to scan. - @param Length Count of 64-bit value to scan. Must be non-zero. - @param Value Value to search for in the target buffer. - - @return Pointer to the first occurrence or NULL if not found. - -**/ -CONST VOID * -EFIAPI -InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value - ); - -#endif diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c deleted file mode 100644 index 1c727b3e8077..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c +++ /dev/null @@ -1,67 +0,0 @@ -/** @file - ScanMem16() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value - in the target buffer. - - This function searches the target buffer specified by Buffer and Length from the lowest - address to the highest address for a 16-bit value that matches Value. If a match is found, - then a pointer to the matching byte in the target buffer is returned. If no match is found, - then NULL is returned. If Length is 0, then NULL is returned. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Buffer is not aligned on a 16-bit boundary, then ASSERT(). - If Length is not aligned on a 16-bit boundary, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. - @param Value Value to search for in the target buffer. - - @return A pointer to the matching byte in the target buffer or NULL otherwise. - -**/ -VOID * -EFIAPI -ScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value - ) -{ - if (Length == 0) { - return NULL; - } - - ASSERT (Buffer != NULL); - ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ASSERT ((Length & (sizeof (Value) - 1)) == 0); - - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c deleted file mode 100644 index 79ab60ced84c..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c +++ /dev/null @@ -1,66 +0,0 @@ -/** @file - ScanMem32() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Scans a target buffer for a 32-bit value, and returns a pointer to the matching 32-bit value - in the target buffer. - - This function searches the target buffer specified by Buffer and Length from the lowest - address to the highest address for a 32-bit value that matches Value. If a match is found, - then a pointer to the matching byte in the target buffer is returned. If no match is found, - then NULL is returned. If Length is 0, then NULL is returned. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Buffer is not aligned on a 32-bit boundary, then ASSERT(). - If Length is not aligned on a 32-bit boundary, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. - @param Value Value to search for in the target buffer. - - @return A pointer to the matching byte in the target buffer or NULL otherwise. - -**/ -VOID * -EFIAPI -ScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value - ) -{ - if (Length == 0) { - return NULL; - } - - ASSERT (Buffer != NULL); - ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ASSERT ((Length & (sizeof (Value) - 1)) == 0); - - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c deleted file mode 100644 index d11e50b9d5f6..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c +++ /dev/null @@ -1,67 +0,0 @@ -/** @file - ScanMem64() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value - in the target buffer. - - This function searches the target buffer specified by Buffer and Length from the lowest - address to the highest address for a 64-bit value that matches Value. If a match is found, - then a pointer to the matching byte in the target buffer is returned. If no match is found, - then NULL is returned. If Length is 0, then NULL is returned. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Buffer is not aligned on a 64-bit boundary, then ASSERT(). - If Length is not aligned on a 64-bit boundary, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. - @param Value Value to search for in the target buffer. - - @return A pointer to the matching byte in the target buffer or NULL otherwise. - -**/ -VOID * -EFIAPI -ScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value - ) -{ - if (Length == 0) { - return NULL; - } - - ASSERT (Buffer != NULL); - ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ASSERT ((Length & (sizeof (Value) - 1)) == 0); - - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c deleted file mode 100644 index c6c6d5f39ba4..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c +++ /dev/null @@ -1,99 +0,0 @@ -/** @file - ScanMem8() and ScanMemN() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value - in the target buffer. - - This function searches the target buffer specified by Buffer and Length from the lowest - address to the highest address for an 8-bit value that matches Value. If a match is found, - then a pointer to the matching byte in the target buffer is returned. If no match is found, - then NULL is returned. If Length is 0, then NULL is returned. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. - @param Value Value to search for in the target buffer. - - @return A pointer to the matching byte in the target buffer or NULL otherwise. - -**/ -VOID * -EFIAPI -ScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ) -{ - if (Length == 0) { - return NULL; - } - ASSERT (Buffer != NULL); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); -} - -/** - Scans a target buffer for a UINTN sized value, and returns a pointer to the matching - UINTN sized value in the target buffer. - - This function searches the target buffer specified by Buffer and Length from the lowest - address to the highest address for a UINTN sized value that matches Value. If a match is found, - then a pointer to the matching byte in the target buffer is returned. If no match is found, - then NULL is returned. If Length is 0, then NULL is returned. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Buffer is not aligned on a UINTN boundary, then ASSERT(). - If Length is not aligned on a UINTN boundary, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to scan. - @param Length Number of bytes in Buffer to scan. - @param Value Value to search for in the target buffer. - - @return A pointer to the matching byte in the target buffer or NULL otherwise. - -**/ -VOID * -EFIAPI -ScanMemN ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINTN Value - ) -{ - if (sizeof (UINTN) == sizeof (UINT64)) { - return ScanMem64 (Buffer, Length, (UINT64)Value); - } else { - return ScanMem32 (Buffer, Length, (UINT32)Value); - } -} - diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem.c deleted file mode 100644 index 5c30e9b45f76..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem.c +++ /dev/null @@ -1,53 +0,0 @@ -/** @file - Implementation of the EfiSetMem routine. This function is broken - out into its own source file so that it can be excluded from a - build for a particular platform easily if an optimized version - is desired. - - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - - - - -#include "MemLibInternals.h" - -/** - Set Buffer to Value for Size bytes. - - @param Buffer Memory to set. - @param Length Number of bytes to set - @param Value Value of the set operation. - - @return Buffer - -**/ -VOID * -EFIAPI -InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ) -{ - // - // Declare the local variables that actually move the data elements as - // volatile to prevent the optimizer from replacing this function with - // the intrinsic memset() - // - volatile UINT8 *Pointer; - - Pointer = (UINT8*)Buffer; - while (Length-- > 0) { - *(Pointer++) = Value; - } - return Buffer; -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c deleted file mode 100644 index 8129d21e0dbe..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c +++ /dev/null @@ -1,64 +0,0 @@ -/** @file - SetMem16() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Fills a target buffer with a 16-bit value, and returns the target buffer. - - This function fills Length bytes of Buffer with the 16-bit value specified by - Value, and returns Buffer. Value is repeated every 16-bits in for Length - bytes of Buffer. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If Buffer is not aligned on a 16-bit boundary, then ASSERT(). - If Length is not aligned on a 16-bit boundary, then ASSERT(). - - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer. - -**/ -VOID * -EFIAPI -SetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value - ) -{ - if (Length == 0) { - return Buffer; - } - - ASSERT (Buffer != NULL); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0); - ASSERT ((Length & (sizeof (Value) - 1)) == 0); - - return InternalMemSetMem16 (Buffer, Length / sizeof (Value), Value); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c deleted file mode 100644 index b57ba4057af6..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c +++ /dev/null @@ -1,64 +0,0 @@ -/** @file - SetMem32() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Fills a target buffer with a 32-bit value, and returns the target buffer. - - This function fills Length bytes of Buffer with the 32-bit value specified by - Value, and returns Buffer. Value is repeated every 32-bits in for Length - bytes of Buffer. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If Buffer is not aligned on a 32-bit boundary, then ASSERT(). - If Length is not aligned on a 32-bit boundary, then ASSERT(). - - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer. - -**/ -VOID * -EFIAPI -SetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value - ) -{ - if (Length == 0) { - return Buffer; - } - - ASSERT (Buffer != NULL); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0); - ASSERT ((Length & (sizeof (Value) - 1)) == 0); - - return InternalMemSetMem32 (Buffer, Length / sizeof (Value), Value); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c deleted file mode 100644 index f979580b1739..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c +++ /dev/null @@ -1,64 +0,0 @@ -/** @file - SetMem64() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Fills a target buffer with a 64-bit value, and returns the target buffer. - - This function fills Length bytes of Buffer with the 64-bit value specified by - Value, and returns Buffer. Value is repeated every 64-bits in for Length - bytes of Buffer. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If Buffer is not aligned on a 64-bit boundary, then ASSERT(). - If Length is not aligned on a 64-bit boundary, then ASSERT(). - - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer. - -**/ -VOID * -EFIAPI -SetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value - ) -{ - if (Length == 0) { - return Buffer; - } - - ASSERT (Buffer != NULL); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0); - ASSERT ((Length & (sizeof (Value) - 1)) == 0); - - return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value); -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c deleted file mode 100644 index 9240c89e8b87..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c +++ /dev/null @@ -1,91 +0,0 @@ -/** @file - SetMem() and SetMemN() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Fills a target buffer with a byte value, and returns the target buffer. - - This function fills Length bytes of Buffer with Value, and returns Buffer. - - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Memory to set. - @param Length Number of bytes to set. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer. - -**/ -VOID * -EFIAPI -SetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value - ) -{ - if (Length == 0) { - return Buffer; - } - - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - - return InternalMemSetMem (Buffer, Length, Value); -} - -/** - Fills a target buffer with a value that is size UINTN, and returns the target buffer. - - This function fills Length bytes of Buffer with the UINTN sized value specified by - Value, and returns Buffer. Value is repeated every sizeof(UINTN) bytes for Length - bytes of Buffer. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If Buffer is not aligned on a UINTN boundary, then ASSERT(). - If Length is not aligned on a UINTN boundary, then ASSERT(). - - @param Buffer Pointer to the target buffer to fill. - @param Length Number of bytes in Buffer to fill. - @param Value Value with which to fill Length bytes of Buffer. - - @return Buffer. - -**/ -VOID * -EFIAPI -SetMemN ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINTN Value - ) -{ - if (sizeof (UINTN) == sizeof (UINT64)) { - return SetMem64 (Buffer, Length, (UINT64)Value); - } else { - return SetMem32 (Buffer, Length, (UINT32)Value); - } -} diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c deleted file mode 100644 index d6c6279f682f..000000000000 --- a/ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c +++ /dev/null @@ -1,52 +0,0 @@ -/** @file - ZeroMem() implementation. - - The following BaseMemoryLib instances contain the same copy of this file: - - BaseMemoryLib - BaseMemoryLibMmx - BaseMemoryLibSse2 - BaseMemoryLibRepStr - BaseMemoryLibOptDxe - BaseMemoryLibOptPei - PeiMemoryLib - UefiMemoryLib - - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "MemLibInternals.h" - -/** - Fills a target buffer with zeros, and returns the target buffer. - - This function fills Length bytes of Buffer with zeros, and returns Buffer. - - If Length > 0 and Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - - @param Buffer Pointer to the target buffer to fill with zeros. - @param Length Number of bytes in Buffer to fill with zeros. - - @return Buffer. - -**/ -VOID * -EFIAPI -ZeroMem ( - OUT VOID *Buffer, - IN UINTN Length - ) -{ - ASSERT (!(Buffer == NULL && Length > 0)); - ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); - return InternalMemZeroMem (Buffer, Length); -} -- 2.7.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib 2016-08-31 9:07 ` [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib Ard Biesheuvel @ 2016-09-01 12:58 ` Leif Lindholm 0 siblings, 0 replies; 10+ messages in thread From: Leif Lindholm @ 2016-09-01 12:58 UTC (permalink / raw) To: Ard Biesheuvel; +Cc: edk2-devel On Wed, Aug 31, 2016 at 10:07:31AM +0100, Ard Biesheuvel wrote: > The BaseMemoryLibVstm implementation of BaseMemoryLib is ARM only, uses > the NEON register file despite the fact that the UEFI spec does not allow > it, and is currently not used anywhere. So remove it. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> So separate from the rest of the series, it would make sense to merge this one before moving BaseMemoryLibStm to MdePkg. Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>. > --- > ArmPkg/ArmPkg.dsc | 2 - > ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- > ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- > ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ > ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ > ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ > ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- > ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- > ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- > ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- > ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- > ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- > ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- > ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- > ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- > ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- > ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- > ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c | 52 ---- > 22 files changed, 1960 deletions(-) > > diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc > index 7b278cdd4124..6f9fc661fbdc 100644 > --- a/ArmPkg/ArmPkg.dsc > +++ b/ArmPkg/ArmPkg.dsc > @@ -150,8 +150,6 @@ [Components.common] > ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf > > [Components.ARM] > - ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf > - > ArmPkg/Drivers/ArmCpuLib/ArmCortexA8Lib/ArmCortexA8Lib.inf > ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf > ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S > deleted file mode 100644 > index 69de4c1fd48e..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S > +++ /dev/null > @@ -1,112 +0,0 @@ > -#------------------------------------------------------------------------------ > -# > -# CopyMem() worker for ARM > -# > -# This file started out as C code that did 64 bit moves if the buffer was > -# 32-bit aligned, else it does a byte copy. It also does a byte copy for > -# any trailing bytes. Update using VSTM/SLDM to do 128 byte copies. > -# > -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> > -# This program and the accompanying materials > -# are licensed and made available under the terms and conditions of the BSD License > -# which accompanies this distribution. The full text of the license may be found at > -# http://opensource.org/licenses/bsd-license.php > -# > -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > -# > -#------------------------------------------------------------------------------ > - > -#include <AsmMacroIoLib.h> > - > -/** > - Copy Length bytes from Source to Destination. Overlap is OK. > - > - This implementation > - > - @param Destination Target of copy > - @param Source Place to copy from > - @param Length Number of bytes to copy > - > - @return Destination > - > - > -VOID * > -EFIAPI > -InternalMemCopyMem ( > - OUT VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ) > -**/ > -ASM_FUNC(InternalMemCopyMem) > - stmfd sp!, {r4, r9, lr} > - tst r0, #3 > - mov r4, r0 > - mov r9, r0 > - mov ip, r2 > - mov lr, r1 > - movne r0, #0 > - bne L4 > - tst r1, #3 > - movne r3, #0 > - moveq r3, #1 > - cmp r2, #127 > - movls r0, #0 > - andhi r0, r3, #1 > -L4: > - cmp r4, r1 > - bcc L26 > - bls L7 > - rsb r3, r1, r4 > - cmp ip, r3 > - bcc L26 > - cmp ip, #0 > - beq L7 > - add r9, r4, ip > - add lr, ip, r1 > - b L16 > -L29: > - sub ip, ip, #8 > - cmp ip, #7 > - ldrd r2, [lr, #-8]! > - movls r0, #0 > - cmp ip, #0 > - strd r2, [r9, #-8]! > - beq L7 > -L16: > - cmp r0, #0 > - bne L29 > - sub r3, lr, #1 > - sub ip, ip, #1 > - ldrb r3, [r3, #0] > - sub r2, r9, #1 > - cmp ip, #0 > - sub r9, r9, #1 > - sub lr, lr, #1 > - strb r3, [r2, #0] > - bne L16 > - b L7 > -L11: > - ldrb r3, [lr], #1 > - sub ip, ip, #1 > - strb r3, [r9], #1 > -L26: > - cmp ip, #0 > - beq L7 > -L30: > - cmp r0, #0 > - beq L11 > - sub ip, ip, #128 // 32 > - cmp ip, #127 // 31 > - vldm lr!, {d0-d15} > - movls r0, #0 > - cmp ip, #0 > - vstm r9!, {d0-d15} > - bne L30 > -L7: > - dsb > - mov r0, r4 > - ldmfd sp!, {r4, r9, pc} > - > - > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm > deleted file mode 100644 > index 5afd1e5f2bc1..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm > +++ /dev/null > @@ -1,114 +0,0 @@ > -;------------------------------------------------------------------------------ > -; > -; CopyMem() worker for ARM > -; > -; This file started out as C code that did 64 bit moves if the buffer was > -; 32-bit aligned, else it does a byte copy. It also does a byte copy for > -; any trailing bytes. Update using VSTM/SLDM to do 128 byte copies. > -; > -; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> > -; This program and the accompanying materials > -; are licensed and made available under the terms and conditions of the BSD License > -; which accompanies this distribution. The full text of the license may be found at > -; http://opensource.org/licenses/bsd-license.php > -; > -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > -; > -;------------------------------------------------------------------------------ > - > -/** > - Copy Length bytes from Source to Destination. Overlap is OK. > - > - This implementation > - > - @param Destination Target of copy > - @param Source Place to copy from > - @param Length Number of bytes to copy > - > - @return Destination > - > - > -VOID * > -EFIAPI > -InternalMemCopyMem ( > - OUT VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ) > -**/ > - > - INCLUDE AsmMacroExport.inc > - > - RVCT_ASM_EXPORT InternalMemCopyMem > - stmfd sp!, {r4, r9, lr} > - tst r0, #3 > - mov r4, r0 > - mov r9, r0 > - mov ip, r2 > - mov lr, r1 > - movne r0, #0 > - bne L4 > - tst r1, #3 > - movne r3, #0 > - moveq r3, #1 > - cmp r2, #127 > - movls r0, #0 > - andhi r0, r3, #1 > -L4 > - cmp r4, r1 > - bcc L26 > - bls L7 > - rsb r3, r1, r4 > - cmp ip, r3 > - bcc L26 > - cmp ip, #0 > - beq L7 > - add r9, r4, ip > - add lr, ip, r1 > - b L16 > -L29 > - sub ip, ip, #8 > - cmp ip, #7 > - ldrd r2, [lr, #-8]! > - movls r0, #0 > - cmp ip, #0 > - strd r2, [r9, #-8]! > - beq L7 > -L16 > - cmp r0, #0 > - bne L29 > - sub r3, lr, #1 > - sub ip, ip, #1 > - ldrb r3, [r3, #0] > - sub r2, r9, #1 > - cmp ip, #0 > - sub r9, r9, #1 > - sub lr, lr, #1 > - strb r3, [r2, #0] > - bne L16 > - b L7 > -L11 > - ldrb r3, [lr], #1 > - sub ip, ip, #1 > - strb r3, [r9], #1 > -L26 > - cmp ip, #0 > - beq L7 > -L30 > - cmp r0, #0 > - beq L11 > - sub ip, ip, #128 // 32 > - cmp ip, #127 // 31 > - vldm lr!, {d0-d15} > - movls r0, #0 > - cmp ip, #0 > - vstm r9!, {d0-d15} > - bne L30 > -L7 > - dsb > - mov r0, r4 > - ldmfd sp!, {r4, r9, pc} > - > - END > - > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S > deleted file mode 100644 > index 28ba38b79c6a..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S > +++ /dev/null > @@ -1,76 +0,0 @@ > -#------------------------------------------------------------------------------ > -# > -# SemMem() worker for ARM > -# > -# This file started out as C code that did 64 bit moves if the buffer was > -# 32-bit aligned, else it does a byte copy. It also does a byte copy for > -# any trailing bytes. Update to use VSTM/VLDM to do 128 byte writes. > -# > -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> > -# This program and the accompanying materials > -# are licensed and made available under the terms and conditions of the BSD License > -# which accompanies this distribution. The full text of the license may be found at > -# http://opensource.org/licenses/bsd-license.php > -# > -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > -# > -#------------------------------------------------------------------------------ > - > -#include <AsmMacroIoLib.h> > - > -/** > - Set Buffer to Value for Size bytes. > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set > - @param Value Value of the set operation. > - > - @return Buffer > - > -VOID * > -EFIAPI > -InternalMemSetMem ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ) > -**/ > -ASM_FUNC(InternalMemSetMem) > - stmfd sp!, {r4-r7, lr} > - tst r0, #3 > - movne r3, #0 > - moveq r3, #1 > - cmp r1, #127 > - movls lr, #0 > - andhi lr, r3, #1 > - cmp lr, #0 > - mov r12, r0 > - bne L31 > -L32: > - mov r3, #0 > - b L43 > -L31: > - vdup.8 q0,r2 > - vmov q1,q0 > - vmov q2,q0 > - vmov q3,q0 > - vmov q4,q0 > - vmov q5,q0 > - vmov q6,q0 > - vmov q7,q0 > - b L32 > -L34: > - cmp lr, #0 > - streqb r2, [r12], #1 > - subeq r1, r1, #1 > - beq L43 > - sub r1, r1, #128 > - cmp r1, #127 > - cmp r1, #31 > - movls lr, r3 > - vstm r12!, {d0-d15} > -L43: > - cmp r1, #0 > - bne L34 > - ldmfd sp!, {pc} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm > deleted file mode 100644 > index c4a7c2b72008..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm > +++ /dev/null > @@ -1,78 +0,0 @@ > -;------------------------------------------------------------------------------ > -; > -; SetMem() worker for ARM > -; > -; This file started out as C code that did 64 bit moves if the buffer was > -; 32-bit aligned, else it does a byte copy. It also does a byte copy for > -; any trailing bytes. Update to use VSTM/VLDM to do 128 byte writes. > -; > -; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> > -; This program and the accompanying materials > -; are licensed and made available under the terms and conditions of the BSD License > -; which accompanies this distribution. The full text of the license may be found at > -; http://opensource.org/licenses/bsd-license.php > -; > -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > -; > - > -/** > - Set Buffer to Value for Size bytes. > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set > - @param Value Value of the set operation. > - > - @return Buffer > - > -VOID * > -EFIAPI > -InternalMemSetMem ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ) > -**/ > - > - > - INCLUDE AsmMacroExport.inc > - > - RVCT_ASM_EXPORT InternalMemSetMem > - stmfd sp!, {lr} > - tst r0, #3 > - movne r3, #0 > - moveq r3, #1 > - cmp r1, #127 > - movls lr, #0 > - andhi lr, r3, #1 > - cmp lr, #0 > - mov r12, r0 > - bne L31 > -L32 > - mov r3, #0 > - b L43 > -L31 > - vdup.8 q0,r2 > - vmov q1,q0 > - vmov q2,q0 > - vmov q3,q0 > - vmov q4,q0 > - vmov q5,q0 > - vmov q6,q0 > - vmov q7,q0 > - b L32 > -L34 > - cmp lr, #0 > - streqb r2, [r12], #1 > - subeq r1, r1, #1 > - beq L43 > - sub r1, r1, #128 > - cmp r1, #127 > - movls lr, r3 > - vstm r12!, {d0-d15} > -L43 > - cmp r1, #0 > - bne L34 > - ldmfd sp!, {pc} > - > - END > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf b/ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf > deleted file mode 100644 > index 4c388fa8984d..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf > +++ /dev/null > @@ -1,70 +0,0 @@ > -## @file > -# Instance of Base Memory Library with some ARM vldm/vstm assembly. > -# > -# This is a copy of the MdePkg BaseMemoryLib with the CopyMem and > -# SetMem worker functions replaced with assembler that uses > -# vldm/vstm (part of NEON SIMD, optional in ARMv7-A). > -# > -# Note: You need to enable NEON in SEC to use this library > -# // Enable NEON register in case folks want to use them for optimizations (CopyMem) > -# mrc p15, 0, r0, c1, c0, 2 > -# orr r0, r0, #0x00f00000 // Enable VPF access (V* instructions) > -# mcr p15, 0, r0, c1, c0, 2 > -# mov r0, #0x40000000 // Set EN bit in FPEXC > -# msr FPEXC,r0 > -# > -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> > -# Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR> > -# > -# This program and the accompanying materials > -# are licensed and made available under the terms and conditions of the BSD License > -# which accompanies this distribution. The full text of the license may be found at > -# http://opensource.org/licenses/bsd-license.php > -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > -# > -# > -## > - > -[Defines] > - INF_VERSION = 0x00010005 > - BASE_NAME = BaseMemoryLibVstm > - FILE_GUID = 09EE1E8D-7A2E-4573-8117-68A18569C1F5 > - MODULE_TYPE = BASE > - VERSION_STRING = 1.0 > - LIBRARY_CLASS = BaseMemoryLib > - > - > -# > -# VALID_ARCHITECTURES = ARM > -# > - > -[Sources.ARM] > - ScanMem64Wrapper.c > - ScanMem32Wrapper.c > - ScanMem16Wrapper.c > - ScanMem8Wrapper.c > - ZeroMemWrapper.c > - CompareMemWrapper.c > - SetMem64Wrapper.c > - SetMem32Wrapper.c > - SetMem16Wrapper.c > - SetMemWrapper.c > - CopyMemWrapper.c > - MemLibGeneric.c > - MemLibGuid.c > - MemLibInternals.h > - Arm/CopyMem.asm > - Arm/CopyMem.S > - Arm/SetMem.asm > - Arm/SetMem.S > - > - > -[Packages] > - MdePkg/MdePkg.dec > - ArmPkg/ArmPkg.dec > - > -[LibraryClasses] > - DebugLib > - BaseLib > - > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c > deleted file mode 100644 > index c83988f59ecb..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c > +++ /dev/null > @@ -1,66 +0,0 @@ > -/** @file > - CompareMem() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > -This program and the accompanying materials > -are licensed and made available under the terms and conditions of the BSD License > -which accompanies this distribution. The full text of the license may be found at > -http://opensource.org/licenses/bsd-license.php > - > -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Compares the contents of two buffers. > - > - This function compares Length bytes of SourceBuffer to Length bytes of DestinationBuffer. > - If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the > - value returned is the first mismatched byte in SourceBuffer subtracted from the first > - mismatched byte in DestinationBuffer. > - > - If Length > 0 and DestinationBuffer is NULL, then ASSERT(). > - If Length > 0 and SourceBuffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). > - If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). > - > - @param DestinationBuffer Pointer to the destination buffer to compare. > - @param SourceBuffer Pointer to the source buffer to compare. > - @param Length Number of bytes to compare. > - > - @return 0 All Length bytes of the two buffers are identical. > - @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first > - mismatched byte in DestinationBuffer. > - > -**/ > -INTN > -EFIAPI > -CompareMem ( > - IN CONST VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ) > -{ > - if (Length == 0 || DestinationBuffer == SourceBuffer) { > - return 0; > - } > - ASSERT (DestinationBuffer != NULL); > - ASSERT (SourceBuffer != NULL); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); > - > - return InternalMemCompareMem (DestinationBuffer, SourceBuffer, Length); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c b/ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c > deleted file mode 100644 > index b30faed5607d..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c > +++ /dev/null > @@ -1,62 +0,0 @@ > -/** @file > - Implementation of the InternalMemCopyMem routine. This function is broken > - out into its own source file so that it can be excluded from a build for a > - particular platform easily if an optimized version is desired. > - > - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > - > - > - > -#include "MemLibInternals.h" > - > -/** > - Copy Length bytes from Source to Destination. > - > - @param DestinationBuffer Target of copy > - @param SourceBuffer Place to copy from > - @param Length Number of bytes to copy > - > - @return Destination > - > -**/ > -VOID * > -EFIAPI > -InternalMemCopyMem ( > - OUT VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ) > -{ > - // > - // Declare the local variables that actually move the data elements as > - // volatile to prevent the optimizer from replacing this function with > - // the intrinsic memcpy() > - // > - volatile UINT8 *Destination8; > - CONST UINT8 *Source8; > - > - if (SourceBuffer > DestinationBuffer) { > - Destination8 = (UINT8*)DestinationBuffer; > - Source8 = (CONST UINT8*)SourceBuffer; > - while (Length-- != 0) { > - *(Destination8++) = *(Source8++); > - } > - } else if (SourceBuffer < DestinationBuffer) { > - Destination8 = (UINT8*)DestinationBuffer + Length; > - Source8 = (CONST UINT8*)SourceBuffer + Length; > - while (Length-- != 0) { > - *(--Destination8) = *(--Source8); > - } > - } > - return DestinationBuffer; > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c > deleted file mode 100644 > index 2adfb3114910..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c > +++ /dev/null > @@ -1,63 +0,0 @@ > -/** @file > - CopyMem() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Copies a source buffer to a destination buffer, and returns the destination buffer. > - > - This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns > - DestinationBuffer. The implementation must be reentrant, and it must handle the case > - where SourceBuffer overlaps DestinationBuffer. > - > - If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). > - If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). > - > - @param DestinationBuffer Pointer to the destination buffer of the memory copy. > - @param SourceBuffer Pointer to the source buffer of the memory copy. > - @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer. > - > - @return DestinationBuffer. > - > -**/ > -VOID * > -EFIAPI > -CopyMem ( > - OUT VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ) > -{ > - if (Length == 0) { > - return DestinationBuffer; > - } > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); > - > - if (DestinationBuffer == SourceBuffer) { > - return DestinationBuffer; > - } > - return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c > deleted file mode 100644 > index 54c27012955f..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c > +++ /dev/null > @@ -1,264 +0,0 @@ > -/** @file > - Architecture Independent Base Memory Library Implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Fills a target buffer with a 16-bit value, and returns the target buffer. > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Count of 16-bit value to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem16 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT16 Value > - ) > -{ > - do { > - ((UINT16*)Buffer)[--Length] = Value; > - } while (Length != 0); > - return Buffer; > -} > - > -/** > - Fills a target buffer with a 32-bit value, and returns the target buffer. > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Count of 32-bit value to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem32 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT32 Value > - ) > -{ > - do { > - ((UINT32*)Buffer)[--Length] = Value; > - } while (Length != 0); > - return Buffer; > -} > - > -/** > - Fills a target buffer with a 64-bit value, and returns the target buffer. > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Count of 64-bit value to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem64 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT64 Value > - ) > -{ > - do { > - ((UINT64*)Buffer)[--Length] = Value; > - } while (Length != 0); > - return Buffer; > -} > - > -/** > - Set Buffer to 0 for Size bytes. > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemZeroMem ( > - OUT VOID *Buffer, > - IN UINTN Length > - ) > -{ > - return InternalMemSetMem (Buffer, Length, 0); > -} > - > -/** > - Compares two memory buffers of a given length. > - > - @param DestinationBuffer First memory buffer > - @param SourceBuffer Second memory buffer > - @param Length Length of DestinationBuffer and SourceBuffer memory > - regions to compare. Must be non-zero. > - > - @return 0 All Length bytes of the two buffers are identical. > - @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first > - mismatched byte in DestinationBuffer. > - > -**/ > -INTN > -EFIAPI > -InternalMemCompareMem ( > - IN CONST VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ) > -{ > - while ((--Length != 0) && > - (*(INT8*)DestinationBuffer == *(INT8*)SourceBuffer)) { > - DestinationBuffer = (INT8*)DestinationBuffer + 1; > - SourceBuffer = (INT8*)SourceBuffer + 1; > - } > - return (INTN)*(UINT8*)DestinationBuffer - (INTN)*(UINT8*)SourceBuffer; > -} > - > -/** > - Scans a target buffer for an 8-bit value, and returns a pointer to the > - matching 8-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 8-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem8 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ) > -{ > - CONST UINT8 *Pointer; > - > - Pointer = (CONST UINT8*)Buffer; > - do { > - if (*Pointer == Value) { > - return Pointer; > - } > - Pointer++; > - } while (--Length != 0); > - return NULL; > -} > - > -/** > - Scans a target buffer for a 16-bit value, and returns a pointer to the > - matching 16-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 16-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem16 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT16 Value > - ) > -{ > - CONST UINT16 *Pointer; > - > - Pointer = (CONST UINT16*)Buffer; > - do { > - if (*Pointer == Value) { > - return Pointer; > - } > - Pointer++; > - } while (--Length != 0); > - return NULL; > -} > - > -/** > - Scans a target buffer for a 32-bit value, and returns a pointer to the > - matching 32-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 32-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem32 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT32 Value > - ) > -{ > - CONST UINT32 *Pointer; > - > - Pointer = (CONST UINT32*)Buffer; > - do { > - if (*Pointer == Value) { > - return Pointer; > - } > - Pointer++; > - } while (--Length != 0); > - return NULL; > -} > - > -/** > - Scans a target buffer for a 64-bit value, and returns a pointer to the > - matching 64-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 64-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem64 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT64 Value > - ) > -{ > - CONST UINT64 *Pointer; > - > - Pointer = (CONST UINT64*)Buffer; > - do { > - if (*Pointer == Value) { > - return Pointer; > - } > - Pointer++; > - } while (--Length != 0); > - return NULL; > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c > deleted file mode 100644 > index dc9e2c319ba9..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c > +++ /dev/null > @@ -1,132 +0,0 @@ > -/** @file > - Implementation of GUID functions. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Copies a source GUID to a destination GUID. > - > - This function copies the contents of the 128-bit GUID specified by SourceGuid to > - DestinationGuid, and returns DestinationGuid. > - > - If DestinationGuid is NULL, then ASSERT(). > - If SourceGuid is NULL, then ASSERT(). > - > - @param DestinationGuid Pointer to the destination GUID. > - @param SourceGuid Pointer to the source GUID. > - > - @return DestinationGuid. > - > -**/ > -GUID * > -EFIAPI > -CopyGuid ( > - OUT GUID *DestinationGuid, > - IN CONST GUID *SourceGuid > - ) > -{ > - WriteUnaligned64 ( > - (UINT64*)DestinationGuid, > - ReadUnaligned64 ((CONST UINT64*)SourceGuid) > - ); > - WriteUnaligned64 ( > - (UINT64*)DestinationGuid + 1, > - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) > - ); > - return DestinationGuid; > -} > - > -/** > - Compares two GUIDs. > - > - This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned. > - If there are any bit differences in the two GUIDs, then FALSE is returned. > - > - If Guid1 is NULL, then ASSERT(). > - If Guid2 is NULL, then ASSERT(). > - > - @param Guid1 A pointer to a 128 bit GUID. > - @param Guid2 A pointer to a 128 bit GUID. > - > - @retval TRUE Guid1 and Guid2 are identical. > - @retval FALSE Guid1 and Guid2 are not identical. > - > -**/ > -BOOLEAN > -EFIAPI > -CompareGuid ( > - IN CONST GUID *Guid1, > - IN CONST GUID *Guid2 > - ) > -{ > - return (CompareMem(Guid1, Guid2, sizeof(GUID) == 0)) ? TRUE : FALSE; > -} > - > -/** > - Scans a target buffer for a GUID, and returns a pointer to the matching GUID > - in the target buffer. > - > - This function searches the target buffer specified by Buffer and Length from > - the lowest address to the highest address at 128-bit increments for the 128-bit > - GUID value that matches Guid. If a match is found, then a pointer to the matching > - GUID in the target buffer is returned. If no match is found, then NULL is returned. > - If Length is 0, then NULL is returned. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a 32-bit boundary, then ASSERT(). > - If Length is not aligned on a 128-bit boundary, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Number of bytes in Buffer to scan. > - @param Guid Value to search for in the target buffer. > - > - @return A pointer to the matching Guid in the target buffer or NULL otherwise. > - > -**/ > -VOID * > -EFIAPI > -ScanGuid ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN CONST GUID *Guid > - ) > -{ > - CONST GUID *GuidPtr; > - > - ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); > - ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); > - ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); > - > - GuidPtr = (GUID*)Buffer; > - Buffer = GuidPtr + Length / sizeof (*GuidPtr); > - while (GuidPtr < (CONST GUID*)Buffer) { > - if (CompareGuid (GuidPtr, Guid)) { > - return (VOID*)GuidPtr; > - } > - GuidPtr++; > - } > - return NULL; > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h b/ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h > deleted file mode 100644 > index 10c741f2c311..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h > +++ /dev/null > @@ -1,234 +0,0 @@ > -/** @file > - Declaration of internal functions for Base Memory Library. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#ifndef __MEM_LIB_INTERNALS__ > -#define __MEM_LIB_INTERNALS__ > - > -#include <Base.h> > -#include <Library/BaseMemoryLib.h> > -#include <Library/BaseLib.h> > -#include <Library/DebugLib.h> > - > -/** > - Copy Length bytes from Source to Destination. > - > - @param DestinationBuffer Target of copy > - @param SourceBuffer Place to copy from > - @param Length Number of bytes to copy > - > - @return Destination > - > -**/ > -VOID * > -EFIAPI > -InternalMemCopyMem ( > - OUT VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ); > - > -/** > - Set Buffer to Value for Size bytes. > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set > - @param Value Value of the set operation. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ); > - > -/** > - Fills a target buffer with a 16-bit value, and returns the target buffer. > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Count of 16-bit value to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem16 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT16 Value > - ); > - > -/** > - Fills a target buffer with a 32-bit value, and returns the target buffer. > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Count of 32-bit value to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem32 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT32 Value > - ); > - > -/** > - Fills a target buffer with a 64-bit value, and returns the target buffer. > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Count of 64-bit value to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem64 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT64 Value > - ); > - > -/** > - Set Buffer to 0 for Size bytes. > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemZeroMem ( > - OUT VOID *Buffer, > - IN UINTN Length > - ); > - > -/** > - Compares two memory buffers of a given length. > - > - @param DestinationBuffer First memory buffer > - @param SourceBuffer Second memory buffer > - @param Length Length of DestinationBuffer and SourceBuffer memory > - regions to compare. Must be non-zero. > - > - @return 0 All Length bytes of the two buffers are identical. > - @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first > - mismatched byte in DestinationBuffer. > - > -**/ > -INTN > -EFIAPI > -InternalMemCompareMem ( > - IN CONST VOID *DestinationBuffer, > - IN CONST VOID *SourceBuffer, > - IN UINTN Length > - ); > - > -/** > - Scans a target buffer for an 8-bit value, and returns a pointer to the > - matching 8-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 8-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem8 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ); > - > -/** > - Scans a target buffer for a 16-bit value, and returns a pointer to the > - matching 16-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 16-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem16 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT16 Value > - ); > - > -/** > - Scans a target buffer for a 32-bit value, and returns a pointer to the > - matching 32-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 32-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem32 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT32 Value > - ); > - > -/** > - Scans a target buffer for a 64-bit value, and returns a pointer to the > - matching 64-bit value in the target buffer. > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Count of 64-bit value to scan. Must be non-zero. > - @param Value Value to search for in the target buffer. > - > - @return Pointer to the first occurrence or NULL if not found. > - > -**/ > -CONST VOID * > -EFIAPI > -InternalMemScanMem64 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT64 Value > - ); > - > -#endif > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c > deleted file mode 100644 > index 1c727b3e8077..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c > +++ /dev/null > @@ -1,67 +0,0 @@ > -/** @file > - ScanMem16() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value > - in the target buffer. > - > - This function searches the target buffer specified by Buffer and Length from the lowest > - address to the highest address for a 16-bit value that matches Value. If a match is found, > - then a pointer to the matching byte in the target buffer is returned. If no match is found, > - then NULL is returned. If Length is 0, then NULL is returned. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a 16-bit boundary, then ASSERT(). > - If Length is not aligned on a 16-bit boundary, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Number of bytes in Buffer to scan. > - @param Value Value to search for in the target buffer. > - > - @return A pointer to the matching byte in the target buffer or NULL otherwise. > - > -**/ > -VOID * > -EFIAPI > -ScanMem16 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT16 Value > - ) > -{ > - if (Length == 0) { > - return NULL; > - } > - > - ASSERT (Buffer != NULL); > - ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - ASSERT ((Length & (sizeof (Value) - 1)) == 0); > - > - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c > deleted file mode 100644 > index 79ab60ced84c..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c > +++ /dev/null > @@ -1,66 +0,0 @@ > -/** @file > - ScanMem32() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Scans a target buffer for a 32-bit value, and returns a pointer to the matching 32-bit value > - in the target buffer. > - > - This function searches the target buffer specified by Buffer and Length from the lowest > - address to the highest address for a 32-bit value that matches Value. If a match is found, > - then a pointer to the matching byte in the target buffer is returned. If no match is found, > - then NULL is returned. If Length is 0, then NULL is returned. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a 32-bit boundary, then ASSERT(). > - If Length is not aligned on a 32-bit boundary, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Number of bytes in Buffer to scan. > - @param Value Value to search for in the target buffer. > - > - @return A pointer to the matching byte in the target buffer or NULL otherwise. > - > -**/ > -VOID * > -EFIAPI > -ScanMem32 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT32 Value > - ) > -{ > - if (Length == 0) { > - return NULL; > - } > - > - ASSERT (Buffer != NULL); > - ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - ASSERT ((Length & (sizeof (Value) - 1)) == 0); > - > - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c > deleted file mode 100644 > index d11e50b9d5f6..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c > +++ /dev/null > @@ -1,67 +0,0 @@ > -/** @file > - ScanMem64() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value > - in the target buffer. > - > - This function searches the target buffer specified by Buffer and Length from the lowest > - address to the highest address for a 64-bit value that matches Value. If a match is found, > - then a pointer to the matching byte in the target buffer is returned. If no match is found, > - then NULL is returned. If Length is 0, then NULL is returned. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a 64-bit boundary, then ASSERT(). > - If Length is not aligned on a 64-bit boundary, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Number of bytes in Buffer to scan. > - @param Value Value to search for in the target buffer. > - > - @return A pointer to the matching byte in the target buffer or NULL otherwise. > - > -**/ > -VOID * > -EFIAPI > -ScanMem64 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT64 Value > - ) > -{ > - if (Length == 0) { > - return NULL; > - } > - > - ASSERT (Buffer != NULL); > - ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - ASSERT ((Length & (sizeof (Value) - 1)) == 0); > - > - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c > deleted file mode 100644 > index c6c6d5f39ba4..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c > +++ /dev/null > @@ -1,99 +0,0 @@ > -/** @file > - ScanMem8() and ScanMemN() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value > - in the target buffer. > - > - This function searches the target buffer specified by Buffer and Length from the lowest > - address to the highest address for an 8-bit value that matches Value. If a match is found, > - then a pointer to the matching byte in the target buffer is returned. If no match is found, > - then NULL is returned. If Length is 0, then NULL is returned. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Number of bytes in Buffer to scan. > - @param Value Value to search for in the target buffer. > - > - @return A pointer to the matching byte in the target buffer or NULL otherwise. > - > -**/ > -VOID * > -EFIAPI > -ScanMem8 ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ) > -{ > - if (Length == 0) { > - return NULL; > - } > - ASSERT (Buffer != NULL); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - > - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); > -} > - > -/** > - Scans a target buffer for a UINTN sized value, and returns a pointer to the matching > - UINTN sized value in the target buffer. > - > - This function searches the target buffer specified by Buffer and Length from the lowest > - address to the highest address for a UINTN sized value that matches Value. If a match is found, > - then a pointer to the matching byte in the target buffer is returned. If no match is found, > - then NULL is returned. If Length is 0, then NULL is returned. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a UINTN boundary, then ASSERT(). > - If Length is not aligned on a UINTN boundary, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to scan. > - @param Length Number of bytes in Buffer to scan. > - @param Value Value to search for in the target buffer. > - > - @return A pointer to the matching byte in the target buffer or NULL otherwise. > - > -**/ > -VOID * > -EFIAPI > -ScanMemN ( > - IN CONST VOID *Buffer, > - IN UINTN Length, > - IN UINTN Value > - ) > -{ > - if (sizeof (UINTN) == sizeof (UINT64)) { > - return ScanMem64 (Buffer, Length, (UINT64)Value); > - } else { > - return ScanMem32 (Buffer, Length, (UINT32)Value); > - } > -} > - > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem.c > deleted file mode 100644 > index 5c30e9b45f76..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem.c > +++ /dev/null > @@ -1,53 +0,0 @@ > -/** @file > - Implementation of the EfiSetMem routine. This function is broken > - out into its own source file so that it can be excluded from a > - build for a particular platform easily if an optimized version > - is desired. > - > - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > - > - > - > -#include "MemLibInternals.h" > - > -/** > - Set Buffer to Value for Size bytes. > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set > - @param Value Value of the set operation. > - > - @return Buffer > - > -**/ > -VOID * > -EFIAPI > -InternalMemSetMem ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ) > -{ > - // > - // Declare the local variables that actually move the data elements as > - // volatile to prevent the optimizer from replacing this function with > - // the intrinsic memset() > - // > - volatile UINT8 *Pointer; > - > - Pointer = (UINT8*)Buffer; > - while (Length-- > 0) { > - *(Pointer++) = Value; > - } > - return Buffer; > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c > deleted file mode 100644 > index 8129d21e0dbe..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c > +++ /dev/null > @@ -1,64 +0,0 @@ > -/** @file > - SetMem16() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Fills a target buffer with a 16-bit value, and returns the target buffer. > - > - This function fills Length bytes of Buffer with the 16-bit value specified by > - Value, and returns Buffer. Value is repeated every 16-bits in for Length > - bytes of Buffer. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - If Buffer is not aligned on a 16-bit boundary, then ASSERT(). > - If Length is not aligned on a 16-bit boundary, then ASSERT(). > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Number of bytes in Buffer to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer. > - > -**/ > -VOID * > -EFIAPI > -SetMem16 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT16 Value > - ) > -{ > - if (Length == 0) { > - return Buffer; > - } > - > - ASSERT (Buffer != NULL); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0); > - ASSERT ((Length & (sizeof (Value) - 1)) == 0); > - > - return InternalMemSetMem16 (Buffer, Length / sizeof (Value), Value); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c > deleted file mode 100644 > index b57ba4057af6..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c > +++ /dev/null > @@ -1,64 +0,0 @@ > -/** @file > - SetMem32() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Fills a target buffer with a 32-bit value, and returns the target buffer. > - > - This function fills Length bytes of Buffer with the 32-bit value specified by > - Value, and returns Buffer. Value is repeated every 32-bits in for Length > - bytes of Buffer. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - If Buffer is not aligned on a 32-bit boundary, then ASSERT(). > - If Length is not aligned on a 32-bit boundary, then ASSERT(). > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Number of bytes in Buffer to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer. > - > -**/ > -VOID * > -EFIAPI > -SetMem32 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT32 Value > - ) > -{ > - if (Length == 0) { > - return Buffer; > - } > - > - ASSERT (Buffer != NULL); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0); > - ASSERT ((Length & (sizeof (Value) - 1)) == 0); > - > - return InternalMemSetMem32 (Buffer, Length / sizeof (Value), Value); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c > deleted file mode 100644 > index f979580b1739..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c > +++ /dev/null > @@ -1,64 +0,0 @@ > -/** @file > - SetMem64() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Fills a target buffer with a 64-bit value, and returns the target buffer. > - > - This function fills Length bytes of Buffer with the 64-bit value specified by > - Value, and returns Buffer. Value is repeated every 64-bits in for Length > - bytes of Buffer. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - If Buffer is not aligned on a 64-bit boundary, then ASSERT(). > - If Length is not aligned on a 64-bit boundary, then ASSERT(). > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Number of bytes in Buffer to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer. > - > -**/ > -VOID * > -EFIAPI > -SetMem64 ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT64 Value > - ) > -{ > - if (Length == 0) { > - return Buffer; > - } > - > - ASSERT (Buffer != NULL); > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0); > - ASSERT ((Length & (sizeof (Value) - 1)) == 0); > - > - return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value); > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c > deleted file mode 100644 > index 9240c89e8b87..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c > +++ /dev/null > @@ -1,91 +0,0 @@ > -/** @file > - SetMem() and SetMemN() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Fills a target buffer with a byte value, and returns the target buffer. > - > - This function fills Length bytes of Buffer with Value, and returns Buffer. > - > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Memory to set. > - @param Length Number of bytes to set. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer. > - > -**/ > -VOID * > -EFIAPI > -SetMem ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINT8 Value > - ) > -{ > - if (Length == 0) { > - return Buffer; > - } > - > - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); > - > - return InternalMemSetMem (Buffer, Length, Value); > -} > - > -/** > - Fills a target buffer with a value that is size UINTN, and returns the target buffer. > - > - This function fills Length bytes of Buffer with the UINTN sized value specified by > - Value, and returns Buffer. Value is repeated every sizeof(UINTN) bytes for Length > - bytes of Buffer. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - If Buffer is not aligned on a UINTN boundary, then ASSERT(). > - If Length is not aligned on a UINTN boundary, then ASSERT(). > - > - @param Buffer Pointer to the target buffer to fill. > - @param Length Number of bytes in Buffer to fill. > - @param Value Value with which to fill Length bytes of Buffer. > - > - @return Buffer. > - > -**/ > -VOID * > -EFIAPI > -SetMemN ( > - OUT VOID *Buffer, > - IN UINTN Length, > - IN UINTN Value > - ) > -{ > - if (sizeof (UINTN) == sizeof (UINT64)) { > - return SetMem64 (Buffer, Length, (UINT64)Value); > - } else { > - return SetMem32 (Buffer, Length, (UINT32)Value); > - } > -} > diff --git a/ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c b/ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c > deleted file mode 100644 > index d6c6279f682f..000000000000 > --- a/ArmPkg/Library/BaseMemoryLibVstm/ZeroMemWrapper.c > +++ /dev/null > @@ -1,52 +0,0 @@ > -/** @file > - ZeroMem() implementation. > - > - The following BaseMemoryLib instances contain the same copy of this file: > - > - BaseMemoryLib > - BaseMemoryLibMmx > - BaseMemoryLibSse2 > - BaseMemoryLibRepStr > - BaseMemoryLibOptDxe > - BaseMemoryLibOptPei > - PeiMemoryLib > - UefiMemoryLib > - > - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> > - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the BSD License > - which accompanies this distribution. The full text of the license may be found at > - http://opensource.org/licenses/bsd-license.php > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > - > -**/ > - > -#include "MemLibInternals.h" > - > -/** > - Fills a target buffer with zeros, and returns the target buffer. > - > - This function fills Length bytes of Buffer with zeros, and returns Buffer. > - > - If Length > 0 and Buffer is NULL, then ASSERT(). > - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). > - > - @param Buffer Pointer to the target buffer to fill with zeros. > - @param Length Number of bytes in Buffer to fill with zeros. > - > - @return Buffer. > - > -**/ > -VOID * > -EFIAPI > -ZeroMem ( > - OUT VOID *Buffer, > - IN UINTN Length > - ) > -{ > - ASSERT (!(Buffer == NULL && Length > 0)); > - ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); > - return InternalMemZeroMem (Buffer, Length); > -} > -- > 2.7.4 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function 2016-08-31 9:07 [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib Ard Biesheuvel @ 2016-08-31 9:07 ` Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 3/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() " Ard Biesheuvel 2016-08-31 12:48 ` [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Leif Lindholm 3 siblings, 0 replies; 10+ messages in thread From: Ard Biesheuvel @ 2016-08-31 9:07 UTC (permalink / raw) To: edk2-devel, leif.lindholm; +Cc: Ard Biesheuvel BaseMemoryLib has recently been extended with an API function IsZeroGuid(), so copy the default implementation into BaseMemoryLibStm as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c b/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c index 2b4ed5775581..36d42d71d79a 100644 --- a/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c +++ b/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c @@ -130,3 +130,32 @@ ScanGuid ( } return NULL; } + +/** + Checks if the given GUID is a zero GUID. + + This function checks whether the given GUID is a zero GUID. If the GUID is + identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned. + + If Guid is NULL, then ASSERT(). + + @param Guid The pointer to a 128 bit GUID. + + @retval TRUE Guid is a zero GUID. + @retval FALSE Guid is not a zero GUID. + +**/ +BOOLEAN +EFIAPI +IsZeroGuid ( + IN CONST GUID *Guid + ) +{ + UINT64 LowPartOfGuid; + UINT64 HighPartOfGuid; + + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + + return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); +} -- 2.7.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function 2016-08-31 9:07 [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 2/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function Ard Biesheuvel @ 2016-08-31 9:07 ` Ard Biesheuvel 2016-08-31 12:48 ` [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Leif Lindholm 3 siblings, 0 replies; 10+ messages in thread From: Ard Biesheuvel @ 2016-08-31 9:07 UTC (permalink / raw) To: edk2-devel, leif.lindholm; +Cc: Ard Biesheuvel BaseMemoryLib has recently been extended with an API function IsZeroBuffer(), so copy the default implementation into BaseMemoryLibStm as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + ArmPkg/Library/BaseMemoryLibStm/IsZeroBufferWrapper.c | 54 ++++++++++++++++++++ ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++++++++++ ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++++++ 4 files changed, 101 insertions(+) diff --git a/ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf b/ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf index eac6cef96b31..30e2459bfd1e 100644 --- a/ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf +++ b/ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf @@ -45,6 +45,7 @@ [Sources.Common] SetMem16Wrapper.c SetMemWrapper.c CopyMemWrapper.c + IsZeroBufferWrapper.c MemLibGeneric.c MemLibGuid.c MemLibInternals.h diff --git a/ArmPkg/Library/BaseMemoryLibStm/IsZeroBufferWrapper.c b/ArmPkg/Library/BaseMemoryLibStm/IsZeroBufferWrapper.c new file mode 100644 index 000000000000..c42c1aa509b3 --- /dev/null +++ b/ArmPkg/Library/BaseMemoryLibStm/IsZeroBufferWrapper.c @@ -0,0 +1,54 @@ +/** @file + Implementation of IsZeroBuffer function. + + The following BaseMemoryLib instances contain the same copy of this file: + + BaseMemoryLib + BaseMemoryLibMmx + BaseMemoryLibSse2 + BaseMemoryLibRepStr + BaseMemoryLibOptDxe + BaseMemoryLibOptPei + PeiMemoryLib + UefiMemoryLib + + Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include "MemLibInternals.h" + +/** + Checks if the contents of a buffer are all zeros. + + This function checks whether the contents of a buffer are all zeros. If the + contents are all zeros, return TRUE. Otherwise, return FALSE. + + If Length > 0 and Buffer is NULL, then ASSERT(). + If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + + @param Buffer The pointer to the buffer to be checked. + @param Length The size of the buffer (in bytes) to be checked. + + @retval TRUE Contents of the buffer are all zeros. + @retval FALSE Contents of the buffer are not all zeros. + +**/ +BOOLEAN +EFIAPI +IsZeroBuffer ( + IN CONST VOID *Buffer, + IN UINTN Length + ) +{ + ASSERT (!(Buffer == NULL && Length > 0)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); + return InternalMemIsZeroBuffer (Buffer, Length); +} diff --git a/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c b/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c index 54c27012955f..43fbcb6b208f 100644 --- a/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c +++ b/ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c @@ -262,3 +262,32 @@ InternalMemScanMem64 ( } while (--Length != 0); return NULL; } + +/** + Checks whether the contents of a buffer are all zeros. + + @param Buffer The pointer to the buffer to be checked. + @param Length The size of the buffer (in bytes) to be checked. + + @retval TRUE Contents of the buffer are all zeros. + @retval FALSE Contents of the buffer are not all zeros. + +**/ +BOOLEAN +EFIAPI +InternalMemIsZeroBuffer ( + IN CONST VOID *Buffer, + IN UINTN Length + ) +{ + CONST UINT8 *BufferData; + UINTN Index; + + BufferData = Buffer; + for (Index = 0; Index < Length; Index++) { + if (BufferData[Index] != 0) { + return FALSE; + } + } + return TRUE; +} diff --git a/ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h b/ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h index 10c741f2c311..f7b44f527059 100644 --- a/ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h +++ b/ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h @@ -231,4 +231,21 @@ InternalMemScanMem64 ( IN UINT64 Value ); +/** + Checks whether the contents of a buffer are all zeros. + + @param Buffer The pointer to the buffer to be checked. + @param Length The size of the buffer (in bytes) to be checked. + + @retval TRUE Contents of the buffer are all zeros. + @retval FALSE Contents of the buffer are not all zeros. + +**/ +BOOLEAN +EFIAPI +InternalMemIsZeroBuffer ( + IN CONST VOID *Buffer, + IN UINTN Length + ); + #endif -- 2.7.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() 2016-08-31 9:07 [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Ard Biesheuvel ` (2 preceding siblings ...) 2016-08-31 9:07 ` [PATCH 3/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() " Ard Biesheuvel @ 2016-08-31 12:48 ` Leif Lindholm 2016-09-02 11:33 ` Laszlo Ersek 3 siblings, 1 reply; 10+ messages in thread From: Leif Lindholm @ 2016-08-31 12:48 UTC (permalink / raw) To: Ard Biesheuvel; +Cc: edk2-devel On Wed, Aug 31, 2016 at 10:07:30AM +0100, Ard Biesheuvel wrote: > The BaseMemoryLib API has recently been extended with IsZeroGuid() and > IsZeroBuffer(), so copy the generic implementations into the ArmPkg version > of this library. Maybe this is a good point at which to move these into MdePkg, in the hope that the ARM versions won't be overlooked in future API revisions? / Leif > Ard Biesheuvel (3): > ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib > ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function > ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function > > ArmPkg/ArmPkg.dsc | 2 - > ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + > ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} | 28 ++- > ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++ > ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 +++ > ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++ > ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- > ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- > ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ > ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ > ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ > ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- > ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- > ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- > ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- > ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- > ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- > ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- > ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- > ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- > ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- > ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- > ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- > 26 files changed, 91 insertions(+), 1921 deletions(-) > rename ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} (53%) > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c > delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c > > -- > 2.7.4 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() 2016-08-31 12:48 ` [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Leif Lindholm @ 2016-09-02 11:33 ` Laszlo Ersek 2016-09-02 13:01 ` Leif Lindholm 0 siblings, 1 reply; 10+ messages in thread From: Laszlo Ersek @ 2016-09-02 11:33 UTC (permalink / raw) To: Leif Lindholm, Ard Biesheuvel; +Cc: edk2-devel On 08/31/16 14:48, Leif Lindholm wrote: > On Wed, Aug 31, 2016 at 10:07:30AM +0100, Ard Biesheuvel wrote: >> The BaseMemoryLib API has recently been extended with IsZeroGuid() and >> IsZeroBuffer(), so copy the generic implementations into the ArmPkg version >> of this library. > > Maybe this is a good point at which to move these into MdePkg, in the > hope that the ARM versions won't be overlooked in future API > revisions? I strongly suggest / request that your (good) suggestion be implemented as a separate endeavor. Moving this stuff into MdePkg is definitely justified, but it will almost certainly take a good chunk of time. Meanwhile the ArmVirtQemu builds remain broken. I suggest to go ahead and commit patches #2 and #3 as well, and swiftly at that. And, in order to keep ourselves honest about the longer term goal, I propose to file a bug for the code movement in our Bugzilla instance. (The affected packages should be MdePkg + ArmPkg.) For patches #2 and #3: Reviewed-by: Laszlo Ersek <lersek@redhat.com> Can we please commit these patches today? Thanks, Laszlo > > / > Leif > >> Ard Biesheuvel (3): >> ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib >> ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function >> ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function >> >> ArmPkg/ArmPkg.dsc | 2 - >> ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + >> ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} | 28 ++- >> ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++ >> ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 +++ >> ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++ >> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- >> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- >> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ >> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ >> ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ >> ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- >> ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- >> ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- >> ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- >> ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- >> ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- >> ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- >> ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- >> ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- >> ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- >> ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- >> 26 files changed, 91 insertions(+), 1921 deletions(-) >> rename ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} (53%) >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c >> >> -- >> 2.7.4 >> > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() 2016-09-02 11:33 ` Laszlo Ersek @ 2016-09-02 13:01 ` Leif Lindholm 2016-09-02 14:18 ` Laszlo Ersek 0 siblings, 1 reply; 10+ messages in thread From: Leif Lindholm @ 2016-09-02 13:01 UTC (permalink / raw) To: Laszlo Ersek; +Cc: Ard Biesheuvel, edk2-devel On Fri, Sep 02, 2016 at 01:33:21PM +0200, Laszlo Ersek wrote: > > Maybe this is a good point at which to move these into MdePkg, in the > > hope that the ARM versions won't be overlooked in future API > > revisions? > > I strongly suggest / request that your (good) suggestion be implemented > as a separate endeavor. Moving this stuff into MdePkg is definitely > justified, but it will almost certainly take a good chunk of time. > Meanwhile the ArmVirtQemu builds remain broken. > > I suggest to go ahead and commit patches #2 and #3 as well, and swiftly > at that. And, in order to keep ourselves honest about the longer term > goal, I propose to file a bug for the code movement in our Bugzilla > instance. (The affected packages should be MdePkg + ArmPkg.) Surely if we're doing a panic fix, that should be to revert 313831d-72388f9? If we're not doing that, let's do the thing that will reduce the likelihood of this breaking again. In the interest of speeding this up, I would propose to wait with Ard's latest set (which deserves and is likely to see some more discussion) and go ahead with: - Nuking BaseMemoryLibVstm - Moving BaseMemoryLibStm to MdePkg - Updating platforms in edk2 to reflect new location of BaseMemoryLibStm - Add the new functions to BaseMemoryLibStm This will interfere with nothing else under MdePkg, so could hopefully be merged today anyway. Would that be an acceptable compromise? Regards, Leif > For patches #2 and #3: > > Reviewed-by: Laszlo Ersek <lersek@redhat.com> > > Can we please commit these patches today? > > Thanks, > Laszlo > > > > > / > > Leif > > > >> Ard Biesheuvel (3): > >> ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib > >> ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function > >> ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function > >> > >> ArmPkg/ArmPkg.dsc | 2 - > >> ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + > >> ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} | 28 ++- > >> ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++ > >> ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 +++ > >> ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++ > >> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- > >> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- > >> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ > >> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ > >> ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ > >> ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- > >> ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- > >> ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- > >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- > >> ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- > >> ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- > >> ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- > >> 26 files changed, 91 insertions(+), 1921 deletions(-) > >> rename ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} (53%) > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c > >> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c > >> > >> -- > >> 2.7.4 > >> > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() 2016-09-02 13:01 ` Leif Lindholm @ 2016-09-02 14:18 ` Laszlo Ersek 2016-09-02 14:40 ` Leif Lindholm 0 siblings, 1 reply; 10+ messages in thread From: Laszlo Ersek @ 2016-09-02 14:18 UTC (permalink / raw) To: Leif Lindholm; +Cc: Ard Biesheuvel, edk2-devel, Wu, Hao A On 09/02/16 15:01, Leif Lindholm wrote: > On Fri, Sep 02, 2016 at 01:33:21PM +0200, Laszlo Ersek wrote: >>> Maybe this is a good point at which to move these into MdePkg, in the >>> hope that the ARM versions won't be overlooked in future API >>> revisions? >> >> I strongly suggest / request that your (good) suggestion be implemented >> as a separate endeavor. Moving this stuff into MdePkg is definitely >> justified, but it will almost certainly take a good chunk of time. >> Meanwhile the ArmVirtQemu builds remain broken. >> >> I suggest to go ahead and commit patches #2 and #3 as well, and swiftly >> at that. And, in order to keep ourselves honest about the longer term >> goal, I propose to file a bug for the code movement in our Bugzilla >> instance. (The affected packages should be MdePkg + ArmPkg.) > > Surely if we're doing a panic fix, that should be to revert > 313831d-72388f9? I preferred a quick fix that was also not destructive. Patches #2 and #3 here can be considered the initial, basic implementation of the new interfaces for ARM/AARCH64, which could (and should) have been part of the original series (that introduced the breakage by missing them). IOW, #2 and #3 could be construed as the continuation of that initial series, for ARM/AARCH64. > If we're not doing that, let's do the thing that will reduce the > likelihood of this breaking again. > In the interest of speeding this up, I would propose to wait with > Ard's latest set (which deserves and is likely to see some more > discussion) and go ahead with: > - Nuking BaseMemoryLibVstm > - Moving BaseMemoryLibStm to MdePkg > - Updating platforms in edk2 to reflect new location of > BaseMemoryLibStm > - Add the new functions to BaseMemoryLibStm > > This will interfere with nothing else under MdePkg, so could hopefully > be merged today anyway. > > Would that be an acceptable compromise? I'd just like the tree to resume building. Doing anything at all under MdePkg will require MdePkg reviewers to ACK the changes, which will introduce delays. (Not because those reviewers are very slow, but because MdePkg changes are always scrutinized, rightfully, with a fine toothed comb.) I wouldn't mind reverting the initial series either, except that it'd require reviews for MdePkg and SecurityPkg changes... Same problem. I'm quite sad that Hao missed grepping the tree for all INF files with 'LIBRARY_CLASS *= *BaseMemoryLib', when posting the original stuff :( $ git grep -l 'LIBRARY_CLASS *= *BaseMemoryLib' -- '*inf' ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf <--------- MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf Sigh. Thanks Laszlo > > Regards, > > Leif > >> For patches #2 and #3: >> >> Reviewed-by: Laszlo Ersek <lersek@redhat.com> >> >> Can we please commit these patches today? >> >> Thanks, >> Laszlo >> >>> >>> / >>> Leif >>> >>>> Ard Biesheuvel (3): >>>> ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib >>>> ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function >>>> ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function >>>> >>>> ArmPkg/ArmPkg.dsc | 2 - >>>> ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + >>>> ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} | 28 ++- >>>> ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++ >>>> ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 +++ >>>> ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++ >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ >>>> ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ >>>> ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- >>>> ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- >>>> ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- >>>> 26 files changed, 91 insertions(+), 1921 deletions(-) >>>> rename ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} (53%) >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c >>>> >>>> -- >>>> 2.7.4 >>>> >>> _______________________________________________ >>> edk2-devel mailing list >>> edk2-devel@lists.01.org >>> https://lists.01.org/mailman/listinfo/edk2-devel >>> >> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() 2016-09-02 14:18 ` Laszlo Ersek @ 2016-09-02 14:40 ` Leif Lindholm 0 siblings, 0 replies; 10+ messages in thread From: Leif Lindholm @ 2016-09-02 14:40 UTC (permalink / raw) To: Laszlo Ersek Cc: Ard Biesheuvel, edk2-devel, Wu, Hao A, afish, michael.d.kinney On Fri, Sep 02, 2016 at 04:18:11PM +0200, Laszlo Ersek wrote: > > If we're not doing that, let's do the thing that will reduce the > > likelihood of this breaking again. > > In the interest of speeding this up, I would propose to wait with > > Ard's latest set (which deserves and is likely to see some more > > discussion) and go ahead with: > > - Nuking BaseMemoryLibVstm > > - Moving BaseMemoryLibStm to MdePkg > > - Updating platforms in edk2 to reflect new location of > > BaseMemoryLibStm > > - Add the new functions to BaseMemoryLibStm > > > > This will interfere with nothing else under MdePkg, so could hopefully > > be merged today anyway. > > > > Would that be an acceptable compromise? > > I'd just like the tree to resume building. Doing anything at all under > MdePkg will require MdePkg reviewers to ACK the changes, which will > introduce delays. (Not because those reviewers are very slow, but > because MdePkg changes are always scrutinized, rightfully, with a fine > toothed comb.) So, I've sent out the series I proposed (Ard had already pushed the removal of BaseMemoryLibVstm). The series touches nothing other than moving the BaseMemoryLibStm directory under MdePkg, and adding the new functions to that directory. Hopefully Mike should be able to pick this up today. Otherwise I could always make my first attempt at invoking steward privilege and push myself (but I would want some R-b for that)... On that note - adding Andrew for opinions. Regards, Leif > I wouldn't mind reverting the initial series either, except that it'd > require reviews for MdePkg and SecurityPkg changes... Same problem. > > I'm quite sad that Hao missed grepping the tree for all INF files with > 'LIBRARY_CLASS *= *BaseMemoryLib', when posting the original stuff :( > > $ git grep -l 'LIBRARY_CLASS *= *BaseMemoryLib' -- '*inf' > > ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf <--------- > MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf > MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf > MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf > MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf > MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf > MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf > MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf > > Sigh. > > Thanks > Laszlo > > > > > Regards, > > > > Leif > > > >> For patches #2 and #3: > >> > >> Reviewed-by: Laszlo Ersek <lersek@redhat.com> > >> > >> Can we please commit these patches today? > >> > >> Thanks, > >> Laszlo > >> > >>> > >>> / > >>> Leif > >>> > >>>> Ard Biesheuvel (3): > >>>> ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib > >>>> ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function > >>>> ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() API function > >>>> > >>>> ArmPkg/ArmPkg.dsc | 2 - > >>>> ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf | 1 + > >>>> ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} | 28 ++- > >>>> ArmPkg/Library/BaseMemoryLibStm/MemLibGeneric.c | 29 +++ > >>>> ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 +++ > >>>> ArmPkg/Library/BaseMemoryLibStm/MemLibInternals.h | 17 ++ > >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 112 --------- > >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm | 114 --------- > >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S | 76 ------ > >>>> ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm | 78 ------ > >>>> ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf | 70 ------ > >>>> ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c | 66 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c | 62 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c | 63 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c | 264 -------------------- > >>>> ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c | 132 ---------- > >>>> ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h | 234 ----------------- > >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c | 67 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c | 66 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c | 67 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c | 99 -------- > >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem.c | 53 ---- > >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c | 64 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c | 64 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c | 64 ----- > >>>> ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c | 91 ------- > >>>> 26 files changed, 91 insertions(+), 1921 deletions(-) > >>>> rename ArmPkg/Library/{BaseMemoryLibVstm/ZeroMemWrapper.c => BaseMemoryLibStm/IsZeroBufferWrapper.c} (53%) > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.asm > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.asm > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CompareMemWrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMem.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/CopyMemWrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGeneric.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/MemLibInternals.h > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem16Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem32Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem64Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/ScanMem8Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem16Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem32Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMem64Wrapper.c > >>>> delete mode 100644 ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c > >>>> > >>>> -- > >>>> 2.7.4 > >>>> > >>> _______________________________________________ > >>> edk2-devel mailing list > >>> edk2-devel@lists.01.org > >>> https://lists.01.org/mailman/listinfo/edk2-devel > >>> > >> > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-09-02 14:40 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-08-31 9:07 [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 1/3] ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib Ard Biesheuvel 2016-09-01 12:58 ` Leif Lindholm 2016-08-31 9:07 ` [PATCH 2/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroGuid() API function Ard Biesheuvel 2016-08-31 9:07 ` [PATCH 3/3] ArmPkg/BaseMemoryLibStm: implement new IsZeroBuffer() " Ard Biesheuvel 2016-08-31 12:48 ` [PATCH 0/3] ArmPkg: introduce IsZeroGuid() and IsZeroBuffer() Leif Lindholm 2016-09-02 11:33 ` Laszlo Ersek 2016-09-02 13:01 ` Leif Lindholm 2016-09-02 14:18 ` Laszlo Ersek 2016-09-02 14:40 ` Leif Lindholm
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox