Search code examples
linux-kerneluefiacpiedk2

ACPI Definition Block: Difference between _SB and _SB_ for System bus


I'm investigating the edk2 (UEFI). So, I have some concerns about path of device defined in the DSDT table. In this table, we use /_SB for the root of system bus, but it's /_SB_ on Linux. For instance, I checked via command

 $ cat /sys/devices/LNXSYSTM\:00/LNXSYBUS\:00/PNP0A08\:00/device\:00/path

And sometime, I also see some ACPI table use /_SB_ for referring a device path.

Do you know how it is different? How use it?

Thank you so much!


Solution

  • The ACPI specification (I here and further refer to v6.4) chapter 19.3.1 defines characters allowed to be used in the names. Though it doesn't tell clearly what happened to the names shorter than 4 characters. This is clarified in chapter 5.3

    By convention, when an ASL compiler pads a name shorter than 4 characters, it is done so with trailing underscores (‘_’). See the language definition for AML NameSeg in the ACPI Source Language (ASL) Reference chapter.

    This is also confirmed by chapter 20.4 which shows byte stream in AML. In example the name

    \S2

    is translated to

    RootChar 'S2__'

    That said, the \_SB and \_SB_ are the equivalent notations of the same name.