@@ -1000,8 +1000,8 @@ static void rom_reset(void *unused)
void *host = memory_region_get_ram_ptr(rom->mr);
memcpy(host, rom->data, rom->datasize);
} else {
- cpu_physical_memory_write_rom(&address_space_memory,
- rom->addr, rom->data, rom->datasize);
+ address_space_write_rom(&address_space_memory,
+ rom->addr, rom->data, rom->datasize);
}
if (rom->isrom) {
/* rom needs to be written only once */
@@ -1130,7 +1130,7 @@ static void fimd_update_memory_section(Exynos4210fimdState *s, unsigned win)
}
if (w->host_fb_addr) {
- cpu_physical_memory_unmap(w->host_fb_addr, w->fb_len, 0, 0);
+ address_space_unmap(w->host_fb_addr, w->fb_len, 0, 0);
w->host_fb_addr = NULL;
w->fb_len = 0;
}
@@ -1161,7 +1161,7 @@ static void fimd_update_memory_section(Exynos4210fimdState *s, unsigned win)
goto error_return;
}
- w->host_fb_addr = cpu_physical_memory_map(fb_start_addr, &fb_mapped_len, 0);
+ w->host_fb_addr = address_space_map(fb_start_addr, &fb_mapped_len, 0);
if (!w->host_fb_addr) {
DPRINT_ERROR("Failed to map window %u framebuffer\n", win);
goto error_return;
@@ -1170,7 +1170,7 @@ static void fimd_update_memory_section(Exynos4210fimdState *s, unsigned win)
if (fb_mapped_len != w->fb_len) {
DPRINT_ERROR("Window %u mapped framebuffer length is less then "
"expected\n", win);
- cpu_physical_memory_unmap(w->host_fb_addr, fb_mapped_len, 0, 0);
+ address_space_unmap(w->host_fb_addr, fb_mapped_len, 0, 0);
goto error_return;
}
memory_region_set_log(w->mem_section.mr, true, DIRTY_MEMORY_VGA);
@@ -213,7 +213,7 @@ static void tmu2_start(MilkymistTMU2State *s)
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
fb_len = 2*s->regs[R_TEXHRES]*s->regs[R_TEXVRES];
- fb = cpu_physical_memory_map(s->regs[R_TEXFBUF], &fb_len, 0);
+ fb = address_space_map(s->regs[R_TEXFBUF], &fb_len, 0);
if (fb == NULL) {
glDeleteTextures(1, &texture);
glXMakeContextCurrent(s->dpy, None, None, NULL);
@@ -222,7 +222,7 @@ static void tmu2_start(MilkymistTMU2State *s)
}
glTexImage2D(GL_TEXTURE_2D, 0, 3, s->regs[R_TEXHRES], s->regs[R_TEXVRES],
0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, fb);
- cpu_physical_memory_unmap(fb, fb_len, 0, fb_len);
+ address_space_unmap(fb, fb_len, 0, fb_len);
/* Set up texturing options */
/* WARNING:
@@ -257,7 +257,7 @@ static void tmu2_start(MilkymistTMU2State *s)
/* Read the QEMU dest. framebuffer into the OpenGL framebuffer */
fb_len = 2 * s->regs[R_DSTHRES] * s->regs[R_DSTVRES];
- fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 0);
+ fb = address_space_map(s->regs[R_DSTFBUF], &fb_len, 0);
if (fb == NULL) {
glDeleteTextures(1, &texture);
glXMakeContextCurrent(s->dpy, None, None, NULL);
@@ -267,7 +267,7 @@ static void tmu2_start(MilkymistTMU2State *s)
glDrawPixels(s->regs[R_DSTHRES], s->regs[R_DSTVRES], GL_RGB,
GL_UNSIGNED_SHORT_5_6_5, fb);
- cpu_physical_memory_unmap(fb, fb_len, 0, fb_len);
+ address_space_unmap(fb, fb_len, 0, fb_len);
glViewport(0, 0, s->regs[R_DSTHRES], s->regs[R_DSTVRES]);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@@ -276,7 +276,7 @@ static void tmu2_start(MilkymistTMU2State *s)
/* Map the texture */
mesh_len = MESH_MAXSIZE*MESH_MAXSIZE*sizeof(struct vertex);
- mesh = cpu_physical_memory_map(s->regs[R_VERTICESADDR], &mesh_len, 0);
+ mesh = address_space_map(s->regs[R_VERTICESADDR], &mesh_len, 0);
if (mesh == NULL) {
glDeleteTextures(1, &texture);
glXMakeContextCurrent(s->dpy, None, None, NULL);
@@ -289,11 +289,11 @@ static void tmu2_start(MilkymistTMU2State *s)
s->regs[R_HMESHLAST], s->regs[R_VMESHLAST],
s->regs[R_DSTHOFFSET], s->regs[R_DSTVOFFSET],
s->regs[R_DSTSQUAREW], s->regs[R_DSTSQUAREH]);
- cpu_physical_memory_unmap(mesh, mesh_len, 0, mesh_len);
+ address_space_unmap(mesh, mesh_len, 0, mesh_len);
/* Write back the OpenGL framebuffer to the QEMU framebuffer */
fb_len = 2 * s->regs[R_DSTHRES] * s->regs[R_DSTVRES];
- fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 1);
+ fb = address_space_map(s->regs[R_DSTFBUF], &fb_len, 1);
if (fb == NULL) {
glDeleteTextures(1, &texture);
glXMakeContextCurrent(s->dpy, None, None, NULL);
@@ -303,7 +303,7 @@ static void tmu2_start(MilkymistTMU2State *s)
glReadPixels(0, 0, s->regs[R_DSTHRES], s->regs[R_DSTVRES], GL_RGB,
GL_UNSIGNED_SHORT_5_6_5, fb);
- cpu_physical_memory_unmap(fb, fb_len, 1, fb_len);
+ address_space_unmap(fb, fb_len, 1, fb_len);
/* Free OpenGL allocs */
glDeleteTextures(1, &texture);
@@ -630,9 +630,9 @@ static void omap_rfbi_transfer_start(struct omap_dss_s *s)
len = s->rfbi.pixels * 2;
data_addr = s->dispc.l[0].addr[0];
- data = cpu_physical_memory_map(data_addr, &len, 0);
+ data = address_space_map(data_addr, &len, 0);
if (data && len != s->rfbi.pixels * 2) {
- cpu_physical_memory_unmap(data, len, 0, 0);
+ address_space_unmap(data, len, 0, 0);
data = NULL;
len = s->rfbi.pixels * 2;
}
@@ -641,7 +641,7 @@ static void omap_rfbi_transfer_start(struct omap_dss_s *s)
bounce_buffer = g_realloc(bounce_buffer, len);
}
data = bounce_buffer;
- cpu_physical_memory_read(data_addr, data, len);
+ address_space_read(data_addr, data, len);
}
/* TODO bpp */
@@ -656,7 +656,7 @@ static void omap_rfbi_transfer_start(struct omap_dss_s *s)
s->rfbi.chip[1]->block(s->rfbi.chip[1]->opaque, 1, data, len, pitch);
if (data != bounce_buffer) {
- cpu_physical_memory_unmap(data, len, 0, len);
+ address_space_unmap(data, len, 0, len);
}
omap_rfbi_transfer_stop(s);