tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: RFC: add MSI/MSI-X support to NetBSD
Hello,
(2014/06/07 2:40), David Young wrote:
I think that MSI/MSI-X logically separates into a few pieces, what do
you think about these pieces?
1 An MI API for establishing "mailboxes" (or "doorbells" or whatever
we may call them). A mailbox is a special physical address (PA) or
PA/data-pair in correspondence with a callback (function, argument).
An MI API for mapping the mailbox into various address spaces,
but especially the message-signalling devices. In this way, the
mailbox API is a use or an extension of bus_dma(9).
Somewhere I have a draft proposal for this MI API, I will try to
dig it up.
I am reading your draft proposal, so I comment about this later.
2 For each platform, an MD implementation of the MI mailbox API.
3 Extensions to pci(9) for establishing message-signalled interrupts
using either a (function, argument) pair, a PA, or a (PA, data) pair.
I am pretty sure that the implementation of these extensions can be
MI.
I agree that the implementation can be MI. I try to implement it
can be MI easily.
How do you think of message-signalled interrupts (MSI) routing?
I want to route normal (and INTx) interrupts and MSI together,
so I think establishing "handler" should be able to be used
as a parameter of pic->addroute().
For this reason, I am implementing API for establishing MSI using
pci_intr_handle_t like pci_intr_establish(). The pci_intr_handle_t
for MSI consists of following three values:
a) the "virtual IRQ number" (like IRQ number for normal interrupts)
used in FreeBSD
b) MPSAFE flag
c) MSI flag (new)
This implementation is not so good because I tried to divert existing
code as much as possible. I think that I have better change parameters
of pic->addroute() or change pci_intr_handle_t to a struct.
+ [amd64 MD] refactor INTRSTUB
- currently, it walks the interrupt handler list in assembly code
- I want to use NetBSD's list library, so I want to convert this assembly
code to C code.
I support converting much of the interrupt dispatch code to C from
assembly.
I am very glad for your help. INTRSTUB is close-coupling with IPL,
struct intrsource, and ioapic_{mask(),unmask()}. So I have difficulty
to do at first...
Thanks,
--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.
Device Engineering Section,
Core Product Development Department,
Product Division
mail: k-nakahara%iij.ad.jp@localhost
Home |
Main Index |
Thread Index |
Old Index