aboutsummaryrefslogtreecommitdiff
path: root/hw/tcx.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-10-16 16:04:59 +0000
committerBlue Swirl <blauwirbel@gmail.com>2012-01-25 18:32:47 +0000
commitfd4aa979033ca604ad829cf95055d4b5c5ed1063 (patch)
treedefa55c0e1815076d229f941d4fe8ddf239b799f /hw/tcx.c
parent59abb06198ee9471e29c970f294eae80c0b39be1 (diff)
downloadqemu-fd4aa979033ca604ad829cf95055d4b5c5ed1063.zip
qemu-fd4aa979033ca604ad829cf95055d4b5c5ed1063.tar.gz
qemu-fd4aa979033ca604ad829cf95055d4b5c5ed1063.tar.bz2
memory: change dirty setting APIs to take a size
Instead of each target knowing or guessing the guest page size, just pass the desired size of dirtied memory area. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/tcx.c')
-rw-r--r--hw/tcx.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/hw/tcx.c b/hw/tcx.c
index 75a28f2..b6a2753 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -61,21 +61,13 @@ static void tcx24_screen_dump(void *opaque, const char *filename);
static void tcx_set_dirty(TCXState *s)
{
- unsigned int i;
-
- for (i = 0; i < MAXX * MAXY; i += TARGET_PAGE_SIZE) {
- memory_region_set_dirty(&s->vram_mem, i);
- }
+ memory_region_set_dirty(&s->vram_mem, 0, MAXX * MAXY);
}
static void tcx24_set_dirty(TCXState *s)
{
- unsigned int i;
-
- for (i = 0; i < MAXX * MAXY * 4; i += TARGET_PAGE_SIZE) {
- memory_region_set_dirty(&s->vram_mem, s->vram24_offset + i);
- memory_region_set_dirty(&s->vram_mem, s->cplane_offset + i);
- }
+ memory_region_set_dirty(&s->vram_mem, s->vram24_offset, MAXX * MAXY * 4);
+ memory_region_set_dirty(&s->vram_mem, s->cplane_offset, MAXX * MAXY * 4);
}
static void update_palette_entries(TCXState *s, int start, int end)