diff options
author | Søren Sandmann <ssp@redhat.com> | 2010-05-25 06:58:57 -0400 |
---|---|---|
committer | Søren Sandmann <ssp@redhat.com> | 2010-05-25 06:58:57 -0400 |
commit | bc5551d4bd45bffb3da492790cb52ab062433c39 (patch) | |
tree | b1b3a090b83935e9204737430f0c7360c5655d62 | |
parent | 9c16f1dd56122a3ae77e297108185f9f4a0ecd71 (diff) |
Make sure memory space is not bigger than the memorysurface0
-rw-r--r-- | src/qxl_driver.c | 8 | ||||
-rw-r--r-- | src/qxl_mem.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 31908ec..5376d4b 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -303,13 +303,9 @@ qxl_reset (qxl_screen_t *qxl) ram_header->mem_slot_start = slot->start_phys_addr; ram_header->mem_slot_end = slot->end_phys_addr; - ErrorF ("before: %d\n", qxl->rom->slot_generation); - - ErrorF ("slot: %d\n", qxl->main_mem_slot); - outb (qxl->io_base + QXL_IO_MEMSLOT_ADD, qxl->main_mem_slot); - ErrorF ("after: %d\n", qxl->rom->slot_generation); + ErrorF ("Created memslot from %p to %p\n", slot->start_phys_addr, slot->end_phys_addr); slot->generation = qxl->rom->slot_generation; @@ -1096,7 +1092,7 @@ qxl_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) qxl_reset (qxl); qxl->mem = qxl_mem_create ((void *)((unsigned long)qxl->ram + qxl->surface0_size), - rom->num_pages * getpagesize()); + rom->num_pages * getpagesize() - qxl->surface0_size); qxl->io_pages = (void *)((unsigned long)qxl->ram); qxl->io_pages_physical = (void *)((unsigned long)qxl->ram_physical); diff --git a/src/qxl_mem.c b/src/qxl_mem.c index 4d60b2d..c4c91b0 100644 --- a/src/qxl_mem.c +++ b/src/qxl_mem.c @@ -56,6 +56,8 @@ qxl_mem_create (void *base, unsigned long n_bytes) if (!mem) goto out; + ErrorF ("memory space from %p to %p\n", base, base + n_bytes); + mem->base = base; mem->n_bytes = n_bytes; |