summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-04-19 18:15:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-04-19 18:15:09 +0000
commit164bb8299c913bcf3827dca2972bdcc781e0a12d (patch)
tree134ceb6ead8bb2443e2a0e2863acb3f737eed80a /sys/arch/mips64
parentccc76718800f8a436c5e9b2d1d9a42336d9ffe05 (diff)
Print the currently active ASID in `machine tlb' ddb command.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/include/cpu.h5
-rw-r--r--sys/arch/mips64/mips64/db_machdep.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h
index 10c66cac356..3a53e08ee4d 100644
--- a/sys/arch/mips64/include/cpu.h
+++ b/sys/arch/mips64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.79 2012/04/06 20:11:18 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.80 2012/04/19 18:15:08 miod Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -560,8 +560,9 @@ uint32_t cp0_get_prid(void);
void cp0_set_compare(u_int);
void cp0_set_config(uint32_t);
u_int cp1_get_prid(void);
+u_int tlb_get_pid(void);
void tlb_set_page_mask(uint32_t);
-void tlb_set_pid(int);
+void tlb_set_pid(u_int);
void tlb_set_wired(int);
void tlb_flush(int);
diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c
index c1ef5938a83..ce1049f0a7b 100644
--- a/sys/arch/mips64/mips64/db_machdep.c
+++ b/sys/arch/mips64/mips64/db_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.c,v 1.33 2012/03/25 13:52:52 miod Exp $ */
+/* $OpenBSD: db_machdep.c,v 1.34 2012/04/19 18:15:08 miod Exp $ */
/*
* Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
@@ -67,7 +67,6 @@ int kdb_trap(int, struct trap_frame *);
void db_trap_trace_cmd(db_expr_t, int, db_expr_t, char *);
void db_dump_tlb_cmd(db_expr_t, int, db_expr_t, char *);
-
#ifdef MULTIPROCESSOR
struct mutex ddb_mp_mutex = MUTEX_INITIALIZER(IPL_HIGH);
volatile int ddb_state = DDB_STATE_NOT_RUNNING;
@@ -508,6 +507,8 @@ if ((tlbp.tlb_hi == tlb.tlb_hi && (tlb.tlb_lo0 & PG_V || tlb.tlb_lo1 & PG_V)) ||
}
last = tlbno + count;
+ if (pid == -1)
+ db_printf("current asid: %d\n", tlb_get_pid());
for (; tlbno < ci->ci_hw.tlbsize && tlbno < last; tlbno++) {
tlb_read(tlbno, &tlb);