summaryrefslogtreecommitdiff
path: root/hw/pc.h
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-24 18:06:21 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-24 18:06:21 +0000
commit42fc73a1ceeadb27d15873124c537be5ada4b4d3 (patch)
tree654d7229dd85e6942f844279245ec8d769e29388 /hw/pc.h
parente2fc836b18770d39287b4c134a3536fd263c2bdd (diff)
downloadqemu-42fc73a1ceeadb27d15873124c537be5ada4b4d3.tar.gz
Support epoch of 1980 in RTC emulation for MIPS Magnum
On the MIPS Magnum, the time that is held in the RTC's NVRAM should be relative to midnight on 1980-01-01. This patch adds an extra parameter to rtc_init(), allowing different epochs to be used. For the Magnum, 1980 is specified, and for all other machines, 2000 is specified. I've not modified the handling of the century byte, as with an epoch of 1980 and a year of 2009, one could argue that it should hold either 0, 1, 19 or 20. NT 3.50 on MIPS does not read the century byte. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6429 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.h')
-rw-r--r--hw/pc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/pc.h b/hw/pc.h
index 1ba3d9eb90..c67294d0fe 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -83,8 +83,9 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
typedef struct RTCState RTCState;
-RTCState *rtc_init(int base, qemu_irq irq);
-RTCState *rtc_mm_init(target_phys_addr_t base, int it_shift, qemu_irq irq);
+RTCState *rtc_init(int base, qemu_irq irq, int base_year);
+RTCState *rtc_mm_init(target_phys_addr_t base, int it_shift, qemu_irq irq,
+ int base_year);
void rtc_set_memory(RTCState *s, int addr, int val);
void rtc_set_date(RTCState *s, const struct tm *tm);
void cmos_set_s3_resume(void);