Supporting 31 bit dma_attr_addr_hi address

I am writing a Solaris Sparc 10 device driver for a pci express device. The driver has to pass a dma bus address of 31 bit to the device as the device do not support the full 32 bit address space. However I am not be able to specify the dma_attr_addr_hi with the address mask 0x7FFFFFFF and get the DDI_DMA_NOMAPPING error. Below is the code:
ddi_dma_attr_t           dmaattr; /* used to allocate the handle */
       ddi_device_acc_attr_t devattr;
       ddi_dma_cookie_t      dmacookie;
       size_t                        real_length = 0;
       uint_t                         cntcookie   = 0;
       dev_info_t           *dip           = tag;
       int                      rc             = 0;
       caddr_t               kaddrp      = NULL;
       unsigned int          bytecount   = size
       dmaattr.dma_attr_version        = DMA_ATTR_V0; 
       dmaattr.dma_attr_addr_lo        = 0x0;         
       dmaattr.dma_attr_addr_hi        = 0x07fffffff; /* 31 bit mask  */ 
       dmaattr.dma_attr_count_max   = 0x0ffffffff;
       dmaattr.dma_attr_align            = 1;          
       dmaattr.dma_attr_burstsizes    = 0x01;        
       dmaattr.dma_attr_minxfer        = 0x01;        
       dmaattr.dma_attr_maxxfer       = 0x0ffffffff;
       dmaattr.dma_attr_seg             = 0x0ffffffff;
       dmaattr.dma_attr_sgllen          = 1;           
       dmaattr.dma_attr_granular       = 1;           
       dmaattr.dma_attr_flags            = 0;           
       rc = ddi_dma_alloc_handle(
        luna_p->tag,
        &dmaattr,
        DDI_DMA_SLEEP,
        NULL,
           &(dma_addr->m_handle));
       if (rc !=DDI_SUCCESS)
           switch (rc)
              case DDI_DMA_BADATTR:
                vip_log(NULL,
                        VIP_ERR,
                        "ddi_dma_alloc_handle failed (DDI_DMA_BADATTR)");
                break;
              case DDI_DMA_NORESOURCES:
                vip_log(NULL,
                 VIP_ERR,
                   "ddi_dma_alloc_handle failed (DDI_DMA_NORESOURCES)");
                break;
              default:
                vip_log(NULL,
               VIP_ERR,
               "ddi_dma_alloc_handle failed (%d)", rc);
               break;
           return NULL; /* handle allocation failed and stop the allocation process */
       devattr.devacc_attr_version       = DDI_DEVICE_ATTR_V0;  
       devattr.devacc_attr_endian_flags  = DDI_NEVERSWAP_ACC;
       devattr.devacc_attr_dataorder     = DDI_STRICTORDER_ACC;  
       rc = ddi_dma_mem_alloc(
                dma_addr->m_handle,
                bytecount,
                &devattr,
                DDI_DMA_CONSISTENT,
                DDI_DMA_SLEEP,
                NULL,
                &kaddrp,
                &real_length,
                &(dma_addr->m_acchandle)
       if (rc != DDI_SUCCESS)
          vip_log(NULL,
                  VIP_ERR,
                  "ddi_dma_mem_alloc failed");
          return NULL;
       else
#ifdef DEBUG
          vip_log(NULL,
                  VIP_DBG,
                  "ddi_dma_mem_alloc request length= %d, real length= %d",
                  bytecount,
                  real_length);
#endif
       rc = ddi_dma_addr_bind_handle(
                dma_addr->m_handle,
                NULL,
                kaddrp,
                real_length,
                DDI_DMA_RDWR | DDI_DMA_CONSISTENT, /* Note: all dma bufs are read/write */
                DDI_DMA_SLEEP,
                NULL,
                &dmacookie,
                &cntcookie
#ifdef DEBUG
       /* vip_log(NULL, VIP_DBG, "_AllocateDMABuffer: the return value is %x",rc); */
#endif
       if (rc != DDI_DMA_MAPPED)
          switch (rc)
               case DDI_DMA_PARTIAL_MAP:
                    vip_log(NULL,
                   VIP_ERR,
                   "ddi_dma_addr_bind_handle failed (DDI_DMA_PARTIAL_MAP)");
                    break;
               case DDI_DMA_INUSE:
                    vip_log(NULL,
                   VIP_ERR,
                   "ddi_dma_addr_bind_handle failed (DDI_DMA_INUSE)");
                     break;
               case DDI_DMA_NORESOURCES:
                    vip_log(NULL,
                   VIP_ERR,
                   "ddi_dma_addr_bind_handle failed (DDI_DMA_NORESOURCES)");
                    break;
               case DDI_DMA_NOMAPPING:
                    vip_log(NULL,
                   VIP_ERR,
                       "ddi_dma_addr_bind_handle failed (DDI_DMA_NOMAPPING)");
                    break;
               case DDI_DMA_TOOBIG:
                    vip_log(NULL,
                   VIP_ERR,
                   "ddi_dma_addr_bind_handle failed (DDI_DMA_TOOBIG)");
                     break;
               default:
                    vip_log(NULL,
                   VIP_ERR,
                   "ddi_dma_addr_bind_handle failed (%d)", rc);
                    break;
          return NULL;
       if (cntcookie!=1)
          vip_log(NULL,
            VIP_ERR,
            "ddi_dma_addr_bind_handle returned %d cookies (!=1)", cntcookie);
          return NULL;
       bzero(kaddrp, bytecount);
       dma_addr->m_address      = dmacookie.dmac_address;
       dma_addr->m_kaddrp       = kaddrp;
       dma_addr->m_nbytes_req   = bytecount;
       dma_addr->m_nbytes_real  = real_length;
/* #ifdef DEBUG */
#if 0
       vip_log(NULL, VIP_DBG, "_AllocateDMABuffer: m_address = 0x%8x",dma_addr->m_address);
       vip_log(NULL, VIP_DBG, "_AllocateDMABuffer: m_kaddrp  = 0x%8x",dma_addr->m_kaddrp);
       vip_log(NULL, VIP_DBG, "_AllocateDMABuffer: dma_addr  = 0x%8x",dma_addr);
       vip_log(NULL, VIP_DBG, "_AllocateDMABuffer: *dma_addr  = 0x%8x",*dma_addr);
#endif
       return kaddrp; /* kernel virtual address */
}

Sorry I click wrong button and post the in-completed message and I am re-doing the work again.
I am writing a Solaris Sparc 10 device driver for a pci express device. The driver has to pass a dma bus address of 31 bit to the device as the device do not support the full 32 bit address space. However I am not be able to specify the dma_attr_addr_hi with the address mask 0x7FFFFFFF and get the DDI_DMA_NOMAPPING error. Below is the code:
ddi_dma_attr_t dmaattr; /* used to allocate the handle */
ddi_device_acc_attr_t devattr;
ddi_dma_cookie_t dmacookie;
size_t real_length = 0;
uint_t cntcookie = 0;
dev_info_t *dip           = tag;
int rc = 0;
caddr_t kaddrp = NULL;
unsigned int bytecount = size
dmaattr.dma_attr_version = DMA_ATTR_V0;
dmaattr.dma_attr_addr_lo = 0x0;
dmaattr.dma_attr_addr_hi = 0x07fffffff; /* 31 bit mask */
dmaattr.dma_attr_count_max = 0x0ffffffff;
dmaattr.dma_attr_align = 1;
dmaattr.dma_attr_burstsizes = 0x01;
dmaattr.dma_attr_minxfer = 0x01;
dmaattr.dma_attr_maxxfer = 0x0ffffffff;
dmaattr.dma_attr_seg = 0x0ffffffff;
dmaattr.dma_attr_sgllen = 1;
dmaattr.dma_attr_granular = 1;
dmaattr.dma_attr_flags = 0;
rc = ddi_dma_alloc_handle(
     dip,
     &dmaattr,
     DDI_DMA_SLEEP,
     NULL,
&(dma_addr->m_handle));
if (rc !=DDI_SUCCESS)
switch (rc)
case DDI_DMA_BADATTR:
rc = DDI_DMA_BADATTR;
break;
case DDI_DMA_NORESOURCES:
rc = DDI_DMA_NORESOURCES;
break;
default:
break;
return rc; /* handle allocation failed and stop the allocation process */
devattr.devacc_attr_version = DDI_DEVICE_ATTR_V0;
devattr.devacc_attr_endian_flags = DDI_NEVERSWAP_ACC;
devattr.devacc_attr_dataorder = DDI_STRICTORDER_ACC;
rc = ddi_dma_mem_alloc(
dma_addr->m_handle,
bytecount,
&devattr,
DDI_DMA_CONSISTENT,
DDI_DMA_SLEEP,
NULL,
&kaddrp,
&real_length,
&(dma_addr->m_acchandle)
if (rc != DDI_SUCCESS)
return rc;
rc = ddi_dma_addr_bind_handle(
dma_addr->m_handle,
NULL,
kaddrp,
real_length,
DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
DDI_DMA_SLEEP,
NULL,
&dmacookie,
&cntcookie
if (rc != DDI_DMA_MAPPED)
switch (rc)
case DDI_DMA_PARTIAL_MAP:
rc = DDI_DMA_PARTIAL_MAP;
break;
case DDI_DMA_INUSE:
rc = DDI_DMA_INUSE;
     break;
case DDI_DMA_NORESOURCES:
rc = DDI_DMA_NORESOURCES;
break;
case DDI_DMA_NOMAPPING:
rc = DDI_DMA_NOMAPPING;
break;
case DDI_DMA_TOOBIG:
rc = DDI_DMA_TOOBIG;
     break;
default:
break;
return rc;
if (cntcookie!=1)
return rc;
bzero(kaddrp, bytecount);
dma_addr->m_address = dmacookie.dmac_address;
dma_addr->m_kaddrp = kaddrp;
dma_addr->m_nbytes_req = bytecount;
dma_addr->m_nbytes_real = real_length;
return kaddrp; /* kernel virtual address */
Please note that if I set dma_attr_addr_hi = 0xffffffff, I do not get the DDI_DMA_NOMAPPING error any more and get a 32 bit dma bus address which is not usable by the device. How can get around this problem? Any suggestion will be helpful and greatly appreciated.
Best Regards,
Ying

Similar Messages

  • Does lion server support a single email address across multiple devices??

    I am looking to move from an outdated Microsoft Exchange Server 2003 to OS X Lion Server but I am unsure as to how Lion will handle email. I do not want to spend money on a new windows server if I can get a Mac Mini Server to do the job. I am a very small business with a number of email accounts for a couple employees and need access to email and calendar from both the office iMac's and my Macbook Pro when on the road. My IT guy says I need Exchange but he's been off base on a few other items recently and I wanted to check with other sources.
    I have 2 new iMac's, a MacBook Pro, an iPad1 and and iPhone4 on the mac side of things and 2 windows computers running XP. I would get rid of the windows computers completely if not for my CAD program which runs best not in a virtual machine mode.
    How well will email and calendar entries sync across devices?

    I have a very similar setup at my office. Lion Server will push email, calandar, contacts to all of your apple product with out a hitch.
    As far the Windows XP machines, you can access email over IMAP with Thunderbird, and calandars via sunbird or the built in web app.
    I would ditch the exchange server move to Mac OS X Server, and never look back.
    God Luck!
    PS. All of your devices will be in sync all the time.
    Shore answer:
    Does lion server support a single email address across multiple devices??
    Yes.

  • Does my late 2007(?) MacBook Pro support 64 bit Windows 7?

    I have a macbook pro with a 2.4 GHz Intel Core 2 Duo (MacBookPro3,1), and I believe it is late 2007 but I'm not sure because the apple website is a little ambiguous about it when I submit my serial number.  The support website http://support.apple.com/kb/ht1846 says that 64-bit Windows 7 is only supported on early 2008 models but I suspect it is on mine too.  I just want to be sure.  Thanks!

    Thank for your reply,This is the downloaded trial version i downloaded from Adobe website,I'm buying my new camera in about a month and want to get a headstart on learningsome editing before I put out all the money for this and software,Thanks,
    Date: Mon, 19 Mar 2012 16:00:34 -0600
    From: [email protected]
    To: [email protected]
    Subject: Installer does not support 64 bit windows 7
        Re: Installer does not support 64 bit windows 7
        created by Jeff A Wright in Trial Download & Install FAQ - View the full discussion
    Which disc are you installing from?  Also did you just purchase Premiere Elements 10 or did you buy the bundle which includes Photoshop Elements 10?
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4276739#4276739
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4276739#4276739. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Trial Download & Install FAQ by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Does Airport Express support 24 Bit - 192 KHZ digital out ?

    Hello.
    I have Airport Express connected to a high end external audiophile DAC and would like to know if it supports 24 bit and higher clock frequencies like 96 KHz or 192 KHz.
    Thanks for your thoughts.
    Nuno

    You may find the following article helpful in answering your question. (ref: http://www.stereophile.com/accessoryreviews/505apple/)

  • Can not Solaris11 11/11 support 32-bit CPU ?

    Hi.
    I followed the instructions printed on below.
    http://docs.oracle.com/cd/E23824_01/html/E23811/glpgv.html#glpcn
    After reboot,Laptop does not run with output a following messages.
    amd64: CPU does NOT support long mode
    amd64: CPU does NOT support amd64 executables
    Error 15: File not found.
    Can not Solaris11 11/11 support 32-bit CPU ?

    Can not Solaris11 11/11 support 32-bit CPU ?That is correct. According to the "minimum hardware requirements" document posted here:
    http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html
    Architectures: SPARC, x86 (64-bit only)

  • Download to support 128 bit encryption

    since trying to download 4.0 version I cannot open firefox at all and need 128 bit encryption that was available prior to 4.0

    Current Firefox releases can't even go below 128 bit, SSL2 that supported this have been removed quite a few releases now (Firefox 8 dropped support for SSL2).
    *https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/8
    128 bit is the minimum that you can use with Firefox and you can only go higher (e.g. 168 or 256).<br />
    128 bit shouldn't be used these days and servers that only support 128 bit should update their software.
    Firefox supports AES-256 since 2002, so that is already more than 10 years.
    * https://www.fortify.net/sslcheck.html

  • Does Firefox 7.o have a supported 64-bit version for Windows 7?

    On the system requirements page for Firefox 7.0, I found the following statement: "Please note that while the 32-bit and 64-bit versions of Windows Vista and Windows 7 can be used to run Firefox 6, only 32-bit builds of Firefox 6 are supported. at this time."
    I do not understand why Firefox 6 is mentioned on the Firefox 7 system requirements page. I have Windows 7, 64 bit version.
    Does Firefox 7.0 have a supported 64 bit version that runs on Windows 7--64 bit version?

    Not yet. The web page text is incorrect.

  • Realtek ALC656 Audio will this support 16 bit recording

    I have a hp Pavillion HPE  h8-1017c  desktop with   integrated realtek ALC656 audio,  running windows 7 home premium 64 bit.
     will this audio support 16 bit recording? Or am I asking the correct questions?
    Chux

    Chux, welcome to the forum.
    What exactly are you trying to do?  This will help us determine if the Integrated Sound card will do what you need.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • My Nikon D7000 obtains 14 bit raw images. Does Aperture 3 support 14 bit printing?

    My Nikon D7000 obtains 14-bit raw images. Does Aperture 3 support 14 bit printing?

    I am pretty sure ( ) that Aperture has had a 16-bit color workflow for several years.
    Here is a printing hint from the User Manual:
    Use a printer that supports 16-bit printing: If the image you’re printing is a high-resolution 16-bit file, using a printer that supports 16-bit printing results in smoother gradations.

  • Does Lightroom 4 support 10-bit color?

    Hoping to learn if Lightroom supports 10-bit color.  I know it supports ProPhotoRGB and 16-bit image files.  Thanks.

    oliver83 wrote:
    Actually, the previous answers were only partially correct w.r.t. to displaying 10-bit colors. In contrast to what was said, LR4 (I use version 4.4) supports 10-bit colors, however only in the develop module. The library module does not seem to support it which could be because 1) it really does not support it or 2) the library previews are created with lower color depth or 3) something I haven't considered
    I first read this somewhere and then personally verified it with ATI's ramp.psd test file on an Eizo CG276 (and a V4900 FirePro).
    The library previews are jpeg (8-bit). 

  • Macbook pro retina support 32 bit mode?

    macbook pro retina support 32 bit mode?

    my hardware audio run only to lion version whit mac bookpro13 2011 wen boot in 32 bit mode kernel but in my macbook pro retina with mountain lion
    is only 64 Bit mode and dont run ther is a driver/mode apple?

  • Does Elements 12 support 32 bit images in a 64 bit OS?

    Does Elements 12 support 32 bit images in a 64 bit OS?

    Yes.  It makes no difference how your image was created - on 64 bit
    software or 32 bit software.  It is still a document and so it should
    load on any system running any photo-editing software.
    PSE is still a 32 bit software for windows;  Nobody knows when will 64
    bit version come out.

  • "Your bootable USB drive could not be created" "Boot Camp only supports 64-bit Windows installation on this platform. Please use an ISO file for 64-bit Windows installation."

    I try to install windows7 system on my macbook air, which version is 10.8.5. When I open the bootcamp, it let me to choose a windows ISO image, which I've already downloaded from this website: http://www.w7forums.com/threads/official-windows-7-sp1-iso-image-downloads.12325 /, it also asked me to select a USB drive, which is kingston that has 8GB. Then when I clicked "continue", it said that "Your bootable USB drive could not be created" "Boot Camp only supports 64-bit Windows installation on this platform. Please use an ISO file for 64-bit Windows installation." But actually the ISO image I downloaded is 64-bit windows7. I don't know why this would happen. Could someone help me please!!

    Thanks for your feedbakc Kiranjj!
    I identified the reason to be that the W8 installation file didn't download completely from a Mac OS-device. I downloaded from another Win-device and the moved the installation file with a USB-stick and then everything worked diectly! But thanks anyway.

  • What version of Essbase Excel add-in support 64 bit Windows 7 on our PC?

    1) Can anyone tell us what is latest version of 64 bit Essbase Excel-add-in 11.1.1.3.x and will this latest version of Essbase Excel add-in support 64 bit Windows 7 on our PC?
    2) we downloaded Essbase excel add-in 11.1.2 and was not able to connect to Essbase 11.1.1.3 server. It gave an error message - "This version is newer than the Essbase server." Is there a workaround? (we were hoping 11.1.2 would support 64 bit windows 7)
    ps. There is a knowlegebase article that teaches us how to get Smartview 11.1.2 to connect to Essbase. We could not quite follow the badly written KB artible, but Ms. V from Oracle tech support claims she was able to connect and she wrote the article.
    We did manage to get Smartview 11.1.2 to connect to Planning 11.1.1.3!!

    Thanks John and Jasmine.
    John,
    I am able to connect using Essbase excel add-in 11.1.2 and see the list of Essbase server 11.1.1.3 app/databases. However when I tried to select one of the applications/databases, I get the Essbase warning "This version of Essbase 11.1.1.3) is older than the version of the Essbase API (11.1.2.0) you are using."
    I get sent back to Essbase system Login screen and am asked to select a app/database. Add-in keeps giving me the above message - none of the 11.1.1.3 databases would allow me to connect.
    I guess you guys did not experience this problem?

  • PSE 12 support 64 bit Windows 8?

    Does PSE 12 support 64 bit Windows 8.  Note promo material trumpets support of 64 bit Mac but appears silent on Windows.

    Hi,
    The error 1935 usually means there is a conflict with something else that is running - you could try this.
    First off, restart your system.
    Then try stopping the windows update service. Control Panel -> Administrative Tools -> Services (or use the search charm). Right click on Windows Updates and select Stop.
    Now disable any antivirus that you have running.
    Try the installation again.
    Turn back on the antivirus and start the windows update again.
    Good luck
    Brian

Maybe you are looking for

  • Need help setting up at local testing server

    I have Coldfusion 8 installed on my hard drive and DWCS3 installed on an external hard drive hooked up to computer. I have set up a DSN in Coldfusion I can't however get setup the testing server so that I can test my site it is asking for a HTTP addr

  • Can't build SJSE8 project via CLI with asant

    I have written a small, simple enterprise app in SJSE8 on Windows XP. The app compiles, deploys, and runs correctly from within Studio. I would like to build the app from the command line. I assumed all I had to do was run asant from the folder conta

  • How do you restore OS X Lion back to factory defaults?

    I want to do clean up my hard drive a lot, and I'd like to just take the OS back to factory. First, if anyone knows how to do this properly, please describe how. Second, if I restore back to factory is it possible to redowload my apps and everything

  • Showtime anytime error when trying to login

    When I try to sign on I  sometimes get,  tus 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Re

  • Deleting hand-me-down devices off iCloud backup

    i've handed down my past iphones to kids.  now it appears those devices are taking up storage on my icloud.  if delete the devices off my icloud, will the backed up information (photos, etc) go away too?