How to write ACPI device driver for Solaris 8 (SPARC Edition)

Hi, All,
I wonder how to write ACPI driver to access battery life,
can anyone help ? thanks!!

I am having the similar problem identified in this thread.
OS: Sun Solaris 10 01/06
Hardware: Sun Blade 2500
PCI Memory card.
Problem: When driver moves more then 40 bytes via PIO from a PCI device memory card, the long words are swapped starting at 40 byte transfer size and greater.
device memory description:
static ddi_device_acc_attr_t sdram_access_attr =
DDI_DEVICE_ATTR_V0, /* Boilerplate value */
DDI_STRUCTURE_LE_ACC,
DDI_STRICTORDER_ACC /* Don't reorder accesses */
The user application does a read call, which goes to xxread. xxread calls physio( xxstrategy, bp, dev, B_READ, xxminphys, uio );
In xxstrategy the transfer is done using
ddi_mem_rep_get8(ucb->ucb_sdram_accHndl,
(uint8_t*) kaddr,
(uint8_t*) raddr,
(size_t) bp->b_resid),
(uint_t) DDI_DEV_AUTOINCR );
PCI Device memory is loaded with incrementing address (8bit), 0,1,2... This is confirmed using a PCI Bus Analyzer.
A read of 36 bytes or less returns:
03 02 01 00 07 06 05 04 ...
A read of 40 bytes returns:
07 06 05 04 03 02 01 00 ...
If I peek 1 byte at a time using ddi_get8(ucb->ucb_sdram_accHndl, ...) I get
00 01 02 03 04 05 06 07
Why are the long words swapped starting at 40 byte transfer size and greater?

