remarkable-linux/Documentation/arm
Linus Torvalds 316dde2fe9 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King:
 "In this ARM merge, we remove more lines than we add.  Changes include:

   - Enable imprecise aborts early, so that bus errors aren't masked
     until later in the boot.  This has the side effect that boot
     loaders which provoke these aborts can cause the kernel to crash
     early in boot, so we install a handler to report this event around
     the site where these are enabled.

   - Remove the buggy but impossible to enable cmpxchg syscall code.

   - Add unwinding annotations to some assembly code.

   - Add support for atomic half-word exchange for ARMv6k+.

   - Reduce ioremap() alignment for SMP/LPAE cases where we don't need
     the large alignment.

   - Addition of an "optimal" 3G configuration for systems with 1G of
     RAM.

   - Increase vmalloc space by 128M.

   - Constify some SMP operations structures, which have never been
     writable.

   - Improve ARMs dma_mmap() support for mapping DMA coherent mappings
     into userspace.

   - Fix to the NMI backtrace code in the IPI case on ARM where the
     failing CPU gets stuck for 10s waiting for its own IPI to be
     delivered.

   - Removal of legacy PM support from the AMBA bus driver.

   - Another fix for the previous fix of vdsomunge"

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (23 commits)
  ARM: 8449/1: fix bug in vdsomunge swab32 macro
  arm: add missing of_node_put
  ARM: 8447/1: catch pending imprecise abort on unmask
  ARM: 8446/1: amba: Remove unused callbacks for legacy system PM
  ARM: 8443/1: Adding support for atomic half word exchange
  ARM: clean up TWD after previous patch
  ARM: 8441/2: twd: Don't set CLOCK_EVT_FEAT_C3STOP unconditionally
  ARM: 8440/1: remove obsolete documentation
  ARM: make highpte an expert option
  ARM: 8433/1: add a VMSPLIT_3G_OPT config option
  ARM: 8439/1: Fix backtrace generation when IPI is masked
  ARM: 8428/1: kgdb: Fix registers on sleeping tasks
  ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()
  ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()
  ARM: remove user cmpxchg syscall
  ARM: 8438/1: Add unwinding to __clear_user_std()
  ARM: 8436/1: hw_breakpoint: remove unnecessary header
  ARM: 8434/2: Revert "7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp"
  ARM: 8432/1: move VMALLOC_END from 0xff000000 to 0xff800000
  ARM: 8430/1: use default ioremap alignment for SMP or LPAE
  ...
2015-11-03 13:54:35 -08:00
..
Atmel ARM: at91/soc: add basic support for new sama5d2 SoC 2015-08-05 10:40:21 +02:00
keystone ARM: keystone: add documentation for SoCs and EVMs 2015-08-06 13:14:17 -06:00
Marvell Documentation: arm: update supported Marvell EBU processors 2015-03-04 15:35:43 +01:00
nwfpe
OMAP Documentation: ARM: List new omap MMC requirements 2015-10-12 16:23:34 -07:00
pxa
SA1100 ARM: 8440/1: remove obsolete documentation 2015-10-09 16:22:52 +01:00
Samsung Documentation: ARM: EXYNOS: Extend boot loader interface documentation 2015-07-10 13:59:35 -06:00
Samsung-S3C24XX ARM: SAMSUNG: remove unused DMA infrastructure 2015-01-24 13:09:54 +09:00
SH-Mobile Documentation: Remove ZBOOT MMC/SDHI utility and docs 2015-02-24 06:45:25 +09:00
SPEAr Update Viresh Kumar's email address 2015-07-17 16:39:53 -07:00
sti ARM: STi: Add STiH418 SoC support 2015-01-16 13:10:21 +01:00
stm32 ARM: Add STM32 family machine 2015-05-15 21:43:23 +02:00
sunxi Documentation: sunxi: Update Allwinner SoC documentation 2015-07-05 16:33:54 +02:00
VFP
00-INDEX ARM: Remove mach-msm and associated ARM architecture code 2015-03-27 11:31:02 -05:00
Booting Documentation: arm: Update for DT-only platforms 2015-02-27 14:54:55 -07:00
CCN.txt bus: arm-ccn: Provide required event arguments 2015-05-01 17:51:03 +01:00
cluster-pm-race-avoidance.txt ARM: mcpm: introduce helpers for platform coherency exit/setup 2013-04-24 10:37:00 -04:00
firmware.txt ARM: firmware: Introduce suspend and resume operations 2014-10-21 00:06:35 +09:00
Interrupts
IXP4xx Documentation/arm/IXP4xx fix a typo 2013-06-05 16:24:59 +02:00
kernel_mode_neon.txt ARM: 7825/1: document the use of NEON in kernel mode 2013-08-25 17:09:48 +01:00
kernel_user_helpers.txt
mem_alignment
memory.txt ARM: 8432/1: move VMALLOC_END from 0xff000000 to 0xff800000 2015-09-22 08:13:57 +01:00
Netwinder
Porting
README Documentation: arm: Update for DT-only platforms 2015-02-27 14:54:55 -07:00
Setup
swp_emulation
tcm.txt
uefi.txt doc: arm: add UEFI support documentation 2014-04-30 19:57:01 +01:00
vlocks.txt Doc: Change wikipedia's URL from http to https 2015-06-22 10:14:05 -06:00

			   ARM Linux 2.6
			   =============

    Please check <ftp://ftp.arm.linux.org.uk/pub/armlinux> for
    updates.

