This addition in monospaced text cause my FOM 2.711 (with CGI 2.77) generate lots of errors.
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys3/sys/os/main_c1700.c@@/main/del_t_pi2/1 /view/henniger-dor5/vob/ios.sys3/sys/os/main_c1700.c
Index: sys/os/main_c1700.c
===========================================================================
*** /view/henniger-dor5/vob/ios.sys3/sys/os/main_c1700.c@@/main/del_t_pi2/1 Tue Jan 11 16:29:32 2000
--- /view/henniger-dor5/vob/ios.sys3/sys/os/main_c1700.c Tue Aug 1 19:21:31 2000
***************
*** 76,82 ****
--- 76,90 ----
* will be set up (Gershwin *must* add something to this switch if they
* want to support Modules).
*/
+ #ifdef AMC_CODE_TEST
+ /*
+ * code test needs memory space for contr/data port (8 bytes).
+ * we can use CS5 since there's no VPN module during these tests.
+ */
+ if (1) {
+ #else
if (C1700_CHECK_MODULE_PRESENCE) {
+ #endif
switch (C1700_PLATFORM_DERIVATIVE) {
case C1700_PLATFORM_DERIVATIVE_1720:
REGB->memc_or4 = INIT_PQUICC_MODULE_OR;
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys3/sys/os/sched.c@@/main/del_t/2 /view/henniger-dor5/vob/ios.sys3/sys/os/sched.c
Index: sys/os/sched.c
===========================================================================
*** /view/henniger-dor5/vob/ios.sys3/sys/os/sched.c@@/main/del_t/2 Sun Jan 23 19:41:11 2000
--- /view/henniger-dor5/vob/ios.sys3/sys/os/sched.c Tue Aug 1 15:45:00 2000
***************
*** 274,279 ****
--- 274,282 ----
#include "../vm/vm.h" /* for vm_bzero() decl */
#include "../h/sched.h"
+ #ifdef AMC_CODE_TEST
+ #include "../src-m860-c1700/code_test_dor5.h"
+ #endif
#define PROC_HISTORY_LIMIT 100
***************
*** 1832,1837 ****
--- 1835,1843 ----
sp->priority = priority;
sp->reent_block = _reent_init();
+ #ifdef AMC_CODE_TEST
+ CodeTEST_create_hook(sp);
+ #endif
/*
* Slam the process on the idle queue and then move it to the
* appropriate run queue. This streamlines the routines that move
***************
*** 2009,2014 ****
--- 2015,2023 ----
(*kernel_buginf)("\nSCHED: Killing process %s from process %s",
proc->name, forkx->name);
#endif
+ #ifdef AMC_CODE_TEST
+ CodeTEST_delete_hook(proc);
+ #endif
if (proc == forkx) {
process_last_gasp(); /* never returns */
} else {
***************
*** 2494,2500 ****
--- 2503,2516 ----
process_history[process_history_index] = proc->name;
process_timer = process_max_time; /* Reset allowed tick count for process */
process_quantum_expired = FALSE;
+
+ #ifdef AMC_CODE_TEST
+ CodeTEST_enter_hook(proc);
resume(); /* run the user */
+ CodeTEST_exit_hook(proc);
+ #else
+ resume(); /* run the user */
+ #endif
process_hogcheck(); /* Check for hogs */
#ifdef TRAP_PAGE_ZERO
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makefile@@/main/conn_t/amaretto/dorsey/2 /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makefile
Index: sys/obj-m860-c1700/makefile
===========================================================================
*** /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makefile@@/main/conn_t/amaretto/dorsey/2 Mon Jun 19 18:05:31 2000
--- /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makefile Tue Aug 1 17:44:23 2000
***************
*** 46,54 ****
# use this line to enable HW_SIMULATE:
#PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG) -DHW_SIMULATE
# instead of this one:
! PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG)
# use the following line instead of the previous one to enable loopback
#PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG) -DFORCE_LOOPBACK
PLATFORM_IMAGE_GROUP = C1700
PLATFORM_IMAGE_PREFIX = C1700
HWFLAGS = les
--- 46,57 ----
# use this line to enable HW_SIMULATE:
#PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG) -DHW_SIMULATE
# instead of this one:
! # PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG)
# use the following line instead of the previous one to enable loopback
#PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG) -DFORCE_LOOPBACK
+ # use the following line for Enabling Code Test
+ PLATFORM_FLAGS = -D$(PLATFORM) $(ROMMON_FLAG) -DAMC_CODE_TEST
+ AMC_CODE_TEST = 1
PLATFORM_IMAGE_GROUP = C1700
PLATFORM_IMAGE_PREFIX = C1700
HWFLAGS = les
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makesubsys.c1700@@/main/conn_t/amaretto/dorsey/2 /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makesubsys.c1700
Index: sys/obj-m860-c1700/makesubsys.c1700
===========================================================================
*** /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makesubsys.c1700@@/main/conn_t/amaretto/dorsey/2 Mon Jun 19 18:05:35 2000
--- /view/henniger-dor5/vob/ios.sys5/sys/obj-m860-c1700/makesubsys.c1700 Tue Aug 1 12:10:14 2000
***************
*** 145,150 ****
--- 145,151 ----
if_controller_chain.o c1700_sys_regs.o \
ipm_crash_dump.o monvar.o \
idprom_compat.o wan_setup.o \
+ code_test_dor5.o \
plugin_pa.o slot_pa_registry.o
===========================================================================
COMMAND: cleartool diff -serial /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700@@/main/conn_t/amaretto/2 /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700
Index: sys/src-m860-c1700
===========================================================================
********************************
<<< directory 1: /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700@@/main/conn_t/amaretto/2
>>> directory 2: /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700
********************************
-----[ added ]-----
> code_test_dor5.c 01-Aug.12:13 henniger
-----[ added ]-----
> code_test_dor5.h 01-Aug.12:14 henniger
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/c1700_pci.c@@/main/del_t_pi2/1 /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/c1700_pci.c
Index: sys/src-m860-c1700/c1700_pci.c
===========================================================================
*** /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/c1700_pci.c@@/main/del_t_pi2/1 Tue Jan 11 16:28:52 2000
--- /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/c1700_pci.c Tue Aug 1 12:26:31 2000
***************
*** 27,32 ****
--- 27,36 ----
#include "../src-m860/m860_interrupt.h" /* m860_mask_irq, m860_unmask_irq */
#include "../hes/dgbus.h" /* dgbus_eeprom_t */
#include "../src-m860-les/ipm_sys_regs.h" /* GET_ELMER_NETWORK_ISR,MAINB... */
+ #ifdef AMC_CODE_TEST
+ #include "../os/sched_private.h"
+ #include "../src-m860-c1700/code_test_dor5.h"
+ #endif
typedef int (pa_interrupt_handler_t)(int bay, pa_jumptable_t *jp, void *paBaseAddr, ushort pmIntStatus);
***************
*** 252,257 ****
--- 256,265 ----
* void
*
*/
+ #ifdef AMC_CODE_TEST
+ static sprocess dummy_process;
+ #endif
+
void pas_netio_dispatcher(void)
{
ushort int_stat ;
***************
*** 259,265 ****
/*
* Get the interrupt status
*/
!
int_stat = ipm_get_intstatus();
mainboard_dispatch_non_wic_int(int_stat);
--- 267,277 ----
/*
* Get the interrupt status
*/
! #ifdef AMC_CODE_TEST
! dummy_process.pid = AMC_TASKID_NETIO;
! dummy_process.name= "pas_netio_dispatcher";
! CodeTEST_enter_hook(&dummy_process);
! #endif
int_stat = ipm_get_intstatus();
mainboard_dispatch_non_wic_int(int_stat);
***************
*** 270,275 ****
--- 282,290 ----
*/
mainboard_handle_wic_intr(int_stat & MAINBOARD_ALL_WICS);
}
+ #ifdef AMC_CODE_TEST
+ CodeTEST_exit_hook(&dummy_process);
+ #endif
}
***************
*** 298,303 ****
--- 313,324 ----
unsigned int mask ;
unsigned int pending ;
+ #ifdef AMC_CODE_TEST
+ dummy_process.pid = AMC_TASKID_CPM;
+ dummy_process.name= "pas_cpm_dispatcher";
+ CodeTEST_enter_hook(&dummy_process);
+ #endif
+
/* Now begin scanning the CIPR for events */
pending = REGB->cpic_cipr & REGB->cpic_cimr ;
***************
*** 332,337 ****
--- 353,361 ----
}
}
}
+ #ifdef AMC_CODE_TEST
+ CodeTEST_exit_hook(&dummy_process);
+ #endif
}
/*
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.c@@/main/0 /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.c
Index: sys/src-m860-c1700/code_test_dor5.c
===========================================================================
*** /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.c@@/main/0 Tue Aug 1 12:14:01 2000
--- /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.c Tue Aug 1 12:15:46 2000
***************
*** 0 ****
--- 1,198 ----
+ /* $Id: 1453,v 1.5 2001/11/14 18:04:09 apache Exp apache $
+ * $Source: /var/www/faqomatic-meta//RCS/1453,v $
+ *------------------------------------------------------------------
+ * code_test.c - Provides CodeTEST RTOS instrumentation
+ *
+ * Nov 2000, amaretto-sw
+ *
+ * Copyright (c) 2000 by cisco Systems, Inc.
+ * All rights reserved.
+ * Copyright (c) 1995-1996 Applied Microsystems Corporation
+ * All Rights Reserved
+ *------------------------------------------------------------------
+ * $xLog: 1453,v $
+ * Revision 1.5 2001/11/14 18:04:09 apache
+ * null
+ *
+ * Revision 1.4 2001/08/16 06:24:38 nobody
+ * null
+ *
+ * Revision 1.4 2001/08/16 02:05:43 cms
+ * null
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+ #ifdef AMC_CODE_TEST
+ /*
+ *
+ * These routines are provided by AMC and are to be called from the
+ * appropriate VxWorks hook.
+ *
+ * These routines write the task name, the task ID, and a CodeTEST
+ * control tag to the CodeTEST tag ports.
+ *
+ * You must include the header file amc_rtos.h from the
+ * $AMC_HOME/lib/rtos directory on unix and the
+ * %AMC_HOME%/lib/rtos directory on the pc directory. This
+ * header file defines the tag format, and declares the variables
+ * `amc_ctrl_port' and `amc_data_port'. You must tell the compiler
+ * how to find this header file.
+ *
+ * If the tasknames in the CodeTEST displays are scrambled then try
+ * setting macro AMC_LITTLE_ENDIAN when you compile this file.
+ *
+ * These routines emit up to 32 characters for task names. If it can
+ * be assured that all task names in the target system are unique in
+ * some amount less than 32 characters then these routines can be
+ * made less intrusive by changing UNIQUE_CHARS to this smaller
+ * value. Emitting more than 32 characters will GUARANTEE incorrect
+ * operation of the CodeTEST application.
+ *
+ */
+
+ #include "master.h"
+ #include string.h
+ #include reent.h
+ #include ciscolib.h
+ #include "../dev/monitor1.h"
+
+ #include "subsys.h"
+ #include "config_register.h"
+ #include "../../boot/buff.h"
+ #include "../os/sched_private.h"
+ typedef unsigned long amctag_t;
+ extern volatile amctag_t amc_ctrl_port;
+ extern volatile amctag_t amc_data_port;
+ #include "code_test_dor5.h"
+
+ #define UNIQUE_CHARS 32
+
+ #ifndef NOTNOW
+ static unsigned long
+ CodeTEST_put_name( sprocess *proc)
+ {
+ /* write PID in place of name for now. */
+ __amc_data_tag__( proc->pid);
+ return 0;
+ }
+
+ #else
+ static unsigned long
+ CodeTEST_put_name( sprocess *proc)
+ {
+
+ char *p;
+ p = proc->name;
+ int count;
+
+ /* i = 0 changed 5/19/99 njh */
+ int i = 1;
+ union
+ {
+ unsigned char c[4];
+ unsigned long l;
+ } buffer;
+ while ( *p && ( i <= UNIQUE_CHARS )) p++, i++;
+
+ /* Clear the tag buffer */
+ buffer.l=0;
+
+ /* Write out the rest of the string */
+ switch (i%4)
+ {
+ #ifdef AMC_LITTLE_ENDIAN
+ case 3:
+ buffer.c[1] = *p--;
+ i--;
+ /* fall through */
+ case 2:
+ buffer.c[2] = *p--;
+ i--;
+ /* fall through */
+ case 1:
+ buffer.c[3] = *p--;
+ i--;
+ /* fall through */
+ #else
+ case 3:
+ buffer.c[2] = *p--;
+ i--;
+ /* fall through */
+ case 2:
+ buffer.c[1] = *p--;
+ i--;
+ /* fall through */
+ case 1:
+ buffer.c[0] = *p--;
+ i--;
+ /* fall through */
+ #endif
+ }
+ /* amc_data_port = buffer.l; changed 5/19/99 kjb */
+ __amc_data_tag__( buffer.l );
+ count = 0;
+
+ /* Write out the the four byte blocks */
+
+ while (i)
+ {
+ #ifdef AMC_LITTLE_ENDIAN
+ buffer.c[0] = *p--;
+ buffer.c[1] = *p--;
+ buffer.c[2] = *p--;
+ buffer.c[3] = *p--;
+ #else
+ buffer.c[3] = *p--;
+ buffer.c[2] = *p--;
+ buffer.c[1] = *p--;
+ buffer.c[0] = *p--;
+ #endif
+ /* amc_data_port = buffer.l; changed 5/19/99 kjb */
+ __amc_data_tag__( buffer.l );
+ count++;
+ i-=4;
+ }
+ return count;
+ }
+ #endif
+
+ void
+ CodeTEST_create_hook( sprocess *new_task )
+ {
+ unsigned long count;
+
+ count = CodeTEST_put_name( new_task );
+ __amc_data_tag__( (unsigned long) new_task->pid );
+ __amc_ctrl_tag__( 0x2a120000 | count );
+
+ return;
+ }
+
+ void
+ CodeTEST_delete_hook( sprocess *deleted_task )
+ {
+ unsigned long count;
+
+ count = CodeTEST_put_name( deleted_task );
+ __amc_data_tag__( (unsigned long) deleted_task->pid );
+ __amc_ctrl_tag__( 0x2a320000 | count );
+
+ return;
+ }
+
+ void
+ CodeTEST_enter_hook( sprocess *new_task )
+ {
+ unsigned long count;
+
+ count = CodeTEST_put_name( new_task );
+ __amc_data_tag__( (unsigned long) new_task->pid );
+ __amc_ctrl_tag__( 0x2a220000 | count );
+
+ return;
+ }
+
+ void
+ CodeTEST_exit_hook( sprocess *old_task )
+ {
+ unsigned long count;
+
+ count = CodeTEST_put_name( old_task);
+ __amc_data_tag__( (unsigned long) old_task->pid );
+ __amc_ctrl_tag__( 0x2a420000 | count );
+
+ return;
+ }
+ #endif
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.h@@/main/0 /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.h
Index: sys/src-m860-c1700/code_test_dor5.h
===========================================================================
*** /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.h@@/main/0 Tue Aug 1 12:14:26 2000
--- /view/henniger-dor5/vob/ios.sys5/sys/src-m860-c1700/code_test_dor5.h Tue Aug 1 12:15:10 2000
***************
*** 0 ****
--- 1,43 ----
+ /* $Id: 1453,v 1.5 2001/11/14 18:04:09 apache Exp apache $
+ * $Source: /var/www/faqomatic-meta//RCS/1453,v $
+ *------------------------------------------------------------------
+ * code_test.h - Defines for CodeTEST RTOS instrumentation
+ *
+ * Nov 2000, amaretto-sw
+ *
+ * Copyright (c) 2000 by cisco Systems, Inc.
+ * All rights reserved.
+ * Copyright (c) 1995-1996 Applied Microsystems Corporation
+ * All Rights Reserved
+ *------------------------------------------------------------------
+ * $xLog: 1453,v $
+ * Revision 1.5 2001/11/14 18:04:09 apache
+ * null
+ *
+ * Revision 1.4 2001/08/16 06:24:38 nobody
+ * null
+ *
+ * Revision 1.4 2001/08/16 02:05:43 cms
+ * null
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+
+ #ifndef __CODE_TEST_H__
+ #define __CODE_TEST_H__
+ #define AMC_TASKID_NETIO (0x100001)
+ #define AMC_TASKID_CPM (0x100002)
+ #define AMC_TASKID_CONS (0x100003)
+
+
+ void CodeTEST_create_hook( sprocess *new_task );
+ void CodeTEST_delete_hook( sprocess *deleted_task );
+ void CodeTEST_enter_hook( sprocess *new_task );
+ void CodeTEST_exit_hook( sprocess *old_task );
+ /*********************************************************\
+ *
+ * The following macros define the tag format. They are
+ * set to use the standard assignment statement. If you
+ * use a different tag format you will need to change the
+ * following macros.
+ *
+ \*********************************************************/
+
+ #define __amc_ctrl_tag__(tag) (amc_ctrl_port = (tag))
+ #define __amc_data_tag__(tag) (amc_data_port = (tag))
+
+ #define H_ERROR_UNKNOWN 0x80
+ #endif
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios.sys5/sys/src-m860-les/platform_ipm.c@@/main/del_t_pi2/1 /view/henniger-dor5/vob/ios.sys5/sys/src-m860-les/platform_ipm.c
Index: sys/src-m860-les/platform_ipm.c
===========================================================================
*** /view/henniger-dor5/vob/ios.sys5/sys/src-m860-les/platform_ipm.c@@/main/del_t_pi2/1 Tue Jan 11 16:30:16 2000
--- /view/henniger-dor5/vob/ios.sys5/sys/src-m860-les/platform_ipm.c Tue Aug 1 12:26:24 2000
***************
*** 65,70 ****
--- 65,74 ----
#include "../snmp/platform_snmp_registry.h"
#include "../les/tty_16552.h"
+ #ifdef AMC_CODE_TEST
+ #include "../os/sched_private.h"
+ #include "../src-m860-c1700/code_test_dor5.h"
+ #endif
pquicc_timer_t pquicc_general_timer ;
***************
*** 452,457 ****
--- 456,464 ----
}
+ #ifdef AMC_CODE_TEST
+ static sprocess dummy_process;
+ #endif
/*
*
* platform_install_netio_interrupt
***************
*** 492,497 ****
--- 499,512 ----
PQUICC_CICR_SCbP(PQUICC_PORT_SCC2) |
PQUICC_CICR_SCcP(PQUICC_PORT_SCC4) |
PQUICC_CICR_SCdP(PQUICC_PORT_SCC1));
+
+ #ifdef AMC_CODE_TEST
+ dummy_process.pid = AMC_TASKID_NETIO;
+ dummy_process.name= "pas_netio_dispatcher";
+ CodeTEST_create_hook(&dummy_process);
+ dummy_process.pid = AMC_TASKID_CPM;
+ dummy_process.name= "pas_cpm_dispatcher";
+ #endif
m860_install_handler(CPM_VECT_LEV, LEVEL_PA_NETWORK,
ipm_cpm_dispatcher, ED_LEVEL | WM_OFF,
===========================================================================
COMMAND: ccdiff -c /view/henniger-dor5/vob/ios/sys/makefile.860@@/main/2 /view/henniger-dor5/vob/ios/sys/makefile.860
Index: sys/makefile.860
===========================================================================
*** /view/henniger-dor5/vob/ios/sys/makefile.860@@/main/2 Wed Nov 17 10:43:23 1999
--- /view/henniger-dor5/vob/ios/sys/makefile.860 Tue Aug 1 19:21:53 2000
***************
*** 34,40 ****
# Where the shared processor objects are and how to make them
#
! OBJECTS = obj-m860
#
# Where the shared processor /vob/ios/subsys objects are
--- 34,41 ----
# Where the shared processor objects are and how to make them
#
! # OBJECTS = obj-m860
! OBJECTS =
#
# Where the shared processor /vob/ios/subsys objects are
***************
*** 60,67 ****
# Tool Chain
#
! CC= $(PREFIX_CC) gcc.$(TOOLS_VER).ppc
! LD= $(PREFIX_LD) gld.$(TOOLS_VER).ppc
AS= $(CC)
M4= m4 -B8192
AR= $(PREFIX_AR) ar.$(TOOLS_VER).ppc
--- 61,95 ----
# Tool Chain
#
! ### ifeq ($(origin AMC_CODE_TEST), undefined)
! ### CC= $(PREFIX_CC) gcc.$(TOOLS_VER).ppc
! ### LD= $(PREFIX_LD) gld.$(TOOLS_VER).ppc
! ### else
! #
! # Modify LD for AMC CodeTest to add new compile flags.
! #
! CC= $(PREFIX_CC) ctcc -CTkeep -CTv \
! -CTexclude-from-tagging=code_test_dor5.c \
! -CTexclude-from-tagging=sched.c \
! -CTexclude-from-tagging=main_c1700.c
! LD= $(PREFIX_LD) gld.$(TOOLS_VER).ppc \
! -defsym amc_ctrl_port=0x50000000 \
! -defsym amc_data_port=0x50000004
! #
! # Note: for dual idb support use these two tags:
! #
! # -CTidb-compatible-with=obj-m860-c1700/master_idb_list
! # Contents of master_idb_list:
! # ../obj-m860-c1700/ctci.idb
! # ../obj-m860/ctci.idb
! #
! # obj-m860-c1700 objects get this param:
! # -CTidb=obj-m860-c1700/ctci.idb
! #
! # obj-m860 objects get this param:
! # -CTidb=obj-m860/ctci.idb
! #
! ### endif
AS= $(CC)
M4= m4 -B8192
AR= $(PREFIX_AR) ar.$(TOOLS_VER).ppc
=========================================================================== somnath@cisco.com |