* About HPET is_hpet_capable()
@ 2011-08-09 8:28 limp
2011-08-09 8:57 ` Stratos Psomadakis
0 siblings, 1 reply; 2+ messages in thread
From: limp @ 2011-08-09 8:28 UTC (permalink / raw)
To: kernelnewbies
Hi all,
I am having a deeper look on Linux hpet code and I was wondering how exactly
is_hpet_capable() works.
>From the name of it, I assume that this function checks if the system
supports HPET or not but I can't really tell how it does that.
The function is the following:
static inline int is_hpet_capable(void)
{
return !boot_hpet_disable && hpet_address;
}
Could anyone help me understand how this works?
Regards.
^ permalink raw reply [flat|nested] 2+ messages in thread
* About HPET is_hpet_capable()
2011-08-09 8:28 About HPET is_hpet_capable() limp
@ 2011-08-09 8:57 ` Stratos Psomadakis
0 siblings, 0 replies; 2+ messages in thread
From: Stratos Psomadakis @ 2011-08-09 8:57 UTC (permalink / raw)
To: kernelnewbies
On 08/09/2011 11:28 AM, limp wrote:
> Hi all,
>
> I am having a deeper look on Linux hpet code and I was wondering how exactly
> is_hpet_capable() works.
> >From the name of it, I assume that this function checks if the system
> supports HPET or not but I can't really tell how it does that.
>
> The function is the following:
>
> static inline int is_hpet_capable(void)
> {
> return !boot_hpet_disable && hpet_address;
> }
>
> Could anyone help me understand how this works?
>
> Regards.
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
boot_hpet_disable is a boot time param, which as the name suggests
disables the hpet timer(nohpet is the actual parameter given to the
kernel by the bootloader I think)...
hpet_address is the address where the hpet timers are mapped, which is
read by the kernel from the BIOS ACPI table for hpet I think...
If you look at the code that does the actual initialization for hpet,
it's a bit more complicated than that, but generally, this function
checks whether HPET is disabled at boot time, and if a suitable entry /
address for HPET timers is found in the BIOS ACPI tables (if it's not
found, the hpet_address will be NULL). So if hpet is enabled, and an
address is found, this function returns 1/true. Else 0/false.
--
Stratos Psomadakis
<s.psomadakis@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-09 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-09 8:28 About HPET is_hpet_capable() limp
2011-08-09 8:57 ` Stratos Psomadakis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.