# ARC

---

# ARC architecture

_Peios Kernel / Hardware and drivers / Processor architectures / ARC_

> Reference for ARC architecture.

<a id="rst-arc-architecture"></a>

- [Linux kernel for ARC processors](</kernel/hardware/arch/arc/arc.md>)
- [features](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/arch/arc/features.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)

---

# Linux kernel for ARC processors

_Peios Kernel / Hardware and drivers / Processor architectures / ARC_

> Below are some resources where more information can be found on ARC processors and relevant open source projects.

<a id="rst-linux-kernel-for-arc-processors"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

<a id="rst-other-sources-of-information"></a>

## Other sources of information

Below are some resources where more information can be found on ARC processors and relevant open source projects.

- [https://embarc.org](<https://embarc.org>)<a id="rst-https-embarc-org"></a> - Community portal for open source on ARC. Good place to start to find relevant FOSS projects, toolchain releases, news items and more.

- [https://github.com/foss-for-synopsys-dwc-arc-processors](<https://github.com/foss-for-synopsys-dwc-arc-processors>)<a id="rst-https-github-com-foss-for-synopsys-dwc-arc-processors"></a> - Home for all development activities regarding open source projects for ARC processors. Some of the projects are forks of various upstream projects, where "work in progress" is hosted prior to submission to upstream projects. Other projects are developed by Synopsys and made available to community as open source for use on ARC Processors.

- [Official Synopsys ARC Processors website](<https://www.synopsys.com/designware-ip/processor-solutions.html>)<a id="rst-official-synopsys-arc-processors-website"></a> - location, with access to some IP documentation ([Programmer's Reference Manual, AKA PRM for ARC HS processors](<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>)<a id="rst-programmer-s-reference-manual-aka-prm-for-arc-hs-processors"></a>) and free versions of some commercial tools ([Free nSIM](<https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>)<a id="rst-free-nsim"></a> and [MetaWare Light Edition](<https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>)<a id="rst-metaware-light-edition"></a>). Please note though, registration is required to access both the documentation and the tools.

<a id="rst-important-note-on-arc-processors-configurability"></a>

## Important note on ARC processors configurability

ARC processors are highly configurable and several configurable options are supported in Linux. Some options are transparent to software (i.e cache geometries, some can be detected at runtime and configured and used accordingly, while some need to be explicitly selected or configured in the kernel's configuration utility (AKA "make menuconfig").

However not all configurable options are supported when an ARC processor is to run Linux. SoC design teams should refer to "Appendix E: Configuration for ARC Linux" in the ARC HS Databook for configurability guidelines.

Following these guidelines and selecting valid configuration options up front is critical to help prevent any unwanted issues during SoC bringup and software development in general.

<a id="rst-building-the-linux-kernel-for-arc-processors"></a>

## Building the Linux kernel for ARC processors

The process of kernel building for ARC processors is the same as for any other architecture and could be done in 2 ways:

- Cross-compilation: process of compiling for ARC targets on a development host with a different processor architecture (generally x86_64/amd64).

- Native compilation: process of compiling for ARC on a ARC platform (hardware board or a simulator like QEMU) with complete development environment (GNU toolchain, dtc, make etc) installed on the platform.

In both cases, up-to-date GNU toolchain for ARC for the host is needed. Synopsys offers prebuilt toolchain releases which can be used for this purpose, available from:

- Synopsys GNU toolchain releases: [https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases](<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>)<a id="rst-https-github-com-foss-for-synopsys-dwc-arc-processors-toolchain-releases"></a>

- Linux kernel compilers collection: [https://mirrors.edge.kernel.org/pub/tools/crosstool](<https://mirrors.edge.kernel.org/pub/tools/crosstool>)<a id="rst-https-mirrors-edge-kernel-org-pub-tools-crosstool"></a>

- Bootlin's toolchain collection: [https://toolchains.bootlin.com](<https://toolchains.bootlin.com>)<a id="rst-https-toolchains-bootlin-com"></a>

Once the toolchain is installed in the system, make sure its "bin" folder is added in your `PATH` environment variable. Then set `ARCH=arc` &amp; `CROSS_COMPILE=arc-linux` (or whatever matches installed ARC toolchain prefix) and then as usual `make defconfig && make`.

This will produce "vmlinux" file in the root of the kernel source tree usable for loading on the target system via JTAG. If you need to get an image usable with U-Boot bootloader, type `make uImage` and `uImage` will be produced in `arch/arc/boot` folder.

---

# Feature status on arc architecture

_Peios Kernel / Hardware and drivers / Processor architectures / ARC_

> Reference for Feature status on arc architecture.

<!-- SPDX-License-Identifier: GPL-2.0 -->


| Subsystem | Feature | Kconfig | Status | Description |
|---|---|---|---|---|
| core | [cBPF-JIT](/kernel/administration/admin-guide/overview/features.md#feat-core-cBPF-JIT) | `HAVE_CBPF_JIT` | TODO | arch supports cBPF JIT optimizations |
| core | [eBPF-JIT](/kernel/administration/admin-guide/overview/features.md#feat-core-eBPF-JIT) | `HAVE_EBPF_JIT` | ok | arch supports eBPF JIT optimizations |
| core | [generic-idle-thread](/kernel/administration/admin-guide/overview/features.md#feat-core-generic-idle-thread) | `GENERIC_SMP_IDLE_THREAD` | ok | arch makes use of the generic SMP idle thread facility |
| core | [jump-labels](/kernel/administration/admin-guide/overview/features.md#feat-core-jump-labels) | `HAVE_ARCH_JUMP_LABEL` | ok | arch supports live patched, high efficiency branches |
| core | [mseal-system-mappings](/kernel/administration/admin-guide/overview/features.md#feat-core-mseal-system-mappings) | `ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS` | N/A | arch supports mseal system mappings |
| core | [thread-info-in-task](/kernel/administration/admin-guide/overview/features.md#feat-core-thread-info-in-task) | `THREAD_INFO_IN_TASK` | TODO | arch makes use of the core kernel facility to embed thread\_info in task\_struct |
| core | [tracehook](/kernel/administration/admin-guide/overview/features.md#feat-core-tracehook) | `HAVE_ARCH_TRACEHOOK` | ok | arch supports tracehook (ptrace) register handling APIs |
| debug | [debug-vm-pgtable](/kernel/administration/admin-guide/overview/features.md#feat-debug-debug-vm-pgtable) | `ARCH_HAS_DEBUG_VM_PGTABLE` | ok | arch supports pgtable tests for semantics compliance |
| debug | [gcov-profile-all](/kernel/administration/admin-guide/overview/features.md#feat-debug-gcov-profile-all) | `ARCH_HAS_GCOV_PROFILE_ALL` | TODO | arch supports whole-kernel GCOV code coverage profiling |
| debug | [KASAN](/kernel/administration/admin-guide/overview/features.md#feat-debug-KASAN) | `HAVE_ARCH_KASAN` | TODO | arch supports the KASAN runtime memory checker |
| debug | [kcov](/kernel/administration/admin-guide/overview/features.md#feat-debug-kcov) | `ARCH_HAS_KCOV` | TODO | arch supports kcov for coverage-guided fuzzing |
| debug | [kgdb](/kernel/administration/admin-guide/overview/features.md#feat-debug-kgdb) | `HAVE_ARCH_KGDB` | ok | arch supports the kGDB kernel debugger |
| debug | [kmemleak](/kernel/administration/admin-guide/overview/features.md#feat-debug-kmemleak) | `HAVE_DEBUG_KMEMLEAK` | ok | arch supports the kernel memory leak detector |
| debug | [kprobes](/kernel/administration/admin-guide/overview/features.md#feat-debug-kprobes) | `HAVE_KPROBES` | ok | arch supports live patched kernel probe |
| debug | [kprobes-on-ftrace](/kernel/administration/admin-guide/overview/features.md#feat-debug-kprobes-on-ftrace) | `HAVE_KPROBES_ON_FTRACE` | TODO | arch supports combined kprobes and ftrace live patching |
| debug | [kretprobes](/kernel/administration/admin-guide/overview/features.md#feat-debug-kretprobes) | `HAVE_KRETPROBES` | ok | arch supports kernel function-return probes |
| debug | [optprobes](/kernel/administration/admin-guide/overview/features.md#feat-debug-optprobes) | `HAVE_OPTPROBES` | TODO | arch supports live patched optprobes |
| debug | [stackprotector](/kernel/administration/admin-guide/overview/features.md#feat-debug-stackprotector) | `HAVE_STACKPROTECTOR` | TODO | arch supports compiler driven stack overflow protection |
| debug | [uprobes](/kernel/administration/admin-guide/overview/features.md#feat-debug-uprobes) | `ARCH_SUPPORTS_UPROBES` | TODO | arch supports live patched user probes |
| debug | [user-ret-profiler](/kernel/administration/admin-guide/overview/features.md#feat-debug-user-ret-profiler) | `HAVE_USER_RETURN_NOTIFIER` | TODO | arch supports user-space return from system call profiler |
| io | [dma-contiguous](/kernel/administration/admin-guide/overview/features.md#feat-io-dma-contiguous) | `HAVE_DMA_CONTIGUOUS` | TODO | arch supports the DMA CMA (continuous memory allocator) |
| locking | [cmpxchg-local](/kernel/administration/admin-guide/overview/features.md#feat-locking-cmpxchg-local) | `HAVE_CMPXCHG_LOCAL` | TODO | arch supports the this\_cpu\_cmpxchg() API |
| locking | [lockdep](/kernel/administration/admin-guide/overview/features.md#feat-locking-lockdep) | `LOCKDEP_SUPPORT` | ok | arch supports the runtime locking correctness debug facility |
| locking | [queued-rwlocks](/kernel/administration/admin-guide/overview/features.md#feat-locking-queued-rwlocks) | `ARCH_USE_QUEUED_RWLOCKS` | TODO | arch supports queued rwlocks |
| locking | [queued-spinlocks](/kernel/administration/admin-guide/overview/features.md#feat-locking-queued-spinlocks) | `ARCH_USE_QUEUED_SPINLOCKS` | TODO | arch supports queued spinlocks |
| perf | [kprobes-event](/kernel/administration/admin-guide/overview/features.md#feat-perf-kprobes-event) | `HAVE_REGS_AND_STACK_ACCESS_API` | ok | arch supports kprobes with perf events |
| perf | [perf-regs](/kernel/administration/admin-guide/overview/features.md#feat-perf-perf-regs) | `HAVE_PERF_REGS` | TODO | arch supports perf events register access |
| perf | [perf-stackdump](/kernel/administration/admin-guide/overview/features.md#feat-perf-perf-stackdump) | `HAVE_PERF_USER_STACK_DUMP` | TODO | arch supports perf events stack dumps |
| sched | [membarrier-sync-core](/kernel/administration/admin-guide/overview/features.md#feat-sched-membarrier-sync-core) | `ARCH_HAS_MEMBARRIER_SYNC_CORE` | TODO | arch supports core serializing membarrier |
| sched | [numa-balancing](/kernel/administration/admin-guide/overview/features.md#feat-sched-numa-balancing) | `ARCH_SUPPORTS_NUMA_BALANCING` | Not compatible | arch supports NUMA balancing |
| seccomp | [seccomp-filter](/kernel/administration/admin-guide/overview/features.md#feat-seccomp-seccomp-filter) | `HAVE_ARCH_SECCOMP_FILTER` | TODO | arch supports seccomp filters |
| time | [arch-tick-broadcast](/kernel/administration/admin-guide/overview/features.md#feat-time-arch-tick-broadcast) | `ARCH_HAS_TICK_BROADCAST` | TODO | arch provides tick\_broadcast() |
| time | [clockevents](/kernel/administration/admin-guide/overview/features.md#feat-time-clockevents) | `!LEGACY_TIMER_TICK` | ok | arch support generic clock events |
| time | [irq-time-acct](/kernel/administration/admin-guide/overview/features.md#feat-time-irq-time-acct) | `HAVE_IRQ_TIME_ACCOUNTING` | TODO | arch supports precise IRQ time accounting |
| time | [user-context-tracking](/kernel/administration/admin-guide/overview/features.md#feat-time-user-context-tracking) | `HAVE_CONTEXT_TRACKING_USER` | TODO | arch supports user context tracking for NO\_HZ\_FULL |
| time | [virt-cpuacct](/kernel/administration/admin-guide/overview/features.md#feat-time-virt-cpuacct) | `HAVE_VIRT_CPU_ACCOUNTING` | TODO | arch supports precise virtual CPU time accounting |
| vm | [batch-unmap-tlb-flush](/kernel/administration/admin-guide/overview/features.md#feat-vm-batch-unmap-tlb-flush) | `ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH` | TODO | arch supports deferral of TLB flush until multiple pages are unmapped |
| vm | [ELF-ASLR](/kernel/administration/admin-guide/overview/features.md#feat-vm-ELF-ASLR) | `ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT` | TODO | arch randomizes the stack, heap and binary images of ELF binaries |
| vm | [huge-vmap](/kernel/administration/admin-guide/overview/features.md#feat-vm-huge-vmap) | `HAVE_ARCH_HUGE_VMAP` | TODO | arch supports the arch\_vmap\_pud\_supported() and arch\_vmap\_pmd\_supported() VM APIs |
| vm | [ioremap\_prot](/kernel/administration/admin-guide/overview/features.md#feat-vm-ioremap_prot) | `HAVE_IOREMAP_PROT` | ok | arch has ioremap\_prot() |
| vm | [pte\_special](/kernel/administration/admin-guide/overview/features.md#feat-vm-pte_special) | `ARCH_HAS_PTE_SPECIAL` | ok | arch supports the pte\_special()/pte\_mkspecial() VM APIs |
| vm | [THP](/kernel/administration/admin-guide/overview/features.md#feat-vm-THP) | `HAVE_ARCH_TRANSPARENT_HUGEPAGE` | ok | arch supports transparent hugepages |
