Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Oct 2022 00:22:48 +0900
From:      Takanori Watanabe <takawata@init-main.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How can I get raw value of interrupt ACPI resource value in INTRNG?
Message-ID:  <Y1AWSIN3XtKliddZ@sana.init-main.com>
In-Reply-To: <202210191250.29JCoK1s083469@sana.init-main.com>
References:  <202210191250.29JCoK1s083469@sana.init-main.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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. 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y1AWSIN3XtKliddZ>