You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(79) |
Aug
(27) |
Sep
(64) |
Oct
(202) |
Nov
(31) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(173) |
Mar
(13) |
Apr
(140) |
May
(75) |
Jun
(1) |
Jul
(37) |
Aug
(14) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(2) |
2003 |
Jan
(51) |
Feb
(12) |
Mar
(18) |
Apr
(24) |
May
(1) |
Jun
|
Jul
|
Aug
(72) |
Sep
(12) |
Oct
(18) |
Nov
(60) |
Dec
(26) |
2004 |
Jan
(1) |
Feb
(40) |
Mar
(3) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(5) |
2006 |
Jan
(13) |
Feb
(5) |
Mar
(8) |
Apr
(13) |
May
(7) |
Jun
(6) |
Jul
(10) |
Aug
(6) |
Sep
(6) |
Oct
(35) |
Nov
(20) |
Dec
(10) |
2007 |
Jan
(13) |
Feb
(9) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(54) |
Jun
(78) |
Jul
(35) |
Aug
(21) |
Sep
(21) |
Oct
(29) |
Nov
(10) |
Dec
(5) |
2010 |
Jan
|
Feb
|
Mar
(26) |
Apr
(55) |
May
(73) |
Jun
(63) |
Jul
(38) |
Aug
(39) |
Sep
(19) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Stefan E. <ste...@el...> - 2002-02-22 12:18:26
|
On Thu, Feb 21, 2002 at 01:18:38PM -0800, Christopher Hoover wrote: > > Wouldn't we be better off with a #define in <platform>.h for the default > terminal baud rate rather than this ever-growing #if expression? Yup, indeed :^) > > -ch > > |
From: Russ D. <ru...@us...> - 2002-02-22 07:30:08
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv5901 Modified Files: param_block.h Log Message: add a version number to the magic number to prevent someone from losing a board Index: param_block.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/param_block.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- param_block.h 21 Jan 2002 19:45:16 -0000 1.3 +++ param_block.h 22 Feb 2002 07:30:05 -0000 1.4 @@ -37,7 +37,8 @@ #include <blob/types.h> -#define PTAG_MAGIC 0x32d27000 /* base 26 blob */ +#define PTAG_VER 0x1 +#define PTAG_MAGIC (0x32d27000 + (PTAG_VER << 3)) /* base 26 blob + version */ /* The list ends with an PTAG_NONE node. */ #define PTAG_NONE 0x00000000 |
From: Russ D. <Rus...@as...> - 2002-02-22 07:26:49
|
On Wed, 2002-01-23 at 14:44, Christopher Hoover wrote: > > Russ, > > Here are the params and param block that caused my board to hiccup. > > Ciao! > Christopher. ok, sorry it took so long to get back to you, but here's the problem: I took out a bunch of "intelligent config" fields in the header, when blob tried to read the baud rate from the core tag, it got zero and set the baud to 230400. I am going to change the magic number of the paramater block by 1. Any future changes that can cause blob to become confused will also change the magic too. In this case, 230400 *is* a sane value for baud, but it doesn't work. Since baud is so important, I think that I will put a validation in there, two fields, one baud, and the other one (baud XOR 0x5A5AA5A5, thus reducing the chance of that field getting corrupted and the unit being unreachable. Before I implement a XOR baud field, are there any better ideas (I'll implement the magic change right now) |
From: Christopher H. <ch...@mu...> - 2002-02-21 21:18:48
|
Wouldn't we be better off with a #define in <platform>.h for the default terminal baud rate rather than this ever-growing #if expression? -ch > -----Original Message----- > From: blo...@li... > [mailto:blo...@li...] On > Behalf Of Stefan Eletzhofer > Sent: Thursday, February 21, 2002 6:22 AM > To: blo...@li... > Subject: CVS: blob/src/blob main.c,1.35,1.36 > > > Update of /cvsroot/blob/blob/src/blob > In directory usw-pr-cvs1:/tmp/cvs-serv6997 > > Modified Files: > main.c > Log Message: > make 115k2 default for system 3 too > > > Index: main.c > =================================================================== > RCS file: /cvsroot/blob/blob/src/blob/main.c,v > retrieving revision 1.35 > retrieving revision 1.36 > diff -u -d -r1.35 -r1.36 > --- main.c 17 Feb 2002 15:41:54 -0000 1.35 > +++ main.c 21 Feb 2002 14:21:35 -0000 1.36 > @@ -93,11 +93,8 @@ > > /* call serial_init() because the default 9k6 speed might not > be what the user requested */ > -#if defined(H3600) || defined(SHANNON) || defined(IDR) || > defined(BADGE4) || defined(JORNADA720) || defined(ACCELENT_SA) > +#if defined(H3600) || defined(SHANNON) || defined(IDR) || > +defined(BADGE4) || defined(JORNADA720) || > defined(ACCELENT_SA) || defined(PT_SYSTEM3) > blob_status.terminalSpeed = baud_115200; /* DEBUG */ > -#endif > -#if defined(PT_SYSTEM3) > - blob_status.terminalSpeed = baud_38400; > #endif > serial_init(blob_status.terminalSpeed); > > > > _______________________________________________ > blob-cvs-commit mailing list blo...@li... > https://lists.sourceforge.net/lists/listinfo/blob-cvs-commit > |
From: Stefan E. <se...@us...> - 2002-02-21 14:48:35
|
Update of /cvsroot/blob/blob/include/blob/arch In directory usw-pr-cvs1:/tmp/cvs-serv21253 Modified Files: system3.h Log Message: - use macros for MECR value for better readability Index: system3.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/system3.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- system3.h 21 Feb 2002 14:23:48 -0000 1.10 +++ system3.h 21 Feb 2002 14:48:31 -0000 1.11 @@ -77,18 +77,19 @@ /* Memory configuration */ #ifdef BLOB_NEED_MEMCONFIG -#define MSC0_VALUE_66_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(10) | MSC_RDN(2) | MSC_RRR(1) -#define MSC0_VALUE_66_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 8) | MSC_RDN(2) | MSC_RRR(1) -#define MSC0_VALUE_66_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 7) | MSC_RDN(2) | MSC_RRR(1) -#define MSC1_VALUE_66 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1) | ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) -#define MSC2_VALUE_66 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(7) | MSC_RDN(2) | MSC_RRR(1) -#define MECR_VALUE_66 0x7FFF7FFF -#define MSC0_VALUE_100_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(16) | MSC_RDN(3) | MSC_RRR(2) -#define MSC0_VALUE_100_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(13) | MSC_RDN(3) | MSC_RRR(2) -#define MSC0_VALUE_100_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(11) | MSC_RDN(3) | MSC_RRR(2) -#define MSC1_VALUE_100 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1)| ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) -#define MSC2_VALUE_100 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(9) | MSC_RDN(2) | MSC_RRR(1) -#define MECR_VALUE_100 0x7FFF7FFF +#define MSC0_VALUE_66_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(10) | MSC_RDN(2) | MSC_RRR(1) +#define MSC0_VALUE_66_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 8) | MSC_RDN(2) | MSC_RRR(1) +#define MSC0_VALUE_66_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 7) | MSC_RDN(2) | MSC_RRR(1) +#define MSC1_VALUE_66 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1) | ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) +#define MSC2_VALUE_66 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(7) | MSC_RDN(2) | MSC_RRR(1) +#define MECR_VALUE_66 MECR_BSIO0(0x1f) | MECR_BSA0(0x1f) | MECR_BSM0(0x1f) | MECR_BSIO1(0x1f) | MECR_BSA1(0x1f) | MECR_BSM1(0x1f) + +#define MSC0_VALUE_100_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(16) | MSC_RDN(3) | MSC_RRR(2) +#define MSC0_VALUE_100_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(13) | MSC_RDN(3) | MSC_RRR(2) +#define MSC0_VALUE_100_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(11) | MSC_RDN(3) | MSC_RRR(2) +#define MSC1_VALUE_100 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1)| ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) +#define MSC2_VALUE_100 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(9) | MSC_RDN(2) | MSC_RRR(1) +#define MECR_VALUE_100 MECR_BSIO0(0x1f) | MECR_BSA0(0x1f) | MECR_BSM0(0x1f) | MECR_BSIO1(0x1f) | MECR_BSA1(0x1f) | MECR_BSM1(0x1f) #ifndef CPU_SPEED_133 // 206 Mhz |
From: Stefan E. <se...@us...> - 2002-02-21 14:47:24
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv20799 Modified Files: memsetup.h Log Message: - defines for MECR register Index: memsetup.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/memsetup.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- memsetup.h 11 Feb 2002 16:54:23 -0000 1.6 +++ memsetup.h 21 Feb 2002 14:47:19 -0000 1.7 @@ -101,4 +101,18 @@ #define MSC_RDN(n_) (((n_)&0x1f)<<8) #define MSC_RRR(n_) (((n_)&0x7)<<13) +/********************************************************************** + * PCMCIA memory config register + */ +/* PCMCIA */ +#define MECR_BSIO0(n_) (((n_)&0x1f)<<0) +#define MECR_BSA0(n_) (((n_)&0x1f)<<5) +#define MECR_BSM0(n_) (((n_)&0x1f)<<10) +#define MECR_FAST0 (1<<15) +/* CF */ +#define MECR_BSIO1(n_) (((n_)&0x1f)<<16) +#define MECR_BSA1(n_) (((n_)&0x1f)<<21) +#define MECR_BSM1(n_) (((n_)&0x1f)<<26) +#define MECR_FAST1 (1<<31) + #endif |
From: Stefan E. <se...@us...> - 2002-02-21 14:23:51
|
Update of /cvsroot/blob/blob/include/blob/arch In directory usw-pr-cvs1:/tmp/cvs-serv7834 Modified Files: system3.h Log Message: - standard clock rate set to 191MHz - dont set MECR_FAST0 and MECR_FAST1 Index: system3.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/system3.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- system3.h 7 Jan 2002 16:31:25 -0000 1.9 +++ system3.h 21 Feb 2002 14:23:48 -0000 1.10 @@ -32,7 +32,10 @@ #ifdef CPU_SPEED_133 # define CPU_SPEED (0x05) #else -# define CPU_SPEED (0x0a) +/* 206 MHz */ +//# define CPU_SPEED (0x0a) +/* 191 MHz */ +# define CPU_SPEED (0x09) #endif /* serial port */ @@ -79,13 +82,13 @@ #define MSC0_VALUE_66_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 7) | MSC_RDN(2) | MSC_RRR(1) #define MSC1_VALUE_66 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1) | ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) #define MSC2_VALUE_66 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(7) | MSC_RDN(2) | MSC_RRR(1) -#define MECR_VALUE_66 0xFFFFFFFF +#define MECR_VALUE_66 0x7FFF7FFF #define MSC0_VALUE_100_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(16) | MSC_RDN(3) | MSC_RRR(2) #define MSC0_VALUE_100_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(13) | MSC_RDN(3) | MSC_RRR(2) #define MSC0_VALUE_100_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(11) | MSC_RDN(3) | MSC_RRR(2) #define MSC1_VALUE_100 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1)| ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) #define MSC2_VALUE_100 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(9) | MSC_RDN(2) | MSC_RRR(1) -#define MECR_VALUE_100 0xFFFFFFFF +#define MECR_VALUE_100 0x7FFF7FFF #ifndef CPU_SPEED_133 // 206 Mhz |
From: Stefan E. <se...@us...> - 2002-02-21 14:21:40
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv6997 Modified Files: main.c Log Message: make 115k2 default for system 3 too Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- main.c 17 Feb 2002 15:41:54 -0000 1.35 +++ main.c 21 Feb 2002 14:21:35 -0000 1.36 @@ -93,11 +93,8 @@ /* call serial_init() because the default 9k6 speed might not be what the user requested */ -#if defined(H3600) || defined(SHANNON) || defined(IDR) || defined(BADGE4) || defined(JORNADA720) || defined(ACCELENT_SA) +#if defined(H3600) || defined(SHANNON) || defined(IDR) || defined(BADGE4) || defined(JORNADA720) || defined(ACCELENT_SA) || defined(PT_SYSTEM3) blob_status.terminalSpeed = baud_115200; /* DEBUG */ -#endif -#if defined(PT_SYSTEM3) - blob_status.terminalSpeed = baud_38400; #endif serial_init(blob_status.terminalSpeed); |
From: Abraham vd M. <ab...@us...> - 2002-02-19 11:50:05
|
Update of /cvsroot/blob/blob/include/blob/arch In directory usw-pr-cvs1:/tmp/cvs-serv23569 Modified Files: frodo.h Log Message: Changes 16-bit access to CPLD to 32-bit access Index: frodo.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/frodo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- frodo.h 15 Feb 2002 14:15:45 -0000 1.3 +++ frodo.h 19 Feb 2002 11:49:55 -0000 1.4 @@ -128,7 +128,7 @@ # define MDCAS01_VALUE 0x55555555 # define MDCAS02_VALUE 0x55555555 # define MSC0_VALUE 0x00004770 -# define MSC1_VALUE 0x4f750000 +# define MSC1_VALUE 0x4f710000 /* 0x4f750000 == 16-bit */ #else /* #if (CPU_SPEED >= CPU_CORE_SPEED_206mhz) */ @@ -155,6 +155,11 @@ * MDCAS22_VALUE * MSC2_VALUE */ +#define MECR_VALUE 0x994a994a +#define MDCAS20_VALUE 0xaaaaaa7f +#define MDCAS21_VALUE 0xaaaaaaaa +#define MDCAS22_VALUE 0xaaaaaaaa +#define MSC2_VALUE 0x42196669 #endif /* #ifdef BLOB_NEED_MEMCONFIG */ |
From: Abraham vd M. <ab...@2d...> - 2002-02-19 07:54:10
|
Hi Stefan! > > Removed Files: > > regs-sa11x0.c > > Log Message: > > remove file because it shouldn't be shared with blob >=20 > Why? >=20 > Why don't we allow the user to choose wether or not he wants the=20 > commands in blob and/or diag? > regs and memchk are perfectly usable in both diag and blob. >=20 > IMHO only command which are > - not usable in diag because of missing infrastructure > - only in diag for certain platforms > should be not allowed to be shared. No. Why would you want functionality in diag and blob? blob is and should be only a bootloader. That way it stays small, simple, ... --=20 Regards Abraham I want to so HAPPY, the VEINS in my neck STAND OUT!! __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |
From: Christopher H. <ch...@mu...> - 2002-02-18 09:26:38
|
> > IMHO only command which are > > - not usable in diag because of missing infrastructure > > - only in diag for certain platforms > > should be not allowed to be shared. > > Only commands that make sense to be shared should be shared. > > > I know of the blob-size issue, but this should be gone by now. > > It's not about the size, it's about simplicity. Isn't this an issue of mechanism vs policy? The command mechanism is simple and clean. (Nice work, btw.) The default policy is obvious: leave all diagnostic commands out of blob and include them in diag. However, there's no loss of simplicity should someone chooses a different policy. -ch |
From: Erik M. <er...@us...> - 2002-02-18 08:56:28
|
Update of /cvsroot/blob/blob/doc In directory usw-pr-cvs1:/tmp/cvs-serv8339 Modified Files: Makefile.am Added Files: motto.txt Log Message: This has been in my tree for months, but I never commited it to CVS. De Saint-Exupery was both a writer (Le petit prince), and a famous constructor. This quote says the same as the KISS principle, but worded in a very nice way. --- NEW FILE: motto.txt --- The most important design rule behind blob is the KISS principle, but that's a bit dull. It was much more nicely worded by de Saint-Exupery; think about it when you're extending blob. -- Erik La perfection est atteinte non quand il ne reste rien à ajouter, mais quand il ne reste rien à enlever. (You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away.) -- Antoine de Saint-Exupery Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/doc/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 7 Jan 2002 20:15:10 -0000 1.3 +++ Makefile.am 18 Feb 2002 08:56:26 -0000 1.4 @@ -8,4 +8,5 @@ EXTRA_DIST = \ commandlist.txt \ diag.txt \ + motto.txt \ porting.txt |
From: Erik M. <J.A...@it...> - 2002-02-18 08:50:22
|
On Mon, Feb 18, 2002 at 08:49:17AM +0100, Stefan Eletzhofer wrote: > > Am Sonntag den, 17. Februar 2002, um 20:58, schrieb Erik Mouw: > >remove file because it shouldn't be shared with blob > > Why? > > Why don't we allow the user to choose wether or not he wants the > commands in blob and/or diag? > regs and memchk are perfectly usable in both diag and blob. Because that was *exactly* the reason why we made a distinction between blob and diag. Blob is a bootloader, memchk and regs are for testing the board so they should be moved to diag. > IMHO only command which are > - not usable in diag because of missing infrastructure > - only in diag for certain platforms > should be not allowed to be shared. Only commands that make sense to be shared should be shared. > I know of the blob-size issue, but this should be gone by now. It's not about the size, it's about simplicity. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Stefan E. <ste...@el...> - 2002-02-18 07:49:29
|
Am Sonntag den, 17. Februar 2002, um 20:58, schrieb Erik Mouw: > Update of /cvsroot/blob/blob/src/commands > In directory usw-pr-cvs1:/tmp/cvs-serv27392 > > Removed Files: > regs-sa11x0.c > Log Message: > remove file because it shouldn't be shared with blob Why? Why don't we allow the user to choose wether or not he wants the commands in blob and/or diag? regs and memchk are perfectly usable in both diag and blob. IMHO only command which are - not usable in diag because of missing infrastructure - only in diag for certain platforms should be not allowed to be shared. I know of the blob-size issue, but this should be gone by now. > > > --- regs-sa11x0.c DELETED --- > > > _______________________________________________ > blob-cvs-commit mailing list > blo...@li... > https://lists.sourceforge.net/lists/listinfo/blob-cvs-commit > > --------------------------------------- Eletztrick Computing Custom Linux Development http://www.eletztrick.de |
From: Erik M. <J.A...@it...> - 2002-02-17 20:27:51
|
On Sun, Feb 17, 2002 at 12:03:43PM -0800, Erik Mouw wrote: > Update of /cvsroot/blob/blob/utils/build > In directory usw-pr-cvs1:/tmp/cvs-serv28493/utils/build > > Modified Files: > build_all > Log Message: > Add infrastructure to select at compile-time which commands should be > linked with blob. Note: you might want to run "make distclean" or otherwise src/blob/commands.c and src/diag/commands.c are build in $src_dir instead of $build_dir . Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Erik M. <er...@us...> - 2002-02-17 20:03:45
|
Update of /cvsroot/blob/blob/utils/build In directory usw-pr-cvs1:/tmp/cvs-serv28493/utils/build Modified Files: build_all Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: build_all =================================================================== RCS file: /cvsroot/blob/blob/utils/build/build_all,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- build_all 4 Feb 2002 18:11:22 -0000 1.10 +++ build_all 17 Feb 2002 20:03:41 -0000 1.11 @@ -15,7 +15,7 @@ archs="accelent_sa assabet badge4 brutus creditlart h3600 idr jornada720 lart neponset nesa pleb shannon system3 frodo" linux_prefix=~/LART/build/linux/elinux blob_src=~/src/sourceforge/blob -extra_flags="--enable-all-features" +extra_flags="--enable-all-features --with-commands=all" export CC=arm-linux-gcc |
From: Erik M. <er...@us...> - 2002-02-17 20:03:45
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv28493/src/blob Modified Files: .cvsignore Makefile.am Removed Files: commands.c Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: .cvsignore =================================================================== RCS file: /cvsroot/blob/blob/src/blob/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 4 Dec 2001 00:14:56 -0000 1.2 +++ .cvsignore 17 Feb 2002 20:03:41 -0000 1.3 @@ -1,6 +1,7 @@ Makefile.in Makefile blob* +commands.c rest-ld-script *.o .deps Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Makefile.am 17 Feb 2002 15:41:53 -0000 1.25 +++ Makefile.am 17 Feb 2002 20:03:41 -0000 1.26 @@ -41,12 +41,15 @@ # ---- Built sources ------------------------------------------------- BUILT_SOURCES = \ - rest-ld-script + rest-ld-script \ + commands.c rest-ld-script: rest-ld-script.in $(CC) -x c-header -undef -nostdinc ${INCLUDES} -E $< | sed 's/^#.*//' > $@ +commands.c: + ${top_srcdir}/src/commands/make_commands.sh @BLOB_COMMANDS@ > $@ # ---- Blob first stage loader --------------------------------------- @@ -141,7 +144,6 @@ EXTRA_blob_rest_elf32_SOURCES = \ chkmem.c \ clock.c \ - debug.c \ amd32.c intel16.c intel32.c nullflash.c \ cramfs.c \ compr_rtime.c compr_rubin.c jffs2.c \ @@ -156,7 +158,6 @@ @BLOB_CHKMEM_OBJS@ \ @BLOB_CLOCK_OBJS@ \ @BLOB_CRAMFS_OBJS@ \ - @BLOB_DEBUG_OBJS@ \ @BLOB_FLASH_OBJS@ \ @BLOB_JFFS2_OBJS@ \ @BLOB_PLATFORM_OBJS@ \ @@ -171,7 +172,6 @@ @BLOB_CHKMEM_OBJS@ \ @BLOB_CLOCK_OBJS@ \ @BLOB_CRAMFS_OBJS@ \ - @BLOB_DEBUG_OBJS@ \ @BLOB_FLASH_OBJS@ \ @BLOB_JFFS2_OBJS@ \ @BLOB_PLATFORM_OBJS@ \ @@ -230,7 +230,7 @@ rest-ld-script.in -CLEANFILES = ${srcdir}/*~ rest-ld-script *.map +CLEANFILES = ${srcdir}/*~ rest-ld-script commands.c *.map DISTCLEANFILES = ${builddir}/.deps/*.P --- commands.c DELETED --- |
From: Erik M. <er...@us...> - 2002-02-17 20:03:45
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv28493/src/diag Modified Files: .cvsignore Makefile.am regs-sa11x0.c Added Files: getcommand.c Removed Files: commands.c Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. --- NEW FILE: getcommand.c --- /* * getcommand.c: commands for diag * * Copyright (C) 2001 Erik Mouw <J.A...@it...> * * $Id: getcommand.c,v 1.1 2002/02/17 20:03:41 erikm Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ident "$Id: getcommand.c,v 1.1 2002/02/17 20:03:41 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/command.h> #include <blob/command_hist.h> #include <blob/error.h> #include <blob/serial.h> #include <blob/time.h> #include <blob/util.h> /* more or less like SerialInputString(), but with echo and backspace */ /* unlike the version in libblob, this version has a command history */ int GetCommand(char *command, int len, int timeout) { u32 startTime, currentTime; int c; int i; int numRead; int maxRead = len - 1; TimerClearOverflow(); startTime = TimerGetTime(); cmdhist_reset(); for(numRead = 0, i = 0; numRead < maxRead;) { /* try to get a byte from the serial port */ while(serial_poll() != 0) { currentTime = TimerGetTime(); /* check timeout value */ if((currentTime - startTime) > (timeout * TICKS_PER_SECOND)) { /* timeout */ command[i++] = '\0'; cmdhist_push( command ); return(numRead); } } c = serial_read(); /* check for errors */ if(c < 0) { command[i++] = '\0'; serial_write('\n'); printerror(c, "can't read command"); return c; } if((c == '\r') || (c == '\n')) { command[i++] = '\0'; /* print newline */ serial_write('\n'); cmdhist_push( command ); return(numRead); } else if(c == '\b') { /* FIXME: is this backspace? */ if(i > 0) { i--; numRead--; /* cursor one position back. */ SerialOutputString("\b \b"); } } else if ( c == CMDHIST_KEY_UP ) { char *cmd = NULL; /* get cmd from history */ if ( cmdhist_next( &cmd ) != 0 ) continue; /* clear line */ while ( numRead-- ) { SerialOutputString("\b \b"); } /* display it */ SerialOutputString(cmd); i = numRead = strlen( cmd ); strncpy( command, cmd, MAX_COMMANDLINE_LENGTH ); } else if ( c == CMDHIST_KEY_DN ) { char *cmd = NULL; /* get cmd from history */ if ( cmdhist_prev( &cmd ) != 0 ) continue; /* clear line */ while ( numRead-- ) { SerialOutputString("\b \b"); } /* display it */ SerialOutputString(cmd); i = numRead = strlen( cmd ); strncpy( command, cmd, MAX_COMMANDLINE_LENGTH ); } else { command[i++] = c; numRead++; /* print character */ serial_write(c); } } cmdhist_push( command ); return(numRead); } Index: .cvsignore =================================================================== RCS file: /cvsroot/blob/blob/src/diag/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 11 Feb 2002 22:50:59 -0000 1.3 +++ .cvsignore 17 Feb 2002 20:03:41 -0000 1.4 @@ -1,5 +1,6 @@ Makefile.in Makefile +commands.c diag diag-elf32 *.o Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/diag/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.am 17 Feb 2002 15:41:54 -0000 1.13 +++ Makefile.am 17 Feb 2002 20:03:41 -0000 1.14 @@ -32,12 +32,24 @@ -I${top_srcdir}/include +# ---- Built sources ------------------------------------------------- + +BUILT_SOURCES = \ + commands.c + +commands.c: + ${top_srcdir}/src/commands/make_commands.sh @ALL_COMMANDS@ > $@ + + +# ---- diag ---------------------------------------------------------- + # WARNING: start.S *must* be the first file, otherwise the target will # be linked in the wrong order! diag_elf32_SOURCES = \ start.S \ command_hist.c \ commands.c \ + getcommand.c \ initcalls.c \ regs-sa11x0.c \ main.c @@ -86,11 +98,13 @@ $(OBJCOPY) $(OCFLAGS) $< $@ +# ---- Automake administrativia -------------------------------------- + EXTRA_DIST = \ ld-script -CLEANFILES = ${srcdir}/*~ *.map +CLEANFILES = ${srcdir}/*~ *.map commands.c DISTCLEANFILES = ${builddir}/.deps/*.P Index: regs-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/regs-sa11x0.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- regs-sa11x0.c 11 Feb 2002 16:53:16 -0000 1.4 +++ regs-sa11x0.c 17 Feb 2002 20:03:41 -0000 1.5 @@ -224,6 +224,15 @@ /**********************************************************************/ /**********************************************************************/ +/********************************************************************** + * regs_show() + * + * AUTHOR: seletz + * REVISED: + * + * Display register contents + * + */ static int regs_show( int argc, char *argv[] ) { int i = 0; @@ -237,17 +246,11 @@ while ( reg_sets[set].name ) { i = 0; registers = reg_sets[set].set; - SerialOutputString( reg_sets[set].name ); - serial_write( '\n' ); - SerialOutputString( "--------------------------------\n" ); + printf( "%s\n", reg_sets[set].name ); + printf( "--------------------------------\n" ); while ( registers && registers[i].name ) { - SerialOutputString( registers[i].name ); - SerialOutputString( "= 0x" ); - SerialOutputHex( MEM( registers[i].adr ) ); - if ( registers[i].desc ) { - SerialOutputString( registers[i].desc ); - } - serial_write( '\n' ); + printf( "%s= 0x%08x %s\n", registers[i].name, MEM( registers[i].adr ), + registers[i].desc?registers[i].desc:"" ); i++; } set++; @@ -256,5 +259,7 @@ return 0; } + static char regshelp[] = "print register info\n"; + __commandlist(regs_show, "regs", regshelp); --- commands.c DELETED --- |
From: Erik M. <er...@us...> - 2002-02-17 20:03:44
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv28493 Modified Files: configure.in Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- configure.in 17 Feb 2002 15:41:53 -0000 1.45 +++ configure.in 17 Feb 2002 20:03:40 -0000 1.46 @@ -308,6 +308,31 @@ +dnl Check for blob commands +AC_ARG_WITH(commands,[ --with-commands=<list> compile blob with commands in <list> + commands may be separated with commas; + 'all' compiles all commands; + Valid commands are: + call, chgbit, dummy, dump, memcpy, poke, peek], + blob_commands="$withval", + blob_commands="") + +default_commands="reset, reboot" +all_commands="call, chgbit, dummy, dump, memcpy, poke, peek" + +if test "$blob_commands" = "all" ; then + blob_commands="$all_commands" +fi + +ALL_COMMANDS=`echo $default_commands $all_commands | sed 's/,//g'` +BLOB_COMMANDS=`echo $default_commands $blob_commands | sed 's/,//g'` + +AC_SUBST(ALL_COMMANDS) +AC_SUBST(BLOB_COMMANDS) + + + + dnl Check for individual features AC_ARG_ENABLE(clock-scaling, [ --enable-clock-scaling Enable support for clock scaling (SA1100 only)], @@ -319,11 +344,6 @@ [chkmem_flag=$enable_memtest], [chkmem_flag=no]) -AC_ARG_ENABLE(debug, -[ --enable-debug Enable support for misc debugging functions ], -[debug_flag=$enable_debug], -[debug_flag=no]) - AC_ARG_ENABLE(lcd, [ --enable-lcd Enable lcd support ], [lcd_flag=$enable_lcd], @@ -366,7 +386,6 @@ if test "x$all_features_flag" = "xyes" ; then clock_scaling_flag=yes chkmem_flag=yes - debug_flag=yes lcd_flag=yes md5_flag=yes xmodem_flag=yes @@ -404,16 +423,6 @@ -dnl Check wether or not debug code is wanted -if test "x$debug_flag" = "xyes" ; then - BLOB_DEBUG_OBJS="debug.o" -fi - -AC_SUBST(BLOB_DEBUG_OBJS) - - - - dnl Check wether or not lcd support code is wanted if test "x$lcd_flag" = "xyes" ; then if test "x$use_lcd" = "xyes" ; then @@ -483,12 +492,6 @@ -dnl Check wether or not additional platform source code -dnl for is needed - - - - dnl Check for extra debug info AC_ARG_ENABLE(blob-debug, [ --enable-blob-debug Enable run-time debug information], @@ -586,12 +589,12 @@ echo "Objcopy flags ${OCFLAGS}" echo "Clock scaling support ${clock_scaling_flag}" echo "Memory test support ${chkmem_flag}" -echo "Debugging commands support ${debug_flag}" echo "LCD support ${lcd_flag}" echo "MD5 support ${md5_flag}" echo "Xmodem support ${xmodem_flag}" echo "UU Codec support ${uucodec_flag}" echo "JFFS2 support ${jffs2_flag}" echo "cramfs support ${cramfs_flag}" +echo "Blob commands: ${BLOB_COMMANDS}" echo "Run-time debug information ${blob_debug_flag}" echo "" |
From: Erik M. <er...@us...> - 2002-02-17 20:03:44
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv28493/include/blob Modified Files: util.h Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/util.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- util.h 16 Feb 2002 00:43:59 -0000 1.10 +++ util.h 17 Feb 2002 20:03:41 -0000 1.11 @@ -56,6 +56,8 @@ /* convert a string to an u32 value */ int strtou32(const char *str, u32 *value); +void reboot_system(void); + /* printf and friends */ int snprintf(char * buf, size_t size, const char *fmt, ...); int printf(const char *fmt, ...); |
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv28118 Modified Files: Makefile.am call.c changebit.c dummy.c dump.c memcpy.c peek.c poke.c Added Files: make_commands.sh Removed Files: cmddebug.h common.c common.h Log Message: Cleanup commands. Add a shell script to generate C code for commands. --- NEW FILE: make_commands.sh --- #! /bin/sh # # make_commands.sh: generate commandlist code # # Copyright (C) 2002 Erik Mouw (J.A...@it...) # # $Id: make_commands.sh,v 1.1 2002/02/17 20:01:31 erikm Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA cat <<EOF /* * WARNING: * This file was generated by make_commands.sh. All changes to this file * will be automatically overwritten once you rerun make_commands.sh. Do * not try to check this file into CVS: generated files do not belong in * CVS repositories. */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/command.h> EOF for i in $* ; do cat <<EOF extern int ${i}_cmd(int argc, char *argv[]); extern char ${i}_help[]; __commandlist(${i}_cmd, "${i}", ${i}_help); EOF done Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/commands/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 12 Feb 2002 12:54:59 -0000 1.2 +++ Makefile.am 17 Feb 2002 20:01:31 -0000 1.3 @@ -26,20 +26,24 @@ libcommands_a_SOURCES = \ - common.c \ - poke.c \ - peek.c \ - regs-sa11x0.c \ call.c \ changebit.c \ + dummy.c \ dump.c \ - chkmem.c \ - dummy.c + memcpy.c \ + peek.c \ + poke.c \ + reboot.c \ + terminal.c INCLUDES += \ -I${top_builddir}/include \ -I${top_srcdir}/include + + +EXTRA_DIST = \ + make_commands.sh CLEANFILES = ${srcdir}/*~ Index: call.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/call.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- call.c 12 Feb 2002 12:54:59 -0000 1.1 +++ call.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -1,7 +1,6 @@ /* * debug.c: Debugging command functions * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * Copyright (C) 2001 Christopher Hoover <ch...@hp...> * * This program is free software; you can redistribute it and/or modify @@ -31,14 +30,10 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> +#include <blob/serial.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -48,16 +43,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * Call @@ -68,52 +53,54 @@ * Jumps to an arbitrary address. * */ -static int Call( int argc, char *argv[] ) +int call_cmd( int argc, char *argv[] ) { - int ret = 0; + int ret = 0; u32 adr, a = 0, b = 0, c = 0, d = 0; int (*called_fn)(u32, u32, u32, u32); - if ( argc < 2 || argc > 6 ) ERR( -EINVAL ); + if ( argc < 2 || argc > 6 ) + ERR( -EINVAL ); ret = strtou32( argv[1], &adr ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); if ( argc >= 3 ) { ret = strtou32( argv[2], &a ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } if ( argc >= 4 ) { ret = strtou32( argv[2], &b ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } if ( argc >= 5 ) { ret = strtou32( argv[2], &c ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } if ( argc >= 6) { ret = strtou32( argv[2], &d ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } - printf( "Calling function at address 0x%08lx ...\n", adr ); + dprintf( "calling function at 0x%08x ...\n", adr ); serial_flush_output(); called_fn = (int (*)(u32, u32, u32, u32))adr; ret = called_fn(a, b, c, d); - printf( "Return value: %d == 0x%04x\n", ret, ret ); + dprintf("return value: %d == 0x%04x\n", ret, ret); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char callhelp[] = "call address [arg0 [arg1 [arg2 [arg3]]]]\n" +char call_help[] = "call address [arg0 [arg1 [arg2 [arg3]]]]\n" "Call function at <address> with optional arguments\n"; - -__commandlist(Call, "call", callhelp); Index: changebit.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/changebit.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- changebit.c 12 Feb 2002 12:54:59 -0000 1.1 +++ changebit.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> -#include "cmddebug.h" -#include "common.h" /********************************************************************** * defines @@ -48,16 +43,6 @@ #define MEM( x ) (*((u32 *)x)) -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * ChangeBit * @@ -67,25 +52,27 @@ * Modifies bits of an given memory location * */ -static int ChangeBit( int argc, char *argv[] ) +int chgbit_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 adr = 0L; - u32 value = 0L; + int ret = 0; + u32 adr, value; - if ( argc < 4 ) ERR( -EINVAL ); + if ( argc < 4 ) + ERR( -EINVAL ); ret = strtou32( argv[1], &adr ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32( argv[2], &value ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); /* check memory alignment */ if(adr &= 0x03) ERR(-EALIGN); - printf( "0x%08lx", MEM( adr ) ); + printf("0x%08x", MEM( adr ) ); switch ( argv[3][0] & (~0x20) ) { case 'A': @@ -106,16 +93,12 @@ break; } - printf( "-> 0x%08lx\n", MEM( adr ) ); + printf( " --> 0x%08x\n", MEM( adr ) ); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char chgbithelp[] = "chgbit address value {and|or|xor|set|clear}\n"; - -__commandlist(ChangeBit, "chgbit", chgbithelp ); +char chgbit_help[] = "chgbit address value {and|or|xor|set|clear}\n"; Index: dummy.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/dummy.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dummy.c 29 Jan 2002 17:47:23 -0000 1.1 +++ dummy.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -27,7 +27,7 @@ # include <blob/config.h> #endif -#include <blob/serial.h> +#include <blob/util.h> @@ -36,13 +36,8 @@ { int i; - for(i = 0; i < argc; i++) { - SerialOutputString("arg["); - SerialOutputDec(i); - SerialOutputString("] = "); - SerialOutputString(argv[i]); - serial_write('\n'); - } + for(i = 0; i < argc; i++) + printf("argv[%d] = '%s'\n", i, argv[i]); return 0; } Index: dump.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/dump.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dump.c 12 Feb 2002 12:54:59 -0000 1.1 +++ dump.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -1,8 +1,7 @@ /* - * dump.c: hextump command + * dump.c: hexdump command * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> - * Copyright (C) 2001 Tim Riker + * Copyright (C) 2001 Tim Riker <ti...@ri...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,14 +30,10 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/serial.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> -#include "cmddebug.h" -#include "common.h" /********************************************************************** * defines @@ -47,16 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * dump * @@ -66,13 +51,10 @@ * dumps memory * */ -static int dump( int argc, char *argv[] ) +int dump_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 address; - u32 endaddress; - u32 tmpaddress; - u32 value; + int ret = 0; + u32 address, endaddress, tmpaddress, value; if ( argc < 2 ) ERR( -EINVAL ); @@ -95,10 +77,10 @@ /* print it */ for ( ; address < endaddress; address += 0x10) { - printf( "0x%08lx: ", address ); + printf( "0x%08x: ", address ); for (tmpaddress = address; tmpaddress < address + 0x10; tmpaddress += 4) { value = (*((u32 *)tmpaddress)); - printf( "0x%08lx ", value ); + printf( "0x%08x ", value ); } for (tmpaddress = address; tmpaddress < address + 0x10; tmpaddress++) { value = (*((u8 *)tmpaddress)) & 0xff; @@ -111,13 +93,9 @@ } ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char dumphelp[] = "dump address [endAddress]\n"; - -__commandlist(dump, "dump", dumphelp ); +char dump_help[] = "dump address [endAddress]\n"; Index: memcpy.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/memcpy.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- memcpy.c 12 Feb 2002 12:54:59 -0000 1.1 +++ memcpy.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -47,16 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************** * prototypes @@ -71,23 +56,25 @@ * Command wrapper for memcpy utility function. * */ -static int CmdMemcpy( int argc, char *argv[] ) +int memcpy_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 src = 0L; - u32 dest = 0L; - u32 len = 0L; + int ret = 0; + u32 src, dest, len; - if ( argc < 4 ) ERR( -EINVAL ); + if ( argc < 4 ) + ERR( -EINVAL ); ret = strtou32( argv[1], &src ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32( argv[2], &dest ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32( argv[3], &len ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); /* check alignment of src and dest */ if((src & 0x03) || (dest & 0x03)) @@ -100,22 +87,17 @@ len = len >> 2; } - _DBG( dbg, "memcpy: src=0x%08lx, dest=0x%08lx, %d words\n", - src, sest, len ); + dprintf("src=0x%08x, dest=0x%08x, %d words\n", src, dest, len ); MyMemCpy( (u32 *)dest, (const u32 *)src, len); printf("%d words copied.\n", len ); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char memcpyhelp[] = "memcpy src dst len\n" +char memcpy_help[] = "memcpy src dst len\n" "copy len bytes from src to dst\n"; - -__commandlist(CmdMemcpy, "memcpy", memcpyhelp); Index: peek.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/peek.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- peek.c 12 Feb 2002 12:54:59 -0000 1.1 +++ peek.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -47,16 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * Peek * @@ -66,23 +51,23 @@ * Peeks values from memory * */ -static int Peek( int argc, char *argv[] ) +int peek_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 address; - u32 value; - char type = 'w'; + int ret = 0; + u32 address, value; + char type = 'w'; - if ( argc < 2 ) ERR( -EINVAL ); + if ( argc < 2 ) + ERR( -EINVAL ); ret = strtou32(argv[1], &address); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); - if ( argc >= 2 ) { + if ( argc >= 2 ) type = argv[2][0]; - } - _DBG( dbg, "peek: adr=0x%08lx, type=%c\n", address, type ); + dprintf("adr=0x%08x, type=%c\n", address, type); /* check memory alignment */ switch(type | 0x20) { @@ -130,18 +115,13 @@ break; } - printf( "%c 0x%08lx\n", type, value ); + printf("%c 0x%08x\n", type, value ); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char peekhelp[] = "peek address [b|h|w]\n" +char peek_help[] = "peek address [b|h|w]\n" "b = byte, h = half word, w = word (default is w)\n"; - -__commandlist(Peek, "peek", peekhelp ); - Index: poke.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/poke.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- poke.c 12 Feb 2002 12:54:59 -0000 1.1 +++ poke.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -47,19 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - -/********************************************************************** - * prototypes - */ /********************************************************************* * Poke @@ -70,27 +52,28 @@ * Poke values to memory * */ -static int Poke( int argc, char *argv[] ) +int poke_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 address; - u32 value; - char type = 'w'; + int ret = 0; + u32 address, value; + char type = 'w'; - if ( argc < 3 ) ERR( -EINVAL ); + if ( argc < 3 ) + ERR( -EINVAL ); ret = strtou32(argv[1], &address); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32(argv[2], &value); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); - if ( argc >= 3 ) { + if ( argc >= 3 ) type = argv[3][0]; - } - _DBG( dbg, "poke: adr=0x%08lx, val=0x%08lx, type=%c\n", - address, value, type ); + dprintf("adr=0x%08x, val=0x%08x, type=%c\n", + address, value, type ); /* check memory alignment */ switch(type | 0x20) { @@ -138,17 +121,11 @@ break; } - ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char pokehelp[] = "poke address value [b|h|w]\n" +char poke_help[] = "poke address value [b|h|w]\n" "b = byte, h = half word, w = word (default is w)\n"; - -__commandlist(Poke, "poke", pokehelp ); - --- cmddebug.h DELETED --- --- common.c DELETED --- --- common.h DELETED --- |
From: Erik M. <er...@us...> - 2002-02-17 19:58:56
|
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv27392 Removed Files: regs-sa11x0.c Log Message: remove file because it shouldn't be shared with blob --- regs-sa11x0.c DELETED --- |
From: Erik M. <er...@us...> - 2002-02-17 19:57:30
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv26944/diag Added Files: chkmem.c Log Message: Move chkmem to diag because it shouldn't be shared with blob --- NEW FILE: chkmem.c --- /* * chkmem.c: Utility to test memory integrity * * Charles Cazabon <me...@di...> * * Copyright © 1999 Simon Kirby. * Version 2 Copyright © 1999 Charles Cazabon. * * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ident "$Id: chkmem.c,v 1.1 2002/02/17 19:57:26 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> #include <blob/command.h> #include <blob/types.h> #include <blob/serial.h> #include <blob/time.h> #include <blob/util.h> #include <blob/memory.h> /*********************************************************************/ /** DEFINES *********************************************************/ /*********************************************************************/ /* define this to 1 for debug */ #define CHKMEM_DEBUG 1 /* show every X bytes of memory during test */ #define CHKMEM_SHOWEVERY (1<<14) /* more readable IMHO */ #define MEM( x ) (*((u32 *)x)) #define MAKE32FROM8(x) (u32) ((x) | ((x) << 8) | ((x) << 16) | ((x) << 24)) #define CHKMEM_ERR (-1) #define CHKMEM_OK (0) #if CHKMEM_DEBUG # define SHOWFUNC() SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); \ SerialOutputString(" p1=0x"); \ SerialOutputHex((u32)bp1); \ SerialOutputString(" p2=0x"); \ SerialOutputHex((u32)bp2); \ SerialOutputString(" count=0x"); \ SerialOutputHex((u32)count); \ SerialOutputString("\n"); #else # define SHOWFUNC() SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); #endif #define SKIPBLOBMEM(x) if ((x) < BLOB_RAM_BASE + 0x00100000) x = BLOB_RAM_BASE + 0x00100000 #define CHKMEM_MAXERR 64 #define CHKMEM_PUSHERR( ADR ) { chkmem_errlist[ chkmem_errs % CHKMEM_MAXERR ] = ADR; \ chkmem_errs++; } /*********************************************************************/ /** MODULE GLOBALS *************************************************/ /*********************************************************************/ static u32 showevery; /* list of failed adresses */ static u32 chkmem_errlist[ CHKMEM_MAXERR ]; static int chkmem_errs; /*********************************************************************/ /** TYPES *********************************************************/ /*********************************************************************/ typedef int (*memtestfunc_t)( u32, u32, u32, u32 *); /*********************************************************************/ /** FORWARDS *******************************************************/ /*********************************************************************/ static int ChkMemErr( void ); static int ChkMemMovInv( u32 start, u32 end, u32 pattern, u32 *badadr ); static int ChkMemAdrTst( u32 start, u32 end, u32 pattern, u32 *badadr ); static int ChkMemHardcore( u32 start, u32 end, u32 pattern, u32 *badadr ); static void showrun( u32 run ); static void showadr( volatile u32 *adr ); /* Charles Cazabon test methods */ static int test_or_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_and_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_seqinc_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_checkerboard_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_solidbits_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_blockseq_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_walkbits_comparison (u32 *bp1, u32 *bp2, u32 count, int mode); static int test_bitspread_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_bitflip_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_stuck_address (u32 *bp1, u32 *bp2, u32 count); /*********************************************************************/ /** EXPORTED FUNCTIONS ***********************************************/ /*********************************************************************/ /********************************************************************* * ChkMem * * AUTOR: Stefan Eletzhofer * REVISED: * * Command entry, memory test method dispatcher * */ int ChkMem( int argc, char *argv[] ) { memtestfunc_t method; int area; u32 start = 0L; u32 end = 0L; u32 badaddr = 0L; u32 repcount = 0L; /* check args */ if ( argc < 2 ) { SerialOutputString("*** not enough arguments\n"); return CHKMEM_ERR; } /* reset error counter */ chkmem_errs = 0; /* get verbosity level */ showevery = CHKMEM_SHOWEVERY; if ( argc > 2 ) { if(strtou32(argv[2], &showevery) < 0) { SerialOutputString("*** not a value\n"); return CHKMEM_ERR; } if ( showevery > 0 ) { showevery = 1<<showevery; } else { /* never show address */ showevery = 0xffffffff; } } /* get repeat count */ repcount = 1; if ( argc > 3 ) { if ( strtou32(argv[3], &repcount ) < 0 ) { SerialOutputString("*** not a value\n"); return CHKMEM_ERR; } } SerialOutputString(argv[0]); SerialOutputString(": display every 0x"); SerialOutputHex(showevery); SerialOutputString(" bytes\n"); /* set memory test method */ switch ( *argv[1] ) { case '0': method = ChkMemMovInv; break; case '1': method = ChkMemAdrTst; break; case '2': method = ChkMemHardcore; break; default: SerialOutputString("*** unknown method\n"); return CHKMEM_ERR; break; } while ( repcount-- ) { /* test all known memory areas */ for (area = 0; area < NUM_MEM_AREAS; area++) { if(memory_map[area].used) { start = memory_map[area].start; end = start + memory_map[area].len; if ( method(start, end, 0x5555aaaa, &badaddr) != CHKMEM_OK ) { CHKMEM_PUSHERR( badaddr ); } } } } if ( chkmem_errs == 0 ) { SerialOutputString("\n*** no error found\n"); } else { ChkMemErr(); } return CHKMEM_OK; } static char chkmemhelp[] = "chkmem [method] {verbosity:1..F} {repeat-count}\n" "method=0: move-inverse test\n" "method=1: address test\n" "method=2: hardcore test\n" "verbosity: display every 2^n address during test\n"; __commandlist(ChkMem, "chkmem", chkmemhelp); /*********************************************************************/ /** STATIC FUNCTIONS ************************************************/ /*********************************************************************/ /********************************************************************* * showrun * * AUTOR: SELETZ * REVISED: * * Shows current memory test run * */ static void showrun( u32 run ) { SerialOutputString( "\r\nrun " ); SerialOutputHex( run ); SerialOutputString( "\n" ); } /********************************************************************* * showadr * * AUTOR: SELETZ * REVISED: * * display <adr> every <showevery> bytes. * */ static void showadr( volatile u32 *adr ) { if ( ((u32)adr) % showevery == 0 ) { SerialOutputString("\r"); SerialOutputHex( (u32)adr ); } } /********************************************************************* * ChkMemErr * * AUTOR: Stefan Eletzhofer * REVISED: * * Reports memory check errors * */ static int ChkMemErr( void ) { int i; SerialOutputString("\n*** memory errors:\n"); for ( i=0; i< chkmem_errs % CHKMEM_MAXERR; i++ ) { SerialOutputHex( i ); SerialOutputString(": 0x"); SerialOutputHex(chkmem_errlist[i]); SerialOutputString("\n"); } return CHKMEM_OK; } /********************************************************************* * ChkMemMovInv * * AUTOR: Stefan Eletzhofer * REVISED: * * Moving-Inverse Memory Test * * Test method (from GNU/memtest86 utility): * 1) Fill memory with a pattern * 2) Starting at the lowest address * 2a check that the pattern has not changed * 2b write the patterns complement * 2c increment the address * repeat 2a - 2c * 3) Starting at the highest address * 3a check that the pattern has not changed * 3b write the patterns complement * 3c decrement the address * repeat 3a - 3c * * returns 1 if memory failure, returns failed * address in badadr * */ static int ChkMemMovInv( u32 start, u32 end, u32 pattern, u32 *badadr ) { int ret = 1; register u32 p; register u32 tst; SerialOutputString("\nchkmem: move-inverse method\n"); SKIPBLOBMEM( start ); #if CHKMEM_DEBUG SerialOutputString("ChkMem: start(0x"); SerialOutputHex(start); SerialOutputString(") - end(0x"); SerialOutputHex(end); SerialOutputString(")\n"); #endif #if CHKMEM_DEBUG SerialOutputString("ChkMem: fillup\n"); #endif /* fill mem with pattern */ p=start; while ( p<end ) { MEM( p ) = pattern; barrier(); p += 4; } #if CHKMEM_DEBUG SerialOutputString("\rChkMem: bottom-up\n"); #endif /* bottom-up test */ p=start; while ( p<end ) { showadr( (u32*)p ); tst = MEM( p ); if ( tst != pattern ) { goto DONE; } MEM( p ) = ~pattern; barrier(); p += 4; } pattern = ~pattern; #if CHKMEM_DEBUG SerialOutputString("\rChkMem: top-down\n"); #endif /* top-down test */ p=end-4; while ( p>=start ) { showadr( (u32*)p ); tst = MEM( p ); if ( tst != pattern ) { goto DONE; } MEM( p ) = ~pattern; barrier(); p -= 4; } /* no error if we reach this point */ ret = 0; DONE: if ( ret != 0 && badadr ) { *badadr = p; } return ret; } /********************************************************************* * ChkMemAdrTst * * AUTOR: Stefan Eletzhofer * REVISED: * * Writes every memory location with its adress, then checks address * * returns 1 if memory failure, returns failed * address in badadr * */ static int ChkMemAdrTst( u32 start, u32 end, u32 pattern, u32 *badadr ) { int ret = 1; register u32 p; register u32 tst; SerialOutputString("\nchkmem: address test method\n"); SKIPBLOBMEM( start ); #if CHKMEM_DEBUG SerialOutputString("ChkMem: start(0x"); SerialOutputHex(start); SerialOutputString(") - end(0x"); SerialOutputHex(end); SerialOutputString(")\n"); #endif #if CHKMEM_DEBUG SerialOutputString("ChkMem: fillup\n"); #endif /* fill mem with pattern */ p=start; while ( p<end ) { MEM( p ) = p; barrier(); p += 4; } #if CHKMEM_DEBUG SerialOutputString("\rChkMem: bottom-up\n"); #endif /* bottom-up test */ p=start; while ( p<end ) { showadr( (u32*)p ); tst = MEM( p ); if ( tst != p ) { goto DONE; } p += 4; } /* no error if we reach this point */ ret = 0; DONE: if ( ret != 0 && badadr ) { *badadr = p; } return ret; } /********************************************************************* * ChkMemHardcore * * AUTOR: Stefan Eletzhofer * REVISED: * * Hardcore memory test. Test methods based on memtest * by Charles Cazabon <me...@di...> * * returns 1 if memory failure, returns failed * address in badadr * */ static int ChkMemHardcore( u32 start, u32 end, u32 pattern, u32 *badadr ) { register u32 count; SerialOutputString("\nchkmem: hardcore test method\n"); SKIPBLOBMEM( start ); #if CHKMEM_DEBUG SerialOutputString("ChkMem: start(0x"); SerialOutputHex(start); SerialOutputString(") - end(0x"); SerialOutputHex(end); SerialOutputString(")\n"); #endif count = end - start; SerialOutputHex(count); SerialOutputString("\n"); count = (count >> 1); SerialOutputHex(count); SerialOutputString("\n"); test_or_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_and_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_seqinc_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_checkerboard_comparison ((u32 *)start, (u32 *)(start+count), count>>2); test_solidbits_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_blockseq_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_walkbits_comparison((u32 *)start, (u32 *)(start+count), count>>2, 0); test_walkbits_comparison((u32 *)start, (u32 *)(start+count), count>>2, 1); test_bitspread_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_bitflip_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_stuck_address((u32 *)start, (u32 *)(start+count), count>>2); /* no error if we reach this point */ if ( badadr ) { *badadr = 0L; } return 0; } /*********************************************************************/ /** MEMTESTER FUNCTIONS *********************************************/ /*********************************************************************/ /********************************************************************** * Original Authors of following memory test functions: * * Charles Cazabon <me...@di...> * * Copyright © 1999 Simon Kirby. * Version 2 Copyright © 1999 Charles Cazabon. * */ int test_verify_success (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; for (i = 0; i < count; i++, p1++, p2++) { if ( MEM( p1 ) != MEM( p2 ) ) { SerialOutputString("\nchkmem: contents differ:\n"); SerialOutputHex((u32)p1); SerialOutputString("\n"); SerialOutputHex((u32)p2); SerialOutputString("\n"); CHKMEM_PUSHERR( (u32)p1 ); CHKMEM_PUSHERR( (u32)p2 ); } } return (CHKMEM_OK); } int test_or_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; u32 q = 0xdeadbeef; SHOWFUNC(); for (i = 0; i < count; i++) { showadr( p2 ); MEM( p1++ ) |= q; barrier(); MEM( p2++ ) |= q; barrier(); } return (test_verify_success (bp1, bp2, count)); } int test_and_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; u32 q = 0xdeadbeef; SHOWFUNC(); for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) &= q; barrier(); MEM( p2++ ) &= q; barrier(); } return (test_verify_success (bp1, bp2, count)); } int test_seqinc_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; u32 q = 0xdeadbeef; SHOWFUNC(); for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i + q); barrier(); } return (test_verify_success (bp1, bp2, count)); } int test_solidbits_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 q, i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); q = (j % 2) == 0 ? 0xFFFFFFFF : 0x00000000; p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q; barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_checkerboard_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 q, i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); q = (j % 2) == 0 ? 0x55555555 : 0xAAAAAAAA; p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q; barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_blockseq_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j; SHOWFUNC(); for (j = 0; j < 256; j++) { showrun( j ); p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = MAKE32FROM8 (j); barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_walkbits_comparison (u32 *bp1, u32 *bp2, u32 count, int m) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { if (j < 32) /* Walk it up. */ { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (m == 0) ? 0x00000001 << j : 0xFFFFFFFF ^ (0x00000001 << j); barrier(); } else /* Walk it back down. */ { MEM( p1++ ) = MEM( p2++ ) = (m == 0) ? 0x00000001 << (64 - j - 1) : 0xFFFFFFFF ^ (0x00000001 << (64 - j - 1)); barrier(); } } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_bitspread_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); if (j < 32) /* Walk it up. */ { MEM( p1++ ) = MEM( p2++ ) = (i % 2 == 0) ? (0x00000001 << j) | (0x00000001 << (j + 2)) : 0xFFFFFFFF ^ ((0x00000001 << j) | (0x00000001 << (j + 2))); barrier(); } else /* Walk it back down. */ { MEM( p1++ ) = MEM( p2++ ) = (i % 2 == 0) ? (0x00000001 << (63 - j)) | (0x00000001 << (65 - j)) : 0xFFFFFFFF ^ (0x00000001 << (63 - j) | (0x00000001 << (65 - j))); barrier(); } } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_bitflip_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j, k; u32 q; SHOWFUNC(); for (k = 0; k < 32; k++) { showrun( k*8 ); q = 0x00000001 << k; for (j = 0; j < 8; j++) { q = ~q; p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q; barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } } return (CHKMEM_OK); } int test_stuck_address (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1; /* second argument is not used; just gives it a compatible signature. */ u32 i, j; SHOWFUNC(); count <<= 1; for (j = 0; j < 16; j++) { showrun( j ); p1 = (volatile u32 *) bp1; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = ((j + i) % 2) == 0 ? (u32) p1 : ~((u32) p1); barrier(); } p1 = (volatile u32 *) bp1; for (i = 0; i < count; i++, p1++) { showadr( p1 ); if (*p1 != (((j + i) % 2) == 0 ? (u32) p1 : ~((u32) p1))) { return (CHKMEM_ERR); } } } return (CHKMEM_OK); } |
From: Erik M. <er...@us...> - 2002-02-17 19:57:30
|
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv26944/commands Removed Files: chkmem.c Log Message: Move chkmem to diag because it shouldn't be shared with blob --- chkmem.c DELETED --- |
From: Erik M. <er...@us...> - 2002-02-17 19:56:11
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv26614 Removed Files: debug.c Log Message: Remove debug.c because all commands are available in libcommands.a --- debug.c DELETED --- |