home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / dma_mapalloc.z / dma_mapalloc
Encoding:
Text File  |  2002-10-03  |  6.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ddddmmmmaaaa____mmmmaaaappppaaaalllllllloooocccc((((DDDD3333XXXX))))                                            ddddmmmmaaaa____mmmmaaaappppaaaalllllllloooocccc((((DDDD3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _dddd_mmmm_aaaa______mmmm_aaaa_pppp_aaaa_llll_llll_oooo_cccc - allocate a DMA map
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_""""
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_ssss_eeee_mmmm_aaaa_...._hhhh_""""
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_dddd_mmmm_aaaa_mmmm_aaaa_pppp_...._hhhh_""""
  15.  
  16.      _dddd_mmmm_aaaa_mmmm_aaaa_pppp______tttt _****_dddd_mmmm_aaaa______mmmm_aaaa_pppp_aaaa_llll_llll_oooo_cccc_((((_iiii_nnnn_tttt _t_y_p_e_,,,,_iiii_nnnn_tttt _a_d_a_p_t_e_r_,,,, _iiii_nnnn_tttt _n_u_m__p_a_g_e_s_,,,,_iiii_nnnn_tttt _f_l_a_g_s_))))_;;;;
  17.  
  18.    AAAArrrrgggguuuummmmeeeennnnttttssss
  19.      _t_y_p_e Must be either _D_M_A__A_3_2_V_M_E or _D_M_A__A_2_4_V_M_E depending on the transfer
  20.           desired.  (The _D_M_A__S_C_S_I type is reserved for exclusive use by the
  21.           SCSI host adapter driver.)
  22.  
  23.      _a_d_a_p_t_e_r
  24.           Specifies the I/O adapter to use for setting up the mapping This
  25.           should be set to the I/O bus adapter number to which the device
  26.           doing DMA is attached to.
  27.  
  28.      _n_u_m__p_a_g_e_s
  29.           Specifies the maximum number of mapping registers to allocate.
  30.           Mapping registers are responsible for translating the addresses that
  31.           appear on the I/O bus to a format that could be used internally
  32.           within a system.  On current Silicon Graphics systems, each mapping
  33.           register is capable of mapping a page of length 4096 bytes on the
  34.           I/O bus to a set of consecutive addresses on system memory.  This is
  35.           true regardless of the system page size.  The number of bytes each
  36.           mapping register is capable of mapping could change in future
  37.           systems.  In order to keep the device driver platform independent,
  38.           use of the macro _iiii_oooo______bbbb_tttt_oooo_cccc is recommended to calculate the _n_u_m__p_a_g_e_s
  39.           parameter for required length of mapping.  You need to allocate an
  40.           extra page for non-page aligned transfers-for example, a transfer of
  41.           4096 bytes starting at a non-aligned address actually requires two
  42.           mapping registers.
  43.  
  44.      _f_l_a_g_s
  45.           Reserved for future development.  For now, you should always set it
  46.           to 0.
  47.  
  48. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  49.      _dddd_mmmm_aaaa______mmmm_aaaa_pppp_aaaa_llll_llll_oooo_cccc allocates DMA mapping registers on multiprocessor models and
  50.      returns a pointer to a structure, of type _d_m_a_m_a_p__t, for later use by the
  51.      mapping routine _dddd_mmmm_aaaa______mmmm_aaaa_pppp.  You need DMA maps to access main memory through
  52.      VME A24 space.  In addition, because DMA maps give you the ability to
  53.      perform transfers to non-contiguous physical memory, you also want them
  54.      for A32 access.
  55.  
  56.      Use _dddd_mmmm_aaaa______mmmm_aaaa_pppp_ffff_rrrr_eeee_eeee to free the DMA mapping registers and other resources
  57.      associated with a given map.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddmmmmaaaa____mmmmaaaappppaaaalllllllloooocccc((((DDDD3333XXXX))))                                            ddddmmmmaaaa____mmmmaaaappppaaaalllllllloooocccc((((DDDD3333XXXX))))
  71.  
  72.  
  73.  
  74.      VME adapter number to which a device is attached is available at edtinit
  75.      time via _e__a_d_a_p field in _e_d_t structure.  It is also possible to get this
  76.      number by using the function _vvvv_mmmm_eeee______aaaa_dddd_aaaa_pppp_tttt_eeee_rrrr(D3X).
  77.  
  78.      This call can block (it calls _pppp_ssss_eeee_mmmm_aaaa) if no maps are available, so it must
  79.      never be called at interrupt time.
  80.  
  81.      On Challenge and Onyx systems, the maximum amount of address space that
  82.      can be mapped for DMA by A32 VME devices is 64MB by default.  This can be
  83.      changed by modifying the systune variable _nnnn_vvvv_mmmm_eeee_3333_2222______dddd_mmmm_aaaa.  The value of
  84.      _nnnn_vvvv_mmmm_eeee_3333_2222______dddd_mmmm_aaaa is the maximum amount of address space (in megabytes) that may
  85.      be allocated for A32 VME devices.  The default value for _nnnn_vvvv_mmmm_eeee_3333_2222______dddd_mmmm_aaaa is 64
  86.      (corresponding to the standard limit of 64MB of address space).
  87.      _nnnn_vvvv_mmmm_eeee_3333_2222______dddd_mmmm_aaaa must be a power of 2 and may not exceed 512 (meaning 512MB).
  88.      If a value larger than 512 is specified, it will be forced back down to
  89.      512.  If the value is not a power of 2, it will be rounded up to the next
  90.      higher power of 2 (but not to exceed 512).
  91.  
  92.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  93.      _dddd_mmmm_aaaa______mmmm_aaaa_pppp_aaaa_llll_llll_oooo_cccc returns a pointer to the DMA map structure on models that
  94.      support DMA maps.  On other models, _dddd_mmmm_aaaa______mmmm_aaaa_pppp_aaaa_llll_llll_oooo_cccc returns -1 to indicate
  95.      that DMA mapping is not possible on that model.
  96.  
  97.    SSSSeeeeeeee AAAAllllssssoooo
  98.      dma_map(D3X), dma_mapaddr(D3X), dma_mapfree(D3X), vme_adapter(D3X).
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.