The linux for arm kernel startup code is located in arch/arm/kernel/head.S and in the comment we know the system shold be

  1. The startup is normally called in decompressor pcode
  2. The requirement are
    1. MMU = off
    2. D-Cache = off
    3. I-Cache = dont care
    4. R0 = 0 , R1 = machine nr , R2= atags or dtb pointer
  3. Most of the startup code is position independent, so if you link the kernel at 0xc00008000, you call this startup code at __pa(0xc0008000)

In latest linux kernel, some code is split to head-common.S, and we could find “b start_kernel” (the main program write in C to initialize kernel) here.

Leave a Reply