summaryrefslogtreecommitdiff
path: root/target/xtensa/cpu.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2017-02-22 18:59:32 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2017-02-23 10:30:41 -0800
commitb68755c142deafb6414a1b171a48a4cace723528 (patch)
tree7231ed5f3fb5934da85580b67269dc1b6ef544b4 /target/xtensa/cpu.h
parent10f25e4844cb9b3f02fb032f88051dd5b65b4206 (diff)
downloadqemu-b68755c142deafb6414a1b171a48a4cace723528.tar.gz
target/xtensa: sim: instantiate local memories
Xtensa core may have a number of RAM and ROM areas configured. Record their size and location from the core configuration overlay and instantiate them as RAM regions in the SIM machine. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/cpu.h')
-rw-r--r--target/xtensa/cpu.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index 7e7131a596..ecca17d45d 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -212,6 +212,7 @@ enum {
#define MAX_NCCOMPARE 3
#define MAX_TLB_WAY_SIZE 8
#define MAX_NDBREAK 2
+#define MAX_NMEMORY 4
#define REGION_PAGE_MASK 0xe0000000
@@ -321,6 +322,14 @@ typedef struct XtensaCcompareTimer {
QEMUTimer *timer;
} XtensaCcompareTimer;
+typedef struct XtensaMemory {
+ unsigned num;
+ struct XtensaMemoryRegion {
+ uint32_t addr;
+ uint32_t size;
+ } location[MAX_NMEMORY];
+} XtensaMemory;
+
struct XtensaConfig {
const char *name;
uint64_t options;
@@ -352,6 +361,13 @@ struct XtensaConfig {
unsigned dcache_ways;
uint32_t memctl_mask;
+ XtensaMemory instrom;
+ XtensaMemory instram;
+ XtensaMemory datarom;
+ XtensaMemory dataram;
+ XtensaMemory sysrom;
+ XtensaMemory sysram;
+
uint32_t configid[2];
uint32_t clock_freq_khz;