VirtualBox

Changeset 41566 in vbox


Ignore:
Timestamp:
Jun 4, 2012 3:45:39 PM (13 years ago)
Author:
vboxsync
Message:

RTC: Clear CMOS shutdown byte on reset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r38195 r41566  
    990990
    991991/**
     992 * @copydoc
     993 */
     994static DECLCALLBACK(void) rtcReset(PPDMDEVINS pDevIns)
     995{
     996    RTCState *pThis = PDMINS_2_DATA(pDevIns, RTCState *);
     997
     998    /* If shutdown status is non-zero, log its value. */
     999    if (pThis->cmos_data[0xF])
     1000    {
     1001        LogRel(("CMOS shutdown status byte is %02X\n", pThis->cmos_data[0xF]));
     1002
     1003#if 0   /* It would be nice to log the warm reboot vector but alas, we already trashed it. */
     1004        uint32_t u32WarmVector;
     1005        int rc;
     1006        rc = PDMDevHlpPhysRead(pDevIns, 0x467, &u32WarmVector, sizeof(u32WarmVector));
     1007        AssertRC(rc);
     1008        LogRel((", 40:67 contains %04X:%04X\n", u32WarmVector >> 16, u32WarmVector & 0xFFFF));
     1009#endif
     1010        /* If we're going to trash the VM's memory, we also have to clear this. */
     1011        pThis->cmos_data[0xF] = 0;
     1012    }
     1013}
     1014
     1015
     1016/**
    9921017 * @interface_method_impl{PDMDEVREG,pfnConstruct}
    9931018 */
     
    11771202    NULL,
    11781203    /* pfnReset */
    1179     NULL,
     1204    rtcReset,
    11801205    /* pfnSuspend */
    11811206    NULL,
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