Hi, I try to add ruby support for arm full system. I define a function named 
makeArmRubySystem in FSConfig.py as following and add it to ruby_fs.py. I can 
successfully boot 1 cpu, While when I try to boot 4 cpus, it throws a kernel 
panic and shuts down cpu1, cpu2 and cpu3. Can someone give me some guidence on 
ruby for arm full system? Thanks in andvance.

def makeArmRubySystem(mem_mode, machine_type, mdesc = None, bare_metal=False):
    assert machine_type

    if bare_metal:
        self = ArmSystem()
    else:
        self = LinuxArmSystem()

    if not mdesc:
        # generic system
        mdesc = SysConfig()

    self.readfile = mdesc.script()
    self.piobus = Bus(bus_id=0)
    #self.membus = MemBus(bus_id=1)
    #self.membus.badaddr_responder.warn_access = "warn"
    self.mem_mode = mem_mode

    if machine_type == "RealView_PBX":
        self.realview = RealViewPBX()
    elif machine_type == "RealView_EB":
        self.realview = RealViewEB()
    elif machine_type == "VExpress_ELT":
        self.realview = VExpress_ELT()
    else:
        print "Unknown Machine Type"
        sys.exit(1)
    print machine_type
    self.cf0 = CowIdeDisk(driveID='master')
    self.cf0.childImage(mdesc.disk())
    # default to an IDE controller rather than a CF one
    # assuming we've got one
    try:
        self.realview.ide.disks = [self.cf0]
    except:
        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(mdesc.mem())),
                                      zero = True)
    else:
        self.kernel = binary('vmlinux.arm.smp.fb.2.6.38.8')
        self.machine_type = machine_type
        if convert.toMemorySize(mdesc.mem()) > convert.toMemorySize('256MB'):
            print "The currently implemented ARM platforms only easily support 
256MB of DRAM"
            print "It might be possible to get some more by using 
256MB@0x30000000, but this"
            print "is untested and may require some heroics"

        boot_flags = 'earlyprintk console=ttyAMA0 lpj=19988480 norandmaps ' + \
                     'rw loglevel=8 mem=%s root=/dev/sda1' % mdesc.mem()

        self.physmem = PhysicalMemory(range = AddrRange(Addr(mdesc.mem())),
                                      zero = True)
        self.nvmem = PhysicalMemory(range = AddrRange(Addr('2GB'),
                                    size = '64MB'), zero = True)
        #self.nvmem.port = self.membus.port
        self.boot_loader = binary('boot.arm')
        self.boot_loader_mem = self.nvmem
        self.gic_cpu_addr = self.realview.gic.cpu_addr
        self.flags_addr = self.realview.realview_io.pio_addr + 0x30

        if mdesc.disk().count('android'):
            boot_flags += " init=/init "
        self.boot_osflags = boot_flags
    self.nvmem.port = self.piobus.port
    self.physmem.port = self.piobus.port
    #self.realview.attachOnChipIO(self.membus)
    #self.realview.attachIO(self.piobus)
    self.intrctrl = IntrControl()
    self.terminal = Terminal()
    self.vncserver = VncServer()

    # Attach I/O devices that are on chip
    self.realview.gic.pio = self.piobus.port
    self.realview.l2x0_fake.pio = self.piobus.port
    self.realview.a9scu.pio = self.piobus.port
    self.realview.local_cpu_timer.pio = self.piobus.port
    # Attach I/O devices to specified bus object.  Can't do this
    # earlier, since the bus object itself is typically defined at the
    # System level.
    self.realview.uart.pio          = self.piobus.port
    self.realview.realview_io.pio   = self.piobus.port
    self.realview.timer0.pio        = self.piobus.port
    self.realview.timer1.pio        = self.piobus.port
    self.realview.clcd.pio          = self.piobus.port
    self.realview.kmi0.pio          = self.piobus.port
    self.realview.kmi1.pio          = self.piobus.port
    self.realview.cf_ctrl.pio       = self.piobus.port
    self.realview.dmac_fake.pio     = self.piobus.port
    self.realview.uart1_fake.pio    = self.piobus.port
    self.realview.uart2_fake.pio    = self.piobus.port
    self.realview.uart3_fake.pio    = self.piobus.port
    self.realview.smc_fake.pio      = self.piobus.port
    self.realview.sp810_fake.pio    = self.piobus.port
    self.realview.watchdog_fake.pio = self.piobus.port
    self.realview.gpio0_fake.pio    = self.piobus.port
    self.realview.gpio1_fake.pio    = self.piobus.port
    self.realview.gpio2_fake.pio    = self.piobus.port
    self.realview.ssp_fake.pio      = self.piobus.port
    self.realview.sci_fake.pio      = self.piobus.port
    self.realview.aaci_fake.pio     = self.piobus.port
    self.realview.mmc_fake.pio      = self.piobus.port
    self.realview.rtc_fake.pio      = self.piobus.port
    self.realview.flash_fake.pio    = self.piobus.port
    return self

