mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Made changes to map devices dynamically upon irq registration.
All will be reverted since mapping devices statically is much simpler.
This commit is contained in:
@@ -877,7 +877,8 @@ int cap_thread_check(struct ktcb *task,
|
||||
|
||||
|
||||
int cap_irq_check(struct ktcb *registrant, unsigned int req,
|
||||
unsigned int flags, l4id_t irq)
|
||||
unsigned int flags, l4id_t irq,
|
||||
struct capability **device_cap)
|
||||
{
|
||||
struct sys_irqctrl_args args = {
|
||||
.registrant = registrant,
|
||||
@@ -895,8 +896,8 @@ int cap_irq_check(struct ktcb *registrant, unsigned int req,
|
||||
* Find the device capability and
|
||||
* check that it allows irq registration
|
||||
*/
|
||||
if (!(cap_find(current, cap_match_devmem,
|
||||
&args, CAP_TYPE_MAP_PHYSMEM)))
|
||||
if (!(*device_cap = cap_find(current, cap_match_devmem,
|
||||
&args, CAP_TYPE_MAP_PHYSMEM)))
|
||||
return -ENOCAP;
|
||||
|
||||
return 0;
|
||||
@@ -939,7 +940,7 @@ int cap_thread_check(struct ktcb *task,
|
||||
}
|
||||
|
||||
int cap_irq_check(struct ktcb *registrant, unsigned int req,
|
||||
unsigned int flags, l4id_t irq)
|
||||
unsigned int flags, l4id_t irq, struct capability **cap)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user