mirror of
https://github.com/drasko/codezero.git
synced 2026-02-08 07:53:16 +01:00
Changes since April
Clean up of build directories. Simplifications to capability model.
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
#define curcont (current->container)
|
||||
|
||||
#define CONFIG_CONTAINER_NAMESIZE 64
|
||||
#define CONFIG_MAX_CAPS_USED 16
|
||||
#define CONFIG_MAX_PAGER_CAPS 20
|
||||
#define CONFIG_MAX_CONT_CAPS 5
|
||||
#define CONFIG_MAX_PAGERS_USED 1
|
||||
|
||||
/* Container macro. No locks needed! */
|
||||
@@ -33,18 +34,13 @@ struct pager {
|
||||
unsigned long memsize;
|
||||
struct cap_list cap_list;
|
||||
|
||||
/*
|
||||
* Section markings,
|
||||
* We dont care for other types of sections,
|
||||
* RO will be included inside RX.
|
||||
*/
|
||||
unsigned long rw_sections_start;
|
||||
unsigned long rw_sections_end;
|
||||
unsigned long rx_sections_start;
|
||||
unsigned long rx_sections_end;
|
||||
/* Program header markings of pager's elf */
|
||||
unsigned long rw_pheader_start;
|
||||
unsigned long rw_pheader_end;
|
||||
unsigned long rx_pheader_start;
|
||||
unsigned long rx_pheader_end;
|
||||
};
|
||||
|
||||
|
||||
struct container {
|
||||
l4id_t cid; /* Unique container id */
|
||||
int npagers; /* # of pagers */
|
||||
@@ -82,15 +78,11 @@ struct pager_info {
|
||||
unsigned long start_address;
|
||||
unsigned long stack_address;
|
||||
|
||||
/*
|
||||
* Section markings,
|
||||
* We dont care for other types of sections,
|
||||
* RO will be included inside RX.
|
||||
*/
|
||||
unsigned long rw_sections_start;
|
||||
unsigned long rw_sections_end;
|
||||
unsigned long rx_sections_start;
|
||||
unsigned long rx_sections_end;
|
||||
/* Program header markings of pager's elf */
|
||||
unsigned long rw_pheader_start;
|
||||
unsigned long rw_pheader_end;
|
||||
unsigned long rx_pheader_start;
|
||||
unsigned long rx_pheader_end;
|
||||
|
||||
/* Number of capabilities defined */
|
||||
int ncaps;
|
||||
@@ -106,7 +98,7 @@ struct pager_info {
|
||||
* One or more virtmem caps,
|
||||
* Zero or more umutex caps,
|
||||
*/
|
||||
struct cap_info caps[CONFIG_MAX_CAPS_USED];
|
||||
struct cap_info caps[CONFIG_MAX_PAGER_CAPS];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -116,6 +108,8 @@ struct pager_info {
|
||||
struct container_info {
|
||||
char name[CONFIG_CONTAINER_NAMESIZE];
|
||||
int npagers;
|
||||
int ncaps;
|
||||
struct cap_info caps[CONFIG_MAX_CONT_CAPS];
|
||||
struct pager_info pager[CONFIG_MAX_PAGERS_USED];
|
||||
};
|
||||
|
||||
@@ -128,8 +122,10 @@ struct container *container_create(void);
|
||||
|
||||
int container_init_pagers(struct kernel_resources *kres);
|
||||
|
||||
struct container *container_alloc_init(void);
|
||||
int init_containers(struct kernel_resources *kres);
|
||||
struct container *container_find(struct kernel_resources *kres, l4id_t cid);
|
||||
struct ktcb *container_find_tcb(struct container *c, l4id_t tid);
|
||||
|
||||
#endif /* __CONTAINER_H__ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user