Re: How can I get raw value of interrupt ACPI resource value in INTRNG?
- In reply to: Takanori Watanabe : "How can I get raw value of interrupt ACPI resource value in INTRNG? "
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Oct 2022 15:22:48 UTC
On Wed, Oct 19, 2022 at 09:50:20PM +0900, Takanori Watanabe wrote: > 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? intr_activate_irq called by bus_activate_resource sets the object containing irq raw value. I resolved myself.