Brian Silverman | 8649792 | 2018-02-10 19:28:39 -0500 | [diff] [blame^] | 1 | /* PowerPC specific core note handling. |
| 2 | Copyright (C) 2007 Red Hat, Inc. |
| 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 | #ifdef HAVE_CONFIG_H |
| 30 | # include <config.h> |
| 31 | #endif |
| 32 | |
| 33 | #include <elf.h> |
| 34 | #include <inttypes.h> |
| 35 | #include <stddef.h> |
| 36 | #include <stdio.h> |
| 37 | #include <sys/time.h> |
| 38 | |
| 39 | #define BACKEND alpha_ |
| 40 | #include "libebl_CPU.h" |
| 41 | |
| 42 | static const Ebl_Register_Location prstatus_regs[] = |
| 43 | { |
| 44 | { .offset = 0, .regno = 0, .count = 31, .bits = 64 }, /* r0-r30 */ |
| 45 | { .offset = 32 * 8, .regno = 64, .count = 1, .bits = 64 }, /* pc */ |
| 46 | { .offset = 33 * 8, .regno = 66, .count = 1, .bits = 64 }, /* unique */ |
| 47 | }; |
| 48 | #define PRSTATUS_REGS_SIZE (33 * 8) |
| 49 | |
| 50 | static const Ebl_Register_Location fpregset_regs[] = |
| 51 | { |
| 52 | { .offset = 0, .regno = 32, .count = 32, .bits = 64 }, /* f0-f30, fpcr */ |
| 53 | }; |
| 54 | #define FPREGSET_SIZE (32 * 8) |
| 55 | |
| 56 | #define ULONG uint64_t |
| 57 | #define ALIGN_ULONG 8 |
| 58 | #define TYPE_ULONG ELF_T_XWORD |
| 59 | #define TYPE_LONG ELF_T_SXWORD |
| 60 | #define PID_T int32_t |
| 61 | #define UID_T uint32_t |
| 62 | #define GID_T uint32_t |
| 63 | #define ALIGN_PID_T 4 |
| 64 | #define ALIGN_UID_T 4 |
| 65 | #define ALIGN_GID_T 4 |
| 66 | #define TYPE_PID_T ELF_T_SWORD |
| 67 | #define TYPE_UID_T ELF_T_WORD |
| 68 | #define TYPE_GID_T ELF_T_WORD |
| 69 | |
| 70 | #include "linux-core-note.c" |