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:
Bahadir Balban
2009-12-11 19:02:10 +02:00
parent 54301e8026
commit 59af5d3794
16 changed files with 248 additions and 64 deletions

24
include/l4/lib/addr.h Normal file
View File

@@ -0,0 +1,24 @@
/*
* 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__ */