As discussed on the mailing list and voted upon, the coreboot project is going to move the majority of copyrights out of the headers and into an AUTHORS file. This will happen a bit at a time, as we'll be unifying license headers at the same time. Additional changes in this patch: - Make sure files say that they're part of the coreboot project - Move descriptions below the license header Note that the file include/arch/acpi.h is a fantastic example of why moving to the authors file is needed. Excluding the guard statements, it has 8 lines of copyrights for 3 function declarations. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I334baab2b4311eb1bd9ce3f67f49a68e8b73630c Reviewed-on: https://review.coreboot.org/c/coreboot/+/34606 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
50 lines
1.0 KiB
ArmAsm
50 lines
1.0 KiB
ArmAsm
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#include <arch/asm.h>
|
|
|
|
/*
|
|
* Copy a buffer from src to dest (alignment handled by the hardware)
|
|
*
|
|
* Parameters:
|
|
* x0 - dest
|
|
* x1 - src
|
|
* x2 - n
|
|
* Returns:
|
|
* x0 - dest
|
|
*/
|
|
ENTRY(memcpy)
|
|
mov x4, x0
|
|
subs x2, x2, #8
|
|
b.mi 2f
|
|
1: ldr x3, [x1], #8
|
|
subs x2, x2, #8
|
|
str x3, [x4], #8
|
|
b.pl 1b
|
|
2: adds x2, x2, #4
|
|
b.mi 3f
|
|
ldr w3, [x1], #4
|
|
sub x2, x2, #4
|
|
str w3, [x4], #4
|
|
3: adds x2, x2, #2
|
|
b.mi 4f
|
|
ldrh w3, [x1], #2
|
|
sub x2, x2, #2
|
|
strh w3, [x4], #2
|
|
4: adds x2, x2, #1
|
|
b.mi 5f
|
|
ldrb w3, [x1]
|
|
strb w3, [x4]
|
|
5: ret
|
|
ENDPROC(memcpy)
|