ARM Linux的Atags VS设备树 [英] ARM Linux Atags vs Device Tree

查看:1250
本文介绍了ARM Linux的Atags VS设备树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是设备树和ATAGs之间的区别?此外,有ATAGs必须的,确实内核指望他们在一个固定的地址呢,还是希望他们在R0-R3?

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?

推荐答案

一个设备树介绍有关该内核使用选择的驱动程序加载硬件,所有的MMIO接口等......在运行时的一切。 ATAGs只是描述的东西像在哪里可以找到一个initrd和内核参数,内存,等等 - 一切有关机器是很难coded进入内核

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.

在preferred方法现在是使用设备的树木,而不是ATAGs。其中的优势包括一个事实,即增加一个新的平台并不总是需要增加新的code到内核中。

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.

要回答你的第二个问题,如果你已经阅读在ARM平台启动Linux的文件,你会发现,内核预计下被放置在寄存器控制权移交给内核前:

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

我相信是有(或至少是)从一个固定的位置,而不是在R2中发现的地址载入ATAGs的选项。然而,使用ATAGs现在正被德precated和过时,新平台不应该用它来。

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.

这篇关于ARM Linux的Atags VS设备树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