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...> - 2001-10-03 16:01:28
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv3775/src Added Files: error.c Log Message: Commit empty files so changes will be visible --- NEW FILE error.c --- |
|
From: Erik M. <er...@us...> - 2001-10-03 16:01:28
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv3775/include Added Files: errno.h error.h Log Message: Commit empty files so changes will be visible --- NEW FILE errno.h --- --- NEW FILE error.h --- |
|
From: Erik M. <er...@us...> - 2001-10-02 21:54:51
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv6717/src
Modified Files:
command.c led.c linux.c main.c serial.c time.c
Log Message:
And this is how the init/exit lists are used.
init_subsystems() is called in main(), exit_subsystems() just before the
kernel boots. This should clean up things nicely.
Index: command.c
===================================================================
RCS file: /cvsroot/blob/blob/src/command.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- command.c 2001/10/02 20:50:24 1.7
+++ command.c 2001/10/02 21:54:48 1.8
@@ -36,6 +36,7 @@
#endif
#include "command.h"
+#include "init.h"
#include "serial.h"
#include "time.h"
#include "types.h"
@@ -51,7 +52,7 @@
commandlist_t *commands;
-void init_commands(void)
+static void init_commands(void)
{
commandlist_t *lastcommand;
commandlist_t *cmd, *next_cmd;
@@ -71,7 +72,7 @@
}
}
-
+__initlist(init_commands, INIT_LEVEL_OTHER_STUFF);
#define STATE_WHITESPACE (0)
Index: led.c
===================================================================
RCS file: /cvsroot/blob/blob/src/led.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- led.c 2001/08/06 22:44:52 1.2
+++ led.c 2001/10/02 21:54:48 1.3
@@ -42,10 +42,10 @@
#include "led.h"
#include "sa1100.h"
+#include "init.h"
-
static int led_state;
@@ -76,3 +76,8 @@
else
led_on();
}
+
+
+/* init and exit calls */
+__initlist(led_on, INIT_LEVEL_INITIAL_HARDWARE);
+__exitlist(led_off, INIT_LEVEL_INITIAL_HARDWARE);
Index: linux.c
===================================================================
RCS file: /cvsroot/blob/blob/src/linux.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux.c 2001/09/23 14:59:01 1.6
+++ linux.c 2001/10/02 21:54:48 1.7
@@ -29,6 +29,7 @@
#include "command.h"
#include "main.h"
#include "flash.h"
+#include "init.h"
#include "memory.h"
#include "serial.h"
#include "util.h"
@@ -61,6 +62,9 @@
/* we assume that the kernel is in place */
SerialOutputString("\nStarting kernel ...\n\n");
+
+ /* disable subsystems that want to be disabled before kernel boot */
+ exit_subsystems();
/* turn off I-cache */
asm ("mrc p15, 0, %0, c1, c0, 0": "=r" (i));
Index: main.c
===================================================================
RCS file: /cvsroot/blob/blob/src/main.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- main.c 2001/09/24 17:50:41 1.14
+++ main.c 2001/10/02 21:54:48 1.15
@@ -40,6 +40,7 @@
#include "command.h"
#include "flash.h"
+#include "init.h"
#include "led.h"
#include "linux.h"
#include "main.h"
@@ -74,11 +75,9 @@
int retval = 0;
u32 conf;
- /* Turn the LED on again, so we can see that we safely made it
- * into C code.
- */
- led_on();
-
+ /* call subsystems */
+ init_subsystems();
+
/* initialise status */
blob_status.paramSize = 0;
blob_status.paramType = fromFlash;
@@ -93,6 +92,8 @@
blob_status.cmdline[0] = '\0';
blob_status.boot_delay = 10;
+ /* call SerialInit() because the default 9k6 speed might not
+ be what the user requested */
SerialInit(blob_status.terminalSpeed);
/* parse the core tag, for critical things like terminal speed */
@@ -100,8 +101,6 @@
parse_ptag((void *) PARAM_START, &conf);
#endif
- TimerInit();
-
/* Print the required GPL string */
SerialOutputString("\nConsider yourself LARTed!\n\n");
SerialOutputString(PACKAGE " version " VERSION "\n"
@@ -116,9 +115,6 @@
/* get the amount of memory */
get_memory_map();
-
- /* initialise command line parser */
- init_commands();
/* Parse all the tags in the paramater block */
#ifdef PARAM_START
Index: serial.c
===================================================================
RCS file: /cvsroot/blob/blob/src/serial.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- serial.c 2001/09/26 13:43:46 1.4
+++ serial.c 2001/10/02 21:54:48 1.5
@@ -35,6 +35,7 @@
# include "config.h"
#endif
+#include "init.h"
#include "led.h"
#include "sa1100.h"
#include "serial.h"
@@ -330,3 +331,13 @@
return(numRead);
}
+
+
+/* default initialisation */
+static void serial_default_init(void)
+{
+ SerialInit(baud9k6);
+}
+
+
+__initlist(serial_default_init, INIT_LEVEL_INITIAL_HARDWARE);
Index: time.c
===================================================================
RCS file: /cvsroot/blob/blob/src/time.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- time.c 2001/08/06 22:44:52 1.2
+++ time.c 2001/10/02 21:54:48 1.3
@@ -35,6 +35,7 @@
# include "config.h"
#endif
+#include "init.h"
#include "led.h"
#include "sa1100.h"
#include "time.h"
@@ -47,7 +48,7 @@
-void TimerInit(void)
+static void TimerInit(void)
{
/* clear counter */
OSCR = 0;
@@ -67,6 +68,8 @@
numOverflows = 0;
}
+
+__initlist(TimerInit, INIT_LEVEL_OTHER_HARDWARE);
|
|
From: Erik M. <er...@us...> - 2001-10-02 21:54:51
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv6717/include Modified Files: command.h time.h Log Message: And this is how the init/exit lists are used. init_subsystems() is called in main(), exit_subsystems() just before the kernel boots. This should clean up things nicely. Index: command.h =================================================================== RCS file: /cvsroot/blob/blob/include/command.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- command.h 2001/09/17 00:05:31 1.3 +++ command.h 2001/10/02 21:54:48 1.4 @@ -64,7 +64,6 @@ extern commandlist_t *commands; -void init_commands(void); int parse_command(char *cmdline); #define MAX_COMMANDLINE_LENGTH (128) Index: time.h =================================================================== RCS file: /cvsroot/blob/blob/include/time.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- time.h 2001/08/06 22:44:52 1.2 +++ time.h 2001/10/02 21:54:48 1.3 @@ -46,9 +46,6 @@ -/* initialise timer */ -void TimerInit(void); - /* returns the time in 1/TICKS_PER_SECOND seconds */ u32 TimerGetTime(void); |
|
From: Erik M. <er...@us...> - 2001-10-02 21:39:59
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv3560/src
Modified Files:
init.c Makefile.am rest-ld-script
Log Message:
The init and exit lists code.
Index: init.c
===================================================================
RCS file: /cvsroot/blob/blob/src/init.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- init.c 2001/10/02 21:31:17 1.1
+++ init.c 2001/10/02 21:39:54 1.2
@@ -0,0 +1,84 @@
+/*
+ * init.c: Support for init and exit lists
+ *
+ * Copyright (C) 2001 Erik Mouw (J.A...@it...)
+ *
+ * $Id$
+ *
+ * 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$"
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "init.h"
+#include "serial.h"
+
+
+/* int and exit list start and end. filled in by the linker */
+extern u32 __initlist_start;
+extern u32 __initlist_end;
+extern u32 __exitlist_start;
+extern u32 __exitlist_end;
+
+
+static void call_funcs(initlist_t *start, initlist_t *end,
+ u32 magic, int level)
+{
+ initlist_t *item;
+
+ for(item = start; item != end; item++) {
+ if(item->magic != magic) {
+ SerialOutputString("*** Init magic failed for 0x");
+ SerialOutputHex((u32)item);
+ SerialOutputString("!\n");
+
+ return;
+ }
+
+ if(item->level == level) {
+ /* call function */
+ item->callback();
+ }
+ }
+}
+
+
+void init_subsystems(void)
+{
+ int i;
+
+ /* call all subsystem init functions */
+ for(i = INIT_LEVEL_MIN; i <= INIT_LEVEL_MAX; i++)
+ call_funcs((initlist_t *)&__initlist_start,
+ (initlist_t *)&__initlist_end,
+ INIT_MAGIC, i);
+}
+
+
+void exit_subsystems(void)
+{
+ int i;
+
+ /* call all subsystem exit functions */
+ for(i = INIT_LEVEL_MAX; i >= INIT_LEVEL_MIN; i--)
+ call_funcs((initlist_t *)&__exitlist_start,
+ (initlist_t *)&__exitlist_end,
+ EXIT_MAGIC, i);
+}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/blob/blob/src/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Makefile.am 2001/09/27 21:36:37 1.6
+++ Makefile.am 2001/10/02 21:39:54 1.7
@@ -60,6 +60,7 @@
testmem2.S \
command.c \
flash.c \
+ init.c \
led.c \
linux.c \
main.c \
Index: rest-ld-script
===================================================================
RCS file: /cvsroot/blob/blob/src/rest-ld-script,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- rest-ld-script 2001/09/15 20:14:23 1.4
+++ rest-ld-script 2001/10/02 21:39:54 1.5
@@ -37,6 +37,20 @@
}
. = ALIGN(4);
+ .initlist : {
+ __initlist_start = .;
+ *(.initlist)
+ __initlist_end = .;
+ }
+
+ . = ALIGN(4);
+ .exitlist : {
+ __exitlist_start = .;
+ *(.exitlist)
+ __exitlist_end = .;
+ }
+
+ . = ALIGN(4);
.ptaglist : {
__ptagtable_begin = .;
*(.ptaglist)
|
|
From: Erik M. <er...@us...> - 2001-10-02 21:39:58
|
Update of /cvsroot/blob/blob/include
In directory usw-pr-cvs1:/tmp/cvs-serv3560/include
Modified Files:
init.h Makefile.am
Log Message:
The init and exit lists code.
Index: init.h
===================================================================
RCS file: /cvsroot/blob/blob/include/init.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- init.h 2001/10/02 21:31:17 1.1
+++ init.h 2001/10/02 21:39:54 1.2
@@ -0,0 +1,76 @@
+/*
+ * init.h: Support for init and exit lists
+ *
+ * Copyright (C) 2001 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
+ * 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$"
+
+#ifndef BLOB_INIT_H
+#define BLOB_INIT_H
+
+#include "types.h"
+
+#define INIT_MAGIC (0x496e6974) /* "Init" */
+#define EXIT_MAGIC (0x45786974) /* "Exit" */
+
+
+typedef void(*initfunc_t)(void);
+
+
+typedef struct {
+ u32 magic;
+ initfunc_t callback;
+ int level;
+} initlist_t;
+
+
+#define __init __attribute__((unused, __section__(".initlist")))
+
+#define __initlist(fn, lvl) \
+static initlist_t __init_##fn __init = { \
+ magic: INIT_MAGIC, \
+ callback: fn, \
+ level: lvl }
+
+
+#define __exit __attribute__((unused, __section__(".exitlist")))
+
+#define __exitlist(fn, lvl) \
+static initlist_t __exit_##fn __exit = { \
+ magic: EXIT_MAGIC, \
+ callback: fn, \
+ level: lvl }
+
+
+/* minimum and maximum levels */
+#define INIT_LEVEL_MIN (0)
+#define INIT_LEVEL_MAX (99)
+
+/* define some useful levels */
+#define INIT_LEVEL_INITIAL_HARDWARE (0)
+#define INIT_LEVEL_PARAM_LIST (10)
+#define INIT_LEVEL_OTHER_HARDWARE (20)
+#define INIT_LEVEL_OTHER_STUFF (30)
+
+
+void init_subsystems(void);
+void exit_subsystems(void);
+
+
+#endif
Index: Makefile.am
===================================================================
RCS file: /cvsroot/blob/blob/include/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile.am 2001/09/18 19:55:29 1.4
+++ Makefile.am 2001/10/02 21:39:54 1.5
@@ -14,6 +14,7 @@
noinst_HEADERS = \
command.h \
flash.h \
+ init.h \
led.h \
linux.h \
main.h \
|
|
From: Erik M. <er...@us...> - 2001-10-02 21:31:19
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv1010/src Added Files: init.c Log Message: commit empty files so the real diff comes through --- NEW FILE init.c --- |
|
From: Erik M. <er...@us...> - 2001-10-02 21:31:19
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv1010/include Added Files: init.h Log Message: commit empty files so the real diff comes through --- NEW FILE init.h --- |
|
From: Erik M. <er...@us...> - 2001-10-02 20:50:28
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv23410
Modified Files:
command.c
Log Message:
- Check for the magic value
- Remove "test" command
Index: command.c
===================================================================
RCS file: /cvsroot/blob/blob/src/command.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- command.c 2001/09/17 00:05:31 1.6
+++ command.c 2001/10/02 20:50:24 1.7
@@ -146,6 +146,15 @@
return 0;
for(cmd = commands; cmd != NULL; cmd = cmd->next) {
+ if(cmd->magic != COMMAND_MAGIC) {
+ SerialOutputString("*** Command magic failed for 0x");
+ SerialOutputHex((u32)cmd);
+ SerialOutputString("!\n");
+
+ /* FIXME: should return a proper return value */
+ return 0;
+ }
+
if(strcmp(cmd->name, cmdline) == 0) {
/* call function */
return cmd->callback(argc, argv);
@@ -154,36 +163,6 @@
return -1;
}
-
-
-
-
-static int test_command(int argc, char *argv[])
-{
- int i;
-
- SerialOutputString("*** test_command() got called!\n");
-
- SerialOutputString("*** argc = ");
- SerialOutputDec(argc);
- SerialOutputByte('\n');
-
- for(i = 0; i < argc; i++) {
- SerialOutputString("*** argv[");
- SerialOutputDec(i);
- SerialOutputString("] = '");
- SerialOutputString(argv[i]);
- SerialOutputString("'\n");
- }
-
- return 0;
-}
-
-
-static char testhelp[] = "test_command\n"
-"Test new command line functions\n";
-
-__commandlist(test_command, "test", testhelp);
|
|
From: Stefan E. <se...@us...> - 2001-10-01 12:43:54
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv30577 Modified Files: linux.h led.h main.h Log Message: - added PT System3 board support Index: linux.h =================================================================== RCS file: /cvsroot/blob/blob/include/linux.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- linux.h 2001/09/17 00:05:31 1.3 +++ linux.h 2001/10/01 12:43:49 1.4 @@ -46,6 +46,8 @@ # define ARCH_NUMBER (20) #elif defined SHANNON # define ARCH_NUMBER (97) +#elif defined PT_SYSTEM3 +# define ARCH_NUMBER (112) #else #warning "FIXME: Calling the kernel with a generic SA1100 architecture code. YMMV!" #define ARCH_NUMBER (18) Index: led.h =================================================================== RCS file: /cvsroot/blob/blob/include/led.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- led.h 2001/08/06 22:44:52 1.2 +++ led.h 2001/10/01 12:43:49 1.3 @@ -34,6 +34,8 @@ # define LED_GPIO 0x00800000 /* GPIO 23 */ #elif defined PLEB # define LED_GPIO 0x00010000 /* GPIO 16 */ +#elif defined PT_SYSTEM3 +# define LED_GPIO 0x00000400 /* GPIO 10 */ #else #warning "FIXME: Include code to turn on one of the LEDs on your board" # define LED_GPIO 0x00000000 /* safe mode: no GPIO, so no LED */ Index: main.h =================================================================== RCS file: /cvsroot/blob/blob/include/main.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- main.h 2001/08/31 06:26:59 1.4 +++ main.h 2001/10/01 12:43:49 1.5 @@ -41,11 +41,14 @@ /* where does blob live when we download it */ #if defined SHANNON -#define BLOB_RAM_BASE (0xc0100000) +# define BLOB_RAM_BASE (0xc0100000) +#elif defined PT_SYSTEM3 +# define BLOB_RAM_BASE (0xc0100000) #else -#define BLOB_RAM_BASE (0xc1000000) +# define BLOB_RAM_BASE (0xc0100000) #endif + #define BLOB_BLOCK_OFFSET (0x00000000) /* where does the paramater list live when we download it */ @@ -62,6 +65,8 @@ # define RAMDISK_RAM_BASE (0xC0800000) #elif defined SHANNON # define RAMDISK_RAM_BASE (0xC8000000) +#elif defined PT_SYSTEM3 +# define RAMDISK_RAM_BASE (0xC0800000) #else # define RAMDISK_RAM_BASE (0xC0400000) #endif @@ -70,6 +75,8 @@ # define RAMDISK_BLOCK_OFFSET (0x00800000) #elif defined SHANNON # define RAMDISK_BLOCK_OFFSET (0x00200000) +#elif defined PT_SYSTEM3 +# define RAMDISK_BLOCK_OFFSET (0x00800000) #else # define RAMDISK_BLOCK_OFFSET (0x00400000) #endif |
|
From: Stefan E. <se...@us...> - 2001-10-01 12:40:21
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv29418
Modified Files:
chkmem.c
Log Message:
- changed SHOWADR() and SHOWRUN() to real functions
Index: chkmem.c
===================================================================
RCS file: /cvsroot/blob/blob/src/chkmem.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- chkmem.c 2001/10/01 11:28:16 1.3
+++ chkmem.c 2001/10/01 12:40:18 1.4
@@ -67,16 +67,6 @@
#define CHKMEM_ERR (-1)
#define CHKMEM_OK (0)
-#define SHOWADR( ADR ) if ( ((u32)ADR) % showevery == 0 ) { \
- SerialOutputString("\r"); \
- SerialOutputHex(((u32)ADR)); \
- }
-
-#define SHOWRUN( RUN ) { SerialOutputString("\r\nrun "); \
- SerialOutputHex(((u32)RUN)); \
- SerialOutputString("\n"); \
- }
-
#if CHKMEM_DEBUG
# define SHOWFUNC() SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); \
SerialOutputString(" p1=0x"); \
@@ -122,6 +112,9 @@
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);
@@ -147,7 +140,7 @@
* Command entry, memory test method dispatcher
*
*/
-static int ChkMem( int argc, char *argv[] )
+int ChkMem( int argc, char *argv[] )
{
memtestfunc_t method;
int area;
@@ -190,7 +183,6 @@
}
}
- /* FIXME: should check if showevery is a sane value! */
SerialOutputString(argv[0]);
SerialOutputString(": display every 0x");
SerialOutputHex(showevery);
@@ -251,7 +243,7 @@
* Poke values to memory
*
*/
-static int Poke( int argc, char *argv[] )
+int Poke( int argc, char *argv[] )
{
u32 address;
u32 value;
@@ -296,7 +288,7 @@
* Poke values to memory
*
*/
-static int Peek( int argc, char *argv[] )
+int Peek( int argc, char *argv[] )
{
u32 address;
u32 value;
@@ -333,6 +325,44 @@
/*********************************************************************/
/*********************************************************************
+ * 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
@@ -419,7 +449,7 @@
/* bottom-up test */
p=start;
while ( p<end ) {
- SHOWADR( p );
+ showadr( (u32*)p );
tst = MEM( p );
if ( tst != pattern ) {
goto DONE;
@@ -439,7 +469,7 @@
/* top-down test */
p=end-4;
while ( p>=start ) {
- SHOWADR( p );
+ showadr( (u32*)p );
tst = MEM( p );
if ( tst != pattern ) {
goto DONE;
@@ -509,7 +539,7 @@
/* bottom-up test */
p=start;
while ( p<end ) {
- SHOWADR( p );
+ showadr( (u32*)p );
tst = MEM( p );
if ( tst != p ) {
goto DONE;
@@ -644,7 +674,7 @@
for (i = 0; i < count; i++)
{
- SHOWADR( p2 );
+ showadr( p2 );
MEM( p1++ ) |= q;
barrier();
MEM( p2++ ) |= q;
@@ -666,7 +696,7 @@
for (i = 0; i < count; i++)
{
- SHOWADR( p1 );
+ showadr( p1 );
MEM( p1++ ) &= q;
barrier();
MEM( p2++ ) &= q;
@@ -688,7 +718,7 @@
for (i = 0; i < count; i++)
{
- SHOWADR( p1 );
+ showadr( p1 );
MEM( p1++ ) = MEM( p2++ ) = (i + q);
barrier();
}
@@ -708,14 +738,14 @@
for (j = 0; j < 64; j++)
{
- SHOWRUN( 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 );
+ showadr( p1 );
MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q;
barrier();
}
@@ -741,13 +771,13 @@
for (j = 0; j < 64; j++)
{
- SHOWRUN( 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 );
+ showadr( p1 );
MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q;
barrier();
}
@@ -773,12 +803,12 @@
for (j = 0; j < 256; j++)
{
- SHOWRUN( j );
+ showrun( j );
p1 = (volatile u32 *) bp1;
p2 = (volatile u32 *) bp2;
for (i = 0; i < count; i++)
{
- SHOWADR( p1 );
+ showadr( p1 );
MEM( p1++ ) = MEM( p2++ ) = MAKE32FROM8 (j);
barrier();
}
@@ -804,14 +834,14 @@
for (j = 0; j < 64; j++)
{
- SHOWRUN( 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 );
+ showadr( p1 );
MEM( p1++ ) = MEM( p2++ ) = (m == 0) ? 0x00000001 << j :
0xFFFFFFFF ^ (0x00000001 << j);
barrier();
@@ -845,12 +875,12 @@
for (j = 0; j < 64; j++)
{
- SHOWRUN( j );
+ showrun( j );
p1 = (volatile u32 *) bp1;
p2 = (volatile u32 *) bp2;
for (i = 0; i < count; i++)
{
- SHOWADR( p1 );
+ showadr( p1 );
if (j < 32) /* Walk it up. */
{
MEM( p1++ ) = MEM( p2++ ) = (i % 2 == 0)
@@ -890,7 +920,7 @@
for (k = 0; k < 32; k++)
{
- SHOWRUN( k*8 );
+ showrun( k*8 );
q = 0x00000001 << k;
for (j = 0; j < 8; j++)
@@ -900,7 +930,7 @@
p2 = (volatile u32 *) bp2;
for (i = 0; i < count; i++)
{
- SHOWADR( p1 );
+ showadr( p1 );
MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q;
barrier();
}
@@ -929,18 +959,18 @@
count <<= 1;
for (j = 0; j < 16; j++)
{
- SHOWRUN( j );
+ showrun( j );
p1 = (volatile u32 *) bp1;
for (i = 0; i < count; i++)
{
- SHOWADR( p1 );
+ 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 );
+ showadr( p1 );
if (*p1 != (((j + i) % 2) == 0 ? (u32) p1 : ~((u32) p1)))
{
return (CHKMEM_ERR);
|
|
From: Erik M. <er...@us...> - 2001-09-28 00:18:01
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv16412
Modified Files:
util.c
Log Message:
Fix another silly bug. i should be an int, so the "<" test will actually work.
Index: util.c
===================================================================
RCS file: /cvsroot/blob/blob/src/util.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- util.c 2001/09/27 21:59:44 1.7
+++ util.c 2001/09/28 00:17:52 1.8
@@ -166,7 +166,7 @@
*/
int strtoval(const char *str, u32 *value)
{
- u32 i;
+ int i;
*value = 0;
@@ -178,7 +178,7 @@
if((i = xdigitvalue(*str)) < 0)
return -1;
- *value = (*value << 4) | i;
+ *value = (*value << 4) | (u32)i;
str++;
}
@@ -188,7 +188,7 @@
if((i = digitvalue(*str)) < 0)
return -1;
- *value = (*value * 10) + i;
+ *value = (*value * 10) + (u32)i;
str++;
}
|
|
From: Erik M. <er...@us...> - 2001-09-27 23:28:00
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv2889 Modified Files: configure.in Log Message: Using -Os instead of -O2 makes the resulting blob binary up to 5% smaller Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- configure.in 2001/09/27 21:38:17 1.10 +++ configure.in 2001/09/27 23:27:51 1.11 @@ -247,6 +247,9 @@ CFLAGS=`echo $CFLAGS | sed 's/\ *-g\ */\ /'` LDFLAGS=`echo $LDFLAGS | sed 's/\ *-g\ */\ /'` +dnl Change the "-O2" flag in "-Os" +CFLAGS=`echo $CFLAGS | sed 's/-O2/-Os/'` + dnl Add some StrongARM specific flags CFLAGS=`echo $CFLAGS -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -fno-builtin -mapcs-32 -nostdinc` LDFLAGS=`echo $LDFLAGS -static -nostdlib` |
|
From: Erik M. <er...@us...> - 2001-09-27 21:59:47
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv12192/src
Modified Files:
util.c
Log Message:
Doh! obvious bug, advance pointer
Index: util.c
===================================================================
RCS file: /cvsroot/blob/blob/src/util.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- util.c 2001/09/27 21:30:58 1.6
+++ util.c 2001/09/27 21:59:44 1.7
@@ -179,6 +179,8 @@
return -1;
*value = (*value << 4) | i;
+
+ str++;
}
} else {
/* decimal mode */
@@ -187,6 +189,8 @@
return -1;
*value = (*value * 10) + i;
+
+ str++;
}
}
|
|
From: Erik M. <er...@us...> - 2001-09-27 21:42:34
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv6709 Modified Files: ChangeLog AUTHORS Log Message: Changelog and credits Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ChangeLog 2001/08/30 08:46:07 1.6 +++ ChangeLog 2001/09/27 21:42:31 1.7 @@ -3,6 +3,13 @@ $Id$ +blob-2.0.5: +- PT system 3 port Stefan Eletzhofer +- Memory test functions Stefan Eletzhofer +- Enable UART1 if used as the console Stefan Eletzhofer +- Modular command line parser Erik Mouw +- Parameter block support Russ Dill + blob-2.0.4: - Fix RAMDISK_SIZE (should be in _kilo_ bytes instead of bytes) Erik Mouw Index: AUTHORS =================================================================== RCS file: /cvsroot/blob/blob/AUTHORS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AUTHORS 2001/08/06 22:44:51 1.2 +++ AUTHORS 2001/09/27 21:42:31 1.3 @@ -47,3 +47,13 @@ - Mark Huang <mh...@li...>, RTC fix - Justin M. Seger <jus...@in...>, Assabet fixes - Wookey <wo...@al...>, run-from-RAM + + +* PT system 3 port +================== +- Stefan Eletzhofer <ste...@ww...> + + +* Memory tester +=============== +- Stefan Eletzhofer <ste...@ww...> |
|
From: Erik M. <er...@us...> - 2001-09-27 21:39:45
|
Update of /cvsroot/blob/blob/utils/build In directory usw-pr-cvs1:/tmp/cvs-serv5570 Modified Files: build_Makefile build_all Log Message: - add system3 to the list of systems to test - add the --enable-clock-scaling and --enable-memtest flags Index: build_Makefile =================================================================== RCS file: /cvsroot/blob/blob/utils/build/build_Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build_Makefile 2001/08/29 21:08:51 1.2 +++ build_Makefile 2001/09/27 21:39:41 1.3 @@ -12,7 +12,7 @@ # published by the Free Software Foundation. # -archs = assabet brutus creditlart lart nesa pleb shannon +archs = assabet brutus creditlart lart nesa pleb system3 shannon debug-archs = $(foreach a, $(archs), $(a)-debug) all-archs = $(archs) $(debug-archs) Index: build_all =================================================================== RCS file: /cvsroot/blob/blob/utils/build/build_all,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build_all 2001/08/29 21:08:51 1.2 +++ build_all 2001/09/27 21:39:42 1.3 @@ -12,19 +12,21 @@ # published by the Free Software Foundation. # -archs="assabet brutus creditlart lart nesa pleb shannon" +archs="assabet brutus creditlart lart nesa pleb system3 shannon" linux_prefix=~/LART/build/linux/elinux blob_src=~/src/sourceforge/blob +extra_flags="--enable-clock-scaling --enable-memtest" + export CC=arm-linux-gcc for i in $archs ; do rm -rf "$i"* mkdir "$i" "$i"-debug cd $i - $blob_src/configure --enable-maintainer-mode --with-board=$i -with-linux-prefix=$linux_prefix arm-unknown-linux-gnu + $blob_src/configure --enable-maintainer-mode --with-board=$i -with-linux-prefix=$linux_prefix $extra_flags arm-unknown-linux-gnu cd ../"$i"-debug - $blob_src/configure --enable-maintainer-mode --with-board=$i -with-linux-prefix=$linux_prefix --enable-blob-debug arm-unknown-linux-gnu + $blob_src/configure --enable-maintainer-mode --with-board=$i -with-linux-prefix=$linux_prefix $extra_flags --enable-blob-debug arm-unknown-linux-gnu cd .. done |
|
From: Erik M. <er...@us...> - 2001-09-27 21:38:20
|
Update of /cvsroot/blob/blob
In directory usw-pr-cvs1:/tmp/cvs-serv5148
Modified Files:
acconfig.h configure.in
Log Message:
- add support for PT System 3 (jay! the 8th supported architecture!)
- add --enable-memtest configure option for the memory tester
Index: acconfig.h
===================================================================
RCS file: /cvsroot/blob/blob/acconfig.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- acconfig.h 2001/09/23 15:05:03 1.3
+++ acconfig.h 2001/09/27 21:38:17 1.4
@@ -71,6 +71,9 @@
/* Define for PLEB boards */
#undef PLEB
+/* Define for PT System 3 boards */
+#undef PT_SYSTEM3
+
/* Define for Shannon (TuxScreen) */
#undef SHANNON
Index: configure.in
===================================================================
RCS file: /cvsroot/blob/blob/configure.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- configure.in 2001/09/23 15:05:03 1.9
+++ configure.in 2001/09/27 21:38:17 1.10
@@ -110,6 +110,12 @@
AC_DEFINE(USE_SERIAL3)
use_cpu="sa1100"
;;
+ system3)
+ AC_MSG_RESULT(PTSystem3)
+ AC_DEFINE(PT_SYSTEM3)
+ AC_DEFINE(USE_SERIAL1)
+ use_cpu="sa1110"
+ ;;
*)
AC_MSG_RESULT(unknown)
AC_MSG_WARN([Unknown board name, assuming SA1100 with serial 3])
@@ -181,6 +187,21 @@
+dnl Check wether or not memtest code is wanted
+AC_ARG_ENABLE(memtest,
+[ --enable-memtest Enable support for memory tests ],
+[chkmem_flag=$enable_memtest],
+[chkmem_flag=no])
+
+if test "x$chkmem_flag" = "xyes" ; then
+ CHKMEM="chkmem.o"
+fi
+
+AC_SUBST(CHKMEM)
+
+
+
+
dnl Check for extra debug info
AC_ARG_ENABLE(blob-debug,
[ --enable-blob-debug Enable run-time debug information],
@@ -252,5 +273,6 @@
echo "Objcopy tool ${OBJCOPY}"
echo "Objcopy flags ${OCFLAGS}"
echo "Clock scaling support ${clock_scaling_flag}"
+echo "Memory test support ${chkmem_flag}"
echo "Run-time debug information ${blob_debug_flag}"
echo ""
|
|
From: Erik M. <er...@us...> - 2001-09-27 21:36:39
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv4904 Modified Files: Makefile.am Log Message: Makefile modifications for the memory checker Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.am 2001/09/23 15:01:18 1.5 +++ Makefile.am 2001/09/27 21:36:37 1.6 @@ -72,9 +72,11 @@ # conditionally compiled sources EXTRA_blob_rest_elf32_SOURCES = \ + chkmem.c \ clock.c blob_rest_elf32_DEPENDENCIES = \ + @CHKMEM@ \ @CLOCK@ blob_rest_elf32_LDFLAGS += \ @@ -82,6 +84,7 @@ blob_rest_elf32_LDADD += \ + @CHKMEM@ \ @CLOCK@ \ -lgcc |
|
From: Erik M. <er...@us...> - 2001-09-27 21:35:48
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv4652
Modified Files:
chkmem.c
Log Message:
Stefan's memory checker
Index: chkmem.c
===================================================================
RCS file: /cvsroot/blob/blob/src/chkmem.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- chkmem.c 2001/09/27 21:32:31 1.1
+++ chkmem.c 2001/09/27 21:35:45 1.2
@@ -0,0 +1,457 @@
+/*-------------------------------------------------------------------------
+ * Filename: chkmem.c
+ * Version: $Id$
+ * Copyright: Copyright (C) 2001, Stefan Eletzhofer
+ * Author: Stefan Eletzhofer <ste...@ww...>
+ * Description: memory test functions
+ * Created at: Mit Sep 26 19:20:24 CEST 2001
+ * Modified by:
+ * Modified at:
+ *-----------------------------------------------------------------------*/
+/*
+ * chkmem.c: Utility to test memory integrity
+ *
+ * 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$"
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "command.h"
+#include "types.h"
+#include "sa1100.h"
+#include "serial.h"
+#include "time.h"
+#include "util.h"
+
+#include "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))
+
+/* Optimization barrier */
+/* The "volatile" is due to gcc bugs */
+#define barrier() __asm__ __volatile__("": : :"memory")
+
+
+/*********************************************************************/
+/** MODULE GLOBALS *************************************************/
+/*********************************************************************/
+
+static u32 showevery;
+
+/*********************************************************************/
+/** TYPES *********************************************************/
+/*********************************************************************/
+
+typedef int (*memtestfunc_t)( u32, u32, u32, u32 *);
+
+/*********************************************************************/
+/** FORWARDS *******************************************************/
+/*********************************************************************/
+
+static int ChkMemErr( u32 start, u32 end, u32 badaddr );
+static int ChkMemMovInv( u32 start, u32 end, u32 pattern, u32 *badadr );
+static int ChkMemAdrTst( u32 start, u32 end, u32 pattern, u32 *badadr );
+
+/*********************************************************************/
+/** EXPORTED FUNCTIONS ***********************************************/
+/*********************************************************************/
+
+/*********************************************************************
+ * ChkMem
+ *
+ * AUTOR: Stefan Eletzhofer
+ * REVISED:
+ *
+ * Command entry, memory test method dispatcher
+ *
+ */
+static int ChkMem( int argc, char *argv[] )
+{
+ memtestfunc_t method;
+ int area;
+ u32 start;
+ u32 end;
+ u32 badaddr;
+
+ /* check args */
+ if ( argc < 2 ) {
+ SerialOutputString("*** not enough arguments\n");
+ return -1;
+ }
+
+ showevery = CHKMEM_SHOWEVERY;
+
+ if ( argc > 2 ) {
+ if(strtoval(argv[2], &showevery) < 0) {
+ SerialOutputString("*** not a value\n");
+ return -1;
+ }
+
+ showevery = 1<<showevery;
+ }
+
+ /* FIXME: should check if showevery is a sane value! */
+ 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':
+ //break;
+ default:
+ SerialOutputString("*** unknown method\n");
+ return -1;
+ break;
+ }
+
+ /* 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;
+
+ /* skip first mb */
+ if ( memory_map[area].start == 0xc0000000 ) {
+ start += 0x100000;
+ }
+
+ if(! method(start, end, 0x5555aaaa, &badaddr)) {
+ ChkMemErr( start, end, badaddr );
+ return -1;
+ }
+ }
+ }
+
+ return 0;
+}
+static char chkmemhelp[] = "chkmem [method] {verbosity:1..F}\nmethod=0: move-inverse test\n"
+"method=1: address test\n"
+"method=2: modulo-x test\n"
+"verbosity: display every 2^n address during test\n";
+__commandlist(ChkMem, "chkmem", chkmemhelp);
+
+
+/*********************************************************************
+ * Poke
+ *
+ * AUTOR: Stefan Eletzhofer
+ * REVISED:
+ *
+ * Poke values to memory
+ *
+ */
+static int Poke( int argc, char *argv[] )
+{
+ u32 address;
+ u32 value;
+
+ if ( argc < 3 ) {
+ SerialOutputString("*** not enough arguments\n");
+ return -1;
+ }
+
+ if(strtoval(argv[1], &address) < 0) {
+ SerialOutputString("*** not an address\n");
+ return -1;
+ }
+
+ if(strtoval(argv[2], &value) < 0) {
+ SerialOutputString("*** not a value\n");
+ return -1;
+ }
+
+
+#if CHKMEM_DEBUG
+ SerialOutputString("adr=0x");
+ SerialOutputHex(address);
+ SerialOutputString(" val=0x");
+ SerialOutputHex(value);
+ SerialOutputString("\n");
+#endif
+
+ MEM( address ) = value;
+
+ return 0;
+}
+static char pokehelp[] = "poke address value\n";
+__commandlist(Poke, "poke", pokehelp );
+
+/*********************************************************************
+ * Peek
+ *
+ * AUTOR: Stefan Eletzhofer
+ * REVISED:
+ *
+ * Poke values to memory
+ *
+ */
+static int Peek( int argc, char *argv[] )
+{
+ u32 address;
+ u32 value;
+
+ if ( argc < 2 ) {
+ SerialOutputString("*** not enough arguments\n");
+ return -1;
+ }
+
+ if(strtoval(argv[1], &address) < 0) {
+ SerialOutputString("*** not an address\n");
+ return -1;
+ }
+
+#if CHKMEM_DEBUG
+ SerialOutputString("adr=0x");
+ SerialOutputHex(address);
+ SerialOutputString("\n");
+#endif
+
+ value = MEM( address );
+
+ SerialOutputHex(value);
+ SerialOutputString("\n");
+
+ return 0;
+}
+static char peekhelp[] = "peek address\n";
+__commandlist(Peek, "peek", peekhelp );
+
+
+/*********************************************************************/
+/** STATIC FUNCTIONS ************************************************/
+/*********************************************************************/
+
+/*********************************************************************
+ * ChkMemErr
+ *
+ * AUTOR: Stefan Eletzhofer
+ * REVISED:
+ *
+ * Reports memory check errors
+ *
+ */
+static int ChkMemErr( u32 start, u32 end, u32 badaddr )
+{
+ SerialOutputString("*** memory error 0x");
+ SerialOutputHex(start);
+ SerialOutputString("-0x");
+ SerialOutputHex(end);
+ SerialOutputString(": addr: 0x");
+ SerialOutputHex(badaddr);
+ SerialOutputString("\n");
+
+ return 0;
+}
+
+/*********************************************************************
+ * 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("ChkMem: move-inverse method\n");
+
+#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 ) {
+ if ( p % showevery == 0 ) {
+ SerialOutputString("\r");
+ SerialOutputHex(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 ) {
+ if ( p % showevery == 0 ) {
+ SerialOutputString("\r");
+ SerialOutputHex(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("ChkMem: address test method\n");
+
+#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 ) {
+ if ( p % showevery == 0 ) {
+ SerialOutputString("\r");
+ SerialOutputHex(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;
+}
|
|
From: Erik M. <er...@us...> - 2001-09-27 21:32:34
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv3863 Added Files: chkmem.c Log Message: empty chkmem.c so it's easier to see the differences --- NEW FILE chkmem.c --- |
|
From: Erik M. <er...@us...> - 2001-09-27 21:31:02
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv3370/src
Modified Files:
util.c clock.c
Log Message:
remove GetHexValue() from clock.c and replace it with strtoval() in util.c
Index: util.c
===================================================================
RCS file: /cvsroot/blob/blob/src/util.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- util.c 2001/09/17 00:05:31 1.5
+++ util.c 2001/09/27 21:30:58 1.6
@@ -130,3 +130,65 @@
return dest;
}
+
+
+
+
+/* test for a digit. return value if digit or -1 otherwise */
+static int digitvalue(char isdigit)
+{
+ if (isdigit >= '0' && isdigit <= '9' )
+ return isdigit - '0';
+ else
+ return -1;
+}
+
+
+
+
+/* test for a hexidecimal digit. return value if digit or -1 otherwise */
+static int xdigitvalue(char isdigit)
+{
+ if (isdigit >= '0' && isdigit <= '9' )
+ return isdigit - '0';
+ if (isdigit >= 'a' && isdigit <= 'f')
+ return 10 + isdigit - 'a';
+ return -1;
+}
+
+
+
+
+/* convert a string to an u32 value. if the string starts with 0x, it
+ * is a hexidecimal string, otherwise we treat is as decimal. returns
+ * the converted value on success, or -1 on failure. no, we don't care
+ * about overflows if the string is too long.
+ */
+int strtoval(const char *str, u32 *value)
+{
+ u32 i;
+
+ *value = 0;
+
+ if(strncmp(str, "0x", 2) == 0) {
+ /* hexadecimal mode */
+ str += 2;
+
+ while(*str != '\0') {
+ if((i = xdigitvalue(*str)) < 0)
+ return -1;
+
+ *value = (*value << 4) | i;
+ }
+ } else {
+ /* decimal mode */
+ while(*str != '\0') {
+ if((i = digitvalue(*str)) < 0)
+ return -1;
+
+ *value = (*value * 10) + i;
+ }
+ }
+
+ return 0;
+}
Index: clock.c
===================================================================
RCS file: /cvsroot/blob/blob/src/clock.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- clock.c 2001/09/23 14:57:00 1.5
+++ clock.c 2001/09/27 21:30:58 1.6
@@ -53,37 +53,6 @@
};
-static int MyXDigitValue(char isdigit)
-{
- if (isdigit >= '0' && isdigit <= '9' )
- return isdigit - '0';
- if (isdigit >= 'a' && isdigit <= 'f')
- return 10 + isdigit - 'a';
- return -1;
-} /* MyXDigitValue */
-
-
-/* Converts hex string into value. no, we don't care if the string is
- too long */
-static int GetHexValue(char *str, u32 *value)
-{
- int i;
-
- /* skip any leading 0x */
- if(strncmp(str, "0x", 2) == 0)
- str += 2;
-
- *value=0x00;
-
- while(*str != '\0') {
- if((i = MyXDigitValue(*str)) < 0)
- return -1;
-
- *value = (*value << 4) | i;
- }
-
- return 0;
-} /* GetHexValue */
int SetClock(int argc, char *argv[])
@@ -99,8 +68,8 @@
}
for(i = 0; i < 5; i++) {
- if(GetHexValue(argv[i + 1], ®s[i]) < 0) {
- SerialOutputString("*** not a hexidecimal number: ");
+ if(strtoval(argv[i + 1], ®s[i]) < 0) {
+ SerialOutputString("*** not a number: ");
SerialOutputString(argv[i + 1]);
SerialOutputByte('\n');
return 0;
|
|
From: Erik M. <er...@us...> - 2001-09-27 21:31:02
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv3370/include Modified Files: util.h Log Message: remove GetHexValue() from clock.c and replace it with strtoval() in util.c Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/util.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- util.h 2001/09/16 15:44:00 1.3 +++ util.h 2001/09/27 21:30:58 1.4 @@ -53,4 +53,7 @@ int strlen(const char *s); char *strcpy(char *dest, const char *src); +/* convert a string to an u32 value */ +int strtoval(const char *str, u32 *value); + #endif |
|
From: Erik M. <er...@us...> - 2001-09-26 13:43:49
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv13370
Modified Files:
serial.c
Log Message:
Doh! If we want to use serial port number 1, we have to enable it. Good spot
from Stefan Eletzhofer.
Index: serial.c
===================================================================
RCS file: /cvsroot/blob/blob/src/serial.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- serial.c 2001/09/15 20:07:24 1.3
+++ serial.c 2001/09/26 13:43:46 1.4
@@ -59,6 +59,9 @@
*/
#if defined USE_SERIAL1
+ /* select UART use for serial port 1 */
+ Ser1SDCR0 = SDCR0_UART;
+
while(Ser1UTSR1 & UTSR1_TBY) {
}
|
|
From: Erik M. <er...@us...> - 2001-09-24 17:50:46
|
Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv24187
Modified Files:
main.c
Log Message:
src and dst were swapped in do_reload().
Good spot from "prpplague".
Index: main.c
===================================================================
RCS file: /cvsroot/blob/blob/src/main.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- main.c 2001/09/18 20:23:24 1.13
+++ main.c 2001/09/24 17:50:41 1.14
@@ -578,36 +578,36 @@
static int do_reload(char *what)
{
- u32 *src = 0;
u32 *dst = 0;
+ u32 *src = 0;
int numWords;
if(strcmp(what, "blob") == 0) {
- src = (u32 *)BLOB_RAM_BASE;
- dst = (u32 *)BLOB_START;
+ dst = (u32 *)BLOB_RAM_BASE;
+ src = (u32 *)BLOB_START;
numWords = BLOB_LEN / 4;
blob_status.blobSize = 0;
blob_status.blobType = fromFlash;
SerialOutputString("Loading blob from flash ");
#ifdef PARAM_START
} else if(strcmp(what, "param") == 0) {
- src = (u32 *)PARAM_RAM_BASE;
- dst = (u32 *)PARAM_START;
+ dst = (u32 *)PARAM_RAM_BASE;
+ src = (u32 *)PARAM_START;
numWords = PARAM_LEN / 4;
blob_status.paramSize = 0;
blob_status.paramType = fromFlash;
SerialOutputString("Loading paramater block from flash ");
#endif
} else if(strcmp(what, "kernel") == 0) {
- src = (u32 *)KERNEL_RAM_BASE;
- dst = (u32 *)KERNEL_START;
+ dst = (u32 *)KERNEL_RAM_BASE;
+ src = (u32 *)KERNEL_START;
numWords = KERNEL_LEN / 4;
blob_status.kernelSize = 0;
blob_status.kernelType = fromFlash;
SerialOutputString("Loading kernel from flash ");
} else if(strcmp(what, "ramdisk") == 0) {
- src = (u32 *)RAMDISK_RAM_BASE;
- dst = (u32 *)INITRD_START;
+ dst = (u32 *)RAMDISK_RAM_BASE;
+ src = (u32 *)INITRD_START;
numWords = INITRD_LEN / 4;
blob_status.ramdiskSize = 0;
blob_status.ramdiskType = fromFlash;
@@ -619,7 +619,7 @@
return 0;
}
- MyMemCpy(src, dst, numWords);
+ MyMemCpy(dst, src, numWords);
SerialOutputString(" done\n");
return 0;
|
|
From: Erik M. <er...@us...> - 2001-09-23 15:05:06
|
Update of /cvsroot/blob/blob
In directory usw-pr-cvs1:/tmp/cvs-serv15061
Modified Files:
acconfig.h configure.in
Log Message:
- add sanity checks for --with-linux-prefix flag to get the number of
questions on the mailing list down
- remove dead compiler warning check code
- remove USE_EDORAM and USE_SDRAM definitions
- make clock scaling support optional with the --enable-clock-scaling
flag
- select proper memory setup object file for SA1100 or SA1110 CPU
Index: acconfig.h
===================================================================
RCS file: /cvsroot/blob/blob/acconfig.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- acconfig.h 2001/08/06 22:44:51 1.2
+++ acconfig.h 2001/09/23 15:05:03 1.3
@@ -80,12 +80,6 @@
/* Define if your system uses an SA-1110 CPU */
#undef USE_SA1110
-/* Define if your system uses SDRAM */
-#undef USE_SDRAM
-
-/* Define if your system uses EDO DRAM */
-#undef USE_EDODRAM
-
/* Define if your sytem uses serial port 1 */
#undef USE_SERIAL1
Index: configure.in
===================================================================
RCS file: /cvsroot/blob/blob/configure.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- configure.in 2001/09/18 19:55:29 1.8
+++ configure.in 2001/09/23 15:05:03 1.9
@@ -71,77 +71,116 @@
assabet)
AC_MSG_RESULT(Assabet)
AC_DEFINE(ASSABET)
- AC_DEFINE(USE_SA1110)
- AC_DEFINE(USE_SDRAM)
AC_DEFINE(USE_SERIAL1)
+ use_cpu="sa1110"
;;
brutus)
AC_MSG_RESULT(Brutus)
AC_DEFINE(BRUTUS)
- AC_DEFINE(USE_SA1100)
- AC_DEFINE(USE_EDODRAM)
AC_DEFINE(USE_SERIAL3)
- CLOCK="clock.o"
+ use_cpu="sa1100"
;;
creditlart)
AC_MSG_RESULT(CreditLART)
AC_DEFINE(CLART)
- AC_DEFINE(USE_SA1110)
- AC_DEFINE(USE_SDRAM)
AC_DEFINE(USE_SERIAL3)
+ use_cpu="sa1110"
;;
lart)
AC_MSG_RESULT(LART)
AC_DEFINE(LART)
- AC_DEFINE(USE_SA1100)
- AC_DEFINE(USE_EDODRAM)
AC_DEFINE(USE_SERIAL3)
- CLOCK="clock.o"
+ use_cpu="sa1100"
;;
nesa)
AC_MSG_RESULT(NESA)
AC_DEFINE(NESA)
- AC_DEFINE(USE_SA1100)
- AC_DEFINE(USE_EDODRAM)
AC_DEFINE(USE_SERIAL3)
- CLOCK="clock.o"
+ use_cpu="sa1100"
;;
pleb)
AC_MSG_RESULT(PLEB)
AC_DEFINE(PLEB)
- AC_DEFINE(USE_SA1100)
- AC_DEFINE(USE_EDODRAM)
AC_DEFINE(USE_SERIAL3)
- CLOCK="clock.o"
+ use_cpu="sa1100"
;;
shannon)
AC_MSG_RESULT(SHANNON)
AC_DEFINE(SHANNON)
- AC_DEFINE(USE_SA1100)
- AC_DEFINE(USE_EDODRAM)
AC_DEFINE(USE_SERIAL3)
- CLOCK="clock.o"
+ use_cpu="sa1100"
;;
*)
AC_MSG_RESULT(unknown)
- AC_MSG_WARN([Unknown board name, assuming SA1100 with EDO DRAM and serial 3])
- AC_DEFINE(USE_SA1100)
- AC_DEFINE(USE_EDODRAM)
+ AC_MSG_WARN([Unknown board name, assuming SA1100 with serial 3])
AC_DEFINE(USE_SERIAL3)
- CLOCK="clock.o"
+ use_cpu="sa1100"
;;
esac
-AC_SUBST(CLOCK)
+if test "x$use_cpu" = "xsa1100" ; then
+ dnl SA1100 CPU: EDORAM memory setup code
+ MEMSETUP="memsetup-sa1100.o"
+elif test "x$use_cpu" = "xsa1110" ; then
+ dnl SA1110 CPU: SDRAM memory setup code
+ MEMSETUP="memsetup-sa1110.o"
+else
+ AC_MSG_WARN([No CPU defined!]);
+ MEMSETUP=""
+fi
+
+AC_SUBST(MEMSETUP)
+
+
+
+
dnl Find out where the Linux headers are
-AC_ARG_WITH(linux-prefix,[ --with-linux-prefix=PFX Prefix where the ArmLinux sources live],
+AC_ARG_WITH(linux-prefix,[ --with-linux-prefix=PFX Prefix where the ARM Linux sources live],
linux_prefix="$withval",
linux_prefix="/usr/src/linux")
+
+dnl Do some sanity checks
+AC_MSG_CHECKING([if the Linux source tree in $linux_prefix is sane])
+if test ! -d "$linux_prefix/include" ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([$linux_prefix doesn't look like a configured Linux source tree.])
+ AC_MSG_ERROR([Please supply a proper prefix with the --with-linux-prefix flag])
+ exit -1
+fi
+if test ! -f "$linux_prefix/include/asm/setup.h" ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([The Linux source tree in $linux_prefix is not configured.])
+ AC_MSG_ERROR([Please run "make lart_config ; yes no | make old_config" in the])
+ AC_MSG_ERROR([Linux source tree and retry.])
+ exit -1
+fi
+AC_MSG_RESULT([yes])
CFLAGS=`echo $CFLAGS -I${linux_prefix}/include`
+dnl Check wether or not clock scaling code is wanted
+AC_ARG_ENABLE(clock-scaling,
+[ --enable-clock-scaling Enable support for clock scaling (SA1100 only)],
+[clock_scaling_flag=$enable_clock_scaling],
+[clock_scaling_flag=no])
+
+if test "x$clock_scaling_flag" = "xyes" ; then
+ if test "x$use_cpu" = "xsa1100"; then
+ CLOCK="clock.o"
+ else
+ AC_MSG_WARN([No clock scaling support for SA1110 CPUs, disabling])
+ clock_scaling_flag=no
+ CLOCK=""
+ fi
+fi
+
+AC_SUBST(CLOCK)
+
+
+
+
dnl Check for extra debug info
AC_ARG_ENABLE(blob-debug,
[ --enable-blob-debug Enable run-time debug information],
@@ -172,32 +211,6 @@
if test "x$ac_cv_prog_gcc" = "xyes" ; then
dnl gcc is the easiest C compiler
warning_CFLAGS="-Wall"
-else
- dnl Vendor supplied C compilers are a bit tricky
- case "$host_os" in
- dnl SGI IRIX with the MipsPRO C compiler
- irix*)
- AC_LANG_C
- CFLAGS="$CFLAGS -fullwarn"
- AC_TRY_COMPILE([#include <stdio.h>],[printf("test");],
- warning_CFLAGS="-fullwarn",)
- ;;
-
- dnl SunOS 4.x with the SparcWorks(?) acc compiler
- sunos*)
- if "$CC" = "acc" ; then
- AC_LANG_C
- CFLAGS="$CFLAGS -vc"
- AC_TRY_COMPILE([#include <stdio.h>],[printf("test");],
- warning_CFLAGS="-vc",)
- fi
- ;;
-
- dnl Unknown, do nothing
- *)
- warning_CFLAGS="none"
- ;;
- esac
fi
AC_LANG_RESTORE
CFLAGS="$ac_save_CFLAGS"
@@ -238,5 +251,6 @@
echo "Linker flags ${LDFLAGS}"
echo "Objcopy tool ${OBJCOPY}"
echo "Objcopy flags ${OCFLAGS}"
+echo "Clock scaling support ${clock_scaling_flag}"
echo "Run-time debug information ${blob_debug_flag}"
echo ""
|