Skip to content

Conversation

@cupertinomiranda
Copy link

Modules implemented:

  • Inter-core Interrupt Unit (ICI)
  • Interrupt Distribution Unit (IDU) (not fully tested)
  • Global Free-Running Counter (GFRC) (not tested)

Modules implemented:
  - Inter-core Interrupt Unit (ICI)
  - Interrupt Distribution Unit (IDU)  (not fully tested)
  - Global Free-Running Counter (GFRC) (not tested)
@abrodkin
Copy link
Member

abrodkin commented Jun 3, 2022

Cannot compile it on Ubuntu 20.04:

[2/1042] Compiling C object libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o
FAILED: libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o
cc -m64 -mcx16 -Ilibqemu-arc-softmmu.fa.p -I. -I.. -Itarget/arc -I../target/arc -I../capstone/include/capstone -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -g -isystem .../qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/abrodkin/Projects/sources/git/qemu -iquote /home/abrodkin/Projects/sources/git/qemu/include -iquote /home/abrodkin/Projects/sources/git/qemu/disas/libvixl -iquote /home/abrodkin/Projects/sources/git/qemu/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="arc-softmmu-config-target.h"' '-DCONFIG_DEVICES="arc-softmmu-config-devices.h"' -MD -MQ libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o -MF libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o.d -o libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o -c ../target/arc/arconnect.c
../target/arc/arconnect.c: In function ‘arc_cirq_raise’:
../target/arc/arconnect.c:171:2: error: a label can only be part of a statement and a declaration is not a statement
  171 |  uint8_t counter = env->arconnect.idu_data[cirq].counter;
      |  ^~~~~~~
../target/arc/arconnect.c:194:2: error: a label can only be part of a statement and a declaration is not a statement
  194 |  int dest = env->arconnect.idu_data[cirq].dest;
      |  ^~~
ninja: build stopped: subcommand failed.

For the record:

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

Copy link
Member

@abrodkin abrodkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, quad-core Linux on HS3x/4x does boot and runs hackbench, which is pretty cool itself!

$ ./build/qemu-system-arc -M virt -serial mon:stdio -display none -kernel vmlinux -cpu archs -smp 4

Linux version 5.17.13 (abrodkin@abrodkin-5550) (arc-buildroot-linux-gnu-gcc.br_real (Buildroot 2022.05-rc2-58-g5821e96bd3) 11.3.0, GNU ld (GNU Binutils) 2.38) #2 SMP PREEMPT Mon Jun 6 15:30:47 +04 2022
Memory @ 80000000 [512M]
OF: fdt: Machine model: snps,zebu_hs-smp
earlycon: uart8250 at MMIO32 0xf0000000 (options '115200n8')
printk: bootconsole [uart8250] enabled
Failed to get possible-cpus from dtb, pretending all 4 cpus exist
archs-intc      : 16 priority levels (default 1) FIRQ (not used)

