VirtualBox

Changeset 41710 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 14, 2012 1:53:21 PM (13 years ago)
Author:
vboxsync
Message:

DevRTC: Extended the 'rtc' info with register A thru D.

File:
1 edited

Legend:

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

    r41709 r41710  
    479479    RTCState *pThis = PDMINS_2_DATA(pDevIns, RTCState *);
    480480
    481     pHlp->pfnPrintf(pHlp, 
     481    pHlp->pfnPrintf(pHlp,
    482482                    "First CMOS bank, offsets 0x0E - 0x7F\n"
    483483                    "Offset %02x : --- use 'info rtc' to show CMOS clock ---", 0);
    484484    for (unsigned iCmos = CMOS_BANK_LOWER_LIMIT; iCmos <= CMOS_BANK_UPPER_LIMIT; iCmos++)
    485485    {
    486         if ((iCmos & 15) == 0) 
     486        if ((iCmos & 15) == 0)
    487487            pHlp->pfnPrintf(pHlp, "Offset %02x : %02x", iCmos, pThis->cmos_data[iCmos]);
    488         else if ((iCmos & 15) == 8) 
     488        else if ((iCmos & 15) == 8)
    489489            pHlp->pfnPrintf(pHlp, "-%02x", pThis->cmos_data[iCmos]);
    490         else if ((iCmos & 15) == 15) 
     490        else if ((iCmos & 15) == 15)
    491491            pHlp->pfnPrintf(pHlp, " %02x\n", pThis->cmos_data[iCmos]);
    492         else 
     492        else
    493493            pHlp->pfnPrintf(pHlp, " %02x", pThis->cmos_data[iCmos]);
    494494    }
     
    506506    for (uint16_t iCmos = CMOS_BANK2_LOWER_LIMIT; iCmos <= CMOS_BANK2_UPPER_LIMIT; iCmos++)
    507507    {
    508         if ((iCmos & 15) == 0) 
     508        if ((iCmos & 15) == 0)
    509509            pHlp->pfnPrintf(pHlp, "Offset %02x : %02x", iCmos, pThis->cmos_data[iCmos]);
    510         else if ((iCmos & 15) == 8) 
     510        else if ((iCmos & 15) == 8)
    511511            pHlp->pfnPrintf(pHlp, "-%02x", pThis->cmos_data[iCmos]);
    512         else if ((iCmos & 15) == 15) 
     512        else if ((iCmos & 15) == 15)
    513513            pHlp->pfnPrintf(pHlp, " %02x\n", pThis->cmos_data[iCmos]);
    514         else 
     514        else
    515515            pHlp->pfnPrintf(pHlp, " %02x", pThis->cmos_data[iCmos]);
    516516    }
     
    533533    uint8_t u8Month = from_bcd(pThis, pThis->cmos_data[RTC_MONTH]) ;
    534534    uint8_t u8Year  = from_bcd(pThis, pThis->cmos_data[RTC_YEAR]);
    535     pHlp->pfnPrintf(pHlp, "Time: %02u:%02u:%02u  Date:%02u-%02u-%02u\n",
     535    pHlp->pfnPrintf(pHlp, "Time: %02u:%02u:%02u  Date: %02u-%02u-%02u\n",
    536536                    u8Hr, u8Min, u8Sec, u8Year, u8Month, u8Day);
    537     /** @todo r=bird: missing REG A-D. */
     537    pHlp->pfnPrintf(pHlp, "REG A=%02x B=%02x C=%02x D=%02x\n",
     538                    pThis->cmos_data[RTC_REG_A], pThis->cmos_data[RTC_REG_B],
     539                    pThis->cmos_data[RTC_REG_C], pThis->cmos_data[RTC_REG_D]);
    538540}
    539541
     
    12441246    PDMDevHlpDBGFInfoRegister(pDevIns, "cmos1", "Display CMOS Bank 1 Info (0x0e-0x7f). No arguments. See also rtc.", rtcCmosBankInfo);
    12451247    PDMDevHlpDBGFInfoRegister(pDevIns, "cmos2", "Display CMOS Bank 2 Info (0x0e-0x7f). No arguments.", rtcCmosBank2Info);
    1246     PDMDevHlpDBGFInfoRegister(pDevIns, "rtc",   "Display CMOS RTC (0x00-0x0d). No arguments. See also cmos1 & cmos2", rtcCmosClockInfo); 
     1248    PDMDevHlpDBGFInfoRegister(pDevIns, "rtc",   "Display CMOS RTC (0x00-0x0d). No arguments. See also cmos1 & cmos2", rtcCmosClockInfo);
    12471249    return VINF_SUCCESS;
    12481250}
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