103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes/* TILE-Gx specific core note handling. 203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes Copyright (C) 2012 Tilera Corporation 303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes This file is part of elfutils. 403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes This file is free software; you can redistribute it and/or modify 603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes it under the terms of either 703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes * the GNU Lesser General Public License as published by the Free 903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes Software Foundation; either version 3 of the License, or (at 1003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes your option) any later version 1103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 1203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes or 1303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 1403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes * the GNU General Public License as published by the Free 1503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes Software Foundation; either version 2 of the License, or (at 1603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes your option) any later version 1703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 1803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes or both in parallel, as here. 1903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 2003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes elfutils is distributed in the hope that it will be useful, but 2103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes WITHOUT ANY WARRANTY; without even the implied warranty of 2203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes General Public License for more details. 2403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 2503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes You should have received copies of the GNU General Public License and 2603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes the GNU Lesser General Public License along with this program. If 2703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes not, see <http://www.gnu.org/licenses/>. */ 2803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 2903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 3003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#ifdef HAVE_CONFIG_H 3103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes# include <config.h> 3203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#endif 3303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 3403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <elf.h> 3503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <inttypes.h> 3603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <stddef.h> 3703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <stdio.h> 3803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <sys/time.h> 3903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 4003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define BACKEND tilegx_ 4103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include "libebl_CPU.h" 4203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 4303333823c75a1c1887e923828113a1b0fd12020cElliott Hughesstatic const Ebl_Register_Location prstatus_regs[] = 4403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes { 4503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes { .offset = 0, .regno = 0, .count = 56, .bits = 64 }, /* r0-r55 */ 4603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes { .offset = 56 * 8, .regno = 64, .count = 1, .bits = 64 } /* pc */ 4703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes }; 4803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define PRSTATUS_REGS_SIZE (57 * 8) 4903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 5003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define ULONG uint64_t 5103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define ALIGN_ULONG 8 5203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define TYPE_ULONG ELF_T_XWORD 5303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define TYPE_LONG ELF_T_SXWORD 5403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define PID_T int32_t 5503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define UID_T uint32_t 5603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define GID_T uint32_t 5703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define ALIGN_PID_T 4 5803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define ALIGN_UID_T 4 5903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define ALIGN_GID_T 4 6003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define TYPE_PID_T ELF_T_SWORD 6103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define TYPE_UID_T ELF_T_WORD 6203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define TYPE_GID_T ELF_T_WORD 6303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 6403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include "linux-core-note.c" 65