riscv: Add missing includes for DDB

The #ifdef DDB code in parse_metadata was dead code without opt_ddb.h.
While here, update the call to db_fetch_ksymtab for changes in commit
02bc014a200a.

Reviewed by:	mhorne
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D43919

(cherry picked from commit 962b0bcbd924d308016237abc991280f15777e7f)
This commit is contained in:
John Baldwin 2024-02-15 12:20:30 -08:00
parent cfb8cc9c5f
commit 50a4c3bb7a

View file

@ -33,6 +33,7 @@
* SUCH DAMAGE.
*/
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_platform.h"
@ -92,6 +93,10 @@
#include <machine/trap.h>
#include <machine/vmparam.h>
#ifdef DDB
#include <ddb/ddb.h>
#endif
#ifdef FDT
#include <contrib/libfdt/libfdt.h>
#include <dev/fdt/fdt_common.h>
@ -456,7 +461,7 @@ parse_metadata(void)
#ifdef DDB
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
db_fetch_ksymtab(ksym_start, ksym_end);
db_fetch_ksymtab(ksym_start, ksym_end, 0);
#endif
#ifdef FDT
try_load_dtb(kmdp);