Skip to contentSkip to conversation

docs: Add documentation for ARC processors

PATCH In review Alexey Brodkin 3 participants 5 messages Nov 12, 2021 – Dec 1, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 docs: Add documentation for ARC processors

ARC processors are supported in upstream kernel since v3.9 and so far there was no documentation about them except some Device Tree bindings.

Fixing it with the simples set of docs now:
1. Overview with pointers to other informational resources
2. Autogenerated feature table

Note though it's just the very beginning, there will be more for sure given time as there're many things worth documenting and in fact even contents itself is avaialble but just spread in some other places. Now we'll try to keep all here and then maintain it looking forward to match the state of development.

Cc Randy Dunlap <[email protected]>
Cc Vineet Gupta <[email protected]>

---

Changes v1 -> v2:
* Spello "linux" -> "Linux" (Randy Dunlap)

 Documentation/arc/arc.rst      | 81 ++++++++++++++++++++++++++++++++++
 Documentation/arc/features.rst |  3 ++
 Documentation/arc/index.rst    | 17 +++++++
 Documentation/arch.rst         |  1 +
 MAINTAINERS                    |  1 +
 5 files changed, 103 insertions(+)
 create mode 100644 Documentation/arc/arc.rst
 create mode 100644 Documentation/arc/features.rst
 create mode 100644 Documentation/arc/index.rst
