riscv: implement db_show_mdpcpu()

This prints the machine-dependent members of struct pcpu when executing
the 'show pcpu' or 'show all pcpu' ddb(4) commands.

MFC after:	3 days
This commit is contained in:
Mitchell Horne 2021-10-04 17:47:49 -03:00
parent 4e3dc91e4c
commit 4fffc56c6e
2 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@
#define ALT_STACK_SIZE 128
/* Keep in sync with db_show_mdpcpu() */
#define PCPU_MD_FIELDS \
struct pmap *pc_curpmap; /* Currently active pmap */ \
uint32_t pc_pending_ipis; /* IPIs pending to this CPU */ \

View File

@ -106,6 +106,9 @@ struct db_variable *db_eregs = db_regs + nitems(db_regs);
void
db_show_mdpcpu(struct pcpu *pc)
{
db_printf("curpmap = %p\n", pc->pc_curpmap);
db_printf("pending_ipis = %x\n", pc->pc_pending_ipis);
db_printf("hart = %u\n", pc->pc_hart);
}
/*