Writing Device Drivers
  Suchtext Nur in diesem Buch

Interface Transition List

B

This appendix presents a list of DDI/DKI data access interface functions that have changed from Solaris 2.4 to Solaris 2.5. The Solaris 2.4 interfaces are maintained for binary and source compatibility. The appedix also presents data access functions new to Solaris 2.5. The functions are grouped as follows:

Data Access Methods

  • Device Access Attributes Structure
  • CPU Device Access
  • Device Access Functions
  • Common Device Access Functions
  • Other Device Access Functions

DMA Data Access

  • DMA Attributes Structure
  • DMA Memory Access
  • DMA Device Binding'

SCSI HBA DMA Management

Device Memory Mapping

  • Default Context Management
  • Custom Context Management

Open Boot PROM Device Properties

  • Property Access Functions

Data Access Methods

Device Access Attributes Structure

Table B-1
Solaris 2.4 InterfaceSolaris 2.5 Interface
--ddi_device_acc_attr(9S)

CPU Device Access

Table B-2
Solaris 2.4 InterfaceSolaris 2.5 Interface
ddi_map_regs(9F)ddi_regs_map_setup(9F)
ddi_unmap_regs(9F)ddi_regs_map_free(9F)
--pci_config_setup(9F)
--pci_config_teardown(9F)

Device Access Functions

Table B-3
Solaris 2.4 InterfaceSolaris 2.5 Interface
native processor load instructionpci_config_getb(9F)
native processor load instructionpci_config_getw(9F)
native processor load instructionpci_config_getl(9F)
native processor load instructionpci_config_getll(9F)
native processor store instructionpci_config_putb(9F)
native processor store instructionpci_config_utw(9F)
native processor store instructionpci_config_putl(9F)
native processor store instructionpci_config_putll(9F)
Table B-3
Solaris 2.4 InterfaceSolaris 2.5 Interface
inb(9F)ddi_io_getb(9F)
inw(9F)ddi_io_getw(9F)
inl(9F)ddi_io_getl(9F)
outb(9F)ddi_io_putb(9F)
outw(9F)ddi_io_putw(9F)
outl(9F)ddi_io_putl(9F)
repinsb(9F)ddi_io_rep_getb(9F)
repinsw(9F)ddi_io_rep_getw(9F)
repinsd(9F)ddi_io_rep_getl(9F)
repoutsb(9F)ddi_io_rep_putb(9F)
repoutsw(9F)ddi_io_rep_putw(9F)
repoutsd(9F)ddi_io_rep_putl(9F)
native processor load instructionddi_mem_getb(9F)
native processor load instructionddi_mem_getw(9F)
native processor load instructionddi_mem_getl(9F)
native processor load instructionddi_mem_getll(9F)
native processor store instructionddi_mem_putb(9F)
native processor store instructionddi_mem_putw(9F)
native processor store instructionddi_mem_putl(9F)
native processor store instructionddi_mem_putll(9F)
native processor load instructionsddi_mem_rep_getb(9F)
native processor load instructionsddi_mem_rep_getw(9F)
native processor load instructionsddi_mem_rep_getl(9F)
native processor load instructionsddi_mem_rep_getll(9F)
Table B-3
Solaris 2.4 InterfaceSolaris 2.5 Interface
native processor store instructionsddi_mem_rep_putb(9F)
native processor store instructionsddi_mem_rep_putw(9F)
native processor store instructionsddi_mem_rep_putl(9F)
native processor store instructionsddi_mem_rep_putll(9F)

Common Device Access Functions

Table B-4
Solaris 2.4 InterfaceSolaris 2.5 Interface
native processor load instructionddi_getb(9F)
native processor load instructionddi_getw(9F)
native processor load instructionddi_getl(9F)
native processor load instructionddi_getll(9F)
native processor store instructionddi_putb(9F)
native processor store instructionddi_putw(9F)
native processor store instructionddi_putl(9F)
native processor store instructionddi_putll(9F)
native processor load instructionsddi_rep_getb(9F)
native processor load instructionsddi_rep_getw(9F)
native processor load instructionsddi_rep_getl(9F)
native processor load instructionsddi_rep_getll(9F)
native processor store instructionsddi_rep_putb(9F)
native processor store instructionsddi_rep_putw(9F)
native processor store instructionsddi_rep_putl(9F)
native processor store instructionsddi_rep_putll(9F)

