* [Fwd: Re: [parisc-linux] PDC woes]
@ 1999-07-12 8:51 Helge Deller
1999-07-12 13:12 ` Mike Shaver
0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 1999-07-12 8:51 UTC (permalink / raw)
To: parisc-linux
[-- Attachment #1: Type: text/plain, Size: 2790 bytes --]
If this message goes through, does anybody have any ideas, why my mails
sent from Netscape/Win95 goes through to the list, but those from
Netscape/Linux not ????
Thanks,
Helge.
(This message was sent with Netscape/Win95, the message below with
Netscape/Linux).
-------- Original Message --------
Betreff: Re: [parisc-linux] PDC woes
Datum: Mon, 12 Jul 1999 01:08:45 +0200
Von: Helge Deller <Helge.Deller@ruhr-uni-bochum.de>
An: Matthew Wilcox <Matthew.Wilcox@genedata.com>
CC: parisc-linux@thepuffingroup.com
Referenzen: <19990711011852.A25925@mencheca.ch.genedata.com>
Matthew Wilcox wrote:
> Philipp asked me to write a function to calculate the frequency of the
> interval timer. However, the PDC doesn't want to cooperate. I see
> `hello' printed on the screen, but not `world'. So somehow this PDC
> call is going wrong. Anyone have any clues? pim_info is not very
> revealing. If it helps anyone, the blinkenlights on my 715/33 are at:
>
> 10110010
>
> Is there a document somewhere describing what the blinkenlights mean?
>
>
> Here's the function:
>
> /*
> * Find the interval timer frequency.
> */
> static long calculate_interval_timer_frequency(void)
> {
> long exponent, mantissa, result;
> long buf[4] __attribute__ ((aligned (8)));
> printk("hello\n");
> (*pdc) (PDC_TOD, PDC_TOD_ITIMER, buf, 0);
> printk("world\n");
> exponent = (buf[0] >> 20) & 0x7ff;
> mantissa = (buf[0] & 0xfffff) | 0x100000;
> result = (mantissa >> (1038 - exponent)) * 625 * 625;
> printk("exponent = %ld mantissa = %ld result = %ld\n", exponent, mantissa, resul
> t);
> return result;
> }
>
> --
> Matthew Wilcox <willy@bofh.ai>
> "Windows and MacOS are products, contrived by engineers in the service of
> specific companies. Unix, by contrast, is not so much a product as it is a
> painstakingly compiled oral history of the hacker subculture." - N Stephenson
Hi Matthew !
I took a little look at your code and found the problem(s):
1. When you call PDC-functions and want them to report values back into
a
result-buffer, this result-buffer always has to be a minimum of 32 longs
in size
and aligned (alignment differs from double-word bondaries to
4096-byte-boundaries
!).
The Problem was, that you only reserved a buffer for 4 longs, and so the
pdc-function overwrote the calling-stack, ergo: the pdc-call never
returned!
2. Maybe you also have to change (you should try!)
(*pdc) (PDC_TOD, PDC_TOD_ITIMER, buf, 0);
to
(*pdc) (PDC_TOD, PDC_TOD_ITIMER, &buf, 0); (the &-sign..)
The new code looks then like the attachment.... and it worked here (But
I don´t
know, if the values are correct!).
my output here was: exponent = 1029, mantissa = 1048576 result =
800000000
I hope that I could help you,
Helge.
[-- Attachment #2: timer_calc.c --]
[-- Type: text/plain, Size: 583 bytes --]
/*
* Find the interval timer frequency.
*/
static long calculate_interval_timer_frequency(void)
{
long exponent, mantissa, result;
long buf[32] __attribute__ ((aligned (8)));
//changed to 32
printk("hello\n");
(*pdc) (PDC_TOD, PDC_TOD_ITIMER, &buf, 0);
//changed to &buf
printk("world\n");
exponent = (buf[0] >> 20) & 0x7ff;
mantissa = (buf[0] & 0xfffff) | 0x100000;
result = (mantissa >> (1038 - exponent)) * 625 * 625;
printk("exponent = %d mantissa = %d result = %d\n",
exponent, mantissa, result);
return result;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Fwd: Re: [parisc-linux] PDC woes]
1999-07-12 8:51 [Fwd: Re: [parisc-linux] PDC woes] Helge Deller
@ 1999-07-12 13:12 ` Mike Shaver
1999-07-12 17:42 ` E-Mail Problems Helge Deller
0 siblings, 1 reply; 3+ messages in thread
From: Mike Shaver @ 1999-07-12 13:12 UTC (permalink / raw)
To: Helge Deller; +Cc: parisc-linux
Helge Deller wrote:
>
> If this message goes through, does anybody have any ideas, why my mails
> sent from Netscape/Win95 goes through to the list, but those from
> Netscape/Linux not ????
> Thanks,
> Helge.
> (This message was sent with Netscape/Win95, the message below with
> Netscape/Linux).
>
>
> Betreff: Re: [parisc-linux] PDC woes
> Datum: Mon, 12 Jul 1999 01:08:45 +0200
> Von: Helge Deller <Helge.Deller@ruhr-uni-bochum.de>
> An: Matthew Wilcox <Matthew.Wilcox@genedata.com>
I bet the mailing list software doesn't like the non-English headers.
Mike
--
428102.37 371017.85
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: E-Mail Problems..
1999-07-12 13:12 ` Mike Shaver
@ 1999-07-12 17:42 ` Helge Deller
0 siblings, 0 replies; 3+ messages in thread
From: Helge Deller @ 1999-07-12 17:42 UTC (permalink / raw)
To: Mike Shaver, parisc-linux
Sorry to disturb the list with my private mail problems !
If anyone has an idea, I would really like to solve this problem here, else I
will STOP this thread and write my mails only with Win95 (of course I would
prefer Linux much more...).
Thanks,
Helge.
Please read on, if you want to help me:
----------------------------------------
Mike Shaver schrieb:
> Helge Deller wrote:
> >
> > If this message goes through, does anybody have any ideas, why my mails
> > sent from Netscape/Win95 goes through to the list, but those from
> > Netscape/Linux not ????
> > Thanks,
> > Helge.
> > (This message was sent with Netscape/Win95, the message below with
> > Netscape/Linux).
> >
> >
> > Betreff: Re: [parisc-linux] PDC woes
> > Datum: Mon, 12 Jul 1999 01:08:45 +0200
> > Von: Helge Deller <Helge.Deller@ruhr-uni-bochum.de>
> > An: Matthew Wilcox <Matthew.Wilcox@genedata.com>
>
> I bet the mailing list software doesn't like the non-English headers.
>
> Mike
Yes, of course you are right, but it was my fault to ask the question like I
did....(and I thought, that it won't get through!).
Here are the original-Mail-headers (Netscape automatically tranlated the second
mail-header, before it was inserted into my forwared mail):
******************************************************
Mail-Header, which went trough (Netscape/Win95)
--------------------------------------------------------------------
X-Mozilla-Status: 8001
X-Mozilla-Status2: 00000000
Message-ID: <3789ACA8.20302CBA@ruhr-uni-bochum.de>
Date: Mon, 12 Jul 1999 10:51:52 +0200
From: Helge Deller <Helge.Deller@ruhr-uni-bochum.de>
X-Mailer: Mozilla 4.51 [de]C-CCK-MCD QXW03200 (Win95; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: parisc-linux <parisc-linux@thepuffingroup.com>
Subject: [Fwd: Re: [parisc-linux] PDC woes]
Content-Type: multipart/mixed;
boundary="------------447487C03A72049BA408CDB6"
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------447487C03A72049BA408CDB6
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
If this message goes through, does anybody have any ideas, why my mails
sent from Netscape/Win95 goes through to the list, but those from
Netscape/Linux not ????
Thanks,
Helge.
(This message was sent with Netscape/Win95, the message below with
Netscape/Linux).
.<I deleted the rest..>
*********************************************************
Here is the Mail-Header, which did NOT went through (Netscape/Linux)
----------------------------------------------------
X-Mozilla-Status: 9011
X-Mozilla-Status2: 00000000
Message-ID: <378923FD.65F5D7BF@ruhr-uni-bochum.de>
Date: Mon, 12 Jul 1999 01:08:45 +0200
From: Helge Deller <Helge.Deller@ruhr-uni-bochum.de>
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.2.9 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Matthew Wilcox <Matthew.Wilcox@genedata.com>
CC: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] PDC woes
References: <19990711011852.A25925@mencheca.ch.genedata.com>
Content-Type: multipart/mixed;
boundary="------------4621FAFCBE0BBA24E978776D"
This is a multi-part message in MIME format.
--------------4621FAFCBE0BBA24E978776D
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Matthew Wilcox wrote:
> Philipp asked me t........
.<I deleted the rest..>
***********************************************************
Does anybody has an idea ??
Please notice, that Netscape/95 is english & german (and worked!), while
Netscape/Linux is the english-only-version (and didn't worked!).
Thanks,
Helge.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-07-12 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-12 8:51 [Fwd: Re: [parisc-linux] PDC woes] Helge Deller
1999-07-12 13:12 ` Mike Shaver
1999-07-12 17:42 ` E-Mail Problems Helge Deller
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.