1ddi_rep_put8(9F) Kernel Functions for Drivers ddi_rep_put8(9F)
2
3
4
6 ddi_rep_put8, ddi_rep_put16, ddi_rep_put32, ddi_rep_put64,
7 ddi_rep_putb, ddi_rep_putw, ddi_rep_putl, ddi_rep_putll - write data to
8 the mapped memory address, device register or allocated DMA memory
9 address
10
12 #include <sys/ddi.h>
13 #include <sys/sunddi.h>
14
15
16
17 void ddi_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr,
18 uint8_t *dev_addr, size_t repcount, uint_t flags);
19
20
21 void ddi_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr,
22 uint16_t *dev_addr, size_t repcount, uint_t flags);
23
24
25 void ddi_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr,
26 uint32_t *dev_addr, size_t repcount, uint_t flags);
27
28
29 void ddi_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
30 uint64_t *dev_addr,size_t repcount, uint_t flags);
31
32
34 Solaris DDI specific (Solaris DDI). The ddi_rep_putb(), ddi_rep_putl(),
35 ddi_rep_putll(), and ddi_rep_putw() functions are obsolete. The
36 ddi_rep_put8() function replaces ddi_rep_putb(). The ddi_rep_put32()
37 function replaces ddi_rep_putl(). The ddi_rep_put64() function replaces
38 ddi_rep_putll(). The ddi_rep_put16() function replaces ddi_rep_putw().
39
41 handle The data access handle returned from setup calls, such as
42 ddi_regs_map_setup(9F).
43
44
45 host_addr Base host address.
46
47
48 dev_addr Base device address.
49
50
51 repcount Number of data accesses to perform.
52
53
54 flags Device address flags:
55
56 DDI_DEV_AUTOINCR Automatically increment the device
57 address, dev_addr, during data
58 accesses.
59
60
61 DDI_DEV_NO_AUTOINCR Do not advance the device address,
62 dev_addr, during data accesses.
63
64
65
67 These routines generate multiple writes to the mapped memory or device
68 register. repcount data is copied from the host address, host_addr, to
69 the device address, dev_addr. For each input datum, the ddi_rep_put8(),
70 ddi_rep_put16(), ddi_rep_put32(), and ddi_rep_put64() functions write 8
71 bits, 16 bits, 32 bits, and 64 bits of data, respectively, to the
72 device address, dev_addr. dev_addr and host_addr must be aligned to the
73 datum boundary described by the function.
74
75
76 Each individual datum will automatically be translated to maintain a
77 consistent view between the host and the device based on the encoded
78 information in the data access handle. The translation may involve
79 byte-swapping if the host and the device have incompatible endian char‐
80 acteristics.
81
82
83 When the flags argument is set to DDI_DEV_AUTOINCR, these functions
84 treat the device address, dev_addr, as a memory buffer location on the
85 device and increment its address on the next input datum. However, when
86 the flags argument is set to DDI_DEV_NO_AUTOINCR, the same device
87 address will be used for every datum access. For example, this flag may
88 be useful when writing to a data register.
89
91 These functions can be called from user, kernel, or interrupt context.
92
94 See attributes(5) for descriptions of the following attributes:
95
96
97
98
99 ┌─────────────────────────────┬─────────────────────────────┐
100 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
101 ├─────────────────────────────┼─────────────────────────────┤
102 │Interface Stability │ddi_rep_putb(), │
103 │ │ddi_rep_putl(), │
104 │ │ddi_rep_putll(), and │
105 │ │ddi_rep_putw() are Obsolete │
106 │ │ddi_rep_put8(), │
107 │ │ddi_rep_put16(), │
108 │ │ddi_rep_put32(), │
109 │ │ddi_rep_put64() are Commit‐ │
110 │ │ted │
111 └─────────────────────────────┴─────────────────────────────┘
112
114 ddi_get8(9F), ddi_put8(9F), ddi_regs_map_free(9F), ddi_regs_map_set‐
115 up(9F), ddi_rep_get8(9F), ddi_device_acc_attr(9S)
116
117
118
119SunOS 5.11 1 Nov 2005 ddi_rep_put8(9F)