Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103777
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
r58459 r58466 2 2 # Instance of Base Memory Library optimized for use in DXE phase. 3 3 # 4 # Base Memory Library that is optimized for use in DXE phase. 4 # Base Memory Library that is optimized for use in DXE phase. 5 5 # Uses REP, MMX, XMM registers as required for best performance. 6 6 # … … 24 24 MODULE_TYPE = BASE 25 25 VERSION_STRING = 1.0 26 LIBRARY_CLASS = BaseMemoryLib 26 LIBRARY_CLASS = BaseMemoryLib 27 27 28 28 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c
r48674 r58466 32 32 value returned is the first mismatched byte in SourceBuffer subtracted from the first 33 33 mismatched byte in DestinationBuffer. 34 34 35 35 If Length > 0 and DestinationBuffer is NULL, then ASSERT(). 36 36 If Length > 0 and SourceBuffer is NULL, then ASSERT(). … … 45 45 @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first 46 46 mismatched byte in DestinationBuffer. 47 47 48 48 **/ 49 49 INTN -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c
r48674 r58466 3 3 4 4 The following BaseMemoryLib instances contain the same copy of this file: 5 5 6 6 BaseMemoryLib 7 7 BaseMemoryLibMmx … … 32 32 DestinationBuffer. The implementation must be reentrant, and it must handle the case 33 33 where SourceBuffer overlaps DestinationBuffer. 34 34 35 35 If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). 36 36 If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c
r48674 r58466 3 3 4 4 The following BaseMemoryLib instances contain the same copy of this file: 5 5 6 6 BaseMemoryLib 7 7 BaseMemoryLibMmx … … 31 31 This function copies the contents of the 128-bit GUID specified by SourceGuid to 32 32 DestinationGuid, and returns DestinationGuid. 33 33 34 34 If DestinationGuid is NULL, then ASSERT(). 35 35 If SourceGuid is NULL, then ASSERT(). … … 64 64 This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned. 65 65 If there are any bit differences in the two GUIDs, then FALSE is returned. 66 66 67 67 If Guid1 is NULL, then ASSERT(). 68 68 If Guid2 is NULL, then ASSERT(). … … 104 104 GUID in the target buffer is returned. If no match is found, then NULL is returned. 105 105 If Length is 0, then NULL is returned. 106 106 107 107 If Length > 0 and Buffer is NULL, then ASSERT(). 108 108 If Buffer is not aligned on a 32-bit boundary, then ASSERT(). -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
r48674 r58466 34 34 then a pointer to the matching byte in the target buffer is returned. If no match is found, 35 35 then NULL is returned. If Length is 0, then NULL is returned. 36 36 37 37 If Length > 0 and Buffer is NULL, then ASSERT(). 38 38 If Buffer is not aligned on a 16-bit boundary, then ASSERT(). -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
r48674 r58466 33 33 then a pointer to the matching byte in the target buffer is returned. If no match is found, 34 34 then NULL is returned. If Length is 0, then NULL is returned. 35 35 36 36 If Length > 0 and Buffer is NULL, then ASSERT(). 37 37 If Buffer is not aligned on a 32-bit boundary, then ASSERT(). -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
r48674 r58466 34 34 then a pointer to the matching byte in the target buffer is returned. If no match is found, 35 35 then NULL is returned. If Length is 0, then NULL is returned. 36 36 37 37 If Length > 0 and Buffer is NULL, then ASSERT(). 38 38 If Buffer is not aligned on a 64-bit boundary, then ASSERT(). -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
r48674 r58466 34 34 then a pointer to the matching byte in the target buffer is returned. If no match is found, 35 35 then NULL is returned. If Length is 0, then NULL is returned. 36 36 37 37 If Length > 0 and Buffer is NULL, then ASSERT(). 38 38 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). … … 58 58 ASSERT (Buffer != NULL); 59 59 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); 60 60 61 61 return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); 62 62 } 63 63 64 64 /** 65 Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 65 Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 66 66 UINTN sized value in the target buffer. 67 67 … … 70 70 then a pointer to the matching byte in the target buffer is returned. If no match is found, 71 71 then NULL is returned. If Length is 0, then NULL is returned. 72 72 73 73 If Length > 0 and Buffer is NULL, then ASSERT(). 74 74 If Buffer is not aligned on a UINTN boundary, then ASSERT(). … … 78 78 @param Buffer The pointer to the target buffer to scan. 79 79 @param Length The number of bytes in Buffer to scan. 80 @param Value 80 @param Value 81 81 The value to search for in the target buffer. 82 82 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
r48674 r58466 30 30 31 31 This function fills Length bytes of Buffer with Value, and returns Buffer. 32 32 33 33 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 34 34 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
r48674 r58466 42 42 # IN UINTN Length 43 43 # ); 44 #------------------------------------------------------------------------------ 44 #------------------------------------------------------------------------------ 45 45 ASM_GLOBAL ASM_PFX(InternalMemCompareMem) 46 46 ASM_PFX(InternalMemCompareMem): -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
r48674 r58466 40 40 movq %rdx, %rsi # rsi <- Source 41 41 movq %rcx, %rdi # rdi <- Destination 42 leaq -1(%rsi,%r8,), %r9 # r9 <- Last byte of Source 42 leaq -1(%rsi,%r8,), %r9 # r9 <- Last byte of Source 43 43 cmpq %rdi, %rsi 44 44 movq %rdi, %rax # rax <- Destination as return value -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
r48674 r58466 48 48 shrq $3, %rcx # rcx = rcx / 8 49 49 cld 50 rep stosq 50 rep stosq 51 51 movq %rdx, %rcx # rcx = rdx 52 52 andq $7, %rcx # rcx = rcx & 7 53 rep stosb 53 rep stosb 54 54 popq %rax # rax = Buffer 55 55 popq %rbx -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.asm
r48674 r58466 48 48 shr rcx, 3 ; rcx = rcx / 8 49 49 cld 50 rep stosq 50 rep stosq 51 51 mov rcx, rdx ; rcx = rdx 52 52 and rcx, 7 ; rcx = rcx & 7 53 rep stosb 53 rep stosb 54 54 pop rax ; rax = Buffer 55 55 ret -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c
r48674 r58466 12 12 PeiMemoryLib 13 13 UefiMemoryLib 14 14 15 15 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 16 16 This program and the accompanying materials … … 30 30 31 31 This function fills Length bytes of Buffer with zeros, and returns Buffer. 32 32 33 33 If Length > 0 and Buffer is NULL, then ASSERT(). 34 34 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
Note:
See TracChangeset
for help on using the changeset viewer.