[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] ioemu: don't use magic number 0xff00000.
commit 153a5f4c7ddc2d5ef85e62e73b2f66132c6f9089 Author: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> Date: Thu Jan 15 20:59:57 2009 +0900 don't use magic number 0xff00000. don't use magic number 0xff00000. define VRAM_RESERVED_ADDRESS and use it. On ia64, the area is already used by firmware so define it to 0xfd0000000. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index d6a9235..f2ec05b 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -3165,7 +3165,7 @@ static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id) if (!s->vram_gmfn) { /* Old guest, VRAM is not mapped, we have to restore it * ourselves */ - s->vram_gmfn = vga_acc ? s->lfb_addr : 0xff000000; + s->vram_gmfn = vga_acc ? s->lfb_addr : VRAM_RESERVED_ADDRESS; xen_vga_populate_vram(s->vram_gmfn, s->vram_size); } xen_vga_vram_map(s->vram_gmfn, s->vram_size); diff --git a/hw/vga.c b/hw/vga.c index 8aa61c6..2ae6e85 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2126,7 +2126,7 @@ void unset_vram_mapping(void *opaque) VGAState *s = (VGAState *) opaque; if (s->vram_gmfn) { /* We can put it there for xend to save it efficiently */ - set_vram_mapping(s, 0xff000000, 0xff000000 + s->vram_size); + set_vram_mapping(s, VRAM_RESERVED_ADDRESS, VRAM_RESERVED_ADDRESS + s->vram_size); } } @@ -2250,9 +2250,9 @@ static int vga_load(QEMUFile *f, void *opaque, int version_id) } /* Old guest, VRAM is not mapped, we have to restore it ourselves */ if (!s->vram_gmfn) { - xen_vga_populate_vram(0xff000000, s->vram_size); - xen_vga_vram_map(0xff000000, s->vram_size); - s->vram_gmfn = 0xff000000; + xen_vga_populate_vram(VRAM_RESERVED_ADDRESS, s->vram_size); + xen_vga_vram_map(VRAM_RESERVED_ADDRESS, s->vram_size); + s->vram_gmfn = VRAM_RESERVED_ADDRESS; qemu_get_buffer(f, s->vram_ptr, s->vram_size); } } @@ -2525,9 +2525,9 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, s->get_resolution = vga_get_resolution; if (!restore) { - xen_vga_populate_vram(0xff000000, s->vram_size); - xen_vga_vram_map(0xff000000, s->vram_size); - s->vram_gmfn = 0xff000000; + xen_vga_populate_vram(VRAM_RESERVED_ADDRESS, s->vram_size); + xen_vga_vram_map(VRAM_RESERVED_ADDRESS, s->vram_size); + s->vram_gmfn = VRAM_RESERVED_ADDRESS; } graphic_console_init(s->ds, vga_update_display, vga_invalidate_display, diff --git a/hw/vga_int.h b/hw/vga_int.h index 54a1f7e..d914b62 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -209,3 +209,9 @@ void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1, void *vga_update_vram(VGAState *s, void *vga_ram_base, int vga_ram_size); extern const uint8_t sr_mask[8]; extern const uint8_t gr_mask[16]; + +#ifdef __ia64__ +#define VRAM_RESERVED_ADDRESS 0xfd000000 +#else +#define VRAM_RESERVED_ADDRESS 0xff000000 +#endif -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |