mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 03:13:15 +01:00
First step in detaching pager struct from tasks
This commit is contained in:
@@ -556,7 +556,7 @@ struct capability *cap_match_mem(struct capability *cap,
|
||||
*
|
||||
* It seems it would be reasonable for a pager to have memory
|
||||
* capabilities with a resid of its own id, and rtype of
|
||||
* CAP_RTYPE_PGGROUP, effectively allowing it to do map
|
||||
* CAP_RTYPE_CONTAINER, effectively allowing it to do map
|
||||
* operations on itself and its group of paged children.
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -110,8 +110,6 @@ int init_pager(struct pager *pager,
|
||||
task_init_registers(task, pager->start_address);
|
||||
|
||||
/* Initialize container/pager relationships */
|
||||
pager->tcb = task;
|
||||
task->pager = pager;
|
||||
task->pagerid = task->tid;
|
||||
task->tgid = task->tid;
|
||||
task->container = cont;
|
||||
@@ -142,7 +140,7 @@ int init_pager(struct pager *pager,
|
||||
cap->resid = CAP_RESID_NONE;
|
||||
}
|
||||
|
||||
printk("%s: Mapping %lx bytes (%lx pages) from 0x%lx to 0x%lx for %s\n",
|
||||
printk("%s: Mapping 0x%lx bytes (0x%lx pages) from 0x%lx to 0x%lx for %s\n",
|
||||
__KERNELNAME__, pager->memsize,
|
||||
__pfn(page_align_up(pager->memsize)),
|
||||
pager->start_lma, pager->start_vma, cont->name);
|
||||
|
||||
@@ -363,9 +363,6 @@ void init_kernel_resources(struct kernel_resources *kres)
|
||||
/* Initialize container head */
|
||||
container_head_init(&kres->containers);
|
||||
|
||||
/* Get first container id for itself */
|
||||
kres->cid = id_new(&kres->container_ids);
|
||||
|
||||
/* Initialize kernel capability lists */
|
||||
cap_list_init(&kres->physmem_used);
|
||||
cap_list_init(&kres->physmem_free);
|
||||
@@ -521,6 +518,10 @@ void setup_containers(struct boot_resources *bootres,
|
||||
|
||||
/* Initialize pagers */
|
||||
container_init_pagers(kres, current_pgd);
|
||||
|
||||
/* Assign next unused container id for kernel resources */
|
||||
kres->cid = id_new(&kres->container_ids);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -559,8 +560,8 @@ void copy_boot_capabilities(struct cap_list *caplist)
|
||||
* Creates capabilities allocated with a real id, and from the
|
||||
* capability cache, in place of ones allocated at boot-time.
|
||||
*/
|
||||
void kres_setup_capabilities(struct boot_resources *bootres,
|
||||
struct kernel_resources *kres)
|
||||
void kernel_setup_capabilities(struct boot_resources *bootres,
|
||||
struct kernel_resources *kres)
|
||||
{
|
||||
struct capability *cap;
|
||||
|
||||
@@ -861,7 +862,7 @@ int init_system_resources(struct kernel_resources *kres)
|
||||
|
||||
init_resource_allocators(&bootres, kres);
|
||||
|
||||
kres_setup_capabilities(&bootres, kres);
|
||||
kernel_setup_capabilities(&bootres, kres);
|
||||
|
||||
setup_containers(&bootres, kres);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user