qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How I can get/dump full dtb file?


From: Peter Maydell
Subject: Re: How I can get/dump full dtb file?
Date: Wed, 28 Sep 2022 20:01:28 +0100

On Wed, 28 Sept 2022 at 18:27, Victor Martins <vmartins@lisha.ufsc.br> wrote:
> Peter Maydell <peter.maydell@linaro.org> escreveu no dia terça, 27/09/2022 
> à(s) 16:52:
>>
>> > Any way, I have no problem use the -machine virt. My problem is know
>> > how I can map my RISC-V SoC in the FPGA (like have control of the
>> > modules map address) to can develop my applications in the future
>> > using the QEMU as I use the FPGA board.
>>
>> You need to write a new QEMU machine model to do this (i.e. ignore
>> the 'virt' board entirely). This is quite a lot of work (depending on
>> how complicated your SoC is and whether it's using devices that
>> QEMU already has a model of or if you need also to write models of
>> all the devices) and requires some knowledge of QEMU internals.
>
>
> But, is not possible, at least, use the dtb to force the map address?
> Like Memory start at 0x7000000 with 32GB or UART it is at 0x10008000?
> Because the new SoC in FPGA will be simple (CPU+RAM+Uart+IOs). But
> I need a way to control que hardware address lines.

No. QEMU never uses any of the DTB to determine what its hardware
emulation should be. To change the hardware emulation you need
to change the C code of QEMU itself.

> And a stupid question: it is possible mount the uart from virt
> machine in the host OS? And after can run a application in the
> host OS that can communicate to the RISC-V SoC in the QEMU using
> the serial port?

QEMU emulated UARTs all connect to what QEMU calls a "chardev"
interface. There are a wide variety of chardevs, including
one to send data to/from a TCP socket, and one to send data/to
from UNIX FIFOs. Those two are usually the easiest to use for
automated communication to a host OS program.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]