FSConfig.py (8525:5f3fe76e7950) FSConfig.py (8528:1f95c9a0bb2f)
1# Copyright (c) 2010 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 27 unchanged lines hidden (view full) ---

36# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39#
40# Authors: Kevin Lim
41
42from m5.objects import *
43from Benchmarks import *
1# Copyright (c) 2010 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 27 unchanged lines hidden (view full) ---

36# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39#
40# Authors: Kevin Lim
41
42from m5.objects import *
43from Benchmarks import *
44from m5.util import convert
44
45class CowIdeDisk(IdeDisk):
46 image = CowDiskImage(child=RawDiskImage(read_only=True),
47 read_only=False)
48
49 def childImage(self, ci):
50 self.image.child.image_file = ci
51

--- 159 unchanged lines hidden (view full) ---

211 elif machine_type == "RealView_EB":
212 self.realview = RealViewEB()
213 elif machine_type == "VExpress_ELT":
214 self.realview = VExpress_ELT()
215 else:
216 print "Unknown Machine Type"
217 sys.exit(1)
218
45
46class CowIdeDisk(IdeDisk):
47 image = CowDiskImage(child=RawDiskImage(read_only=True),
48 read_only=False)
49
50 def childImage(self, ci):
51 self.image.child.image_file = ci
52

--- 159 unchanged lines hidden (view full) ---

212 elif machine_type == "RealView_EB":
213 self.realview = RealViewEB()
214 elif machine_type == "VExpress_ELT":
215 self.realview = VExpress_ELT()
216 else:
217 print "Unknown Machine Type"
218 sys.exit(1)
219
219 use_cf = False
220 if mdesc.disk()[-4:] == ".img":
221 use_cf = True
222 self.cf0 = CowIdeDisk(driveID='master')
223 self.cf0.childImage(mdesc.disk())
224 # default to an IDE controller rather than a CF one
225 # assuming we've got one
226 try:
227 self.realview.ide.disks = [self.cf0]
228 except:
229 self.realview.cf_ctrl.disks = [self.cf0]
220 self.cf0 = CowIdeDisk(driveID='master')
221 self.cf0.childImage(mdesc.disk())
222 # default to an IDE controller rather than a CF one
223 # assuming we've got one
224 try:
225 self.realview.ide.disks = [self.cf0]
226 except:
227 self.realview.cf_ctrl.disks = [self.cf0]
228
230 if bare_metal:
231 # EOT character on UART will end the simulation
232 self.realview.uart.end_on_eot = True
229 if bare_metal:
230 # EOT character on UART will end the simulation
231 self.realview.uart.end_on_eot = True
233 self.physmem = PhysicalMemory(range = AddrRange(Addr('256MB')),
232 self.physmem = PhysicalMemory(range = AddrRange(Addr(mdesc.mem())),
234 zero = True)
235 else:
233 zero = True)
234 else:
236 self.kernel = binary('vmlinux.arm')
235 self.kernel = binary('vmlinux.arm.smp.fb.2.6.38.8')
237 self.machine_type = machine_type
236 self.machine_type = machine_type
237 if convert.toMemorySize(mdesc.mem()) > convert.toMemorySize('256MB'):
238 print "The currently implemented ARM platforms only easily support 256MB of DRAM"
239 print "It might be possible to get some more by using 256MB@0x30000000, but this"
240 print "is untested and may require some heroics"
241
238 boot_flags = 'earlyprintk console=ttyAMA0 lpj=19988480 norandmaps ' + \
242 boot_flags = 'earlyprintk console=ttyAMA0 lpj=19988480 norandmaps ' + \
239 'rw loglevel=8 '
240 if use_cf:
241 self.physmem = PhysicalMemory(range = AddrRange(Addr('256MB')),
242 zero = True)
243 boot_flags += "mem=256MB root=/dev/sda1 "
244 self.nvmem = PhysicalMemory(range = AddrRange(Addr('2GB'),
245 size = '64MB'), zero = True)
246 self.nvmem.port = self.membus.port
247 self.boot_loader = binary('boot.arm')
248 self.boot_loader_mem = self.nvmem
249 self.gic_cpu_addr = self.realview.gic.cpu_addr
250 self.flags_addr = self.realview.realview_io.pio_addr + 0x30
251 else:
252 self.physmem = PhysicalMemory(range = AddrRange(Addr('128MB')),
253 zero = True)
254 self.diskmem = PhysicalMemory(range = AddrRange(Addr('128MB'),
255 size = '128MB'),
256 file = disk(mdesc.disk()))
257 self.diskmem.port = self.membus.port
258 boot_flags += "mem=128MB slram=slram0,0x8000000,+0x8000000 " + \
259 "mtdparts=slram0:- root=/dev/mtdblock0 "
243 'rw loglevel=8 mem=%s root=/dev/sda1' % mdesc.mem()
260
244
245 self.physmem = PhysicalMemory(range = AddrRange(Addr(mdesc.mem())),
246 zero = True)
247 self.nvmem = PhysicalMemory(range = AddrRange(Addr('2GB'),
248 size = '64MB'), zero = True)
249 self.nvmem.port = self.membus.port
250 self.boot_loader = binary('boot.arm')
251 self.boot_loader_mem = self.nvmem
252 self.gic_cpu_addr = self.realview.gic.cpu_addr
253 self.flags_addr = self.realview.realview_io.pio_addr + 0x30
254
261 if mdesc.disk().count('android'):
262 boot_flags += "init=/init "
263 self.boot_osflags = boot_flags
264
265 self.physmem.port = self.membus.port
266 self.realview.attachOnChipIO(self.membus)
267 self.realview.attachIO(self.iobus)
268 self.intrctrl = IntrControl()

--- 298 unchanged lines hidden ---
255 if mdesc.disk().count('android'):
256 boot_flags += "init=/init "
257 self.boot_osflags = boot_flags
258
259 self.physmem.port = self.membus.port
260 self.realview.attachOnChipIO(self.membus)
261 self.realview.attachIO(self.iobus)
262 self.intrctrl = IntrControl()

--- 298 unchanged lines hidden ---