LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   linux/arch/arm/kernel/head.S (https://www.linuxquestions.org/questions/linux-kernel-70/linux-arch-arm-kernel-head-s-4175410826/)

jaysh 06-11-2012 04:05 AM

linux/arch/arm/kernel/head.S
 
Hi,

Can anybody tell me what is the use of linux/arch/arm/kernel/head.S file in linux kernel?
And please tell me where I will get whole description about head.S?

Didier Spaier 06-11-2012 07:40 AM

Hi,

just have a look into this file, it is well documented.

In short:
Code:

*  Kernel startup code for all 32-bit CPUs
And in linux/arch/Doumentation/arm/README it is written:

Code:

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."

  This fine-grained machine specific 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/>



All times are GMT -5. The time now is 01:59 PM.