From 164bb8299c913bcf3827dca2972bdcc781e0a12d Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 19 Apr 2012 18:15:09 +0000 Subject: Print the currently active ASID in `machine tlb' ddb command. --- sys/arch/mips64/include/cpu.h | 5 +++-- sys/arch/mips64/mips64/db_machdep.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/arch/mips64') 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); -- cgit v1.2.3