568 |
appropriate offsets to go along with. The physmem server will |
appropriate offsets to go along with. The physmem server will |
569 |
take care of that - which means that he may return a smaller |
take care of that - which means that he may return a smaller |
570 |
mapping than requested. */ |
mapping than requested. */ |
|
l4_word_t min_page_size = l4_min_page_size (); |
|
571 |
/* Get the memory range to which the ELF image from START to END |
/* Get the memory range to which the ELF image from START to END |
572 |
(exclusive) will be loaded. NAME is used for panic |
(exclusive) will be loaded. NAME is used for panic |
573 |
messages. */ |
messages. */ |
666 |
phys_mapv->size = memsz - filesz; |
phys_mapv->size = memsz - filesz; |
667 |
/* The dirty hack here causes physmem to allocate |
/* The dirty hack here causes physmem to allocate |
668 |
anonymous memory. */ |
anonymous memory. */ |
669 |
phys_mapv->offset = l4_page_trunc (ph->p_vaddr) + filesz |
phys_mapv->offset = (l4_page_trunc (ph->p_vaddr) + filesz) |
670 |
| ((ph->p_flags & PF_X) ? L4_FPAGE_EXECUTABLE : 0) |
| ((ph->p_flags & PF_X) ? L4_FPAGE_EXECUTABLE : 0) |
671 |
| ((ph->p_flags & PF_W) ? L4_FPAGE_WRITABLE : 0) |
| ((ph->p_flags & PF_W) ? L4_FPAGE_WRITABLE : 0) |
672 |
| ((ph->p_flags & PF_R) ? L4_FPAGE_READABLE : 0); |
| ((ph->p_flags & PF_R) ? L4_FPAGE_READABLE : 0); |
804 |
panic ("Message from task thread is not a page fault"); |
panic ("Message from task thread is not a page fault"); |
805 |
addr = l4_pagefault (tag, NULL, NULL); |
addr = l4_pagefault (tag, NULL, NULL); |
806 |
if (addr != (l4_word_t) STARTUP_TO_VIRT (entry_point)) |
if (addr != (l4_word_t) STARTUP_TO_VIRT (entry_point)) |
807 |
panic ("Page fault at unexpected address 0x%x (expected 0x%x)", |
panic ("Page fault at unexpected address 0x%x (expected 0x%p)", |
808 |
addr, STARTUP_TO_VIRT (entry_point)); |
addr, STARTUP_TO_VIRT (entry_point)); |
809 |
|
|
810 |
/* The memory was already requested from sigma0 by |
/* The memory was already requested from sigma0 by |
873 |
unsigned int cur_cont = 0; |
unsigned int cur_cont = 0; |
874 |
|
|
875 |
/* These are the threads that sent us the BOOTSTRAP_FINAL RPC. */ |
/* These are the threads that sent us the BOOTSTRAP_FINAL RPC. */ |
876 |
l4_thread_id_t bootstrap_final_physmem; |
l4_thread_id_t bootstrap_final_physmem = l4_nilthread; |
877 |
l4_thread_id_t bootstrap_final_task; |
l4_thread_id_t bootstrap_final_task = l4_nilthread; |
878 |
|
|
879 |
/* This is to keep information about created task caps. */ |
/* This is to keep information about created task caps. */ |
880 |
unsigned int cur_task = (unsigned int) -1; |
unsigned int cur_task = (unsigned int) -1; |