Changeset f2c8f55 in mainline


Ignore:
Timestamp:
2018-08-03T12:41:38Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c92dfed
Parents:
f67d8ee
Message:

IPC_M_SHARE_IN: source has no business deciding destination address

Make the use of kernel-set arguments more consistent with
IPC_M_CONNECT_* methods (i.e. allocate the kernel-set arguments from the
end). Improve the documentation of IPC_M_SHARE_IN.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/ipc/methods.h

    rf67d8ee rf2c8f55  
    121121        IPC_M_PAGE_IN,
    122122
    123         /** Receive as_area over IPC.
    124          *
    125          * - ARG1 - destination as_area size
    126          * - ARG2 - user defined argument
    127          *
    128          * on answer, the recipient must set:
    129          *
    130          * - ARG1 - source as_area base address
    131          * - ARG2 - flags that will be used for sharing
    132          * - ARG3 - dst as_area lower bound
    133          * - ARG4 - dst as_area base address (filled automatically by kernel)
     123        /** Receive an address space area over IPC.
     124         *
     125         * Sender:
     126         *  - uspace: arg1 .. address space area size
     127         *            arg2 .. sender's address space area starting address
     128         *                    lower bound
     129         *            arg3 .. <custom>
     130         *            arg4 .. <unused>
     131         *            arg5 .. <unused>
     132         *
     133         * Recipient:
     134         *  - uspace: arg1 .. recipient's address space area starting address
     135         *            arg2 .. shared address space areas sharing flags
     136         *            arg3 .. <unused>
     137         *            arg4 .. <unused>
     138         *  - kernel: arg5 .. new sender's address space area starting address
     139         *
    134140         */
    135141        IPC_M_SHARE_IN,
  • kernel/generic/src/ipc/ops/sharein.c

    rf67d8ee rf2c8f55  
    5151                errno_t rc = as_area_share(AS, IPC_GET_ARG1(answer->data),
    5252                    IPC_GET_ARG1(*olddata), as, IPC_GET_ARG2(answer->data),
    53                     &dst_base, IPC_GET_ARG3(answer->data));
    54                 IPC_SET_ARG4(answer->data, dst_base);
     53                    &dst_base, IPC_GET_ARG2(*olddata));
     54                IPC_SET_ARG5(answer->data, dst_base);
    5555                IPC_SET_RETVAL(answer->data, rc);
    5656        }
  • uspace/lib/c/generic/async/client.c

    rf67d8ee rf2c8f55  
    937937        sysarg_t _flags = 0;
    938938        sysarg_t _dst = (sysarg_t) -1;
    939         errno_t res = async_req_2_4(exch, IPC_M_SHARE_IN, (sysarg_t) size,
    940             arg, NULL, &_flags, NULL, &_dst);
     939        errno_t res = async_req_3_5(exch, IPC_M_SHARE_IN, (sysarg_t) size,
     940            (sysarg_t) __progsymbols.end, arg, NULL, &_flags, NULL, NULL,
     941            &_dst);
    941942
    942943        if (flags)
  • uspace/lib/c/generic/async/server.c

    rf67d8ee rf2c8f55  
    12281228        assert(call);
    12291229
    1230         // FIXME: The source has no business deciding destination address.
    1231         return ipc_answer_3(call->cap_handle, EOK, (sysarg_t) src, (sysarg_t) flags,
    1232             (sysarg_t) __progsymbols.end);
     1230        return ipc_answer_2(call->cap_handle, EOK, (sysarg_t) src, (sysarg_t) flags);
    12331231}
    12341232
Note: See TracChangeset for help on using the changeset viewer.