Deleted Added
sdiff udiff text old ( 10588:145c436a3854 ) new ( 10594:4fdc929c0aaa )
full compact
1# Copyright (c) 2010-2012 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

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

50 def childImage(self, ci):
51 self.image.child.image_file = ci
52
53class MemBus(CoherentXBar):
54 badaddr_responder = BadAddr()
55 default = Self.badaddr_responder.pio
56
57
58def makeLinuxAlphaSystem(mem_mode, mdesc=None, ruby=False):
59
60 class BaseTsunami(Tsunami):
61 ethernet = NSGigE(pci_bus=0, pci_dev=1, pci_func=0)
62 ide = IdeController(disks=[Parent.disk0, Parent.disk2],
63 pci_func=0, pci_dev=0, pci_bus=0)
64
65 self = LinuxAlphaSystem()
66 if not mdesc:
67 # generic system

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

108 self.simple_disk = SimpleDisk(disk=RawDiskImage(image_file = mdesc.disk(),
109 read_only = True))
110 self.intrctrl = IntrControl()
111 self.mem_mode = mem_mode
112 self.terminal = Terminal()
113 self.kernel = binary('vmlinux')
114 self.pal = binary('ts_osfpal')
115 self.console = binary('console')
116 self.boot_osflags = 'root=/dev/hda1 console=ttyS0'
117
118 return self
119
120def makeSparcSystem(mem_mode, mdesc=None):
121 # Constants from iob.cc and uart8250.cc
122 iob_man_addr = 0x9800000000
123 uart_pio_size = 8
124

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

178 self.hypervisor_desc_bin = binary('1up-hv.bin')
179 self.partition_desc_bin = binary('1up-md.bin')
180
181 self.system_port = self.membus.slave
182
183 return self
184
185def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
186 dtb_filename=None, bare_metal=False):
187 assert machine_type
188
189 if bare_metal:
190 self = ArmSystem()
191 else:
192 self = LinuxArmSystem()
193
194 if not mdesc:

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

263 self.kernel = binary('vmlinux.aarch32.ll_20131205.0-gem5')
264 else:
265 self.kernel = binary('vmlinux.arm.smp.fb.2.6.38.8')
266
267 if dtb_filename:
268 self.dtb_filename = binary(dtb_filename)
269 self.machine_type = machine_type
270 # Ensure that writes to the UART actually go out early in the boot
271 boot_flags = 'earlyprintk=pl011,0x1c090000 console=ttyAMA0 ' + \
272 'lpj=19988480 norandmaps rw loglevel=8 ' + \
273 'mem=%s root=/dev/sda1' % mdesc.mem()
274
275 self.realview.setupBootLoader(self.membus, self, binary)
276 self.gic_cpu_addr = self.realview.gic.cpu_addr
277 self.flags_addr = self.realview.realview_io.pio_addr + 0x30
278
279 if mdesc.disk().lower().count('android'):
280 boot_flags += " init=/init "
281 self.boot_osflags = boot_flags
282 self.realview.attachOnChipIO(self.membus, self.bridge)
283 self.realview.attachIO(self.iobus)
284 self.intrctrl = IntrControl()
285 self.terminal = Terminal()
286 self.vncserver = VncServer()
287
288 self.system_port = self.membus.slave
289
290 return self
291
292
293def makeLinuxMipsSystem(mem_mode, mdesc=None):
294 class BaseMalta(Malta):
295 ethernet = NSGigE(pci_bus=0, pci_dev=1, pci_func=0)
296 ide = IdeController(disks=[Parent.disk0, Parent.disk2],
297 pci_func=0, pci_dev=0, pci_bus=0)
298
299 self = LinuxMipsSystem()
300 if not mdesc:
301 # generic system

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

321 self.malta.ethernet.dma = self.iobus.slave
322 self.simple_disk = SimpleDisk(disk=RawDiskImage(image_file = mdesc.disk(),
323 read_only = True))
324 self.intrctrl = IntrControl()
325 self.mem_mode = mem_mode
326 self.terminal = Terminal()
327 self.kernel = binary('mips/vmlinux')
328 self.console = binary('mips/console')
329 self.boot_osflags = 'root=/dev/hda1 console=ttyS0'
330
331 self.system_port = self.membus.slave
332
333 return self
334
335def x86IOAddress(port):
336 IO_address_space_base = 0x8000000000000000
337 return IO_address_space_base + port

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

496 base_entries.append(assign_to_apic)
497 assignISAInt(0, 2)
498 assignISAInt(1, 1)
499 for i in range(3, 15):
500 assignISAInt(i, i)
501 self.intel_mp_table.base_entries = base_entries
502 self.intel_mp_table.ext_entries = ext_entries
503
504def makeLinuxX86System(mem_mode, numCPUs=1, mdesc=None, Ruby=False):
505 self = LinuxX86System()
506
507 # Build up the x86 system and then specialize it for Linux
508 makeX86System(mem_mode, numCPUs, mdesc, self, Ruby)
509
510 # We assume below that there's at least 1MB of memory. We'll require 2
511 # just to avoid corner cases.
512 phys_mem_size = sum(map(lambda r: r.size(), self.mem_ranges))

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

541 # reserved for devices.
542 if len(self.mem_ranges) == 2:
543 entries.append(X86E820Entry(addr = 0x100000000,
544 size = '%dB' % (self.mem_ranges[1].size()), range_type = 1))
545
546 self.e820_table.entries = entries
547
548 # Command line
549 self.boot_osflags = 'earlyprintk=ttyS0 console=ttyS0 lpj=7999923 ' + \
550 'root=/dev/hda1'
551 self.kernel = binary('x86_64-vmlinux-2.6.22.9')
552 return self
553
554
555def makeDualRoot(full_system, testSystem, driveSystem, dumpfile):
556 self = Root(full_system = full_system)
557 self.testsys = testSystem
558 self.drivesys = driveSystem

--- 16 unchanged lines hidden ---