Other Device Access Functions

Table B-5
Solaris 2.4 InterfaceSolaris 2.5 Interface
native processor load and store instructionsddi_device_copy(9F)
native processor store instructionddi_device_zero(9F)

DMA Device Access

DMA Attributes Structure

Table B-6
Solaris 2.4 InterfaceSolaris 2.5 Interface
ddi_dma_lim(9S)ddi_dma_attr(9S)
ddi_dma_lim_sparc(9S)ddi_dma_attr(9S)
ddi_dma_lim_x86(9S)ddi_dma_attr(9S)
ddi_dmae_getlim(9F)ddi_dmae_getattr(9F)

DMA Memory Access

Table B-7
Solaris 2.4 InterfaceSolaris 2.5 Interface
ddi_iopb_alloc(9F)ddi_dma_mem_alloc(9F)
ddi_dma_alloc_handle(9F)
ddi_iopb_free(9F)ddi_dma_mem_free(9F)
ddi_dma_free_handle(9F)
ddi_mem_alloc(9F)ddi_dma_alloc_handle(9F)
ddi_dma_mem_alloc(9F)
ddi_mem_free(9F)ddi_dma_mem_free(9F)
ddi_dma_free_handle(9F)

DMA Device Binding

Table B-8
Solaris 2.4 InterfaceSolaris 2.5 Interface

ddi_dma_alloc_handle(9F)
ddi_dma_addr_setup(9F)ddi_dma_addr_bind_handle(9F)
ddi_dma_set_sbus64(9F)
ddi_dma_htoc(9F)ddi_dma_alloc_handle(9F)
ddi_dma_buf_setup(9F)

ddi_dma_htoc(9F)
ddi_dma_buf_bind_handle(9F)
ddi_dma_set_sbus64(9F)
ddi_dma_free(9F)ddi_dma_unbind_handle(9F)
ddi_dma_free_handle(9F)
ddi_dma_req(9S)--
ddi_dma_setup(9F)--
ddi_dma_nextwin(9F)ddi_dma_numwin(9F)
ddi_dma_nextwin(9F)

ddi_dma_nextseg(9F)
di_dma_getwin(9F)
ddi_dma_segtocookie(9F)ddi_dma_nextcookie(9F)

SCSI HBA DMA Management

Table B-9
Solaris 2.4 InterfaceSolaris 2.5 Interface
scsi_hba_attach(9F)scsi_hba_attach_setup(9F)

Device Memory Mapping

Device Context Management

Default Context Management

Table B-10
Solaris 2.4 InterfaceSolaris 2.5 Interface
ddi_segmap(9F)ddi_segmap_setup(9F)

Custom Context Management

Table B-11
Solaris 2.4 InterfaceSolaris 2.5 Interface
ddi_mapdev(9F)ddi_mapdev(9F)
ddi_mapdev_set_device_acc_attr(9F)

Open Boot PROM Device Properties

Property Access Functions

Table B-12
Solaris 2.4 InterfaceSolaris 2.5 Interface
ddi_getprop(9F)ddi_prop_exists(9F)
ddi_getprop(9F)ddi_prop_get_int(9F)
ddi_prop_create(9F)                  ddi_prop_update_byte_array(9F)
                                     ddi_prop_update_int(9F)
                                     ddi_prop_update_int_array(9F)
                                     ddi_prop_update_string(9F)
                                     ddi_prop_update_string_array(9F)

ddi_prop_modify(9F)                  ddi_prop_update_byte_array(9F)
                                     ddi_prop_update_int(9F)
                                     ddi_prop_update_int_array(9F)
                                     ddi_prop_update_string(9F)
                                     ddi_prop_update_string_array(9F)

ddi_getlongprop(9F)                  ddi_prop_lookup_byte_array(9F)
                                     ddi_prop_lookup_int_array(9F)
                                     ddi_prop_lookup_string(9F)
                                     ddi_prop_lookup_string_array(9F)

kmem.free(9F)--This function is only deprecated when used with property retrieval functions.ddi_prop_free(9F)
ddi_getlongprop_buf(9F)
--
ddi_prop_undefine(9F)
--
ddi_getproplen(9F)
--
ddi_prop_op(9F)
--