xref: /openbmc/linux/arch/ia64/include/asm/user.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
27f30491cSTony Luck #ifndef _ASM_IA64_USER_H
37f30491cSTony Luck #define _ASM_IA64_USER_H
47f30491cSTony Luck 
57f30491cSTony Luck /*
67f30491cSTony Luck  * Core file format: The core file is written in such a way that gdb
77f30491cSTony Luck  * can understand it and provide useful information to the user (under
87f30491cSTony Luck  * linux we use the `trad-core' bfd).  The file contents are as
97f30491cSTony Luck  * follows:
107f30491cSTony Luck  *
117f30491cSTony Luck  *  upage: 1 page consisting of a user struct that tells gdb
127f30491cSTony Luck  *	what is present in the file.  Directly after this is a
137f30491cSTony Luck  *	copy of the task_struct, which is currently not used by gdb,
147f30491cSTony Luck  *	but it may come in handy at some point.  All of the registers
157f30491cSTony Luck  *	are stored as part of the upage.  The upage should always be
167f30491cSTony Luck  *	only one page long.
177f30491cSTony Luck  *  data: The data segment follows next.  We use current->end_text to
187f30491cSTony Luck  *	current->brk to pick up all of the user variables, plus any memory
197f30491cSTony Luck  *	that may have been sbrk'ed.  No attempt is made to determine if a
207f30491cSTony Luck  *	page is demand-zero or if a page is totally unused, we just cover
217f30491cSTony Luck  *	the entire range.  All of the addresses are rounded in such a way
227f30491cSTony Luck  *	that an integral number of pages is written.
237f30491cSTony Luck  *  stack: We need the stack information in order to get a meaningful
247f30491cSTony Luck  *	backtrace.  We need to write the data from usp to
257f30491cSTony Luck  *	current->start_stack, so we round each of these in order to be able
267f30491cSTony Luck  *	to write an integer number of pages.
277f30491cSTony Luck  *
287f30491cSTony Luck  * Modified 1998, 1999, 2001
297f30491cSTony Luck  *	David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
307f30491cSTony Luck  */
317f30491cSTony Luck 
327f30491cSTony Luck #include <linux/ptrace.h>
337f30491cSTony Luck #include <linux/types.h>
347f30491cSTony Luck 
357f30491cSTony Luck #include <asm/page.h>
367f30491cSTony Luck 
377f30491cSTony Luck #define EF_SIZE		3072	/* XXX fix me */
387f30491cSTony Luck 
397f30491cSTony Luck struct user {
407f30491cSTony Luck 	unsigned long	regs[EF_SIZE/8+32];	/* integer and fp regs */
417f30491cSTony Luck 	size_t		u_tsize;		/* text size (pages) */
427f30491cSTony Luck 	size_t		u_dsize;		/* data size (pages) */
437f30491cSTony Luck 	size_t		u_ssize;		/* stack size (pages) */
447f30491cSTony Luck 	unsigned long	start_code;		/* text starting address */
457f30491cSTony Luck 	unsigned long	start_data;		/* data starting address */
467f30491cSTony Luck 	unsigned long	start_stack;		/* stack starting address */
477f30491cSTony Luck 	long int	signal;			/* signal causing core dump */
487f30491cSTony Luck 	unsigned long	u_ar0;			/* help gdb find registers */
497f30491cSTony Luck 	unsigned long	magic;			/* identifies a core file */
507f30491cSTony Luck 	char		u_comm[32];		/* user command name */
517f30491cSTony Luck };
527f30491cSTony Luck 
537f30491cSTony Luck #endif /* _ASM_IA64_USER_H */
54