Similar Messages

  • Snmp mibs for solaris 9 sparc edition - cannot be found anywhere

    i am looking for the mibs to download for solaris 9 sparc, but they are nowhere to be found on sun's site. can anyone point me in the right direction of where they can be obtained?
    any other information regarding sun and snmp is appreciated as well.

    Here is where you find them:
    http://www.sun.com/download/products.xml?id=454bc019

  • Problem with a DDI Device driver for Solaris 8 and 9 on a Sun-Blade-1500

    The problem has to do with dma allocated memory and the little-endian format.
    When I copy blocks bigger than 256 bytes to the dma memory, using a uiomove() or bcopy(), the data after the first 32 bytes is swapped around over 8 bytes.
    The bcopy from a driver (stack) buffer into the dma virtual memory has the same affect.
    So it has to do with the kernel dma allocated memory and the endianess.
    When I set the byte order to big-endian inside the ddi_device_acc_attr the data seems to be alright, also with bigger transfer sizes.
    My device however needs the little-endian format.
    I have the same the same device driver running without any errors on a Sun Blade-150 Solaris 8 for a long time now.
    Can somebody please advise me?
    Data example,
    test data: 0x00,0x01,0x02,?.
    64, 128 or 256 bytes blocks:
    000: 07 06 05 04 03 02 01 00 0F 0E 0D 0C 0B 0A 09 08
    016: 17 16 15 14 13 12 11 10 1F 1E 1D 1C 1B 1A 19 18
    032: 27 26 25 24 23 22 21 20 2F 2E 2D 2C 2B 2A 29 28
    048: 37 36 35 34 33 32 31 30 3F 3E 3D 3C 3B 3A 39 38
    064: 47 46 45 44 43 42 41 40 4F 4E 4D 4C 4B 4A 49 48
    080: 57 56 55 54 53 52 51 50 5F 5E 5D 5C 5B 5A 59 58
    096: 67 66 65 64 63 62 61 60 6F 6E 6D 6C 6B 6A 69 68
    112: 77 76 75 74 73 72 71 70 7F 7E 7D 7C 7B 7A 79 78
    512 or 1024 bytes blocks:
    000: 07 06 05 04 03 02 01 00 0F 0E 0D 0C 0B 0A 09 08
    016: 17 16 15 14 13 12 11 10 1F 1E 1D 1C 1B 1A 19 18
    032: 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F <----- ?
    048: 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F <----- ?
    064: 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F <----- ?
    080: 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F <----- ?
    096: 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F <----- ?
    112: 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F <----- ?
    Code example, how I allocate the DMA (kernel) memory:
    DDI_STRUCTURE_LE_ACC = Little Endian format
    DDI_STRUCTURE_BE_ACC = Big Endian format
    static struct ddi_device_acc_attr sse_dma_attr =
    DDI_DEVICE_ATTR_V0, /* The version number of this structure */
    DDI_STRUCTURE_LE_ACC, /* see above */
    DDI_STRICTORDER_ACC, /* How CPU will reference data, default */
    The dma definitions for allocating the DMA memory
    static ddi_dma_attr_t dmaattr= {
    DMA_ATTR_V0, /* version */
    0, /* starting address for DVMA */
    0xffffffff, /* end address for DVMA */
    0xffffffff, /* max transfer count in one cookie */
    0x1, /* address restrictive alignment, 1 = byte alignment */
    0x7, /* burst sizes */
    1, /* min number of byes */
    0x00ffffff, /* max number of bytes device can transmit/receive */
    0xffffffff, /* upper bound of the DMA engine's address */
    1,
    512,
    0, /* DDI_DMA_FORCE_PHYSICAL doesn't work */
    ddi_dma_alloc_handle()
    if((ret=ddi_dma_alloc_handle(xsp->dip,
    &dmaattr,
    DDI_DMA_SLEEP,
    NULL,
    dmahandle_out)) != DDI_SUCCESS)
    cmn_err(CE_CONT, "ucr_dma_alloc_memory, "
    "ERROR ddi_dma_alloc_handle status = %d\n",
    ret);
    return(ret);
    if((ret=ddi_dma_mem_alloc(*dmahandle_out,
    (uint_t) size,
    dma_acc_attr,
    DDI_DMA_CONSISTENT,
    DDI_DMA_SLEEP,
    NULL,
    (caddr_t *)&raw_kern_addr,
    &real_len,
    dma_acc_handle_out)) != DDI_SUCCESS)
    cmn_err(CE_CONT, "ucr_ucr_dma_alloc_memory, "
    "ERROR ddi_dma_mem_alloc status = %d\n",
    ret);
    ddi_dma_free_handle(dmahandle_out);
    return(ret);
    This will also init the PCI - IOMMU for
    address translation.
    if((ret=ddi_dma_addr_bind_handle(*dmahandle_out,
    NULL,
    (caddr_t)raw_kern_addr,
    real_len,
    DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
    DDI_DMA_SLEEP,
    NULL,
    &dma_cookie,
    &count)) != DDI_SUCCESS)
    cmn_err(CE_CONT, "ucr_ucr_dma_alloc_memory, "
    "ERROR ddi_dma_addr_bind_handle status = %d\n",
    ret);
    ddi_dma_mem_free(dma_acc_handle_out);
    ddi_dma_free_handle(dmahandle_out);
    return(ret);
    if((ret=ddi_dma_sync(*dmahandle_out,
    0,
    real_len,
    DDI_DMA_SYNC_FORDEV)) != DDI_SUCCESS)
    cmn_err(CE_CONT, "ucr_ucr_dma_alloc_memory, "
    "ERROR ddi_dma_sync status = %d\n", ret);
    ddi_dma_unbind_handle(*dmahandle_out);
    ddi_dma_mem_free(dma_acc_handle_out);
    ddi_dma_free_handle(dmahandle_out);
    return(ret);

    I am having the similar problem identified in this thread.
    OS: Sun Solaris 10 01/06
    Hardware: Sun Blade 2500
    PCI Memory card.
    Problem: When driver moves more then 40 bytes via PIO from a PCI device memory card, the long words are swapped starting at 40 byte transfer size and greater.
    device memory description:
    static ddi_device_acc_attr_t sdram_access_attr =
    DDI_DEVICE_ATTR_V0, /* Boilerplate value */
    DDI_STRUCTURE_LE_ACC,
    DDI_STRICTORDER_ACC /* Don't reorder accesses */
    The user application does a read call, which goes to xxread. xxread calls physio( xxstrategy, bp, dev, B_READ, xxminphys, uio );
    In xxstrategy the transfer is done using
    ddi_mem_rep_get8(ucb->ucb_sdram_accHndl,
    (uint8_t*) kaddr,
    (uint8_t*) raddr,
    (size_t) bp->b_resid),
    (uint_t) DDI_DEV_AUTOINCR );
    PCI Device memory is loaded with incrementing address (8bit), 0,1,2... This is confirmed using a PCI Bus Analyzer.
    A read of 36 bytes or less returns:
    03 02 01 00 07 06 05 04 ...
    A read of 40 bytes returns:
    07 06 05 04 03 02 01 00 ...
    If I peek 1 byte at a time using ddi_get8(ucb->ucb_sdram_accHndl, ...) I get
    00 01 02 03 04 05 06 07
    Why are the long words swapped starting at 40 byte transfer size and greater?

  • How to write a kernel module for Solaris

    Hi
    I would like to know where I can find information about writing a kernel module for Solaris. Is there a pdf developers reference?

    http://docs.sun.com
    Search "writing device drivers".Even if I don't intend writing a device driver?

  • Quad gigaSwift Ethernet Driver for Solaris 10 Sparc

    I have been looking about for this all over the place and cannot find it anywhere, in the manual and the sun site all the downloads are for solaris 9.
    Are these cards not supported on Solaris 10 Sparc ?
    Cheers,
    Mike

    it is the X4444A solaris 10 did pick up the card straight away, but the problem is there was no ce.conf file, i have created my own because i need to turn on jumbo frame for an individual port, but when i add it in all the ports on the card are being set to MTU 9800 so then i have to set them indivually to 1500 apart from the one i am using that needs to be 9000. This is all good and proper but when i activate this the box connects to the netapps server but all nfs shares fail as soon as anything touches these directories.
    The netapps filer is running at MTU 9000 and the card is running at 9000 causes everything to fall over, set back to normal and everything is ok.
    Any ideas ?

  • How to develop 64-bit Windows device driver for NI-6602?

    Due to the fact that NI-VISA doesn’t support 64 bit Windows, how can I do to develop a 64 bit Windows device driver for NI 6602 (Counter/timer) PCI card. The possible jobs include:
    Develop a Windows Kernel Mode Driver (“Device Driver”);
    Make it to comply with VISA in order to utilize “osiBus Generic IO Interface” and MH DDK.
    Could anyone please give me some advices as soon as possible?
    William Liao
    Message Edited by Wiliao on 07-22-2005 04:12 PM

    Hi All,
    I am currently working on getting the health parameters
    from the motherboard like voltage fan and temperature. I have already
    already done this using 32 bit winio driver but i am not able to work
    on 64 bit version. is there any driver availbale in 64 bit for
    obtaining this parametes or some one help me to get a 64 bit winio
    driver.
    Regards,
    Senthil prabu R

  • 3dfx driver for solaris 8

    Hi,
    I am looking for a 3dfx banshee driver for solaris 8. Any pointers. If none exists any pointers to how I could port the 3dfx drivers for linux and glide over to solaris 8. Can I use gcc to do my work?
    Thanks in advance
    Regards
    Nirmal

    Hello Flavio,
    please i need a driver for Voodoo3 3000 AGP video
    adapter, you have one ?No. I wrote a driver for the V2 and it's not very useful - I made it for Solaris Sparc and all you can do is a few IOCTLs and mmap the device memory into userland. The driver does work on i386 but you need the latest MMU patch. I did not have the time yet to port glide - I have something half working for sparc but I have not spend time to make it work on i386. Even with glide working you can't use X11 (one would have to write the X11 drivers and that's a whole new ball game).
    How i do to install this driver ? sorry i�m begining
    on Sun.If you wish to use it for X11, I would recommend to download the XFree86 binaries for Solaris, since it has support for the V3.
    You can get more information about it on www.xfree86.org.
    My S.O. is Sun Solaris 8 01-01 (IA) on ASUS A7V133 and
    AMD K7 cpu.
    Thanks to you, very much.You are welcome!
    (desculpe aih o ingles chiclete camarada preciso treinar++)(O ingles esta' bom!).

  • How to make Automatically Device driver installation in Win 7/WIn 8 when using RNDIS in Windows Compact

    We are developing a precision instrument that measures Temperature, Pressure and humidity used in the pharmaceutical industry.
    The Instrument is based on Windows Embedded Compact (7.0)
    WE establish a TCP communication vi a USB connection. This is done by the RNDIS Driver.
    When we connect the instrument to a PC we have to do the following in Windows:
    http://developer.toradex.com/knowledge-base/how-to-install-microsoft-rndis-driver-for-windows-7
    The INF that is used is then C:\Windows\inf\rndiscmp.inf
    We want this to be executed automatically
    The way it is automated is by setting the correct entry’s in the registration database on the Instruments. In Windows CE registration database.
    On
    http://www.usb.org/developers/defined_class we think we must set Base Class = EFh, SubClass = 04h and Protocol = 01h.
    But how is this done in the registry on the device?
    Who can help me :-)

    Hi Mads,
    changes in "rndisfn.h" in public folder have no influance on your project, because those files are not built at all. Visual Studio will use this one anyway (which is already built): C:\WINCE700\public\common\oak\target\armv7\retail\rndisfn.dll
    To make use of Microsoft public code, you have to clone this code - that is copy selected source files to BSP folder and adjust DIRS files to include new data in the compilation process.
    To clone RNDIS component, copy rndis folder from C:\WINCE700\public\common\oak\drivers\UsbFn\class
    to C:\WINCE700\platform\YOUR_BSP\Src\COMMON\USBFN.
    Edit source file C:\WINCE700\platform\YOUR_BSP\Src\COMMON\USBFN\rndis\rndisfn\sources:
    DOSYSGEN=1
    TARGETDEFNAME=RNDISFN
    TARGETNAME=RNDISFN
    TARGETTYPE=DYNLINK
    DLLENTRY=_DllEntryCRTStartup
    SOURCES= \
    rndisfn.cpp \
    TARGETLIBS= \
    $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\ndis.lib \
    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
    $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib
    SOURCELIBS=\
    $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\lib\$(_CPUINDPATH)\rndismini2.lib \
    $(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\ufnclientlib.lib
    Finally, edit C:\WINCE700\platform\YOUR_BSP\Src\COMMON\USBFN\dirs to include your new component (folder) in the build process:
    DIRS=\
    RNDISKITL \
    RNDIS \
    System will build now new rndisfn.dll, which will replace the original one in the public directory. I hope I didn't forget anything...

  • Windows cannot load the device driver for this hardware. The driver may be corrupted or missing.

    I'm having the error "Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)" and I can't read/write CDs/DVDs. When I try to update the driver  I have the message that it is already up to date.
    I can't find the driver to dowload and try to fix the problem. Where can I download it or solve somehow my problem?

    Hi juigarashi,
    Microsofts automated troubleshooting service on the link below may help
    CD/DVD Repair
    Hope it works for you.
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Writing USB-Serial Converter Device Driver for Windows CE 6.0

    Dear Developers,
          I have a Silicon Labs chip Cp2108. Its a Quad USB to Serial converter. It supports all the operating systems except Win CE. So I have the source code of the driver for Linux 2.6 / Linux 3.0. I have experience in Device drivers development
    in Linux.
      Question is How will I start coding driver for Windows CE 6.0. Can anyone point me to a best starting point on this topic. All I need to do is make this chip work with WIN CE 6.0. Can anyone point me to a Sample driver source code It will be great.
     Regards,
         Winston

    Dear Vinoth, 
            Thanks for the valuable reply. 
      I am confused a bit here. I need to make the external USB -UART bridge (CP2108) work on win CE 7.
       the driver in Path \WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\USBSER is using the built in USB controller
    hardware and making it as a Serial port right ? 
       How do you go about making the external USB -UART bridge work as a COM port ? 
     I have a document from SIlicon Labs which gives info about Device descriptors and interface commands . 
      Regards,
        Winston 

  • Equium - Windows can't load the device driver for USB dongle

    I have been using a dongle without problems for about a month, however now it is saying (in device manager ) "Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)"
    what does this mean and how can i fix it?

    hi it's a vodafone 3gb cheap as chips dongle
    it's an equium a200 i think
    everything cam as one on the dongle, it uninstalled ok after initial problem, but now won't acknowledge it is in fact a dongle, just a 'usb mass filter' something or other?
    i know i sound completely stupid, but when it comes to technology i am!

  • Cannot load device driver for DVD/CDRW - Satellite 1110

    I have a Satellite 1110 and something has gone wrong with my DVD/CDRW and it will not read any CDs. It is reported as a MAT****A UJDA730 DVD/CDRW but the device status comes up as:
    "Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)"
    I have tried uninstalling and reinstalling the device but the error just returns. I cannot find a driver for it either on the manufacturer's web site or Toshiba's. I don't want to use the Product Recovery CD-ROM as it implies I will lose all software and data on the hard drive.
    Can someone advise how to recover from this situation?
    Thanks

    Hi
    Firstly you dont any driver for the CD/DVD drive. The drive uses the standard Windows OS driver and its not necessary to install it additional.
    I assume there could be something wrong with the registry entry.
    Please check this forum posting:
    http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=13843
    The user has used the instruction which was offered on the Microsoft site.
    This should help.
    Please post again if this method was successful.

  • Device Driver for Quick Can

    I want to use quick CAN for the project using LabVIEW .So I need the device driver for Quick CAN so that ,I can interface with LabVIEW.Is there a Driver for Quick CAN for LabVIEW ?
    Some Detail on Quick CAN
    http://qprotos.com/quickcan.htm

    Wow that looks like a piece of junk.  You get what you pay for, and that goes for driver support as well.  If you bought a NI CAN device or XNET you'd have all kinds of support from this forum trying to help you out.  Heck even a Vector device has some love on this forum.  And Intrepid has drivers for their hardware in LabVIEW...it needs some attention but it exists.
    I say read the documentation, write a set of VIs to talk to the device, and post here if you have any general questions about writing drivers.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column

    Please Help!!!
    How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
                                      January 2014         January
    2013                            +/-
                    Region   Entry   Exit  Total    Entry   Exit   Total   (Total of Jan2014-Total of Jan2013)
                    A               2         3      
    40        5       7        30                    40-30= 10

    What is a table structure? Sorry cannot test it right now..
    SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
    FROM tbl
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to download the LAN driver for Satellite A100 PSAA8E

    Can anyone help how to download the LAN driver for my machine. I found three LAN drivers but unable to download them from the toshiba europe website.
    Thank you

    > Whats the problem???
    > I found on the Toshiba European site different driver
    > version for different OSs.
    > You have to download the compatible one. If you use
    > XP choose the newest version for XP OS and if you use
    > XP MCE or Vista choose another one.
    >
    > Thats all.
    I am unable to find a compatible LAN driver for an XP OS. Can you tell me where exactly to look for this

Maybe you are looking for

  • How can i install windows application (like hislider) on my macbook?

    Recently i'm  trying to create html slider plugin for my website. so i intall hislider software in my computer to create stunning image slider. This software is running ok, but i also like to install it on my MacBook. Can anyone shed any more light?

  • Upgrade MacBook Hard Drive - Restore System from Time Machine Backup?

    I have a MacBook that I want to upgrade the hard drive of. Am I right in thinking, all I need to do is: Run Time Machine one last time, to make a recent backup of the MacBook Install the new hard drive in the MacBook Insert the Snow Leopard DVD, and

  • How do I insert multiple simple objects at different times into a video, and see all of them?!

    I'm trying to make a very simple 20 second video clip of me hula hooping, and every 4 seconds, draw a circle around my hula hoop that remains there for the duration of the video. So at the beginning there will be 1 circle, at the end there will be 6.

  • Sharing a monitor

    I have a G4 (467 MHz) that boots OS 9. I am planning on getting a mini to do some video work that my G4 can't do. Yet, I still need the G4 for some programs that only run on OS 9. In an effort to save money, I plan to use my current keyboard/mouse an

  • Can't view a jpg.html photo

    my sister send me via email (cox.net) an old family picture. when i attempt to open it, all i see on the screen is rows and rows of numbers, letters, and funky symbols. what gives and how can i view this picture? thanks for all your help!