qemu-devel
[Top][All Lists]
Advanced

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

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


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] [PATCH 4/4] hw/isa/i82378.c: use 1900 as a base year
Date: Mon, 15 Apr 2019 12:45:38 +0200

On Mon, Apr 15, 2019 at 12:36 PM Philippe Mathieu-Daudé
<address@hidden> wrote:
>
> On 4/14/19 11:24 PM, Hervé Poussineau wrote:
> > Le 14/04/2019 à 20:53, Artyom Tarasenko a écrit :
> >> On Sun, Apr 14, 2019 at 7:01 PM Hervé Poussineau
> >> <address@hidden> wrote:
> >>>
> >>> 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.
> >>
> >> I doubt it to be honest. How would it work in the hardware? Is there a
> >> pin which would switch a year?
> >> I do believe the different i823xx may have the different base years
> >> though.
>
> There is no RTC on the i82378, this should be moved to the board code
> and set the date there. Do you want me to send this patch?

Please do. I won't have a chance to get to it till the next weekend.

Artyom

-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu



reply via email to

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