mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
Change MMIO callbacks to use offsets, not absolute addresses.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6ad1d22b15
commit
8da3ff1809
82 changed files with 453 additions and 869 deletions
|
@ -28,7 +28,6 @@ enum pl110_bppmode
|
|||
};
|
||||
|
||||
typedef struct {
|
||||
uint32_t base;
|
||||
DisplayState *ds;
|
||||
QEMUConsole *console;
|
||||
|
||||
|
@ -289,7 +288,6 @@ static uint32_t pl110_read(void *opaque, target_phys_addr_t offset)
|
|||
{
|
||||
pl110_state *s = (pl110_state *)opaque;
|
||||
|
||||
offset -= s->base;
|
||||
if (offset >= 0xfe0 && offset < 0x1000) {
|
||||
if (s->versatile)
|
||||
return pl110_versatile_id[(offset - 0xfe0) >> 2];
|
||||
|
@ -344,7 +342,6 @@ static void pl110_write(void *opaque, target_phys_addr_t offset,
|
|||
/* For simplicity invalidate the display whenever a control register
|
||||
is writen to. */
|
||||
s->invalidate = 1;
|
||||
offset -= s->base;
|
||||
if (offset >= 0x200 && offset < 0x400) {
|
||||
/* Pallette. */
|
||||
n = (offset - 0x200) >> 2;
|
||||
|
@ -423,7 +420,6 @@ void *pl110_init(DisplayState *ds, uint32_t base, qemu_irq irq,
|
|||
iomemtype = cpu_register_io_memory(0, pl110_readfn,
|
||||
pl110_writefn, s);
|
||||
cpu_register_physical_memory(base, 0x00001000, iomemtype);
|
||||
s->base = base;
|
||||
s->ds = ds;
|
||||
s->versatile = versatile;
|
||||
s->irq = irq;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue