[Top][All Lists]

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

Re: [Qemu-discuss] Guidance requested creating a QEMU MMIO device

From: Peter Maydell
Subject: Re: [Qemu-discuss] Guidance requested creating a QEMU MMIO device
Date: Tue, 16 Apr 2019 14:26:50 +0100

On Tue, 16 Apr 2019 at 14:18, <address@hidden> wrote:
> Thanks, Peter.
> I can see how to use parts of the mps2-scc code to set up my wanted MMIO.
> I would basically need an array of 32-bit words and would not need to 
> differentiate
> between control and data registers. That's what I hope at least.
> You wrote;
> > You would then need to modify the board code for whatever
> > machine you're trying to use this with to create the device
> > at whatever physical address you want it to live at.
> You didn't specify what you meant by 'board code'. Since a qemu is supposed 
> to emulate a
> specific processor/cpu, e.g. an arm cortex-a53 or a ppc mpc8544ds.

The board code is the code that models a particular board or
machine (which you specify on the command line with -M machinename).
It's under hw/${ARCH}/, usually, eg the versatilepb and versatileab
boards are handled by hw/arm/versatilepb.c.

For mps2-scc, you can see where the device is created by
looking for TYPE_MPS2_SCC -- it's used in the boards
modelled in hw/arm/mps2-tz.c and hw/arm/mps2.c.

All that code in roms/ that you found is just the source
code for a copy of u-boot which we ship as a ROM blob
to run on certain guest boards -- it is irrelevant to you.

-- PMM

reply via email to

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