gem5 output:
Global frequency set at 1000000000000 ticks per second
info: kernel located at: 
/home/yanke/Desktop/sde/gem5/system/arm-system-2011-08/binaries/vmlinux.arm.smp.fb.2.6.38.8
info: Using bootloader at address 0x80000000
Listening for system connection on port 3456
Listening for system connection on port 5901
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
0: system.remote_gdb.listener: listening for remote gdb #1 on port 7001
0: system.remote_gdb.listener: listening for remote gdb #2 on port 7002
0: system.remote_gdb.listener: listening for remote gdb #3 on port 7003
**** REAL SIMULATION ****
info: Entering event queue @ 0.  Starting simulation...
warn: The clidr register always reports 0 caches.
warn: clidr LoUIS field of 0b001 to match current ARM implementations.
warn: The csselr register isn't implemented.
warn: The ccsidr register isn't implemented and always reads as 0.
warn:     instruction 'mcr bpiallis' unimplemented
warn:     instruction 'mcr icialluis' unimplemented
1890365500: system.terminal: attach terminal 0
warn:     instruction 'mcr dccimvac' unimplemented
warn:     instruction 'mcr dccmvau' unimplemented
warn:     instruction 'mcr icimvau' unimplemented
warn:     instruction 'mcr bpiallis' unimplemented
113723750000: system.cpu0.break_event: break event panic triggered
113723756000: system.cpu0.break_event: break event panic triggered
113723758000: system.cpu0.break_event: break event panic triggered
113723760000: system.cpu0.break_event: break event panic triggered
113723762000: system.cpu0.break_event: break event panic triggered
113723764000: system.cpu0.break_event: break event panic triggered