Documentation/arc/arc.rst new file +81 -0
new file mode 100644
index 000000000000..249d03c6be8e
@@ -0,0 +1,81 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Linux kernel for ARC processors
+*******************************
+
+Other sources of information
+############################
+
+Below are some resources where more information can be found on
+ARC processors and relevant open source projects.
+
+1. `<https://embarc.org/>`_ - Community portal for open source on ARC.
+Good place to start to find relevant FOSS projects, toolchain releases,
+news items and more.
+
+2. `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ -
+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.
+
+3. `<https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -
+Official Synopsys ARC Processors website location, with access to some IP
+documentation (Programmer's Reference Manuals, AKA "PRM's", see
+`<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)
+and commercial tools (Free nSIM,
+`<https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
+MetaWare Light Edition, `<https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_)
+
+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.
+
+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:
+
+1. cross-compilation: process of compiling for ARC targets on a development
+host with a different processor architecture (generally x86_64/amd64).
+
+2. 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:
+
+1. Synopsys GNU toolchain releases:
+`<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>`_
+2. Linux kernel compilers collection:
+`<https://mirrors.edge.kernel.org/pub/tools/crosstool/>`_
+3. Bootlin's toolchain collection: `<https://toolchains.bootlin.com/>`_
+
+Once the toolchain is installed in the system, make sure its "bin" folder
+is added in your ``PATH`` environment variable. Then set ``ARCH=arc`` &
+``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.
Documentation/arc/features.rst new file +3 -0
new file mode 100644
index 000000000000..b793583d688a
@@ -0,0 +1,3 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. kernel-feat:: $srctree/Documentation/features arc
Documentation/arc/index.rst new file +17 -0
new file mode 100644
index 000000000000..7b098d4a5e3e
@@ -0,0 +1,17 @@
+===================
+ARC architecture
+===================
+
+.. toctree::
+    :maxdepth: 1
+
+    arc
+
+    features
+
+.. only::  subproject and html
+
+   Indices
+   =======
+
+   * :ref:`genindex`
Documentation/arch.rst +1 -0
index f10bd32a5972..14bcd8294b93 100644
@@ -9,6 +9,7 @@ implementation.
 .. toctree::
    :maxdepth: 2
 
+   arc/index
    arm/index
    arm64/index
    ia64/index
MAINTAINERS +1 -0
index 3b79fd441dde..286a5e896be4 100644
@@ -18020,6 +18020,7 @@ M:	Vineet Gupta <[email protected]>
 L:	[email protected]
 S:	Supported
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
+F:	Documentation/arc/
 F:	Documentation/devicetree/bindings/arc/*
 F:	Documentation/devicetree/bindings/interrupt-controller/snps,arc*
 F:	arch/arc/
Signature · 1 line
2.25.1
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 28 lines · Alexey Brodkin

ARC processors are supported in upstream kernel since v3.9 and so far there was no documentation about them except some Device Tree bindings.

Fixing it with the simples set of docs now:
1. Overview with pointers to other informational resources
2. Autogenerated feature table

Note though it's just the very beginning, there will be more for sure given time as there're many things worth documenting and in fact even contents itself is avaialble but just spread in some other places. Now we'll try to keep all here and then maintain it looking forward to match the state of development.

Cc Randy Dunlap <[email protected]>
Cc Vineet Gupta <[email protected]>

---

Changes v1 -> v2:
* Spello "linux" -> "Linux" (Randy Dunlap)

  Documentation/arc/arc.rst      | 81 ++++++++++++++++++++++++++++++++++
  Documentation/arc/features.rst |  3 ++
  Documentation/arc/index.rst    | 17 +++++++
  Documentation/arch.rst         |  1 +
  MAINTAINERS                    |  1 +
  5 files changed, 103 insertions(+)
Quoted 4 lines

create mode 100644 Documentation/arc/arc.rst create mode 100644 Documentation/arc/features.rst create mode 100644 Documentation/arc/index.rst

thanks.

Signature · 1 line
~Randy
maintainer
#2 lore raw
In reply to Alexey Brodkin
Quoted 14 lines · Alexey Brodkin

ARC processors are supported in upstream kernel since v3.9 and so far there was no documentation about them except some Device Tree bindings.

Fixing it with the simples set of docs now:
1. Overview with pointers to other informational resources
2. Autogenerated feature table

Note though it's just the very beginning, there will be more for sure given time as there're many things worth documenting and in fact even contents itself is avaialble but just spread in some other places. Now we'll try to keep all here and then maintain it looking forward to match the state of development.

Quoted 3 lines
Cc Randy Dunlap <[email protected]>
Cc Vineet Gupta <[email protected]>

I've applied this set, but I have a couple of quibbles that it would be nice to see addressed...

Quoted 35 lines

Changes v1 -> v2:
* Spello "linux" -> "Linux" (Randy Dunlap)

 Documentation/arc/arc.rst      | 81 ++++++++++++++++++++++++++++++++++
 Documentation/arc/features.rst |  3 ++
 Documentation/arc/index.rst    | 17 +++++++
 Documentation/arch.rst         |  1 +
 MAINTAINERS                    |  1 +
 5 files changed, 103 insertions(+)
 create mode 100644 Documentation/arc/arc.rst
 create mode 100644 Documentation/arc/features.rst
 create mode 100644 Documentation/arc/index.rst
Documentation/arc/arc.rst new file +16 -0
new file mode 100644
index 000000000000..249d03c6be8e
@@ -0,0 +1,81 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Linux kernel for ARC processors
+*******************************
+
+Other sources of information
+############################
+
+Below are some resources where more information can be found on
+ARC processors and relevant open source projects.
+
+1. `<https://embarc.org/>`_ - Community portal for open source on ARC.
+Good place to start to find relevant FOSS projects, toolchain releases,
+news items and more.
+
+2. `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ -

Documentation/arc/arc.rst line 26

Quoted 10 lines
Documentation/arc/arc.rst new file +10 -0
+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.
+
+3. `<https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -
+Official Synopsys ARC Processors website location, with access to some IP
+documentation (Programmer's Reference Manuals, AKA "PRM's", see
+`<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)

This manual requires registration (with a fair amount of information required) to get. That should at least be mentioned if we can't find a less obnoxious version out there.

Quoted 24 lines
Documentation/arc/arc.rst new file +24 -0
+and commercial tools (Free nSIM,
+`<https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
+MetaWare Light Edition, `<https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_)
+
+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.
+
+Building the Linux kernel for ARC processors
+############################################

Documentation/arc/arc.rst line 60

Quoted 10 lines
Documentation/arc/arc.rst new file +10 -0
+
+The process of kernel building for ARC processors is the same as for any other
+architecture and could be done in 2 ways:
+
+1. cross-compilation: process of compiling for ARC targets on a development
+host with a different processor architecture (generally x86_64/amd64).
+
+2. 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.

These enumerated lists would render a lot more pleasantly if you actually formatted them as RST enumerated lists - with lines after the first indented.

Documentation/arc/arc.rst line 70

Quoted 9 lines
Documentation/arc/arc.rst new file +9 -0
+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:
+
+1. Synopsys GNU toolchain releases:
+`<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>`_
+2. Linux kernel compilers collection:
+`<https://mirrors.edge.kernel.org/pub/tools/crosstool/>`_
+3. Bootlin's toolchain collection: `<https://toolchains.bootlin.com/>`_

These, in particular, render in a pretty ugly way.

Thanks,

jon

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#3 lore raw

Hi Jonathan,

Quoted 6 lines
Quoted 3 lines
Cc Randy Dunlap <[email protected]>
Cc Vineet Gupta <[email protected]>

I've applied this set, but I have a couple of quibbles that it would be nice to see addressed...

Thanks for taking care of that!

Quoted 8 lines

Review

Quoted 4 lines

+3. <https://www.synopsys.com/designware-ip/processor-solutions.html>_ -

(quoted diff) +3 -0
+Official Synopsys ARC Processors website location, with access to some IP
+documentation (Programmer's Reference Manuals, AKA "PRM's", see
+`<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)

This manual requires registration (with a fair amount of information required) to get. That should at least be mentioned if we can't find a less obnoxious version out there.

Well, I'm afraid that's the best we may get as of now. I wish is was available with no registration whatsoever, but at least it could be easily had now by wide audience.

Anyways, I'm wondering what kind of mention do you think is appropriate here? Somehting like: "note, registration is required"?

Quoted 8 lines
Quoted 8 lines
(quoted diff) +8 -0
+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:
+
+1. cross-compilation: process of compiling for ARC targets on a development
+host with a different processor architecture (generally x86_64/amd64).
Quoted 8 lines

Review

Quoted 4 lines
(quoted diff) +4 -0
+
+2. 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.

These enumerated lists would render a lot more pleasantly if you actually formatted them as RST enumerated lists - with lines after the first indented.

Indeed, I'm much more used to Markdown and there it works ;) So should I send a re-spin with fixed version?

Quoted 11 lines

Review

Quoted 9 lines
(quoted diff) +9 -0
+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:
+
+1. Synopsys GNU toolchain releases:
+`<https://urldefense.com/v3/__https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases__;!!A4F2R9G_pg!N40JBI0hlr_f_ZX-pTGEO-vBvxNaA6NF4WYKA3yamILtuUOhgiEsFqRLfdx9VfetWmy7or8$ >`_
+2. Linux kernel compilers collection:
+`<https://urldefense.com/v3/__https://mirrors.edge.kernel.org/pub/tools/crosstool/__;!!A4F2R9G_pg!N40JBI0hlr_f_ZX-pTGEO-vBvxNaA6NF4WYKA3yamILtuUOhgiEsFqRLfdx9VfetayTOVRo$ >`_
+3. Bootlin's toolchain collection: `<https://urldefense.com/v3/__https://toolchains.bootlin.com/__;!!A4F2R9G_pg!N40JBI0hlr_f_ZX-pTGEO-vBvxNaA6NF4WYKA3yamILtuUOhgiEsFqRLfdx9Vfet7I-6RoI$ >`_

These, in particular, render in a pretty ugly way.

Right, here it gets even worse due to missing newlines. Again, fixed by:
-------------------------->8----------------------------

Documentation/arc/arc.rst +20 -18
index 249d03c6be8e..4dbd107f02e6 100644
@@ -10,23 +10,23 @@ Below are some resources where more information can be found on
 ARC processors and relevant open source projects.
 
 1. `<https://embarc.org/>`_ - Community portal for open source on ARC.
-Good place to start to find relevant FOSS projects, toolchain releases,
-news items and more.
+   Good place to start to find relevant FOSS projects, toolchain releases,
+   news items and more.
 
 2. `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ -
-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.
+   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.
 
 3. `<https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -
-Official Synopsys ARC Processors website location, with access to some IP
-documentation (Programmer's Reference Manuals, AKA "PRM's", see
-`<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)
-and commercial tools (Free nSIM,
-`<https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
-MetaWare Light Edition, `<https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_)
+   Official Synopsys ARC Processors website location, with access to some IP
+   documentation (Programmer's Reference Manuals, AKA "PRM's", see
+   `<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)
+   and commercial tools (Free nSIM,
+   `<https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
+   MetaWare Light Edition, `<https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_)
 
 Important note on ARC processors configurability
 ################################################
@@ -53,20 +53,22 @@ The process of kernel building for ARC processors is the same as for any other
 architecture and could be done in 2 ways:
 
 1. cross-compilation: process of compiling for ARC targets on a development
-host with a different processor architecture (generally x86_64/amd64).
+   host with a different processor architecture (generally x86_64/amd64).
 
 2. 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.
+   (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:
 
 1. 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>`_
+
 2. Linux kernel compilers collection:
-`<https://mirrors.edge.kernel.org/pub/tools/crosstool/>`_
+   `<https://mirrors.edge.kernel.org/pub/tools/crosstool/>`_
+
 3. Bootlin's toolchain collection: `<https://toolchains.bootlin.com/>`_
 
 Once the toolchain is installed in the system, make sure its "bin" folder

-------------------------->8----------------------------

-Alexey

maintainer
#4 lore raw
Quoted 10 lines · Alexey Brodkin
Quoted 3 lines

This manual requires registration (with a fair amount of information required) to get. That should at least be mentioned if we can't find a less obnoxious version out there.

Well, I'm afraid that's the best we may get as of now. I wish is was available with no registration whatsoever, but at least it could be easily had now by wide audience.

Anyways, I'm wondering what kind of mention do you think is appropriate here? Somehting like: "note, registration is required"?

Something like that would be helpful, I think, yes.

Quoted 17 lines
Quoted 8 lines
Quoted 8 lines
(quoted diff) +8 -0
+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:
+
+1. cross-compilation: process of compiling for ARC targets on a development
+host with a different processor architecture (generally x86_64/amd64).
Quoted 8 lines

Documentation/arc/arc.rst The process of kernel building for ARC processors is the same as for any other · line 60

Quoted 4 lines
Documentation/arc/arc.rst +4 -0
+
+2. 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.

These enumerated lists would render a lot more pleasantly if you actually formatted them as RST enumerated lists - with lines after the first indented.

Quoted 2 lines

Indeed, I'm much more used to Markdown and there it works ;) So should I send a re-spin with fixed version?

I applied the patch, so please send improvements on top of that.

Thanks,

jon

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc