1/* TILE-Gx specific core note handling.
2   Copyright (C) 2012 Tilera Corporation
3   This file is part of elfutils.
4
5   This file is free software; you can redistribute it and/or modify
6   it under the terms of either
7
8     * the GNU Lesser General Public License as published by the Free
9       Software Foundation; either version 3 of the License, or (at
10       your option) any later version
11
12   or
13
14     * the GNU General Public License as published by the Free
15       Software Foundation; either version 2 of the License, or (at
16       your option) any later version
17
18   or both in parallel, as here.
19
20   elfutils is distributed in the hope that it will be useful, but
21   WITHOUT ANY WARRANTY; without even the implied warranty of
22   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23   General Public License for more details.
24
25   You should have received copies of the GNU General Public License and
26   the GNU Lesser General Public License along with this program.  If
27   not, see <http://www.gnu.org/licenses/>.  */
28
29
30#ifdef HAVE_CONFIG_H
31# include <config.h>
32#endif
33
34#include <elf.h>
35#include <inttypes.h>
36#include <stddef.h>
37#include <stdio.h>
38#include <sys/time.h>
39
40#define BACKEND	tilegx_
41#include "libebl_CPU.h"
42
43static const Ebl_Register_Location prstatus_regs[] =
44  {
45    { .offset = 0, .regno = 0, .count = 56, .bits = 64 }, /* r0-r55 */
46    { .offset = 56 * 8, .regno = 64, .count = 1, .bits = 64 } /* pc */
47  };
48#define PRSTATUS_REGS_SIZE	(57 * 8)
49
50#define ULONG			uint64_t
51#define ALIGN_ULONG		8
52#define TYPE_ULONG		ELF_T_XWORD
53#define TYPE_LONG		ELF_T_SXWORD
54#define PID_T			int32_t
55#define	UID_T			uint32_t
56#define	GID_T			uint32_t
57#define ALIGN_PID_T		4
58#define ALIGN_UID_T		4
59#define ALIGN_GID_T		4
60#define TYPE_PID_T		ELF_T_SWORD
61#define TYPE_UID_T		ELF_T_WORD
62#define TYPE_GID_T		ELF_T_WORD
63
64#include "linux-core-note.c"
65