IDENTITY        : ARCVER [0x54] ARCNUM [0x0] CHIPID [0xffff]
processor [0]   : HS38 R3.10a (ARCv2 ISA)
Timers          : Timer0 Timer1
ISA Extn        : mpy[opt 7]
MMU [v4]        : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
Peripherals     : 0xc0000000
Vector Table    : 0x80000000
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
Zone ranges:
  Normal   [mem 0x0000000080000000-0x000000009fffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000080000000-0x000000009fffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
percpu: Embedded 6 pages/cpu s14848 r8192 d26112 u49152
pcpu-alloc: s14848 r8192 d26112 u49152 alloc=6*8192
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists, mobility grouping on.  Total pages: 65248
Kernel command line: earlycon=uart8250,mmio32,0xf0000000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1
Dentry cache hash table entries: 65536 (order: 5, 262144 bytes, linear)
Inode-cache hash table entries: 32768 (order: 4, 131072 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 513600K/524288K available (3636K kernel code, 595K rwdata, 776K rodata, 1560K init, 241K bss, 10688K reserved, 0K cma-reserved)
rcu: Preemptible hierarchical RCU implementation.
rcu:    RCU event tracing is enabled.
        Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 512
MCIP: IDU supports 4 common irqs
Global-64-bit-Ctr clocksource not detected
Failed to initialize '/gfrc': -6
Console: colour dummy device 80x25
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Calibrating delay loop... 190.87 BogoMIPS (lpj=954368)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 0, 8192 bytes, linear)
Mountpoint-cache hash table entries: 2048 (order: 0, 8192 bytes, linear)
cblist_init_generic: Setting adjustable number of callback queues.
cblist_init_generic: Setting shift to 2 and lim to 1.
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Idle Task [1] (ptrval)
Trying to bring up CPU1 ...
archs-intc      : 16 priority levels (default 1) FIRQ (not used)

IDENTITY        : ARCVER [0x54] ARCNUM [0x1] CHIPID [0xffff]
processor [1]   : HS38 R3.10a (ARCv2 ISA)
Timers          : Timer0 Timer1
ISA Extn        : mpy[opt 7]
MMU [v4]        : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
Peripherals     : 0xc0000000
Vector Table    : 0x80000000
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
## CPU1 LIVE ##: Executing Code...
Idle Task [2] (ptrval)
Trying to bring up CPU2 ...
archs-intc      : 16 priority levels (default 1) FIRQ (not used)

IDENTITY        : ARCVER [0x54] ARCNUM [0x2] CHIPID [0xffff]
processor [2]   : HS38 R3.10a (ARCv2 ISA)
Timers          : Timer0 Timer1
ISA Extn        : mpy[opt 7]
MMU [v4]        : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
Peripherals     : 0xc0000000
Vector Table    : 0x80000000
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
## CPU2 LIVE ##: Executing Code...
Idle Task [3] (ptrval)
Trying to bring up CPU3 ...
archs-intc      : 16 priority levels (default 1) FIRQ (not used)

IDENTITY        : ARCVER [0x54] ARCNUM [0x3] CHIPID [0xffff]
processor [3]   : HS38 R3.10a (ARCv2 ISA)
Timers          : Timer0 Timer1
ISA Extn        : mpy[opt 7]
MMU [v4]        : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
Peripherals     : 0xc0000000
Vector Table    : 0x80000000
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
## CPU3 LIVE ##: Executing Code...
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 1024 (order: 4, 131072 bytes, linear)
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
NET: Registered PF_INET protocol family
IP idents hash table entries: 8192 (order: 3, 65536 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 12288 bytes, linear)
TCP established hash table entries: 4096 (order: 1, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 2, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 0, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 0, 8192 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
arc-pct fpga:pct: use noncoherent DMA ops
This core does not have performance counters!
workingset: timestamp_bits=30 max_order=16 bucket_order=0
io scheduler mq-deadline registered
io scheduler kyber registered
simple-pm-bus fpga: use noncoherent DMA ops
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
of_serial f0000000.serial: use noncoherent DMA ops
printk: console [ttyS0] disabled
f0000000.serial: ttyS0 at MMIO 0xf0000000 (irq = 1, base_baud = 3125000) is a 16550A
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [uart8250] disabled
printk: bootconsole [uart8250] disabled
NET: Registered PF_PACKET protocol family
NET: Registered PF_KEY protocol family
Freeing unused kernel image (initmem) memory: 1560K
This architecture does not have kernel memory protection.
Run /init as init process
  with arguments:
    /init
  with environment:
    HOME=/
    TERM=linux
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: random: dd: uninitialized urandom read (32 bytes read)
OK
Starting network: OK

Welcome to Buildroot
buildroot login: random: crng init done
buildroot login: root

# hackbench
Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks)
Each sender will pass 100 messages of 100 bytes
Time: 5.000

@abrodkin
Copy link
Member

abrodkin commented Jun 7, 2022

Still, would be good to see:

  1. HS5x & HS6x booting and running at least hackbench. Preferably many times in a row. I guess @cupertinomiranda may do that and post his execution logs as the proofs.
  2. Zephyr running on SMP HS3x/5x & 6x. That's for @evgeniy-paltsev to do preferably soonish.

@cupertinomiranda
Copy link
Author

cupertinomiranda commented Jun 7, 2022

This was only tested for arcv2.
Is ARConnect just the same on v3 ? Have no documentation on the subject.

ARConnect might not even be enabled on v3. Just doesn't properly complain about using -smp option

@abrodkin
Copy link
Member

abrodkin commented Jun 8, 2022

@cupertinomiranda AFAIK it should be exactly the same for ARCv3.
But apparently SMP for HS5x fails to boot that way:

./build/qemu-system-arc -M virt -serial mon:stdio -display none -kernel vmlinux -cpu hs5x -global cpu.freq_hz=50000000 -smp 4
Linux version 5.16.0 (abrodkin@abrodkin-5550) (arc32-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-rc1-28-g0fa5fc6238) 11.1.1 20210622, GNU ld (GNU Binutils) 2.38.50.20220215) #2 SMP PREEMPT Wed Jun 8 22:07:29 +04 2022
Memory @ 80000000 [1024M]
OF: fdt: Machine model: snps,zebu_hs-smp
earlycon: uart8250 at MMIO32 0xf0000000 (options '115200n8')
printk: bootconsole [uart8250] enabled
Failed to get possible-cpus from dtb, pretending all 12 cpus exist

