return env.get('LINUX_IMAGE', disk('linux-latest.img'))
elif buildEnv['TARGET_ISA'] == 'x86':
return env.get('LINUX_IMAGE', disk('x86root.img'))
+ elif buildEnv['TARGET_ISA'] == 'arm':
+ return env.get('LINUX_IMAGE', disk('ael-arm.ext2'))
else:
print "Don't know what default disk image to use for ISA %s" % \
buildEnv['TARGET_ISA']
'ValStreamCopy': [SysConfig('micro_streamcopy.rcS', '512MB')],
'MutexTest': [SysConfig('mutex-test.rcS', '128MB')],
-
- 'bnAn': [SysConfig('/z/saidi/work/m5.newmem.head/configs/boot/bn-app.rcS',
- '128MB', '/z/saidi/work/bottleneck/bnimg.img')]
+ 'ArmLinux': [SysConfig('null.rcS', '128MB', 'ael-arm.ext2')],
+ 'ArmLinuxFrameBuf': [SysConfig('null.rcS', '128MB', 'ael-full.ext2')],
+ 'ArmLinuxCflash': [SysConfig('null.rcS', '256MB', 'linux-arm.img')],
+ 'ArmAndroid': [SysConfig('null.rcS', '256MB', 'android-mbr.img')],
}
benchs = Benchmarks.keys()
self.mem_mode = mem_mode
- #self.cf0 = CowIdeDisk(driveID='master')
- #self.cf0.childImage(mdesc.disk())
- #self.cf_ctrl = IdeController(disks=[self.cf0],
- # pci_func = 0, pci_dev = 0, pci_bus = 0,
- # io_shift = 1, ctrl_offset = 2, Command = 0x1,
- # BAR0 = 0x18000000, BAR0Size = '16B',
- # BAR1 = 0x18000100, BAR1Size = '1B',
- # BAR0LegacyIO = True, BAR1LegacyIO = True,)
- #self.cf_ctrl.pio = self.iobus.port
-
if machine_type == "RealView_PBX":
self.realview = RealViewPBX()
elif machine_type == "RealView_EB":
print "Unknown Machine Type"
sys.exit(1)
+ use_cf = False
+ if mdesc.disk()[-4:] == ".img":
+ use_cf = True
+ self.cf0 = CowIdeDisk(driveID='master')
+ self.cf0.childImage(mdesc.disk())
+ self.realview.cf_ctrl.disks = [self.cf0]
+
if bare_metal:
# EOT character on UART will end the simulation
self.realview.uart.end_on_eot = True
- self.physmem = PhysicalMemory(range = AddrRange(Addr('256MB')), zero = True)
+ self.physmem = PhysicalMemory(range = AddrRange(Addr('256MB')),
+ zero = True)
else:
- self.physmem = PhysicalMemory(range = AddrRange(Addr('128MB')), zero = True)
- self.diskmem = PhysicalMemory(range = AddrRange(Addr('128MB'), size = '128MB'),
- file = disk('ael-arm.ext2'))
- self.diskmem.port = self.membus.port
- self.machine_type = machine_type
self.kernel = binary('vmlinux.arm')
- self.boot_osflags = 'earlyprintk mem=128MB console=ttyAMA0' + \
- ' lpj=19988480 norandmaps slram=slram0,0x8000000,+0x8000000' + \
- ' mtdparts=slram0:- rw loglevel=8 root=/dev/mtdblock0'
+ self.machine_type = machine_type
+ boot_flags = 'earlyprintk console=ttyAMA0 lpj=19988480 norandmaps ' + \
+ 'rw loglevel=8 '
+ if use_cf:
+ self.physmem = PhysicalMemory(range = AddrRange(Addr('256MB')),
+ zero = True)
+ boot_flags += "mem=256MB root=/dev/sda1 "
+ else:
+ self.physmem = PhysicalMemory(range = AddrRange(Addr('128MB')),
+ zero = True)
+ self.diskmem = PhysicalMemory(range = AddrRange(Addr('128MB'),
+ size = '128MB'),
+ file = disk(mdesc.disk()))
+ self.diskmem.port = self.membus.port
+ boot_flags += "mem=128MB slram=slram0,0x8000000,+0x8000000 " + \
+ "mtdparts=slram0:- root=/dev/mtdblock0 "
+ if mdesc.disk().count('android'):
+ boot_flags += "init=/init "
+ self.boot_osflags = boot_flags
self.physmem.port = self.membus.port
self.realview.attachOnChipIO(self.membus)
from m5.params import *
from m5.proxy import *
from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice
+from Ide import *
from Platform import Platform
from Terminal import Terminal
from Uart import Uart
clcd = Pl111(pio_addr=0x10020000, int_num=55)
kmi0 = Pl050(pio_addr=0x10006000, int_num=52)
kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True)
+ cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=0,
+ io_shift = 1, ctrl_offset = 2, Command = 0x1,
+ BAR0 = 0x18000000, BAR0Size = '16B',
+ BAR1 = 0x18000100, BAR1Size = '1B',
+ BAR0LegacyIO = True, BAR1LegacyIO = True)
+
l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff)
flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x4000000)
aaci_fake = AmbaFake(pio_addr=0x10004000)
mmc_fake = AmbaFake(pio_addr=0x10005000)
rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031)
- cf0_fake = IsaFake(pio_addr=0x18000000, pio_size=0xfff)
# Attach I/O devices that are on chip
self.clcd.pio = bus.port
self.kmi0.pio = bus.port
self.kmi1.pio = bus.port
+ self.cf_ctrl.pio = bus.port
self.dmac_fake.pio = bus.port
self.uart1_fake.pio = bus.port
self.uart2_fake.pio = bus.port
self.mmc_fake.pio = bus.port
self.rtc_fake.pio = bus.port
self.flash_fake.pio = bus.port
- self.cf0_fake.pio = bus.port
# Reference for memory map and interrupt number
# RealView Emulation Baseboard User Guide (ARM DUI 0143B)