Re: Hardware irq and vcpu entry

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
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                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.