aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.h
diff options
context:
space:
mode:
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>2017-03-16 10:50:29 +0100
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-03-16 17:01:49 +0100
commit3626824cea3dd1dc27f0d121c283dde67d8ef56c (patch)
tree0fd7df6154c45c782431c370204911c4fdb3b835 /gdb/s390-tdep.h
parentd67d2e97621796c52dbf28d7e5ac6c24e27badb3 (diff)
downloadgdb-users/arnez/lk3.zip
gdb-users/arnez/lk3.tar.gz
gdb-users/arnez/lk3.tar.bz2
Add S390 support for linux-kernel targetusers/arnez/lk3
After implementing the new linux-kernel target and preparing s390-tdep. It is now time to get everything to work. Thus implement the hooks required by the linux-kernel target and enable s390's privileged registers. gdb/ChangeLog: * s390-lk-tdep.h: New file. * s390-lk-tdep.c: New file. * Makefile.in (ALL_TARGET_OBS): Add s390-lk-tdep.o. (HFILES_NO_SRCDIR): Add s390-lk-tdep.h. (ALLDEPFILES): Add s390-lk-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-lk-tdep.o. * s390-tdep.h: Define macros for address translation. * s390-tdep.c (s390-lk-tdep.h): New include. (s390_iterate_over_regset_sections): Enable privileged registers. (s390_core_read_description): Enable privileged registers. (s390_gdbarch_init): : Enable privileged registers and adjust.
Diffstat (limited to 'gdb/s390-tdep.h')
-rw-r--r--gdb/s390-tdep.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/gdb/s390-tdep.h b/gdb/s390-tdep.h
index 8d0da72..0df8a27 100644
--- a/gdb/s390-tdep.h
+++ b/gdb/s390-tdep.h
@@ -319,4 +319,66 @@ enum
#define S390_IS_TDBREGSET_REGNUM(i) \
((i) >= S390_TDB_DWORD0_REGNUM && (i) <= S390_TDB_R15_REGNUM)
+/* Definitions for address translation. */
+/* DAT Table types. */
+#define S390_LK_DAT_TT_REGION1 3
+#define S390_LK_DAT_TT_REGION2 2
+#define S390_LK_DAT_TT_REGION3 1
+#define S390_LK_DAT_TT_SEGMENT 0
+
+/* Region-First-Table */
+#define S390_LK_RFTE_TL 0x3ULL /* Table-Length */
+#define S390_LK_RFTE_TT 0xcULL /* Table-Type */
+#define S390_LK_RFTE_I 0x20ULL /* Region-Invalid Bit */
+#define S390_LK_RFTE_TF 0xc0ULL /* Table Offset */
+#define S390_LK_RFTE_P 0x200ULL /* DAT-Protection Bit */
+#define S390_LK_RFTE_O ~0xfffULL /* Region-Second-Table Origin */
+
+/* Region-Second-Table flags. */
+#define S390_LK_RSTE_TL 0x3ULL /* Table-Length */
+#define S390_LK_RSTE_TT 0xcULL /* Table-Type */
+#define S390_LK_RSTE_I 0x20ULL /* Region-Invalid Bit */
+#define S390_LK_RSTE_TF 0xc0ULL /* Table Offset */
+#define S390_LK_RSTE_P 0x200ULL /* DAT-Protection Bit */
+#define S390_LK_RSTE_O ~0xfffULL /* Region-Third-Table Origin */
+
+/* Region-Third-Table flags. */
+#define S390_LK_RTTE_TL 0x3ULL /* Table-Length */
+#define S390_LK_RTTE_TT 0xcULL /* Table-Type */
+#define S390_LK_RTTE_CR 0x10ULL /* Common-Region Bit */
+#define S390_LK_RTTE_I 0x20ULL /* Region-Invalid Bit */
+#define S390_LK_RTTE_TF 0xc0ULL /* Table Offset */
+#define S390_LK_RTTE_P 0x200ULL /* DAT-Protection Bit */
+#define S390_LK_RTTE_FC 0x400ULL /* Format-Control Bit */
+#define S390_LK_RTTE_F 0x800ULL /* Fetch-Protection Bit */
+#define S390_LK_RTTE_ACC 0xf000ULL /* Access-Control Bits */
+#define S390_LK_RTTE_AV 0x10000ULL /* ACCF-Validity Control */
+#define S390_LK_RTTE_O ~0xfffULL /* Segment-Table Origin */
+#define S390_LK_RTTE_RFAA ~0x7fffffffULL /* Region-Frame Absolute Address */
+
+/* Segment-Table flags. */
+#define S390_LK_STE_TT 0xcULL /* Table-Type */
+#define S390_LK_STE_I 0x20ULL /* Segment-Invalid Bit */
+#define S390_LK_STE_TF 0xc0ULL /* Table Offset */
+#define S390_LK_STE_P 0x200ULL /* DAT-Protection Bit */
+#define S390_LK_STE_FC 0x400ULL /* Format-Control Bit */
+#define S390_LK_STE_F 0x800ULL /* Fetch-Protection Bit */
+#define S390_LK_STE_ACC 0xf000ULL /* Access-Control Bits */
+#define S390_LK_STE_AV 0x10000ULL /* ACCF-Validity Control */
+#define S390_LK_STE_O ~0x7ffULL /* Page-Table Origin */
+#define S390_LK_STE_SFAA ~0xfffffULL /* Segment-Frame Absolute Address */
+
+/* Page-Table flags. */
+#define S390_LK_PTE_P 0x200ULL /* DAT-Protection Bit */
+#define S390_LK_PTE_I 0x400ULL /* Page-Invalid Bit */
+#define S390_LK_PTE_PFAA ~0xfffULL /* Page-Frame Absolute Address */
+
+/* Virtual Address Fields. */
+#define S390_LK_VADDR_RFX 0xffe0000000000000ULL
+#define S390_LK_VADDR_RSX 0x001ffc0000000000ULL
+#define S390_LK_VADDR_RTX 0x000003ff80000000ULL
+#define S390_LK_VADDR_SX 0x000000007ff00000ULL
+#define S390_LK_VADDR_PX 0x00000000000ff000ULL
+#define S390_LK_VADDR_BX 0x0000000000000fffULL
+
#endif /* S390_TDEP_H */