How can I get raw value of interrupt ACPI resource value in INTRNG?
Date: Wed, 19 Oct 2022 12:50:20 UTC
I wrote ACPI Generic Event device driver, found at least in qemu. https://reviews.freebsd.org/D37032 This works fine for qemu, but I have problem about this. This driver receive interrupt and invoke "_EVT" method to process ACPI function, such as sending Notify to other ACPI device. This driver can handle multiple interrupt, though qemu use only one and the event cause is obtained from memory-mapped I/O by ACPI bytecode. To distingish each interrupts, the spec requires the driver invoke _EVT method with IRQ identifier. This IRQ identifier should be interrupt resource value encoded in _CRS data, and I believe it is available from rman_get_start(theResource), but I aware the resource value in dmesg and ACPI resource value that can be available from DSDT is not same. I look inside and found irq number mapping is done before setting resource by rman_set_resource and the raw value of the resource is hidden in subr_intr.c static function, it seems. How can I do to obtain raw ACPI IRQ resource value?