diff options
Diffstat (limited to 'libc/sysdeps/linux/bfin/sys')
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/cachectl.h | 25 | ||||
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/elf.h | 5 | ||||
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/io.h | 7 | ||||
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/procfs.h | 5 | ||||
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/reg.h | 133 | ||||
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/ucontext.h | 11 | ||||
| -rw-r--r-- | libc/sysdeps/linux/bfin/sys/user.h | 57 |
7 files changed, 98 insertions, 145 deletions
diff --git a/libc/sysdeps/linux/bfin/sys/cachectl.h b/libc/sysdeps/linux/bfin/sys/cachectl.h new file mode 100644 index 000000000..f241e657d --- /dev/null +++ b/libc/sysdeps/linux/bfin/sys/cachectl.h @@ -0,0 +1,25 @@ +/* + * cachectl.h - Functions for cache control on Blackfin. + * + * Copyright (C) 2010 Analog Devices, Inc. + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#ifndef _SYS_CACHECTL_H +#define _SYS_CACHECTL_H 1 + +#include <features.h> + +/* + * Get the kernel definition for the flag bits + */ +#include <asm/cachectl.h> + +__BEGIN_DECLS + +extern int cacheflush (void *addr, const int nbytes, const int flags); + +__END_DECLS + +#endif /* sys/cachectl.h */ diff --git a/libc/sysdeps/linux/bfin/sys/elf.h b/libc/sysdeps/linux/bfin/sys/elf.h index d959cdca1..9d64e9768 100644 --- a/libc/sysdeps/linux/bfin/sys/elf.h +++ b/libc/sysdeps/linux/bfin/sys/elf.h @@ -12,9 +12,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/libc/sysdeps/linux/bfin/sys/io.h b/libc/sysdeps/linux/bfin/sys/io.h index 68639902c..f77177a25 100644 --- a/libc/sysdeps/linux/bfin/sys/io.h +++ b/libc/sysdeps/linux/bfin/sys/io.h @@ -12,9 +12,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ #ifndef _SYS_IO_H @@ -23,6 +22,7 @@ __BEGIN_DECLS +#if defined __UCLIBC_LINUX_SPECIFIC__ /* If TURN_ON is TRUE, request for permission to do direct i/o on the port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O permission off for that range. This call requires root privileges. */ @@ -33,6 +33,7 @@ extern int ioperm (unsigned long int __from, unsigned long int __num, permission to access any I/O port is granted. This call requires root privileges. */ extern int iopl (int __level) __THROW; +#endif /* __UCLIBC_LINUX_SPECIFIC__ */ /* The functions that actually perform reads and writes. */ extern unsigned char inb (unsigned long int port) __THROW; diff --git a/libc/sysdeps/linux/bfin/sys/procfs.h b/libc/sysdeps/linux/bfin/sys/procfs.h index 45a65f391..81671760d 100644 --- a/libc/sysdeps/linux/bfin/sys/procfs.h +++ b/libc/sysdeps/linux/bfin/sys/procfs.h @@ -12,9 +12,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/libc/sysdeps/linux/bfin/sys/reg.h b/libc/sysdeps/linux/bfin/sys/reg.h deleted file mode 100644 index 4ce6e15aa..000000000 --- a/libc/sysdeps/linux/bfin/sys/reg.h +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_REG_H -#define _SYS_REG_H 1 - -/* Index into an array of 4 byte integers returned from ptrace for - location of the users' stored general purpose registers. */ - -enum -{ - PT_IPEND = 0, -#define PT_IPEND PT_IPEND - PT_SYSCFG = 4, -#define PT_SYSCFG PT_SYSCFG - PT_SR = 8, -#define PT_SR PT_SR - PT_RETE = 12, -#define PT_RETE PT_RETE - PT_RETN = 16, -#define PT_RETN PT_RETN - PT_RETX = 20, -#define PT_RETX PT_RETX - PT_PC = 24, -#define PT_PC PT_PC - PT_RETS = 28, -#define PT_RETS PT_RETS - PT_ASTAT = 32, -#define PT_ASTAT PT_ASTAT - PT_LB1 = 40, -#define PT_LB1 PT_LB1 - PT_LB0 = 44, -#define PT_LB0 PT_LB0 - PT_LT1 = 48, -#define PT_LT1 PT_LT1 - PT_LT0 = 52, -#define PT_LT0 PT_LT0 - PT_LC1 = 56, -#define PT_LC1 PT_LC1 - PT_LC0 = 60, -#define PT_LC0 PT_LC0 - PT_A1W = 64, -#define PT_A1W PT_A1W - PT_A1X = 68, -#define PT_A1X PT_A1X - PT_A0W = 72, -#define PT_A0W PT_A0W - PT_A0X = 76, -#define PT_A0X PT_A0X - PT_B3 = 80, -#define PT_B# PT_B3 - PT_B2 = 84, -#define PT_B2 PT_B2 - PT_B1 = 88, -#define PT_B1 PT_B1 - PT_B0 = 92, -#define PT_B0 PT_B0 - PT_L3 = 96, -#define PT_L3 PT_L3 - PT_L2 = 100, -#define PT_L2 PT_L2 - PT_L1 = 104, -#define PT_L1 PT_L1 - PT_L0 = 108, -#define PT_L0 PT_L0 - PT_M3 = 112, -#define PT_M3 PT_M3 - PT_M2 = 116, -#define PT_M2 PT_M2 - PT_M1 = 120, -#define PT_M1 PT_M1 - PT_M0 = 124, -#define PT_M0 PT_M0 - PT_I3 = 128, -#define PT_I3 PT_I3 - PT_I2 = 132, -#define PT_I2 PT_I2 - PT_I1 = 136, -#define PT_I1 PT_I1 - PT_I0 = 140, -#define PT_I0 PT_I0 - PT_USP = 144, -#define PT_USP PT_USP - PT_FP = 148, -#define PT_FP PT_FP - PT_P5 = 152, -#define PT_P5 PT_P5 - PT_P4 = 156, -#define PT_P4 PT_P4 - PT_P3 = 160, -#define PT_P3 PT_P3 - PT_P2 = 164, -#define PT_P2 PT_P2 - PT_P1 = 168, -#define PT_P1 PT_P1 - PT_P0 = 172, -#define PT_P0 PT_P0 - PT_R7 = 176, -#define PT_R7 PT_R7 - PT_R6 = 180, -#define PT_R6 PT_R6 - PT_R5 = 184, -#define PT_R5 PT_R5 - PT_R4 = 188, -#define PT_R4 PT_R4 - PT_R3 = 192, -#define PT_R3 PT_R3 - PT_R2 = 196, -#define PT_R2 PT_R2 - PT_R1 = 200, -#define PT_R1 PT_R1 - PT_R0 = 204, -#define PT_R0 PT_R0 - PT_ORIG_R0 = 208, -#define PT_ORIG_R0 PT_ORIG_R0 -}; - -#endif /* _SYS_REG_H */ diff --git a/libc/sysdeps/linux/bfin/sys/ucontext.h b/libc/sysdeps/linux/bfin/sys/ucontext.h index ac2ef94e2..b6e3a404a 100644 --- a/libc/sysdeps/linux/bfin/sys/ucontext.h +++ b/libc/sysdeps/linux/bfin/sys/ucontext.h @@ -12,9 +12,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ /* System V/blackfin ABI compliant context switching support. */ @@ -33,6 +32,11 @@ typedef int greg_t; /* Container for all general registers. */ typedef greg_t gregset_t[NGREG]; +/* There is no user thread context implementation for bfin, avoid + clashing with gcc symbols, see: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47779 +*/ +#if 0 /* Number of each register is the `gregset_t' array. */ enum { @@ -131,6 +135,7 @@ enum REG_SEQSTAT = 46 #define REG_SEQSTAT REG_SEQSTAT }; +#endif /* Context to describe whole processor state. */ typedef struct diff --git a/libc/sysdeps/linux/bfin/sys/user.h b/libc/sysdeps/linux/bfin/sys/user.h new file mode 100644 index 000000000..558abd6ad --- /dev/null +++ b/libc/sysdeps/linux/bfin/sys/user.h @@ -0,0 +1,57 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H + +struct user_bfinfp_struct { +}; + +/* This is the old layout of "struct pt_regs" as of Linux 1.x, and + is still the layout used by user (the new pt_regs doesn't have + all registers). */ +struct user_regs_struct { + long r0, r1, r2, r3, r4, r5, r6, r7; + long p0, p1, p2, p3, p4, p5, usp, fp; + long i0, i1, i2, i3; + long l0, l1, l2, l3; + long b0, b1, b2, b3; + long m0, m1, m2, m3; + long a0w, a1w; + long a0x, a1x; + unsigned long rets; + unsigned long astat; + unsigned long pc; + unsigned long orig_p0; +}; + +/* When the kernel dumps core, it starts by dumping the user struct - + this will be used by gdb to figure out where the data and stack segments + are within the file, and what virtual addresses to use. */ + +struct user { +/* We start with the registers, to mimic the way that "memory" is returned + from the ptrace(3,...) function. */ + + struct user_regs_struct regs; /* Where the registers are actually stored */ + +/* The rest of this junk is to help gdb figure out what goes where */ + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack area. + This is actually the bottom of the stack, + the top of the stack is always found in the + esp register. */ + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + unsigned long u_ar0; + /* Used by gdb to help find the values for */ + /* the registers. */ + unsigned long magic; /* To uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ +}; +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif |
