Hardware irq and vcpu entry

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Jun 11 21:49:28 CEST 2012


Hi,

On Fri Jun 08, 2012 at 17:27:37 +0200, Pierre Larus wrote:
> I am porting an RTOS on L4RE.
> The RTOS run in a l4_thread and I am currently trying to handle hardware
> timer irq.
> 
> I would like to know if it is possible to attach an hardware irq (timer
> irq) to a vcpu entry ?
> I try to do this in a vpcu thread:
> 
>     vcpu_state->state     = L4_VCPU_F_EXCEPTIONS | L4_VCPU_F_IRQ;
>     vcpu_state->entry_ip  = (l4_addr_t)&vcpu_entry;
>     vcpu_state->user_task = L4_INVALID_CAP;
> 
>     InitClockDevice();
> 
>     icucap = l4re_get_env_cap("icu");
>     irqcap = l4re_util_cap_alloc();
>     l4_factory_create_irq(l4re_global_env->factory, irqcap);
>     l4_icu_bind(icucap, 38, irqcap);
>     l4_irq_attach(irqcap, 0x38, current_thread_cap);
> 
>     StartUpMain();
> 
> But this solution does not work.

I think there's an l4_irq_unmask() missing. It's included in an
l4_irq_receive() so it works there.




Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list