Compilation of kernel
---------------------

  In order to compile ARM Linux, you will need a compiler capable of
  generating ARM ELF code with GNU extensions.  GCC 3.3 is known to be
  a good compiler.  Fortunately, you needn't guess.  The kernel will report
  an error if your compiler is a recognized offender.

  To build ARM Linux natively, you shouldn't have to alter the ARCH = line
  in the top level Makefile.  However, if you don't have the ARM Linux ELF
  tools installed as default, then you should change the CROSS_COMPILE
  line as detailed below.

  If you wish to cross-compile, then alter the following lines in the top
  level make file:

    ARCH = <whatever>
	with
    ARCH = arm

	and

    CROSS_COMPILE=
	to
    CROSS_COMPILE=<your-path-to-your-compiler-without-gcc>
	eg.
    CROSS_COMPILE=arm-linux-

  Do a 'make config', followed by 'make Image' to build the kernel 
  (arch/arm/boot/Image).  A compressed image can be built by doing a 
  'make zImage' instead of 'make Image'.


Bug reports etc
---------------

  Please send patches to the patch system.  For more information, see
  http://www.arm.linux.org.uk/developer/patches/info.php Always include some
  explanation as to what the patch does and why it is needed.

  Bug reports should be sent to linux-arm-kernel@lists.arm.linux.org.uk,
  or submitted through the web form at
  http://www.arm.linux.org.uk/developer/ 

  When sending bug reports, please ensure that they contain all relevant
  information, eg. the kernel messages that were printed before/during
  the problem, what you were doing, etc.


Include files
-------------

  Several new include directories have been created under include/asm-arm,
  which are there to reduce the clutter in the top-level directory.  These
  directories, and their purpose is listed below:

   arch-*	machine/platform specific header files
   hardware	driver-internal ARM specific data structures/definitions
   mach		descriptions of generic ARM to specific machine interfaces
   proc-*	processor dependent header files (currently only two
		categories)


Machine/Platform support
------------------------

  The ARM tree contains support for a lot of different machine types.  To
  continue supporting these differences, it has become necessary to split
  machine-specific parts by directory.  For this, the machine category is
  used to select which directories and files get included (we will use
  $(MACHINE) to refer to the category)

  To this end, we now have arch/arm/mach-$(MACHINE) directories which are
  designed to house the non-driver files for a particular machine (eg, PCI,
  memory management, architecture definitions etc).  For all future
  machines, there should be a corresponding arch/arm/mach-$(MACHINE)/include/mach
  directory.


