#include "vga_int.h"
#include "pixel_ops.h"
#include "qemu-timer.h"
+#include "kvm.h"
//#define DEBUG_VGA
//#define DEBUG_VGA_MEM
#endif
/* called for accesses between 0xa0000 and 0xc0000 */
-uint32_t vga_mem_readb(void *opaque, a_target_phys_addr addr)
+uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr)
{
VGACommonState *s = opaque;
int memory_map_mode, plane;
return ret;
}
-static uint32_t vga_mem_readw(void *opaque, a_target_phys_addr addr)
+static uint32_t vga_mem_readw(void *opaque, target_phys_addr_t addr)
{
uint32_t v;
#ifdef TARGET_WORDS_BIGENDIAN
return v;
}
-static uint32_t vga_mem_readl(void *opaque, a_target_phys_addr addr)
+static uint32_t vga_mem_readl(void *opaque, target_phys_addr_t addr)
{
uint32_t v;
#ifdef TARGET_WORDS_BIGENDIAN
}
/* called for accesses between 0xa0000 and 0xc0000 */
-void vga_mem_writeb(void *opaque, a_target_phys_addr addr, uint32_t val)
+void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
{
VGACommonState *s = opaque;
int memory_map_mode, plane, write_mode, b, func_select, mask;
}
}
-static void vga_mem_writew(void *opaque, a_target_phys_addr addr, uint32_t val)
+static void vga_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
{
#ifdef TARGET_WORDS_BIGENDIAN
vga_mem_writeb(opaque, addr, (val >> 8) & 0xff);
#endif
}
-static void vga_mem_writel(void *opaque, a_target_phys_addr addr, uint32_t val)
+static void vga_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
#ifdef TARGET_WORDS_BIGENDIAN
vga_mem_writeb(opaque, addr, (val >> 24) & 0xff);
}
}
+void vga_dirty_log_start(VGACommonState *s)
+{
+ if (kvm_enabled() && s->map_addr)
+ kvm_log_start(s->map_addr, s->map_end - s->map_addr);
+
+ if (kvm_enabled() && s->lfb_vram_mapped) {
+ kvm_log_start(isa_mem_base + 0xa0000, 0x8000);
+ kvm_log_start(isa_mem_base + 0xa8000, 0x8000);
+ }
+}
+
/*
* graphic modes
*/
{
int y1, y, update, linesize, y_start, double_scan, mask, depth;
int width, height, shift_control, line_offset, bwidth, bits;
- a_ram_addr page0, page1, page_min, page_max;
+ ram_addr_t page0, page1, page_min, page_max;
int disp_width, multi_scan, multi_run;
uint8_t *d;
uint32_t v, addr1, addr;
((v & 0x00000800) << 10) | ((v & 0x00007000) >> 1))
/* relay text rendering to the display driver
* instead of doing a full vga_update_display() */
-static void vga_update_text(void *opaque, a_console_ch *chardata)
+static void vga_update_text(void *opaque, console_ch_t *chardata)
{
VGACommonState *s = opaque;
int graphic_mode, i, cursor_offset, cursor_visible;
int cw, cheight, width, height, size, c_min, c_max;
uint32_t *src;
- a_console_ch *dst, val;
+ console_ch_t *dst, val;
char msg_buffer[80];
int full_update = 0;