does luna-88k2 dream of pc card? / using pc card on openbsd/luna88k
TRANSCRIPT
1
NBUG 2015年2⽉例会
LUNA-88K2はPCカードの夢を⾒るか?
Nagoya *BSD Users' GroupKenji Aoyama / ⻘⼭ 健治
Using PC Card on OpenBSD/luna88k
構成を考える cbus0 at mainbus0
pcic0 at cbus0
necsb0 at cbus0
pcex0 at cbus0
cbus0
他Cbusボード
pcic0
pcex0
INTx
INTy
mainbus0
interrupt
level = 4
pcmcia0
pcmcia1
IRQx
IRQy
MI code:
src/sys/dev/ic/i82365{.c,reg.h,var.h}
C-bus glue code:
i82365_cbus.c
audio0necsb0
INTz
ISA版を参考に
ここを作れば良さそう
割り込み:INTとIRQの対応/** NEC PC-9801 architecture uses different IRQ notation from PC-AT* architecture, so-called INT. The MI pcic(4) driver internally uses* IRQ, so here is a table to convert INT to IRQ.*/
static const int pcic_cbus_int2irq[NCBUSISR] = {PCIC_INTR_IRQ3, /* INT 0 */PCIC_INTR_IRQ5, /* INT 1 */PCIC_INTR_IRQ_RESERVED6, /* INT 2 */PCIC_INTR_IRQ9, /* INT 3 */PCIC_INTR_IRQ10, /* INT 4(41) */PCIC_INTR_IRQ12, /* INT 5 */PCIC_INTR_IRQ_RESERVED13 /* INT 6 */
};
/* And, a table to convert IRQ to INT */static const int pcic_cbus_irq2int[] = {
-1, -1, -1, 0, -1, 1, 2, -1, /* IRQ 0- 7 */-1, 3, 4, -1, 5, 6, -1, -1 /* IRQ 8-15 */
};
開発中につきcommitされるコードは変更となる場合があります:-)
割り込み:stray interrupt問題• C-bus上に多数のstray interruptが発生する• とりあえず無視すれば動くが…
• (よく理解してないが)割り込みの種類の違いか?– C-bus : エッジトリガ(らしい)– PCカード : レベルトリガ
• PC-ATではIRQごとに種類を変えられるようだ
参考: http://www.webtech.co.jp/company/doc/undocumented_mem/io_pic.txt
割り込み:解決策?• CL-PD672xの”pulse IRQ”モードにしてやると
C-bus上でstray interruptが発生しなくなる(が理由は良く分からない…)
出典: CL-PD672x仕様書