diff options
author | grehan <grehan@FreeBSD.org> | 2004-07-27 03:41:34 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2004-07-27 03:41:34 +0000 |
commit | 7c33e30743a5b97cbd6418f220a6cb487db95009 (patch) | |
tree | 5c790228cc3a536c2f4d2eac84e08eeffbd870b6 /sys | |
parent | b9200ab932d79b39fe2280bc9e7bba7573808f00 (diff) | |
download | FreeBSD-src-7c33e30743a5b97cbd6418f220a6cb487db95009.zip FreeBSD-src-7c33e30743a5b97cbd6418f220a6cb487db95009.tar.gz |
Improve boot-time debugging with DDB by extracting the ksym start/end
values from the loader.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/aim/machdep.c | 9 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index f2203d7..6bdacf3 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_ddb.h" #include "opt_kstack_pages.h" #include "opt_msgbuf.h" @@ -115,6 +116,10 @@ __FBSDID("$FreeBSD$"); #include <ddb/ddb.h> +#ifdef DDB +extern vm_offset_t ksym_start, ksym_end; +#endif + int cold = 1; char pcpu0[PAGE_SIZE]; @@ -259,6 +264,10 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); end = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); +#ifdef DDB + ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); + ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); +#endif } } diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index f2203d7..6bdacf3 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_ddb.h" #include "opt_kstack_pages.h" #include "opt_msgbuf.h" @@ -115,6 +116,10 @@ __FBSDID("$FreeBSD$"); #include <ddb/ddb.h> +#ifdef DDB +extern vm_offset_t ksym_start, ksym_end; +#endif + int cold = 1; char pcpu0[PAGE_SIZE]; @@ -259,6 +264,10 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); end = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); +#ifdef DDB + ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); + ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); +#endif } } |