2000-12-02 04:40:43

by Adam J. Richter

[permalink] [raw]
Subject: Transmeta and Linux-2.4.0-test12-pre3

Minutes after slashdot ran their article saying that the
Transmeta recall was limited to about 300 Fujitsu computers, I ran
to Fry's and bought a Sony PictureBook PCG-C1VN. Thank heavens for
those extended Christmas hours I thought, while praying that the
statements about the Crusoe problems being that limited would turn
out to be true.

This device is the only commercially available computer in the
world that uses a processor made by Transmeta (a 600MHz TMS5600, stepping
03). I thought surely that there would be a little subculture of
Linux PictureBook users at transmeta making sure that this particular
combination would work.

Well, alas, it appears that linux-2.4.0-test12-pre3 freezes hard
while reading the base address registers of the first PCI device
(the "host bridge"). Actually, I think the problem is some kind of
system management interrupt occuring at about this time, since the
exact point where the printk's stop gets earlier as I add more
printk's. With few printk's the printk's stop while the 6th base
address configuration register is being read; with more printk's it
stops at the second one, and it will stop in different places with
different boots, at least with the not-quite-stock kernels that I usually
use. Also, turning off interrupts during this code has no effect, so
I do not think it is directly caused by the something in the PictureBook
pepperring the processor with unexpected interrupts (I thought it might have
to do with the USB-based floppy disk).

Although the results of the debugging printk's that I added from
a somewhat modified linux-2.4.0-tset12-pre3 built for CONFIG_M386, I
also tried "pristine" linux-2.4.0-test12-pre3. When built with
CONFIG_M386 (which has historically been the way to get a kernel that
runs on all x86 processors), I get no output or other apparent
activity after the boot loader jumps to it. When buid with
CONFIG_MCRUSOE, it hangs after printing "PCI: Probing PCI Hardware",
just like our kernels (which, oddly, do work up this point even though
they are build with CONFIG_M386). In case anyone is curious, I have
put the .config file from the pristine CONFIG_MCRUOSOE build in
ftp://ftp.yggdrasil.com/private/adam/linux-crusoe/.config.

My initial attempts to find a processor manual on the tms5600
on the web and on Transmeta's web site have no yet turned up anything,
and I understand that the tms5600 includes the north bridge. So, I
assume that that would be the first place to look for ideas about
any weirdness that occurs during PCI initialization of the PCI host
bridge.

One sin that I am committing in these builds is that I am bulding
them under gcc-2.95.2, although I do not think this is the sort of
behavior that an optimizer bug is likely to produce.

If anyone out there is using Linux 2.4.0-test on a Sony
PictureBook PCG-C1VN (the Transmeta version), I would be interested in
at least trying to build from your .config file.

Memo to Transmeta management: buy Linus a PictureBook. :-)

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
[email protected] \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."


2000-12-02 05:26:54

by H. Peter Anvin

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3

Followup to: <[email protected]>
By author: "Adam J. Richter" <[email protected]>
In newsgroup: linux.dev.kernel
>
> Well, alas, it appears that linux-2.4.0-test12-pre3 freezes hard
> while reading the base address registers of the first PCI device
> (the "host bridge"). Actually, I think the problem is some kind of
> system management interrupt occuring at about this time, since the
> exact point where the printk's stop gets earlier as I add more
> printk's. With few printk's the printk's stop while the 6th base
> address configuration register is being read; with more printk's it
> stops at the second one, and it will stop in different places with
> different boots, at least with the not-quite-stock kernels that I usually
> use. Also, turning off interrupts during this code has no effect, so
> I do not think it is directly caused by the something in the PictureBook
> pepperring the processor with unexpected interrupts (I thought it might have
> to do with the USB-based floppy disk).
>

It's a slight bug in the Linux PCI probing code that triggers when
there is ongoing DMA activity during PCI probing. Linus already have
a fix for it; I expect that it will be in the next prepatch.

-hpa
--
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

2000-12-02 05:41:09

by Linus Torvalds

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3

In article <[email protected]>,
Adam J. Richter <[email protected]> wrote:
>
> Well, alas, it appears that linux-2.4.0-test12-pre3 freezes hard
>while reading the base address registers of the first PCI device
>(the "host bridge"). Actually, I think the problem is some kind of
>system management interrupt occuring at about this time, since the
>exact point where the printk's stop gets earlier as I add more
>printk's.

This is due to a Linux bug, where we disable the northbridge while we do
the PCI window probes.

[ I actually suspected for a while that we'd messed up at Transmeta, but
after talking with and double-checking the PCI specs, it turns out
that Linux really was at fault. Oh, well. Whichever way I turn, I'm
always to blame ;) ]

