Difference between dts and ACPI

后端 未结 3 544
醉梦人生
醉梦人生 2021-02-08 00:14

We can declare platform device information in dts file, rather than hard coding every data into operating system. Taking \"arm\" architecture as example. it supports dts an

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-08 00:43

    Breathe with lungs or gills? Depends on where you live.

    A rough classification of architectures is

    x86 - Server/PC - ACPI table 
    ARM - embedded systems - Device Tree
    

    On server/PC motherboards, the ACPI table is a part of the UEFI firmware, which resides on the flash chip. The OS would be installed later somewhere else (hard drive or so). The OS parses the ACPI table, but OS developers don't control what is already written in the firmware; or they don't even know the internal design of the board. The board vendor (firmware provider) needs to support whatever OS to be installed, not only Linux, so they have to follow standards (UEFI), instead of focusing on a Linux thing, such as device tree.

    On embedded systems, OS and everything else are programmed once by the vendor and never again by the user. The OS is part of the firmware. So no need to worry about the OS support matrix, and just have a 1-to-1 relationship between the board and your OS image. U-Boot, kernel, initramfs, device tree blob reside on the same flash storage (i.e. NAND). So developers have access and control to what to be deployed as the device tree (must match real hardware though).

    Hardware designers should be able to provide both an ACPI table and a device tree. Depending on the receiver, one will be preferred.

    References:

    • https://unix.stackexchange.com/a/399701/170265
    • https://xenproject.org/2013/12/03/xen-on-arm-and-the-device-tree-vs-acpi-debate/

提交回复
热议问题