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

NAME

6       ddi_put8,   ddi_put16,   ddi_put32,   ddi_put64,   ddi_putb,  ddi_putl,
7       ddi_putll, ddi_putw - write data to the mapped memory  address,  device
8       register or allocated DMA memory address
9

SYNOPSIS

11       #include <sys/ddi.h>
12       #include <sys/sunddi.h>
13
14
15
16       void ddi_put8(ddi_acc_handle_t handle, uint8_t *dev_addr,
17            uint8_t value);
18
19
20       void ddi_put16(ddi_acc_handle_t handle, uint16_t *dev_addr,
21            uint16_t value);
22
23
24       void ddi_put32(ddi_acc_handle_t handle, uint32_t *dev_addr,
25            uint32_t value);
26
27
28       void ddi_put64(ddi_acc_handle_t handle, uint64_t *dev_addr,
29            uint64_t value);
30
31

INTERFACE LEVEL

33       Solaris   DDI  specific  (Solaris  DDI).  The  ddi_putb(),  ddi_putl(),
34       ddi_putll(), and ddi_putw()  functions  are  obsolete.  The  ddi_put8()
35       function   replaces   ddi_putb().  The  ddi_put32()  function  replaces
36       ddi_putl().  The  ddi_put64()  function   replaces   ddi_putll().   The
37       ddi_put16() function replaces ddi_putw().
38

PARAMETERS

40       handle      The  data  access handle returned from setup calls, such as
41                   ddi_regs_map_setup(9F).
42
43
44       value       The data to be written to the device.
45
46
47       dev_addr    Base device address.
48
49

DESCRIPTION

51       These routines generate a write of various sizes to the  mapped  memory
52       or  device  register.  The  ddi_put8(),  ddi_put16(),  ddi_put32(), and
53       ddi_put64() functions write 8 bits, 16 bits, 32 bits  and  64  bits  of
54       data, respectively, to the device address, dev_addr.
55
56
57       Each  individual  datum  will automatically be translated to maintain a
58       consistent view between the host and the device based  on  the  encoded
59       information  in  the  data  access  handle. The translation may involve
60       byte-swapping if the host and the device have incompatible endian char‐
61       acteristics.
62
63
64       For  certain  bus types, you can call these DDI functions from a  high-
65       interrupt context. These types include ISA and SBus  buses.   See  sys‐
66       bus(4),  isa(4),  and  sbus(4)  for  details. For the PCI bus, you can,
67       under certain conditions, call these DDI functions from  a  high-inter‐
68       rupt context. See pci(4).
69

CONTEXT

71       These functions can be called from user, kernel, or interrupt context.
72

ATTRIBUTES

74       See attributes(5) for descriptions of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
81       ├─────────────────────────────┼─────────────────────────────┤
82       │Interface Stability          │ddi_putb(),     ddi_putl(),  │
83       │                             │ddi_putll(), and ddi_putw()  
84       │                             │are   Obsolete  ddi_put8(),  │
85       │                             │ddi_put16(),   ddi_put32(),  │
86       │                             │ddi_put64() are Committed    │
87       └─────────────────────────────┴─────────────────────────────┘
88

SEE ALSO

90       ddi_get8(9F),       ddi_regs_map_free(9F),      ddi_regs_map_setup(9F),
91       ddi_rep_get8(9F), ddi_rep_put8(9F), ddi_device_acc_attr(9S)
92
93
94
95SunOS 5.11                        1 Nov 2005                      ddi_put8(9F)
Impressum