X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fnvram.c;h=86ca02e40ac7ccde6f22191a238697c4dbe8bb65;hb=028891ad087150753ba24a4d50374e0ebc4bc3dd;hp=1264fad7b5e7cbdacbefbe3152fe9d23e6a4de2d;hpb=94f67717b6461df514dc225ed84f03b44c44061b;p=palacios.git diff --git a/palacios/src/devices/nvram.c b/palacios/src/devices/nvram.c index 1264fad..86ca02e 100644 --- a/palacios/src/devices/nvram.c +++ b/palacios/src/devices/nvram.c @@ -127,7 +127,7 @@ struct rtc_stata { struct rtc_statb { uint8_t sum : 1; // 1=summer (daylight savings) uint8_t h24 : 1; // 1=24h clock - uint8_t dm : 1; // 1=date/time is in bcd, 0=binary + uint8_t dm : 1; // 0=date/time is in bcd, 1=binary uint8_t rec : 1; // 1=rectangular signal uint8_t ui : 1; // 1=update interrupt uint8_t ai : 1; // 1=alarm interrupt @@ -297,7 +297,7 @@ static void update_time(struct nvram_internal * data, uint64_t period_us) { uint8_t * houra = (uint8_t *)&(data->mem_state[NVRAM_REG_HOUR_ALARM]); uint8_t hour24; - uint8_t bcd = (statb->dm == 1); + uint8_t bcd = (statb->dm == 0); uint8_t carry = 0; uint8_t nextday = 0; uint32_t periodic_period; @@ -659,8 +659,8 @@ static int init_nvram_state(struct v3_vm_info * vm, struct nvram_internal * nvra set_memory(nvram, NVRAM_REG_STAT_A, 0x26); // RTC status B - // 00000100 = not setting, no interrupts, blocked rect signal, bcd mode, 24 hour, normal time - set_memory(nvram, NVRAM_REG_STAT_B, 0x06); + // 00000010 = not setting, no interrupts, blocked rect signal, bcd mode (bit 3 = 0), 24 hour, normal time + set_memory(nvram, NVRAM_REG_STAT_B, 0x02); // RTC status C