VirtualBox

Changeset 77349 in vbox for trunk/src


Ignore:
Timestamp:
Feb 18, 2019 3:47:23 PM (6 years ago)
Author:
vboxsync
Message:

DevATA: EXECUTE DEVICE DIAGNOSTIC must always be run on both device 0 and 1. Fixes detection of CD-ROM as primary slave in EFI.

File:
1 edited

Legend:

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

    r77023 r77349  
    39203920
    39213921
    3922 static bool ataR3ExecuteDeviceDiagnosticSS(ATADevState *s)
     3922static void ataR3DeviceDiag(ATADevState *s)
    39233923{
    39243924    ataR3SetSignature(s);
     
    39283928        ataSetStatusValue(s, ATA_STAT_READY | ATA_STAT_SEEK);
    39293929    s->uATARegError = 0x01;
     3930}
     3931
     3932
     3933static bool ataR3ExecuteDeviceDiagnosticSS(ATADevState *s)
     3934{
     3935    PATACONTROLLER pCtl = ATADEVSTATE_2_CONTROLLER(s);
     3936
     3937    /* EXECUTE DEVICE DIAGNOSTIC is a very special command which always
     3938     * gets executed, regardless of which device is selected. As a side
     3939     * effect, it always completes with device 0 selected.
     3940     */
     3941    for (uint32_t i = 0; i < RT_ELEMENTS(pCtl->aIfs); i++)
     3942        ataR3DeviceDiag(&pCtl->aIfs[i]);
     3943
     3944    LogRel(("ATA: LUN#%d: EXECUTE DEVICE DIAGNOSTIC, status %02X\n",
     3945            s->iLUN, s->uATARegStatus));
     3946    pCtl->iSelectedIf = 0;
     3947
    39303948    return false;
    39313949}
     
    58765894                {
    58775895                    ataR3ResetDevice(s);
    5878                     ataR3ExecuteDeviceDiagnosticSS(s);
     5896                    ataR3DeviceDiag(s);
    58795897                }
    58805898                else
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