mirror of
https://github.com/drasko/codezero.git
synced 2026-07-10 01:14:12 +02:00
Some more progress on resource management and boot up.
This commit is contained in:
51
include/l4/generic/resource.h
Normal file
51
include/l4/generic/resource.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#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__ */
|
||||
Reference in New Issue
Block a user