What happens is that the Sony notebook has Legacy USB support on in the
BIOS, which causes USB DMA events several thousand times a second. When
Linux does PCI probing, Linux will turn off the MEM and IO bits in the
PCI command register of the device it probes. It so happens that
according to the PCI spec, turning off the MEM bit of the host bridge
(aka "northbridge") disconnects the host from the PCI bus.

A few microseconds later a USB legacy DMA event comes in, but now the
host bridge no longer forwards the DMA between the PCI bus and memory,
and the machine hangs. Oops.

The simplest (working) solution is to remove the jiggering with the PCI
command register IO and MEM bits in drivers/pci/pci.c: pci_read_bases().

The proper fix (which we discussed with Martin Mares and Richard
Henderson) is actually to do the full bus enumeration first, _without_
doing any window probes (and thus without having to muck with the IO and
MEM bits in the command register), and when we find the offending USB
controller that the BIOS has left active, we kill it off first (we
already have this in the PCI quirks section, it's just that the PCI
quirks get executed too late to fix this problem as it is now).

> One sin that I am committing in these builds is that I am bulding
>them under gcc-2.95.2, although I do not think this is the sort of
>behavior that an optimizer bug is likely to produce.

Nope, this is completely unrelated.

> If anyone out there is using Linux 2.4.0-test on a Sony
>PictureBook PCG-C1VN (the Transmeta version), I would be interested in
>at least trying to build from your .config file.
>
> Memo to Transmeta management: buy Linus a PictureBook. :-)

Actually, I have one, and have had one for about two weeks, but because
of the newest (human) addition to the Torvalds family I didn't have any
time to debug this until the day before yesterday.

NOTE! Getting the 2.4.x kernel up and running is the easy part. The
machine also has a very recent ATI Rage Mobility chip in it, and you
need the newest XFree86 CVS snapshot to make it work (along with a
one-liner patch from me, unless that has already made it into the CVS
tree by now).

Even then XFree86 does something bad with DPMS, and will lock up the
graphics chipset when it tries to shut down the flat panel display.
Solution: don't enable DPMS is XF86Config. That's an XFree86 problem,
but happily easily worked around.

Oh, and there's a UHCI driver bug that will bite you (again because the
machine has legacy USB enabled by default - and unlike almost every
other laptop out there, Sony didn't allow USB legacy code to be turned
off in the BIOS setup), so unless you've applied the USB patches from
the USB mailing list you'll just hang there instead.

Anyway, I do have this machine working now, although not everything is
to my liking. Unlike older picture-books, for example, this one has a
WinModem. Ugh. And the sound chip is supported, but only by the ALSA
driver (the OSS version is too broken to be used).

