qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram


From: Hervé Poussineau
Subject: Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support
Date: Mon, 15 Apr 2013 07:52:00 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Artyom Tarasenko a écrit :
On Sun, Apr 14, 2013 at 10:05 AM, Hervé Poussineau <address@hidden> wrote:
As m48t59 devices can only be created with m48t59_init() or m48t59_init_isa(),
we know exactly which nvram types are required. Register only those three
types.
Remove .model and .size properties as they can be infered from nvram name.
Remove .io_base ISA address port as m48t59_init_isa() is always called with 
ioport 0x74.

While this it indeed how it's currently called, this is wrong for the
sun4u emulation.
The isa (ebus) variant of the sun4u m48t59_init_isa() should be called
with a mem_base, not io_base.
Do you think it should be implemented as another device type?


I don't know EBUS, but I think it should be implemented either as a completly new bus (1), or as a child of the ISA bus type (2).
For 1), you'll need to add a another device type to be plugged on EBUS.
For 2), I let experts answer :)

In all cases, maybe the m48t59_init() wrapper is what you need? You can already give him a membase. Otherwise, you can maybe use sysbus_create_simple("m48t59"), get the resulting MemoryRegion from the device, and add it in whatever MemoryRegion.

Hervé



reply via email to

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