Patchwork [11/41] ram: Export last_ram_offset()

login
register
mail settings
Submitter Juan Quintela
Date Sept. 21, 2012, 8:47 a.m.
Message ID <1348217255-22441-12-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/185632/
State New
Headers show

Comments

Juan Quintela - Sept. 21, 2012, 8:47 a.m.
Is the only way of knowing the RAM size.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 cpu-all.h | 2 ++
 exec.c    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/cpu-all.h b/cpu-all.h
index 74d3681..5408782 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -517,6 +517,8 @@  extern int mem_prealloc;
 void dump_exec_info(FILE *f, fprintf_function cpu_fprintf);
 #endif /* !CONFIG_USER_ONLY */

+ram_addr_t last_ram_offset(void);
+
 int cpu_memory_rw_debug(CPUArchState *env, target_ulong addr,
                         uint8_t *buf, int len, int is_write);

diff --git a/exec.c b/exec.c
index f22e9e6..ad2cc2e 100644
--- a/exec.c
+++ b/exec.c
@@ -2464,7 +2464,7 @@  static ram_addr_t find_ram_offset(ram_addr_t size)
     return offset;
 }

-static ram_addr_t last_ram_offset(void)
+ram_addr_t last_ram_offset(void)
 {
     RAMBlock *block;
     ram_addr_t last = 0;