1004
man pages section 9: DDI and DKI Kernel Functions Part No: 816–5180–18 January 2013

man pages section 9 DDI and DKI Kernel Functions ... 721 nvpair_value_byte(9F ... 727 pci_config_setup(9F

  • Upload
    dinhtu

  • View
    235

  • Download
    1

Embed Size (px)

Citation preview

  • man pages section 9: DDI and DKI KernelFunctions

    Part No: 816518018January 2013

  • Copyright 1993, 2013, Oracle and/or its affiliates. All rights reserved.

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectualproperty laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software,unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice isapplicable:

    U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/ordocumentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation andagency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system,integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to theprograms. No other rights are granted to the U.S. Government.

    This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherentlydangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shallbe responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim anyliability for any damages caused by use of this software or hardware in dangerous applications.

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

    Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registeredtrademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced MicroDevices. UNIX is a registered trademark of The Open Group.

    This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation andits affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporationand its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

    Ce logiciel et la documentation qui laccompagne sont protgs par les lois sur la proprit intellectuelle. Ils sont concds sous licence et soumis des restrictionsdutilisation et de divulgation. Sauf disposition de votre contrat de licence ou de la loi, vous ne pouvez pas copier, reproduire, traduire, diffuser, modifier, breveter,transmettre, distribuer, exposer, excuter, publier ou afficher le logiciel, mme partiellement, sous quelque forme et par quelque procd que ce soit. Par ailleurs, il estinterdit de procder toute ingnierie inverse du logiciel, de le dsassembler ou de le dcompiler, except des fins dinteroprabilit avec des logiciels tiers ou tel queprescrit par la loi.

    Les informations fournies dans ce document sont susceptibles de modification sans pravis. Par ailleurs, Oracle Corporation ne garantit pas quelles soient exemptesderreurs et vous invite, le cas chant, lui en faire part par crit.

    Si ce logiciel, ou la documentation qui laccompagne, est concd sous licence au Gouvernement des Etats-Unis, ou toute entit qui dlivre la licence de ce logicielou lutilise pour le compte du Gouvernement des Etats-Unis, la notice suivante sapplique:

    U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/ordocumentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation andagency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system,integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to theprograms. No other rights are granted to the U.S. Government.

    Ce logiciel ou matriel a t dvelopp pour un usage gnral dans le cadre dapplications de gestion des informations. Ce logiciel ou matriel nest pas conu ni nestdestin tre utilis dans des applications risque, notamment dans des applications pouvant causer des dommages corporels. Si vous utilisez ce logiciel ou matrieldans le cadre dapplications dangereuses, il est de votre responsabilit de prendre toutes les mesures de secours, de sauvegarde, de redondance et autres mesuresncessaires son utilisation dans des conditions optimales de scurit. Oracle Corporation et ses affilis dclinent toute responsabilit quant aux dommages causspar lutilisation de ce logiciel ou matriel pour ce type dapplications.

    Oracle et Java sont des marques dposes dOracle Corporation et/ou de ses affilis. Tout autre nom mentionn peut correspondre des marques appartenant dautres propritaires quOracle.

    Intel et Intel Xeon sont des marques ou des marques dposes dIntel Corporation. Toutes les marques SPARC sont utilises sous licence et sont des marques ou desmarques dposes de SPARC International, Inc. AMD, Opteron, le logo AMD et le logo AMD Opteron sont des marques ou des marques dposes dAdvanced MicroDevices. UNIX est une marque dpose dThe Open Group.

    Ce logiciel ou matriel et la documentation qui laccompagne peuvent fournir des informations ou des liens donnant accs des contenus, des produits et des servicesmanant de tiers. Oracle Corporation et ses affilis dclinent toute responsabilit ou garantie expresse quant aux contenus, produits ou services manant de tiers. Enaucun cas, Oracle Corporation et ses affilis ne sauraient tre tenus pour responsables des pertes subies, des cots occasionns ou des dommages causs par laccs des contenus, produits ou services tiers, ou leur utilisation.

    130204@25097

  • Contents

    Preface ...................................................................................................................................................19

    Introduction .........................................................................................................................................23Intro(9F) ............................................................................................................................................. 24

    Kernel Functions for Drivers ..............................................................................................................53adjmsg(9F) ........................................................................................................................................... 54allocb(9F) ........................................................................................................................................... 55allocb_tmpl(9F) ................................................................................................................................. 58anocancel(9F) ..................................................................................................................................... 59aphysio(9F) ......................................................................................................................................... 60ASSERT(9F) ........................................................................................................................................... 62atomic_add(9F) ................................................................................................................................... 63atomic_and(9F) ................................................................................................................................... 65atomic_bits(9F) ................................................................................................................................. 67atomic_cas(9F) ................................................................................................................................... 68atomic_dec(9F) ................................................................................................................................... 69atomic_inc(9F) ................................................................................................................................... 71atomic_ops(9F) ................................................................................................................................... 73atomic_or(9F) ..................................................................................................................................... 74atomic_swap(9F) ................................................................................................................................. 76backq(9F) ............................................................................................................................................. 77bcanput(9F) ......................................................................................................................................... 78bcmp(9F) ................................................................................................................................................ 79bcopy(9F) ............................................................................................................................................. 80bioclone(9F) ....................................................................................................................................... 82biodone(9F) ......................................................................................................................................... 85

    3

  • bioerror(9F) ....................................................................................................................................... 87biofini(9F) ......................................................................................................................................... 88bioinit(9F) ......................................................................................................................................... 89biomodified(9F) ................................................................................................................................. 90bioreset(9F) ....................................................................................................................................... 91biosize(9F) ......................................................................................................................................... 92biowait(9F) ......................................................................................................................................... 93bp_copyin(9F) ..................................................................................................................................... 94bp_copyout(9F) ................................................................................................................................... 95bp_mapin(9F) ....................................................................................................................................... 96bp_mapout(9F) ..................................................................................................................................... 97btop(9F) ................................................................................................................................................ 98btopr(9F) ............................................................................................................................................. 99bufcall(9F) ....................................................................................................................................... 100bzero(9F) ........................................................................................................................................... 103canput(9F) ......................................................................................................................................... 104canputnext(9F) ................................................................................................................................. 105clrbuf(9F) ......................................................................................................................................... 106cmn_err(9F) ....................................................................................................................................... 107condvar(9F) ....................................................................................................................................... 113copyb(9F) ........................................................................................................................................... 117copyin(9F) ......................................................................................................................................... 119copymsg(9F) ....................................................................................................................................... 121copyout(9F) ....................................................................................................................................... 123csx_AccessConfigurationRegister(9F) ..................................................................................... 125csx_ConvertSize(9F) ...................................................................................................................... 127csx_ConvertSpeed(9F) .................................................................................................................... 128csx_CS_DDI_Info(9F) ...................................................................................................................... 129csx_DeregisterClient(9F) ............................................................................................................ 131csx_DupHandle(9F) ........................................................................................................................... 132csx_Error2Text(9F) ........................................................................................................................ 134csx_Event2Text(9F) ........................................................................................................................ 135csx_FreeHandle(9F) ........................................................................................................................ 136csx_Get8(9F) ..................................................................................................................................... 137csx_GetFirstClient(9F) ................................................................................................................ 138csx_GetFirstTuple(9F) .................................................................................................................. 140

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 20134

  • csx_GetHandleOffset(9F) .............................................................................................................. 143csx_GetMappedAddr(9F) .................................................................................................................. 144csx_GetStatus(9F) ........................................................................................................................... 145csx_GetTupleData(9F) .................................................................................................................... 148csx_MakeDeviceNode(9F) ................................................................................................................ 150csx_MapLogSocket(9F) .................................................................................................................... 152csx_MapMemPage(9F) ........................................................................................................................ 153csx_ModifyConfiguration(9F) ..................................................................................................... 154csx_ModifyWindow(9F) .................................................................................................................... 157csx_Parse_CISTPL_BATTERY(9F) ................................................................................................... 159csx_Parse_CISTPL_BYTEORDER(9F) ............................................................................................... 161csx_Parse_CISTPL_CFTABLE_ENTRY(9F) ....................................................................................... 163csx_Parse_CISTPL_CONFIG(9F) ..................................................................................................... 168csx_Parse_CISTPL_DATE(9F) .......................................................................................................... 170csx_Parse_CISTPL_DEVICE(9F) ..................................................................................................... 171csx_Parse_CISTPL_DEVICEGEO(9F) ............................................................................................... 174csx_Parse_CISTPL_DEVICEGEO_A(9F) ........................................................................................... 176csx_Parse_CISTPL_FORMAT(9F) ..................................................................................................... 178csx_Parse_CISTPL_FUNCE(9F) ........................................................................................................ 180csx_Parse_CISTPL_FUNCID(9F) ..................................................................................................... 187csx_Parse_CISTPL_GEOMETRY(9F) ................................................................................................. 189csx_Parse_CISTPL_JEDEC_C(9F) ................................................................................................... 191csx_Parse_CISTPL_LINKTARGET(9F) ............................................................................................. 193csx_Parse_CISTPL_LONGLINK_A(9F) ............................................................................................. 195csx_Parse_CISTPL_LONGLINK_MFC(9F) ......................................................................................... 197csx_Parse_CISTPL_MANFID(9F) ..................................................................................................... 199csx_Parse_CISTPL_ORG(9F) ............................................................................................................ 200csx_Parse_CISTPL_SPCL(9F) .......................................................................................................... 201csx_Parse_CISTPL_SWIL(9F) .......................................................................................................... 203csx_Parse_CISTPL_VERS_1(9F) ..................................................................................................... 204csx_Parse_CISTPL_VERS_2(9F) ..................................................................................................... 205csx_ParseTuple(9F) ........................................................................................................................ 207csx_Put8(9F) ..................................................................................................................................... 209csx_RegisterClient(9F) ................................................................................................................ 210csx_ReleaseConfiguration(9F) ................................................................................................... 213csx_RepGet8(9F) ............................................................................................................................... 215

    Contents

    5

  • csx_RepPut8(9F) ............................................................................................................................... 217csx_RequestConfiguration(9F) ................................................................................................... 219csx_RequestIO(9F) ........................................................................................................................... 225csx_RequestIRQ(9F) ........................................................................................................................ 230csx_RequestSocketMask(9F) .......................................................................................................... 232csx_RequestWindow(9F) .................................................................................................................. 234csx_ResetFunction(9F) .................................................................................................................. 240csx_SetEventMask(9F) .................................................................................................................... 241csx_SetHandleOffset(9F) .............................................................................................................. 243csx_ValidateCIS(9F) ...................................................................................................................... 244datamsg(9F) ....................................................................................................................................... 245DB_BASE(9F) ....................................................................................................................................... 246ddi_add_event_handler(9F) .......................................................................................................... 247ddi_add_intr(9F) ............................................................................................................................. 249ddi_add_softintr(9F) .................................................................................................................... 252ddi_binding_name(9F) .................................................................................................................... 259ddi_btop(9F) ..................................................................................................................................... 260ddi_can_receive_sig(9F) .............................................................................................................. 261ddi_cb_register(9F) ...................................................................................................................... 262ddi_check_acc_handle(9F) ............................................................................................................ 273ddi_copyin(9F) ................................................................................................................................. 275ddi_copyout(9F) ............................................................................................................................... 278ddi_create_minor_node(9F) .......................................................................................................... 281ddi_cred(9F) ..................................................................................................................................... 283ddi_device_copy(9F) ...................................................................................................................... 285ddi_device_zero(9F) ...................................................................................................................... 287ddi_devid_compare(9F) .................................................................................................................. 288ddi_dev_is_sid(9F) ........................................................................................................................ 292ddi_dev_nintrs(9F) ........................................................................................................................ 293ddi_dev_nregs(9F) ........................................................................................................................... 294ddi_dev_regsize(9F) ...................................................................................................................... 295ddi_dev_report_fault(9F) ............................................................................................................ 296ddi_dma_addr_bind_handle(9F) ................................................................................................... 299ddi_dma_addr_setup(9F) ................................................................................................................ 303ddi_dma_alloc_handle(9F) ............................................................................................................ 305ddi_dma_buf_bind_handle(9F) ..................................................................................................... 307

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 20136

  • ddi_dma_buf_setup(9F) .................................................................................................................. 311ddi_dma_burstsizes(9F) ................................................................................................................ 313ddi_dma_coff(9F) ............................................................................................................................. 314ddi_dma_curwin(9F) ........................................................................................................................ 315ddi_dma_devalign(9F) .................................................................................................................... 316ddi_dmae(9F) ..................................................................................................................................... 317ddi_dma_free(9F) ............................................................................................................................. 321ddi_dma_free_handle(9F) .............................................................................................................. 322ddi_dma_get_attr(9F) .................................................................................................................... 323ddi_dma_getwin(9F) ........................................................................................................................ 324ddi_dma_htoc(9F) ............................................................................................................................. 326ddi_dma_mem_alloc(9F) .................................................................................................................. 327ddi_dma_mem_free(9F) .................................................................................................................... 330ddi_dma_movwin(9F) ........................................................................................................................ 331ddi_dma_nextcookie(9F) ................................................................................................................ 333ddi_dma_nextseg(9F) ...................................................................................................................... 335ddi_dma_nextwin(9F) ...................................................................................................................... 337ddi_dma_numwin(9F) ........................................................................................................................ 339ddi_dma_segtocookie(9F) .............................................................................................................. 340ddi_dma_set_sbus64(9F) ................................................................................................................ 342ddi_dma_setup(9F) ........................................................................................................................... 344ddi_dma_sync(9F) ............................................................................................................................. 346ddi_dma_unbind_handle(9F) .......................................................................................................... 348ddi_driver_major(9F) .................................................................................................................... 349ddi_driver_name(9F) ...................................................................................................................... 350ddi_enter_critical(9F) ................................................................................................................ 351ddi_ffs(9F) ....................................................................................................................................... 352ddi_fm_acc_err_clear(9F) ............................................................................................................ 353ddi_fm_acc_err_get(9F) ................................................................................................................ 354ddi_fm_ereport_post(9F) .............................................................................................................. 356ddi_fm_handler_register(9F) ..................................................................................................... 358ddi_fm_init(9F) ............................................................................................................................... 360ddi_fm_service_impact(9F) .......................................................................................................... 362ddi_get8(9F) ..................................................................................................................................... 363ddi_get_cred(9F) ............................................................................................................................. 365ddi_get_devstate(9F) .................................................................................................................... 366

    Contents

    7

  • ddi_get_driver_private(9F) ........................................................................................................ 368ddi_get_eventcookie(9F) .............................................................................................................. 369ddi_getiminor(9F) ........................................................................................................................... 370ddi_get_instance(9F) .................................................................................................................... 371ddi_get_kt_did(9F) ........................................................................................................................ 372ddi_get_lbolt(9F) ........................................................................................................................... 373ddi_get_parent(9F) ........................................................................................................................ 374ddi_get_pid(9F) ............................................................................................................................... 375ddi_get_time(9F) ............................................................................................................................. 376ddi_in_panic(9F) ............................................................................................................................. 377ddi_intr_add_handler(9F) ............................................................................................................ 378ddi_intr_add_softint(9F) ............................................................................................................ 380ddi_intr_alloc(9F) ........................................................................................................................ 387ddi_intr_dup_handler(9F) ............................................................................................................ 390ddi_intr_enable(9F) ...................................................................................................................... 395ddi_intr_get_cap(9F) .................................................................................................................... 398ddi_intr_get_hilevel_pri(9F) ................................................................................................... 400ddi_intr_get_nintrs(9F) .............................................................................................................. 402ddi_intr_get_pending(9F) ............................................................................................................ 404ddi_intr_get_pri(9F) .................................................................................................................... 406ddi_intr_get_supported_types(9F) ........................................................................................... 408ddi_intr_hilevel(9F) .................................................................................................................... 410ddi_intr_set_mask(9F) .................................................................................................................. 412ddi_intr_set_nreq(9F) .................................................................................................................. 414ddi_io_get8(9F) ............................................................................................................................... 416ddi_iomin(9F) ................................................................................................................................... 418ddi_iopb_alloc(9F) ........................................................................................................................ 419ddi_io_put8(9F) ............................................................................................................................... 421ddi_io_rep_get8(9F) ...................................................................................................................... 423ddi_io_rep_put8(9F) ...................................................................................................................... 425ddi_log_sysevent(9F) .................................................................................................................... 427ddi_map_regs(9F) ............................................................................................................................. 431ddi_mem_alloc(9F) ........................................................................................................................... 433ddi_mem_get8(9F) ............................................................................................................................. 435ddi_mem_put8(9F) ............................................................................................................................. 437ddi_mem_rep_get8(9F) .................................................................................................................... 439

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 20138

  • ddi_mem_rep_put8(9F) .................................................................................................................... 441ddi_mmap_get_model(9F) ................................................................................................................ 443ddi_model_convert_from(9F) ........................................................................................................ 445ddi_node_name(9F) ........................................................................................................................... 447ddi_no_info(9F) ............................................................................................................................... 448ddi_peek(9F) ..................................................................................................................................... 449ddi_periodic_add(9F) .................................................................................................................... 451ddi_periodic_delete(9F) .............................................................................................................. 454ddi_poke(9F) ..................................................................................................................................... 456ddi_prop_create(9F) ...................................................................................................................... 458ddi_prop_exists(9F) ...................................................................................................................... 463ddi_prop_get_int(9F) .................................................................................................................... 465ddi_prop_lookup(9F) ...................................................................................................................... 467ddi_prop_op(9F) ............................................................................................................................... 472ddi_prop_update(9F) ...................................................................................................................... 476ddi_put8(9F) ..................................................................................................................................... 480ddi_regs_map_free(9F) .................................................................................................................. 482ddi_regs_map_setup(9F) ................................................................................................................ 483ddi_remove_event_handler(9F) ................................................................................................... 485ddi_remove_minor_node(9F) .......................................................................................................... 486ddi_removing_power(9F) ................................................................................................................ 487ddi_rep_get8(9F) ............................................................................................................................. 489ddi_report_dev(9F) ........................................................................................................................ 491ddi_rep_put8(9F) ............................................................................................................................. 492ddi_root_node(9F) ........................................................................................................................... 494ddi_segmap(9F) ................................................................................................................................. 495ddi_slaveonly(9F) ........................................................................................................................... 498ddi_soft_state(9F) ........................................................................................................................ 499ddi_strtol(9F) ................................................................................................................................. 504ddi_strtoll(9F) ............................................................................................................................... 506ddi_strtoul(9F) ............................................................................................................................... 508ddi_umem_alloc(9F) ........................................................................................................................ 510ddi_umem_iosetup(9F) .................................................................................................................... 512ddi_umem_lock(9F) ........................................................................................................................... 514delay(9F) ........................................................................................................................................... 516devmap_default_access(9F) .......................................................................................................... 518

    Contents

    9

  • devmap_devmem_setup(9F) .............................................................................................................. 521devmap_do_ctxmgt(9F) .................................................................................................................... 524devmap_set_ctx_timeout(9F) ........................................................................................................ 527devmap_setup(9F) ............................................................................................................................. 528devmap_unload(9F) ........................................................................................................................... 530disksort(9F) ..................................................................................................................................... 532dlbindack(9F) ................................................................................................................................... 533drv_getparm(9F) ............................................................................................................................... 535drv_hztousec(9F) ............................................................................................................................. 537drv_priv(9F) ..................................................................................................................................... 538drv_usectohz(9F) ............................................................................................................................. 539drv_usecwait(9F) ............................................................................................................................. 540dupb(9F) .............................................................................................................................................. 541dupmsg(9F) ......................................................................................................................................... 545enableok(9F) ..................................................................................................................................... 546esballoc(9F) ..................................................................................................................................... 547esbbcall(9F) ..................................................................................................................................... 549flushband(9F) ................................................................................................................................... 550flushq(9F) ......................................................................................................................................... 551freeb(9F) ........................................................................................................................................... 553freemsg(9F) ....................................................................................................................................... 554freerbuf(9F) ..................................................................................................................................... 555freezestr(9F) ................................................................................................................................... 556geterror(9F) ..................................................................................................................................... 557gethrtime(9F) ................................................................................................................................... 558getmajor(9F) ..................................................................................................................................... 559getminor(9F) ..................................................................................................................................... 560get_pktiopb(9F) ............................................................................................................................... 561getq(9F) .............................................................................................................................................. 563getrbuf(9F) ....................................................................................................................................... 564gld(9F) ................................................................................................................................................ 565hat_getkpfnum(9F) ........................................................................................................................... 568hook_alloc(9F) ................................................................................................................................. 569hook_free(9F) ................................................................................................................................... 570id32_alloc(9F) ................................................................................................................................. 571inb(9F) ................................................................................................................................................ 573

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 201310

  • insq(9F) .............................................................................................................................................. 575IOC_CONVERT_FROM(9F) .................................................................................................................... 577kmem_alloc(9F) ................................................................................................................................. 578kmem_cache_create(9F) .................................................................................................................. 580kstat_create(9F) ............................................................................................................................. 585kstat_delete(9F) ............................................................................................................................. 587kstat_install(9F) ........................................................................................................................... 588kstat_named_init(9F) .................................................................................................................... 589kstat_queue(9F) ............................................................................................................................... 590ldi_add_event_handler(9F) .......................................................................................................... 592ldi_aread(9F) ................................................................................................................................... 594ldi_devmap(9F) ................................................................................................................................. 595ldi_dump(9F) ..................................................................................................................................... 596ldi_get_dev(9F) ............................................................................................................................... 597ldi_get_eventcookie(9F) .............................................................................................................. 598ldi_get_size(9F) ............................................................................................................................. 599ldi_ident_from_dev(9F) ................................................................................................................ 600ldi_ioctl(9F) ................................................................................................................................... 601ldi_open_by_dev(9F) ...................................................................................................................... 603ldi_poll(9F) ..................................................................................................................................... 606ldi_prop_exists(9F) ...................................................................................................................... 608ldi_prop_get_int(9F) .................................................................................................................... 610ldi_prop_lookup_int_array(9F) ................................................................................................. 612ldi_putmsg(9F) ................................................................................................................................. 617ldi_read(9F) ..................................................................................................................................... 618ldi_remove_event_handler(9F) ................................................................................................... 619ldi_strategy(9F) ............................................................................................................................. 620linkb(9F) ........................................................................................................................................... 621mac(9F) ................................................................................................................................................ 622mac_hcksum_get(9F) ........................................................................................................................ 625mac_lso_get(9F) ............................................................................................................................... 627mac_prop_info_set_perm(9F) ........................................................................................................ 628makecom(9F) ....................................................................................................................................... 630makedevice(9F) ................................................................................................................................. 632max(9F) ................................................................................................................................................ 633MBLKHEAD(9F) ..................................................................................................................................... 634

    Contents

    11

  • mcopyin(9F) ....................................................................................................................................... 636mcopymsg(9F) ..................................................................................................................................... 637mcopyout(9F) ..................................................................................................................................... 638membar_ops(9F) ................................................................................................................................. 639memchr(9F) ......................................................................................................................................... 641merror(9F) ......................................................................................................................................... 643mexchange(9F) ................................................................................................................................... 644min(9F) ................................................................................................................................................ 645mioc2ack(9F) ..................................................................................................................................... 646miocack(9F) ....................................................................................................................................... 647miocnak(9F) ....................................................................................................................................... 648miocpullup(9F) ................................................................................................................................. 649mkiocb(9F) ......................................................................................................................................... 650mod_install(9F) ............................................................................................................................... 653msgdsize(9F) ..................................................................................................................................... 654msgpullup(9F) ................................................................................................................................... 655msgsize(9F) ....................................................................................................................................... 656mt-streams(9F) ................................................................................................................................. 657mutex(9F) ........................................................................................................................................... 659net_event_notify_register(9F) ................................................................................................. 662net_getifname(9F) ........................................................................................................................... 664net_getlifaddr(9F) ........................................................................................................................ 665net_getmtu(9F) ................................................................................................................................. 667net_getnetid(9F) ............................................................................................................................. 668net_getpmtuenabled(9F) ................................................................................................................ 669net_hook_register(9F) .................................................................................................................. 670net_hook_unregister(9F) .............................................................................................................. 672netinfo(9F) ....................................................................................................................................... 673net_inject(9F) ................................................................................................................................. 674net_inject_alloc(9F) .................................................................................................................... 676net_inject_free(9F) ...................................................................................................................... 677net_instance_alloc(9F) ................................................................................................................ 678net_instance_free(9F) .................................................................................................................. 679net_instance_notify_register(9F) ........................................................................................... 680net_instance_register(9F) .......................................................................................................... 682net_instance_unregister(9F) ..................................................................................................... 683

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 201312

  • net_ispartialchecksum(9F) .......................................................................................................... 684net_isvalidchecksum(9F) .............................................................................................................. 685net_kstat_create(9F) .................................................................................................................... 686net_kstat_delete(9F) .................................................................................................................... 688net_lifgetnext(9F) ........................................................................................................................ 689net_netidtozonid(9F) .................................................................................................................... 691net_phygetnext(9F) ........................................................................................................................ 692net_phylookup(9F) ........................................................................................................................... 694net_protocol_lookup(9F) .............................................................................................................. 695net_protocol_notify_register(9F) ........................................................................................... 696net_protocol_release(9F) ............................................................................................................ 698net_protocol_walk(9F) .................................................................................................................. 699net_routeto(9F) ............................................................................................................................... 700net_zoneidtonetid(9F) .................................................................................................................. 701nochpoll(9F) ..................................................................................................................................... 702nodev(9F) ........................................................................................................................................... 703noenable(9F) ..................................................................................................................................... 704nulldev(9F) ....................................................................................................................................... 705nvlist_add_boolean(9F) ................................................................................................................ 706nvlist_alloc(9F) ............................................................................................................................. 709nvlist_lookup_boolean(9F) .......................................................................................................... 715nvlist_next_nvpair(9F) ................................................................................................................ 719nvlist_remove(9F) ........................................................................................................................... 721nvpair_value_byte(9F) .................................................................................................................. 722OTHERQ(9F) ......................................................................................................................................... 724outb(9F) .............................................................................................................................................. 725pci_config_get8(9F) ...................................................................................................................... 727pci_config_setup(9F) .................................................................................................................... 729pci_ereport_setup(9F) .................................................................................................................. 730pci_param_free(9F) ........................................................................................................................ 733pci_param_get(9F) ........................................................................................................................... 734pci_param_get_ioctl(9F) .............................................................................................................. 736pci_plist_get(9F) ........................................................................................................................... 737pci_plist_getvf(9F) ...................................................................................................................... 738pci_plist_lookup(9F) .................................................................................................................... 739pci_report_pmcap(9F) .................................................................................................................... 741

    Contents

    13

  • pci_save_config_regs(9F) ............................................................................................................ 743pciv_send(9F) ................................................................................................................................... 745pciv_vf_config(9F) ........................................................................................................................ 747physio(9F) ......................................................................................................................................... 749pm_busy_component(9F) .................................................................................................................. 751pm_power_has_changed(9F) ............................................................................................................ 753pm_raise_power(9F) ........................................................................................................................ 756pm_trans_check(9F) ........................................................................................................................ 760pollwakeup(9F) ................................................................................................................................. 762priv_getbyname(9F) ........................................................................................................................ 763priv_policy(9F) ............................................................................................................................... 765proc_signal(9F) ............................................................................................................................... 767ptob(9F) .............................................................................................................................................. 769pullupmsg(9F) ................................................................................................................................... 770put(9F) ................................................................................................................................................ 772putbq(9F) ........................................................................................................................................... 773putctl1(9F) ....................................................................................................................................... 774putctl(9F) ......................................................................................................................................... 775putnext(9F) ....................................................................................................................................... 777putnextctl1(9F) ............................................................................................................................... 778putnextctl(9F) ................................................................................................................................. 779putq(9F) .............................................................................................................................................. 781qassociate(9F) ................................................................................................................................. 782qbufcall(9F) ..................................................................................................................................... 784qenable(9F) ....................................................................................................................................... 786qprocson(9F) ..................................................................................................................................... 787qreply(9F) ......................................................................................................................................... 788qsize(9F) ........................................................................................................................................... 790qtimeout(9F) ..................................................................................................................................... 791qunbufcall(9F) ................................................................................................................................. 792quntimeout(9F) ................................................................................................................................. 793qwait(9F) ........................................................................................................................................... 794qwriter(9F) ....................................................................................................................................... 796RD(9F) .................................................................................................................................................. 797rmalloc(9F) ....................................................................................................................................... 798rmallocmap(9F) ................................................................................................................................. 801

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 201314

  • rmalloc_wait(9F) ............................................................................................................................. 803rmfree(9F) ......................................................................................................................................... 804rmvb(9F) .............................................................................................................................................. 805rmvq(9F) .............................................................................................................................................. 807rwlock(9F) ......................................................................................................................................... 809SAMESTR(9F) ....................................................................................................................................... 812scsi_abort(9F) ................................................................................................................................. 813scsi_alloc_consistent_buf(9F) ................................................................................................. 814scsi_cname(9F) ................................................................................................................................. 816scsi_destroy_pkt(9F) .................................................................................................................... 818scsi_dmaget(9F) ............................................................................................................................... 819scsi_errmsg(9F) ............................................................................................................................... 821scsi_ext_sense_fields(9F) .......................................................................................................... 824scsi_find_sense_descr(9F) .......................................................................................................... 826scsi_free_consistent_buf(9F) ................................................................................................... 827scsi_get_device_type_scsi_options(9F) ................................................................................ 828scsi_hba_attach_setup(9F) .......................................................................................................... 830scsi_hba_init(9F) ........................................................................................................................... 833scsi_hba_lookup_capstr(9F) ........................................................................................................ 834scsi_hba_pkt_alloc(9F) ................................................................................................................ 836scsi_hba_pkt_comp(9F) .................................................................................................................. 838scsi_hba_probe(9F) ........................................................................................................................ 839scsi_hba_tran_alloc(9F) .............................................................................................................. 840scsi_ifgetcap(9F) ........................................................................................................................... 841scsi_init_pkt(9F) ........................................................................................................................... 845scsi_log(9F) ..................................................................................................................................... 849scsi_pktalloc(9F) ........................................................................................................................... 850scsi_poll(9F) ................................................................................................................................... 852scsi_probe(9F) ................................................................................................................................. 853scsi_reset(9F) ................................................................................................................................. 855scsi_reset_notify(9F) .................................................................................................................. 857scsi_sense_key(9F) ........................................................................................................................ 858scsi_setup_cdb(9F) ........................................................................................................................ 859scsi_slave(9F) ................................................................................................................................. 860scsi_sync_pkt(9F) ........................................................................................................................... 862scsi_transport(9F) ........................................................................................................................ 863

    Contents

    15

  • scsi_unprobe(9F) ............................................................................................................................. 864scsi_validate_sense(9F) .............................................................................................................. 865scsi_vu_errmsg(9F) ........................................................................................................................ 866semaphore(9F) ................................................................................................................................... 869sprintf(9F) ....................................................................................................................................... 871stoi(9F) .............................................................................................................................................. 873strchr(9F) ......................................................................................................................................... 874strcmp(9F) ......................................................................................................................................... 875strcpy(9F) ......................................................................................................................................... 876strlen(9F) ......................................................................................................................................... 878strlog(9F) ......................................................................................................................................... 879strqget(9F) ....................................................................................................................................... 881strqset(9F) ....................................................................................................................................... 882STRUCT_DECL(9F) ............................................................................................................................... 883swab(9F) .............................................................................................................................................. 888taskq(9F) ........................................................................................................................................... 889testb(9F) ........................................................................................................................................... 892timeout(9F) ....................................................................................................................................... 894u8_strcmp(9F) ................................................................................................................................... 896u8_textprep_str(9F) ...................................................................................................................... 900u8_validate(9F) ............................................................................................................................... 904uconv_u16tou32(9F) ........................................................................................................................ 908uiomove(9F) ....................................................................................................................................... 914unbufcall(9F) ................................................................................................................................... 916unlinkb(9F) ....................................................................................................................................... 917untimeout(9F) ................................................................................................................................... 918ureadc(9F) ......................................................................................................................................... 920usb_alloc_request(9F) .................................................................................................................. 921usb_client_attach(9F) .................................................................................................................. 924usb_clr_feature(9F) ...................................................................................................................... 927usb_create_pm_components(9F) ................................................................................................... 929usb_get_addr(9F) ............................................................................................................................. 931usb_get_alt_if(9F) ........................................................................................................................ 932usb_get_cfg(9F) ............................................................................................................................... 936usb_get_current_frame_number(9F) ........................................................................................... 939usb_get_dev_data(9F) .................................................................................................................... 941

    Contents

    man pages section 9: DDI and DKI Kernel Functions January 201316

  • usb_get_max_pkts_per_isoc_request(9F) ................................................................................ 945usb_get_status(9F) ........................................................................................................................ 947usb_get_string_descr(9F) ............................................................................................................ 949usb_handle_remote_wakeup(9F) ................................................................................................... 951usb_lookup_ep_data(9F) ................................................................................................................ 952usb_parse_data(9F) ........................................................................................................................ 954usb_pipe_bulk_xfer(9F) ................................................................................................................ 956usb_pipe_close(9F) ........................................................................................................................ 959usb_pipe_ctrl_xfer(9F) ................................................................................................................ 962usb_pipe_drain_reqs(9F) .............................................................................................................. 968usb_pipe_get_max_bulk_transfer_size(9F) ............................................................................ 971usb_pipe_get_state(9F) ................................................................................................................ 973usb_pipe_intr_xfer(9F) ................................................................................................................ 975usb_pipe_isoc_xfer(9F) ................................................................................................................ 980usb_pipe_open(9F) ........................................................................................................................... 986usb_pipe_reset(9F) ........................................................................................................................ 990usb_pipe_set_private(9F) ............................................................................................................ 993usb_register_hotplug_cbs(9F) ................................................................................................... 995uwritec(9F) ....................................................................................................................................... 997va_arg(9F) ......................................................................................................................................... 998vsprintf(9F) ................................................................................................................................... 1000WR(9F) ................................................................................................................................................ 1003

    Contents

    17

  • 18

  • Preface

    Both novice users and those familar with the SunOS operating system can use online man pagesto obtain information about the system and its features. A man page is intended to answerconcisely the question What does it do? The man pages in general comprise a referencemanual. They are not intended to be a tutorial.

    OverviewThe following contains a brief description of each man page section and the information itreferences: Section 1 describes, in alphabetical order, commands available with the operating system. Section 1M describes, in alphabetical order, commands that are used chiefly for system

    maintenance and administration purposes. Section 2 describes all of the system calls. Most of these calls have one or more error returns.

    An error condition is indicated by an otherwise impossible returned value. Section 3 describes functions found in various libraries, other than those functions that

    directly invoke UNIX system primitives, which are described in Section 2. Section 4 outlines the formats of various files. The C structure declarations for the file

    formats are given where applicable. Section 5 contains miscellaneous documentation such as character-set tables. Section 6 contains available games and demos. Section 7 describes various special files that refer to specific hardware peripherals and device

    drivers. STREAMS software drivers, modules and the STREAMS-generic set of system callsare also described.

    Section 9 provides reference information needed to write device drivers in the kernelenvironment. It describes two device driver interface specifications: the Device DriverInterface (DDI) and the Driver/Kernel Interface (DKI).

    Section 9E describes the DDI/DKI, DDI-only, and DKI-only entry-point routines adeveloper can include in a device driver.

    Section 9F describes the kernel functions available for use by device drivers. Section 9S describes the data structures used by drivers to share information between the

    driver and the kernel.

    19

  • Below is a generic format for man pages. The man pages of each manual section generallyfollow this order, but include only needed headings. For example, if there are no bugs to report,there is no BUGS section. See the intro pages for more information and detail about eachsection, and man(1) for more information about man pages in general.

    NAME This section gives the names of the commands or functionsdocumented, followed by a brief description of what theydo.

    SYNOPSIS This section shows the syntax of commands or functions.When a command or file does not exist in the standardpath, its full path name is shown. Options and argumentsare alphabetized, with single letter arguments first, andoptions with arguments next, unless a different argumentorder is required.

    The following special characters are used in this section:

    [ ] Brackets. The option or argument enclosed inthese brackets is optional. If the brackets areomitted, the argument must be specified.

    . . . Ellipses. Several values can be provided for theprevious argument, or the previous argumentcan be specified multiple times, for example,"filename . . ." .

    | Separator. Only one of the argumentsseparated by this character can be specified at atime.

    { } Braces. The options and/or argumentsenclosed within braces are interdependent,such that everything enclosed must be treatedas a unit.

    PROTOCOL This section occurs only in subsection 3R to indicate theprotocol description file.

    DESCRIPTION This section defines the functionality and behavior of theservice. Thus it describes concisely what the commanddoes. It does not discuss OPTIONS or cite EXAMPLES.Interactive commands, subcommands, requests, macros,and functions are described under USAGE.

    IOCTL This section appears on pages in Section 7 only. Only thedevice class that supplies appropriate parameters to theioctl(2) system call is called ioctl and generates its own

    Preface

    man pages section 9: DDI and DKI Kernel Functions January 201320

    http://www.oracle.com/pls/topic/lookup?ctx=E26505&id=REFMAN1man-1http://www.oracle.com/pls/topic/lookup?ctx=E26505&id=REFMAN2ioctl-2

  • heading. ioctl calls for a specific device are listedalphabetically (on the man page for that specific device).ioctl calls are used for a particular class of devices all ofwhich have an io ending, such as mtio(7I).

    OPTIONS This secton lists the command options with a concisesummary of what each option does. The options are listedliterally and in the order they appear in the SYNOPSISsection. Possible arguments to options are discussed underthe option, and where appropriate, default values aresupplied.

    OPERANDS This section lists the command operands and describeshow they affect the actions of the command.

    OUTPUT This section describes the output standard output,standard error, or output files generated by thecommand.

    RETURN VALUES If the man page documents functions that return values,this section lists these values and describes the conditionsunder which they are returned. If a function can returnonly constant values, such as 0 or 1, these values are listedin tagged paragraphs. Otherwise, a single paragraphdescribes the return values of each function. Functionsdeclared void do not return values, so they are notdiscussed in RETURN VALUES.

    ERRORS On failure, most functions place an error code in the globalvariable errno indicating why they failed. This section listsalphabetically all error codes a function can generate anddescribes the conditions that cause each error. When morethan one condition can cause the same error, eachcondition is described in a separate paragraph under theerror code.

    USAGE This section lists special rules, features, and commandsthat require in-depth explanations. The subsections listedhere are used to explain built-in functionality:

    CommandsModifiersVariablesExpressionsInput Grammar

    Preface

    21

    http://www.oracle.com/pls/topic/lookup?ctx=E26505&id=REFMAN7mtio-7i

  • EXAMPLES This section provides examples of usage or of how to use acommand or function. Wherever possible a completeexample including command-line entry and machineresponse is shown. Whenever an example is given, theprompt is shown as example%, or if the user must besuperuser, example#. Examples are followed byexplanations, variable substitution rules, or returnedvalues. Most examples illustrate concepts from theSYNOPSIS, DESCRIPTION, OPTIONS, and USAGEsections.

    ENVIRONMENT VARIABLES This section lists any environment variables that thecommand or function affects, followed by a briefdescription of the effect.

    EXIT STATUS This section lists the values the command returns to thecalling program or shell and the conditions that cause thesevalues to be returned. Usually, zero is returned forsuccessful completion, and values other than zero forvarious error conditions.

    FILES This section lists all file names referred to by the man page,files of interest, and files created or required by commands.Each is followed by a descriptive summary or explanation.

    ATTRIBUTES This section lists characteristics of commands, utilities,and device drivers by defining the attribute type and itscorresponding value. See attributes(5) for moreinformation.

    SEE ALSO This section lists references to other man pages, in-housedocumentation, and outside publications.

    DIAGNOSTICS Th