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. |
| 10 | */ |
| 11 | |
Stefan Reinauer | 808f784 | 2015-07-08 23:18:11 +0200 | [diff] [blame] | 12 | #include <stdint.h> |
| 13 | #include <stddef.h> |
| 14 | #include <string.h> |
Hung-Te Lin | 439e0d2 | 2013-02-06 17:48:20 +0800 | [diff] [blame] | 15 | #include <console/console.h> |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 16 | |
| 17 | /* FIXME(dhendrix): prototypes added for assembler */ |
Stefan Reinauer | d96541f | 2013-09-10 11:02:58 -0700 | [diff] [blame] | 18 | int raise (int signum) __attribute__((used)); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 19 | int raise (int signum) |
| 20 | { |
Hung-Te Lin | 439e0d2 | 2013-02-06 17:48:20 +0800 | [diff] [blame] | 21 | printk(BIOS_CRIT, "raise: Signal # %d caught\n", signum); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | /* Dummy function to avoid linker complaints */ |
Stefan Reinauer | d96541f | 2013-09-10 11:02:58 -0700 | [diff] [blame] | 26 | void __aeabi_unwind_cpp_pr0(void) __attribute__((used)); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 27 | void __aeabi_unwind_cpp_pr0(void) |
| 28 | { |
Stefan Reinauer | 808f784 | 2015-07-08 23:18:11 +0200 | [diff] [blame] | 29 | } |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 30 | |
Stefan Reinauer | d96541f | 2013-09-10 11:02:58 -0700 | [diff] [blame] | 31 | void __aeabi_unwind_cpp_pr1(void) __attribute__((used)); |
Stefan Reinauer | 52db0b9 | 2012-12-07 17:15:04 -0800 | [diff] [blame] | 32 | void __aeabi_unwind_cpp_pr1(void) |
| 33 | { |
Stefan Reinauer | 808f784 | 2015-07-08 23:18:11 +0200 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | void __aeabi_memcpy(void *dest, const void *src, size_t n); |
| 37 | void __aeabi_memcpy(void *dest, const void *src, size_t n) |
| 38 | { |
| 39 | (void) memcpy(dest, src, n); |
| 40 | } |
| 41 | |
| 42 | void __aeabi_memset(void *dest, size_t n, int c); |
| 43 | void __aeabi_memset(void *dest, size_t n, int c) |
| 44 | { |
| 45 | (void) memset(dest, c, n); |
| 46 | } |