1ddi_rep_get8(9F)         Kernel Functions for Drivers         ddi_rep_get8(9F)
2
3
4

NAME

6       ddi_rep_get8,      ddi_rep_get16,     ddi_rep_get32,     ddi_rep_get64,
7       ddi_rep_getw, ddi_rep_getl, ddi_rep_getll,  ddi_rep_getb  -  read  data
8       from the mapped memory address, device register or allocated DMA memory
9       address
10

SYNOPSIS

12       #include <sys/ddi.h>
13       #include <sys/sunddi.h>
14
15
16
17       void ddi_rep_get8(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_get16(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_get32(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_get64(ddi_acc_handle_t handle, uint64_t *host_addr,
30            uint64_t *dev_addr, size_t repcount, uint_t flags);
31
32

INTERFACE LEVEL

34       Solaris DDI specific (Solaris DDI). The ddi_rep_getb(), ddi_rep_getl(),
35       ddi_rep_getll(),   and   ddi_rep_getw()  functions  are  obsolete.  The
36       ddi_rep_get8() function replaces  ddi_rep_getb().  The  ddi_rep_get32()
37       function replaces ddi_rep_getl(). The ddi_rep_get64() function replaces
38       ddi_rep_getll(). The ddi_rep_get16() function replaces ddi_rep_getw().
39

PARAMETERS

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

DESCRIPTION

67       These routines generate multiple reads from the mapped memory or device
68       register. repcount data is copied from the device address, dev_addr, to
69       the host address, host_addr. For each input datum, the  ddi_rep_get8(),
70       ddi_rep_get16(),  ddi_rep_get32(), and ddi_rep_get64() functions read 8
71       bits, 16 bits, 32 bits, and 64 bits of  data,  respectively,  from  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  function
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 to DDI_DEV_NO_AUTOINCR, the same device address
87       will be used for every datum access. For example, this flag may be use‐
88       ful when reading from a data register.
89

RETURN VALUES

91       These functions return the value read from the mapped address.
92

CONTEXT

94       These functions can be called from user, kernel, or interrupt context.
95

ATTRIBUTES

97       See attributes(5) for descriptions of the following attributes:
98
99
100
101
102       ┌─────────────────────────────┬─────────────────────────────┐
103       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
104       ├─────────────────────────────┼─────────────────────────────┤
105       │Interface Stability          │ddi_rep_getb(),              │
106       │                             │ddi_rep_getl(),              │
107       │                             │ddi_rep_getll(),        and  │
108       │                             │ddi_rep_getw() are Obsolete  │
109       │                             │ddi_rep_get8(),              │
110       │                             │ddi_rep_get16(),             │
111       │                             │ddi_rep_get32(),             │
112       │                             │ddi_rep_get64() are Commit‐  │
113       │                             │ted                          │
114       └─────────────────────────────┴─────────────────────────────┘
115

SEE ALSO

117       ddi_get8(9F),  ddi_put8(9F),  ddi_regs_map_free(9F),  ddi_regs_map_set‐
118       up(9F), ddi_rep_put8(9F)
119
120
121
122SunOS 5.11                        1 Nov 2005                  ddi_rep_get8(9F)
Impressum