blob: 15f7d366671004d37463ebc07ac0968c096efba7 [file] [log] [blame]
Stefan Reinauer52db0b92012-12-07 17:15:04 -08001/*
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 Roth4af58862016-01-21 13:15:16 -070010 *
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 Reinauer52db0b92012-12-07 17:15:04 -080015 */
16
Stefan Reinauer808f7842015-07-08 23:18:11 +020017#include <stdint.h>
18#include <stddef.h>
19#include <string.h>
Hung-Te Lin439e0d22013-02-06 17:48:20 +080020#include <console/console.h>
Stefan Reinauer52db0b92012-12-07 17:15:04 -080021
22/* FIXME(dhendrix): prototypes added for assembler */
Logan Carlsonc058d1c2017-05-30 15:31:10 -060023int raise(int signum) __attribute__((used));
24int raise(int signum)
Stefan Reinauer52db0b92012-12-07 17:15:04 -080025{
Hung-Te Lin439e0d22013-02-06 17:48:20 +080026 printk(BIOS_CRIT, "raise: Signal # %d caught\n", signum);
Stefan Reinauer52db0b92012-12-07 17:15:04 -080027 return 0;
28}
29
30/* Dummy function to avoid linker complaints */
Stefan Reinauerd96541f2013-09-10 11:02:58 -070031void __aeabi_unwind_cpp_pr0(void) __attribute__((used));
Stefan Reinauer52db0b92012-12-07 17:15:04 -080032void __aeabi_unwind_cpp_pr0(void)
33{
Stefan Reinauer808f7842015-07-08 23:18:11 +020034}
Stefan Reinauer52db0b92012-12-07 17:15:04 -080035
Stefan Reinauerd96541f2013-09-10 11:02:58 -070036void __aeabi_unwind_cpp_pr1(void) __attribute__((used));
Stefan Reinauer52db0b92012-12-07 17:15:04 -080037void __aeabi_unwind_cpp_pr1(void)
38{
Stefan Reinauer808f7842015-07-08 23:18:11 +020039}
40
41void __aeabi_memcpy(void *dest, const void *src, size_t n);
42void __aeabi_memcpy(void *dest, const void *src, size_t n)
43{
44 (void) memcpy(dest, src, n);
45}
46
47void __aeabi_memset(void *dest, size_t n, int c);
48void __aeabi_memset(void *dest, size_t n, int c)
49{
50 (void) memset(dest, c, n);
51}