2e79786ca96b2cd8126044bd74198a8ab604df21
2 * arch/ubicom32/include/asm/user.h
3 * Ubicom32 architecture core file definitions.
5 * (C) Copyright 2009, Ubicom, Inc.
7 * This file is part of the Ubicom32 Linux Kernel Port.
9 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10 * it and/or modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation, either version 2 of the
12 * License, or (at your option) any later version.
14 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 * the GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with the Ubicom32 Linux Kernel Port. If not,
21 * see <http://www.gnu.org/licenses/>.
23 * Ubicom32 implementation derived from (with many thanks):
28 #ifndef _ASM_UBICOM32_USER_H
29 #define _ASM_UBICOM32_USER_H
31 #include <asm/ptrace.h>
34 * Adapted from <asm-powerpc/user.h>
36 * Core file format: The core file is written in such a way that gdb
37 * can understand it and provide useful information to the user (under
38 * linux we use the `trad-core' bfd, NOT the osf-core). The file contents
41 * upage: 1 page consisting of a user struct that tells gdb
42 * what is present in the file. Directly after this is a
43 * copy of the task_struct, which is currently not used by gdb,
44 * but it may come in handy at some point. All of the registers
45 * are stored as part of the upage. The upage should always be
47 * data: The data segment follows next. We use current->end_text to
48 * current->brk to pick up all of the user variables, plus any memory
49 * that may have been sbrk'ed. No attempt is made to determine if a
50 * page is demand-zero or if a page is totally unused, we just cover
51 * the entire range. All of the addresses are rounded in such a way
52 * that an integral number of pages is written.
53 * stack: We need the stack information in order to get a meaningful
54 * backtrace. We need to write the data from usp to
55 * current->start_stack, so we round each of these in order to be able
56 * to write an integer number of pages.
59 struct user_ubicom32fp_struct
{
63 struct pt_regs regs
; /* entire machine state */
64 size_t u_tsize
; /* text size (pages) */
65 size_t u_dsize
; /* data size (pages) */
66 size_t u_ssize
; /* stack size (pages) */
67 unsigned long start_code
; /* text starting address */
68 unsigned long start_data
; /* data starting address */
69 unsigned long start_stack
; /* stack starting address */
70 long int signal
; /* signal causing core dump */
71 unsigned long u_ar0
; /* help gdb find registers */
72 unsigned long magic
; /* identifies a core file */
73 char u_comm
[32]; /* user command name */
76 #define NBPG PAGE_SIZE
78 #define HOST_TEXT_START_ADDR (u.start_code)
79 #define HOST_DATA_START_ADDR (u.start_data)
80 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
82 #endif /* _ASM_UBICOM32_USER_H */