summaryrefslogtreecommitdiff
path: root/configs/ruby/Ruby.py
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-02-12 15:53:47 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-03-20 21:41:45 +0000
commit68af229490fc811aebddf68b3e2e09e63a5fa475 (patch)
tree2a9a9cf0c94c2f490e78b30c2498460e535f3a39 /configs/ruby/Ruby.py
parentfe187de9bd1aa479ab6cd198522bfd118d0d50ec (diff)
downloadgem5-68af229490fc811aebddf68b3e2e09e63a5fa475.tar.xz
arch-arm, configs: Treat the bootloader rom as cacheable memory
Prior to this changeset the bootloader rom (instantiated as a SimpleMemory) in ruby Arm systems was treated as an IO device and it was fronted by a DMA controller. This changeset moves the bootloader rom and adds it to the system as another memory with a dedicated directory controller. Change-Id: I094fed031cdef7f77a939d94f948d967b349b7e0 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8741 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'configs/ruby/Ruby.py')
-rw-r--r--configs/ruby/Ruby.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index 9e110f84d..f1415b062 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, 2017 ARM Limited
+# Copyright (c) 2012, 2017-2018 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -135,7 +135,8 @@ def create_topology(controllers, options):
topology = eval("Topo.%s(controllers)" % options.topology)
return topology
-def create_system(options, full_system, system, piobus = None, dma_ports = []):
+def create_system(options, full_system, system, piobus = None, dma_ports = [],
+ bootmem=None):
system.ruby = RubySystem()
ruby = system.ruby
@@ -150,7 +151,7 @@ def create_system(options, full_system, system, piobus = None, dma_ports = []):
try:
(cpu_sequencers, dir_cntrls, topology) = \
eval("%s.create_system(options, full_system, system, dma_ports,\
- ruby)"
+ bootmem, ruby)"
% protocol)
except:
print("Error: could not create sytem for ruby protocol %s" % protocol)
@@ -198,7 +199,8 @@ def create_system(options, full_system, system, piobus = None, dma_ports = []):
ruby.phys_mem = SimpleMemory(range=system.mem_ranges[0],
in_addr_map=False)
-def create_directories(options, mem_ranges, ruby_system):
+def create_directories(options, mem_ranges, bootmem, ruby_system,
+ system):
dir_cntrl_nodes = []
if options.numa_high_bit:
numa_bit = options.numa_high_bit
@@ -227,7 +229,17 @@ def create_directories(options, mem_ranges, ruby_system):
exec("ruby_system.dir_cntrl%d = dir_cntrl" % i)
dir_cntrl_nodes.append(dir_cntrl)
- return dir_cntrl_nodes
+
+ if bootmem is not None:
+ rom_dir_cntrl = Directory_Controller()
+ rom_dir_cntrl.directory = RubyDirectoryMemory()
+ rom_dir_cntrl.ruby_system = ruby_system
+ rom_dir_cntrl.version = i + 1
+ rom_dir_cntrl.memory = bootmem.port
+ rom_dir_cntrl.addr_ranges = bootmem.range
+ return (dir_cntrl_nodes, rom_dir_cntrl)
+
+ return (dir_cntrl_nodes, None)
def send_evicts(options):
# currently, 2 scenarios warrant forwarding evictions to the CPU: