riscv-software-src / riscv-isa-sim

Spike, a RISC-V ISA Simulator
Other
2.38k stars 839 forks source link

Add flag to disable ns16550 device #1713

Closed abejgonzalez closed 3 months ago

abejgonzalez commented 3 months ago

Sometimes, it makes sense to use HTIF (and only HTIF) as a console device (for example when booting Linux). This allows users to disable the default console device (removing it from the DTS).

jerryz123 commented 3 months ago

Is configuring spike via DTS insufficient for disabling the ns16550?

abejgonzalez commented 3 months ago

Is configuring spike via DTS insufficient for disabling the ns16550?

It is sufficient, I just figured this was a nicer way to disable the device without having to provide a modified DTS. If the preferred way is to use a custom DTS then I'll close this PR.

jerryz123 commented 3 months ago

The preferred way is to pass a modified DTS, to avoid blowing up the number of flags to keep track of.