Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Utility functions needed for (some) EABI conformant tool chains. |
| 3 | * |
| 4 | * (C) Copyright 2009 Wolfgang Denk <wd@denx.de> |
| 5 | * |
| 6 | * This program is Free Software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; either version 2 of the |
| 9 | * License, or (at your option) any later version. |
Martin Roth | 4af5886 | 2016-01-21 13:15:16 -0700 | [diff] [blame] | 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 15 | */ |
| 16 | |
Stefan Reinauer | 808f784 | 2015-07-08 23:18:11 +0200 | [diff] [blame] | 17 | #include <stdint.h> |
| 18 | #include <stddef.h> |
| 19 | #include <string.h> |
Hung-Te Lin | 439e0d2 | 2013-02-06 17:48:20 +0800 | [diff] [blame] | 20 | #include <console/console.h> |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 21 | |
| 22 | /* FIXME(dhendrix): prototypes added for assembler */ |
Logan Carlson | c058d1c | 2017-05-30 15:31:10 -0600 | [diff] [blame] | 23 | int raise(int signum) __attribute__((used)); |
| 24 | int raise(int signum) |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 25 | { |
Hung-Te Lin | 439e0d2 | 2013-02-06 17:48:20 +0800 | [diff] [blame] | 26 | printk(BIOS_CRIT, "raise: Signal # %d caught\n", signum); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | /* Dummy function to avoid linker complaints */ |
Stefan Reinauer | d96541f | 2013-09-10 11:02:58 -0700 | [diff] [blame] | 31 | void __aeabi_unwind_cpp_pr0(void) __attribute__((used)); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 32 | void __aeabi_unwind_cpp_pr0(void) |
| 33 | { |
Stefan Reinauer | 808f784 | 2015-07-08 23:18:11 +0200 | [diff] [blame] | 34 | } |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 35 | |
Stefan Reinauer | d96541f | 2013-09-10 11:02:58 -0700 | [diff] [blame] | 36 | void __aeabi_unwind_cpp_pr1(void) __attribute__((used)); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 37 | void __aeabi_unwind_cpp_pr1(void) |
| 38 | { |
Stefan Reinauer | 808f784 | 2015-07-08 23:18:11 +0200 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | void __aeabi_memcpy(void *dest, const void *src, size_t n); |
| 42 | void __aeabi_memcpy(void *dest, const void *src, size_t n) |
| 43 | { |
| 44 | (void) memcpy(dest, src, n); |
| 45 | } |
| 46 | |
| 47 | void __aeabi_memset(void *dest, size_t n, int c); |
| 48 | void __aeabi_memset(void *dest, size_t n, int c) |
| 49 | { |
| 50 | (void) memset(dest, c, n); |
| 51 | } |