Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64/aarch64 Move cpu_Debugger() into a more sui...



details:   https://anonhg.NetBSD.org/src/rev/e932d7b323ab
branches:  trunk
changeset: 370155:e932d7b323ab
user:      ryo <ryo%NetBSD.org@localhost>
date:      Mon Sep 19 17:23:14 2022 +0000

description:
Move cpu_Debugger() into a more suitable file, from cpuswitch.S to db_interface.c.

diffstat:

 sys/arch/aarch64/aarch64/cpuswitch.S    |  14 ++------------
 sys/arch/aarch64/aarch64/db_interface.c |  10 ++++++++--
 2 files changed, 10 insertions(+), 14 deletions(-)

diffs (63 lines):

diff -r ebd598f9b0e6 -r e932d7b323ab sys/arch/aarch64/aarch64/cpuswitch.S
--- a/sys/arch/aarch64/aarch64/cpuswitch.S      Mon Sep 19 11:21:36 2022 +0000
+++ b/sys/arch/aarch64/aarch64/cpuswitch.S      Mon Sep 19 17:23:14 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuswitch.S,v 1.38 2022/06/07 08:08:31 ryo Exp $ */
+/* $NetBSD: cpuswitch.S,v 1.39 2022/09/19 17:23:14 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #include "opt_ddb.h"
 #include "opt_kasan.h"
 
-RCSID("$NetBSD: cpuswitch.S,v 1.38 2022/06/07 08:08:31 ryo Exp $")
+RCSID("$NetBSD: cpuswitch.S,v 1.39 2022/09/19 17:23:14 ryo Exp $")
 
        ARMV8_DEFINE_OPTIONS
 
@@ -334,16 +334,6 @@
 END(lwp_trampoline)
 
 
-#ifdef DDB
-ENTRY_NP(cpu_Debugger)
-       stp     fp, lr, [sp, #-16]!
-       mov     fp, sp
-       brk     #0xffff
-       ldp     fp, lr, [sp], #16
-       ret
-END(cpu_Debugger)
-#endif /* DDB */
-
 /*
  * int cpu_set_onfault(struct faultbuf *fb)
  */
diff -r ebd598f9b0e6 -r e932d7b323ab sys/arch/aarch64/aarch64/db_interface.c
--- a/sys/arch/aarch64/aarch64/db_interface.c   Mon Sep 19 11:21:36 2022 +0000
+++ b/sys/arch/aarch64/aarch64/db_interface.c   Mon Sep 19 17:23:14 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.18 2022/05/29 16:39:22 ryo Exp $ */
+/* $NetBSD: db_interface.c,v 1.19 2022/09/19 17:23:14 ryo Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.18 2022/05/29 16:39:22 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.19 2022/09/19 17:23:14 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -639,3 +639,9 @@
        db_dump_l0table(countmode, pmap_l0table(pm),
            (pm == pmap_kernel()) ? 0xffff000000000000UL : 0, pr);
 }
+
+void
+cpu_Debugger(void)
+{
+       __asm __volatile ("brk #0xffff");
+}



Home | Main Index | Thread Index | Old Index