public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Dell BIOS and HPET timer support
@ 2005-06-09  2:06 Pallipadi, Venkatesh
  2005-06-09  2:09 ` Jon Smirl
  0 siblings, 1 reply; 9+ messages in thread
From: Pallipadi, Venkatesh @ 2005-06-09  2:06 UTC (permalink / raw)
  To: Jon Smirl, Lee Revell; +Cc: lkml, Bob Picco



I think do_div expects a 64 bit 1st argument. Can you change ns to
unsigneld long long and try...

Thanks,
Venki 

>-----Original Message-----
>From: Jon Smirl [mailto:jonsmirl@gmail.com] 
>Sent: Wednesday, June 08, 2005 6:38 PM
>To: Lee Revell
>Cc: Pallipadi, Venkatesh; lkml; Bob Picco
>Subject: Re: Dell BIOS and HPET timer support
>
>On 6/8/05, Lee Revell <rlrevell@joe-job.com> wrote:
>> Check the source, it's self-explanatory.  See hpet_alloc().
>
>What is going on with do_div()? 
>0x0429b17f /100000 = 69.8 in my caculator. It comes back as 0 
>from do_div().
>
>[jonsmirl@jonsmirl ~]$ dmesg | grep HPET
>HPET: cap 0429b17f8086a201 period 0429b17f
>HPET: period 0429b17f ns 0429b17f
>HPET: period 0429b17f ns 00000000
>Using HPET for base-timer
>Using HPET for gettimeofday
>[jonsmirl@jonsmirl ~]$
>
>
>	hpetp->hp_period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >>
>	    HPET_COUNTER_CLK_PERIOD_SHIFT;
>printk(KERN_ERR "HPET: cap %016llx period %08lx\n", cap, 
>hpetp->hp_period);
>
>	ns = hpetp->hp_period;	/* femptoseconds, 10^-15 */
>printk(KERN_ERR "HPET: period %08lx ns %08lx \n", 
>hpetp->hp_period, ns);
>	do_div(ns, 1000000);	/* convert to nanoseconds, 10^-9 */
>printk(KERN_ERR "HPET: period %08lx ns %08lx \n", 
>hpetp->hp_period, ns);
>	printk(KERN_INFO "hpet%d: %ldns tick, %d %d-bit timers\n",
>		hpetp->hp_which, ns, hpetp->hp_ntimer,
>		cap & HPET_COUNTER_SIZE_MASK ? 64 : 32);
>-- 
>Jon Smirl
>jonsmirl@gmail.com
>

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Dell BIOS and HPET timer support
@ 2005-06-08 22:55 Pallipadi, Venkatesh
  2005-06-09  0:34 ` Jon Smirl
  0 siblings, 1 reply; 9+ messages in thread
From: Pallipadi, Venkatesh @ 2005-06-08 22:55 UTC (permalink / raw)
  To: Jon Smirl, lkml; +Cc: Bob Picco


HPET timer will be useful for different purposes:
1) Kernel uses it for timer interrupt and time source (gettimeofday).
Kernel will use one particular timer among available HPET timers
(typically 3).
2) The HPET driver exports the HPET device in /dev which can be used by
other kernel drivers or user programs.

In this particular case, with forcing of HPET, (1) above seems to be
working fine.
But, (2) is printing 0ns. Probably because missing HPET information in
ACPI. You may need to do some more changes in drivers/char/hpet.c in
case BIOS doesn not support HPET.

But, this will not affect normal kernel functioning. This will only
affect is someone wants to use /dev/hpet interface.

Thanks,
Venki


>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org 
>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Jon Smirl
>Sent: Wednesday, June 08, 2005 1:12 PM
>To: lkml
>Subject: Dell BIOS and HPET timer support
>
>After several communications with Dell support I have determined that
>most Dell BIOSs don't include the ACPI entry for the HPET timer. The
>official reason for this is that no version of Windows uses the HPET
>and adding the ACPI entry might cause compatibility problems.
>
>So I added this to force the HPET on:
>   extern unsigned long hpet_address;
>   hpet_address = 0xfed00000ULL;
>
>Now my HPET seems to be working:
>hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
>hpet0: 0ns tick, 3 64-bit timers
>Using HPET for base-timer
>Using HPET for gettimeofday
>
>What does the 0ns tick mean, is this bad? Is there any way to verify
>my HPET is working correctly? My date/time is advancing.
>
>If my HPET is working correctly is it ok to add a probe to 
>find the timer?
>
>-- 
>Jon Smirl
>jonsmirl@gmail.com
>-
>To unsubscribe from this list: send the line "unsubscribe 
>linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Dell BIOS and HPET timer support
@ 2005-06-08 20:11 Jon Smirl
  2005-06-08 22:02 ` Matt Domsch
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Smirl @ 2005-06-08 20:11 UTC (permalink / raw)
  To: lkml

After several communications with Dell support I have determined that
most Dell BIOSs don't include the ACPI entry for the HPET timer. The
official reason for this is that no version of Windows uses the HPET
and adding the ACPI entry might cause compatibility problems.

So I added this to force the HPET on:
   extern unsigned long hpet_address;
   hpet_address = 0xfed00000ULL;

Now my HPET seems to be working:
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 0ns tick, 3 64-bit timers
Using HPET for base-timer
Using HPET for gettimeofday

What does the 0ns tick mean, is this bad? Is there any way to verify
my HPET is working correctly? My date/time is advancing.

If my HPET is working correctly is it ok to add a probe to find the timer?

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-06-09  2:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-09  2:06 Dell BIOS and HPET timer support Pallipadi, Venkatesh
2005-06-09  2:09 ` Jon Smirl
  -- strict thread matches above, loose matches on Subject: below --
2005-06-08 22:55 Pallipadi, Venkatesh
2005-06-09  0:34 ` Jon Smirl
2005-06-09  0:57   ` Lee Revell
2005-06-09  1:38     ` Jon Smirl
2005-06-08 20:11 Jon Smirl
2005-06-08 22:02 ` Matt Domsch
2005-06-08 22:34   ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox