Resetting a Broadcom in software
Hi,
A co-worker wrote the following test of the Broadcom's maths abilities and discovered that it reboots some (but not all) MIPS processors it has been tested on. It'll reboot the Sentosa, for example, but NOT the Swarm.
(Apologies for the ugly coding, btw.)
You just make the first file, the ATL_ file gets included into it. The compiler flags I'm using are:
-march=sb1 -mabi=64 -fomit-frame-pointer -O3 -mips64 -mfused-madd
The program doesn't link to anything and no linker flags are needed.
This begs three questions:
1) What is happening to cause the CPU to reset? (It's not a kernel bug, it's an actual CPU reset)
2) What is NOT happening on the Swarm, allowing it to work fine?
3) Is the problem in the category of "preventable in hardware", "preventable in the kernel", or "preventable by slowly roasting those coders who write like this"?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Quoted 30 lines · Jonathan Day
Date: Wed, 6 Sep 2006 14:41:36 -0700 (PDT)
From: Jonathan Day <[email protected]>
Subject: Resetting a Broadcom in software
To: [email protected]
Content-Type: multipart/mixed; boundary="0-1897457798-1157578896=:54718"Hi,
A co-worker wrote the following test of the Broadcom's maths abilities and discovered that it reboots some (but not all) MIPS processors it has been tested on. It'll reboot the Sentosa, for example, but NOT the Swarm.
(Apologies for the ugly coding, btw.)
You just make the first file, the
ATL_file gets included into it. The compiler flags I'm using are:(quoted diff) +0
-2-march=sb1 -mabi=64 -fomit-frame-pointer -O3 -mips64 -mfused-maddThe program doesn't link to anything and no linker flags are needed.
This begs three questions:
1) What is happening to cause the CPU to reset? (It's not a kernel bug, it's an actual CPU reset)
Quoted 7 lines
2) What is NOT happening on the Swarm, allowing it to work fine?
3) Is the problem in the category of "preventable in hardware", "preventable in the kernel", or "preventable by slowly roasting those coders who write like this"?
This is not a problem I know of but given your description it sounds very much like a hardware issue. Can you find about the exact versions of the 1250 on the various board? With the FPU being on chip I would expect some correlation between the chip revision and this issue.
Ralf
The Sentosa uses a dual-core Broadcom 1250 processor with an SB1 version 0.2 core. The board is BCM91250E Revision 1.
The Swarm also uses a Broadcom 1250 with an SB1 version 0.2 core, but the board is a BCM91250A.
Most of the difference seems to be in the motherboard, rather than the CPU, but I couldn't tell you what the difference is between an E and an A, and why the A seems better-behaved.
Quoted 8 lines · --- Ralf Baechle
This is not a problem I know of but given your description it sounds very
much like a hardware issue. Can you find about the exact versions of the
1250 on the various board? With the FPU being on chip I would expect
some correlation between the chip revision and this issue.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Quoted 11 lines · Jonathan Day
The Sentosa uses a dual-core Broadcom 1250 processor with an SB1 version 0.2 core. The board is BCM91250E Revision 1.
The Swarm also uses a Broadcom 1250 with an SB1 version 0.2 core, but the board is a BCM91250A.
Most of the difference seems to be in the motherboard, rather than the CPU, but I couldn't tell you what the difference is between an E and an A, and why the A seems better-behaved.
There are sub-types to pass 2 but I don't know how to identify those. Probably by the content of the wafer id register or something like that.
Ralf
Ok, I have the information...
Quoted 4 lines · --- Ralf Baechle
There are sub-types to pass 2 but I don't know how to identify those.
Probably by the content of the wafer id register or something like that.
Sentosa (which resets on running the program):
Wafer ID: 92cee019 Lot 9395 Wafer 23
Mfg Test: Bin A
CPU: 1040102
Linux' /proc/cpuinfo says a little more:
cpu model : SiByte SB1 V0.2
(lots of uninteresting stuff)
ASEs installed : mdmx
Swarm (which does not reset on running the program):
Wafer ID: 5838e019 Lot 5646 Wafer 7
Mfg Test: Bin A
CPU: 1040102
Linux' /proc/cpuinfo:
cpu model : SiByte SB1 V0.2 FPU 0.2
(more boring stuff)
ASEs installed : mdmx mips3d
On an aside, can anyone suggest some good values for Linux' "machine selection" kernel config menu? Well, I guess it's not really an aside as it's just occurred to me that the difference in wafer may require tweaking beyond just setting the system type. Also, if anyone knows of "must set" options elsewhere, I'd appreciate knowing.
I know some:
1. Pages are 4K, unless the big page patch is appplied (try saying that three times quickly).
2. The Broadcom tech docs don't document the presence of multi-threading in the CPU, so I'm assuming that has to be off.
3. Most of the profiling options seem to barf in ways that can only be described as spectacular.
4. I don't know which debug options are needed or not needed, but certain apparently random permutations result in a working kernel, others will cause it to explode violently on bootup.
Some third-party patches work... ...when the maintainer keeps them up-to-date. Mingo's -rt patches go in clean and seem to run fine, for example, but I'm cautious applying 2.6.17 patches to a 2.6.18-rc6 kernel (the current MIPSified Linux kernel in git).
Unfortunately, a lot of the really really good 3rd party patches are for Intel processors only, and I'm reluctant to keep a port in sync, partly for reasons of time but also because I'm not convinced I understand the mechanisms used by the truly exceptional stuff well enough to implement on a platform I'm still figuring out some of the characteristics of.
Jonathan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com