Re: [PATCH v6 6/6] samples: rust: add ACPI match table example to platform driver
From: Igor Korotin
Date: Tue Jun 17 2025 - 12:54:59 EST
On 6/16/25 20:52, Danilo Krummrich wrote:
>> +kernel::acpi_device_table!(
>> + ACPI_TABLE,
>> + MODULE_ACPI_TABLE,
>> + <SampleDriver as platform::Driver>::IdInfo,
>> + [(acpi::DeviceId::new(c_str!("TEST4321")), Info(0))]
>
> Let's use something like "SAMPLE_DRV0" instead.
Nope, that's prohibited by ACPI HID naming rules. A brief description
can be found here:
https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html.
According to section 6.1.5, ACPI IDs must be 7 or 8 characters long and
follow the format "AAA####" or "AAAA####", where A is an uppercase
letter [A–Z] and # is an uppercase letter or digit [A–Z, 0–9]. No
underscores or special characters are allowed.
The `iasl` utility throws an error if an invalid HID string is used in a
dsl file.
I could suggest on of the following:
DRV0001
DRVR0001
PDRV0001
TEST0001
TST0001
Let me know which one you'd prefer for the code and documentation.
Best Regards
Igor