Modules
-------

  Although modularisation is supported (and required for the FP emulator),
  each module on an ARM2/ARM250/ARM3 machine when is loaded will take
  memory up to the next 32k boundary due to the size of the pages.
  Therefore, is modularisation on these machines really worth it?

  However, ARM6 and up machines allow modules to take multiples of 4k, and
  as such Acorn RiscPCs and other architectures using these processors can
  make good use of modularisation.


ADFS Image files
----------------

  You can access image files on your ADFS partitions by mounting the ADFS
  partition, and then using the loopback device driver.  You must have
  losetup installed.

  Please note that the PCEmulator DOS partitions have a partition table at
  the start, and as such, you will have to give '-o offset' to losetup.


Request to developers
---------------------

  When writing device drivers which include a separate assembler file, please
  include it in with the C file, and not the arch/arm/lib directory.  This
  allows the driver to be compiled as a loadable module without requiring
  half the code to be compiled into the kernel image.

  In general, try to avoid using assembler unless it is really necessary.  It
  makes drivers far less easy to port to other hardware.


ST506 hard drives
-----------------

  The ST506 hard drive controllers seem to be working fine (if a little
  slowly).  At the moment they will only work off the controllers on an
  A4x0's motherboard, but for it to work off a Podule just requires
  someone with a podule to add the addresses for the IRQ mask and the
  HDC base to the source.

  As of 31/3/96 it works with two drives (you should get the ADFS
  *configure harddrive set to 2). I've got an internal 20MB and a great
  big external 5.25" FH 64MB drive (who could ever want more :-) ).

  I've just got 240K/s off it (a dd with bs=128k); thats about half of what
  RiscOS gets; but it's a heck of a lot better than the 50K/s I was getting
  last week :-)

  Known bug: Drive data errors can cause a hang; including cases where
  the controller has fixed the error using ECC. (Possibly ONLY
  in that case...hmm).


1772 Floppy
-----------
  This also seems to work OK, but hasn't been stressed much lately.  It
  hasn't got any code for disc change detection in there at the moment which
  could be a bit of a problem!  Suggestions on the correct way to do this
  are welcome.


CONFIG_MACH_ and CONFIG_ARCH_
-----------------------------
  A change was made in 2003 to the macro names for new machines.
  Historically, CONFIG_ARCH_ was used for the bonafide architecture,
  e.g. SA1100, as well as implementations of the architecture,
  e.g. Assabet.  It was decided to change the implementation macros
  to read CONFIG_MACH_ for clarity.  Moreover, a retroactive fixup has
  not been made because it would complicate patching.

  Previous registrations may be found online.

    <http://www.arm.linux.org.uk/developer/machines/>

Kernel entry (head.S)
--------------------------
  The initial entry into the kernel is via head.S, which uses machine
  independent code.  The machine is selected by the value of 'r1' on
  entry, which must be kept unique.

  Due to the large number of machines which the ARM port of Linux provides
  for, we have a method to manage this which ensures that we don't end up
  duplicating large amounts of code.

  We group machine (or platform) support code into machine classes.  A
  class typically based around one or more system on a chip devices, and
  acts as a natural container around the actual implementations.  These
  classes are given directories - arch/arm/mach-<class> and
  arch/arm/mach-<class> - which contain the source files to/include/mach
  support the machine class.  This directories also contain any machine
  specific supporting code.

  For example, the SA1100 class is based upon the SA1100 and SA1110 SoC
  devices, and contains the code to support the way the on-board and off-
  board devices are used, or the device is setup, and provides that
  machine specific "personality."

  For platforms that support device tree (DT), the machine selection is
  controlled at runtime by passing the device tree blob to the kernel.  At
  compile-time, support for the machine type must be selected.  This allows for
  a single multiplatform kernel build to be used for several machine types.

  For platforms that do not use device tree, this machine selection is
  controlled by the machine type ID, which acts both as a run-time and a
  compile-time code selection method.  You can register a new machine via the
  web site at:

    <http://www.arm.linux.org.uk/developer/machines/>

  Note: Please do not register a machine type for DT-only platforms.  If your
  platform is DT-only, you do not need a registered machine type.

---
Russell King (15/03/2004)