diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-08-03 14:39:23 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-08-03 15:43:47 -0700 |
commit | ca24f3c904186cb6babfc74fd6c4e133e4542b5e (patch) | |
tree | 6b3afe9e5df25ca40d021c97e1d9553ecdb5b9e9 /machine/fdt.h | |
parent | 2187c4512db64656896f4b455628a2567984eba1 (diff) | |
download | riscv-pk-ca24f3c904186cb6babfc74fd6c4e133e4542b5e.zip riscv-pk-ca24f3c904186cb6babfc74fd6c4e133e4542b5e.tar.gz riscv-pk-ca24f3c904186cb6babfc74fd6c4e133e4542b5e.tar.bz2 |
Add the '--enable-print-device-tree' argument
I'm trying to debug some device tree problems while booting Linux and
figured it would be really nice to have access to the device tree while
trying to debug these problems. I think this might be useful for lots
of people, so I went ahead and cleaned up the code enough that it should
actaully work in most cases.
Diffstat (limited to 'machine/fdt.h')
-rw-r--r-- | machine/fdt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/machine/fdt.h b/machine/fdt.h index c12905e..5932e17 100644 --- a/machine/fdt.h +++ b/machine/fdt.h @@ -68,4 +68,9 @@ void filter_compat(uintptr_t fdt, const char *compat); // The hartids of available harts extern uint64_t hart_mask; +#ifdef PK_PRINT_DEVICE_TREE +// Prints the device tree to the console as a DTS +void fdt_print(uintptr_t fdt); +#endif + #endif |