the term output:
[    0.000126] last sysfs file:
[    0.000126] Modules linked in:
[    0.000126] CPU: 0    Tainted: G        W    (2.6.38.8-gem5 #1)
[    0.000126] PC is at __bug+0x20/0x28
[    0.000126] LR is at __bug+0x1c/0x28
[    0.000126] pc : [<c0033310>]    lr : [<c003330c>]    psr: 60000013
[    0.000126] sp : cf835e98  ip : 00000000  fp : 00000001
[    0.000126] r10: 0052f000  r9 : cf834000  r8 : c0028760
[    0.000126] r7 : c0324214  r6 : c0557760  r5 : c0275208  r4 : 00000000
[    0.000127] r3 : 00000000  r2 : c0329858  r1 : 60000093  r0 : 00000035
[    0.000127] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment 
kernel
[    0.000127] Control: 10c53c7f  Table: 0000406a  DAC: 00000015
[    0.000127] Process swapper (pid: 1, stack limit = 0xcf8342f8)
[    0.000127] Stack: (0xcf835e98 to 0xcf836000)
[    0.000127] 5e80:                                                       
00000004 c00742b4
[    0.000127] 5ea0: c00b3148 cf8ccfe0 a0000013 c00b3148 cf8ccfe0 c0324214 
c03241a0 cf8ccfe0
[    0.000127] 5ec0: 0000000c 000000d0 00000018 c00742ec 00000004 c0074304 
00000004 cf804b00
[    0.000127] 5ee0: ffffffff c0324214 c03241a0 c00b4ccc 00003ba0 c032bc84 
c0275208 00000008
[    0.000127] 5f00: 00003b9c cf804b00 000000d0 cf804b00 00000020 00000600 
c02db9c0 000001c0
[    0.000127] 5f20: 00000040 c00b50e8 000000d0 cf804b00 00000020 00000018 
c02db9c0 c0343660
[    0.000127] 5f40: 00042000 c00b580c cf835f60 cf835f64 c032bc84 ffffffe0 
000000d0 00000179
[    0.000127] 5f60: 00000200 00000005 00000000 c0324470 00000000 c0324488 
0000000c c0013d9c
[    0.000127] 5f80: 00000000 00000000 00000000 c0013e14 00000000 c001f318 
c0336b80 c0336b80
[    0.000127] 5fa0: c001f318 cf834000 00000000 c0029680 00000037 00000000 
c032b144 00000080
[    0.000127] 5fc0: c001f104 c001f318 c0324218 00000004 c0324214 00000000 
00000000 c0008c2c
[    0.000127] 5fe0: 00000000 c0008a8c c0030640 00000013 00000000 c0030640 
00000000 00000000
[    0.000128] [<c0033310>] (__bug+0x20/0x28) from [<c00742b4>] 
(smp_call_function_many+0x27c/0x28c)
[    0.000128] [<c00742b4>] (smp_call_function_many+0x27c/0x28c) from 
[<c00742ec>] (smp_call_function+0x28/0x30)
[    0.000128] [<c00742ec>] (smp_call_function+0x28/0x30) from [<c0074304>] 
(on_each_cpu+0x10/0x30)
[    0.000128] [<c0074304>] (on_each_cpu+0x10/0x30) from [<c00b4ccc>] 
(do_tune_cpucache+0x140/0x380)
[    0.000128] [<c00b4ccc>] (do_tune_cpucache+0x140/0x380) from [<c00b50e8>] 
(enable_cpucache+0x48/0xc4)
[    0.000128] [<c00b50e8>] (enable_cpucache+0x48/0xc4) from [<c00b580c>] 
(kmem_cache_create+0x6a8/0x8f8)
[    0.000128] [<c00b580c>] (kmem_cache_create+0x6a8/0x8f8) from [<c0013e14>] 
(init_bio+0x78/0xfc)
[    0.000128] [<c0013e14>] (init_bio+0x78/0xfc) from [<c0029680>] 
(do_one_initcall+0x34/0x188)
[    0.000128] [<c0029680>] (do_one_initcall+0x34/0x188) from [<c0008c2c>] 
(kernel_init+0x1a0/0x230)
[    0.000128] [<c0008c2c>] (kernel_init+0x1a0/0x230) from [<c0030640>] 
(kernel_thread_exit+0x0/0x8)
[    0.000128] Code: e34c002d e1a0100c eb08f7ab e3a03000 (e5833000)
[    0.000128] ---[ end trace 1b75b31a2719ed1d ]---
[    0.000128] Kernel panic - not syncing: Attempted to kill init!
[    0.000128] [<c0035f88>] (unwind_backtrace+0x0/0xf8) from [<c0271098>] 
(panic+0x64/0x188)
[    0.000128] [<c0271098>] (panic+0x64/0x188) from [<c004c4f4>] 
(do_exit+0x628/0x6c4)
[    0.000128] [<c004c4f4>] (do_exit+0x628/0x6c4) from [<c003392c>] 
(die+0x1b4/0x1d0)
[    0.000129] [<c003392c>] (die+0x1b4/0x1d0) from [<c0037b48>] 
(__do_kernel_fault+0x74/0x84)
[    0.000129] [<c0037b48>] (__do_kernel_fault+0x74/0x84) from [<c0037c98>] 
(do_page_fault+0x140/0x1dc)
[    0.000129] [<c0037c98>] (do_page_fault+0x140/0x1dc) from [<c0029434>] 
(do_DataAbort+0x34/0x9c)
[    0.000129] [<c0029434>] (do_DataAbort+0x34/0x9c) from [<c002efac>] 
(__dabt_svc+0x4c/0x60)
[    0.000129] Exception stack(0xcf835e50 to 0xcf835e98)
[    0.000129] 5e40:                                     00000035 60000093 
c0329858 00000000
[    0.000129] 5e60: 00000000 c0275208 c0557760 c0324214 c0028760 cf834000 
0052f000 00000001
[    0.000129] 5e80: 00000000 cf835e98 c003330c c0033310 60000013 ffffffff
[    0.000129] [<c002efac>] (__dabt_svc+0x4c/0x60) from [<c0033310>] 
(__bug+0x20/0x28)
[    0.000129] [<c0033310>] (__bug+0x20/0x28) from [<c00742b4>] 
(smp_call_function_many+0x27c/0x28c)
[    0.000129] [<c00742b4>] (smp_call_function_many+0x27c/0x28c) from 
[<c00742ec>] (smp_call_function+0x28/0x30)
[    0.000129] [<c00742ec>] (smp_call_function+0x28/0x30) from [<c0074304>] 
(on_each_cpu+0x10/0x30)
[    0.000129] [<c0074304>] (on_each_cpu+0x10/0x30) from [<c00b4ccc>] 
(do_tune_cpucache+0x140/0x380)
[    0.000129] [<c00b4ccc>] (do_tune_cpucache+0x140/0x380) from [<c00b50e8>] 
(enable_cpucache+0x48/0xc4)
[    0.000129] [<c00b50e8>] (enable_cpucache+0x48/0xc4) from [<c00b580c>] 
(kmem_cache_create+0x6a8/0x8f8)
[    0.000130] [<c00b580c>] (kmem_cache_create+0x6a8/0x8f8) from [<c0013e14>] 
(init_bio+0x78/0xfc)
[    0.000130] [<c0013e14>] (init_bio+0x78/0xfc) from [<c0029680>] 
(do_one_initcall+0x34/0x188)
[    0.000130] [<c0029680>] (do_one_initcall+0x34/0x188) from [<c0008c2c>] 
(kernel_init+0x1a0/0x230)
[    0.000130] [<c0008c2c>] (kernel_init+0x1a0/0x230) from [<c0030640>] 
(kernel_thread_exit+0x0/0x8)
[    0.000130] CPU1: stopping
[    0.000130] [<c0035f88>] (unwind_backtrace+0x0/0xf8) from [<c00293e4>] 
(do_IPI+0x104/0x120)
[    0.000130] [<c00293e4>] (do_IPI+0x104/0x120) from [<c002eff8>] 
(__irq_svc+0x38/0xc0)
[    0.000130] Exception stack(0xcf857f98 to 0xcf857fe0)
[    0.000130] 7f80:                                                       
cf856000 cf856020
[    0.000130] 7fa0: cf857fe0 00000000 cf856000 c0336c24 c03273cc c0336d9c 
0000d328 350fc000
[    0.000130] 7fc0: 00000000 00000000 00000000 cf857fe0 c003069c c00306a0 
60000013 ffffffff
[    0.000130] [<c002eff8>] (__irq_svc+0x38/0xc0) from [<c00306a0>] 
(default_idle+0x24/0x28)
[    0.000130] [<c00306a0>] (default_idle+0x24/0x28) from [<c0030858>] 
(cpu_idle+0x60/0x8c)
[    0.000130] [<c0030858>] (cpu_idle+0x60/0x8c) from [<0001bf8c>] (0x1bf8c)

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to