mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Some more minor fixes.
This commit is contained in:
@@ -41,3 +41,4 @@ objects += SConscript('src/api/SConscript', exports = {'symbols' : all_syms, 'en
|
||||
|
||||
kernel_elf = env.Program(BUILDDIR + '/kernel.elf', objects)
|
||||
Alias('kernel', kernel_elf)
|
||||
Depends(kernel_elf, 'include/l4/config.h')
|
||||
|
||||
@@ -305,9 +305,6 @@ static inline void *l4_map_helper(void *phys, int npages)
|
||||
struct task_ids ids;
|
||||
void *virt = l4_new_virtual(npages);
|
||||
|
||||
if (!phys)
|
||||
BUG();
|
||||
|
||||
l4_getid(&ids);
|
||||
l4_map(phys, virt, npages, MAP_USR_RW_FLAGS, ids.tid);
|
||||
return virt;
|
||||
|
||||
@@ -111,8 +111,8 @@ void fault_ipc_to_pager(u32 faulty_pc, u32 fsr, u32 far)
|
||||
|
||||
/* Detect if a pager is self-faulting */
|
||||
if (current->tid == current->pagerid) {
|
||||
printk("Pager (%d) self-faulting. Exiting.\n",
|
||||
current->tid);
|
||||
printk("Pager (%d) faulted on itself. FAR: 0x%x, PC: 0x%x Exiting.\n",
|
||||
current->tid, fault->far, fault->faulty_pc);
|
||||
task_destroy_current();
|
||||
}
|
||||
|
||||
|
||||
@@ -169,16 +169,16 @@ int init_first_pager(struct pager *pager,
|
||||
task->container = cont;
|
||||
task->cap_list_ptr = &pager->cap_list;
|
||||
|
||||
/* Map the task's space */
|
||||
add_mapping_pgd(pager->start_lma, pager->start_vma,
|
||||
page_align_up(pager->memsize),
|
||||
MAP_USR_DEFAULT_FLAGS, TASK_PGD(task));
|
||||
|
||||
printk("%s: Mapping %lu pages from 0x%lx to 0x%lx for %s\n",
|
||||
__KERNELNAME__,
|
||||
__pfn(page_align_up(pager->memsize)),
|
||||
pager->start_lma, pager->start_vma, cont->name);
|
||||
|
||||
/* Map the task's space */
|
||||
add_mapping_pgd(pager->start_lma, pager->start_vma,
|
||||
page_align_up(pager->memsize),
|
||||
MAP_USR_DEFAULT_FLAGS, TASK_PGD(task));
|
||||
|
||||
/* Initialize task scheduler parameters */
|
||||
sched_init_task(task, TASK_PRIO_PAGER);
|
||||
|
||||
@@ -228,14 +228,15 @@ int init_pager(struct pager *pager, struct container *cont)
|
||||
task->pagerid = task->tid;
|
||||
|
||||
task->cap_list_ptr = &pager->cap_list;
|
||||
add_mapping_pgd(pager->start_lma, pager->start_vma,
|
||||
page_align_up(pager->memsize),
|
||||
MAP_USR_DEFAULT_FLAGS, TASK_PGD(task));
|
||||
|
||||
printk("%s: Mapping %lu pages from 0x%lx to 0x%lx for %s\n",
|
||||
__KERNELNAME__, __pfn(page_align_up(pager->memsize)),
|
||||
pager->start_lma, pager->start_vma, cont->name);
|
||||
|
||||
add_mapping_pgd(pager->start_lma, pager->start_vma,
|
||||
page_align_up(pager->memsize),
|
||||
MAP_USR_DEFAULT_FLAGS, TASK_PGD(task));
|
||||
|
||||
/* Initialize task scheduler parameters */
|
||||
sched_init_task(task, TASK_PRIO_PAGER);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user