Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm32 Fix hand-crafted trap instruction in cpu_...



details:   https://anonhg.NetBSD.org/src/rev/c64b2861f438
branches:  trunk
changeset: 962439:c64b2861f438
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Jul 21 16:12:59 2019 +0000

description:
Fix hand-crafted trap instruction in cpu_Debugger() for big endian.

diffstat:

 sys/arch/arm/arm32/db_interface.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r b07f1936f2fe -r c64b2861f438 sys/arch/arm/arm32/db_interface.c
--- a/sys/arch/arm/arm32/db_interface.c Sun Jul 21 16:10:37 2019 +0000
+++ b/sys/arch/arm/arm32/db_interface.c Sun Jul 21 16:12:59 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.58 2018/05/28 21:05:00 chs Exp $    */
+/*     $NetBSD: db_interface.c,v 1.59 2019/07/21 16:12:59 rin Exp $    */
 
 /*
  * Copyright (c) 1996 Scott K. Stevens
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.58 2018/05/28 21:05:00 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.59 2019/07/21 16:12:59 rin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -302,7 +302,11 @@
 void
 cpu_Debugger(void)
 {
+#if _BYTE_ORDER == _LITTLE_ENDIAN
        __asm(".word    0xe7ffffff");
+#else
+       __asm(".word    0xffffffe7");
+#endif
 }
 
 int



Home | Main Index | Thread Index | Old Index