7 * Description of the mapping buffer registers contained in the UTCB
8 * (used e.g. during IPC).
9 * The utcb can contain buffers that describe memory regions, bits in the
10 * I/O bitmap or capabilities. The buffer description is used to find the
11 * first buffer for each type.
12 * Additionally, the buffer description contains a flag to specify the
13 * willingness to receive FPU state in an IPC operation.
15 * Note that a single buffer might occupy more than one word in the buffer-
16 * registers array in the UTCB. The L4_buf_iter class can be used to iterate
25 * \brief Flag the willingness to receive FPU state during IPC.
27 * If this flag is set, the receiving thread in an IPC is willing
28 * to receive the status of the floating point unit (FPU) from its partner
29 * as part of an IPC. Conceptually, this flag adds the FPU of the
30 * receiver as an additional message receiver buffer.
31 * The sender must set the corresponding flag L4_msg_tag::Transfer_fpu.
33 Inherit_fpu = (1UL << 24)
37 * Create an uninitialized buffer descriptor.
38 * \note The value of the buffer descriptor is unpredictable.
43 * Create a buffer descriptor with given values.
44 * \param mem the BR index for the first memory buffer item.
45 * \param io the BR index for the first I/O-port buffer item.
46 * \param obj the BR index for the first object/capability buffer item.
47 * \param flags the flags, such as, Inherit_fpu.
49 * The buffer registers must contain blocks of buffers of identical
50 * type (memory, caps, I/O-ports) starting at the given index. The first
51 * non-matching item terminates the items of the particular type.
52 * \see Utcb and L4_msg_tag
54 L4_buf_desc(unsigned mem, unsigned io, unsigned obj,
56 : _raw( mem_bfm_t::val_dirty(mem)
57 | io_bfm_t::val_dirty(io)
58 | obj_bfm_t::val_dirty(obj)
63 * The flags of the BDR.
64 * \return flags encoded in the BDR, see #Inherit_fpu, L4_buf_desc::Flags.
65 * \note The return value may have reserved bits set.
67 Mword flags() const { return _raw; }
70 * Get the raw binary representation of the buffer descriptor.
71 * \return binary representation of the buffer descriptor.
73 Mword raw() const { return _raw; }
77 * A single machine word that describes the buffers that follow:
78 * - Bits 0..4: The index of the first memory buffer.
79 * - Bits 5..9: The index of the first io buffer.
80 * - Bits 10..14: The index of the first capability buffer.
81 * - Bits 15..23: Unused
82 * - Bits 24..31: Flags as defined above (only #Inherit_fpu is in use).
87 /** \name Index of the first memory receive buffer
89 * The memory receive items use two BRs each.
90 * \see L4_fpage, L4_msg_item
92 CXX_BITFIELD_MEMBER( 0, 4, mem, _raw);
94 /** \name Index of the first IO-port receive buffer
96 * The I/O-port buffer items use two BRs each.
97 * \see L4_fpage, L4_msg_item.
99 CXX_BITFIELD_MEMBER( 5, 9, io, _raw);
101 /** \name Index of the first object receive buffer
103 * An object receive buffer may use one or two BRs depending on the
104 * value in the L4_msg_item in the first BR.
105 * \see L4_msg_item, L4_fpage.
107 CXX_BITFIELD_MEMBER(10, 14, obj, _raw);