Files
codezero/include/l4/generic/resource.h
2009-07-29 13:32:38 +03:00

52 lines
1.1 KiB
C

#ifndef __RESOURCES_H__
#define __RESOURCES_H__
/* Number of containers defined at compile-time */
#define CONTAINERS_TOTAL 1
#include <l4/generic/capability.h>
struct boot_resources {
int nconts;
int ncaps;
int nids;
int nthreads;
int nspaces;
int npmds;
/* Kernel resource usage */
int nkpmds;
int nkpgds;
int nkmemcaps;
};
struct kernel_container {
/* Physical memory caps, used/unused */
struct cap_list physmem_used;
struct cap_list physmem_free;
/* Virtual memory caps, used/unused */
struct cap_list virtmem_used;
struct cap_list virtmem_free;
/* Device memory caps, used/unused */
struct cap_list devmem_used;
struct cap_list devmem_free;
struct mem_cache *pgd_cache;
struct mem_cache *pmd_cache;
struct mem_cache *ktcb_cache;
struct mem_cache *address_space_cache;
struct mem_cache *umutex_cache;
struct mem_cache *cap_cache;
struct mem_cache *cont_cache;
};
extern struct kernel_container kernel_container;
int init_system_resources(struct kernel_container *kcont,
struct boot_resources *bootres);
#endif /* __RESOURCES_H__ */