Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

168
Visualizações
ARM Linux Atags vs Device Tree

What is the difference between device tree and ATAGs? Also, are ATAGs a must and does the kernel expect them at a fixed address, or does it expect them in r0-r3?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

A device tree describes everything about the hardware which the kernel uses to select which drivers to load, where all the MMIO interfaces are, etc... at runtime. ATAGs just describes stuff like where to find an initrd and kernel parameters, memory, etc... - everything else about the machine is hard coded into the kernel.

The preferred method now is to use device trees instead of ATAGs. One of the advantages include the fact that adding a new platform doesn't always require adding new code to the kernel.

To answer your second question, if you had read the documentation for booting Linux on the ARM platform, you'd find that the kernel expects the following to be placed in the registers before control is handed over to the kernel:

r0 = 0,
r1 = machine type number discovered in (3) above.
r2 = physical address of tagged list in system RAM, or
     physical address of device tree block (dtb) in system RAM

I believe there is (or at least was) an option to load ATAGs from a fixed location instead of the address found in r2. However, the use of ATAGs is now being deprecated and obsolete and new platforms shouldn't be using it.

over 4 years ago · Santiago Trujillo Relatório

0

Basically ATAGs were used to send information to linux kernel about the machine specific information of the board like memory, console information, etc. and these ATAGs were used by linux kernel to initialize the MMU and other subsystem.

But with the advent of device tree (more of using it with arm because it was already getting used in powerpc architecture.) now all the machine related information can be passed using FDT (device tree blob).

There were some ideas floating around for sending device tree information to the kernel using a new atag "atag_dtd" but later there was debate for not using ATAG at all because there was no need to use two seprate method to do a single thing. So now kernel expect a bootloader to provide following information.

r0 = 0
r1 = Same type of SOC fdt machine id.
r2 = physical address where the dtd can be found.

It uses same structure which were used by bootloader to send atag information so it could be backword compatible.

Hope it helps.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda