qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 4/4] hw/isa/i82378.c: use 1900 as a base year


From: Hervé Poussineau
Subject: Re: [Qemu-ppc] [PATCH 4/4] hw/isa/i82378.c: use 1900 as a base year
Date: Sun, 14 Apr 2019 19:01:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

Le 12/04/2019 à 23:06, Artyom Tarasenko a écrit :
AIX 5.1 expects the base year to be 1900. Adjust accordingly.

Signed-off-by: Artyom Tarasenko <address@hidden>
---
  hw/isa/i82378.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index a5d67bc..546c928 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -107,7 +107,9 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
      isa = isa_create_simple(isabus, "i82374");
/* timer */
-    isa_create_simple(isabus, TYPE_MC146818_RTC);
+    isa = isa_create(isabus, TYPE_MC146818_RTC);
+    qdev_prop_set_int32(DEVICE(isa), "base_year", 1900);
+    qdev_init_nofail(DEVICE(isa));

I am not sure the base_year should be hardcoded in i82378. I can assume other 
machines with a i82378 can have another base_year.
Maybe you can you add a base_year property to i82378, and forward it to 
mc146818 with object_property_add_alias?
Then, change 40p machine to set it to 1900, without changing it for prep 
machine.

  }
static void i82378_init(Object *obj)


Hervé



reply via email to

[Prev in Thread] Current Thread [Next in Thread]