chromiumos/third_party/memtest.git
2 years agoRemove the hack which prevents detecting additional CPUs. 91/18191/1 factory-1987.B factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-butterfly-2788.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-pit-4482.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-stout-2817.B firmware-wolf-4389.24.B master release-R19-2046.B release-R20-2268.B release-R21-2465.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize-spring-4100.53.B stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA toolchainB
Gabe Black [Thu, 15 Mar 2012 01:27:49 +0000 (18:27 -0700)]
Remove the hack which prevents detecting additional CPUs.

Now that serial output is fixed, this doesn't seem to be necessary any more.

BUG=chromium-os:26458
TEST=Ran on Stumpy with serial fixed and didn't see any problems. It ran long
enough to go through all the tests 3 times. I'll leave it running and continue
to watch for errors/strange behavior.

Change-Id: Id46f48429494f99fd3e936dda5bffcaf1d14614e
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoAdd a lock around the ttyprint function. 90/18190/1
Gabe Black [Thu, 15 Mar 2012 01:20:31 +0000 (18:20 -0700)]
Add a lock around the ttyprint function.

The ttyprint function is responsible for outputing text to the serial console
in a particular location. If two CPUs interrupt each other with serial output,
the escape sequences they use to move around the screen interleave and are
actually printed, and the cursor isn't moved.

This change adds a lock around the contents of ttyprint so that there won't be
any overlap. There is still no lock around serial_echo_init which is actually
used to write to the serial port. This is only called in one other place when
the BSP is initializing the display the first time around, so as used currently
there doesn't need to be a lock. Theoretically though, that code could be
called in other contexts and could exhibit this same problem. Because the
problem is only theoretical for now and fixing it would add otherwise
unnecessary overhead, I've left that out.

BUG=chromium-os:26458
TEST=Ran on Stumpy with SMP reenabled and saw serial artifacts go away.

Change-Id: I07d8fe3184291439ee7aa1bf1cf08a60b913d550
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoMake the assembly blobs in test.c conform to the ABI. 05/18105/2
Gabe Black [Wed, 14 Mar 2012 09:07:08 +0000 (02:07 -0700)]
Make the assembly blobs in test.c conform to the ABI.

Two blobs weren't saving the right registers as far as the ABI is concerned.
Most of the blobs were missing the condition codes and memory from their
clobber lists.

BUG=chromium-os:26458
TEST=Built and ran on Stumpy and saw some test failures go away.

Signed-off-by: Gabe Black <gabeblack@google.com>
Change-Id: Id591f8eaa1c0558853d92a6d15cfc1806edc1c70

2 years agoFix warnings in assembly blobs. 04/18104/2
Gabe Black [Wed, 14 Mar 2012 05:58:37 +0000 (22:58 -0700)]
Fix warnings in assembly blobs.

gcc was triggering warnings when building memtest because there were matching
assembly constraints which couldn't be put in registers. The constraints were
set up that way because there was no way to specify using %ebp, the last
available register. Instead of specifying %ebp directly, the code now simply
asks for *a* register, and because %ebp is the only one left, it's used.

BUG=chromium-os:26458
TEST=Built and ran on Stumpy.

Change-Id: I304ea3aa7a04efb6664d9b93621dfc98f1a802e1
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoForce the number of CPUs to 1. 51/17751/2
Gabe Black [Fri, 9 Mar 2012 08:56:40 +0000 (00:56 -0800)]
Force the number of CPUs to 1.

memtest86 doesn't work very well when there's more than one CPU, so this hack
temporarily forces it to see only one. The support should ultimately be fixed
and this hack removed.

BUG=chromium-os:26458
TEST=Built and saw many defects in the serial interface go away.

Change-Id: I33911ba128c06ad29b3ad59d63bcdc301902c8d7
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoLinux BIOS/coreboot table updates. 50/17750/2
Gabe Black [Fri, 9 Mar 2012 07:45:12 +0000 (23:45 -0800)]
Linux BIOS/coreboot table updates.

These changes update the Linux BIOS/coreboot table support in memtest which
is apparently pretty old.

BUG=chromium-os:26458
TEST=Built and ran on Stumpy and saw memtest start, which presumably means it
found the memory layout information in the coreboot tables.

Change-Id: I92831c7c527e0717cd37b4b4319a621e06a1d2e0
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoTurn on serial port output. 49/17749/2
Gabe Black [Thu, 8 Mar 2012 06:45:43 +0000 (22:45 -0800)]
Turn on serial port output.

BUG=chromium-os:26458
TEST=Boot on Stumpy and see serial output.

Change-Id: Id963f0a64fa88129376e263145e26e3dfb92e5a7
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoAdd -fno-stack-protector to test.c and random.c in the Makefile. 48/17748/2
Gabe Black [Thu, 8 Mar 2012 04:55:37 +0000 (20:55 -0800)]
Add -fno-stack-protector to test.c and random.c in the Makefile.

Without this flag (which the other files already use) rest.c and random.c have
stack protection built in which requires a symbol to be defined which
memtest doesn't provide.

BUG=chromium-os:26458
TEST=Built memtest with the target compiler.

Change-Id: I4dd2ff92200b4c9acda5349ecab6ce43cd8409a0
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agoFix up the assembly blobs in test.c so they don't use register %ebx. 47/17747/1
Gabe Black [Thu, 8 Mar 2012 04:45:59 +0000 (20:45 -0800)]
Fix up the assembly blobs in test.c so they don't use register %ebx.

These changes *shouldn't* affect what these blobs are doing, but it's hard to
say for sure. They may be set up to do accesses in very particular ways which
this may break. The clobber lists for these blobs are also generally wrong
because they don't include the condition codes or memory.

BUG=chromium-os:26458
TEST=Compiled test.c successfully.

Change-Id: I89f1859c8493d905b4ade2f760e0bba0a31721ef
Signed-off-by: Gabe Black <gabeblack@google.com>
2 years agomemtest source code 62/15962/1
Vadim Bendebury [Wed, 15 Feb 2012 22:00:18 +0000 (14:00 -0800)]
memtest source code

Original submission, untarred
http://www.memtest86.com/memtest86-4.0a.tar.gz.

BUG=chromium-os:26458
TEST=none