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