From b8b7456d6ab7edb450ae5ec6473d3cd9a80412f4 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Tue, 23 Apr 2013 10:29:40 +0200 Subject: pc: Update rtc_cmos on CPU hot-plug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It provides updated currently available CPUs count to BIOS on reboot. Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- hw/timer/mc146818rtc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/timer/mc146818rtc.c') diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index afbd0db298..481604de35 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -680,6 +680,13 @@ void rtc_set_memory(ISADevice *dev, int addr, int val) s->cmos_data[addr] = val; } +int rtc_get_memory(ISADevice *dev, int addr) +{ + RTCState *s = MC146818_RTC(dev); + assert(addr >= 0 && addr <= 127); + return s->cmos_data[addr]; +} + static void rtc_set_date_from_host(ISADevice *dev) { RTCState *s = MC146818_RTC(dev); -- cgit v1.2.3