But the camera is cool, and works beautifully (once you get XFree86
happy) thanks to Andrew Tridgell. (If I could just coax the X server
into giving my a YUV overlay I could play DVD's with this thing).

Linus

2000-12-02 06:17:48

by Miles Lane

[permalink] [raw]
Subject: Can CMS be upgraded? -- Re: Transmeta and Linux-2.4.0-test12-pre3

If I buy one of these machines for testing,
will I be able to upgrade the processor's Code
Morphing Software with the new version when it's
ready? I hear the new CMS code will almost
double the battery life.

Thanks,
Miles

2000-12-02 07:58:53

by Linus Torvalds

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3

In article <[email protected]>,
Linus Torvalds <[email protected]> wrote:
>
>Anyway, I do have this machine working now, although not everything is
>to my liking. Unlike older picture-books, for example, this one has a
>WinModem. Ugh. And the sound chip is supported, but only by the ALSA
>driver (the OSS version is too broken to be used).

Oh - another detail: do _not_ get the latest ALSA driver: 0.5.9d is
apparently broken, while 0.5.8a works fine once you fix the MAP_NR()
issue (ie use "struct page *page = virt_to_page(addr)" instead of using
"int nr = MAP_NR(addr)", and do the arithmetic on "struct page" pointers
instead of ints.

Linus

2000-12-02 10:26:55

by Ion Badulescu

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3 [slightly off-topic]

On 1 Dec 2000 21:09:25 -0800, Linus Torvalds <[email protected]> wrote:

> Even then XFree86 does something bad with DPMS, and will lock up the
> graphics chipset when it tries to shut down the flat panel display.
> Solution: don't enable DPMS is XF86Config. That's an XFree86 problem,
> but happily easily worked around.

If it's the same bug that locks up the ATI chipset on my Dell laptop,
then you can safely enable DPMS if only enable the standby mode,
not the others (suspend and off). The panel gets turned off anyway,
even in standby.

Ion

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.

2000-12-02 13:35:44

by Alan

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3

> Anyway, I do have this machine working now, although not everything is
> to my liking. Unlike older picture-books, for example, this one has a
> WinModem. Ugh. And the sound chip is supported, but only by the ALSA
> driver (the OSS version is too broken to be used).

The OSS ymf_sb legacy driver doesn't work on the Vaio, it seems they didnt
wire it to do the sideband crap. The newer ymf driver (the experimental one)
Pete Zaitcev did should. I'll submit that from 2.2.18pre to 2.4 at some point

> But the camera is cool, and works beautifully (once you get XFree86
> happy) thanks to Andrew Tridgell. (If I could just coax the X server
> into giving my a YUV overlay I could play DVD's with this thing).

Start at http://www.core.binghamton.edu/~insomnia/gatos/

Enjoy 8)

Alan

2000-12-02 20:39:41

by Aaron Lehmann

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3

On Fri, Dec 01, 2000 at 09:09:25PM -0800, Linus Torvalds wrote:
> NOTE! Getting the 2.4.x kernel up and running is the easy part. The
> machine also has a very recent ATI Rage Mobility chip in it, and you
> need the newest XFree86 CVS snapshot to make it work (along with a
> one-liner patch from me, unless that has already made it into the CVS
> tree by now).

It seems to just have:

1067. Fix ATI clock generator recognition when an adapter BIOS
cannot be retrieved (Linus Torvals).

2000-12-03 03:32:59

by Linus Torvalds

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3 [slightly off-topic]



On Sat, 2 Dec 2000, Ion Badulescu wrote:
>
> If it's the same bug that locks up the ATI chipset on my Dell laptop,
> then you can safely enable DPMS if only enable the standby mode,
> not the others (suspend and off). The panel gets turned off anyway,
> even in standby.

Yup, same bug, and yes, "dpms standby" works, only suspend and off are
broken.

Linus

2000-12-03 03:37:20

by Mourad Lakhdar

[permalink] [raw]
Subject: how to compile redhat6.0 kernel




hi:

i wanna recompile the kernel to reset some variables "ip multicasting",
and i have a root access.

so can you please tell me in steps (detailed) , how to recompile an
installed kernel of redhat6.0.

thanx
mourad,

2000-12-03 03:57:46

by Paul Schulz

[permalink] [raw]
Subject: Re: how to compile redhat6.0 kernel

Mourad,

i wanna recompile the kernel to reset some variables "ip multicasting",
and i have a root access.

so can you please tell me in steps (detailed) , how to recompile an
installed kernel of redhat6.0.

Download the kernel source (or have a look in /usr/src/linux)
Read the 'README' in the home directory...

thanx
mourad,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/


2000-12-03 08:55:23

by Linus Torvalds

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3



On Sat, 2 Dec 2000, Alan Cox wrote:
>
> > But the camera is cool, and works beautifully (once you get XFree86
> > happy) thanks to Andrew Tridgell. (If I could just coax the X server
> > into giving my a YUV overlay I could play DVD's with this thing).
>
> Start at http://www.core.binghamton.edu/~insomnia/gatos/

Heh.

I integrated "ati_video.c" from ati_xv into the current XFree86 CVS
sources, and yup, sure as h*ll, I can play movies fine. Quite smooth (at
least the 24 fps stuff - I bet it drops frames like mad for any 30fps
movies). It's quite cute.

There's some redraw bug in the overlay code, and it doesn't understand
virtual desktops larger than the physical desktop. Details, details.

Thanks for the pointer,

Linus

2000-12-03 15:07:42

by Pete Keller

[permalink] [raw]
Subject: Re: how to compile redhat6.0 kernel

At 03:00 AM 12/3/00 +0000, Mourad wrote:



>hi:
>
>i wanna recompile the kernel to reset some variables "ip multicasting",
>and i have a root access.
>
>so can you please tell me in steps (detailed) , how to recompile an
>installed kernel of redhat6.0.
>
>thanx
>mourad,


Here is a URL for a Linux Journal article that discusses Kernel Compiling

http://www2.linuxjournal.com/lj-issues/issue43/2404.html

Pete

=-= A4C7 3342 EF0C 2504 9FBF 6808 C5C0 7A78 354A B81D =-=

Hi! I'm a signature virus! add me to your signature to help me spread!

2000-12-04 10:04:06

by Pavel Machek

[permalink] [raw]
Subject: Re: Transmeta and Linux-2.4.0-test12-pre3

Hi!

> Anyway, I do have this machine working now, although not everything is
> to my liking. Unlike older picture-books, for example, this one has a
> WinModem. Ugh. And the sound chip is supported, but only by the
~~~~~~~~~


> ALSA
> driver (the OSS version is too broken to be used).

Great! Hopefully we can get some winmodem support under linux when
even you have winmodem. [I actually have two of them; one sneaked in
in toshiba laptop [supported as answering machine with open-source
software], second sneaked in philips velo [not supported but complete
docs available]].

What kind winmodem do you have? Anyways, now we need someone to write
v.34 stack :-(. There's v.32bis stack opensource for Irix [see links
from linmodems.org], if 14k4 connectivity is enough porting that might
be the way to go.

Pavel
--
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]