[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: memtestPPC ?



Ethan Benson writes:
> On Wed, Sep 05, 2001 at 12:27:46AM -0400, Albert D. Cahalan wrote:

>> The x86 world has a stand-alone memory test program called
>> memtest86 that boots from a floppy. This is great, because it
>> can test all the memory in the system. It's only a few kB in
>> size, and can move itself about as needed. It uses direct VGA
>> text memory access for output.
>
> nothing like this exists for powerpc.  you would have to write such a
> thing in Forth ideally, then you would load it directly from
> OpenFirmware.  i could be a C program too i suppose.

Forth is not good enough, and C isn't good either. One must
use assembly code to get maximum memory bus usage with the
right patterns.

>> So now I have a Mac with some bad memory, and... what do I do?
>
> replace it.

I have 3 memory modules and 3 memory module sockets. Any of
those 6 parts could be bad. If I had a tester, I'd know which
parts are broken.

>> Any hope of a stand-alone program that would take advantage of
>> the various PowerPC features (cache control & AltiVec prefetch)
>> to find memory problems?
>
> sounds like you just volunteered to write one ;-)

I'm not 100% sure I can, due to an employment agreement.
I did get an exception that might cover this though...

So lets say I do this:

1. use a chunk of arch/ppc/kernel/head.S to start
2. set up the cache and some BAT mappings
3. test memory
4. write some output... uh oh

OpenFirmware bites the dust when one clears memory AFAIK, though
one could copy it around I guess. Manual video output would
require a font (does OpenFirmware have one to grab?) and a
way to know where the video memory is. Dragging along the whole
blob of PCI and frambuffer code from Linux would kind of defeat
the purpose of a little memory tester.

> there are some userland memory testers for GNU/Linux, you can boot
> them instead of init but they still are rather limited in how much of
> the memory they can test since the kernel gets in the way.

That wouldn't be GNU/Linux, even in Stallman's messed up world.
None of the GNU system is used, not even the X11 and BSD parts
which he doesn't like to credit.

Maybe an in-kernel init should be used. Then nearly everything
could be tested. Changing the kernel's link address would help,
getting all but the bottom area tested with a pair of kernels.



Reply to: