X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fcga.c;h=3fe374337ad423b63bd0e05660fca17b7b8887a2;hp=00816095dad23e49629feed59b0fb773d0fa4495;hb=c30d1b88a60c3a8df426ce81553675bbe4afef52;hpb=33bf43b34feba36dcbfa47f8f559e5862f531393 diff --git a/palacios/src/devices/cga.c b/palacios/src/devices/cga.c index 0081609..3fe3743 100644 --- a/palacios/src/devices/cga.c +++ b/palacios/src/devices/cga.c @@ -1116,6 +1116,8 @@ static int cga_free(struct video_internal * video_state) { static int cga_save(struct v3_chkpt_ctx * ctx, void * private_data) { struct video_internal * cga = (struct video_internal *)private_data; + v3_chkpt_save(ctx, "FRAMEBUFFER", FRAMEBUF_SIZE, cga->framebuf); + V3_CHKPT_STD_SAVE(ctx, cga->misc_outp_reg); V3_CHKPT_STD_SAVE(ctx, cga->seq_index_reg); V3_CHKPT_STD_SAVE(ctx, cga->seq_data_regs[SEQ_REG_COUNT]); @@ -1146,12 +1148,18 @@ static int cga_save(struct v3_chkpt_ctx * ctx, void * private_data) { V3_CHKPT_STD_SAVE(ctx, cga->passthrough); + v3_chkpt_save_16(ctx, "SCREEN_OFFSET", &(cga->screen_offset)); + v3_chkpt_save_16(ctx, "CURSOR_OFFSET", &(cga->cursor_offset)); + return 0; } static int cga_load(struct v3_chkpt_ctx * ctx, void * private_data) { struct video_internal * cga = (struct video_internal *)private_data; + v3_chkpt_load(ctx, "FRAMEBUFFER", FRAMEBUF_SIZE, cga->framebuf); + + V3_CHKPT_STD_LOAD(ctx, cga->misc_outp_reg); V3_CHKPT_STD_LOAD(ctx, cga->seq_index_reg); V3_CHKPT_STD_LOAD(ctx, cga->seq_data_regs[SEQ_REG_COUNT]); @@ -1182,6 +1190,10 @@ static int cga_load(struct v3_chkpt_ctx * ctx, void * private_data) { V3_CHKPT_STD_LOAD(ctx, cga->passthrough); + v3_chkpt_load_16(ctx, "SCREEN_OFFSET", &(cga->screen_offset)); + v3_chkpt_load_16(ctx, "CURSOR_OFFSET", &(cga->cursor_offset)); + + return 0; }