riscvarchive / riscv-qemu

QEMU with RISC-V (RV64G, RV32G) Emulation Support
384 stars 154 forks source link

riscv: virt machine: multiple UARTs #159

Open nwf opened 6 years ago

nwf commented 6 years ago

Attach up to 16 serial devices, densely packed in the memory map and registered in the FDT. To ensure that BBL continues to find the default one, we register it last so that it ends up at the top of the fdt.

nwf commented 5 years ago

The CI failure seems unrelated: 'ERROR:tests/tpm-emu.c:27:tpm_emu_test_wait_cond: code should not be reached'

michaeljclark commented 5 years ago

It looks okay to me, besides minor style issues.

You can use git format-patch to make a patch and then run ./scripts/checkpatch.pl which will check that the patch complies with the QEMU coding conventions. I'll check out the branch and do some local testing... I have to run checkpatch.pl before making a pull request anyhow...

Is there any reason why didn't just reverse iterate in the loop so that you don't need to special case uart0?

nwf commented 5 years ago

Will fix the style nits; thanks for pointing them out.

I wanted to use the first MAX_UARTS given, not the last, if there happened to be more. IMHO it'd be better if BBL paid attention to /chosen/stdout or some similar option rather than always taking the first UART it finds in the FDT, but given how QEMU builds the FDT, the BBL UART has to be constructed last.

nwf commented 5 years ago

Ping? As said above, the CI failure appears unrelated: "ERROR:tests/tpm-emu.c:27:tpm_emu_test_wait_cond: code should not be reached". Can this be merged?

nwf commented 5 years ago

Rebased.

nwf commented 5 years ago

Ping?

nwf commented 5 years ago

Can this please be merged? What's the hold up?

nwf commented 5 years ago

Hey look, it's been a week again. Please?