mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 11:23:16 +01:00
Reverted all changes - userspace devices mapped at initialization.
This is much simpler, no device map/unmap maintenance at run-time, no lazy device mapping etc.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#define IRQ_CONTROL_REGISTER 0
|
||||
#define IRQ_CONTROL_RELEASE 1
|
||||
#define IRQ_CONTROL_WAIT 2
|
||||
|
||||
|
||||
#endif /* __API_IRQ_H__ */
|
||||
|
||||
@@ -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, struct capability **cap);
|
||||
unsigned int flags, l4id_t irq);
|
||||
|
||||
#endif /* __GENERIC_CAPABILITY_H__ */
|
||||
|
||||
@@ -45,12 +45,6 @@ struct irq_desc {
|
||||
/* 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;
|
||||
};
|
||||
@@ -74,8 +68,8 @@ static inline void irq_disable(int irq_index)
|
||||
this_chip->ops.ack_and_mask(irq_index - this_chip->start);
|
||||
}
|
||||
|
||||
void irq_generic_map_device(struct irq_desc *desc);
|
||||
int irq_register(struct ktcb *task, int notify_slot, l4id_t irq_index);
|
||||
int irq_thread_notify(struct irq_desc *desc);
|
||||
|
||||
void do_irq(void);
|
||||
void irq_controllers_init(void);
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
#define MR0_REGISTER r3
|
||||
#define MR_RETURN_REGISTER r3
|
||||
|
||||
#define TASK_NOTIFY_MAX 8
|
||||
|
||||
/* Primaries aren't used for memcopy. Those ops use this as a parameter */
|
||||
#define L4_UTCB_FULL_BUFFER_SIZE (MR_REST * sizeof(int))
|
||||
|
||||
@@ -83,7 +85,7 @@ struct utcb {
|
||||
u32 mr[MR_TOTAL]; /* MRs that are mapped to real registers */
|
||||
u32 saved_tag; /* Saved tag field for stacked ipcs */
|
||||
u32 saved_sender; /* Saved sender field for stacked ipcs */
|
||||
u8 notify_slot[8]; /* Irq notification slots */
|
||||
u8 notify[TASK_NOTIFY_MAX]; /* Irq notification slots */
|
||||
u32 mr_rest[MR_REST]; /* Complete the utcb for up to 64 words */
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Address allocation pool
|
||||
*
|
||||
* Copyright (C) 2007 - 2009 Bahadir Balban
|
||||
*/
|
||||
#ifndef __KERNEL_ADDR_H__
|
||||
#define __KERNEL_ADDR_H__
|
||||
|
||||
#include <lib/idpool.h>
|
||||
|
||||
/* Address pool to allocate from a range of addresses */
|
||||
struct address_pool {
|
||||
struct id_pool idpool;
|
||||
unsigned long start;
|
||||
unsigned long end;
|
||||
};
|
||||
|
||||
void *kernel_new_address(int npages);
|
||||
int kernel_delete_address(void *addr, int npages);
|
||||
|
||||
void *address_new(struct address_pool *pool, int npages);
|
||||
int address_del(struct address_pool *, void *addr, int npages);
|
||||
|
||||
#endif /* __KERNEL_ADDR_H__ */
|
||||
@@ -43,6 +43,7 @@
|
||||
#define PB926_SIC_VOFFSET 0x00003000
|
||||
#define PB926_SYSREGS_VOFFSET 0x00004000
|
||||
#define PB926_SYSCTRL_VOFFSET 0x00005000
|
||||
#define PB926_TIMER23_VOFFSET 0x00006000
|
||||
|
||||
#define PLATFORM_CONSOLE_VIRTUAL (IO_AREA0_VADDR + PB926_UART0_VOFFSET)
|
||||
#define PLATFORM_TIMER0_VIRTUAL (IO_AREA0_VADDR + PB926_TIMER01_VOFFSET)
|
||||
|
||||
Reference in New Issue
Block a user