Remove the memcpy implementation from the ARM port, and add a
generic version to the core library for all architectures.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
[antonios.motakis@huawei.com: removed all signs of weakness!]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
arm_read_sysreg(MPIDR_EL1, mpidr);
return mpidr & MPIDR_CPUID_MASK;
}
-
-void *memcpy(void *dest, const void *src, unsigned long n)
-{
- unsigned long i;
- const char *csrc = src;
- char *cdest = dest;
-
- for (i = 0; i < n; i++)
- cdest[i] = csrc[i];
-
- return dest;
-}
}
return *(unsigned char *)s1 - *(unsigned char *)s2;
}
+
+void *memcpy(void *dest, const void *src, unsigned long n)
+{
+ const u8 *s = src;
+ u8 *d = dest;
+
+ while (n-- > 0)
+ *d++ = *s++;
+ return dest;
+}