diff options
author | Julius Werner <jwerner@chromium.org> | 2019-08-16 15:35:39 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-20 10:10:48 +0000 |
commit | f96d9051c2b39544300d35f64ce92502e1e230c0 (patch) | |
tree | 141966be0dedd056261528e55e05efde4b20b56d /payloads/libpayload/arch/mips/string.c | |
parent | 63c444a69b98bc8a86719699423b3273cc5759e8 (diff) | |
download | coreboot-f96d9051c2b39544300d35f64ce92502e1e230c0.tar.xz |
Remove MIPS architecture
The MIPS architecture port has been added 5+ years ago in order to
support a Chrome OS project that ended up going nowhere. No other board
has used it since and nobody is still willing or has the expertise and
hardware to maintain it. We have decided that it has become too much of
a mainenance burden and the chance of anyone ever reviving it seems too
slim at this point. This patch eliminates all MIPS code and
MIPS-specific hacks.
Change-Id: I5e49451cd055bbab0a15dcae5f53e0172e6e2ebe
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34919
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/arch/mips/string.c')
-rw-r--r-- | payloads/libpayload/arch/mips/string.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/payloads/libpayload/arch/mips/string.c b/payloads/libpayload/arch/mips/string.c deleted file mode 100644 index 79cc8d260a..0000000000 --- a/payloads/libpayload/arch/mips/string.c +++ /dev/null @@ -1,77 +0,0 @@ - /* - * This file is part of the libpayload project. - * - * Copyright (C) 2014 Imagination Technologies - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * 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 <stdint.h> -#include "string.h" - -/* - * Alternative string functions to the default ones are added - * because there is no guarantee that the provided source and - * destination addresses are properly aligned; - * The default string functions work with multiple of 4 bytes - * (sizeof(unsinged long)); MIPS will use LW/SW instructions - * for these operations and if the source and destination - * addresses are not aligned it will trigger an exception. - */ - -void *memcpy(void *dest, const void *src, size_t n) -{ - u8 *ptr_d = dest; - const u8 *ptr_s = src; - size_t i; - - for (i = 0; i < n; i++) - *ptr_d++ = *ptr_s++; - - return dest; -} - -void *memmove(void *dest, const void *src, size_t n) -{ - if ((src < dest) && (dest - src < n)) { - u8 *ptr_d = dest; - const u8 *ptr_s = src; - - /* copy backwards */ - while (n--) - ptr_d[n] = ptr_s[n]; - - return dest; - } - - /* copy forwards */ - return memcpy(dest, src, n); -} - -void *memset(void *s, int c, size_t n) -{ - u8 *ptr = s; - size_t i; - - for (i = 0; i < n; i++) - *ptr++ = c; - - return s; -} - -int memcmp(const void *s1, const void *s2, size_t n) -{ - size_t i; - - for (i = 0; i < n; i++) - if (((u8 *)s1)[i] != ((u8 *)s2)[i]) - return ((u8 *)s1)[i] - ((u8 *)s2)[i]; - return 0; -} |