2005-09-26 10:27:09

by Karsten Wiese

[permalink] [raw]
Subject: [PATCH/RFC] Enable HPET on VIA8237 southbridge

Hi,

if you have that chip on your mainboard and want to play with it's
hpet, this might get you going.

Karsten


Attachments:
(No filename) (116.00 B)
patch-via8237-hpet-i386 (2.13 kB)
Download all attachments

2005-09-26 15:50:02

by Clemens Ladisch

[permalink] [raw]
Subject: Re: [PATCH/RFC] Enable HPET on VIA8237 southbridge

Karsten Wiese wrote:
> if you have that chip on your mainboard and want to play with it's
> hpet, this might get you going.

I'm using similar code for my ICH5 southbridge, but I patched
arch/i386/kernel/acpi/boot.c instead so that the kernel can use it
for its own purposes.

> One exception: Timer1 says it can do PERIODIC mode,
> but this doesn't work here. One shot is ok.

This may be because your patch doesn't initialize the interrupt
routing registers (which would have been the BIOS' job).


Regards,
Clemens

2005-09-26 17:29:32

by Karsten Wiese

[permalink] [raw]
Subject: Re: [PATCH/RFC] Enable HPET on VIA8237 southbridge

Am Montag, 26. September 2005 17:49 schrieb Clemens Ladisch:
> Karsten Wiese wrote:
> > if you have that chip on your mainboard and want to play with it's
> > hpet, this might get you going.
>
> I'm using similar code for my ICH5 southbridge, but I patched
> arch/i386/kernel/acpi/boot.c instead so that the kernel can use it
> for its own purposes.

The kernel uses the hpet here too with my patch.
Please send me your acpi/boot.c patch.

I guess you setup an ACPI_HPET entry, if none has been found?
Maybe your approach is safer/better, 'cause you can scan other ACPI
assigned Hardware addresses there.
>
> > One exception: Timer1 says it can do PERIODIC mode,
> > but this doesn't work here. One shot is ok.
>
> This may be because your patch doesn't initialize the interrupt
> routing registers (which would have been the BIOS' job).

No. Interrupt works fine (IRQ 8). Reliably @10000/s.

Regards,
Karsten





___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

2005-09-28 07:03:39

by Clemens Ladisch

[permalink] [raw]
Subject: Re: [PATCH/RFC] Enable HPET on VIA8237 southbridge

Karsten Wiese wrote:
> Am Montag, 26. September 2005 17:49 schrieb Clemens Ladisch:
> > Karsten Wiese wrote:
> > > if you have that chip on your mainboard and want to play with it's
> > > hpet, this might get you going.
> >
> > I'm using similar code for my ICH5 southbridge, but I patched
> > arch/i386/kernel/acpi/boot.c instead so that the kernel can use it
> > for its own purposes.
>
> The kernel uses the hpet here too with my patch.

Uh, yes. I wasn't sure where I could add a hook to be called early
enough so that the assignment to hpet_address still takes effect, so I
just unconditionally replaced acpi_parse_hpet.

> Please send me your acpi/boot.c patch.

Attached.

> I guess you setup an ACPI_HPET entry, if none has been found?

This would be a good idea for a patch that would have any chance of
being applied to the kernel.

> Maybe your approach is safer/better,

You didn't yet see it ... ;-)


Regards,
Clemens


Attachments:
p4p800-hpet-enable-hack.diff (1.75 kB)