[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GNUMach question

Tomasz Wegrzanowski <maniek@beer.com> writes:

> Were interface used by userspace apps to get/free
> hardware ports/ irqs/ dmas etc. is described.

I don't know where it is described.  But I'm looking at the
source to see how it could work.

gnumach/i386/i386at/autoconf.c (take_dev_irq) allocates an IRQ
for the kernel.  It marks allocated IRQs by storing non-zero
values in the intpri array.  The array is modified only in the
following places (I grepped):
* gnumach/i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq):
  These look like general-purpose functions.
* gnumach/linux/dev/arch/i386/kernel/irq.c (setup_x86_irq,
  free_irq, probe_irq_on, probe_irq_off, init_IRQ, restore_IRQ):
  Glue for Linux drivers.
* gnumach/i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close):
  Special-purpose, for the mouse only.
* gnumach/i386/i386at/pit.c (clkstart): Apparently run during

Of these, take_dev_irq or request_irq could be used by the
user-space IRQ interface.  Let's see where they are called...
sorry, they are used only from drivers of particular devices and
so there is no interface for delivering IRQs to user programs.

Hardware ports (0x3D4 and 0x3D5 at least) can currently be used
by user programs without any requests or permission checks.  I've
reported this as bug #46709.

I think I'll download Fiasco and see what it's like...

Reply to: