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: Erik M. <er...@us...> - 2002-02-13 00:09:54
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv13824 Modified Files: memory.c Log Message: Convert SerialOutput*() functions to printf() Index: memory.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/memory.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- memory.c 3 Jan 2002 16:07:18 -0000 1.4 +++ memory.c 13 Feb 2002 00:09:51 -0000 1.5 @@ -26,8 +26,9 @@ #endif #include <blob/arch.h> +#include <blob/debug.h> #include <blob/memory.h> -#include <blob/serial.h> +#include <blob/util.h> /* test in 1MB chunks */ #define TEST_BLOCK_SIZE (1024 * 1024) @@ -65,13 +66,10 @@ if(testram(addr) == 0) { /* yes, memory */ if(* (u32 *)addr != 0) { /* alias? */ -#ifdef BLOB_DEBUG - SerialOutputString("Detected alias at 0x"); - SerialOutputHex(addr); - SerialOutputString(", aliased from 0x"); - SerialOutputHex(* (u32 *)addr); - serial_write('\n'); -#endif + dprintf("detected alias at 0x%08x, " + "aliased from 0x%08x\n", + addr, * (u32 *)addr); + if(memory_map[i].used) i++; @@ -80,11 +78,9 @@ /* not an alias, write the current address */ * (u32 *)addr = addr; -#ifdef BLOB_DEBUG - SerialOutputString("Detected memory at 0x"); - SerialOutputHex(addr); - serial_write('\n'); -#endif + + dprintf("detected memory at 0x%08x\n", addr); + /* does this start a new block? */ if(memory_map[i].used == 0) { memory_map[i].start = addr; @@ -99,16 +95,13 @@ i++; } } - SerialOutputString("Memory map:\n"); + printf("Memory map:\n"); for(i = 0; i < NUM_MEM_AREAS; i++) { if(memory_map[i].used) { - SerialOutputString(" 0x"); - SerialOutputHex(memory_map[i].len); - SerialOutputString(" @ 0x"); - SerialOutputHex(memory_map[i].start); - SerialOutputString(" ("); - SerialOutputDec(memory_map[i].len / (1024 * 1024)); - SerialOutputString(" MB)\n"); + printf(" 0x%08x @ 0x%08x (%d MB)\n", + memory_map[i].len, + memory_map[i].start, + memory_map[i].len / (1024 * 1024)); } } } |
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv13597 Modified Files: accelent_sa.c assabet.c badge4.c brutus.c clart.c frodo.c h3600.c idr.c jornada720.c nesa.c pleb.c shannon.c system3.c Log Message: Make flash_descriptors const Index: accelent_sa.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/accelent_sa.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- accelent_sa.c 4 Feb 2002 18:02:42 -0000 1.1 +++ accelent_sa.c 13 Feb 2002 00:08:54 -0000 1.2 @@ -50,7 +50,7 @@ /* flash descriptor for Accelent IDP flash. */ /* Accelent IDP uses 2xINTEL e28F640 Chips */ -static flash_descriptor_t accelent_sa_flash_descriptors[] = +static const flash_descriptor_t accelent_sa_flash_descriptors[] = { { size: 2 * 128 * 1024, Index: assabet.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/assabet.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- assabet.c 3 Jan 2002 16:07:17 -0000 1.6 +++ assabet.c 13 Feb 2002 00:08:54 -0000 1.7 @@ -34,7 +34,7 @@ /* flash descriptor for Assabet flash */ /* 2x Intel 28F128J3A strataflash (16MB) */ -static flash_descriptor_t assabet_flash_descriptors[] = +static const flash_descriptor_t assabet_flash_descriptors[] = { { size: 2 * 128 * 1024, Index: badge4.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/badge4.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- badge4.c 23 Jan 2002 18:09:42 -0000 1.5 +++ badge4.c 13 Feb 2002 00:08:54 -0000 1.6 @@ -34,7 +34,7 @@ /* flash descriptor for Badge4 flash */ /* 1 x Intel 28F320C3BA100 Advanced+ Boot Block Flash (32 Mbit) */ /* http://developer.intel.com/design/flcomp/datashts/29064512.pdf */ -static flash_descriptor_t badge4_flash_descriptors[] = +static const flash_descriptor_t badge4_flash_descriptors[] = { { /* Eight 4 KW Parameter Bottom Blocks (64K bytes) */ Index: brutus.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/brutus.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- brutus.c 3 Jan 2002 16:07:17 -0000 1.5 +++ brutus.c 13 Feb 2002 00:08:54 -0000 1.6 @@ -34,7 +34,7 @@ /* flash descriptor for Brutus flash. */ /* I have *really* no idea what kind of flash Brutus uses */ -static flash_descriptor_t brutus_flash_descriptors[] = +static const flash_descriptor_t brutus_flash_descriptors[] = { #warning "Please verify Brutus flash layout" { Index: clart.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/clart.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- clart.c 3 Jan 2002 16:07:17 -0000 1.5 +++ clart.c 13 Feb 2002 00:08:54 -0000 1.6 @@ -34,7 +34,7 @@ /* flash descriptor for CreditLART flash */ /* 1x Intel 28F256J3A strataflash (16MB) */ -static flash_descriptor_t clart_flash_descriptors[] = +static const flash_descriptor_t clart_flash_descriptors[] = { { size: 128 * 1024, Index: frodo.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/frodo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- frodo.c 1 Feb 2002 14:38:55 -0000 1.1 +++ frodo.c 13 Feb 2002 00:08:54 -0000 1.2 @@ -34,7 +34,7 @@ /* flash descriptor for FRODO flash */ /* 2x Intel 28F128J3A strataflash (32MB) */ -static flash_descriptor_t frodo_flash_descriptors[] = +static const flash_descriptor_t frodo_flash_descriptors[] = { { size: 2 * 128 * 1024, Index: h3600.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/h3600.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- h3600.c 3 Jan 2002 16:07:17 -0000 1.5 +++ h3600.c 13 Feb 2002 00:08:54 -0000 1.6 @@ -70,7 +70,7 @@ /* flash descriptor for H3600 flash */ /* 2x Intel 28F640J3A (16MB) */ -static flash_descriptor_t h3600_flash_descriptors[] = +static const flash_descriptor_t h3600_flash_descriptors[] = { { size: 2 * 128 * 1024, Index: idr.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/idr.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- idr.c 11 Feb 2002 22:46:53 -0000 1.8 +++ idr.c 13 Feb 2002 00:08:54 -0000 1.9 @@ -33,7 +33,7 @@ /* flash descriptor for IDR flash */ /* 1x Intel 28F128J3A strataflash (16MB) */ -static flash_descriptor_t idr_flash_descriptors[] = +static const flash_descriptor_t idr_flash_descriptors[] = { { size: 128 * 1024, Index: jornada720.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/jornada720.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- jornada720.c 15 Jan 2002 01:45:01 -0000 1.4 +++ jornada720.c 13 Feb 2002 00:08:54 -0000 1.5 @@ -36,7 +36,7 @@ /* 2 x Intel 28F128J3A StrataFlash (16 MB) [32MB total] */ /* http://developer.intel.com/design/flcomp/datashts/29066709.pdf */ -static flash_descriptor_t jornada720_flash_descriptors[] = +static const flash_descriptor_t jornada720_flash_descriptors[] = { { /* One hundred twenty eight 128KB blocks */ Index: nesa.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/nesa.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- nesa.c 21 Jan 2002 19:46:44 -0000 1.6 +++ nesa.c 13 Feb 2002 00:08:54 -0000 1.7 @@ -34,7 +34,7 @@ /* flash descriptor for NESA flash */ /* 2x AMD Am29LV160DB flash (4MB) */ -static flash_descriptor_t nesa_flash_descriptors[] = +static const flash_descriptor_t nesa_flash_descriptors[] = { { size: 2 * 16 * 1024, Index: pleb.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/pleb.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- pleb.c 3 Jan 2002 16:07:18 -0000 1.5 +++ pleb.c 13 Feb 2002 00:08:54 -0000 1.6 @@ -51,7 +51,7 @@ /* flash descriptor for PLEB flash. */ -static flash_descriptor_t pleb_flash_descriptors[] = +static const flash_descriptor_t pleb_flash_descriptors[] = { #warning "Please add PLEB flash layout" { Index: shannon.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/shannon.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- shannon.c 20 Jan 2002 04:56:20 -0000 1.7 +++ shannon.c 13 Feb 2002 00:08:54 -0000 1.8 @@ -31,7 +31,7 @@ /* flash descriptor for SHANNON flash */ /* 2x AMD *whatever* flash (4MB) */ -static flash_descriptor_t shannon_flash_descriptors[] = +static const flash_descriptor_t shannon_flash_descriptors[] = { { size: 2 * 8 * 1024, Index: system3.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/system3.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- system3.c 3 Jan 2002 16:07:18 -0000 1.9 +++ system3.c 13 Feb 2002 00:08:54 -0000 1.10 @@ -65,7 +65,7 @@ /* flash descriptor for System3 flash. */ /* System 3 uses 2xINTEL e28F640 Chips */ -static flash_descriptor_t system3_flash_descriptors[] = +static const flash_descriptor_t system3_flash_descriptors[] = { { size: 2 * 128 * 1024, |
From: Erik M. <er...@us...> - 2002-02-13 00:06:18
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv12603/src/blob Modified Files: flash.c nullflash.c Log Message: - Add functions to walk flash block table - Make flash_descriptors const - Convert SerialOutput*() functions to printf() and friends Index: flash.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/flash.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- flash.c 1 Feb 2002 14:38:55 -0000 1.14 +++ flash.c 13 Feb 2002 00:06:11 -0000 1.15 @@ -37,11 +37,11 @@ #endif #include <blob/arch.h> +#include <blob/debug.h> #include <blob/errno.h> #include <blob/error.h> #include <blob/led.h> #include <blob/util.h> -#include <blob/serial.h> #include <blob/flash.h> #include <blob/init.h> @@ -62,7 +62,7 @@ static flash_block_t flash_blocks[NUM_FLASH_BLOCKS]; static int num_flash_blocks; -flash_descriptor_t *flash_descriptors; +const flash_descriptor_t *flash_descriptors; flash_driver_t *flash_driver; @@ -85,27 +85,22 @@ #ifdef BLOB_DEBUG int i; - SerialOutputString("Flash map:\n"); + printf("Flash map:\n"); for(i = 0; i < num_flash_blocks; i++) { u32 start = flash_blocks[i].start; - SerialOutputDec(i); - SerialOutputString(":\t0x"); - SerialOutputHex(flash_blocks[i].size); - SerialOutputString(" @ 0x"); - SerialOutputHex(start); - SerialOutputString(" ("); - SerialOutputDec(flash_blocks[i].size / 1024); - SerialOutputString(" kB),\t"); + printf("%3i: 0x%08x @ 0x%08x (%i kb), ", + i, flash_blocks[i].size, start, + flash_blocks[i].size / 1024); if(flash_blocks[i].lockable && flash_driver->query_block_lock) { if ((flash_driver->query_block_lock)((u32 *) start)) - SerialOutputString("locked\n"); + printf("locked\n"); else - SerialOutputString("unlocked\n"); + printf("unlocked\n"); } else { - SerialOutputString("not lockable\n"); + printf("not lockable\n"); } } #endif @@ -121,19 +116,15 @@ int j; u32 start = 0; -#ifdef BLOB_DEBUG if(flash_descriptors == NULL) { - printerrprefix(); - SerialOutputString("undefined flash_descriptors\n"); + deprintf("undefined flash_descriptors\n"); return; } if(flash_driver == NULL) { - printerrprefix(); - SerialOutputString("undefined flash_driver\n"); + deprintf("undefined flash_driver\n"); return; } -#endif /* fill out missing flash driver functions */ if(flash_driver->enable_vpp == NULL) @@ -146,17 +137,14 @@ num_flash_blocks = 0; while(flash_descriptors[i].size != 0) { -#ifdef BLOB_DEBUG - SerialOutputDec(flash_descriptors[i].num); - SerialOutputString("x 0x"); - SerialOutputHex(flash_descriptors[i].size); - SerialOutputString(", "); + dprintf("%i x 0x%08x, ", + flash_descriptors[i].num, + flash_descriptors[i].size); if(!flash_descriptors[i].lockable) - SerialOutputString("not "); + dprintf("not "); - SerialOutputString("lockable\n"); -#endif + dprintf("lockable\n"); for(j = 0; j < flash_descriptors[i].num; j++) { flash_blocks[num_flash_blocks].start = start; @@ -170,8 +158,7 @@ num_flash_blocks++; if(num_flash_blocks >= NUM_FLASH_BLOCKS) { - printerrprefix(); - SerialOutputString("not enough flash_blocks\n"); + eprintf("not enough flash_blocks\n"); break; } } @@ -186,6 +173,8 @@ __initlist(init_flash, INIT_LEVEL_OTHER_STUFF + 1); + + int flash_erase_region(u32 *start, u32 nwords) { u32 *cur; @@ -195,32 +184,21 @@ cur = start; end = start + nwords; -#if BLOB_DEBUG - SerialOutputString(__FUNCTION__ "(): erasing 0x"); - SerialOutputHex(nwords); - SerialOutputString(" ("); - SerialOutputDec(nwords); - SerialOutputString(") words at 0x"); - SerialOutputHex((u32)start); - serial_write('\n'); -#endif + dprintf("erasing 0x%08x (%d) words at 0x%08x\n", + nwords, nwords, (unsigned int)start); flash_driver->enable_vpp(); while(cur < end) { if(*cur != 0xffffffff) { - SerialOutputString("erasing dirty block at 0x"); - SerialOutputHex((u32)cur); - serial_write('\n'); + printf("erasing dirty block at 0x%08x\n", (u32)cur); /* dirty block */ rv = flash_driver->erase(cur); if(rv < 0) { - printerrprefix(); - SerialOutputString("flash erase error at 0x"); - SerialOutputHex((u32)cur); - serial_write('\n'); + eprintf("flash erase error at 0x%08x\n", + (u32)cur); flash_driver->disable_vpp(); return rv; } @@ -260,17 +238,8 @@ u32 nscandown = 0; u32 nskip = 0; -#if defined BLOB_DEBUG - SerialOutputString(__FUNCTION__ "(): flashing 0x"); - SerialOutputHex(nwords); - SerialOutputString(" ("); - SerialOutputDec(nwords); - SerialOutputString(") words from 0x"); - SerialOutputHex((u32)src); - SerialOutputString(" to 0x"); - SerialOutputHex((u32)dst); - serial_write('\n'); -#endif + dprintf("flashing 0x%08x (%d) words from 0x%08x to 0x%08x\n", + nwords, nwords, (u32)src, (u32)dst); flash_driver->enable_vpp(); @@ -291,22 +260,20 @@ } else { nerrors++; - SerialOutputString("erasing at 0x"); - SerialOutputHex((u32)&dst[i]); - SerialOutputString("..."); + printf("erasing at 0x%08x...", (u32)&dst[i]); /* erase block at current location */ rv = flash_driver->erase(&dst[i]); nerase++; if(rv < 0) { /* something is obviously wrong */ - SerialOutputString(" error\n"); + printf(" error\n"); flash_driver->disable_vpp(); return rv; } - SerialOutputString(" scanning down..."); + printf(" scanning down..."); /* scan down until we find the first non-erased location and restart writing @@ -317,34 +284,24 @@ nscandown++; } - SerialOutputString(" resume writing at 0x"); - SerialOutputHex((u32)&dst[i]); - serial_write('\n'); + printf(" resume writing at 0x%08x\n", (u32)&dst[i]); } /* there is something seriously wrong if this is true */ if(nerrors > 2 * nwords) { - printerrprefix(); - SerialOutputString("too many flash errors, probably hardware error\n"); + eprintf("too many flash errors, probably hardware error\n"); flash_driver->disable_vpp(); return -EFLASHPGM; } } -#ifdef BLOB_DEBUG - SerialOutputDec(nwords); - SerialOutputString(" words source image\n"); - SerialOutputDec(nwrite); - SerialOutputString(" words written to flash\n"); - SerialOutputDec(nskip); - SerialOutputString(" words skipped\n"); - SerialOutputDec(nerase); - SerialOutputString(" erase operations\n"); - SerialOutputDec(nscandown); - SerialOutputString(" words scanned down\n"); - serial_write('\n'); -#endif + + dprintf("%d words source image\n", nwords); + dprintf("%d words written to flash\n", nwrite); + dprintf("%d words skipped\n", nskip); + dprintf("%d erase operations\n", nerase); + dprintf("%d words scanned down\n", nscandown); flash_driver->disable_vpp(); @@ -382,13 +339,8 @@ { int sb, eib; -#ifdef FLASH_DEBUG - SerialOutputString(__FUNCTION__ ": startAddress = 0x"); - SerialOutputHex(startAddress); - SerialOutputString(", length = 0x"); - SerialOutputHex(length); - SerialOutputString("\n"); -#endif + dprintf("startAddress = 0x%08x, length = 0x%08x\n", + startAddress, length); sb = find_block(startAddress); eib = find_block(startAddress + length - 1); @@ -399,16 +351,11 @@ if(eib < 0) return eib; -#ifdef FLASH_DEBUG - SerialOutputString("sb: "); - SerialOutputDec(sb); - SerialOutputString(", eib: "); - SerialOutputDec(eib); - SerialOutputString("\n"); -#endif + dprintf("sb = %d, eib = %d\n", sb, eib); - // would be nice to warn if sb isn't at the beginning of - // its block or eib isn't at the very end of its block. + /* FIXME: would be nice to warn if sb isn't at the beginning + * of its block or eib isn't at the very end of its block. + */ *startBlock = sb; *endInclBlock = eib; @@ -426,18 +373,10 @@ int i; u32 *addr; -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ "(): "); - if(lock == 0) - SerialOutputString("un"); - - SerialOutputString("lock at 0x"); - SerialOutputHex((u32)start); - SerialOutputString(", nwords = 0x"); - SerialOutputHex(nwords); - serial_write('\n'); -#endif - + dprintf("%slock at 0x%08x, nwords = 0x%08x\n", + lock ? "" : "un", + (u32)start, nwords); + rv = address_range_to_block_range((u32) start, nwords * sizeof(u32), &sb, &eib); @@ -447,10 +386,7 @@ /* check if it is lockable at all */ for(i = sb; i <= eib; i++) { if(!flash_blocks[i].lockable) { -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("can't (un)lock unlockable blocks\n"); -#endif + deprintf("can't (un)lock unlockable blocks\n"); return -EFLASHPGM; } } @@ -467,12 +403,8 @@ if(rv < 0) { flash_driver->disable_vpp(); -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("can't (un)lock block at 0x"); - SerialOutputHex((u32)addr); - serial_write('\n'); -#endif + deprintf("can't (un)lock block at 0x%08x", + (u32)addr); return rv; } } @@ -530,4 +462,45 @@ } return cnt; +} + + + + +int flash_get_first_block_address(u32 *addr) +{ + if(num_flash_blocks != 0) { + *addr = flash_blocks[0].start; + return 0; + } else { + return -ERANGE; + } +} + + + + +int flash_get_next_block_address(u32* addr, u32 current) +{ + int i; + u32 new_addr; + + /* first find the current flash block */ + i = find_block(current); + + /* invalid address? */ + if(i < 0) + return i; + + /* calculate new address and check if it is valid */ + new_addr = flash_blocks[i].start + flash_blocks[i].size; + i = find_block(new_addr); + + if(i < 0) + return i; + + /* it's valid, return new address */ + *addr = new_addr; + + return 0; } Index: nullflash.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/nullflash.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- nullflash.c 28 Dec 2001 01:06:12 -0000 1.4 +++ nullflash.c 13 Feb 2002 00:06:11 -0000 1.5 @@ -25,6 +25,7 @@ # include <blob/config.h> #endif +#include <blob/debug.h> #include <blob/errno.h> #include <blob/error.h> #include <blob/flash.h> @@ -35,10 +36,8 @@ static int flash_erase_null(u32 *addr) { -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("No flash erase() function\n"); -#endif + deprintf("no flash erase() function\n"); + return -EFLASHERASE; } @@ -47,10 +46,8 @@ static int flash_write_null(u32 *dst, const u32* src) { -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("No flash write() function\n"); -#endif + deprintf("no flash write() function\n"); + return -EFLASHPGM; } @@ -59,10 +56,8 @@ static int flash_lock_block_null(u32 *blockStart) { -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("No flash lock_block() function\n"); -#endif + deprintf("no flash lock_block() function\n"); + return -EFLASHPGM; } @@ -70,10 +65,8 @@ static int flash_unlock_block_null(u32 *blockStart) { -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("No flash unlock_block() function\n"); -#endif + deprintf("no flash unlock_block() function\n"); + return -EFLASHPGM; } @@ -82,10 +75,8 @@ static int flash_query_block_lock_null(u32 *blockStart) { -#ifdef BLOB_DEBUG - printerrprefix(); - SerialOutputString("No flash query_block_lock() function\n"); -#endif + deprintf("no flash query_block_lock() function\n"); + return 0; } |
From: Erik M. <er...@us...> - 2002-02-13 00:06:15
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv12603/include/blob Modified Files: flash.h Log Message: - Add functions to walk flash block table - Make flash_descriptors const - Convert SerialOutput*() functions to printf() and friends Index: flash.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/flash.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- flash.h 31 Dec 2001 00:28:53 -0000 1.9 +++ flash.h 13 Feb 2002 00:06:11 -0000 1.10 @@ -78,7 +78,7 @@ /* should be filled out by the architecture dependent files */ -extern flash_descriptor_t *flash_descriptors; +extern const flash_descriptor_t *flash_descriptors; extern flash_driver_t *flash_driver; @@ -94,5 +94,7 @@ int flash_unlock_region(u32 *start, u32 nwords); int flash_query_region(u32 *start, u32 nwords); +int flash_get_first_block_address(u32 *addr); +int flash_get_next_block_address(u32* addr, u32 current); #endif |
From: Erik M. <er...@us...> - 2002-02-13 00:02:33
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv11799/include/blob Modified Files: types.h Log Message: Change types of s32 and u32 from long to int. Size is the same on ARM, but it is less type cast hassle with printf() and friends. Index: types.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/types.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- types.h 6 Jan 2002 18:57:32 -0000 1.3 +++ types.h 13 Feb 2002 00:02:30 -0000 1.4 @@ -34,11 +34,11 @@ #ifndef BLOB_TYPES_H #define BLOB_TYPES_H -typedef signed long s32; +typedef signed int s32; typedef signed short s16; typedef signed char s8; -typedef unsigned long u32; +typedef unsigned int u32; typedef unsigned short u16; typedef unsigned char u8; |
From: Erik M. <er...@us...> - 2002-02-12 23:59:44
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv10909/include/blob Modified Files: util.h Log Message: Remove dead functions Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/util.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- util.h 8 Feb 2002 12:50:39 -0000 1.8 +++ util.h 12 Feb 2002 23:59:41 -0000 1.9 @@ -12,6 +12,7 @@ * util.h: Simple utility functions for blob * * Copyright (C) 1999 Jan-Derk Bakker (J.D...@it...) + * Copyright (C) 2001 2002 Erik Mouw (J.A...@it...) * * 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 @@ -38,8 +39,6 @@ #include <blob/types.h> void MyMemCpy(u32 *dest, const u32 *src, int numWords); -void MyMemCpyChar(char *dest, const char *src, int numBytes); -void MyMemSet(u32 *dest, const u32 wordToWrite, int numWords); void *memcpy(void *dest, const void *src, size_t n); |
From: Erik M. <er...@us...> - 2002-02-12 23:59:44
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv10909/src/lib Modified Files: util.c Log Message: Remove dead functions Index: util.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- util.c 8 Feb 2002 12:55:16 -0000 1.5 +++ util.c 12 Feb 2002 23:59:41 -0000 1.6 @@ -35,6 +35,7 @@ # include <blob/config.h> #endif +#include <blob/serial.h> #include <blob/types.h> #include <blob/util.h> @@ -59,25 +60,3 @@ printf(" done\n"); #endif } /* MyMemCpy */ - - - - -void MyMemCpyChar(char *dest, const char *src, int numBytes) -{ - char *destLim = dest + numBytes; - - while(dest < destLim) - *dest++ = *src++; -} /* MyMemCpyChar */ - - - - -void MyMemSet(u32 *dest, const u32 wordToWrite, int numWords) -{ - u32 *limit = dest + numWords; - - while(dest < limit) - *dest++ = wordToWrite; -} /* MyMemSet */ |
From: Erik M. <er...@us...> - 2002-02-12 23:55:28
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv9996 Modified Files: Makefile.am error.h Added Files: debug.h Log Message: Add debug printf() functions. Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/blob/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile.am 20 Jan 2002 23:16:18 -0000 1.14 +++ Makefile.am 12 Feb 2002 23:55:24 -0000 1.15 @@ -19,6 +19,7 @@ command.h \ command_hist.h \ crc32.h \ + debug.h \ errno.h \ error.h \ flash.h \ Index: error.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/error.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- error.h 7 Oct 2001 15:17:49 -0000 1.1 +++ error.h 12 Feb 2002 23:55:24 -0000 1.2 @@ -26,10 +26,15 @@ #ifndef BLOB_ERROR_H #define BLOB_ERROR_H +#include <blob/util.h> /* for printf() */ char *strerror(int errnum); void printerrprefix(void); void printerror(int errnum, char *s); + +#define eprintf(fmt, args...) \ + printerrprefix(); \ + printf(fmt , ## args) #endif |
On Tue, Feb 12, 2002 at 04:55:02AM -0800, Stefan Eletzhofer wrote: > Update of /cvsroot/blob/blob/src/commands > In directory usw-pr-cvs1:/tmp/cvs-serv23725 > > Modified Files: > Makefile.am > Added Files: > call.c changebit.c chkmem.c cmddebug.h common.c common.h > dump.c memcpy.c peek.c poke.c regs-sa11x0.c > Log Message: > - added basic commands from diag and blob > - each command got its own source file, so blob/diag > size will not blown up when cherry-picking commands > - commands have to be removed from blob and diag in order > to take full advantage from this Good, but be careful: not all commands should be shared between diag and blob. For example: blob has commands to manipulate the flash, diag hasn't (and doesn't need to). Diag should have functions that help debug the board (memory tester, etc), blob shouldn't. Blob and diag are two binaries with completely different purpose, be careful not to mix them up. 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/ |
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv23725 Modified Files: Makefile.am Added Files: call.c changebit.c chkmem.c cmddebug.h common.c common.h dump.c memcpy.c peek.c poke.c regs-sa11x0.c Log Message: - added basic commands from diag and blob - each command got its own source file, so blob/diag size will not blown up when cherry-picking commands - commands have to be removed from blob and diag in order to take full advantage from this --- NEW FILE: call.c --- /* * 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 * 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: call.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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 */ /* 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 * * AUTHOR: Christopher Hoover <ch...@hp...> * REVISED: seletz * * Jumps to an arbitrary address. * */ static int Call( int argc, char *argv[] ) { 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 ); ret = strtou32( argv[1], &adr ); if ( ret < 0 ) ERR( -EINVAL ); if ( argc >= 3 ) { ret = strtou32( argv[2], &a ); if ( ret < 0 ) ERR( -EINVAL ); } if ( argc >= 4 ) { ret = strtou32( argv[2], &b ); if ( ret < 0 ) ERR( -EINVAL ); } if ( argc >= 5 ) { ret = strtou32( argv[2], &c ); if ( ret < 0 ) ERR( -EINVAL ); } if ( argc >= 6) { ret = strtou32( argv[2], &d ); if ( ret < 0 ) ERR( -EINVAL ); } printf( "Calling function at address 0x%08lx ...\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 ); ret = 0; DONE: if ( ret != 0 ) { perror( ret, __FUNCTION__ ); } return ret; } static char callhelp[] = "call address [arg0 [arg1 [arg2 [arg3]]]]\n" "Call function at <address> with optional arguments\n"; __commandlist(Call, "call", callhelp); --- NEW FILE: changebit.c --- /* * debug.c: Debugging command functions * * 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: changebit.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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 */ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } #define MEM( x ) (*((u32 *)x)) /********************************************************************** * statics */ #if DEBUG static int dbg = 1; #else static int dbg = 0; #endif /********************************************************************* * ChangeBit * * AUTOR: SELETZ * REVISED: * * Modifies bits of an given memory location * */ static int ChangeBit( int argc, char *argv[] ) { int ret = 0; u32 adr = 0L; u32 value = 0L; if ( argc < 4 ) ERR( -EINVAL ); ret = strtou32( argv[1], &adr ); if ( ret < 0 ) ERR( -EINVAL ); ret = strtou32( argv[2], &value ); if ( ret < 0 ) ERR( -EINVAL ); /* check memory alignment */ if(adr &= 0x03) ERR(-EALIGN); printf( "0x%08lx", MEM( adr ) ); switch ( argv[3][0] & (~0x20) ) { case 'A': MEM( adr ) &= value; break; case 'S': case 'O': MEM( adr ) |= value; break; case 'X': MEM( adr ) ^= value; break; case 'C': MEM( adr ) &= ~value; break; default: ERR( -EINVAL ); break; } printf( "-> 0x%08lx\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 ); --- 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/12 12:54:59 seletz 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); } --- NEW FILE: cmddebug.h --- #ifndef _CMD_DEBUG_H #define _CMD_DEBUG_H 1 #if DEBUG # define _DBG( flag, ... ) if ( flag ) printf( ##args ) #else # define _DBG( flag, ... ) #endif #endif --- NEW FILE: common.c --- /* * common.c: common helper functions used by all commands * * 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: common.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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> /********************************************************************** * defines */ /********************************************************************** * a perror() lookalike */ void perror( int errno, char *func ) { printerrprefix(); if ( errno < 0 ) errno = -errno; if ( func != NULL) { printf( "%s: ", func ); } printf( "%s\n", strerror(errno) ); } --- NEW FILE: common.h --- #ifndef _CMD_COMMON_H #define _CMD_COMMON_H 1 /* a perror-lookalike */ void perror( int, char * ); #endif --- NEW FILE: dump.c --- /* * dump.c: hextump command * * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * Copyright (C) 2001 Tim Riker * * 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: dump.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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 */ /* 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 * * AUTHOR: Tim Riker * REVISED: seletz * * dumps memory * */ static int dump( int argc, char *argv[] ) { int ret = 0; u32 address; u32 endaddress; u32 tmpaddress; u32 value; if ( argc < 2 ) ERR( -EINVAL ); ret = strtou32(argv[1], &address); if ( ret < 0 ) ERR( -EINVAL ); if ( argc == 3 ) { ret = strtou32(argv[2], &endaddress); if ( ret < 0 ) ERR( -EINVAL ); } else endaddress = address + 0x80; /* check alignment of address and endaddress */ if((address & 0x03) || (endaddress & 0x03)) ERR(-EALIGN); /* print it */ for ( ; address < endaddress; address += 0x10) { printf( "0x%08lx: ", address ); for (tmpaddress = address; tmpaddress < address + 0x10; tmpaddress += 4) { value = (*((u32 *)tmpaddress)); printf( "0x%08lx ", value ); } for (tmpaddress = address; tmpaddress < address + 0x10; tmpaddress++) { value = (*((u8 *)tmpaddress)) & 0xff; if ((value >= ' ') && (value <= '~')) serial_write(value); else serial_write('.'); } serial_write('\n'); } ret = 0; DONE: if ( ret != 0 ) { perror( ret, __FUNCTION__ ); } return ret; } static char dumphelp[] = "dump address [endAddress]\n"; __commandlist(dump, "dump", dumphelp ); --- NEW FILE: memcpy.c --- /* * memcpy.c: copy memory command * * 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: memcpy.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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 */ /* 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 */ /********************************************************************* * CmdMemcpy * * AUTOR: SELETZ * REVISED: * * Command wrapper for memcpy utility function. * */ static int CmdMemcpy( int argc, char *argv[] ) { int ret = 0; u32 src = 0L; u32 dest = 0L; u32 len = 0L; if ( argc < 4 ) ERR( -EINVAL ); ret = strtou32( argv[1], &src ); if ( ret < 0 ) ERR( -EINVAL ); ret = strtou32( argv[2], &dest ); if ( ret < 0 ) ERR( -EINVAL ); ret = strtou32( argv[3], &len ); if ( ret < 0 ) ERR( -EINVAL ); /* check alignment of src and dest */ if((src & 0x03) || (dest & 0x03)) ERR(-EALIGN); /* counted in words */ if ( len & 0x00000003 ) { len = ( len >> 2 ) + 1; } else { len = len >> 2; } _DBG( dbg, "memcpy: src=0x%08lx, dest=0x%08lx, %d words\n", src, sest, 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" "copy len bytes from src to dst\n"; __commandlist(CmdMemcpy, "memcpy", memcpyhelp); --- NEW FILE: peek.c --- /* * debug.c: Debugging command functions * * 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: peek.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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 */ /* 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 * * AUTHOR: Stefan Eletzhofer * REVISED: * * Peeks values from memory * */ static int Peek( int argc, char *argv[] ) { int ret = 0; u32 address; u32 value; char type = 'w'; if ( argc < 2 ) ERR( -EINVAL ); ret = strtou32(argv[1], &address); if ( ret < 0 ) ERR( -EINVAL ); if ( argc >= 2 ) { type = argv[2][0]; } _DBG( dbg, "peek: adr=0x%08lx, type=%c\n", address, type ); /* check memory alignment */ switch(type | 0x20) { case 'b': /* bytes don't have alignment restrictions */ break; case 'h': /* half word accesses should be aligned on half words */ if(address & 0x01) ERR(-EALIGN); break; case 'w': /* word accesses should be aligned on word boundaries */ if(address & 0x03) ERR(-EALIGN); break; default: /* hmm, invalid type */ ERR( -EINVAL ); break; } /* read value from memory */ switch( type | 0x20 ) { case 'b': value = (*((u8 *)address)) & 0xff; break; case 'h': value = (*((u16 *)address))& 0xffff; break; case 'w': value = (*((u32 *)address)); break; default: /* this should not happen */ ERR(-EINVAL); break; } printf( "%c 0x%08lx\n", type, value ); ret = 0; DONE: if ( ret != 0 ) { perror( ret, __FUNCTION__ ); } return ret; } static char peekhelp[] = "peek address [b|h|w]\n" "b = byte, h = half word, w = word (default is w)\n"; __commandlist(Peek, "peek", peekhelp ); --- NEW FILE: poke.c --- /* * poke.c: poke command * * 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: poke.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #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 */ /* 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 * * AUTOR: Stefan Eletzhofer * REVISED: * * Poke values to memory * */ static int Poke( int argc, char *argv[] ) { int ret = 0; u32 address; u32 value; char type = 'w'; if ( argc < 3 ) ERR( -EINVAL ); ret = strtou32(argv[1], &address); if ( ret < 0 ) ERR( -EINVAL ); ret = strtou32(argv[2], &value); if ( ret < 0 ) ERR( -EINVAL ); if ( argc >= 3 ) { type = argv[3][0]; } _DBG( dbg, "poke: adr=0x%08lx, val=0x%08lx, type=%c\n", address, value, type ); /* check memory alignment */ switch(type | 0x20) { case 'b': /* bytes don't have alignment restrictions */ break; case 'h': /* half word accesses should be aligned on half words */ if(address & 0x01) ERR(-EALIGN); break; case 'w': /* word accesses should be aligned on word boundaries */ if(address & 0x03) ERR(-EALIGN); break; default: /* hmm, invalid type */ ERR( -EINVAL ); break; } /* write the value to memory */ switch( type | 0x20 ) { case 'b': *((u8 *)address) = (u8)(value & 0xff); break; case 'h': *((u16 *)address) = (u16)(value & 0xffff); break; case 'w': *((u32 *)address) = value; break; default: /* this should not happen */ ERR( -EINVAL ); break; } ret = 0; DONE: if ( ret != 0 ) { perror( ret, __FUNCTION__ ); } return ret; } static char pokehelp[] = "poke address value [b|h|w]\n" "b = byte, h = half word, w = word (default is w)\n"; __commandlist(Poke, "poke", pokehelp ); --- NEW FILE: regs-sa11x0.c --- /* * regs-sa11x0.c: command to nicely debug register contents * * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * * $Id: regs-sa11x0.c,v 1.1 2002/02/12 12:54:59 seletz 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: regs-sa11x0.c,v 1.1 2002/02/12 12:54:59 seletz Exp $" /********************************************************************** * includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/types.h> #include <blob/errno.h> #include <blob/util.h> #include <blob/command.h> #include <blob/init.h> #include <blob/serial.h> #include <blob/time.h> #include <blob/sa1100.h> /********************************************************************** * defines */ #define MEM(adr) (*((u32*)adr)) #define SET(reg,bit) ((reg) |= (1<<(bit))) #define CLR(reg,bit) ((reg) &= ~(1<<(bit))) /********************************************************************** * types */ /* a type to hold register infos */ typedef struct _reg { char *name; /* reg name */ u32 adr; /* reg address */ char *desc; /* description */ } register_t; /* a set of registers */ typedef struct _reg_set { char *name; /* name of register set */ register_t *set; /* register set */ } reg_set_t; /********************************************************************** * module globals */ /* NOTE: the following register definitions are directly taken from * linux/include/asm-arm/arch-sa1100/SA-1100.h * and should therefore be correct.*/ /* Serial IF */ static register_t regs_uart[] = { { "Ser0UDCCR", (0x80000000), " Ser. port 0 UDC Control Reg. " }, { "Ser0UDCAR", (0x80000004), " Ser. port 0 UDC Address Reg. " }, { "Ser0UDCOMP", (0x80000008), " Ser. port 0 UDC Output Maximum Packet size reg. " }, { "Ser0UDCIMP", (0x8000000C), " Ser. port 0 UDC Input Maximum Packet size reg. " }, { "Ser0UDCCS0", (0x80000010), " Ser. port 0 UDC Control/Status reg. end-point 0 " }, { "Ser0UDCCS1", (0x80000014), " Ser. port 0 UDC Control/Status reg. end-point 1 (output) " }, { "Ser0UDCCS2", (0x80000018), " Ser. port 0 UDC Control/Status reg. end-point 2 (input) " }, { "Ser0UDCD0", (0x8000001C), " Ser. port 0 UDC Data reg. end-point 0 " }, { "Ser0UDCWC", (0x80000020), " Ser. port 0 UDC Write Count reg. end-point 0 " }, { "Ser0UDCDR", (0x80000028), " Ser. port 0 UDC Data Reg. " }, { "Ser0UDCSR", (0x80000030), " Ser. port 0 UDC Status Reg. " }, { "_UTCR01", (0x80010000 + ((1) - 1)*0x00020000), " UART Control Reg. 0 [1..3] " }, { "_UTCR02", (0x80010000 + ((2) - 1)*0x00020000), " UART Control Reg. 0 [1..3] " }, { "_UTCR03", (0x80010000 + ((3) - 1)*0x00020000), " UART Control Reg. 0 [1..3] " }, { "_UTCR11", (0x80010004 + ((1) - 1)*0x00020000), " UART Control Reg. 1 [1..3] " }, { "_UTCR22", (0x80010008 + ((2) - 1)*0x00020000), " UART Control Reg. 2 [1..3] " }, { "_UTCR33", (0x8001000C + ((3) - 1)*0x00020000), " UART Control Reg. 3 [1..3] " }, { "_UTCR42", (0x80010010 + ((2) - 1)*0x00020000), " UART Control Reg. 4 [2] " }, { "_UTDR1", (0x80010014 + ((1) - 1)*0x00020000), " UART Data Reg. [1..3] " }, { "_UTDR2", (0x80010014 + ((2) - 1)*0x00020000), " UART Data Reg. [1..3] " }, { "_UTDR3", (0x80010014 + ((3) - 1)*0x00020000), " UART Data Reg. [1..3] " }, { "_UTSR01", (0x8001001C + ((1) - 1)*0x00020000), " UART Status Reg. 0 [1..3] " }, { "_UTSR02", (0x8001001C + ((2) - 1)*0x00020000), " UART Status Reg. 0 [1..3] " }, { "_UTSR03", (0x8001001C + ((3) - 1)*0x00020000), " UART Status Reg. 0 [1..3] " }, { "_UTSR11", (0x80010020 + ((1) - 1)*0x00020000), " UART Status Reg. 1 [1..3] " }, { "_UTSR12", (0x80010020 + ((2) - 1)*0x00020000), " UART Status Reg. 1 [1..3] " }, { "_UTSR13", (0x80010020 + ((3) - 1)*0x00020000), " UART Status Reg. 1 [1..3] " }, { "Ser1SDCR0", (0x80020060), " Ser. port 1 SDLC Control Reg. 0 " }, { "Ser1SDCR1", (0x80020064), " Ser. port 1 SDLC Control Reg. 1 " }, { "Ser1SDCR2", (0x80020068), " Ser. port 1 SDLC Control Reg. 2 " }, { "Ser1SDCR3", (0x8002006C), " Ser. port 1 SDLC Control Reg. 3 " }, { "Ser1SDCR4", (0x80020070), " Ser. port 1 SDLC Control Reg. 4 " }, { "Ser1SDDR", (0x80020078), " Ser. port 1 SDLC Data Reg. " }, { "Ser1SDSR0", (0x80020080), " Ser. port 1 SDLC Status Reg. 0 " }, { "Ser1SDSR1", (0x80020084), " Ser. port 1 SDLC Status Reg. 1 " }, { "Ser2HSCR0", (0x80040060), " Ser. port 2 HSSP Control Reg. 0 " }, { "Ser2HSCR1", (0x80040064), " Ser. port 2 HSSP Control Reg. 1 " }, { "Ser2HSDR", (0x8004006C), " Ser. port 2 HSSP Data Reg. " }, { "Ser2HSSR0", (0x80040074), " Ser. port 2 HSSP Status Reg. 0 " }, { "Ser2HSSR1", (0x80040078), " Ser. port 2 HSSP Status Reg. 1 " }, { "Ser2HSCR2", (0x90060028), " Ser. port 2 HSSP Control Reg. 2 " }, { "Ser4MCCR0", (0x80060000), " Ser. port 4 MCP Control Reg. 0 " }, { "Ser4MCDR0", (0x80060008), " Ser. port 4 MCP Data Reg. 0 (audio) " }, { "Ser4MCDR1", (0x8006000C), " Ser. port 4 MCP Data Reg. 1 (telecom) " }, { "Ser4MCDR2", (0x80060010), " Ser. port 4 MCP Data Reg. 2 (CODEC reg.) " }, { "Ser4MCSR", (0x80060018), " Ser. port 4 MCP Status Reg. " }, { "Ser4MCCR1", (0x90060030), " Ser. port 4 MCP Control Reg. 1 " }, { "Ser4SSCR0", (0x80070060), " Ser. port 4 SSP Control Reg. 0 " }, { "Ser4SSCR1", (0x80070064), " Ser. port 4 SSP Control Reg. 1 " }, { "Ser4SSDR", (0x8007006C), " Ser. port 4 SSP Data Reg. " }, { "Ser4SSSR", (0x80070074), " Ser. port 4 SSP Status Reg. " }, { NULL, 0 } }; /* Timer */ static register_t regs_timer[] = { { "OSMR0", (0x90000000), " OS timer Match Reg. 0 " }, { "OSMR1", (0x90000004), " OS timer Match Reg. 1 " }, { "OSMR2", (0x90000008), " OS timer Match Reg. 2 " }, { "OSMR3", (0x9000000c), " OS timer Match Reg. 3 " }, { "OSCR", (0x90000010), " OS timer Counter Reg. " }, { "OSSR", (0x90000014), " OS timer Status Reg. " }, { "OWER", (0x90000018), " OS timer Watch-dog Enable Reg. " }, { "OIER", (0x9000001C), " OS timer Interrupt Enable Reg. " }, { NULL, 0 } }; /* RTC and Power Mgmt */ static register_t regs_rtc[] = { { "RTAR", (0x90010000), " RTC Alarm Reg. " }, { "RCNR", (0x90010004), " RTC CouNt Reg. " }, { "RTTR", (0x90010008), " RTC Trim Reg. " }, { "RTSR", (0x90010010), " RTC Status Reg. " }, { "PMCR", (0x90020000), " PM Control Reg. " }, { "PSSR", (0x90020004), " PM Sleep Status Reg. " }, { "PSPR", (0x90020008), " PM Scratch-Pad Reg. " }, { "PWER", (0x9002000C), " PM Wake-up Enable Reg. " }, { "PCFR", (0x90020010), " PM general ConFiguration Reg. " }, { "PPCR", (0x90020014), " PM PLL Configuration Reg. " }, { "PGSR", (0x90020018), " PM GPIO Sleep state Reg. " }, { "POSR", (0x9002001C), " PM Oscillator Status Reg. " }, { "RSRR", (0x90030000), " RC Software Reset Reg. " }, { "RCSR", (0x90030004), " RC Status Reg. " }, { "TUCR", (0x90030008), " Test Unit Control Reg. " }, { NULL, 0 } }; /* GPIO / IRQ */ static register_t regs_gpio[] = { { "GPLR", (0x90040000), " GPIO Pin Level Reg. " }, { "GPDR", (0x90040004), " GPIO Pin Direction Reg. " }, { "GPSR", (0x90040008), " GPIO Pin output Set Reg. " }, { "GPCR", (0x9004000C), " GPIO Pin output Clear Reg. " }, { "GRER", (0x90040010), " GPIO Rising-Edge detect Reg. " }, { "GFER", (0x90040014), " GPIO Falling-Edge detect Reg. " }, { "GEDR", (0x90040018), " GPIO Edge Detect status Reg. " }, { "GAFR", (0x9004001C), " GPIO Alternate Function Reg. " }, { "ICIP", (0x90050000), " IC IRQ Pending reg. " }, { "ICMR", (0x90050004), " IC Mask Reg. " }, { "ICLR", (0x90050008), " IC Level Reg. " }, { "ICCR", (0x9005000C), " IC Control Reg. " }, { "ICFP", (0x90050010), " IC FIQ Pending reg. " }, { "ICPR", (0x90050020), " IC Pending Reg. " }, { "PPDR", (0x90060000), " PPC Pin Direction Reg. " }, { "PPSR", (0x90060004), " PPC Pin State Reg. " }, { "PPAR", (0x90060008), " PPC Pin Assignment Reg. " }, { "PSDR", (0x9006000C), " PPC Sleep-mode pin Direction Reg. " }, { "PPFR", (0x90060010), " PPC Pin Flag Reg. " }, { NULL, 0 } }; /* MEMORY */ static register_t regs_memory[] = { { "MDCNFG", (0xA0000000), " DRAM CoNFiGuration reg. " }, { "MDCAS0", (0xA0000004), " DRAM CAS shift reg. 0 " }, { "MDCAS1", (0xA0000008), " DRAM CAS shift reg. 1 " }, { "MDCAS2", (0xA000000c), " DRAM CAS shift reg. 2 " }, { "MSC0", (0xa0000010), " Static memory Control reg. 0 " }, { "MSC1", (0xa0000014), " Static memory Control reg. 1 " }, { "MSC2", (0xa000002c), " Static memory Control reg. 2, not contiguous " }, { "MECR", (0xA0000018), " Expansion memory bus (PCMCIA) Configuration Reg. " }, { "MDREFR", (0xA000001C), " (SA1110 only) DRAM Refresh Control Register" }, { NULL, 0 } }; /* LCD */ static register_t regs_lcd[] = { { "LCCR0", (0xB0100000), " LCD Control Reg. 0 " }, { "LCSR", (0xB0100004), " LCD Status Reg. " }, { "DBAR1", (0xB0100010), " LCD DMA Base Address Reg. channel 1 " }, { "DCAR1", (0xB0100014), " LCD DMA Current Address Reg. channel 1 " }, { "DBAR2", (0xB0100018), " LCD DMA Base Address Reg. channel 2 " }, { "DCAR2", (0xB010001C), " LCD DMA Current Address Reg. channel 2 " }, { "LCCR1", (0xB0100020), " LCD Control Reg. 1 " }, { "LCCR2", (0xB0100024), " LCD Control Reg. 2 " }, { "LCCR3", (0xB0100028), " LCD Control Reg. 3 " }, { NULL, 0 } }; /* TODO: add SA1111 companion chip registers */ /* finally the available register sets */ static reg_set_t reg_sets[] = { { "uart", regs_uart }, { "timer", regs_timer }, { "rtc", regs_rtc }, { "gpio", regs_gpio }, { "memory", regs_memory }, { "lcd", regs_lcd }, { NULL, NULL } }; /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ /********************************************************************** * regs_show() * * AUTHOR: seletz * REVISED: * * Display register contents * */ static int regs_show( int argc, char *argv[] ) { int i = 0; int set = 0; register_t *registers = NULL; /* TODO: allow user to select a specific register set to * print instead of simply print all sets. */ set = 0; while ( reg_sets[set].name ) { i = 0; registers = reg_sets[set].set; printf( "%s\n", reg_sets[set].name ); printf( "--------------------------------\n" ); while ( registers && registers[i].name ) { printf( "%s= 0x%08lx %s\n", registers[i].name, MEM( registers[i].adr ), registers[i].desc?registers[i].desc:"" ); i++; } set++; serial_write( '\n' ); } return 0; } static char regshelp[] = "print register info\n"; __commandlist(regs_show, "regs", regshelp); Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/commands/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 29 Jan 2002 17:47:23 -0000 1.1 +++ Makefile.am 12 Feb 2002 12:54:59 -0000 1.2 @@ -26,6 +26,14 @@ libcommands_a_SOURCES = \ + common.c \ + poke.c \ + peek.c \ + regs-sa11x0.c \ + call.c \ + changebit.c \ + dump.c \ + chkmem.c \ dummy.c |
From: Tim R. <tim...@us...> - 2002-02-12 02:22:02
|
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv32014/src/commands Added Files: .cvsignore Log Message: ignores --- NEW FILE: .cvsignore --- Makefile.in Makefile blob* *.o .deps |
From: Tim R. <tim...@us...> - 2002-02-12 00:03:52
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv26574 Modified Files: memsetup-sa1110.S Log Message: backout changes so we can still compile Index: memsetup-sa1110.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/memsetup-sa1110.S,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- memsetup-sa1110.S 8 Feb 2002 14:21:50 -0000 1.11 +++ memsetup-sa1110.S 12 Feb 2002 00:03:50 -0000 1.12 @@ -58,18 +58,18 @@ .long MDCAS00_VALUE /* 0x04 MDCAS00 */ .long MDCAS01_VALUE /* 0x08 MDCAS01 */ .long MDCAS02_VALUE /* 0x0c MDCAS02 */ - .long MSC0_VALUE /* 0x10 MSC0 */ - .long 0 /* 0x14 MSC1 */ - .long 0 /* 0x18 MECR */ + .long MSC0_VALUE /* 0x10 MSC0 */ + .long MSC1_VALUE /* 0x14 MSC1 */ + .long MECR_VALUE /* 0x18 MECR */ #ifdef MDRFER_DONT_BELIEVE_IN_MAGIC .long MDREFR_VALUE #else - .long 0xdeadbeef /* 0x1C MDREFR */ -#endif - .long 0 /* 0x20 MDCAS20 */ - .long 0 /* 0x24 MDCAS21 */ - .long 0 /* 0x28 MDCAS22 */ - .long 0 /* 0x2C MSC2 */ + .long 0xdeadbeef /* 0x1C MDREFR */ +#endif + .long MDCAS20_VALUE /* 0x20 MDCAS20 */ + .long MDCAS21_VALUE /* 0x24 MDCAS21 */ + .long MDCAS22_VALUE /* 0x28 MDCAS22 */ + .long MSC2_VALUE /* 0x2C MSC2 */ .long SMCNFG_VALUE /* 0x30 SMCNFG */ .globl memsetup @@ -92,20 +92,14 @@ ldr r2, [r1, #MDCAS02 ] str r2, [r0, #MDCAS02 ] -#ifdef MDCAS20_VALUE - mov r2, #MDCAS20_VALUE + ldr r2, [r1, #MDCAS20 ] str r2, [r0, #MDCAS20 ] -#endif -#ifdef MDCAS21_VALUE - mov r2, #MDCAS21_VALUE + ldr r2, [r1, #MDCAS21 ] str r2, [r0, #MDCAS21 ] -#endif -#ifdef MDCAS22_VALUE - mov r2, #MDCAS22_VALUE + ldr r2, [r1, #MDCAS22 ] str r2, [r0, #MDCAS22 ] -#endif #ifdef MDREFR_DONT_BELIEVE_IN_MAGIC ldr r2, [r1, #MDREFR ] @@ -171,23 +165,16 @@ ldr r2, [r1, #MCS0 ] str r2, [r0, #MCS0 ] -#ifdef MSC1_VALUE - mov r2, #MSC1_VALUE + ldr r2, [r1, #MCS1 ] str r2, [r0, #MCS1 ] -#endif -#ifdef MSC2_VALUE - mov r2, #MSC2_VALUE + ldr r2, [r1, #MCS2 ] str r2, [r0, #MCS2 ] -#endif ldr r2, [r1, #SMCNFG ] str r2, [r0, #SMCNFG ] -#ifdef MECR_VALUE - mov r2, #MECR_VALUE + ldr r2, [r1, #MECR ] str r2, [r0, #MECR ] -#endif - + mov pc, r5 - |
From: Tim R. <tim...@us...> - 2002-02-11 22:51:05
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv601/src/diag Modified Files: .cvsignore Log Message: map file Index: .cvsignore =================================================================== RCS file: /cvsroot/blob/blob/src/diag/.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 11 Feb 2002 22:50:59 -0000 1.3 @@ -4,3 +4,4 @@ diag-elf32 *.o .deps +*.map |
From: Tim R. <tim...@us...> - 2002-02-11 22:46:56
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv31782/src/blob Modified Files: idr.c Log Message: backlight hack Index: idr.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/idr.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- idr.c 27 Jan 2002 09:06:18 -0000 1.7 +++ idr.c 11 Feb 2002 22:46:53 -0000 1.8 @@ -92,12 +92,12 @@ PA_DWR |= GPIO_GPIO2; /* - * for debug, we turn the backlight on here + * for debug, we turn the backlight on and off here */ PA_DDR &= ~GPIO_GPIO3; - PA_DWR |= GPIO_GPIO3; #if 0 - /* off reboots the machine, don't know why */ + /* reboots the machine, if no battery is connected */ + PA_DWR |= GPIO_GPIO3; msleep(1000); PA_DWR &= ~GPIO_GPIO3; #endif |
From: Stefan E. <se...@us...> - 2002-02-11 17:08:23
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv17499 Modified Files: chkmem.c Log Message: email adr corrected Index: chkmem.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/chkmem.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- chkmem.c 5 Feb 2002 13:40:46 -0000 1.7 +++ chkmem.c 11 Feb 2002 16:55:26 -0000 1.8 @@ -2,7 +2,7 @@ * Filename: chkmem.c * Version: $Id$ * Copyright: Copyright (C) 2001, Stefan Eletzhofer - * Author: Stefan Eletzhofer <ste...@ww...> + * Author: Stefan Eletzhofer <ste...@ww...> * Description: memory test functions * Created at: Mit Sep 26 19:20:24 CEST 2001 * Modified by: @@ -11,7 +11,7 @@ /* * chkmem.c: Utility to test memory integrity * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 |
From: Stefan E. <se...@us...> - 2002-02-11 16:54:29
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv17037 Modified Files: command_hist.h lcd.h memsetup.h sa1111.h Log Message: email adr corrected Index: command_hist.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/command_hist.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- command_hist.h 7 Oct 2001 23:32:05 -0000 1.1 +++ command_hist.h 11 Feb 2002 16:54:22 -0000 1.2 @@ -5,7 +5,7 @@ * * Header file for command_hist.h * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 Index: lcd.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/lcd.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lcd.h 15 Oct 2001 15:06:06 -0000 1.4 +++ lcd.h 11 Feb 2002 16:54:23 -0000 1.5 @@ -5,7 +5,7 @@ * * Generic lcd framework * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 Index: memsetup.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/memsetup.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- memsetup.h 8 Feb 2002 14:21:50 -0000 1.5 +++ memsetup.h 11 Feb 2002 16:54:23 -0000 1.6 @@ -4,7 +4,7 @@ * $Id$ * * Copyright (C) 2001 Stefan Eletzhofer - * <ste...@ww...> + * <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 Index: sa1111.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/sa1111.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- sa1111.h 7 Jan 2002 17:54:14 -0000 1.4 +++ sa1111.h 11 Feb 2002 16:54:23 -0000 1.5 @@ -1,7 +1,7 @@ /* * sa1111.h: wrapper file to include asm/arch-sa1100/SA-1111.h * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * * $Id$ * |
From: Stefan E. <se...@us...> - 2002-02-11 16:53:20
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv16567 Modified Files: accelent_sa.c command_hist.c lcd.c regs-sa11x0.c system3.c Log Message: email adr corrected Index: accelent_sa.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/accelent_sa.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- accelent_sa.c 4 Feb 2002 18:02:43 -0000 1.1 +++ accelent_sa.c 11 Feb 2002 16:53:16 -0000 1.2 @@ -3,7 +3,7 @@ * * Implements several POST routines for Accelent IDP platform * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * Copyright (c) 2002 Holger Schurig <h.s...@mn...> * * This program is free software; you can redistribute it and/or modify Index: command_hist.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/command_hist.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- command_hist.c 19 Dec 2001 20:00:15 -0000 1.2 +++ command_hist.c 11 Feb 2002 16:53:16 -0000 1.3 @@ -5,7 +5,7 @@ * * Implements a simple command history * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 Index: lcd.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/lcd.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- lcd.c 3 Jan 2002 16:07:18 -0000 1.5 +++ lcd.c 11 Feb 2002 16:53:16 -0000 1.6 @@ -5,7 +5,7 @@ * * Generic lcd framework * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 Index: regs-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/regs-sa11x0.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- regs-sa11x0.c 7 Jan 2002 17:35:06 -0000 1.3 +++ regs-sa11x0.c 11 Feb 2002 16:53:16 -0000 1.4 @@ -1,7 +1,7 @@ /* * regs-sa11x0.c: command to nicely debug register contents * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> * * $Id$ * Index: system3.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/system3.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- system3.c 4 Feb 2002 18:12:51 -0000 1.9 +++ system3.c 11 Feb 2002 16:53:16 -0000 1.10 @@ -5,7 +5,7 @@ * * Implements several POST routines for PT System 3 platform * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 |
From: Stefan E. <se...@us...> - 2002-02-11 16:52:35
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv16285 Modified Files: debug.c Log Message: email adr corrected Index: debug.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/debug.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- debug.c 27 Jan 2002 10:03:54 -0000 1.10 +++ debug.c 11 Feb 2002 16:52:32 -0000 1.11 @@ -1,7 +1,7 @@ /* * debug.c: Debugging command functions * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * 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 |
From: Stefan E. <se...@us...> - 2002-02-11 16:51:25
|
Update of /cvsroot/blob/blob/doc In directory usw-pr-cvs1:/tmp/cvs-serv15715 Modified Files: diag.txt Log Message: - correct email adr Index: diag.txt =================================================================== RCS file: /cvsroot/blob/blob/doc/diag.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- diag.txt 7 Jan 2002 19:58:14 -0000 1.2 +++ diag.txt 11 Feb 2002 16:51:22 -0000 1.3 @@ -2,7 +2,7 @@ quickly hacked up by Stefan Eletzhofer <ste...@el...> -Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> +Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> $Id$ |
From: Stefan E. <se...@us...> - 2002-02-11 16:43:55
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv13045 Modified Files: AUTHORS Log Message: - corrected mail address Index: AUTHORS =================================================================== RCS file: /cvsroot/blob/blob/AUTHORS,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- AUTHORS 4 Feb 2002 18:02:37 -0000 1.6 +++ AUTHORS 11 Feb 2002 16:43:51 -0000 1.7 @@ -51,12 +51,12 @@ * PT system 3 port ================== -- Stefan Eletzhofer <ste...@ww...> +- Stefan Eletzhofer <ste...@ww...> * Memory tester =============== -- Stefan Eletzhofer <ste...@ww...> +- Stefan Eletzhofer <ste...@ww...> * Ipaq H3600 port |
From: Erik M. <J.A...@it...> - 2002-02-11 14:27:32
|
On Mon, Feb 11, 2002 at 10:05:25AM +0100, Holger Schurig wrote: > > It isn't. It is autogenerated. Autgenerated files do NOT belong in > > CVS. > > Oh, then I'm sorry. I thought that config.h is made out of config.h.in, > but didn't knew that config.h.in is also auto-generated. > > So maybe it's better to add a autogen.sh or Makefile.cvs file > eventually. We already have: tools/rebuild-gcc . 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: Holger S. <h.s...@mn...> - 2002-02-11 09:21:17
|
> It isn't. It is autogenerated. Autgenerated files do NOT belong in > CVS. Oh, then I'm sorry. I thought that config.h is made out of config.h.in, but didn't knew that config.h.in is also auto-generated. So maybe it's better to add a autogen.sh or Makefile.cvs file eventually. |
From: Erik M. <er...@us...> - 2002-02-08 16:44:17
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv1291 Modified Files: ChangeLog Log Message: - Add printf() to ChangeLog - Move stuff around: new entries should go at the top, not at the bottom - Weekend, party time! Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ChangeLog 8 Feb 2002 10:29:47 -0000 1.23 +++ ChangeLog 8 Feb 2002 16:44:14 -0000 1.24 @@ -3,10 +3,14 @@ $Id$ -(Please add new entries at the top, not at the bottom) +(NOTE: Please add new entries at the top, not at the bottom) blob-2.0.5-pre3: +- Added printf() from linux-2.4.17-rmk3 Erik Mouw +- Made external, bank 2/3 memory references + optional for SA-1110 platforms Abraham van der Merwe +- Added a dontdiff file for blob Abraham van der Merwe - Change license for src/blob/testmem*.S from GPLv2+later to GPLv2 only. My fault, I should have asked Russell. Erik Mouw @@ -16,9 +20,6 @@ - Changed Xmodem support to be optional Abraham van der Merwe - 2d3D SA-1110 Dev Board support Abraham van der Merwe - First stage loader modularisation Erik Mouw -- Made external, bank 2/3 memory references - optional for SA-1110 platforms Abraham van der Merwe -- Added a dontdiff file for blob Abraham van der Merwe blob-2.0.5-pre2: - MD5 support Christopher Hoover |
From: Abraham vd M. <ab...@us...> - 2002-02-08 14:21:56
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv19968/src/blob Modified Files: memsetup-sa1110.S Log Message: Cleaned up the #ifdef jungle caused by the optional memory configuration settings (a bit at least. there is still some #ifdef's left in memsetup-sa1110.S). Index: memsetup-sa1110.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/memsetup-sa1110.S,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- memsetup-sa1110.S 8 Feb 2002 10:19:56 -0000 1.10 +++ memsetup-sa1110.S 8 Feb 2002 14:21:50 -0000 1.11 @@ -59,49 +59,17 @@ .long MDCAS01_VALUE /* 0x08 MDCAS01 */ .long MDCAS02_VALUE /* 0x0c MDCAS02 */ .long MSC0_VALUE /* 0x10 MSC0 */ - -#ifdef MSC1_VALUE - .long MSC1_VALUE /* 0x14 MSC1 */ -#else - .long 0x00000000 -#endif - -#ifdef MECR_VALUE - .long MECR_VALUE /* 0x18 MECR */ -#else - .long 0x00000000 -#endif - + .long 0 /* 0x14 MSC1 */ + .long 0 /* 0x18 MECR */ #ifdef MDRFER_DONT_BELIEVE_IN_MAGIC .long MDREFR_VALUE #else .long 0xdeadbeef /* 0x1C MDREFR */ #endif - -#ifdef MDCAS20_VALUE - .long MDCAS20_VALUE /* 0x20 MDCAS20 */ -#else - .long 0x00000000 -#endif - -#ifdef MDCAS21_VALUE - .long MDCAS21_VALUE /* 0x24 MDCAS21 */ -#else - .long 0x00000000 -#endif - -#ifdef MDCAS22_VALUE - .long MDCAS22_VALUE /* 0x28 MDCAS22 */ -#else - .long 0x00000000 -#endif - -#ifdef MSC2_VALUE - .long MSC2_VALUE /* 0x2C MSC2 */ -#else - .long 0x00000000 -#endif - + .long 0 /* 0x20 MDCAS20 */ + .long 0 /* 0x24 MDCAS21 */ + .long 0 /* 0x28 MDCAS22 */ + .long 0 /* 0x2C MSC2 */ .long SMCNFG_VALUE /* 0x30 SMCNFG */ .globl memsetup @@ -125,17 +93,17 @@ str r2, [r0, #MDCAS02 ] #ifdef MDCAS20_VALUE - ldr r2, [r1, #MDCAS20 ] + mov r2, #MDCAS20_VALUE str r2, [r0, #MDCAS20 ] #endif #ifdef MDCAS21_VALUE - ldr r2, [r1, #MDCAS21 ] + mov r2, #MDCAS21_VALUE str r2, [r0, #MDCAS21 ] #endif #ifdef MDCAS22_VALUE - ldr r2, [r1, #MDCAS22 ] + mov r2, #MDCAS22_VALUE str r2, [r0, #MDCAS22 ] #endif @@ -204,12 +172,12 @@ str r2, [r0, #MCS0 ] #ifdef MSC1_VALUE - ldr r2, [r1, #MCS1 ] + mov r2, #MSC1_VALUE str r2, [r0, #MCS1 ] #endif #ifdef MSC2_VALUE - ldr r2, [r1, #MCS2 ] + mov r2, #MSC2_VALUE str r2, [r0, #MCS2 ] #endif @@ -217,7 +185,7 @@ str r2, [r0, #SMCNFG ] #ifdef MECR_VALUE - ldr r2, [r1, #MECR ] + mov r2, #MECR_VALUE str r2, [r0, #MECR ] #endif |
From: Abraham vd M. <ab...@us...> - 2002-02-08 14:21:54
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv19968/include/blob Modified Files: memsetup.h Log Message: Cleaned up the #ifdef jungle caused by the optional memory configuration settings (a bit at least. there is still some #ifdef's left in memsetup-sa1110.S). Index: memsetup.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/memsetup.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- memsetup.h 27 Dec 2001 18:27:37 -0000 1.4 +++ memsetup.h 8 Feb 2002 14:21:50 -0000 1.5 @@ -77,8 +77,8 @@ #define MDREFR_K1DB2 (1 << 22) #define MDREFR_K2RUN (1 << 25) #define MDREFR_K2DB2 (1 << 26) -#define MDREFR_EAPD (1 << 28) -#define MDREFR_KAPD (1 << 29) +#define MDREFR_EAPD (1 << 28) +#define MDREFR_KAPD (1 << 29) #define MDREFR_SLFRSH (1 << 31) /********************************************************************** |