diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-02-06 22:14:18 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-02-06 22:14:18 -0800 |
commit | 17b4ef52bb9b31f7d57a499eac1d1656bb5df679 (patch) | |
tree | ed406690adb62e29d544e5c8f822573358a76534 /configs/common | |
parent | 1b54344aeb1cdac82cd9d85c4e1e37ed23821853 (diff) | |
download | gem5-17b4ef52bb9b31f7d57a499eac1d1656bb5df679.tar.xz |
ruby: x86 fs config support
Diffstat (limited to 'configs/common')
-rw-r--r-- | configs/common/FSConfig.py | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py index f13b90e9e..9b94e7ffa 100644 --- a/configs/common/FSConfig.py +++ b/configs/common/FSConfig.py @@ -10,6 +10,7 @@ # unmodified and in its entirety in all distributions of the software, # modified or unmodified, in source code or in binary form. # +# Copyright (c) 2010-2011 Advanced Micro Devices, Inc. # Copyright (c) 2006-2008 The Regents of The University of Michigan # All rights reserved. # @@ -286,7 +287,34 @@ def x86IOAddress(port): IO_address_space_base = 0x8000000000000000 return IO_address_space_base + port; -def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None): +def connectX86ClassicSystem(x86_sys): + x86_sys.membus = MemBus(bus_id=1) + x86_sys.physmem.port = x86_sys.membus.port + + # North Bridge + x86_sys.iobus = Bus(bus_id=0) + x86_sys.bridge = Bridge(delay='50ns', nack_delay='4ns') + x86_sys.bridge.side_a = x86_sys.iobus.port + x86_sys.bridge.side_b = x86_sys.membus.port + + # connect the io bus + x86_sys.pc.attachIO(x86_sys.iobus) + +def connectX86RubySystem(x86_sys): + # North Bridge + x86_sys.piobus = Bus(bus_id=0) + + # + # Pio functional accesses from devices need direct access to memory + # RubyPort currently does support functional accesses. Therefore provide + # the piobus a direct connection to physical memory + # + x86_sys.piobus.port = x86_sys.physmem.port + + x86_sys.pc.attachIO(x86_sys.piobus) + + +def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None, Ruby = False): if self == None: self = X86System() @@ -298,19 +326,16 @@ def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None): self.mem_mode = mem_mode # Physical memory - self.membus = MemBus(bus_id=1) self.physmem = PhysicalMemory(range = AddrRange(mdesc.mem())) - self.physmem.port = self.membus.port - - # North Bridge - self.iobus = Bus(bus_id=0) - self.bridge = Bridge(delay='50ns', nack_delay='4ns') - self.bridge.side_a = self.iobus.port - self.bridge.side_b = self.membus.port # Platform self.pc = Pc() - self.pc.attachIO(self.iobus) + + # Create and connect the busses required by each memory system + if Ruby: + connectX86RubySystem(self) + else: + connectX86ClassicSystem(self) self.intrctrl = IntrControl() @@ -380,12 +405,11 @@ def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None): for i in range(3, 15): assignISAInt(i, i) - -def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None): +def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False): self = LinuxX86System() - # Build up a generic x86 system and then specialize it for Linux - makeX86System(mem_mode, numCPUs, mdesc, self) + # Build up the x86 system and then specialize it for Linux + makeX86System(mem_mode, numCPUs, mdesc, self, Ruby) # We assume below that there's at least 1MB of memory. We'll require 2 # just to avoid corner cases. |