3 * Copyright 2007,2008,2009 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef INCLUDED_GCELL_GC_MBOX_H
22 #define INCLUDED_GCELL_GC_MBOX_H
25 * The PPE and SPE exchange a few 32-bit messages via mailboxes.
26 * All have a 4 bit opcode in the high bits.
29 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
30 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
32 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
36 #define MK_MBOX_MSG(cmd, args) ((((cmd) & 0xf) << 28) | ((args) & 0x0fffffff))
37 #define MBOX_MSG_OP(msg) (((msg) >> 28) & 0xf)
38 #define MBOX_MSG_ARG(msg) ((msg) & 0x0fffffff)
40 // PPE to SPE (sent via SPE Read Inbound Mailbox)
42 #define OP_EXIT 0x0 // exit now
43 #define OP_GET_SPU_BUFSIZE 0x1
44 #define OP_CHECK_QUEUE 0x2
46 // SPE to PPE (sent via SPE Write Outbound Interrupt Mailbox)
48 #define OP_JOBS_DONE 0x3 // arg is 0 or 1, indicating which
49 // gc_completion_info_t contains the info
50 #define OP_SPU_BUFSIZE 0x4 // arg is max number of bytes
53 #endif /* INCLUDED_GCELL_GC_MBOX_H */