VirtualBox

Changeset 32329 in vbox


Ignore:
Timestamp:
Sep 8, 2010 7:14:21 PM (14 years ago)
Author:
vboxsync
Message:

AHCI/ATAPI: Make it work with Windows guests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r32300 r32329  
    13361336             * Set states in the Port Signature and SStatus registers.
    13371337             */
    1338             pAhciPort->regSIG  = 0x101; /* Signature for SATA device. */
     1338            if (pAhciPort->fATAPI)
     1339                pAhciPort->regSIG = AHCI_PORT_SIG_ATAPI;
     1340            else
     1341                pAhciPort->regSIG = AHCI_PORT_SIG_DISK;
    13391342            pAhciPort->regSSTS = (0x01 << 8) | /* Interface is active. */
    13401343                                 (0x02 << 4) | /* Generation 2 (3.0GBps) speed. */
     
    19211924             * Set states in the Port Signature and SStatus registers.
    19221925             */
    1923             pAhciPort->regSIG  = 0x101; /* Signature for SATA device. */
     1926            if (pAhciPort->fATAPI)
     1927                pAhciPort->regSIG = AHCI_PORT_SIG_ATAPI;
     1928            else
     1929                pAhciPort->regSIG = AHCI_PORT_SIG_DISK;
    19241930            pAhciPort->regSSTS = (0x01 << 8) | /* Interface is active. */
    19251931                                 (0x02 << 4) | /* Generation 2 (3.0GBps) speed. */
     
    26062612    d2hFis[AHCI_CMDFIS_SECTC] = 0x01;
    26072613
    2608     pAhciPort->regTFD = (1 << 8) | ATA_STAT_SEEK | ATA_STAT_WRERR;
     2614    pAhciPort->regTFD = (1 << 8) | ATA_STAT_READY | ATA_STAT_SEEK | ATA_STAT_WRERR;
    26092615
    26102616    ahciPostFisIntoMemory(pAhciPort, AHCI_CMDFIS_TYPE_D2H, d2hFis);
     
    44784484
    44794485    /* As this is the first D2H FIS after the reset update the signature in the SIG register of the port. */
    4480     pAhciPort->regSIG  = 0x101;
     4486    if (pAhciPort->fATAPI)
     4487        pAhciPort->regSIG = AHCI_PORT_SIG_ATAPI;
     4488    else
     4489        pAhciPort->regSIG = AHCI_PORT_SIG_DISK;
    44814490    ASMAtomicOrU32(&pAhciPort->u32TasksFinished, (1 << pAhciPortTaskState->uTag));
    44824491
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette