]> xenbits.xensource.com Git - qemu-xen-4.0-testing.git/commitdiff
Make phys_ram_size a target_phys_addr_t iwj.t.phys_ram_size
authorIan Jackson <iwj@mariner.uk.xensource.com>
Fri, 15 Feb 2008 17:13:41 +0000 (17:13 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 May 2008 11:42:54 +0000 (12:42 +0100)
cpu-all.h
exec.c

index 2a2b1970eefbe48d06a3f7e18a725ad652a7f805..9a03bc4ffb483709a63b24de71a3040f83fbc543 100644 (file)
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -807,7 +807,7 @@ int cpu_inl(CPUState *env, int addr);
 
 /* memory API */
 
-extern int phys_ram_size;
+extern target_phys_addr_t phys_ram_size;
 extern int phys_ram_fd;
 extern uint8_t *phys_ram_base;
 extern uint8_t *phys_ram_dirty;
@@ -835,7 +835,7 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr,
                                   unsigned long size,
                                   unsigned long phys_offset);
 uint32_t cpu_get_physical_page_desc(target_phys_addr_t addr);
-ram_addr_t qemu_ram_alloc(unsigned int size);
+ram_addr_t qemu_ram_alloc(ram_addr_t size);
 void qemu_ram_free(ram_addr_t addr);
 int cpu_register_io_memory(int io_index,
                            CPUReadMemoryFunc **mem_read,
diff --git a/exec.c b/exec.c
index b74d90920cb3dd66f7700a42ef38ba54e4083e38..6cab752d196d7a44e18a21ff9a54d10584a33a0e 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -87,7 +87,7 @@ spinlock_t tb_lock = SPIN_LOCK_UNLOCKED;
 uint8_t code_gen_buffer[CODE_GEN_BUFFER_SIZE] __attribute__((aligned (32)));
 uint8_t *code_gen_ptr;
 
-int phys_ram_size;
+target_phys_addr_t phys_ram_size;
 int phys_ram_fd;
 uint8_t *phys_ram_base;
 uint8_t *phys_ram_dirty;
@@ -2086,12 +2086,12 @@ uint32_t cpu_get_physical_page_desc(target_phys_addr_t addr)
 }
 
 /* XXX: better than nothing */
-ram_addr_t qemu_ram_alloc(unsigned int size)
+ram_addr_t qemu_ram_alloc(ram_addr_t size)
 {
     ram_addr_t addr;
     if ((phys_ram_alloc_offset + size) >= phys_ram_size) {
-        fprintf(stderr, "Not enough memory (requested_size = %u, max memory = %d)\n",
-                size, phys_ram_size);
+        fprintf(stderr, "Not enough memory (requested_size = %u, max memory = %llu)\n",
+                size, (unsigned long long)phys_ram_size);
         abort();
     }
     addr = phys_ram_alloc_offset;