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

NAME

6       ddi_get8,   ddi_get16,   ddi_get32,   ddi_get64,   ddi_getb,  ddi_getw,
7       ddi_getl, ddi_getll - read data from 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       uint8_t ddi_get8(ddi_acc_handle_t handle, uint8_t *dev_addr);
17
18
19       uint16_t ddi_get16(ddi_acc_handle_t handle, uint16_t *dev_addr);
20
21
22       uint32_t ddi_get32(ddi_acc_handle_t handle, uint32_t *dev_addr);
23
24
25       uint64_t ddi_get64(ddi_acc_handle_t handle, uint64_t *dev_addr);
26
27

INTERFACE LEVEL

29       Solaris   DDI  specific  (Solaris  DDI).  The  ddi_getb(),  ddi_getl(),
30       ddi_getll(), and ddi_getw()  functions  are  obsolete.  The  ddi_get8()
31       function   replaces   ddi_getb().  The  ddi_get32()  function  replaces
32       ddi_getl().  The  ddi_get64()  function   replaces   ddi_getll().   The
33       ddi_get16() function replaces ddi_getw().
34

PARAMETERS

36       handle      The  data  access handle returned from setup calls, such as
37                   ddi_regs_map_setup(9F).
38
39
40       dev_addr    Base device address.
41
42

DESCRIPTION

44       The ddi_get8(), ddi_get16(),  ddi_get32(),  and  ddi_get64()  functions
45       read  8  bits, 16 bits, 32 bits and 64 bits of data, respectively, from
46       the device address, dev_addr.
47
48
49       Each individual datum will automatically be translated  to  maintain  a
50       consistent  view  between  the host and the device based on the encoded
51       information in the data access handle.   The  translation  may  involve
52       byte-swapping if the host and the device have incompatible endian char‐
53       acteristics.
54
55
56       For certain bus types, you can call these DDI functions  from  a  high-
57       interrupt  context.  These  types  include ISA and SBus buses. See sys‐
58       bus(4), isa(4), and sbus(4) for details. For  the  PCI  bus,  you  can,
59       under  certain  conditions, call these DDI functions from a high-inter‐
60       rupt context. See pci(4).
61

RETURN VALUES

63       These functions return the value read from the mapped address.
64

CONTEXT

66       These functions can be called from user, kernel, or interrupt context.
67

ATTRIBUTES

69       See attributes(5) for descriptions of the following attributes:
70
71
72
73
74       ┌─────────────────────────────┬─────────────────────────────┐
75       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
76       ├─────────────────────────────┼─────────────────────────────┤
77       │Interface Stability          │ddi_getb(),     ddi_getl(),  │
78       │                             │ddi_getll(), and ddi_getw()  
79       │                             │are  Obsolete;  ddi_get8(),  │
80       │                             │ddi_get16(),   ddi_get32(),  │
81       │                             │ddi_get64() are Committed    │
82       └─────────────────────────────┴─────────────────────────────┘
83

SEE ALSO

85       ddi_put8(9F),      ddi_regs_map_free(9F),       ddi_regs_map_setup(9F),
86       ddi_rep_get8(9F), ddi_rep_put8(9F)
87
88
89
90SunOS 5.11                        1 Nov 2005                      ddi_get8(9F)
Impressum