IDENTITY        : ARCVER [0x0] ARCNUM [0x0] CHIPID [0xffff]
processor [0]   : HS58 (ARC32 ARCv3 ISA)  Dual-Issue
ISA Extn        : atomic ll128 (not used) unalign mpy[opt 7] div64
MMU [v10]       : MMU32 hwalk 3 levels, 4k PAGE, JTLB 256 uD/I 8/4
                 tlb_flush_mm Incr ASID
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
HW PF           : RD 2 WR 2 OUTS 8 AG 0 (disabled)
Timers          : Timer0 Timer1
Vector Table    : 0x80000000 [64-bit]
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
archs-intc      : 16 priority levels (default 1) FIRQ (not used) hw autosave
Zone ranges:
  Normal   [mem 0x0000000080000000-0x00000000bfffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000080000000-0x00000000bfffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
percpu: Embedded 11 pages/cpu s14848 r8192 d22016 u45056
pcpu-alloc: s14848 r8192 d22016 u45056 alloc=11*4096
pcpu-alloc: [0] 00 [0] 01 [0] 02 [0] 03 [0] 04 [0] 05 [0] 06 [0] 07
pcpu-alloc: [0] 08 [0] 09 [0] 10 [0] 11
Built 1 zonelists, mobility grouping on.  Total pages: 259840
Kernel command line: earlycon=uart8250,mmio32,0xf0000000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 1027408K/1048576K available (4072K kernel code, 602K rwdata, 744K rodata, 3948K init, 225K bss, 21168K reserved, 0K cma-reserved)
rcu: Preemptible hierarchical RCU implementation.
rcu:    RCU event tracing is enabled.
        Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 512
MCIP: IDU supports 4 common irqs
**
ERROR:../target/arc/op_helper.c:238:helper_sr: assertion failed: (aux_reg_detail != NULL)
Bail out! ERROR:../target/arc/op_helper.c:238:helper_sr: assertion failed: (aux_reg_detail != NULL)
Aborted

And that's what I have in the log:

----------------
IN: idu_of_init
0x803b8d2c:  add2»      r15,r15,0x3
0x803b8d30:  mov_s»     r0,r15
0x803b8d32:  mov_s»     r5,0
0x803b8d34:  mov_s»     r4,0x807d7308
0x803b8d3a:  mov_s»     r3,0
0x803b8d3c:  mov_s»     r2,r14
0x803b8d3e:  mov_s»     r1,r14
0x803b8d40:  mov_s»     r15,0
0x803b8d42:  mov_s»     r17,0x8092c140
0x803b8d48:  mov_s»     r18,0x803e0e74
0x803b8d4e:  bl.d»      548028» ;0x8043ea08
0x803b8d52:  mov_s»     r19,1

----------------
IN: __kmalloc
0x804d7dd0:  add_s»     r1,r0,0x3
0x804d7dd2:  sub»       r0,r0,0x1
0x804d7dd6:  st.as»     1,[r2,3]
0x804d7dda:  st_s»      r0,[r2,0]
0x804d7ddc:  ld.as»     r16,[r2,r1]
0x804d7de0:  seti»      r17

----------------
IN: idu_of_init
0x803b8d54:  mov_s»     r16,r0
0x803b8d56:  bl.d»      4306456»;0x807d436c
0x803b8d5a:  mov_s»     r0,r17

----------------
IN: idu_of_init
0x803b8d5c:  mov_s»     r1,r0
0x803b8d5e:  sr»r19,[1537]

@abrodkin
Copy link
Member

abrodkin commented Jun 8, 2022

OK, with that trivial fix:

diff --git a/target/arc/regs-detail.def b/target/arc/regs-detail.def
index d0ab800f30..3ce3bf1a67 100644
--- a/target/arc/regs-detail.def
+++ b/target/arc/regs-detail.def
@@ -406,9 +406,9 @@ DEF(0x545, ARC_OPCODE_ARC700,  NONE, aux_cabac_misc2)

 /* ARConnect */
 DEF (0xd0, ARC_OPCODE_ARCALL,  NONE, mcip_bcr)
-DEF(0x600, ARC_OPCODE_ARCV2,   NONE, mcip_cmd)
-DEF(0x601, ARC_OPCODE_ARCV2,   NONE, mcip_wdata)
-DEF(0x602, ARC_OPCODE_ARCV2,   NONE, mcip_readback)
+DEF(0x600, ARC_OPCODE_ARCALL,   NONE, mcip_cmd)
+DEF(0x601, ARC_OPCODE_ARCALL,   NONE, mcip_wdata)
+DEF(0x602, ARC_OPCODE_ARCALL,   NONE, mcip_readback)

 DEF(0x700, ARC_OPCODE_ARCALL,  NONE, smart_control)
 /*

I have much more success, see:

./build/qemu-system-arc -M virt -serial mon:stdio -display none -kernel vmlinux -cpu hs5x -global cpu.freq_hz=50000000 -smp 4
Linux version 5.16.0 (abrodkin@abrodkin-5550) (arc32-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-rc1-28-g0fa5fc6238) 11.1.1 20210622, GNU ld (GNU Binutils) 2.38.50.20220215) #2 SMP PREEMPT Wed Jun 8 22:07:29 +04 2022
Memory @ 80000000 [1024M]
OF: fdt: Machine model: snps,zebu_hs-smp
earlycon: uart8250 at MMIO32 0xf0000000 (options '115200n8')
printk: bootconsole [uart8250] enabled
Failed to get possible-cpus from dtb, pretending all 12 cpus exist

IDENTITY        : ARCVER [0x0] ARCNUM [0x0] CHIPID [0xffff]
processor [0]   : HS58 (ARC32 ARCv3 ISA)  Dual-Issue
ISA Extn        : atomic ll128 (not used) unalign mpy[opt 7] div64
MMU [v10]       : MMU32 hwalk 3 levels, 4k PAGE, JTLB 256 uD/I 8/4
                 tlb_flush_mm Incr ASID
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
HW PF           : RD 2 WR 2 OUTS 8 AG 0 (disabled)
Timers          : Timer0 Timer1
Vector Table    : 0x80000000 [64-bit]
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
archs-intc      : 16 priority levels (default 1) FIRQ (not used) hw autosave
Zone ranges:
  Normal   [mem 0x0000000080000000-0x00000000bfffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000080000000-0x00000000bfffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
percpu: Embedded 11 pages/cpu s14848 r8192 d22016 u45056
pcpu-alloc: s14848 r8192 d22016 u45056 alloc=11*4096
pcpu-alloc: [0] 00 [0] 01 [0] 02 [0] 03 [0] 04 [0] 05 [0] 06 [0] 07
pcpu-alloc: [0] 08 [0] 09 [0] 10 [0] 11
Built 1 zonelists, mobility grouping on.  Total pages: 259840
Kernel command line: earlycon=uart8250,mmio32,0xf0000000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 1027408K/1048576K available (4072K kernel code, 602K rwdata, 744K rodata, 3948K init, 225K bss, 21168K reserved, 0K cma-reserved)
rcu: Preemptible hierarchical RCU implementation.
rcu:    RCU event tracing is enabled.
        Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 512
MCIP: IDU supports 4 common irqs
Global-64-bit-Ctr clocksource not detected
Failed to initialize '/gfrc': -6
Console: colour dummy device 80x25
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Calibrating delay loop... 5.60 BogoMIPS (lpj=28032)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Idle Task [1] (ptrval)
Trying to bring up CPU1 ...

IDENTITY        : ARCVER [0x0] ARCNUM [0x1] CHIPID [0xffff]
processor [1]   : HS58 (ARC32 ARCv3 ISA)  Dual-Issue
ISA Extn        : atomic ll128 (not used) unalign mpy[opt 7] div64
MMU [v10]       : MMU32 hwalk 3 levels, 4k PAGE, JTLB 256 uD/I 8/4
                 tlb_flush_mm Incr ASID
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
HW PF           : RD 2 WR 2 OUTS 8 AG 0 (disabled)
Timers          : Timer0 Timer1
Vector Table    : 0x80000000 [64-bit]
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
archs-intc      : 16 priority levels (default 1) FIRQ (not used) hw autosave
## CPU1 LIVE ##: Executing Code...
Idle Task [2] (ptrval)
Trying to bring up CPU2 ...

IDENTITY        : ARCVER [0x0] ARCNUM [0x2] CHIPID [0xffff]
processor [2]   : HS58 (ARC32 ARCv3 ISA)  Dual-Issue
ISA Extn        : atomic ll128 (not used) unalign mpy[opt 7] div64
MMU [v10]       : MMU32 hwalk 3 levels, 4k PAGE, JTLB 256 uD/I 8/4
                 tlb_flush_mm Incr ASID
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
HW PF           : RD 2 WR 2 OUTS 8 AG 0 (disabled)
Timers          : Timer0 Timer1
Vector Table    : 0x80000000 [64-bit]
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
archs-intc      : 16 priority levels (default 1) FIRQ (not used) hw autosave
## CPU2 LIVE ##: Executing Code...
Idle Task [3] (ptrval)
Trying to bring up CPU3 ...

IDENTITY        : ARCVER [0x0] ARCNUM [0x3] CHIPID [0xffff]
processor [3]   : HS58 (ARC32 ARCv3 ISA)  Dual-Issue
ISA Extn        : atomic ll128 (not used) unalign mpy[opt 7] div64
MMU [v10]       : MMU32 hwalk 3 levels, 4k PAGE, JTLB 256 uD/I 8/4
                 tlb_flush_mm Incr ASID
I-Cache         : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache         : 64K, 2way/set, 64B Line, PIPT
HW PF           : RD 2 WR 2 OUTS 8 AG 0 (disabled)
Timers          : Timer0 Timer1
Vector Table    : 0x80000000 [64-bit]
Extn [SMP]      : ARConnect (v0): 4 cores with IDU
archs-intc      : 16 priority levels (default 1) FIRQ (not used) hw autosave
## CPU3 LIVE ##: Executing Code...
Idle Task [4] (ptrval)
Trying to bring up CPU4 ...
random: fast init done
Timeout: CPU4 FAILED to come up !!!
Idle Task [5] (ptrval)
Trying to bring up CPU5 ...
Timeout: CPU5 FAILED to come up !!!
Idle Task [6] (ptrval)
Trying to bring up CPU6 ...
Timeout: CPU6 FAILED to come up !!!
Idle Task [7] (ptrval)
Trying to bring up CPU7 ...
Timeout: CPU7 FAILED to come up !!!
Idle Task [8] (ptrval)
Trying to bring up CPU8 ...
Timeout: CPU8 FAILED to come up !!!
Idle Task [9] (ptrval)
Trying to bring up CPU9 ...
Timeout: CPU9 FAILED to come up !!!
Idle Task [10] (ptrval)
Trying to bring up CPU10 ...
Timeout: CPU10 FAILED to come up !!!
Idle Task [11] (ptrval)
Trying to bring up CPU11 ...
Timeout: CPU11 FAILED to come up !!!
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
random: get_random_u32 called from rhashtable_init+0xe2/0x28c with crng_init=1
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 4096 (order: 7, 524288 bytes, linear)
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
NET: Registered PF_INET protocol family
IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
unpack rootfs image as initramfs...
arc-pct fpga:pct: use noncoherent DMA ops
This core does not have performance counters!
workingset: timestamp_bits=30 max_order=18 bucket_order=0
io scheduler mq-deadline registered
io scheduler kyber registered
simple-pm-bus fpga: use noncoherent DMA ops
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
of_serial f0000000.serial: use noncoherent DMA ops
printk: console [ttyS0] disabled
f0000000.serial: ttyS0 at MMIO 0xf0000000 (irq = 1, base_baud = 3125000) is a 16550A
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [uart8250] disabled
printk: bootconsole [uart8250] disabled
NET: Registered PF_PACKET protocol family
NET: Registered PF_KEY protocol family
unpack initramfs done !
Freeing unused kernel image (initmem) memory: 3948K
This architecture does not have kernel memory protection.
Run /init as init process
  with arguments:
    /init
  with environment:
    HOME=/
    TERM=linux
/bin/sh:680: can't map '/usr/lib//libtirpc.so.3'
/bin/sh:680: can't map '/usr/lib/libtirpc.so.3'
/bin/sh: can't load library 'libtirpc.so.3'
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00001000

So basically, it works exactly as on a UP HS5x - as it fails on user-space stuff. Great work, anyways!

@abrodkin
Copy link
Member

@cupertinomiranda FWIW rebased on top of today's master with my enhancement for ARCv3 - https://github.com/foss-for-synopsys-dwc-arc-processors/qemu/tree/abrodkin-smp.

@kolerov kolerov self-assigned this Jul 15, 2023
@kolerov kolerov added the enhancement New feature or request label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants