* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
@ 2004-06-01 16:21 ` Matthew Wilcox
2004-06-01 16:40 ` Alex Williamson
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Matthew Wilcox @ 2004-06-01 16:21 UTC (permalink / raw)
To: linux-ia64
On Tue, Jun 01, 2004 at 09:50:48AM +0200, Christian Hildner wrote:
> someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
> + i2000) use. I want to access it directly, without using EFI calls.
It's probably different on each of them. Why do you want to access it
without going through firmware?
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
2004-06-01 16:21 ` Matthew Wilcox
@ 2004-06-01 16:40 ` Alex Williamson
2004-06-01 17:22 ` Christoph Lameter
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2004-06-01 16:40 UTC (permalink / raw)
To: linux-ia64
On Tue, 2004-06-01 at 01:50, Christian Hildner wrote:
> Hi,
>
> someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
> + i2000) use. I want to access it directly, without using EFI calls.
This is strongly not recommended. On HP chipset boxes, the devices
are only designed to be accessed via the EFI calls (and yes, EFI
firmware can and does work around bugs in the RTC). There's also no
architected way to find the real RTC in the address map. Why do you
need to poke it directly?
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
2004-06-01 16:21 ` Matthew Wilcox
2004-06-01 16:40 ` Alex Williamson
@ 2004-06-01 17:22 ` Christoph Lameter
2004-06-02 5:56 ` Christian Hildner
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Christoph Lameter @ 2004-06-01 17:22 UTC (permalink / raw)
To: linux-ia64
The portable way to access the RTC is either gettimeofday()
or clock_gettime(CLOCK_REALTIME). The gettimeofday caall is a fast system
call on many ia64 platforms and does not use EFI calls. EFI calls are only
used on bootup to determine the current RTC clock and the clock characteristics.
On Tue, 1 Jun 2004, Alex Williamson wrote:
> On Tue, 2004-06-01 at 01:50, Christian Hildner wrote:
> > Hi,
> >
> > someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
> > + i2000) use. I want to access it directly, without using EFI calls.
>
> This is strongly not recommended. On HP chipset boxes, the devices
> are only designed to be accessed via the EFI calls (and yes, EFI
> firmware can and does work around bugs in the RTC). There's also no
> architected way to find the real RTC in the address map. Why do you
> need to poke it directly?
>
> Alex
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (2 preceding siblings ...)
2004-06-01 17:22 ` Christoph Lameter
@ 2004-06-02 5:56 ` Christian Hildner
2004-06-02 6:04 ` Stephane Eranian
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Christian Hildner @ 2004-06-02 5:56 UTC (permalink / raw)
To: linux-ia64
Matthew Wilcox schrieb:
>On Tue, Jun 01, 2004 at 09:50:48AM +0200, Christian Hildner wrote:
>
>
>>someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
>>+ i2000) use. I want to access it directly, without using EFI calls.
>>
>>
>
>It's probably different on each of them. Why do you want to access it
>without going through firmware?
>
It's just because I need rtc information in an environment where no EFI
calls are possible. I am aware of the non-portability of doing so. But
there is no other way.
Christian
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (3 preceding siblings ...)
2004-06-02 5:56 ` Christian Hildner
@ 2004-06-02 6:04 ` Stephane Eranian
2004-06-02 6:26 ` Christian Hildner
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Stephane Eranian @ 2004-06-02 6:04 UTC (permalink / raw)
To: linux-ia64
Christian,
On Wed, Jun 02, 2004 at 07:56:49AM +0200, Christian Hildner wrote:
> Matthew Wilcox schrieb:
>
> >On Tue, Jun 01, 2004 at 09:50:48AM +0200, Christian Hildner wrote:
> >
> >
> >>someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
> >>+ i2000) use. I want to access it directly, without using EFI calls.
> >>
> >>
> >
> >It's probably different on each of them. Why do you want to access it
> >without going through firmware?
> >
> It's just because I need rtc information in an environment where no EFI
> calls are possible. I am aware of the non-portability of doing so. But
> there is no other way.
>
What do you mean by "rtc information"? Are you after a very fine granularity
timer?
--
-Stephane
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (4 preceding siblings ...)
2004-06-02 6:04 ` Stephane Eranian
@ 2004-06-02 6:26 ` Christian Hildner
2004-06-02 6:41 ` Christian Hildner
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Christian Hildner @ 2004-06-02 6:26 UTC (permalink / raw)
To: linux-ia64
Alex Williamson schrieb:
>On Tue, 2004-06-01 at 01:50, Christian Hildner wrote:
>
>
>>Hi,
>>
>>someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
>>+ i2000) use. I want to access it directly, without using EFI calls.
>>
>>
>
> This is strongly not recommended. On HP chipset boxes, the devices
>are only designed to be accessed via the EFI calls (and yes, EFI
>firmware can and does work around bugs in the RTC). There's also no
>architected way to find the real RTC in the address map.
>
So the only chance to access the rtc directly is to do it the same way
the firmware does. Since the firmware is that hardware specific it does
not need to "find" it because the firmware already knows where the rtc
is and how to access it. If the rtc is not mapped in the conventional
port address map, how does the firmware access it? Is there a
firmware-only accessible io memory map or is it done with machine
specific registers (msr)?
> Why do you
>need to poke it directly?
>
Because I need to call it from an environment, where no EFI calls are
possible. I know that the solution is absolutely not portable in any way
and in common it is bad doing that way but in that special case there is
no other way to go. And the portability is given at another layer on
top of it.
Christian
> Alex
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (5 preceding siblings ...)
2004-06-02 6:26 ` Christian Hildner
@ 2004-06-02 6:41 ` Christian Hildner
2004-06-02 6:51 ` Stephane Eranian
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Christian Hildner @ 2004-06-02 6:41 UTC (permalink / raw)
To: linux-ia64
Stephane Eranian schrieb:
>Christian,
>
>On Wed, Jun 02, 2004 at 07:56:49AM +0200, Christian Hildner wrote:
>
>
>>Matthew Wilcox schrieb:
>>
>>
>>
>>>On Tue, Jun 01, 2004 at 09:50:48AM +0200, Christian Hildner wrote:
>>>
>>>
>>>
>>>
>>>>someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
>>>>+ i2000) use. I want to access it directly, without using EFI calls.
>>>>
>>>>
>>>>
>>>>
>>>It's probably different on each of them. Why do you want to access it
>>>without going through firmware?
>>>
>>>
>>>
>>It's just because I need rtc information in an environment where no EFI
>>calls are possible. I am aware of the non-portability of doing so. But
>>there is no other way.
>>
>>
>>
>What do you mean by "rtc information"? Are you after a very fine granularity
>timer?
>
I just need access to a rtc device on the HP ZX 6000 comparable to that
Dallas devices on PC boards.
Christian
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (6 preceding siblings ...)
2004-06-02 6:41 ` Christian Hildner
@ 2004-06-02 6:51 ` Stephane Eranian
2004-06-02 7:01 ` Christian Hildner
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Stephane Eranian @ 2004-06-02 6:51 UTC (permalink / raw)
To: linux-ia64
Christian,
On Wed, Jun 02, 2004 at 08:41:53AM +0200, Christian Hildner wrote:
> Stephane Eranian schrieb:
>
> >Christian,
> >
> >On Wed, Jun 02, 2004 at 07:56:49AM +0200, Christian Hildner wrote:
> >
> >
> >>Matthew Wilcox schrieb:
> >>
> >>
> >>
> >>>On Tue, Jun 01, 2004 at 09:50:48AM +0200, Christian Hildner wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
> >>>>+ i2000) use. I want to access it directly, without using EFI calls.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>It's probably different on each of them. Why do you want to access it
> >>>without going through firmware?
> >>>
> >>>
> >>>
> >>It's just because I need rtc information in an environment where no EFI
> >>calls are possible. I am aware of the non-portability of doing so. But
> >>there is no other way.
> >>
> >>
> >>
> >What do you mean by "rtc information"? Are you after a very fine
> >granularity
> >timer?
> >
> I just need access to a rtc device on the HP ZX 6000 comparable to that
> Dallas devices on PC boards.
>
I am sorry but I don't know that device. What functionality of that device
is of interest to you?
--
-Stephane
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (7 preceding siblings ...)
2004-06-02 6:51 ` Stephane Eranian
@ 2004-06-02 7:01 ` Christian Hildner
2004-06-02 7:14 ` Stephane Eranian
2004-06-02 7:22 ` Robin Holt
10 siblings, 0 replies; 12+ messages in thread
From: Christian Hildner @ 2004-06-02 7:01 UTC (permalink / raw)
To: linux-ia64
Stephane Eranian schrieb:
>Christian,
>
>On Wed, Jun 02, 2004 at 08:41:53AM +0200, Christian Hildner wrote:
>
>
>>Stephane Eranian schrieb:
>>
>>
>>
>>>Christian,
>>>
>>>On Wed, Jun 02, 2004 at 07:56:49AM +0200, Christian Hildner wrote:
>>>
>>>
>>>
>>>
>>>>Matthew Wilcox schrieb:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>On Tue, Jun 01, 2004 at 09:50:48AM +0200, Christian Hildner wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>someone may know what kind of RTC device the ia64 platforms (HP ZX 6000
>>>>>>+ i2000) use. I want to access it directly, without using EFI calls.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>It's probably different on each of them. Why do you want to access it
>>>>>without going through firmware?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>It's just because I need rtc information in an environment where no EFI
>>>>calls are possible. I am aware of the non-portability of doing so. But
>>>>there is no other way.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>What do you mean by "rtc information"? Are you after a very fine
>>>granularity
>>>timer?
>>>
>>>
>>>
>>I just need access to a rtc device on the HP ZX 6000 comparable to that
>>Dallas devices on PC boards.
>>
>>
>>
>I am sorry but I don't know that device. What functionality of that device
>is of interest to you?
>
It is just getting an absolute time without any calls to firmware or linux.
Christian
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (8 preceding siblings ...)
2004-06-02 7:01 ` Christian Hildner
@ 2004-06-02 7:14 ` Stephane Eranian
2004-06-02 7:22 ` Robin Holt
10 siblings, 0 replies; 12+ messages in thread
From: Stephane Eranian @ 2004-06-02 7:14 UTC (permalink / raw)
To: linux-ia64
Christian,
> >>Dallas devices on PC boards.
> >>
> >>
> >>
> >I am sorry but I don't know that device. What functionality of that device
> >is of interest to you?
> >
> It is just getting an absolute time without any calls to firmware or linux.
>
at least on UP, can't you use a combination of gettimeofday() once and then use
ar.itc (equivalent of TSC) to make the appropriate adjustments. Also note
that on 2.6 with the right version of glibc, gettimeofday() is extremely fast.
--
-Stephane
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Real time clock on ia64 platforms
2004-06-01 7:50 Real time clock on ia64 platforms Christian Hildner
` (9 preceding siblings ...)
2004-06-02 7:14 ` Stephane Eranian
@ 2004-06-02 7:22 ` Robin Holt
10 siblings, 0 replies; 12+ messages in thread
From: Robin Holt @ 2004-06-02 7:22 UTC (permalink / raw)
To: linux-ia64
On Wed, Jun 02, 2004 at 08:26:53AM +0200, Christian Hildner wrote:
> Alex Williamson schrieb:
>
> >On Tue, 2004-06-01 at 01:50, Christian Hildner wrote:
> > Why do you
> >need to poke it directly?
> >
> Because I need to call it from an environment, where no EFI calls are
> possible. I know that the solution is absolutely not portable in any way
> and in common it is bad doing that way but in that special case there is
> no other way to go. And the portability is given at another layer on
> top of it.
What are you doing with it? Can you just use ITC in the realtime sensitive
portion of your code and then convert ITC ticks back into clock time as
needed?
Robin Holt
^ permalink raw reply [flat|nested] 12+ messages in thread