Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Wolfgang Denk | d47f486 | 2009-08-17 13:17:29 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Utility functions needed for (some) EABI conformant tool chains. |
| 4 | * |
| 5 | * (C) Copyright 2009 Wolfgang Denk <wd@denx.de> |
Wolfgang Denk | d47f486 | 2009-08-17 13:17:29 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | |
| 10 | int raise (int signum) |
| 11 | { |
Simon Glass | 188d971 | 2012-03-03 12:33:15 -0800 | [diff] [blame] | 12 | /* Even if printf() is available, it's large. Punt it for SPL builds */ |
| 13 | #if !defined(CONFIG_SPL_BUILD) |
Wolfgang Denk | d47f486 | 2009-08-17 13:17:29 +0200 | [diff] [blame] | 14 | printf("raise: Signal # %d caught\n", signum); |
Christian Riesch | 86657d4 | 2011-11-29 00:11:03 +0000 | [diff] [blame] | 15 | #endif |
Wolfgang Denk | d47f486 | 2009-08-17 13:17:29 +0200 | [diff] [blame] | 16 | return 0; |
| 17 | } |
Wolfgang Denk | 36b6970 | 2010-05-10 23:08:02 +0200 | [diff] [blame] | 18 | |
| 19 | /* Dummy function to avoid linker complaints */ |
| 20 | void __aeabi_unwind_cpp_pr0(void) |
| 21 | { |
Jeroen Hofstee | 30f527d | 2014-07-30 21:54:53 +0200 | [diff] [blame] | 22 | } |
Wolfgang Grandegger | 74b04d9 | 2011-11-10 01:51:29 +0000 | [diff] [blame] | 23 | |
| 24 | void __aeabi_unwind_cpp_pr1(void) |
| 25 | { |
Jeroen Hofstee | 30f527d | 2014-07-30 21:54:53 +0200 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | /* Copy memory like memcpy, but no return value required. */ |
| 29 | void __aeabi_memcpy(void *dest, const void *src, size_t n) |
| 30 | { |
| 31 | (void) memcpy(dest, src, n); |
| 32 | } |
| 33 | |
| 34 | void __aeabi_memset(void *dest, size_t n, int c) |
| 35 | { |
| 36 | (void) memset(dest, c, n); |
| 37 | } |