The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386ipsc/dcm_output.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * Copyright 1988, 1989, 1990, 1991 by Intel Corporation,
   28  * Santa Clara, California.
   29  * 
   30  *                          All Rights Reserved
   31  * 
   32  * Permission to use, copy, modify, and distribute this software and its
   33  * documentation for any purpose and without fee is hereby granted,
   34  * provided that the above copyright notice appears in all copies and that
   35  * both the copyright notice and this permission notice appear in
   36  * supporting documentation, and that the name of Intel not be used in
   37  * advertising or publicity pertaining to distribution of the software
   38  * without specific, written prior permission.
   39  * 
   40  * INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
   41  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
   42  * SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
   43  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
   44  * PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS
   45  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
   46  * THIS SOFTWARE.
   47  */
   48 /*
   49  * HISTORY
   50  * $Log:        dcm_output.c,v $
   51  * Revision 2.6  91/08/28  11:12:00  jsb
   52  *      Moved shortword count support here from norma/ipc_net.c.
   53  *      [91/08/26  14:04:28  jsb]
   54  * 
   55  * Revision 2.5  91/08/03  18:18:01  jsb
   56  *      Added setting of size field in dcm_header for i860ipsc support.
   57  *      [91/07/27  19:04:34  jsb]
   58  * 
   59  *      Moved all device independent code to norma/ipc_net.c.
   60  *      [91/07/25  18:30:44  jsb]
   61  * 
   62  * Revision 2.4  91/06/18  20:50:16  jsb
   63  *      New copyright from Intel.
   64  *      [91/06/18  20:06:21  jsb]
   65  * 
   66  * Revision 2.3  91/06/17  15:44:09  jsb
   67  *      Changed include of renamed norma file.
   68  *      [91/06/17  10:07:18  jsb]
   69  * 
   70  * Revision 2.2  91/06/06  17:04:32  jsb
   71  *      First checkin.
   72  *      [91/05/14  13:27:30  jsb]
   73  * 
   74  */ 
   75 
   76 #include <norma/ipc_net.h>
   77 #include <ipsc/dcmcom.h>
   78 #include <i386ipsc/dcm.h>
   79 
   80 struct adma_chan        dcm_send_chan_1;
   81 struct adma_chan        dcm_send_chan_2;
   82 struct dcm_header       dcm_send_header;
   83 int                     ipsc_route;
   84 
   85 
   86 /*
   87  * Called when the dcm is initialized.
   88  */
   89 dcm_init_send()
   90 {
   91         bzero(&dcm_send_header, sizeof(dcm_send_header));
   92         dcm_send_header.type = DCM_HDR_TYPE_MACH;
   93 
   94         /*
   95          * Initialize dcm_send_chan_1
   96          */
   97         dcm_send_chan_1.src1 = kvtophys(&dcm_send_header) >> 1;
   98         dcm_send_chan_1.cnt1 = sizeof(dcm_send_header) >> 1;
   99         dcm_send_chan_1.cmd1 = SENDCMD;
  100         dcm_send_chan_1.cmd2 = SENDCMD;
  101         dcm_send_chan_1.cmd3 = SENDCMD;
  102         dcm_send_chan_1.cmd4 = STOPCMD | EOD;
  103 
  104         /*
  105          * Initialize dcm_send_chan_2
  106          */
  107         dcm_send_chan_2.src1 = kvtophys(&dcm_send_header) >> 1;
  108         dcm_send_chan_2.cnt1 = sizeof(dcm_send_header) >> 1;
  109         dcm_send_chan_2.cmd1 = SENDCMD;
  110         dcm_send_chan_2.cmd1 = SENDCMD;
  111         dcm_send_chan_2.cmd2 = SENDCMD;
  112         dcm_send_chan_2.cmd3 = SENDCMD;
  113         dcm_send_chan_2.cmd4 = SENDCMD;
  114         dcm_send_chan_2.cmd5 = STOPCMD | EOD;
  115 
  116         /*
  117          * Initialize routing info
  118          */
  119         ipsc_route = node_self() & 0x7f;
  120 }
  121 
  122 netipc_send(remote, vec, count)
  123         int remote;
  124         register struct netvec *vec;
  125         int count;
  126 {
  127         int s;
  128 
  129         dcm_send_header.route = remote ^ ipsc_route;
  130         if (count == 2) {
  131                 dcm_send_chan_1.src2 = vec[0].addr >> 1;
  132                 dcm_send_chan_1.cnt2 = vec[0].size >> 1;
  133                 dcm_send_chan_1.src3 = vec[1].addr >> 1;
  134                 dcm_send_chan_1.cnt3 = vec[1].size >> 1;
  135                 dcm_send_header.size = vec[0].size + vec[1].size;
  136                 s = sploff();
  137                 dcm_send_1();
  138                 splon(s);
  139         } else if (count == 3) {
  140                 dcm_send_chan_2.src2 = vec[0].addr >> 1;
  141                 dcm_send_chan_2.cnt2 = vec[0].size >> 1;
  142                 dcm_send_chan_2.src3 = vec[1].addr >> 1;
  143                 dcm_send_chan_2.cnt3 = vec[1].size >> 1;
  144                 dcm_send_chan_2.src4 = vec[2].addr >> 1;
  145                 dcm_send_chan_2.cnt4 = vec[2].size >> 1;
  146                 dcm_send_header.size = vec[0].size + vec[1].size + vec[2].size;
  147                 s = sploff();
  148                 dcm_send_2();
  149                 splon(s);
  150         } else {
  151                 panic("netipc_send: bad count=%d\n", count);
  152         }
  153 }
  154 
  155 dcm_send_intr()
  156 {
  157         netipc_send_intr();
  158 }
  159 
  160 netipc_network_init()
  161 {
  162 }

Cache object: 495c0027366c0aa11d69d81f7772b2f5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.