Lines Matching defs:cmos_data

133     uint8_t cmos_data[256];
212 period_code = pThis->cmos_data[RTC_REG_A] & 0x0f;
214 && (pThis->cmos_data[RTC_REG_B] & REG_B_PIE))
267 if (pThis->cmos_data[RTC_REG_B] & 0x04)
275 if (pThis->cmos_data[RTC_REG_B] & 0x04)
285 tm->tm_sec = from_bcd(pThis, pThis->cmos_data[RTC_SECONDS]);
286 tm->tm_min = from_bcd(pThis, pThis->cmos_data[RTC_MINUTES]);
287 tm->tm_hour = from_bcd(pThis, pThis->cmos_data[RTC_HOURS] & 0x7f);
288 if (!(pThis->cmos_data[RTC_REG_B] & 0x02))
291 if (pThis->cmos_data[RTC_HOURS] & 0x80)
294 tm->tm_wday = from_bcd(pThis, pThis->cmos_data[RTC_DAY_OF_WEEK]);
295 tm->tm_mday = from_bcd(pThis, pThis->cmos_data[RTC_DAY_OF_MONTH]);
296 tm->tm_mon = from_bcd(pThis, pThis->cmos_data[RTC_MONTH]) - 1;
297 tm->tm_year = from_bcd(pThis, pThis->cmos_data[RTC_YEAR]) + 100;
328 *pu32 = pThis->cmos_data[pThis->cmos_index[0]];
332 if (pThis->cmos_data[RTC_REG_A] & REG_A_UIP)
338 pThis->cmos_data[pThis->cmos_index[0]] &= ~REG_A_UIP;
341 *pu32 = pThis->cmos_data[pThis->cmos_index[0]];
345 *pu32 = pThis->cmos_data[pThis->cmos_index[0]];
347 pThis->cmos_data[RTC_REG_C] = 0x00;
351 *pu32 = pThis->cmos_data[pThis->cmos_index[bank]];
386 pThis->cmos_index[bank], u32, pThis->cmos_data[pThis->cmos_index[bank]]));
394 pThis->cmos_data[pThis->cmos_index[0]] = u32;
404 pThis->cmos_data[pThis->cmos_index[0]] = u32;
406 if (!(pThis->cmos_data[RTC_REG_B] & REG_B_SET))
426 pThis->cmos_data[RTC_REG_A] = (u32 & ~REG_A_UIP)
427 | (pThis->cmos_data[RTC_REG_A] & REG_A_UIP);
434 pThis->cmos_data[RTC_REG_A] &= ~REG_A_UIP;
442 if (pThis->cmos_data[RTC_REG_B] & REG_B_SET)
445 pThis->cmos_data[RTC_REG_B] = u32;
461 pThis->cmos_data[pThis->cmos_index[bank]] = u32;
487 pHlp->pfnPrintf(pHlp, "Offset %02x : %02x", iCmos, pThis->cmos_data[iCmos]);
489 pHlp->pfnPrintf(pHlp, "-%02x", pThis->cmos_data[iCmos]);
491 pHlp->pfnPrintf(pHlp, " %02x\n", pThis->cmos_data[iCmos]);
493 pHlp->pfnPrintf(pHlp, " %02x", pThis->cmos_data[iCmos]);
509 pHlp->pfnPrintf(pHlp, "Offset %02x : %02x", iCmos, pThis->cmos_data[iCmos]);
511 pHlp->pfnPrintf(pHlp, "-%02x", pThis->cmos_data[iCmos]);
513 pHlp->pfnPrintf(pHlp, " %02x\n", pThis->cmos_data[iCmos]);
515 pHlp->pfnPrintf(pHlp, " %02x", pThis->cmos_data[iCmos]);
526 uint8_t u8Sec = from_bcd(pThis, pThis->cmos_data[RTC_SECONDS]);
527 uint8_t u8Min = from_bcd(pThis, pThis->cmos_data[RTC_MINUTES]);
528 uint8_t u8Hr = from_bcd(pThis, pThis->cmos_data[RTC_HOURS] & 0x7f);
529 if ( !(pThis->cmos_data[RTC_REG_B] & 0x02)
530 && (pThis->cmos_data[RTC_HOURS] & 0x80))
532 uint8_t u8Day = from_bcd(pThis, pThis->cmos_data[RTC_DAY_OF_MONTH]);
533 uint8_t u8Month = from_bcd(pThis, pThis->cmos_data[RTC_MONTH]) ;
534 uint8_t u8Year = from_bcd(pThis, pThis->cmos_data[RTC_YEAR]);
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]);
558 pThis->cmos_data[RTC_REG_C] |= 0xc0;
638 if ((pThis->cmos_data[RTC_REG_A] & 0x70) != 0x20)
647 if (!(pThis->cmos_data[RTC_REG_B] & REG_B_SET))
650 Log2(("RTC: UIP %x -> 1\n", !!(pThis->cmos_data[RTC_REG_A] & REG_A_UIP)));
651 pThis->cmos_data[RTC_REG_A] |= REG_A_UIP;
666 pThis->cmos_data[RTC_SECONDS] = to_bcd(pThis, tm->tm_sec);
667 pThis->cmos_data[RTC_MINUTES] = to_bcd(pThis, tm->tm_min);
668 if (pThis->cmos_data[RTC_REG_B] & 0x02)
671 pThis->cmos_data[RTC_HOURS] = to_bcd(pThis, tm->tm_hour);
677 pThis->cmos_data[RTC_HOURS] = to_bcd(pThis, h ? h : 12);
679 pThis->cmos_data[RTC_HOURS] |= 0x80;
681 pThis->cmos_data[RTC_DAY_OF_WEEK] = to_bcd(pThis, tm->tm_wday);
682 pThis->cmos_data[RTC_DAY_OF_MONTH] = to_bcd(pThis, tm->tm_mday);
683 pThis->cmos_data[RTC_MONTH] = to_bcd(pThis, tm->tm_mon + 1);
684 pThis->cmos_data[RTC_YEAR] = to_bcd(pThis, tm->tm_year % 100);
697 if (!(pThis->cmos_data[RTC_REG_B] & REG_B_SET))
701 if (pThis->cmos_data[RTC_REG_B] & REG_B_AIE)
703 if ( ( (pThis->cmos_data[RTC_SECONDS_ALARM] & 0xc0) == 0xc0
704 || from_bcd(pThis, pThis->cmos_data[RTC_SECONDS_ALARM]) == pThis->current_tm.tm_sec)
705 && ( (pThis->cmos_data[RTC_MINUTES_ALARM] & 0xc0) == 0xc0
706 || from_bcd(pThis, pThis->cmos_data[RTC_MINUTES_ALARM]) == pThis->current_tm.tm_min)
707 && ( (pThis->cmos_data[RTC_HOURS_ALARM ] & 0xc0) == 0xc0
708 || from_bcd(pThis, pThis->cmos_data[RTC_HOURS_ALARM ]) == pThis->current_tm.tm_hour)
711 pThis->cmos_data[RTC_REG_C] |= 0xa0;
717 if (pThis->cmos_data[RTC_REG_B] & REG_B_UIE)
719 pThis->cmos_data[RTC_REG_C] |= 0x90;
724 Log2(("RTC: UIP %x -> 0\n", !!(pThis->cmos_data[RTC_REG_A] & REG_A_UIP)));
725 pThis->cmos_data[RTC_REG_A] &= ~REG_A_UIP;
761 SSMR3PutMem(pSSM, pThis->cmos_data, CMOS_BANK_SIZE);
782 SSMR3PutMem(pSSM, &pThis->cmos_data[CMOS_BANK_SIZE], CMOS_BANK_SIZE);
824 SSMR3GetMem(pSSM, pThis->cmos_data, CMOS_BANK_SIZE);
849 SSMR3GetMem(pSSM, &pThis->cmos_data[CMOS_BANK_SIZE], CMOS_BANK_SIZE);
853 int period_code = pThis->cmos_data[RTC_REG_A] & 0x0f;
855 && (pThis->cmos_data[RTC_REG_B] & REG_B_PIE))
890 u16 += pThis->cmos_data[i];
892 pThis->cmos_data[RTC_CRC_LOW] = u16 & 0xff;
893 pThis->cmos_data[RTC_CRC_HIGH] = (u16 >> 8) & 0xff;
904 if (iReg < RT_ELEMENTS(pThis->cmos_data))
906 pThis->cmos_data[iReg] = u8Value;
929 if (iReg < RT_ELEMENTS(pThis->cmos_data))
931 *pu8Value = pThis->cmos_data[iReg];
974 pThis->cmos_data[addr] = val;
1028 Log(("CMOS bank 0: \n%16.128Rhxd\n", &pThis->cmos_data[0]));
1029 Log(("CMOS bank 1: \n%16.128Rhxd\n", &pThis->cmos_data[CMOS_BANK_SIZE]));
1056 if (pThis->cmos_data[0xF])
1058 LogRel(("CMOS shutdown status byte is %02X\n", pThis->cmos_data[0xF]));
1068 pThis->cmos_data[0xF] = 0;
1136 pThis->cmos_data[RTC_REG_A] = 0x26;
1137 pThis->cmos_data[RTC_REG_B] = 0x02;
1138 pThis->cmos_data[RTC_REG_C] = 0x00;
1139 pThis->cmos_data[RTC_REG_D] = 0x80;