mirror of
https://github.com/drasko/codezero.git
synced 2026-01-21 15:23:15 +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:
@@ -105,6 +105,6 @@ int cap_cap_check(struct ktcb *task, unsigned int req, unsigned int flags);
|
||||
int cap_mutex_check(unsigned long mutex_address, int mutex_op);
|
||||
|
||||
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);
|
||||
|
||||
#endif /* __GENERIC_CAPABILITY_H__ */
|
||||
|
||||
@@ -40,11 +40,17 @@ struct irq_desc {
|
||||
struct irq_chip *chip;
|
||||
|
||||
/* Thread registered for this irq */
|
||||
struct ktcb *irq_thread;
|
||||
struct ktcb *task;
|
||||
|
||||
/* Notification slot for this irq */
|
||||
int task_notify_slot;
|
||||
|
||||
/* Device virtual address */
|
||||
unsigned long device_virtual;
|
||||
|
||||
/* Device capability */
|
||||
struct capability *devcap;
|
||||
|
||||
/* NOTE: This could be a list for multiple handlers for shared irqs */
|
||||
irq_handler_t handler;
|
||||
};
|
||||
@@ -68,8 +74,8 @@ static inline void irq_disable(int irq_index)
|
||||
this_chip->ops.ack_and_mask(irq_index - this_chip->start);
|
||||
}
|
||||
|
||||
int irq_register(struct ktcb *task, int notify_slot,
|
||||
l4id_t irq_index, irq_handler_t handler);
|
||||
void irq_generic_map_device(struct irq_desc *desc);
|
||||
int irq_register(struct ktcb *task, int notify_slot, l4id_t irq_index);
|
||||
|
||||
void do_irq(void);
|
||||
void irq_controllers_init(void);
|
||||
|
||||
Reference in New Issue
Block a user