mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-28 05:50:37 +00:00
macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer
Currently macfb_common_realize() defines the framebuffer RAM memory region as being non-migrateable but then immediately registers it for migration. Replace memory_region_init_ram_nomigrate() with memory_region_init_ram() which is clearer and does exactly the same thing. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20211007221253.29024-6-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
14d0ddfce7
commit
3b10b5673c
@ -367,11 +367,10 @@ static bool macfb_common_realize(DeviceState *dev, MacfbState *s, Error **errp)
|
||||
memory_region_init_io(&s->mem_ctrl, OBJECT(dev), &macfb_ctrl_ops, s,
|
||||
"macfb-ctrl", 0x1000);
|
||||
|
||||
memory_region_init_ram_nomigrate(&s->mem_vram, OBJECT(dev), "macfb-vram",
|
||||
MACFB_VRAM_SIZE, &error_abort);
|
||||
memory_region_init_ram(&s->mem_vram, OBJECT(dev), "macfb-vram",
|
||||
MACFB_VRAM_SIZE, &error_abort);
|
||||
s->vram = memory_region_get_ram_ptr(&s->mem_vram);
|
||||
s->vram_bit_mask = MACFB_VRAM_SIZE - 1;
|
||||
vmstate_register_ram(&s->mem_vram, dev);
|
||||
memory_region_set_coalescing(&s->mem_vram);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user