aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2019-10-04 16:17:00 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2019-10-04 16:17:00 +0000
commit5eb65c4ce5461121e2acc937085506971bda549b (patch)
tree84a15b87e2a1828a086d37b25890a295bf511aca
parent291287667ccd0d7640d57c5e8b6793fe65688c93 (diff)
downloadsrc-5eb65c4ce5461121e2acc937085506971bda549b.tar.gz
src-5eb65c4ce5461121e2acc937085506971bda549b.zip
dtrace: 64-bits registers support
The registers in ilumos and FreeBSD have a different number. In the illumos, last 32-bits register defined is SS an in FreeBSD is GS. While translating register we should comper it to the highest one. PR: 240358 Reported by: lwhsu@ MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=353107
-rw-r--r--sys/cddl/dev/dtrace/amd64/dtrace_isa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
index 5828eecc1cae..c2b44c87d185 100644
--- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
+++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
@@ -505,7 +505,11 @@ dtrace_getreg(struct trapframe *rp, uint_t reg)
REG_SS /* 18 SS */
};
+#ifdef illumos
if (reg <= SS) {
+#else /* !illumos */
+ if (reg <= GS) {
+#endif
if (reg >= sizeof (regmap) / sizeof (int)) {
DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP);
return (0);