• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* C-SKY specific core note handling.
2    Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd.
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	csky_
40 #include "libebl_CPU.h"
41 
42 #define	ULONG			uint32_t
43 #define PID_T			int32_t
44 #define	UID_T			uint32_t
45 #define	GID_T			uint32_t
46 #define ALIGN_ULONG		4
47 #define ALIGN_PID_T		4
48 #define ALIGN_UID_T		4
49 #define ALIGN_GID_T		4
50 #define TYPE_ULONG		ELF_T_WORD
51 #define TYPE_PID_T		ELF_T_SWORD
52 #define TYPE_UID_T		ELF_T_WORD
53 #define TYPE_GID_T		ELF_T_WORD
54 
55 static const Ebl_Register_Location prstatus_regs[] =
56   {
57     { .offset = 0, .regno = 0, .count = 36, .bits = 32 } /* r0..r31 */
58   };
59 #define PRSTATUS_REGS_SIZE	(36 * 4)
60 
61 #include "linux-core-note.c"
62