summaryrefslogtreecommitdiffstats
path: root/sim/common/sim-core.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-10-31 08:49:10 +0000
committerAndrew Cagney <cagney@redhat.com>1997-10-31 08:49:10 +0000
commitfcc86d82f7864c9609d2a02acb1a25074e9902ed (patch)
tree539adb7dd51719357d157f82c54c2f6b12810f57 /sim/common/sim-core.h
parentd3e9ca1a88081ec26ee82339dcb210b973bdf96c (diff)
downloadppe42-binutils-fcc86d82f7864c9609d2a02acb1a25074e9902ed.tar.gz
ppe42-binutils-fcc86d82f7864c9609d2a02acb1a25074e9902ed.zip
Make memory regions layered (just like existing device regions) so
that overlapping regions can be defined. Allow the layer (level) of a memory region to be specified as part of an address parameter to memory options. Update simulators.
Diffstat (limited to 'sim/common/sim-core.h')
-rw-r--r--sim/common/sim-core.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/sim/common/sim-core.h b/sim/common/sim-core.h
index 8209bfad0a..ef6b3f1818 100644
--- a/sim/common/sim-core.h
+++ b/sim/common/sim-core.h
@@ -103,24 +103,41 @@ EXTERN_SIM_CORE\
/* Create a memory space within the core.
- The CPU option (when non NULL) specifes the single processor that
- the memory space is to be attached to. (UNIMPLEMENTED).
+ CPU, when non NULL, specifes the single processor that the memory
+ space is to be attached to. (UNIMPLEMENTED).
- */
+ LEVEL specifies the ordering of the memory region. Lower regions
+ are searched first. Within a level, memory regions can not
+ overlap.
+
+ DEVICE, when non NULL, specifies a callback memory space.
+ (UNIMPLEMENTED, see the ppc simulator for an example).
+
+ MODULO, when the simulator has been configured WITH_MODULO support
+ and is greater than zero, specifies that accesses to the region
+ [ADDR .. ADDR+NR_BYTES) should be mapped onto the sub region [ADDR
+ .. ADDR+MODULO). The modulo value must be a power of two.
+
+ OPTIONAL_BUFFER, when non NULL, specifies the buffer to use for
+ data read & written to the region. Normally a more efficient
+ internal structure is used. It is assumed that buffer is allocated
+ such that the byte alignmed of OPTIONAL_BUFFER matches ADDR vis
+ (OPTIONAL_BUFFER % 8) == (ADDR % 8)) */
EXTERN_SIM_CORE\
(void) sim_core_attach
(SIM_DESC sd,
sim_cpu *cpu,
- attach_type attach,
+ int level,
access_type access,
int address_space,
address_word addr,
address_word nr_bytes,
- unsigned modulo, /* Power of two, zero for none. */
+ unsigned modulo,
device *client,
void *optional_buffer);
+
/* Delete a memory space within the core.
*/
@@ -129,7 +146,7 @@ EXTERN_SIM_CORE\
(void) sim_core_detach
(SIM_DESC sd,
sim_cpu *cpu,
- attach_type attach,
+ int level,
int address_space,
address_word addr);
OpenPOWER on IntegriCloud