Use the new information about per-cpu mappings. Gdb now can examine
the interrupt stack.
This commit is contained in:
parent
633ac5fa86
commit
3049bc6660
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kvm_sparc64.c,v 1.12 2008/01/15 13:57:42 ad Exp $ */
|
||||
/* $NetBSD: kvm_sparc64.c,v 1.13 2008/01/18 16:26:09 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)kvm_sparc.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: kvm_sparc64.c,v 1.12 2008/01/15 13:57:42 ad Exp $");
|
||||
__RCSID("$NetBSD: kvm_sparc64.c,v 1.13 2008/01/18 16:26:09 martin Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -119,7 +119,7 @@ _kvm_kvatop(kd, va, pa)
|
|||
if (va < kernbase)
|
||||
goto lose;
|
||||
|
||||
/* Handle the wired 4MB TTEs */
|
||||
/* Handle the wired 4MB TTEs and per-CPU mappings */
|
||||
if (cpup->memsegoffset > sizeof(cpu_kcore_hdr_t) &&
|
||||
cpup->newmagic == SPARC64_KCORE_NEWMAGIC) {
|
||||
/*
|
||||
|
@ -135,6 +135,19 @@ _kvm_kvatop(kd, va, pa)
|
|||
return (int)(start+PAGE_SIZE_4M - va);
|
||||
}
|
||||
|
||||
if (cpup->numcpuinfos > 0) {
|
||||
/* we have per-CPU mapping info */
|
||||
uint64_t start, base;
|
||||
|
||||
base = cpup->cpubase - 32*1024;
|
||||
if (va >= base && va < (base + cpup->percpusz)) {
|
||||
start = va - base;
|
||||
*pa = cpup->cpusp
|
||||
+ cpup->thiscpu*cpup->percpusz
|
||||
+ start;
|
||||
return cpup->percpusz - start;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* old format: just a textbase/size and database/size
|
||||
|
|
Loading…
Reference in New Issue