示例#1
0
/*! @brief Main Console server entry point. */
int
main(void)
{
    /* Future Work 4:
       Eventually RefOS should be changed so that processes that are started
       by the process server do not require that the their system call table be
       explicitly referenced in the code like this. Without expliciting referencing
       __vsyscall_ptr in main(), the compiler optimizes away __vsyscall_ptr
       and then processes started by the process server can't find their system call
       table. Each of the four places in RefOS where this explicit reference is
       required is affected by a custom linker script (linker.lds), so it is possible
       that the custom linker script (and then likely other things too) needs to be
       modified. Also note that the ROS_ERROR() and assert() inside this if statement
       would not actually be able to execute if __vsyscall_ptr() were ever not set.
       The purpose of these calls to ROS_ERROR() and assert() is to show future
       developers that __vsyscall_ptr needs to be defined.
    */
    if (! __vsyscall_ptr) {
        ROS_ERROR("Console server could not find system call table.");
        assert("!Console server could not find system call table.");
        return 0;
    }

    dprintf("Initialising RefOS Console server.\n");
    refosio_setup_morecore_override(conServMMapRegion, CONSERV_MMAP_REGION_SIZE);
    refos_initialise_os_minimal();
    conserv_init();

    console_server_mainloop();

    return 0;
}
示例#2
0
/*! @brief Main CPIO file server entry point. */
int
main() {
    SET_MUSLC_SYSCALL_TABLE;
    seL4_DebugPrintf("hi, I'm in file_server main!\n");
    refosio_setup_morecore_override(mmapRegion, MMAP_SIZE);
    seL4_DebugPrintf("hi, I'm in file_server main2!\n");
    refos_initialise_os_minimal();
    seL4_DebugPrintf("hi, I'm in file_server main3!\n");
    refos_setup_dataspace_stdio(REFOS_DEFAULT_STDIO_DSPACE);
    seL4_DebugPrintf("hi, I'm in file_server main4!\n");

    fileserv_init();
    seL4_DebugPrintf("hi, I'm in file_server main5!\n");
    fileserv_mainloop();
    seL4_DebugPrintf("hi, I'm in file_server main6!\n");

    return 0;
}