Changeset e1e4192 in mainline for kernel/generic/src


Ignore:
Timestamp:
2012-06-03T20:45:58Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
90478727
Parents:
f7e69f5 (diff), 3123d2a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Location:
kernel/generic/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/sysipc.c

    rf7e69f5 re1e4192  
    597597        if (IPC_GET_IMETHOD(call->data) == IPC_M_CONNECT_TO_ME) {
    598598                int phoneid = phone_alloc(TASK);
    599                 if (phoneid < 0) { /* Failed to allocate phone */
     599                if (phoneid < 0) {  /* Failed to allocate phone */
    600600                        IPC_SET_RETVAL(call->data, ELIMIT);
    601601                        ipc_answer(box, call);
     
    883883       
    884884        /*
    885          * Userspace is not allowed to change interface and method of system
     885         * User space is not allowed to change interface and method of system
    886886         * methods on forward, allow changing ARG1, ARG2, ARG3 and ARG4 by
    887          * means of method, arg1, arg2 and arg3.
     887         * means of imethod, arg1, arg2 and arg3.
    888888         * If the interface and method is immutable, don't change anything.
    889889         */
     
    897897                        IPC_SET_ARG3(call->data, arg2);
    898898                       
    899                         if (slow) {
     899                        if (slow)
    900900                                IPC_SET_ARG4(call->data, arg3);
    901                                 /*
    902                                  * For system methods we deliberately don't
    903                                  * overwrite ARG5.
    904                                  */
    905                         }
     901                       
     902                        /*
     903                         * For system methods we deliberately don't
     904                         * overwrite ARG5.
     905                         */
    906906                } else {
    907907                        IPC_SET_IMETHOD(call->data, imethod);
  • kernel/generic/src/lib/rd.c

    rf7e69f5 re1e4192  
    3838 */
    3939
     40#include <print.h>
    4041#include <lib/rd.h>
    4142#include <mm/frame.h>
     
    6667        sysinfo_set_item_val("rd.size", NULL, size);
    6768        sysinfo_set_item_val("rd.address.physical", NULL, (sysarg_t) base);
     69       
     70        printf("RAM disk at %p (size %zu bytes)\n", (void *) base, size);
    6871}
    6972
  • kernel/generic/src/main/kinit.c

    rf7e69f5 re1e4192  
    201201                str_cpy(namebuf + INIT_PREFIX_LEN,
    202202                    TASK_NAME_BUFLEN - INIT_PREFIX_LEN, name);
    203 
     203               
    204204                /*
    205205                 * Create virtual memory mappings for init task images.
     
    236236                        init_rd((void *) init.tasks[i].paddr, init.tasks[i].size);
    237237                } else
    238                         printf("init[%zu]: Init binary load failed (error %d)\n", i, rc);
     238                        printf("init[%zu]: Init binary load failed "
     239                            "(error %d, loader status %u)\n", i, rc,
     240                            programs[i].loader_status);
    239241        }
    240242       
  • kernel/generic/src/proc/program.c

    rf7e69f5 re1e4192  
    8080        kernel_uarg->uspace_uarg = NULL;
    8181       
     82        prg->loader_status = EE_OK;
    8283        prg->task = task_create(as, name);
    8384        if (!prg->task)
     
    111112 * executable image. The task is returned in *task.
    112113 *
    113  * @param image_addr Address of an executable program image.
    114  * @param name       Name to set for the program's task.
    115  * @param prg        Buffer for storing program info. If image_addr
    116  *                   points to a loader image, p->task will be set to
    117  *                   NULL and EOK will be returned.
     114 * @param[in]  image_addr Address of an executable program image.
     115 * @param[in]  name       Name to set for the program's task.
     116 * @param[out] prg        Buffer for storing program info.
     117 *                        If image_addr points to a loader image,
     118 *                        prg->task will be set to NULL and EOK
     119 *                        will be returned.
    118120 *
    119121 * @return EOK on success or negative error code.
     
    126128                return ENOMEM;
    127129       
    128         unsigned int rc = elf_load((elf_header_t *) image_addr, as, 0);
    129         if (rc != EE_OK) {
     130        prg->loader_status = elf_load((elf_header_t *) image_addr, as, 0);
     131        if (prg->loader_status != EE_OK) {
    130132                as_destroy(as);
    131133                prg->task = NULL;
    132134                prg->main_thread = NULL;
    133135               
    134                 if (rc != EE_LOADER)
     136                if (prg->loader_status != EE_LOADER)
    135137                        return ENOTSUP;
    136138               
     
    140142               
    141143                program_loader = image_addr;
    142                 LOG("Registered program loader at %p",
    143                     (void *) image_addr);
     144                printf("Program loader at %p\n", (void *) image_addr);
    144145               
    145146                return EOK;
     
    171172        }
    172173       
    173         unsigned int rc = elf_load((elf_header_t *) program_loader, as,
     174        prg->loader_status = elf_load((elf_header_t *) program_loader, as,
    174175            ELD_F_LOADER);
    175         if (rc != EE_OK) {
     176        if (prg->loader_status != EE_OK) {
    176177                as_destroy(as);
    177                 printf("Cannot spawn loader (%s)\n", elf_error(rc));
     178                printf("Cannot spawn loader (%s)\n",
     179                    elf_error(prg->loader_status));
    178180                return ENOENT;
    179181        }
  • kernel/generic/src/synch/spinlock.c

    rf7e69f5 re1e4192  
    262262        int rc = spinlock_trylock(&(lock->lock));
    263263       
    264         ASSERT_IRQ_SPINLOCK(!rc || !lock->guard, lock);
     264        ASSERT_IRQ_SPINLOCK((!rc) || (!lock->guard), lock);
    265265        return rc;
    266266}
Note: See TracChangeset for help on using the changeset viewer.