summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib')
-rw-r--r--c/src/lib/Makefile.am3
-rw-r--r--c/src/lib/configure.in10
-rw-r--r--c/src/lib/include/Makefile.am9
-rw-r--r--c/src/lib/include/console.h4
-rw-r--r--c/src/lib/include/motorola/Makefile.am9
-rw-r--r--c/src/lib/include/rtems/error.h9
-rw-r--r--c/src/lib/include/sys/Makefile.am9
-rw-r--r--c/src/lib/include/sys/termios.h10
-rw-r--r--c/src/lib/include/zilog/Makefile.am9
-rw-r--r--c/src/lib/libbsp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/include/bsp.h13
-rw-r--r--c/src/lib/libbsp/a29k/portsw/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/a29k/portsw/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/a29k/portsw/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/bare/Makefile.am4
-rw-r--r--c/src/lib/libbsp/bare/bsp_specs2
-rw-r--r--c/src/lib/libbsp/bare/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/bare/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/hppa1.1/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c9
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/tools/Makefile.am6
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/tty/Makefile.am4
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/wrapup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/i386/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/clock/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/console/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/console/console.c6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/i386/i386ex/network/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/start/start.S4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/timer/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/3c509/Makefile.am7
-rw-r--r--c/src/lib/libbsp/i386/pc386/HOWTO39
-rw-r--r--c/src/lib/libbsp/i386/pc386/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/clock/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console.c10
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/start16.S24
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S34
-rw-r--r--c/src/lib/libbsp/i386/pc386/timer/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/tools/Makefile.am10
-rw-r--r--c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/shared/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/shared/comm/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/shared/io/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/shared/irq/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/shared/pci/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/console/console.c6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/start/start.S2
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c15
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am16
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am10
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/init.c4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am10
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/system.h2
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/Makefile.am5
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am20
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am5
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/init.c4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/init.c4
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/Makefile.am18
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/init.c5
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/i960/cvme961/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/i960/cvme961/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/cvme961/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/bsp_specs10
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/startup/bspstart.c25
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/m68k/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/console/console.c7
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/include/bsp.h18
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/spurious/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c12
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/linkcmds5
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/README27
-rw-r--r--c/src/lib/libbsp/m68k/efi332/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/dotests14
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/gdbinit682
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/interr.c7
-rw-r--r--c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/start/start.c6
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/Makefile.am10
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S2
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/linkcmds7
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM2
-rw-r--r--c/src/lib/libbsp/m68k/efi332/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/spurious/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/startup/linkcmds5
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c9
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/linkcmds5
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/console/console.c13
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/wrapup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/Makefile.am11
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c10
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/network/Makefile.am6
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/network/network.c185
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/start/start.S2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am5
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c17
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/init68360.c13
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/wrapup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/idp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/idp/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/idp/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/idp/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/idp/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/idp/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/idp/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.am10
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/consolex/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c12
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/tod/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/tools/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/README106
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/bsp_specs8
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/configure.in4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/console/console-recording.c591
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/console/console.c522
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/fatal/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/include/Makefile.am6
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/include/bsp.h40
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/network/Makefile.am6
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/network/network.c3753
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/network/uti596.h297
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/Makefile.am13
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c29
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/linkcmds227
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/page_table.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/wrapup/Makefile.am14
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/Makefile.am7
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/linkcmds2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c7
-rw-r--r--c/src/lib/libbsp/m68k/shared/start.S15
-rw-r--r--c/src/lib/libbsp/mips/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/liblnk/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/powerpc/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/Makefile.am7
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/bsp_specs2
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/scv64/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/bsp_specs8
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/canbus/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/network/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/start/start.S4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c7
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c11
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/bootloader/Makefile.am18
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs2
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/irq/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/motorola/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/openpic/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/pci/Makefile.am6
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/residual/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am9
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/vectors/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/dlentry/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/flashentry/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/bsp_specs2
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/console/console.c8
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/network/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/nvram/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/pci/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.am6
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/tod/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/universe/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/vectors/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/powerpc/psim/Makefile.am8
-rw-r--r--c/src/lib/libbsp/powerpc/psim/bsp_specs2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/console/console.c7
-rw-r--r--c/src/lib/libbsp/powerpc/psim/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/psim/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/powerpc/psim/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/tools/Makefile.am26
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/runtest11
-rw-r--r--c/src/lib/libbsp/powerpc/psim/vectors/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/PCI_bus/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/bsp_specs2
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/console/consolereserveresources.c7
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/include/bsp.h13
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/tod/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/vectors/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/bootloader/misc.c4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/console.c10
-rw-r--r--c/src/lib/libbsp/powerpc/shared/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S7
-rw-r--r--c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/residual/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/start/start.S7
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c19
-rw-r--r--c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am4
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am16
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am23
-rw-r--r--c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S2
-rw-r--r--c/src/lib/libbsp/sh/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh1/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh1/bsp_specs2
-rw-r--r--c/src/lib/libbsp/sh/gensh1/console/Makefile.am6
-rw-r--r--c/src/lib/libbsp/sh/gensh1/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh1/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh1/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh1/startup/Makefile.am8
-rw-r--r--c/src/lib/libbsp/sh/gensh1/startup/bspstart.c3
-rw-r--r--c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.am6
-rw-r--r--c/src/lib/libbsp/sh/gensh2/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh2/README15
-rw-r--r--c/src/lib/libbsp/sh/gensh2/bsp_specs2
-rw-r--r--c/src/lib/libbsp/sh/gensh2/console/Makefile.am6
-rw-r--r--c/src/lib/libbsp/sh/gensh2/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh2/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh2/start/start.S14
-rw-r--r--c/src/lib/libbsp/sh/gensh2/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh2/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/sh/gensh2/startup/hw_init.c118
-rw-r--r--c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.am6
-rw-r--r--c/src/lib/libbsp/sh/shared/Makefile.am4
-rw-r--r--c/src/lib/libbsp/shared/console.c15
-rw-r--r--c/src/lib/libbsp/shmdr/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/console/consolereserveresources.c7
-rw-r--r--c/src/lib/libbsp/sparc/erc32/gnatsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/include/bsp.h14
-rw-r--r--c/src/lib/libbsp/sparc/erc32/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/Makefile.am5
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/bspstart.c14
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/linkcmds3
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/spurious.c3
-rw-r--r--c/src/lib/libbsp/sparc/erc32/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sparc/erc32/tools/Makefile.am18
-rw-r--r--c/src/lib/libbsp/sparc/erc32/tools/runtest.in6
-rw-r--r--c/src/lib/libbsp/sparc/erc32/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/posix/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/posix/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/posix/configure.in15
-rw-r--r--c/src/lib/libbsp/unix/posix/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/posix/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/posix/include/bsp.h9
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/Makefile.am4
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/Makefile.am13
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/timer/Makefile.am6
-rw-r--r--c/src/lib/libbsp/unix/posix/tools/Makefile.am30
-rw-r--r--c/src/lib/libbsp/unix/posix/wrapup/Makefile.am4
-rw-r--r--c/src/lib/libc/Makefile.am33
-rw-r--r--c/src/lib/libc/error.h9
-rw-r--r--c/src/lib/libc/gxx_wrappers.c219
-rw-r--r--c/src/lib/libc/imfs.h16
-rw-r--r--c/src/lib/libc/imfs_creat.c6
-rw-r--r--c/src/lib/libc/imfs_directory.c12
-rw-r--r--c/src/lib/libc/imfs_stat.c6
-rw-r--r--c/src/lib/libc/imfs_utime.c4
-rw-r--r--c/src/lib/libc/libio.c4
-rw-r--r--c/src/lib/libc/malloc.c2
-rw-r--r--c/src/lib/libc/scandir.c2
-rw-r--r--c/src/lib/libc/termios.c15
-rw-r--r--c/src/lib/libc/termiosreserveresources.c5
-rw-r--r--c/src/lib/libc/unmount.c12
-rw-r--r--c/src/lib/libcpu/Makefile.am4
-rw-r--r--c/src/lib/libcpu/a29k/Makefile.am6
-rw-r--r--c/src/lib/libcpu/a29k/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/a29k/timer/Makefile.am6
-rw-r--r--c/src/lib/libcpu/hppa1.1/Makefile.am4
-rw-r--r--c/src/lib/libcpu/hppa1.1/clock/Makefile.am4
-rw-r--r--c/src/lib/libcpu/hppa1.1/include/Makefile.am6
-rw-r--r--c/src/lib/libcpu/hppa1.1/milli/Makefile.am4
-rw-r--r--c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am4
-rw-r--r--c/src/lib/libcpu/hppa1.1/timer/Makefile.am4
-rw-r--r--c/src/lib/libcpu/i386/Makefile.am4
-rw-r--r--c/src/lib/libcpu/m68k/Makefile.am4
-rw-r--r--c/src/lib/libcpu/m68k/m68040/Makefile.am4
-rw-r--r--c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am6
-rw-r--r--c/src/lib/libcpu/mips/Makefile.am4
-rw-r--r--c/src/lib/libcpu/mips/clock/Makefile.am4
-rw-r--r--c/src/lib/libcpu/mips/timer/Makefile.am4
-rw-r--r--c/src/lib/libcpu/mips64orion/Makefile.am4
-rw-r--r--c/src/lib/libcpu/mips64orion/clock/Makefile.am4
-rw-r--r--c/src/lib/libcpu/mips64orion/timer/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/Makefile.am8
-rw-r--r--c/src/lib/libcpu/powerpc/mpc505/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am9
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am10
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c15
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am11
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am9
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c17
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am13
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am9
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am16
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S2
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am23
-rw-r--r--c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S2
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/console/console.c10
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am6
-rw-r--r--c/src/lib/libcpu/powerpc/shared/Makefile.am4
-rw-r--r--c/src/lib/libcpu/powerpc/wrapup/Makefile.am8
-rw-r--r--c/src/lib/libcpu/sh/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7032/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7032/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/sh/sh7032/delay/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7032/include/Makefile.am6
-rw-r--r--c/src/lib/libcpu/sh/sh7032/null/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7032/sci/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7032/timer/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7045/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7045/clock/Makefile.am6
-rw-r--r--c/src/lib/libcpu/sh/sh7045/include/Makefile.am6
-rw-r--r--c/src/lib/libcpu/sh/sh7045/null/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7045/sci/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sh/sh7045/sci/sci.c27
-rw-r--r--c/src/lib/libcpu/sh/sh7045/timer/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sparc/Makefile.am4
-rw-r--r--c/src/lib/libcpu/sparc/reg_win/Makefile.am6
-rw-r--r--c/src/lib/libcpu/sparc/syscall/Makefile.am6
609 files changed, 5618 insertions, 4080 deletions
diff --git a/c/src/lib/Makefile.am b/c/src/lib/Makefile.am
index f65729290b..2d2f16cd26 100644
--- a/c/src/lib/Makefile.am
+++ b/c/src/lib/Makefile.am
@@ -5,8 +5,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-SUBDIRS = include libc libcpu libbsp \
- $(LIBHWAPI)
+SUBDIRS = include libc libcpu libbsp
include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/configure.in b/c/src/lib/configure.in
index 3b6ebdd372..de922749ea 100644
--- a/c/src/lib/configure.in
+++ b/c/src/lib/configure.in
@@ -14,7 +14,6 @@ AM_MAINTAINER_MODE
RTEMS_ENABLE_MULTIPROCESSING
RTEMS_ENABLE_NETWORKING
RTEMS_ENABLE_BARE
-RTEMS_ENABLE_HWAPI
RTEMS_ENV_RTEMSBSP
@@ -36,15 +35,6 @@ AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
AC_CONFIG_SUBDIRS(libcpu)
AC_CONFIG_SUBDIRS(libbsp)
-RTEMS_ENABLE_HWAPI
-if test "$RTEMS_HAS_HWAPI" = "yes"; then
- if test -d "${srcdir}/libhwapi"; then
- cfg_subdirs="$cfg_subdirs libhwapi"
- fi
- LIBHWAPI="libhwapi"
-fi
-AC_SUBST(LIBHWAPI)
-
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
AC_CONFIG_SUBDIRS($cfg_subdirs)
diff --git a/c/src/lib/include/Makefile.am b/c/src/lib/include/Makefile.am
index 76d08e35a7..4a5e8d14c4 100644
--- a/c/src/lib/include/Makefile.am
+++ b/c/src/lib/include/Makefile.am
@@ -9,18 +9,15 @@ H_FILES = chain.h console.h clockdrv.h iosupp.h ringbuf.h spurious.h \
noinst_HEADERS = $(H_FILES)
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE) \
+ $(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%)
$(PROJECT_INCLUDE):
@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/%.h: %.h
$(INSTALL_DATA) $< $@
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
+all-local: $(PREINSTALL_FILES)
SUBDIRS = sys motorola zilog
diff --git a/c/src/lib/include/console.h b/c/src/lib/include/console.h
index 7bc6b5e3d4..2d2f380012 100644
--- a/c/src/lib/include/console.h
+++ b/c/src/lib/include/console.h
@@ -24,10 +24,6 @@ extern "C" {
{ console_initialize, console_open, console_close, \
console_read, console_write, console_control }
-void console_reserve_resources(
- rtems_configuration_table *configuration
-);
-
rtems_device_driver console_initialize(
rtems_device_major_number,
rtems_device_minor_number,
diff --git a/c/src/lib/include/motorola/Makefile.am b/c/src/lib/include/motorola/Makefile.am
index 91323785d8..cb589bda78 100644
--- a/c/src/lib/include/motorola/Makefile.am
+++ b/c/src/lib/include/motorola/Makefile.am
@@ -8,17 +8,14 @@ H_FILES = mc68230.h mc68681.h
noinst_HEADERS = $(H_FILES)
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/motorola \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/motorola/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/motorola \
+ $(noinst_HEADERS:%=$(PROJECT_INCLUDE)/motorola/%)
$(PROJECT_INCLUDE)/motorola:
@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/motorola/%.h: %.h
$(INSTALL_DATA) $< $@
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/include/rtems/error.h b/c/src/lib/include/rtems/error.h
index a0698afb5d..de6e1715db 100644
--- a/c/src/lib/include/rtems/error.h
+++ b/c/src/lib/include/rtems/error.h
@@ -7,6 +7,10 @@
#ifndef __RTEMS_ERROR_h
#define __RTEMS_ERROR_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* rtems_error() and rtems_panic() support
*/
@@ -34,5 +38,10 @@ void rtems_panic(const char *printf_format, ...);
extern int rtems_panic_in_progress;
+#ifdef __cplusplus
+}
+#endif
+
+
#endif
/* end of include file */
diff --git a/c/src/lib/include/sys/Makefile.am b/c/src/lib/include/sys/Makefile.am
index 32068894e5..aa8c375690 100644
--- a/c/src/lib/include/sys/Makefile.am
+++ b/c/src/lib/include/sys/Makefile.am
@@ -18,17 +18,14 @@ H_FILES = utime.h $(NEWLIB_H_FILES) $(NETWORKING_H_FILES)
noinst_HEADERS = utime.h termios.h ioctl.h
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/sys \
-$(H_FILES:%=$(PROJECT_INCLUDE)/sys/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys \
+ $(H_FILES:%=$(PROJECT_INCLUDE)/sys/%)
$(PROJECT_INCLUDE)/sys:
@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/sys/%.h: %.h
$(INSTALL_DATA) $< $@
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/include/sys/termios.h b/c/src/lib/include/sys/termios.h
index bb64d55433..7cc28d7d38 100644
--- a/c/src/lib/include/sys/termios.h
+++ b/c/src/lib/include/sys/termios.h
@@ -14,6 +14,8 @@
#ifndef TERMIOS_H
#define TERMIOS_H
+#include <sys/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -174,9 +176,15 @@ struct termios {
#define TCSADRAIN 1
#define TCSAFLUSH 2
+int tcdrain(int);
+int tcflow(int, int);
+int tcflush(int, int);
int tcgetattr(int, struct termios *);
int tcsetattr(int, int, struct termios *);
-int tcdrain(int);
+pid_t tcgetprgrp(int);
+int tcsetprgrp(int, pid_t);
+int tcsendbreak(int, int);
+
speed_t cfgetospeed(const struct termios *tp);
int cfsetospeed(struct termios *tp, speed_t speed);
speed_t cfgetispeed(const struct termios *tp);
diff --git a/c/src/lib/include/zilog/Makefile.am b/c/src/lib/include/zilog/Makefile.am
index ec750d0097..db9ab19472 100644
--- a/c/src/lib/include/zilog/Makefile.am
+++ b/c/src/lib/include/zilog/Makefile.am
@@ -8,17 +8,14 @@ H_FILES = z8036.h z8530.h z8536.h
noinst_HEADERS = $(H_FILES)
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/zilog \
-$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/zilog/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/zilog \
+ $(noinst_HEADERS:%=$(PROJECT_INCLUDE)/zilog/%)
$(PROJECT_INCLUDE)/zilog:
@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/zilog/%.h: %.h
$(INSTALL_DATA) $< $@
-all-am: $(PREINSTALL_FILES)
-debug-am: $(PREINSTALL_FILES)
-profile-am: $(PREINSTALL_FILES)
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/libbsp/Makefile.am b/c/src/lib/libbsp/Makefile.am
index 4bc5cdb4e2..7c91749bd8 100644
--- a/c/src/lib/libbsp/Makefile.am
+++ b/c/src/lib/libbsp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/a29k/Makefile.am b/c/src/lib/libbsp/a29k/Makefile.am
index 6e02be9e8e..8515dfe07b 100644
--- a/c/src/lib/libbsp/a29k/Makefile.am
+++ b/c/src/lib/libbsp/a29k/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/a29k/portsw/Makefile.am b/c/src/lib/libbsp/a29k/portsw/Makefile.am
index 91fa6dd353..b05d58ec2c 100644
--- a/c/src/lib/libbsp/a29k/portsw/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/a29k/portsw/console/Makefile.am b/c/src/lib/libbsp/a29k/portsw/console/Makefile.am
index a2ebbd418e..56c8b9e75d 100644
--- a/c/src/lib/libbsp/a29k/portsw/console/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/a29k/portsw/include/Makefile.am b/c/src/lib/libbsp/a29k/portsw/include/Makefile.am
index b2e7788677..aa21a7b155 100644
--- a/c/src/lib/libbsp/a29k/portsw/include/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/a29k/portsw/include/bsp.h b/c/src/lib/libbsp/a29k/portsw/include/bsp.h
index 69140d7ecc..930f55fb98 100644
--- a/c/src/lib/libbsp/a29k/portsw/include/bsp.h
+++ b/c/src/lib/libbsp/a29k/portsw/include/bsp.h
@@ -14,8 +14,8 @@
* $Id$
*/
-#ifndef __NO_BSP_h
-#define __NO_BSP_h
+#ifndef __PORTSW_h
+#define __PORTSW_h
#ifdef __cplusplus
extern "C" {
@@ -26,6 +26,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/a29k/portsw/shmsupp/Makefile.am b/c/src/lib/libbsp/a29k/portsw/shmsupp/Makefile.am
index 81b097ab59..64cf8bc02b 100644
--- a/c/src/lib/libbsp/a29k/portsw/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/a29k/portsw/start/Makefile.am b/c/src/lib/libbsp/a29k/portsw/start/Makefile.am
index 726d5ee507..3d6f0b734c 100644
--- a/c/src/lib/libbsp/a29k/portsw/start/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am b/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am
index fc66747f7c..3d538de532 100644
--- a/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
index d74f2ef23d..4e0eb131ba 100644
--- a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
+++ b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
@@ -140,7 +140,7 @@ int bsp_start(
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
_settrap( 109,&a29k_enable_sup);
_settrap( 110,&a29k_disable_sup);
diff --git a/c/src/lib/libbsp/a29k/portsw/wrapup/Makefile.am b/c/src/lib/libbsp/a29k/portsw/wrapup/Makefile.am
index ed2b020002..1674f26d38 100644
--- a/c/src/lib/libbsp/a29k/portsw/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/a29k/portsw/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/bare/Makefile.am b/c/src/lib/libbsp/bare/Makefile.am
index db8ee902e2..833f14ba06 100644
--- a/c/src/lib/libbsp/bare/Makefile.am
+++ b/c/src/lib/libbsp/bare/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/bare/bsp_specs b/c/src/lib/libbsp/bare/bsp_specs
index 61dac86b53..337cea1292 100644
--- a/c/src/lib/libbsp/bare/bsp_specs
+++ b/c/src/lib/libbsp/bare/bsp_specs
@@ -19,5 +19,5 @@
%{qrtems_debug: start_g.o%s}}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
+%(old_link) %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/bare/include/Makefile.am b/c/src/lib/libbsp/bare/include/Makefile.am
index 8b4b05be9d..c0db52355d 100644
--- a/c/src/lib/libbsp/bare/include/Makefile.am
+++ b/c/src/lib/libbsp/bare/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/bare/include/bsp.h b/c/src/lib/libbsp/bare/include/bsp.h
index b7f3e318d4..8332b75392 100644
--- a/c/src/lib/libbsp/bare/include/bsp.h
+++ b/c/src/lib/libbsp/bare/include/bsp.h
@@ -26,6 +26,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/hppa1.1/Makefile.am b/c/src/lib/libbsp/hppa1.1/Makefile.am
index 6e02be9e8e..8515dfe07b 100644
--- a/c/src/lib/libbsp/hppa1.1/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.am
index 932db66253..94c02e2a0e 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/include/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/include/Makefile.am
index da6da12e41..d2abb7f5c7 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/include/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h b/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
index effeb07cd7..e94e2e36db 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
@@ -24,6 +24,15 @@ extern "C" {
#include <rtems/ttydrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.am
index ff6f7efa21..bef2178809 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.am
index 354f02440b..58abb62a6e 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.am
index 077121be6b..0666c32432 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
index 96da69993c..cd1ab9c0ee 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
@@ -189,7 +189,7 @@ void bsp_start(void)
*/
Cpu_table.do_zero_of_workspace = FALSE;
- Cpu_table.interrupt_stack_size = (12 * 1024);
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
/*
* Set this artificially low for the simulator
@@ -231,13 +231,6 @@ void bsp_start(void)
#endif
/*
- * Add 1 extension for MPCI_fatal
- */
-
- if (BSP_Configuration.User_multiprocessing_table)
- BSP_Configuration.maximum_extensions++;
-
- /*
* Set the "clicks per tick" for the simulator
* used by libcpu/hppa/clock/clock.c to schedule interrupts
*
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/tools/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/tools/Makefile.am
index e53b867bb8..360cb68d5c 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/tools/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/tools/Makefile.am
@@ -5,11 +5,9 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-noinst_PROGRAMS= \
-print_dump
+noinst_PROGRAMS = print_dump
-print_dump_SOURCES= \
-print_dump.c
+print_dump_SOURCES = print_dump.c
## HACK: install to build-tree
install-exec-local: $(PROGRAMS)
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/tty/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/tty/Makefile.am
index b27000a32e..55895d8535 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/tty/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/tty/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/wrapup/Makefile.am b/c/src/lib/libbsp/hppa1.1/simhppa/wrapup/Makefile.am
index 5e4a72764b..dbb47fe6db 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/wrapup/Makefile.am
@@ -1,10 +1,9 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-BSP_FILES = startup tty
# pieces to pick up out of libcpu/hppa
CPU_FILES = clock milli timer
@@ -16,7 +15,7 @@ GENERIC_FILES = $(GENERIC_MP_REL_FILES)
if HAS_MP
BSP_MP_O_FILES = shmsupp
endif
-BSP_FILES = $(BSP_MP_O_FILES)
+BSP_FILES = start tty $(BSP_MP_O_FILES)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
diff --git a/c/src/lib/libbsp/i386/Makefile.am b/c/src/lib/libbsp/i386/Makefile.am
index aa7543aa89..b0225d2b1d 100644
--- a/c/src/lib/libbsp/i386/Makefile.am
+++ b/c/src/lib/libbsp/i386/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i386/i386ex/Makefile.am b/c/src/lib/libbsp/i386/i386ex/Makefile.am
index 0bc7c07a45..153fe29c17 100644
--- a/c/src/lib/libbsp/i386/i386ex/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am b/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am
index 016b81894f..1c5f03eaf5 100644
--- a/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -19,7 +19,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(clock_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/i386ex/console/Makefile.am b/c/src/lib/libbsp/i386/i386ex/console/Makefile.am
index 13810f58b0..4b0c14dbdc 100644
--- a/c/src/lib/libbsp/i386/i386ex/console/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(console_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(console_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/i386ex/console/console.c b/c/src/lib/libbsp/i386/i386ex/console/console.c
index 821c2e4c34..d8082ddd74 100644
--- a/c/src/lib/libbsp/i386/i386ex/console/console.c
+++ b/c/src/lib/libbsp/i386/i386ex/console/console.c
@@ -95,12 +95,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
-void console_reserve_resources(rtems_configuration_table *conf)
-{
- rtems_termios_reserve_resources(conf, 1);
- return;
-}
-
void __assert (const char *file, int line, const char *msg)
{
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
diff --git a/c/src/lib/libbsp/i386/i386ex/include/Makefile.am b/c/src/lib/libbsp/i386/i386ex/include/Makefile.am
index 43cf28d6c2..3f061aa216 100644
--- a/c/src/lib/libbsp/i386/i386ex/include/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/i386ex/include/bsp.h b/c/src/lib/libbsp/i386/i386ex/include/bsp.h
index 7a812e9d5b..991badd5c5 100644
--- a/c/src/lib/libbsp/i386/i386ex/include/bsp.h
+++ b/c/src/lib/libbsp/i386/i386ex/include/bsp.h
@@ -26,6 +26,15 @@ extern "C" {
#include <irq.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (8 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/i386/i386ex/network/Makefile.am b/c/src/lib/libbsp/i386/i386ex/network/Makefile.am
index 622d9ccfb3..d0e6c20966 100644
--- a/c/src/lib/libbsp/i386/i386ex/network/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/network/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/i386ex/start/Makefile.am b/c/src/lib/libbsp/i386/i386ex/start/Makefile.am
index 00e98eb654..e8514e5c0c 100644
--- a/c/src/lib/libbsp/i386/i386ex/start/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/i386ex/start/start.S b/c/src/lib/libbsp/i386/i386ex/start/start.S
index 80f7b8cdf1..c3a8564c9c 100644
--- a/c/src/lib/libbsp/i386/i386ex/start/start.S
+++ b/c/src/lib/libbsp/i386/i386ex/start/start.S
@@ -83,7 +83,7 @@ END_DATA
*/
.code16
- .section .reset
+ .section .reset, "ax"
PUBLIC ( SYM(reset) )
SYM(reset):
nop
@@ -106,7 +106,7 @@ SYM(reset):
nop
nop
- .section .initial
+ .section .initial, "ax"
/* nop */ /* required for linker -- initial jump is to "label - 2" */
/* nop */ /* ie. _initInternalRegisters -2 ( which now == .initial ) */
/*
diff --git a/c/src/lib/libbsp/i386/i386ex/startup/Makefile.am b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.am
index b6bff49c66..c351417051 100644
--- a/c/src/lib/libbsp/i386/i386ex/startup/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
index c6dfe741cb..0f9f5dea51 100644
--- a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
@@ -102,14 +102,13 @@ void bsp_start( void )
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_table_segment = get_ds();
Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table;
- Cpu_table.interrupt_stack_size = 8192; /* changed Sept 14 STACK_MINIMUM_SIZE */
+ /* changed Sept 14 STACK_MINIMUM_SIZE */
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
#if defined(RTEMS_POSIX_API)
BSP_Configuration.work_space_size *= 3;
#endif
- /* BSP_Configuration.work_space_size += 128 * RTEMS_MINIMUM_STACK_SIZE; */
-
BSP_Configuration.work_space_start = (void *)
RAM_END - BSP_Configuration.work_space_size;
#ifdef DEBUG
@@ -120,7 +119,6 @@ void bsp_start( void )
* Account for the console's resources
*/
- /* console_reserve_resources( &BSP_Configuration ); */
/*
* Init rtems_interrupt_management
*/
diff --git a/c/src/lib/libbsp/i386/i386ex/timer/Makefile.am b/c/src/lib/libbsp/i386/i386ex/timer/Makefile.am
index 5e87c956a3..df08f6e87d 100644
--- a/c/src/lib/libbsp/i386/i386ex/timer/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -20,7 +20,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(timer_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am b/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am
index 54941a5a93..0c3d7fa39c 100644
--- a/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
index 982f1d6b89..6c741eea90 100644
--- a/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,8 +23,7 @@ AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
$(PGM): $(X3c509_rel_OBJECTS)
$(make-rel)
-
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
if HAS_NETWORKING
diff --git a/c/src/lib/libbsp/i386/pc386/HOWTO b/c/src/lib/libbsp/i386/pc386/HOWTO
index 9c7a9af2b4..1bf00a3b0b 100644
--- a/c/src/lib/libbsp/i386/pc386/HOWTO
+++ b/c/src/lib/libbsp/i386/pc386/HOWTO
@@ -1,6 +1,6 @@
-
+-----------------------------------------------------------------------------+
-| RTEMS 4.0.0 PC386 BSP HOWTO - 1998/04/21 |
+| RTEMS 4.5.0 PC386 BSP HOWTO - 1998/04/21 |
+| |
+-----------------------------------------------------------------------------+
| (C) Copyright 1998 - |
| - NavIST Group - Real-Time Distributed Systems and Industrial Automation |
@@ -14,6 +14,11 @@
| This file is provided "AS IS" without warranty of any kind, either |
| expressed or implied. |
+-----------------------------------------------------------------------------+
+| History: |
+| 12 June 2000 - Updated to 4.5 (Joel) |
++-----------------------------------------------------------------------------+
+
+CVS Revision: $Id$
1. Introduction
@@ -37,31 +42,24 @@ substituted by the real thing!
------------------------------------------------
Obtaining, building and installing the tools for building the
-PC386 BSP of RTEMS is covered in detail in the 'RTEMS 4.0.0 On-Line
-Library' -> 'Getting Started with RTEMS for C/C++ Users' -> 'Building
-the GNU C/C++ Cross Compiler Toolset'.
+PC386 BSP of RTEMS is covered in detail in the 'RTEMS 4.5.0 On-Line
+Library' -> 'Getting Started with RTEMS for C/C++ Users'. You can
+either use pre-built toolset executables or build your own from
+the instructions given there.
- When running the 'bit' script you should specift the argumetn as
-either:
-
- + 'i386-elf' to indicate an 'i386-rtemself' toolset, or
- + 'i386' to indicate an 'i386-rtems' toolset.
+ This BSP is designed to work only with ELF toolset configurations.
+This is format used by the i386-rtems target.
4. Building RTEMS
-----------------
Obtaining, building and installing the tools for building the
-PC386 BSP is covered in detail in the 'RTEMS 4.0.0 On-Line Library' ->
+PC386 BSP is covered in detail in the 'RTEMS 4.5.0 On-Line Library' ->
'Getting Started with RTEMS for C/C++ Users' -> 'Building RTEMS'.
When running configure, use the following values for the listed
-options:
-
- + with an i386-rtemself toolset
- --target=i386-rtemself
- --enable-rtemsbsp=pc386
+options with an i386-rtems toolset:
- + with an i386-rtems toolset
--target=i386-rtems
--enable-rtemsbsp=pc386
@@ -116,11 +114,10 @@ and run your PC386 BSP samples, tests and programs.
You can get the latest release of GRUB from its homepage:
- - http://www.uruk.org/grub/
-
-or alternatively by ftp from:
+ - http://www.gnu.org/grub/
- - ftp://ftp.uruk.org/public/grub/
+NOTE: The former location was http://www.uruk.org/grub and ftp from
+ ftp://ftp.uruk.org/public/grub.
Once you obtain the .tar.gz archive 'grub-0.4.tar.gz', change to a
temporary directory (you won't need the grub files after this and can
diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index c332929df0..5b350eb638 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i386/pc386/clock/Makefile.am b/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
index c8a411e6de..131b243ca6 100644
--- a/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -19,7 +19,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(clock_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/pc386/console/Makefile.am b/c/src/lib/libbsp/i386/pc386/console/Makefile.am
index 1846bc26c1..c845b25351 100644
--- a/c/src/lib/libbsp/i386/pc386/console/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(console_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(console_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/pc386/console/console.c b/c/src/lib/libbsp/i386/pc386/console/console.c
index 8da96684d7..fff960eb91 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console.c
@@ -104,16 +104,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
-void console_reserve_resources(rtems_configuration_table *conf)
-{
- if(BSPConsolePort != BSP_CONSOLE_PORT_CONSOLE)
- {
- rtems_termios_reserve_resources(conf, 1);
- }
-
- return;
-}
-
void __assert (const char *file, int line, const char *msg)
{
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
diff --git a/c/src/lib/libbsp/i386/pc386/include/Makefile.am b/c/src/lib/libbsp/i386/pc386/include/Makefile.am
index 332b5955cd..2f4544274f 100644
--- a/c/src/lib/libbsp/i386/pc386/include/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/include/bsp.h b/c/src/lib/libbsp/i386/pc386/include/bsp.h
index e469d2b14d..dc1d2e497e 100644
--- a/c/src/lib/libbsp/i386/pc386/include/bsp.h
+++ b/c/src/lib/libbsp/i386/pc386/include/bsp.h
@@ -54,6 +54,15 @@ extern "C" {
#include <bspIo.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Network driver configuration
*/
@@ -134,6 +143,8 @@ extern int rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config);
#define Clear_tm27_intr()
#define Lower_tm27_intr()
+/* does anyone need this? if so, report it so we can rename this macro */
+#if 0
/*-------------------------------------------------------------------------+
| Simple spin delay in microsecond units for device drivers.
| This is very dependent on the clock speed of the target.
@@ -143,6 +154,7 @@ extern int rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config);
rtems_unsigned32 _cnt = _microseconds; \
asm volatile ("0: nop; mov %0,%0; loop 0b" : "=c"(_cnt) : "0"(_cnt)); \
}
+#endif
/*-------------------------------------------------------------------------+
| Convert microseconds to ticks and ticks to microseconds.
diff --git a/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
index e68eeeb6dc..ef41a484d9 100644
--- a/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,7 +21,7 @@ AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
$(PGM): $(ne2000_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
if HAS_NETWORKING
diff --git a/c/src/lib/libbsp/i386/pc386/start/Makefile.am b/c/src/lib/libbsp/i386/pc386/start/Makefile.am
index f8e467dab2..2d530c6695 100644
--- a/c/src/lib/libbsp/i386/pc386/start/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/start/start16.S b/c/src/lib/libbsp/i386/pc386/start/start16.S
index d9aea202f3..520895de47 100644
--- a/c/src/lib/libbsp/i386/pc386/start/start16.S
+++ b/c/src/lib/libbsp/i386/pc386/start/start16.S
@@ -109,16 +109,16 @@ _start16:
outb %al, $0x60
call empty_8042
- call delay
- call delay
- call delay
+ call pc386_delay
+ call pc386_delay
+ call pc386_delay
movl %cs:HDRSTART + HDROFF, %eax #
pushl %eax # jump to start of 32 bit code
ret #
/*----------------------------------------------------------------------------+
-| delay
+| pc386_delay
+------------------------------------------------------------------------------
| Delay is needed after doing I/O.
|
@@ -131,10 +131,10 @@ _start16:
| NOTE: Saving the content of the EAX register just in case. - Rosimildo.
+----------------------------------------------------------------------------*/
.p2align 4
- .globl _delay
- .globl delay
-delay:
-_delay:
+ .globl _pc386_delay
+ .globl pc386_delay
+pc386_delay:
+_pc386_delay:
pushl %eax
#if defined(USE_OUTB_FOR_DELAY)
outb %al, $0x80 # about 1uS delay on most machines
@@ -142,9 +142,9 @@ _delay:
#else
movl $0x200, %eax
-delay1:
+pc386_delay1:
dec %eax
- jnz delay1
+ jnz pc386_delay1
#endif
popl %eax
ret
@@ -162,11 +162,11 @@ delay1:
.globl empty_8042
empty_8042:
_empty_8042:
- call delay
+ call pc386_delay
inb $0x64, %al # 8042 status port
testb $0x01, %al # output buffer?
jz no_output
- call delay
+ call pc386_delay
in $0x60, %al # read it
jmp empty_8042
no_output:
diff --git a/c/src/lib/libbsp/i386/pc386/startup/Makefile.am b/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
index ac225d520b..a634ef5724 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index dc2a24debb..e443b31402 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -163,7 +163,7 @@ void bsp_start_default( void )
Cpu_table.do_zero_of_workspace = TRUE;
Cpu_table.interrupt_table_segment = get_ds();
Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.extra_mpci_receive_server_stack = 0;
/* Place RTEMS workspace at beginning of free memory. */
@@ -174,8 +174,6 @@ void bsp_start_default( void )
BSP_Configuration.work_space_start = (void *)rtemsFreeMemStart;
rtemsFreeMemStart += BSP_Configuration.work_space_size;
- console_reserve_resources(&BSP_Configuration);
-
/*
* Init rtems interrupt management
*/
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 87fc02f0f4..6d7ec06022 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -50,7 +50,7 @@ BEGIN_CODE
EXTERN (clockOff)
/*----------------------------------------------------------------------------+
-| delay
+| pc386_delay
+------------------------------------------------------------------------------
| Delay is needed after doing I/O.
|
@@ -64,17 +64,17 @@ BEGIN_CODE
#define DELAY_USE_OUTB
.p2align 4
- .globl _delay
- .globl delay
-delay:
-_delay:
+ .globl _pc386_delay
+ .globl pc386_delay
+pc386_delay:
+_pc386_delay:
#ifdef DELAY_USE_OUTB
outb al, $0x80 # about 1uS delay on most machines
#else
movl $0x200, eax
-delay1:
+pc386_delay1:
dec eax
- jnz delay1
+ jnz pc386_delay1
#endif
ret
@@ -123,36 +123,36 @@ next_step:
movb $0x11, al /* initialization sequence */
outb al, $0x20 /* send it to 8259A-1 */
- call SYM(delay)
+ call SYM(pc386_delay)
outb al, $0xA0 /* and to 8259A-2 */
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x20, al /* start of hardware int's (0x20) */
outb al, $0x21
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x28, al /* start of hardware int's 2 (0x28) */
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x04, al /* 8259-1 is master */
outb al, $0x21
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x02, al /* 8259-2 is slave */
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x01, al /* 8086 mode for both */
outb al, $0x21
- call SYM(delay)
+ call SYM(pc386_delay)
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0xFF, al /* mask off all interrupts for now */
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0xFB, al /* mask all irq's but irq2 which */
outb al, $0x21 /* is cascaded */
- call SYM(delay)
+ call SYM(pc386_delay)
movw $0xFFFB, SYM(i8259s_cache) /* set up same values in cache */
diff --git a/c/src/lib/libbsp/i386/pc386/timer/Makefile.am b/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
index 5e87c956a3..df08f6e87d 100644
--- a/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -20,7 +20,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(timer_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/pc386/tools/Makefile.am b/c/src/lib/libbsp/i386/pc386/tools/Makefile.am
index 43049dd3b7..e6ce930223 100644
--- a/c/src/lib/libbsp/i386/pc386/tools/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/tools/Makefile.am
@@ -7,8 +7,7 @@ ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
EXTRA_DIST = Spec.doc
-noinst_PROGRAMS = \
-bin2boot
+noinst_PROGRAMS = bin2boot
bin2boot_SOURCES = bin2boot.c
@@ -18,11 +17,10 @@ bin2boot_SOURCES = bin2boot.c
@PROJECT_RELEASE@/build-tools/bin2boot$(EXEEXT): bin2boot$(EXEEXT)
$(INSTALL_PROGRAM) $< $@
-PREINSTALL_FILES = \
-@PROJECT_RELEASE@/build-tools \
-@PROJECT_RELEASE@/build-tools/bin2boot$(EXEEXT)
+PREINSTALL_FILES += @PROJECT_RELEASE@/build-tools \
+ @PROJECT_RELEASE@/build-tools/bin2boot$(EXEEXT)
## HACK: install into build-tree
all-local: $(PREINSTALL_FILES)
-include $(top_srcdir)/../../../../../../../automake/local.am
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
index fafd810eb4..24abfa1c65 100644
--- a/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
index 25c26d5fa9..9250a7c3cd 100644
--- a/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/shared/Makefile.am b/c/src/lib/libbsp/i386/shared/Makefile.am
index 0089ff68f1..b4677e767b 100644
--- a/c/src/lib/libbsp/i386/shared/Makefile.am
+++ b/c/src/lib/libbsp/i386/shared/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/shared/comm/Makefile.am b/c/src/lib/libbsp/i386/shared/comm/Makefile.am
index 7ce8233a6e..5db6da55a3 100644
--- a/c/src/lib/libbsp/i386/shared/comm/Makefile.am
+++ b/c/src/lib/libbsp/i386/shared/comm/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/shared/io/Makefile.am b/c/src/lib/libbsp/i386/shared/io/Makefile.am
index 4f8c55b1bd..f3d98b6b1a 100644
--- a/c/src/lib/libbsp/i386/shared/io/Makefile.am
+++ b/c/src/lib/libbsp/i386/shared/io/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/shared/irq/Makefile.am b/c/src/lib/libbsp/i386/shared/irq/Makefile.am
index 2984151f42..26b590d864 100644
--- a/c/src/lib/libbsp/i386/shared/irq/Makefile.am
+++ b/c/src/lib/libbsp/i386/shared/irq/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/shared/pci/Makefile.am b/c/src/lib/libbsp/i386/shared/pci/Makefile.am
index c14031956d..d33cca7737 100644
--- a/c/src/lib/libbsp/i386/shared/pci/Makefile.am
+++ b/c/src/lib/libbsp/i386/shared/pci/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/ts_386ex/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/Makefile.am
index 399e5d6822..7b03a80d2d 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am
index c8a411e6de..131b243ca6 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -19,7 +19,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(clock_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am
index 13810f58b0..4b0c14dbdc 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(console_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(console_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/console/console.c b/c/src/lib/libbsp/i386/ts_386ex/console/console.c
index fc2c1a3062..a798abe932 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/console/console.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/console/console.c
@@ -95,12 +95,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
-void console_reserve_resources(rtems_configuration_table *conf)
-{
- rtems_termios_reserve_resources(conf, 1);
- return;
-}
-
void __assert (const char *file, int line, const char *msg)
{
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
diff --git a/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am
index 78f90cedb4..ef1a5dcf9d 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h b/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h
index 90177de1f6..6baf0f12ba 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h
+++ b/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h
@@ -25,6 +25,15 @@ extern "C" {
#include <clockdrv.h>
#include <bspIo.h>
#include <irq.h>
+
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (8 * 1024)
/*
* Network driver configuration
diff --git a/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am
index b8fef43a99..780cd08f1d 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/network/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am
index 1770aeb84e..80eb714504 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/ts_386ex/start/start.S b/c/src/lib/libbsp/i386/ts_386ex/start/start.S
index 63248b961f..3f167fe9e3 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/start/start.S
+++ b/c/src/lib/libbsp/i386/ts_386ex/start/start.S
@@ -50,7 +50,7 @@
PUBLIC( SYM(_init_i386ex) )
- .section .initial
+ .section .initial, "ax"
/*
* Enable access to peripheral register at expanded I/O addresses
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am
index 539d1eb519..c6fc068e4e 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
index 2db339a2aa..7bc0e70887 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
@@ -101,19 +101,10 @@ void bsp_start( void )
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_table_segment = get_ds();
Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table;
- Cpu_table.interrupt_stack_size = 8192;
- /*
-#if defined(RTEMS_POSIX_API)
- BSP_Configuration.work_space_size *= 3;
-#endif
- */
- BSP_Configuration.work_space_start = (void *)
- RAM_END - BSP_Configuration.work_space_size;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
- /*
- * Account for the console's resources
- */
- console_reserve_resources( &BSP_Configuration );
+ BSP_Configuration.work_space_start = (void *)
+ RAM_END - BSP_Configuration.work_space_size;
/*
* Init rtems_interrupt_management
diff --git a/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am
index b7655da651..66e6f2be37 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,7 +21,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(timer_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am
index 20363ef67b..c6210593d0 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am
@@ -5,19 +5,11 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-noinst_SCRIPTS = \
-coff2bin \
-elf2exe
+noinst_SCRIPTS = coff2bin elf2exe
-SUBDIRS = \
-ts_1325_ada \
-network_ada \
-debug_ada \
-debug_c \
-dos_sup
+SUBDIRS = ts_1325_ada network_ada debug_ada debug_c dos_sup
-EXTRA_DIST = \
-$(noinst_SCRIPTS)
+EXTRA_DIST = $(noinst_SCRIPTS)
include $(top_srcdir)/../../../../../../../automake/subdirs.am
-include $(top_srcdir)/../../../../../../../automake/local.am
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am
index fbd84a542a..3249bd19f7 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/Makefile.am
@@ -4,13 +4,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-Makefile.ts_386ex \
-cmds \
-ddd-rtems \
-debug.adb \
-init.c \
-serial_debug.adb \
-serial_debug.ads
+EXTRA_DIST = Makefile.ts_386ex cmds ddd-rtems debug.adb init.c \
+ serial_debug.adb serial_debug.ads
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/init.c b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/init.c
index 0f52a84156..e63437f46d 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/init.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_ada/init.c
@@ -67,8 +67,8 @@ void *POSIX_Init( void *argument )
/* configuration information */
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am
index 302758aef7..4030cd1680 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/Makefile.am
@@ -4,13 +4,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-cmds \
-ddd-rtems \
-debug_test.c \
-init.c \
-serial_gdb.c \
-serial_gdb.h \
-system.h
+EXTRA_DIST = cmds ddd-rtems debug_test.c init.c serial_gdb.c serial_gdb.h \
+ system.h
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/system.h b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/system.h
index 5417cf8cbc..1ececa4f0d 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/system.h
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/debug_c/system.h
@@ -23,7 +23,7 @@ rtems_task Init(
/* configuration information */
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/Makefile.am
index 94274f2b4e..0ab426e3f7 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/Makefile.am
@@ -4,9 +4,6 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-loader.com \
-loader_hybrid_com.asm \
-ts1325.inc
+EXTRA_DIST = loader.com loader_hybrid_com.asm ts1325.inc
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am
index 92493e4a02..1a03e013ba 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/Makefile.am
@@ -6,9 +6,7 @@ AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = adasockets listener tcprelay
-EXTRA_DIST = \
-README \
-networkconfig.h
+EXTRA_DIST = README networkconfig.h
include $(top_srcdir)/../../../../../../../automake/subdirs.am
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am
index e53f89a255..a852d265b0 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/Makefile.am
@@ -4,21 +4,9 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-AUTHORS \
-COPYING \
-NEWS \
-README \
-sockets-constants.ads \
-sockets-link.ads \
-sockets-multicast.adb \
-sockets-multicast.ads \
-sockets-naming.adb \
-sockets-naming.ads \
-sockets-thin.ads \
-sockets-utils.adb \
-sockets-utils.ads \
-sockets.adb \
-sockets.ads
+EXTRA_DIST = AUTHORS COPYING NEWS README sockets-constants.ads \
+ sockets-link.ads sockets-multicast.adb sockets-multicast.ads \
+ sockets-naming.adb sockets-naming.ads sockets-thin.ads sockets-utils.adb \
+ sockets-utils.ads sockets.adb sockets.ads
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am
index 086f023968..e6125a3c26 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/Makefile.am
@@ -4,9 +4,6 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-Makefile.ts_386ex \
-init.c \
-listener.adb
+EXTRA_DIST = Makefile.ts_386ex init.c listener.adb
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/init.c b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/init.c
index 852a2a962d..7828031b9e 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/init.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/listener/init.c
@@ -71,8 +71,8 @@ void *POSIX_Init( void *argument )
/* configuration information */
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
/*
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am
index fff9bfe048..36f352b936 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/Makefile.am
@@ -4,10 +4,6 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-Makefile.ts_386ex \
-init.c \
-print_error.c \
-tcprelay.adb
+EXTRA_DIST = Makefile.ts_386ex init.c print_error.c tcprelay.adb
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/init.c b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/init.c
index a3d3752568..a9c0da5669 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/init.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/tcprelay/init.c
@@ -73,8 +73,8 @@ void *POSIX_Init( void *argument )
/* configuration information */
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
/*
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/Makefile.am
index 1feed8d727..02a08b60c3 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/Makefile.am
@@ -1,21 +1,11 @@
-##
+##
## $Id$
##
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-Makefile.ts_386ex \
-ts1325-button.adb \
-ts1325-parallel.adb \
-i386_ports.adb \
-ts1325-button.ads \
-ts1325-parallel.ads \
-i386_ports.ads \
-ts1325-led.adb \
-ts1325.ads \
-init.c \
-ts1325-led.ads \
-ts1325_test.adb
+EXTRA_DIST = Makefile.ts_386ex ts1325-button.adb ts1325-parallel.adb \
+ i386_ports.adb ts1325-button.ads ts1325-parallel.ads i386_ports.ads \
+ ts1325-led.adb ts1325.ads init.c ts1325-led.ads ts1325_test.adb
include $(top_srcdir)/../../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/init.c b/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/init.c
index 89e1652f3f..dbe9dbfa21 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/init.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/ts_1325_ada/init.c
@@ -65,11 +65,10 @@ void *POSIX_Init( void *argument )
/* configuration information */
-#define CONFIGURE_SPTEST
#define CONFIGURE_GNAT_RTEMS
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
diff --git a/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am b/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am
index 54941a5a93..0c3d7fa39c 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/i386/ts_386ex/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/Makefile.am b/c/src/lib/libbsp/i960/Makefile.am
index 6e02be9e8e..8515dfe07b 100644
--- a/c/src/lib/libbsp/i960/Makefile.am
+++ b/c/src/lib/libbsp/i960/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i960/cvme961/Makefile.am b/c/src/lib/libbsp/i960/cvme961/Makefile.am
index 68e67cb540..a519d840a1 100644
--- a/c/src/lib/libbsp/i960/cvme961/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i960/cvme961/clock/Makefile.am b/c/src/lib/libbsp/i960/cvme961/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/i960/cvme961/clock/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/console/Makefile.am b/c/src/lib/libbsp/i960/cvme961/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/i960/cvme961/console/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/include/Makefile.am b/c/src/lib/libbsp/i960/cvme961/include/Makefile.am
index 23c4b21b47..1d6c3074ec 100644
--- a/c/src/lib/libbsp/i960/cvme961/include/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/include/bsp.h b/c/src/lib/libbsp/i960/cvme961/include/bsp.h
index e023114c88..e00d525e7b 100644
--- a/c/src/lib/libbsp/i960/cvme961/include/bsp.h
+++ b/c/src/lib/libbsp/i960/cvme961/include/bsp.h
@@ -27,6 +27,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/i960/cvme961/shmsupp/Makefile.am b/c/src/lib/libbsp/i960/cvme961/shmsupp/Makefile.am
index b79ff144a7..f013cd37b0 100644
--- a/c/src/lib/libbsp/i960/cvme961/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/start/Makefile.am b/c/src/lib/libbsp/i960/cvme961/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/i960/cvme961/start/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/startup/Makefile.am b/c/src/lib/libbsp/i960/cvme961/startup/Makefile.am
index fb83483f65..7a31b8edf8 100644
--- a/c/src/lib/libbsp/i960/cvme961/startup/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
index 26a05670c1..7d89f1c09d 100644
--- a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
+++ b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
@@ -107,7 +107,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.Prcb = Prcb;
BSP_Configuration.work_space_start = (void *)
diff --git a/c/src/lib/libbsp/i960/cvme961/timer/Makefile.am b/c/src/lib/libbsp/i960/cvme961/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/i960/cvme961/timer/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/cvme961/wrapup/Makefile.am b/c/src/lib/libbsp/i960/cvme961/wrapup/Makefile.am
index b2106c290f..01c85b4bbc 100644
--- a/c/src/lib/libbsp/i960/cvme961/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/i960/cvme961/wrapup/Makefile.am
@@ -1,11 +1,9 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-BSP_FILES = startup clock console timer
-
if HAS_MP
GENERIC_MP_REL_FILES = shmdr
endif
@@ -14,7 +12,7 @@ GENERIC_FILES += $(GENERIC_MP_REL_FILES)
if HAS_MP
BSP_MP_O_FILES = shmsupp
endif
-BSP_FILES += $(BSP_MP_O_FILES)
+BSP_FILES = startup clock console timer $(BSP_MP_O_FILES)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
diff --git a/c/src/lib/libbsp/i960/rxgen960/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/Makefile.am
index b690f8530a..271e56ff1d 100644
--- a/c/src/lib/libbsp/i960/rxgen960/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i960/rxgen960/bsp_specs b/c/src/lib/libbsp/i960/rxgen960/bsp_specs
index 8373c99db1..d081bbbd9e 100644
--- a/c/src/lib/libbsp/i960/rxgen960/bsp_specs
+++ b/c/src/lib/libbsp/i960/rxgen960/bsp_specs
@@ -8,11 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lc -lrtemsall -lgcc --end-group}
+%{!qrtems: %(old_lib)} \
+%{qrtems: --start-group -lc \
+%{!qrtems_debug: -lrtemsall } %{qrtems_debug: -lrtemsall_g} \
+-lgcc --end-group}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} \
+%{qrtems: %{qrtems_debug: start_g.o%s} %{!qrtems_debug: start.o%s}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -T linkcmds%s -e _start}
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
diff --git a/c/src/lib/libbsp/i960/rxgen960/clock/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/i960/rxgen960/clock/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/rxgen960/console/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/console/Makefile.am
index be4ec2a050..10b41a8864 100644
--- a/c/src/lib/libbsp/i960/rxgen960/console/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/rxgen960/include/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/include/Makefile.am
index 404529129c..da44c1faa9 100644
--- a/c/src/lib/libbsp/i960/rxgen960/include/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/rxgen960/include/bsp.h b/c/src/lib/libbsp/i960/rxgen960/include/bsp.h
index 52f8258010..4256629165 100644
--- a/c/src/lib/libbsp/i960/rxgen960/include/bsp.h
+++ b/c/src/lib/libbsp/i960/rxgen960/include/bsp.h
@@ -27,6 +27,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (8 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/i960/rxgen960/shmsupp/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/shmsupp/Makefile.am
index 8d285b95f4..7e28b30954 100644
--- a/c/src/lib/libbsp/i960/rxgen960/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/rxgen960/startup/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/startup/Makefile.am
index 11a7554242..95071ef9ee 100644
--- a/c/src/lib/libbsp/i960/rxgen960/startup/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/rxgen960/startup/bspstart.c b/c/src/lib/libbsp/i960/rxgen960/startup/bspstart.c
index 00f2b009dc..bc4ddfcff8 100644
--- a/c/src/lib/libbsp/i960/rxgen960/startup/bspstart.c
+++ b/c/src/lib/libbsp/i960/rxgen960/startup/bspstart.c
@@ -132,7 +132,7 @@ bsp_start(void)
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = 8192;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.extra_mpci_receive_server_stack = 0;
Cpu_table.Prcb = Prcb;
@@ -141,29 +141,6 @@ bsp_start(void)
Cpu_table.stack_free_hook = 0;
/*
- * Add 1 region for the RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Add 1 extension for newlib libc
- */
-
-#ifdef RTEMS_NEWLIB
- BSP_Configuration.maximum_extensions++;
-#endif
-
- /*
- * Add another extension if using the stack checker
- */
-
-#ifdef STACK_CHECKER_ON
- BSP_Configuration.maximum_extensions++;
-#endif
-
-
- /*
* Tell libio how many fd's we want and allow it to tweak config
*/
diff --git a/c/src/lib/libbsp/i960/rxgen960/timer/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/timer/Makefile.am
index f4c5b3242a..ceb29504da 100644
--- a/c/src/lib/libbsp/i960/rxgen960/timer/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i960/rxgen960/wrapup/Makefile.am b/c/src/lib/libbsp/i960/rxgen960/wrapup/Makefile.am
index 2152d8ec39..e3dd06fc1e 100644
--- a/c/src/lib/libbsp/i960/rxgen960/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/i960/rxgen960/wrapup/Makefile.am
@@ -1,14 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
-BSP_PIECES = startup clock console timer
-
if HAS_MP
GENERIC_MP_REL_PIECES = shmdr
endif
@@ -17,7 +15,7 @@ GENERIC_PIECES += $(GENERIC_MP_REL_PIECES)
if HAS_MP
BSP_MP_O_PIECES = shmsupp
endif
-BSP_PIECES += $(BSP_MP_O_PIECES)
+BSP_PIECES = startup clock console timer $(BSP_MP_O_PIECES)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
diff --git a/c/src/lib/libbsp/m68k/Makefile.am b/c/src/lib/libbsp/m68k/Makefile.am
index aa7543aa89..b0225d2b1d 100644
--- a/c/src/lib/libbsp/m68k/Makefile.am
+++ b/c/src/lib/libbsp/m68k/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/dmv152/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/Makefile.am
index 06ae4c41ab..02af1cbb18 100644
--- a/c/src/lib/libbsp/m68k/dmv152/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/dmv152/clock/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/dmv152/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/dmv152/console/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/dmv152/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/dmv152/console/console.c b/c/src/lib/libbsp/m68k/dmv152/console/console.c
index 0327a6ddbd..2f8d482007 100644
--- a/c/src/lib/libbsp/m68k/dmv152/console/console.c
+++ b/c/src/lib/libbsp/m68k/dmv152/console/console.c
@@ -128,13 +128,6 @@ int console_write_support (int minor, const char *buf, int len)
return nwrite;
}
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources( configuration, 2 );
-}
-
/*
* Console Device Driver Entry Points
*
diff --git a/c/src/lib/libbsp/m68k/dmv152/include/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/m68k/dmv152/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/dmv152/include/bsp.h b/c/src/lib/libbsp/m68k/dmv152/include/bsp.h
index 20b711b461..bfb1f4d2d9 100644
--- a/c/src/lib/libbsp/m68k/dmv152/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/dmv152/include/bsp.h
@@ -28,6 +28,24 @@ extern "C" {
#include <zilog/z8536.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
+/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/m68k/dmv152/spurious/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/spurious/Makefile.am
index b15b542bff..bfd07bd28e 100644
--- a/c/src/lib/libbsp/m68k/dmv152/spurious/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/spurious/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/dmv152/start/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/dmv152/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.am
index 202c1ce798..ea99713294 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,6 +22,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index 90f171ef0a..8f4b3118b6 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -53,6 +53,10 @@ void bsp_start( void )
int index;
void *vbr;
extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* Monitor Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );
@@ -89,18 +93,12 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
m68k_get_vbr( vbr );
Cpu_table.interrupt_vector_table = vbr;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
- /*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
/* Clock_exit is done as an atexit() function */
}
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/linkcmds b/c/src/lib/libbsp/m68k/dmv152/startup/linkcmds
index 7f92758e77..8edc69ee94 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/linkcmds
@@ -15,6 +15,8 @@
/*
* Declare some sizes.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
@@ -23,9 +25,6 @@ MEMORY
ram : org = 0x0, l = 1M
}
-_RamBase = 0;
-_RamSize = 1M;
-
SECTIONS
{
ram : {
diff --git a/c/src/lib/libbsp/m68k/dmv152/timer/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/dmv152/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/dmv152/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/dmv152/wrapup/Makefile.am
index 192820440e..5b82482da1 100644
--- a/c/src/lib/libbsp/m68k/dmv152/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/dmv152/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/Makefile.am b/c/src/lib/libbsp/m68k/efi332/Makefile.am
index 06ae4c41ab..02af1cbb18 100644
--- a/c/src/lib/libbsp/m68k/efi332/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/efi332/README b/c/src/lib/libbsp/m68k/efi332/README
index 097ce132ad..2ece9ff5bb 100644
--- a/c/src/lib/libbsp/m68k/efi332/README
+++ b/c/src/lib/libbsp/m68k/efi332/README
@@ -4,7 +4,7 @@
Description: efi68k
============
-CPU: MC68332 @16MHz
+CPU: MC68332 @20MHz
RAM: 256k max. (supports several configurations)
ROM: 512k (supports several configurations)
@@ -12,25 +12,18 @@ ROM: 512k (supports several configurations)
Internet subscribes to the mailing list "efi332" (an offshoot of the
"diy_efi" mailing list). Although efi332 was initially designed for
automotive research, it is a fairly generalized embedded controller
-when used without the companion EFI I/O board. It is patterned much after
-the the Motorola BCC but cost on the order of $250US. A 4x3 inch
-(approx.) printed circuit board is available (about $14US). For complete
-information see
+when used without the companion EFI I/O board, and is patterned much
+after the the Motorola BCC. A 4x3 inch (approx.) printed circuit board
+is available (about $14US). For complete information see
+
+ http://www.diy-efi.org
- http://efi332.eng.ohio-state.edu
TODO:
=====
- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
- the interrupt priority and (2) to prevent it from blocking. (high
- priority)
+ the interrupt priority and (2) to prevent it from blocking.
- add a timer driver for the tmtest set.
-- generate include/coverhd.c to perform the tmtest.
-- add separate interrupt stack (low priority... may never happen :).
- John S Gwynne
- Gwynne.1@osu.edu
-_______________________________________________________________________________
- T h e O h i o - S t a t e U n i v e r s i t y
- ElectroScience Laboratory, 1320 Kinnear Road, Columbus, Ohio 43212, USA
- Telephone: (614) 292-7981 * Fax: (614) 292-7297
--------------------------------------------------------------------------------
+
+ John S Gwynne, PhD.
+ jgwynne@mrcday.com
diff --git a/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am b/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/console/Makefile.am b/c/src/lib/libbsp/m68k/efi332/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/efi332/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/include/Makefile.am b/c/src/lib/libbsp/m68k/efi332/include/Makefile.am
index a3a23aef21..550d392e01 100644
--- a/c/src/lib/libbsp/m68k/efi332/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/include/bsp.h b/c/src/lib/libbsp/m68k/efi332/include/bsp.h
index 284d54c27e..c44e1f75fd 100644
--- a/c/src/lib/libbsp/m68k/efi332/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/efi332/include/bsp.h
@@ -28,6 +28,15 @@ extern "C" {
#include <qsm.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
@@ -78,12 +87,9 @@ extern char _edata[];
extern char _clear_start[];
extern char end[];
extern char _copy_data_from_rom[];
-extern char __end_of_ram[];
/* constants */
-#define RAM_END ((int)__end_of_ram)
-
#ifdef __START_C__
#define STACK_SIZE "#0x800"
#else
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/dotests b/c/src/lib/libbsp/m68k/efi332/misc/dotests
index b9449bffc3..f701e01114 100644
--- a/c/src/lib/libbsp/m68k/efi332/misc/dotests
+++ b/c/src/lib/libbsp/m68k/efi332/misc/dotests
@@ -3,13 +3,13 @@
# $Id$
#
-/bin/rm sp* &>/dev/null
-(cd ..; for f in sp*; do cp ${f}/o-efi332/${f}.nxe hold; done)
+mkdir MyTests
+find -name MyTests -prune -or -name "*.nxe" -exec cp {} MyTests \;
-stty 5:0:800008bf:0:0:0:0:0:0:1:1:0:0:0:0:0:0:0:0:0:0:0:0 </dev/cua0
-/bin/cp /dev/cua0 screen &
+stty 1:0:80001cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 </dev/ttyS1
+/bin/cp /dev/ttyS1 screen &
+cpJob=$!
-for f in sp*; do m68k-bdm-coff-gdb ${f} </dev/null; done
+( cd MyTests; for f in *nxe; do m68k-elf-gdb ${f} </dev/null; done )
-kill -9 `ps -efax | grep "/bin/cp /dev/cua0" | sed "/grep/D; s/ .*$//"`
-/bin/rm sp* &>/dev/null
+kill -9 $cpJob
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68 b/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
index 9a104f86d2..b929f5aa20 100644
--- a/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
+++ b/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
@@ -4,7 +4,7 @@
echo Setting up the environment for efi332 debuging.\n
target bdm /dev/pdbdm0
-bdm_setdelay 405
+bdm_setdelay 4
bdm_autoreset on
set remotecache off
bdm_timetocomeup 0
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/interr.c b/c/src/lib/libbsp/m68k/efi332/misc/interr.c
index 245be54032..578ad139c3 100644
--- a/c/src/lib/libbsp/m68k/efi332/misc/interr.c
+++ b/c/src/lib/libbsp/m68k/efi332/misc/interr.c
@@ -83,7 +83,12 @@ void volatile _Internal_error_Occurred(
RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
RAW_PUTS("RTEMS: fatal error ");
RAW_PUTI( the_error );
- RAW_PUTS(".\r\n");
+ RAW_PUTS(" (");
+ outbyte( (char)((the_error>>24) & 0xff) );
+ outbyte( (char)((the_error>>16) & 0xff) );
+ outbyte( (char)((the_error>>8) & 0xff) );
+ outbyte( (char)(the_error & 0xff) );
+ RAW_PUTS(").\r\n");
/* configure peripherals for a safe exit */
bsp_cleanup();
diff --git a/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am b/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am
index b15b542bff..bfd07bd28e 100644
--- a/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/start/Makefile.am b/c/src/lib/libbsp/m68k/efi332/start/Makefile.am
index 945303e33e..9005137d73 100644
--- a/c/src/lib/libbsp/m68k/efi332/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/start/start.c b/c/src/lib/libbsp/m68k/efi332/start/start.c
index 4586a4c089..5394fb279c 100644
--- a/c/src/lib/libbsp/m68k/efi332/start/start.c
+++ b/c/src/lib/libbsp/m68k/efi332/start/start.c
@@ -93,7 +93,7 @@ void dumby_start() {
*CSBAR3 = (unsigned short int)
(((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */
*CSBAR4 = (unsigned short int)
- (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256 bytes located at 0xC0000 */
+ (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */
*CSBAR5 = (unsigned short int)
(0xfff8 | BS_64K); /* AVEC interrupts */
#ifdef EFI332_v040b
@@ -112,10 +112,10 @@ void dumby_start() {
/* see section 7 of the SIM Reference Manual */
#ifdef FLASHWRITE
*CSORBT = (unsigned short int)
- ( BothBytes | ReadWrite | SyncAS | WaitStates_2 | UserSupSpace );
+ ( BothBytes | ReadWrite | SyncAS | WaitStates_0 | UserSupSpace );
#else /* FLASHWRITE */
*CSORBT = (unsigned short int)
- ( BothBytes | ReadOnly | SyncAS | WaitStates_2 | UserSupSpace );
+ ( BothBytes | ReadOnly | SyncAS | WaitStates_0 | UserSupSpace );
#endif /* FLASHWRITE */
*CSOR0 = (unsigned short int)
( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am b/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am
index 2eb13ab2a0..1801ae3072 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -24,6 +24,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
@@ -33,7 +36,8 @@ $(PROJECT_RELEASE)/lib/linkcmds: linkcmds
$(PROJECT_RELEASE)/lib/linkcmds_ROM: linkcmds_ROM
$(INSTALL_DATA) $< $@
-$(PROJECT_RELEASE)/lib/except_vect_332_ROM$(LIB_VARIANT).o: $(ARCH)/except_vect_332_ROM.o
+$(PROJECT_RELEASE)/lib/except_vect_332_ROM$(LIB_VARIANT).o: \
+ $(ARCH)/except_vect_332_ROM.o
$(INSTALL_DATA) $< $@
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
index 765b26c902..b50dd710a1 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
@@ -50,6 +50,10 @@ void bsp_start( void )
{
void *vbr;
extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* we only use a hook to get the C library initialized.
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S b/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S
index 0e5e11c085..9eb2f20556 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S
+++ b/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S
@@ -11,7 +11,7 @@
will have priority. */
/* Vector 0: RESET: Initial SSP */
- .long __end_of_ram
+ .long _RamEnd
/* Vector 1: RESET: Initial PC */
.long start
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds
index 6ac7ee77a4..849c8692fa 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds
@@ -33,6 +33,9 @@ __DYNAMIC = 0;
/*
* Declare some sizes.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 0x80000;
+_RamEnd = _RamBase + _RamSize;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
@@ -41,10 +44,6 @@ MEMORY
ram : ORIGIN = 0x80000, LENGTH = 512K
}
-_RamBase = 0x80000;
-_RamSize = 0x80000;
-
-__end_of_ram = 0x100000;
_copy_data_from_rom = 0;
/*
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
index b4f3bf70b1..acfee4c07f 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
+++ b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
@@ -43,6 +43,8 @@ MEMORY
ram : ORIGIN = 0x80000, LENGTH = 512K
}
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x080000;
+
__end_of_ram = 0x100000;
_copy_data_from_rom = 1;
diff --git a/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am b/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am
index 192820440e..5b82482da1 100644
--- a/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/Makefile.am
index 06ae4c41ab..02af1cbb18 100644
--- a/c/src/lib/libbsp/m68k/efi68k/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/efi68k/clock/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/efi68k/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/console/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/efi68k/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/include/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/include/Makefile.am
index e3c2a73f91..74f64dafcb 100644
--- a/c/src/lib/libbsp/m68k/efi68k/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/include/bsp.h b/c/src/lib/libbsp/m68k/efi68k/include/bsp.h
index b222fa5128..362403d54c 100644
--- a/c/src/lib/libbsp/m68k/efi68k/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/efi68k/include/bsp.h
@@ -28,6 +28,15 @@ extern "C" {
#include <16550.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/m68k/efi68k/spurious/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/spurious/Makefile.am
index b15b542bff..bfd07bd28e 100644
--- a/c/src/lib/libbsp/m68k/efi68k/spurious/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/spurious/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/start/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/start/Makefile.am
index 945303e33e..9005137d73 100644
--- a/c/src/lib/libbsp/m68k/efi68k/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.am
index 8b73605c33..32a2ab505a 100644
--- a/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,6 +22,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
index 180f3db116..69f57565c1 100644
--- a/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
@@ -53,8 +53,12 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
- void *vbr;
- extern void *_WorkspaceBase;
+ void *vbr;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/* set_debug_traps(); */
/* breakpoint(); */
diff --git a/c/src/lib/libbsp/m68k/efi68k/startup/linkcmds b/c/src/lib/libbsp/m68k/efi68k/startup/linkcmds
index c174c3f4c8..4830c948d7 100644
--- a/c/src/lib/libbsp/m68k/efi68k/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/efi68k/startup/linkcmds
@@ -42,9 +42,6 @@ MEMORY
ram : ORIGIN = 0x203000, LENGTH = 256K
}
-_RamBase = 0x200000;
-_RamSize = 256K;
-
_VBR = 0x200000; /* location of the VBR table (in RAM) */
__end_of_ram = 0x240000;
_copy_data_from_rom = 0;
@@ -52,6 +49,8 @@ _copy_data_from_rom = 0;
/*
* Declare some sizes.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x200000;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 256K;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/efi68k/timer/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/m68k/efi68k/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi68k/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/efi68k/wrapup/Makefile.am
index 192820440e..5b82482da1 100644
--- a/c/src/lib/libbsp/m68k/efi68k/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi68k/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68302/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/Makefile.am
index 487cec1fb5..06d6ecdaeb 100644
--- a/c/src/lib/libbsp/m68k/gen68302/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/gen68302/clock/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/gen68302/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68302/console/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/gen68302/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68302/include/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/m68k/gen68302/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68302/include/bsp.h b/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
index 10878fe165..0ea40ecb8b 100644
--- a/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68302/include/bsp.h
@@ -27,6 +27,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/m68k/gen68302/start/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/m68k/gen68302/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.am
index 52352e3b7b..df42506bbb 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,6 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index a33ef2bbf8..50dae413e1 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -49,7 +49,12 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
- extern void *_WorkspaceBase;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* Allocate the memory for the RTEMS Work Space. This can come from
@@ -76,5 +81,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
}
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
index 99d0f27cac..64bbcad42f 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
@@ -17,15 +17,14 @@ MEMORY
ram : org = 0x0000, l = 16M
}
-_RamBase = 0;
-_RamSize = 16M;
-
m302 = 0xf7f000;
_VBR = 0x000000; /* location of the VBR table (in RAM) */
/*
* Declare some sizes.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 16M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/gen68302/timer/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/gen68302/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68302/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/gen68302/wrapup/Makefile.am
index 0a9f963995..cd855d70eb 100644
--- a/c/src/lib/libbsp/m68k/gen68302/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68302/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68340/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/Makefile.am
index 487cec1fb5..06d6ecdaeb 100644
--- a/c/src/lib/libbsp/m68k/gen68340/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/gen68340/clock/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/gen68340/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68340/console/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/console/Makefile.am
index 460f87b67e..ea3e69cd4c 100644
--- a/c/src/lib/libbsp/m68k/gen68340/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68340/console/console.c b/c/src/lib/libbsp/m68k/gen68340/console/console.c
index 234060e0da..4b519c226d 100644
--- a/c/src/lib/libbsp/m68k/gen68340/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68340/console/console.c
@@ -523,19 +523,6 @@ SetAttributes (int minor, const struct termios *t)
}
/******************************************************
- Name: console_reserve_resources
- Input parameters: -
- Output parameters: -
- Description: Reserve resources consumed by this driver
- *****************************************************/
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources (configuration, 1);
-}
-
-/******************************************************
Name: console_initialize
Input parameters: MAJOR # of console_driver,
minor is always 0,
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/include/Makefile.am
index 707d2fde19..8bf11a4ce6 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
index e353253b15..657b3d5a48 100644
--- a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h
@@ -30,6 +30,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/m68k/gen68340/start/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/start/Makefile.am
index d5a9ad6741..c91ab5d3a9 100644
--- a/c/src/lib/libbsp/m68k/gen68340/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.am
index 59645567f6..0808e981d9 100644
--- a/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,6 +22,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c
index 23f5a13bf5..a9e6823ef5 100644
--- a/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c
@@ -54,7 +54,11 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
- extern void *_WorkspaceBase;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* Allocate the memory for the RTEMS Work Space. This can come from
@@ -76,17 +80,11 @@ void bsp_start( void )
BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
/*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
- /*
* initialize the CPU table for this BSP
*/
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
}
diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68340/startup/linkcmds
index 297579ce25..e49ec2ec39 100644
--- a/c/src/lib/libbsp/m68k/gen68340/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/gen68340/startup/linkcmds
@@ -20,7 +20,7 @@
/*
* Declare some sizes.
*/
-_RamBase = 0x10000000;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x10000000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/gen68340/timer/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/m68k/gen68340/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68340/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/wrapup/Makefile.am
index 9ea62060a3..1db35832b2 100644
--- a/c/src/lib/libbsp/m68k/gen68340/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -8,8 +8,7 @@ BSP_PIECES = startup clock console timer
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(wildcard \
- ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
+ $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
LIB = $(ARCH)/libbsp.a
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
diff --git a/c/src/lib/libbsp/m68k/gen68360/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
index b3f8cceb8a..465ec8cdd4 100644
--- a/c/src/lib/libbsp/m68k/gen68360/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
@@ -8,12 +8,7 @@ ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-if HAS_NETWORKING
-NETWORKING_DRIVER = network
-endif
-
-SUBDIRS = . include start startup clock console timer $(NETWORKING_DRIVER) \
- wrapup
+SUBDIRS = . include start startup clock console timer network wrapup
include $(top_srcdir)/../../bsp.am
diff --git a/c/src/lib/libbsp/m68k/gen68360/clock/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/gen68360/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68360/console/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/console/Makefile.am
index 5b70bbba23..f4a5b22b6e 100644
--- a/c/src/lib/libbsp/m68k/gen68360/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c b/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c
index bd9fbcde6b..37ef74bc27 100644
--- a/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c
+++ b/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c
@@ -27,12 +27,4 @@
#include <rtems/libio.h>
#include "m68360.h"
-/*
- * Reserve resources consumed by this driver
- */
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources (configuration, 1);
-}
+int _console_reserve_resources_removed;
diff --git a/c/src/lib/libbsp/m68k/gen68360/include/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/m68k/gen68360/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
index e54ed3ffff..01a44c9202 100644
--- a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
@@ -36,6 +36,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Network driver configuration
*/
struct rtems_bsdnet_ifconfig;
diff --git a/c/src/lib/libbsp/m68k/gen68360/network/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/network/Makefile.am
index f5371f1f95..b7b337a83e 100644
--- a/c/src/lib/libbsp/m68k/gen68360/network/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/network/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -8,7 +8,7 @@ PGM = $(ARCH)/network.rel
C_FILES = network.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
+
OBJS = $(C_O_FILES)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
diff --git a/c/src/lib/libbsp/m68k/gen68360/network/network.c b/c/src/lib/libbsp/m68k/gen68360/network/network.c
index 7dc4f4a73f..8364dbbf07 100644
--- a/c/src/lib/libbsp/m68k/gen68360/network/network.c
+++ b/c/src/lib/libbsp/m68k/gen68360/network/network.c
@@ -99,6 +99,9 @@ struct scc_softc {
unsigned long txUnderrun;
unsigned long txLostCarrier;
unsigned long txRawWait;
+ unsigned long txCoalesced;
+ unsigned long txCoalesceFailed;
+ unsigned long txRetry;
};
static struct scc_softc scc_softc[NSCCDRIVER];
@@ -344,81 +347,78 @@ m360Enet_retire_tx_bd (struct scc_softc *sc)
int i;
int nRetired;
struct mbuf *m, *n;
+ int retries = 0;
+ int saveStatus = 0;
i = sc->txBdTail;
nRetired = 0;
while ((sc->txBdActiveCount != 0)
&& (((status = (sc->txBdBase + i)->status) & M360_BD_READY) == 0)) {
/*
- * See if anything went wrong
+ * Check for errors which stop the transmitter.
*/
- if (status & (M360_BD_DEFER |
- M360_BD_HEARTBEAT |
- M360_BD_LATE_COLLISION |
+ if (status & (M360_BD_LATE_COLLISION |
M360_BD_RETRY_LIMIT |
- M360_BD_UNDERRUN |
- M360_BD_CARRIER_LOST)) {
+ M360_BD_UNDERRUN)) {
+ int j;
+
+ if (status & M360_BD_LATE_COLLISION)
+ sc->txLateCollision++;
+ if (status & M360_BD_RETRY_LIMIT)
+ sc->txRetryLimit++;
+ if (status & M360_BD_UNDERRUN)
+ sc->txUnderrun++;
+
/*
- * Check for errors which stop the transmitter.
+ * Reenable buffer descriptors
*/
- if (status & (M360_BD_LATE_COLLISION |
- M360_BD_RETRY_LIMIT |
- M360_BD_UNDERRUN)) {
- int j;
-
- if (status & M360_BD_LATE_COLLISION)
- scc_softc[0].txLateCollision++;
- if (status & M360_BD_RETRY_LIMIT)
- scc_softc[0].txRetryLimit++;
- if (status & M360_BD_UNDERRUN)
- scc_softc[0].txUnderrun++;
-
- /*
- * Reenable buffer descriptors
- */
- j = sc->txBdTail;
- for (;;) {
- status = (sc->txBdBase + j)->status;
- if (status & M360_BD_READY)
- break;
- (sc->txBdBase + j)->status = M360_BD_READY |
- (status & (M360_BD_PAD |
- M360_BD_WRAP |
- M360_BD_INTERRUPT |
- M360_BD_LAST |
- M360_BD_TX_CRC));
- if (status & M360_BD_LAST)
- break;
- if (++j == sc->txBdCount)
- j = 0;
- }
+ j = sc->txBdTail;
+ for (;;) {
+ status = (sc->txBdBase + j)->status;
+ if (status & M360_BD_READY)
+ break;
+ (sc->txBdBase + j)->status = M360_BD_READY |
+ (status & (M360_BD_PAD |
+ M360_BD_WRAP |
+ M360_BD_INTERRUPT |
+ M360_BD_LAST |
+ M360_BD_TX_CRC));
+ if (status & M360_BD_LAST)
+ break;
+ if (++j == sc->txBdCount)
+ j = 0;
+ }
- /*
- * Move transmitter back to the first
- * buffer descriptor in the frame.
- */
- m360.scc1p._tbptr = m360.scc1p.tbase +
- sc->txBdTail * sizeof (m360BufferDescriptor_t);
+ /*
+ * Move transmitter back to the first
+ * buffer descriptor in the frame.
+ */
+ m360.scc1p._tbptr = m360.scc1p.tbase +
+ sc->txBdTail * sizeof (m360BufferDescriptor_t);
- /*
- * Restart the transmitter
- */
- M360ExecuteRISC (M360_CR_OP_RESTART_TX | M360_CR_CHAN_SCC1);
- continue;
- }
- if (status & M360_BD_DEFER)
- scc_softc[0].txDeferred++;
- if (status & M360_BD_HEARTBEAT)
- scc_softc[0].txHeartbeat++;
- if (status & M360_BD_CARRIER_LOST)
- scc_softc[0].txLostCarrier++;
+ /*
+ * Restart the transmitter
+ */
+ M360ExecuteRISC (M360_CR_OP_RESTART_TX | M360_CR_CHAN_SCC1);
+ continue;
}
+ saveStatus |= status;
+ retries += (status >> 2) & 0xF;
nRetired++;
if (status & M360_BD_LAST) {
/*
* A full frame has been transmitted.
* Free all the associated buffer descriptors.
*/
+ if (saveStatus & M360_BD_DEFER)
+ sc->txDeferred++;
+ if (saveStatus & M360_BD_HEARTBEAT)
+ sc->txHeartbeat++;
+ if (saveStatus & M360_BD_CARRIER_LOST)
+ sc->txLostCarrier++;
+ saveStatus = 0;
+ sc->txRetry += retries;
+ retries = 0;
sc->txBdActiveCount -= nRetired;
while (nRetired) {
nRetired--;
@@ -601,6 +601,74 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
txBd = firstTxBd = sc->txBdBase + sc->txBdHead;
while (m) {
/*
+ * There are more mbufs in the packet than there
+ * are transmit buffer descriptors.
+ * Coalesce into a single buffer.
+ */
+ if (nAdded == sc->txBdCount) {
+ struct mbuf *nm;
+ int j;
+ char *dest;
+
+ /*
+ * Get the pointer to the first mbuf of the packet
+ */
+ if (sc->txBdTail != sc->txBdHead)
+ rtems_panic ("sendpacket coalesce");
+ m = sc->txMbuf[sc->txBdTail];
+
+ /*
+ * Rescind the buffer descriptor READY bits
+ */
+ for (j = 0 ; j < sc->txBdCount ; j++)
+ (sc->txBdBase + j)->status = 0;
+
+ /*
+ * Allocate an mbuf cluster
+ * Toss the packet if allocation fails
+ */
+ MGETHDR (nm, M_DONTWAIT, MT_DATA);
+ if (nm == NULL) {
+ sc->txCoalesceFailed++;
+ m_freem (m);
+ return;
+ }
+ MCLGET (nm, M_DONTWAIT);
+ if (nm->m_ext.ext_buf == NULL) {
+ sc->txCoalesceFailed++;
+ m_freem (m);
+ m_free (nm);
+ return;
+ }
+ nm->m_pkthdr = m->m_pkthdr;
+ nm->m_len = nm->m_pkthdr.len;
+
+ /*
+ * Copy data from packet chain to mbuf cluster
+ */
+ sc->txCoalesced++;
+ dest = nm->m_ext.ext_buf;
+ while (m) {
+ struct mbuf *n;
+
+ if (m->m_len) {
+ memcpy (dest, mtod(m, caddr_t), m->m_len);
+ dest += m->m_len;
+ }
+ MFREE (m, n);
+ m = n;
+ }
+
+ /*
+ * Redo the send with the new mbuf cluster
+ */
+ m = nm;
+ nAdded = 0;
+ status = 0;
+ continue;
+ }
+
+ /*
* Wait for buffer descriptor to become available.
*/
if ((sc->txBdActiveCount + nAdded) == sc->txBdCount) {
@@ -815,7 +883,10 @@ scc_stats (struct scc_softc *sc)
printf ("Retransmit Limit:%-8lu", sc->txRetryLimit);
printf (" Late Collision:%-8lu\n", sc->txLateCollision);
printf (" Underrun:%-8lu", sc->txUnderrun);
- printf (" Raw output wait:%-8lu\n", sc->txRawWait);
+ printf (" Raw output wait:%-8lu", sc->txRawWait);
+ printf (" Coalesced:%-8lu\n", sc->txCoalesced);
+ printf (" Coalesce failed:%-8lu", sc->txCoalesceFailed);
+ printf (" Retries:%-8lu\n", sc->txRetry);
}
/*
diff --git a/c/src/lib/libbsp/m68k/gen68360/start/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/m68k/gen68360/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68360/start/start.S b/c/src/lib/libbsp/m68k/gen68360/start/start.S
index c5f76ec803..50522e35e3 100644
--- a/c/src/lib/libbsp/m68k/gen68360/start/start.S
+++ b/c/src/lib/libbsp/m68k/gen68360/start/start.S
@@ -392,7 +392,7 @@ ZEROLOOPTEST:
cmpl a1,a0 | Done?
bcs.s ZEROLOOP | No, skip
- movel 4(a7),_RamSize | Set RAM size
+ movel 4(a7),_M68k_Ramsize | Set RAM size
movel #_stack_init,a7 | set master stack pointer
pea env | envp
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am
index c10a8eb294..a62478be87 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,6 +22,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
AM_CPPFLAGS += -DUSE_INIT_FINI
$(PGM): $(OBJS)
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
index 9279cf6cd1..e129f2279e 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
@@ -28,8 +28,6 @@
extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration;
-unsigned long _RamSize;
-
rtems_cpu_table Cpu_table;
char *rtems_progname;
@@ -51,6 +49,13 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
extern void *_WorkspaceBase;
+
+ /*
+ * _M68k_Ramsize is the amount of RAM on this board and
+ * is set by many m68k BSPs at this point. With this
+ * BSP, it is dynamically set in start.S.
+ */
+
/*
* Allocate the memory for the RTEMS Work Space. This can come from
@@ -69,17 +74,11 @@ void bsp_start( void )
BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
/*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
- /*
* initialize the CPU table for this BSP
*/
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
}
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
index 8a68524766..522a8fdd5d 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
@@ -347,6 +347,7 @@ void _Init68360 (void)
* But uses SRAM instead of DRAM *
* CS0* - 512kx8 flash memory *
* CS1* - 512kx32 static RAM *
+ * CS2* - 512kx32 static RAM *
***************************************************
*/
@@ -418,12 +419,16 @@ void _Init68360 (void)
/*
* Step 12: Set up main memory
* 512Kx32 SRAM on CS1*
+ * 512Kx32 SRAM on CS2*
* 0 wait states
*/
- ramSize = 1 * 1024 * 1024;
+ ramSize = 4 * 1024 * 1024;
m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
m360.memc[1].or = M360_MEMC_OR_WAITS(0) | M360_MEMC_OR_2MB |
M360_MEMC_OR_32BIT;
+ m360.memc[2].br = ((unsigned long)&_RamBase + 0x200000) | M360_MEMC_BR_V;
+ m360.memc[2].or = M360_MEMC_OR_WAITS(0) | M360_MEMC_OR_2MB |
+ M360_MEMC_OR_32BIT;
/*
* Step 13: Copy the exception vector table to system RAM
*/
@@ -463,12 +468,6 @@ void _Init68360 (void)
* SIM60 interrupt sources higher priority than CPM
*/
m360.mcr = 0x4C7F;
- * No show cycles
- * User/supervisor access
- * Bus clear interrupt service level 7
- * SIM60 interrupt sources higher priority than CPM
- */
- m360.mcr = 0x4C7F;
#else
/*
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
index 39f4c8dbd3..fcc3b0b694 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
@@ -15,6 +15,8 @@
* Declare some sizes.
* A heap size of 0 means `use all available memory for the heap'.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 64M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
index 74e339717b..455d5710da 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
@@ -19,6 +19,8 @@
* Declare some sizes.
* A heap size of 0 means `use all available memory for the heap'.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 64M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
index 39ab48d096..dae2d98f47 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
@@ -19,6 +19,8 @@
* Declare some sizes.
* A heap size of 0 means `use all available memory for the heap'.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 64M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/gen68360/timer/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/m68k/gen68360/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/gen68360/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/wrapup/Makefile.am
index e439ed658c..b1637c8e91 100644
--- a/c/src/lib/libbsp/m68k/gen68360/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -13,8 +13,7 @@ BSP_PIECES = startup clock console timer $(NETWORKING_DRIVER)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(wildcard \
- ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
+ $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
LIB = $(ARCH)/libbsp.a
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
diff --git a/c/src/lib/libbsp/m68k/idp/Makefile.am b/c/src/lib/libbsp/m68k/idp/Makefile.am
index 487cec1fb5..06d6ecdaeb 100644
--- a/c/src/lib/libbsp/m68k/idp/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/idp/clock/Makefile.am b/c/src/lib/libbsp/m68k/idp/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/idp/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/idp/console/Makefile.am b/c/src/lib/libbsp/m68k/idp/console/Makefile.am
index 78f59eea9a..532b42606c 100644
--- a/c/src/lib/libbsp/m68k/idp/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/idp/include/Makefile.am b/c/src/lib/libbsp/m68k/idp/include/Makefile.am
index 5a7934270d..bc3c519d5b 100644
--- a/c/src/lib/libbsp/m68k/idp/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/idp/include/bsp.h b/c/src/lib/libbsp/m68k/idp/include/bsp.h
index 25dcfd5def..c97e06d89e 100644
--- a/c/src/lib/libbsp/m68k/idp/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/idp/include/bsp.h
@@ -14,6 +14,15 @@
#include <motorola/mc68230.h>
#include <motorola/mc68681.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
#define DUART_ADDR 0xb00003 /* base address of the MC68681 DUART */
/*
diff --git a/c/src/lib/libbsp/m68k/idp/start/Makefile.am b/c/src/lib/libbsp/m68k/idp/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/idp/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/idp/startup/Makefile.am b/c/src/lib/libbsp/m68k/idp/startup/Makefile.am
index 404b5a8e58..efcdfb321a 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,6 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
index 877fd1d053..867090700b 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
@@ -58,7 +58,11 @@ void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;
int index;
- extern void *_WorkspaceBase;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
duart_base = (unsigned char *)DUART_ADDR;
@@ -95,7 +99,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
diff --git a/c/src/lib/libbsp/m68k/idp/startup/linkcmds b/c/src/lib/libbsp/m68k/idp/startup/linkcmds
index 9eadcedcda..556f7c1050 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/idp/startup/linkcmds
@@ -20,7 +20,7 @@ MEMORY
/*
* Declare some sizes.
*/
-_RamBase = 0x0;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 2M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/idp/timer/Makefile.am b/c/src/lib/libbsp/m68k/idp/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/idp/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/idp/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/idp/wrapup/Makefile.am
index 0a9f963995..cd855d70eb 100644
--- a/c/src/lib/libbsp/m68k/idp/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/idp/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/Makefile.am
index f487dfdedd..1ed23823a9 100644
--- a/c/src/lib/libbsp/m68k/mvme136/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/mvme136/clock/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/mvme136/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/console/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/mvme136/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/include/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/m68k/mvme136/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/include/bsp.h b/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
index 02405dff46..9584b24eb7 100644
--- a/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme136/include/bsp.h
@@ -25,6 +25,15 @@ extern "C" {
#include <iosupp.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am
index e115697f7e..8965374ec1 100644
--- a/c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/start/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/mvme136/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.am
index 52352e3b7b..df42506bbb 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,6 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
index 79089b356c..9818739c0f 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
@@ -52,7 +52,11 @@ void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;
int index;
- extern void *_WorkspaceBase;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );
@@ -78,7 +82,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
}
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme136/startup/linkcmds
index 67101dcd32..8aec416acb 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/linkcmds
@@ -15,7 +15,7 @@
/*
* Declare some sizes.
*/
-_RamBase = 0x0;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/mvme136/timer/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/mvme136/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme136/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/mvme136/wrapup/Makefile.am
index 2152d8ec39..e3dd06fc1e 100644
--- a/c/src/lib/libbsp/m68k/mvme136/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme136/wrapup/Makefile.am
@@ -1,14 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
-BSP_PIECES = startup clock console timer
-
if HAS_MP
GENERIC_MP_REL_PIECES = shmdr
endif
@@ -17,7 +15,7 @@ GENERIC_PIECES += $(GENERIC_MP_REL_PIECES)
if HAS_MP
BSP_MP_O_PIECES = shmsupp
endif
-BSP_PIECES += $(BSP_MP_O_PIECES)
+BSP_PIECES = startup clock console timer $(BSP_MP_O_PIECES)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
diff --git a/c/src/lib/libbsp/m68k/mvme147/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/Makefile.am
index 487cec1fb5..06d6ecdaeb 100644
--- a/c/src/lib/libbsp/m68k/mvme147/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/mvme147/clock/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/mvme147/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147/console/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/mvme147/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147/include/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/m68k/mvme147/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
index b9f15b35fb..816e71e3b7 100644
--- a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h
@@ -28,6 +28,15 @@ extern "C" {
#include <console.h>
#include <iosupp.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
/* Constants */
#define RAM_START 0x00005000
diff --git a/c/src/lib/libbsp/m68k/mvme147/start/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/mvme147/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.am
index 52352e3b7b..df42506bbb 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,6 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
index 99fc20928d..f1b0dd3bb3 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
@@ -55,7 +55,11 @@ void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;
int index;
- extern void *_WorkspaceBase;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );
@@ -84,7 +88,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
}
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme147/startup/linkcmds
index c40af97d9d..9cb451e98b 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/linkcmds
@@ -19,7 +19,7 @@
/*
* Declare some sizes.
*/
-_RamBase = 0x0;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/mvme147/timer/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/mvme147/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/wrapup/Makefile.am
index 0a9f963995..cd855d70eb 100644
--- a/c/src/lib/libbsp/m68k/mvme147/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
index 91691039af..8a6b3dd869 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/mvme147s/clock/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/clock/Makefile.am
index b0ab78c06d..11c7977842 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/console/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/console/Makefile.am
index 985a394056..2c2152a8b8 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/include/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
index 3a7d84e73a..c492535433 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
@@ -28,6 +28,15 @@ extern "C" {
#include <console.h>
#include <iosupp.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
/* Constants */
#define RAM_START 0x00007000
diff --git a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/Makefile.am
index e115697f7e..8965374ec1 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/start/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.am
index 6462e153e7..12a12de408 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.am
@@ -1,11 +1,10 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-VPATH = \
- @srcdir@:@srcdir@/../../mvme147/startup:@srcdir@/../../shared:@srcdir@/../../../shared
+VPATH = @srcdir@:@srcdir@/../../mvme147/startup:@srcdir@/../../shared:@srcdir@/../../../shared
PGM = $(ARCH)/startup.rel
@@ -22,6 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
index aa1b6c61ca..9306768e5c 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
@@ -53,10 +53,14 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
- m68k_isr_entry *monitors_vector_table;
- int index;
- rtems_unsigned8 node_number;
- extern void *_WorkspaceBase;
+ m68k_isr_entry *monitors_vector_table;
+ int index;
+ rtems_unsigned8 node_number;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* 147Bug Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );
@@ -144,7 +148,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
}
diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds
index e752b5b33e..41d26d7508 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds
@@ -19,7 +19,7 @@
/*
* Declare some sizes.
*/
-_RamBase = 0x0;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/mvme147s/timer/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/timer/Makefile.am
index 53db3601a9..624d07fcf5 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme147s/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/wrapup/Makefile.am
index 2152d8ec39..e3dd06fc1e 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/wrapup/Makefile.am
@@ -1,14 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
-BSP_PIECES = startup clock console timer
-
if HAS_MP
GENERIC_MP_REL_PIECES = shmdr
endif
@@ -17,7 +15,7 @@ GENERIC_PIECES += $(GENERIC_MP_REL_PIECES)
if HAS_MP
BSP_MP_O_PIECES = shmsupp
endif
-BSP_PIECES += $(BSP_MP_O_PIECES)
+BSP_PIECES = startup clock console timer $(BSP_MP_O_PIECES)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
diff --git a/c/src/lib/libbsp/m68k/mvme162/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/Makefile.am
index 5f68ea75e6..3356a831a1 100644
--- a/c/src/lib/libbsp/m68k/mvme162/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/mvme162/clock/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/mvme162/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/console/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/mvme162/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/consolex/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/consolex/Makefile.am
index 7214d33b0e..b554eac753 100644
--- a/c/src/lib/libbsp/m68k/mvme162/consolex/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/consolex/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/include/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/include/Makefile.am
index d1888e75e8..6be4387768 100644
--- a/c/src/lib/libbsp/m68k/mvme162/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
index 68fc8cd634..3314f291f5 100644
--- a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h
@@ -32,6 +32,15 @@ extern "C" {
#include <iosupp.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Following defines must reflect the setup of the particular MVME162
*/
diff --git a/c/src/lib/libbsp/m68k/mvme162/start/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/mvme162/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.am
index 3fec4de662..998fb2647a 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,6 +22,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
index bd66195bc8..20ccd96dfc 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
@@ -57,9 +57,13 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
- m68k_isr_entry *monitors_vector_table;
- int index;
- extern void *_WorkspaceBase;
+ m68k_isr_entry *monitors_vector_table;
+ int index;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* 162Bug Vectors are at 0xFFE00000
@@ -102,7 +106,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
}
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme162/startup/linkcmds
index 8f8c639790..60a3726f67 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/linkcmds
@@ -22,7 +22,7 @@
/*
* Declare some sizes.
*/
-_RamBase = 0x100000;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x100000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/mvme162/timer/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/mvme162/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/tod/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/tod/Makefile.am
index a21076df11..dd13da9f5c 100644
--- a/c/src/lib/libbsp/m68k/mvme162/tod/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/tod/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme162/tools/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/tools/Makefile.am
index ddeb10f584..3eb08bee2d 100644
--- a/c/src/lib/libbsp/m68k/mvme162/tools/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/tools/Makefile.am
@@ -5,7 +5,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-noinst_PROGRAMS=sload
+noinst_PROGRAMS = sload
sload_SOURCES = sload.c
@@ -14,4 +14,4 @@ install-exec-local: $(PROGRAMS)
$(mkinstalldirs) $(PROJECT_ROOT)/mvme162/bin
$(INSTALL_PROGRAM) $(PROGRAMS) $(PROJECT_ROOT)/mvme162/bin
-include $(top_srcdir)/../../../../../../../automake/local.am
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile.am
index 813d411ac1..57a8214873 100644
--- a/c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -9,9 +9,7 @@ BSP_PIECES = startup clock console timer tod
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
$(wildcard ../consolex/$(ARCH)/consolex.rel) \
- $(wildcard \
- ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
-
+ $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
LIB = $(ARCH)/libbsp.a
diff --git a/c/src/lib/libbsp/m68k/mvme167/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/Makefile.am
index 070a8cafeb..5e3a858d5c 100644
--- a/c/src/lib/libbsp/m68k/mvme167/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/Makefile.am
@@ -1,13 +1,14 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUBDIRS = . include start startup clock console fatal timer wrapup
+
+SUBDIRS = . include start startup clock console fatal timer network wrapup
include $(top_srcdir)/../../bsp.am
diff --git a/c/src/lib/libbsp/m68k/mvme167/README b/c/src/lib/libbsp/m68k/mvme167/README
index aa7e4291ae..dc72a6fc48 100644
--- a/c/src/lib/libbsp/m68k/mvme167/README
+++ b/c/src/lib/libbsp/m68k/mvme167/README
@@ -2,18 +2,35 @@
# $Id$
#
-This is a README file for the MVME167 port of RTEMS 4.0.0.
+This is a README file for the MVME167 port of RTEMS 4.5.0.
Please send any comments, improvements, or bug reports to:
Charles-Antoine Gauthier
+charles.gauthier@nrc.ca
+or
+
+Darlene Stewart
+Darlene.Stewart@nrc.ca
+
Software Engineering Group
Institute for Information Technology
National Research Council of Canada
Ottawa, ON, K1A 0R6
Canada
-charles.gauthier@iit.nrc.ca
+
+WARNING:
+--------
+
+The network driver is currently being worked on. It is somewhat functional,
+but it does run out of buffers under certain conditions. The code is
+also undergoing a substantial reorganization. Before making any changes,
+you should check with us for the availability of updates.
+
+Note from Joel: The ttcp performance reported is very nice even if the
+driver is still early in its life. :)
+
Disclaimer
@@ -43,15 +60,15 @@ Installation
Nothing unique to the MVME167. It uses the standard build process for
m68k targets. You will need to edit linkcmds to put in the start address
of your board. We do TFTP transfers to our target. The mvme167.cfg file
-builds only the coff images, which we download to the target, skipping over
-the first 0xA8 bytes; Motorola S-records are not generated. Edit this file
-if you want S-records.
+builds only the ELF images, which we download to the target, skipping
+over the first 0x54 bytes; Motorola S-records are not generated. Edit
+this file if you want S-records.
Port Description
Console driver
-----------------
+---------------
This BSP includes an termios-capable console driver that supports all
four serial ports on the MVME167 model. The RTEMS console, /dev/console,
@@ -60,27 +77,30 @@ corresponds to channel 1 in the CD2401. This corresponds to Serial Port
do not open /dev/tty00 if you are debugging using 167Bug.
The console is initialized with whatever parameters are set up in termios
-before it calls the firtOpen driver callback, EXCEPT THAT HARDWARE HANDSHAKING
-IS TURNED OFF, i.e. CLOCAL is set in the struct termios c_cflag field. We use
-3-wire cables for I/O, and find hardware handshaking a pain. If you enable
-hardware handshaking, you must drive CTS* low on the CD2401 for output to
-occur. If the port is in the DTE configuration, you must drive the RS-232 CTS
-line to space; if the port is in the DCE configuration, you must drive the
-RS-232 RTS line to space.
-
-Limited support is provided for polled terminal I/O. This is used when running
-the timing tests. Set the CD2401_POLLED_IO manifest constant to 1 in
-rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c to enable polled I/O.
-In this case, I/O is done through 167Bug, usually to the Serial Port 1/Console
+before it calls the firtOpen driver callback, EXCEPT THAT HARDWARE
+HANDSHAKING IS TURNED OFF, i.e. CLOCAL is set in the struct termios
+c_cflag field. We use 3-wire cables for I/O, and find hardware handshaking
+a pain. If you enable hardware handshaking, you must drive CTS* low on the
+CD2401 for output to occur. If the port is in the DTE configuration, you
+must drive the RS-232 CTS line to space; if the port is in the DCE
+configuration, you must drive the RS-232 RTS line to space.
+
+Limited support is provided for polled terminal I/O. This is used when
+running the timing tests. Set the CD2401_POLLED_IO manifest constant to 1
+in rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c to enable polled
+I/O. In this case, I/O is done through 167Bug, usually to the Serial Port
+1/Console port. Interrupt-driven and polled I/O cannot be mixed in the
+MVME167.
+
Floating-point
The MC68040 has a built-in FPU. This FPU does not implement all the
-instruction of the MC68881/MC68882 floating-point coprocessors in hardware.
-The -m68040 compilation options instructs gcc to not generate the missing
-instructions. All of the RTEMS code is built this way. Some of the missing
-functionality must be supplied by external libraries. The required functions
-are part of libgcc.a.
+instruction of the MC68881/MC68882 floating-point coprocessors in
+hardware. The -m68040 compilation options instructs gcc to not generate
+the missing instructions. All of the RTEMS code is built this way. Some
+of the missing functionality must be supplied by external libraries. The
+required functions are part of libgcc.a.
The issue gets complicated because libc, libm and libgcc do not come as
m68040-specific variants. The default variants of these libraries are for the
@@ -127,9 +147,22 @@ mvme167.cfg that redefine which variants of libc, libm and libgcc to link
against.
-Miscellaneous
+Cache Control and Memory Mapping
+
+If Jumper J1-7 is installed, the data cache will be turned on. If Jumper
+J1-6 is installed, the instruction cache will be turned on. Removing the
+jumper causes the corresponding cache to be left disabled.
+
+If Jumper J1-5 is installed, the data cache will be placed in copyback
+mode. If it is removed, it will be placed in writethrough mode.
+
+Currently, block address translation is set up to map the virtual
+0x00000000--0x7FFFFFFF to the physical range 0x00000000--0x7FFFFFFF. The
+port relies on the hardware to raise exceptions when addressing
+non-existent memory. Caching is not controllable on a finer grain.
+
-port. Interrupt-driven and polled I/O cannot be mixed in the MVME167.
+Miscellaneous
The timer and clock drivers were patterned after the MVME162 and MVME152
ports.
@@ -137,8 +170,6 @@ ports.
At this time, we do not have an MPCI layer for the MVME167. We are planning
to write one.
-The port does not have a network driver.
-
This port supplies its own fatal_error_handler, which attempts to print some
error message through 167Bug (on the Serial Port 1/Console on the MVME712M).
@@ -153,17 +184,20 @@ tools were used:
m68k-rtems target;
- GNU binutils 2.9.1 configured for a powerpc-ibm-aix4.2.0.0 host and
m68k-rtems target;
+
It was also tested on a Pentium II-based PC running Windows NT Workstation 4.0
-and the Cygnus Cygwin32 release b20.1 environment, witht he following tools:
+and the Cygnus Cygwin32 release b20.1 environment, with the following tools:
- EGCS 1.1.1 configured for a i586-cygwin32 host and m68k-rtems target;
- GNU binutils 2.9.4 configured for a i586-cygwin32 host and m68k-rtems
target;
- - Cygnus newlib 1.8.0 with RTEMS 4.0.0 patches.
With the latter environment, be patient; builds take a very looong time...
- - Cygnus newlib 1.8.0 with RTEMS 4.0.0 patches.
+Current development is done on a Pentium III PC running RedHat Linux 6.1.
+At the time this README was composed, the latest working compiler that was
+used successfully was gcc version 2.96 20000213 (experimental). Both the C
+and C++ compilers were working. Binutils 2.9.1 are used.
Known Problems
@@ -202,6 +236,11 @@ blown. This is one case were overwritting the first or last 16 bytes of the
stack does cause problems (but hey, an exception occurred, which is better
than propagating the error).
+In the stackchk test, an access fault exception is raised after the stack is
+blown. This is one case were overwritting the first or last 16 bytes of the
+stack does cause problems (but hey, an exception occurred, which is better
+than propagating the error).
+
When using interrupt-driven I/O, psx08 produces all the expected output, but
it does not return control to 167Bug. Is this test supposed to work with
interrupt-driven console I/O?
@@ -210,6 +249,8 @@ interrupt-driven console I/O?
What's new
----------
+Support for Java is being actively worked on.
+
Thanks
------
@@ -460,8 +501,3 @@ Timing tests:
rtems_rate_monotonic_period: obtain status 13
-Network tests:
- Network driver is not implemented.
-
-
-
diff --git a/c/src/lib/libbsp/m68k/mvme167/bsp_specs b/c/src/lib/libbsp/m68k/mvme167/bsp_specs
index 7ece396fb5..efee788065 100644
--- a/c/src/lib/libbsp/m68k/mvme167/bsp_specs
+++ b/c/src/lib/libbsp/m68k/mvme167/bsp_specs
@@ -7,15 +7,11 @@
*cpp:
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
-*endfile:
-%{qelf: crtend.o%s crtn.o%s}
-
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group \
%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
--lc -lgcc --end-group \
-%{!qelf: %{!qnolinkcmds: -T linkcmds%s}} %{qelf: %{!qnolinkcmd: -T
-linkcmds%s}}}
+%{qjava: -lffi -lzgcj -lgcj} %{qc++: -lstdc++} -lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: \
diff --git a/c/src/lib/libbsp/m68k/mvme167/clock/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/mvme167/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme167/configure.in b/c/src/lib/libbsp/m68k/mvme167/configure.in
index 02052ba27e..3dd0750943 100644
--- a/c/src/lib/libbsp/m68k/mvme167/configure.in
+++ b/c/src/lib/libbsp/m68k/mvme167/configure.in
@@ -17,8 +17,11 @@ RTEMS_CANONICALIZE_TOOLS
RTEMS_ENV_RTEMSBSP
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
+RTEMS_CHECK_NETWORKING
RTEMS_CANONICAL_HOST
+AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
+
RTEMS_PROJECT_ROOT
# Explicitly list all Makefiles here
@@ -28,6 +31,7 @@ clock/Makefile
console/Makefile
fatal/Makefile
include/Makefile
+network/Makefile
start/Makefile
startup/Makefile
timer/Makefile
diff --git a/c/src/lib/libbsp/m68k/mvme167/console/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/mvme167/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console-recording.c b/c/src/lib/libbsp/m68k/mvme167/console/console-recording.c
index e69de29bb2..1f216a07d5 100644
--- a/c/src/lib/libbsp/m68k/mvme167/console/console-recording.c
+++ b/c/src/lib/libbsp/m68k/mvme167/console/console-recording.c
@@ -0,0 +1,591 @@
+/*
+ * Copyright (c) 2000, National Research Council of Canada
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ */
+
+/* CD2401 CONSOLE DRIVER DEBUG INFO RECORDING */
+
+#ifdef CD2401_RECORD_DEBUG_INFO
+
+/* Control individual recording here. That way, we don't clutter console.c */
+#define CD2401_RECORD_WRITE
+#define CD2401_RECORD_TX_ISR
+#define CD2401_RECORD_RX_ISR
+#define CD2401_RECORD_RE_ISR
+#define CD2401_RECORD_MODEM_ISR
+#define CD2401_RECORD_SET_ATTRIBUTE
+#define CD2401_RECORD_FIRST_OPEN
+#define CD2401_RECORD_LAST_CLOSE
+#define CD2401_RECORD_START_REMOTE_TX
+#define CD2401_RECORD_STOP_REMOTE_TX
+#define CD2401_RECORD_DRAIN_OUTPUT
+#define CD2401_RECORD_DELAY
+
+
+/* Call the data recording functions */
+#ifdef CD2401_RECORD_WRITE
+#define CD2401_RECORD_WRITE_INFO( args ) cd2401_record_write_info args
+#else
+#define CD2401_RECORD_WRITE_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_TX_ISR
+#define CD2401_RECORD_TX_ISR_INFO( args ) cd2401_record_tx_isr_info args
+#define CD2401_RECORD_TX_ISR_SPURIOUS_INFO( args ) cd2401_record_tx_isr_spurious_info args
+#define CD2401_RECORD_TX_ISR_BUSERR_INFO( args ) cd2401_record_tx_isr_buserr_info args
+#else
+#define CD2401_RECORD_TX_ISR_INFO( args )
+#define CD2401_RECORD_TX_ISR_SPURIOUS_INFO( args )
+#define CD2401_RECORD_TX_ISR_BUSERR_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_RX_ISR
+#define CD2401_RECORD_RX_ISR_INFO( args ) cd2401_record_rx_isr_info args
+#define CD2401_RECORD_RX_ISR_SPURIOUS_INFO( args ) cd2401_record_rx_isr_spurious_info args
+#else
+#define CD2401_RECORD_RX_ISR_INFO( args )
+#define CD2401_RECORD_RX_ISR_SPURIOUS_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_RE_ISR
+#define CD2401_RECORD_RE_ISR_SPURIOUS_INFO( args ) cd2401_record_re_isr_spurious_info args
+#else
+#define CD2401_RECORD_RE_ISR_SPURIOUS_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_MODEM_ISR
+#define CD2401_RECORD_MODEM_ISR_SPURIOUS_INFO( args ) cd2401_record_modem_isr_spurious_info args
+#else
+#define CD2401_RECORD_MODEM_ISR_SPURIOUS_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_SET_ATTRIBUTES
+#define CD2401_RECORD_SET_ATTRIBUTES_INFO( args ) cd2401_record_set_attributes_info args
+#else
+#define CD2401_RECORD_SET_ATTRIBUTES_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_FIRST_OPEN
+#define CD2401_RECORD_FIRST_OPEN_INFO( args ) cd2401_record_first_open_info args
+#else
+#define CD2401_RECORD_FIRST_OPEN_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_LAST_CLOSE
+#define CD2401_RECORD_LAST_CLOSE_INFO( args ) cd2401_record_last_close_info args
+#else
+#define CD2401_RECORD_LAST_CLOSE_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_START_REMOTE_TX
+#define CD2401_RECORD_START_REMOTE_TX_INFO( args ) cd2401_record_start_remote_tx_info args
+#else
+#define CD2401_RECORD_START_REMOTE_TX_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_STOP_REMOTE_TX
+#define CD2401_RECORD_STOP_REMOTE_TX_INFO( args ) cd2401_record_stop_remote_tx_info args
+#else
+#define CD2401_RECORD_STOP_REMOTE_TX_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_DRAIN_OUTPUT
+#define CD2401_RECORD_DRAIN_OUTPUT_INFO( args ) cd2401_record_drain_output_info args
+#else
+#define CD2401_RECORD_DRAIN_OUTPUT_INFO( args )
+#endif
+
+#ifdef CD2401_RECORD_DELAY
+#define CD2401_RECORD_DELAY_INFO( args ) cd2401_record_delay_info args
+#else
+#define CD2401_RECORD_DELAY_INFO( args )
+#endif
+
+
+/* Define the data and the recording functions */
+#define CD2401_DEBUG_BUFFER_SIZE 256
+#define CD2401_DEBUG_CHAR_BUFSIZE 64
+#define CD2401_WRITE_INFO 1
+#define CD2401_TX_ISR_INFO 2
+#define CD2401_TX_ISR_SPURIOUS_INFO 3
+#define CD2401_TX_ISR_BUSERR_INFO 4
+#define CD2401_RX_ISR_INFO 5
+#define CD2401_RX_ISR_SPURIOUS_INFO 6
+#define CD2401_RE_ISR_SPURIOUS_INFO 7
+#define CD2401_MODEM_ISR_SPURIOUS_INFO 8
+#define CD2401_FIRST_OPEN_INFO 9
+#define CD2401_LAST_CLOSE_INFO 10
+#define CD2401_START_REMOTE_TX_INFO 11
+#define CD2401_STOP_REMOTE_TX_INFO 12
+#define CD2401_SET_ATTRIBUTE_INFO 13
+#define CD2401_DRAIN_OUTPUT_INFO 14
+#define CD2401_DELAY_INFO 15
+
+
+struct cd2401_debug_info {
+ short discriminant;
+ short record_size;
+ union {
+ struct cd2401_write_info {
+ int length;
+ char buffer[CD2401_DEBUG_CHAR_BUFSIZE];
+ char dmabuf;
+ } write_info;
+ struct cd2401_tx_isr_info {
+ unsigned char channel;
+ unsigned char status;
+ unsigned char initial_ier;
+ unsigned char final_ier;
+ rtems_unsigned8 txEmpty;
+ } tx_isr_info;
+ struct cd2401_tx_isr_spurious_info {
+ unsigned char channel;
+ unsigned char status;
+ unsigned char initial_ier;
+ unsigned char final_ier;
+ unsigned long spurdev;
+ unsigned long spurcount;
+ } tx_isr_spurious_info;
+ struct cd2401_tx_isr_buserr_info {
+ unsigned char channel;
+ unsigned char status;
+ unsigned char initial_ier;
+ unsigned char buserr;
+ unsigned long type;
+ unsigned long addr;
+ } tx_isr_buserr_info;
+ struct cd2401_rx_isr_info {
+ unsigned char channel;
+ int length;
+ char buffer[CD2401_DEBUG_CHAR_BUFSIZE];
+ } rx_isr_info;
+ struct cd2401_rx_isr_spurious_info {
+ unsigned char channel;
+ unsigned char status;
+ unsigned long spurdev;
+ unsigned long spurcount;
+ } rx_isr_spurious_info;
+ struct cd2401_re_isr_spurious_info {
+ unsigned char channel;
+ unsigned long spurdev;
+ unsigned long spurcount;
+ } re_isr_spurious_info;
+ struct cd2401_modem_isr_spurious_info {
+ unsigned char channel;
+ unsigned long spurdev;
+ unsigned long spurcount;
+ } modem_isr_spurious_info;
+ struct cd2401_first_open_info {
+ unsigned char channel;
+ rtems_unsigned8 init_count;
+ } first_open_info;
+ struct cd2401_last_close_info {
+ unsigned char channel;
+ rtems_unsigned8 init_count;
+ } last_close_info;
+ struct cd2401_start_remote_tx_info {
+ unsigned char channel;
+ } start_remote_tx_info;
+ struct cd2401_stop_remote_tx_info {
+ unsigned char channel;
+ } stop_remote_tx_info;
+ struct cd2401_set_attribute_info {
+ int minor;
+ rtems_unsigned8 need_reinit;
+ rtems_unsigned8 txEmpty;
+ rtems_unsigned8 csize;
+ rtems_unsigned8 cstopb;
+ rtems_unsigned8 parodd;
+ rtems_unsigned8 parenb;
+ rtems_unsigned8 ignpar;
+ rtems_unsigned8 inpck;
+ rtems_unsigned8 hw_flow_ctl;
+ rtems_unsigned8 sw_flow_ctl;
+ rtems_unsigned8 extra_flow_ctl;
+ rtems_unsigned8 icrnl;
+ rtems_unsigned8 igncr;
+ rtems_unsigned8 inlcr;
+ rtems_unsigned8 brkint;
+ rtems_unsigned8 ignbrk;
+ rtems_unsigned8 parmrk;
+ rtems_unsigned8 istrip;
+ rtems_unsigned16 tx_period;
+ rtems_unsigned16 rx_period;
+ rtems_unsigned32 out_baud;
+ rtems_unsigned32 in_baud;
+ } set_attribute_info;
+ struct cd2401_drain_output_info {
+ rtems_unsigned8 txEmpty;
+ rtems_unsigned8 own_buf_A;
+ rtems_unsigned8 own_buf_B;
+ } drain_output_info;
+ struct cd2401_delay_info {
+ rtems_interval start;
+ rtems_interval end;
+ rtems_interval current;
+ unsigned long loop_count;
+ } delay_info;
+ } u;
+};
+
+struct cd2401_debug_info cd2401_debug_buffer[CD2401_DEBUG_BUFFER_SIZE];
+int cd2401_debug_index = 0;
+
+#include <string.h>
+
+int cd2401_get_record_size(
+ int size
+)
+{
+ /* Not the best way to do this */
+ return size + 4;
+}
+
+
+void cd2401_record_write_info(
+ int len,
+ const char * buf,
+ char dmabuf
+)
+{
+ int max_length;
+
+ max_length = (len < CD2401_DEBUG_CHAR_BUFSIZE ) ? len : CD2401_DEBUG_CHAR_BUFSIZE;
+
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_WRITE_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_write_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.write_info.length = len;
+ memcpy ( &(cd2401_debug_buffer[cd2401_debug_index].u.write_info.buffer), buf, max_length );
+ cd2401_debug_buffer[cd2401_debug_index].u.write_info.dmabuf = dmabuf;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_tx_isr_info(
+ unsigned char ch,
+ unsigned char status,
+ unsigned char initial_ier,
+ unsigned char final_ier,
+ rtems_unsigned8 txEmpty
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_TX_ISR_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_tx_isr_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.status = status;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.initial_ier = initial_ier;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.final_ier = final_ier;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.txEmpty = txEmpty;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_tx_isr_spurious_info(
+ unsigned char ch,
+ unsigned char status,
+ unsigned char initial_ier,
+ unsigned char final_ier,
+ unsigned char spur_dev,
+ unsigned char spur_cnt
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_TX_ISR_SPURIOUS_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_tx_isr_spurious_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.status = status;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.initial_ier = initial_ier;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.final_ier = final_ier;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.spurdev = spur_dev;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.spurcount = spur_cnt;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_tx_isr_buserr_info(
+ unsigned char ch,
+ unsigned char status,
+ unsigned char initial_ier,
+ unsigned char buserr,
+ unsigned long buserr_type,
+ unsigned long buserr_addr
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_TX_ISR_BUSERR_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_tx_isr_buserr_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.status = status;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.initial_ier = initial_ier;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.buserr = buserr;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.type = buserr_type;
+ cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.addr = buserr_addr;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_rx_isr_info(
+ unsigned char ch,
+ unsigned char total,
+ char * buffer
+)
+{
+ int max_length;
+
+ max_length = (total < CD2401_DEBUG_CHAR_BUFSIZE ) ? total : CD2401_DEBUG_CHAR_BUFSIZE;
+
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_RX_ISR_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_rx_isr_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_info.length = max_length;
+ memcpy ( &(cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_info.buffer), buffer, max_length );
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_rx_isr_spurious_info(
+ unsigned char ch,
+ unsigned char status,
+ rtems_unsigned32 spur_dev,
+ rtems_unsigned32 spur_cnt
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_RX_ISR_SPURIOUS_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_rx_isr_spurious_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.status = status;
+ cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.spurdev = spur_dev;
+ cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.spurcount = spur_cnt;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_re_isr_spurious_info(
+ unsigned char ch,
+ rtems_unsigned32 spur_dev,
+ rtems_unsigned32 spur_cnt
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_RE_ISR_SPURIOUS_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_re_isr_spurious_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.spurdev = spur_dev;
+ cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.spurcount = spur_cnt;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_modem_isr_spurious_info(
+ unsigned char ch,
+ rtems_unsigned32 spur_dev,
+ rtems_unsigned32 spur_cnt
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_MODEM_ISR_SPURIOUS_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_modem_isr_spurious_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.spurdev = spur_dev;
+ cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.spurcount = spur_cnt;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_first_open_info(
+ unsigned char ch,
+ rtems_unsigned8 init_count
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_FIRST_OPEN_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_first_open_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.first_open_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.first_open_info.init_count = init_count;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_last_close_info(
+ unsigned char ch,
+ rtems_unsigned8 init_count
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_LAST_CLOSE_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_last_close_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.last_close_info.channel = ch;
+ cd2401_debug_buffer[cd2401_debug_index].u.last_close_info.init_count = init_count;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_start_remote_tx_info(
+ unsigned char ch
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_START_REMOTE_TX_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_start_remote_tx_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.start_remote_tx_info.channel = ch;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_stop_remote_tx_info(
+ unsigned char ch
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_STOP_REMOTE_TX_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_stop_remote_tx_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.stop_remote_tx_info.channel = ch;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_set_attributes_info(
+ int minor,
+ rtems_unsigned8 need_reinit,
+ rtems_unsigned8 csize,
+ rtems_unsigned8 cstopb,
+ rtems_unsigned8 parodd,
+ rtems_unsigned8 parenb,
+ rtems_unsigned8 ignpar,
+ rtems_unsigned8 inpck,
+ rtems_unsigned8 hw_flow_ctl,
+ rtems_unsigned8 sw_flow_ctl,
+ rtems_unsigned8 extra_flow_ctl,
+ rtems_unsigned8 icrnl,
+ rtems_unsigned8 igncr,
+ rtems_unsigned8 inlcr,
+ rtems_unsigned8 brkint,
+ rtems_unsigned8 ignbrk,
+ rtems_unsigned8 parmrk,
+ rtems_unsigned8 istrip,
+ rtems_unsigned16 tx_period,
+ rtems_unsigned16 rx_period,
+ rtems_unsigned32 out_baud,
+ rtems_unsigned32 in_baud
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_SET_ATTRIBUTE_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_set_attribute_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.minor = minor;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.need_reinit = need_reinit;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.txEmpty = CD2401_Channel_Info[minor].txEmpty;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.csize = csize;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.cstopb = cstopb;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.parodd = parodd;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.parenb = parenb;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.ignpar = ignpar;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.inpck = inpck;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.hw_flow_ctl = hw_flow_ctl;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.sw_flow_ctl = sw_flow_ctl;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.extra_flow_ctl = extra_flow_ctl;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.icrnl = icrnl;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.igncr = igncr;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.inlcr = inlcr;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.brkint = brkint;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.ignbrk = ignbrk;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.parmrk = parmrk;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.istrip = istrip;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.tx_period = tx_period;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.rx_period = rx_period;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.out_baud = out_baud;
+ cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.in_baud = in_baud;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_drain_output_info(
+ rtems_unsigned8 txEmpty,
+ rtems_unsigned8 own_buf_A,
+ rtems_unsigned8 own_buf_B
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_DRAIN_OUTPUT_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_drain_output_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.txEmpty = txEmpty;
+ cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.own_buf_A = own_buf_A;
+ cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.own_buf_B = own_buf_B;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+void cd2401_record_delay_info(
+ rtems_interval start,
+ rtems_interval end,
+ rtems_interval current,
+ unsigned long loop_count
+)
+{
+ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_DELAY_INFO;
+ cd2401_debug_buffer[cd2401_debug_index].record_size =
+ cd2401_get_record_size( sizeof( struct cd2401_delay_info ) );
+ cd2401_debug_buffer[cd2401_debug_index].u.delay_info.start = start;
+ cd2401_debug_buffer[cd2401_debug_index].u.delay_info.end = end;
+ cd2401_debug_buffer[cd2401_debug_index].u.delay_info.current = current;
+ cd2401_debug_buffer[cd2401_debug_index].u.delay_info.loop_count = loop_count;
+
+ cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE;
+}
+
+
+#else
+
+/* Do not call the data recording functions */
+#define CD2401_RECORD_WRITE_INFO( args )
+#define CD2401_RECORD_TX_ISR_INFO( args )
+#define CD2401_RECORD_TX_ISR_SPURIOUS_INFO( args )
+#define CD2401_RECORD_TX_ISR_BUSERR_INFO( args )
+#define CD2401_RECORD_RX_ISR_INFO( args )
+#define CD2401_RECORD_RX_ISR_SPURIOUS_INFO( args )
+#define CD2401_RECORD_RE_ISR_SPURIOUS_INFO( args )
+#define CD2401_RECORD_MODEM_ISR_SPURIOUS_INFO( args )
+#define CD2401_RECORD_FIRST_OPEN_INFO( args )
+#define CD2401_RECORD_LAST_CLOSE_INFO( args )
+#define CD2401_RECORD_START_REMOTE_TX_INFO( args )
+#define CD2401_RECORD_STOP_REMOTE_TX_INFO( args )
+#define CD2401_RECORD_SET_ATTRIBUTES_INFO( args )
+#define CD2401_RECORD_DRAIN_OUTPUT_INFO( args )
+#define CD2401_RECORD_DELAY_INFO( args )
+
+#endif
diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console.c b/c/src/lib/libbsp/m68k/mvme167/console/console.c
index b1377aef38..a77e001da1 100644
--- a/c/src/lib/libbsp/m68k/mvme167/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme167/console/console.c
@@ -2,22 +2,24 @@
* console.c
*
* This file contains the MVME167 termios console package. Only asynchronous
- * I/O is supported. Normal I/O uses DMA for output, interrupts for input.
- * Very limited support is provided for polled I/O. Polled I/O is intended
- * only for running the RTEMS test suites, and uses the 167Bug console only.
+ * I/O is supported.
*
* /dev/tty0 is channel 0, Serial Port 1/Console on the MVME712M.
* /dev/tty1 is channel 1, Serial Port 2/TTY01 on the MVME712M.
* /dev/tty2 is channel 2, Serial Port 3 on the MVME712M.
* /dev/tty3 is channel 3, Serial Port 4 on the MVME712M.
*
- * /dev/console is fixed to be /dev/tty01, Serial Port 2. 167Bug is given
- * Serial Port 1/Console. Do not open /dev/tty00.
+ * Normal I/O uses DMA for output, interrupts for input. /dev/console is
+ * fixed to be /dev/tty01, Serial Port 2. Very limited support is provided
+ * for polled I/O. Polled I/O is intended only for running the RTEMS test
+ * suites. In all cases, Serial Port 1/Console is allocated to 167Bug and
+ * is the dedicated debugger port. We configure GDB to use 167Bug for
+ * debugging. When debugging with GDB or 167Bug, do not open /dev/tty00.
*
* Modern I/O chips often contain a number of I/O devices that can operate
* almost independently of each other. Typically, in RTEMS, all devices in
* an I/O chip are handled by a single device driver, but that need not be
- * always the case. Each device driver must supply six entry points in the
+ * always the case. Each device driver must supply six entry points in the
* Device Driver Table: a device initialization function, as well as an open,
* close, read, write and a control function. RTEMS assigns a device major
* number to each device driver. This major device number is the index of the
@@ -59,7 +61,7 @@
* Worse, it requires that the sub-devices be initialized in some
* configuration, and that configuration then changed through a series of
* device driver control calls. There is no standard API in RTEMS to switch
- * a serial line to some synchronous protocol.
+ * a serial line to some synchronous protocol.
*
* A better approach is to treat each channel as a separate device, each with
* its own device device driver. The application then supplies its own device
@@ -96,7 +98,7 @@
* THIS MODULE IS NOT RE-ENTRANT! Simultaneous access to a device from
* multiple tasks is likely to cause significant problems! Concurrency
* control is implemented in the termios package.
-*
+ *
* THE INTERRUPT LEVEL IS SET TO 1 FOR ALL CHANNELS.
* If the CD2401 is to be used for high speed synchronous serial I/O, the
* interrupt priority might need to be increased.
@@ -125,27 +127,25 @@
#define M167_INIT
+#include <stdarg.h>
+#include <stdio.h>
#include <termios.h>
#include <bsp.h> /* Must be before libio.h */
#include <rtems/libio.h>
-#define CD2401_INT_LEVEL 1 /* Interrupt level for the CD2401 */
-#define CD2401_POLLED_IO 0 /* 0 for interrupt-driven, 1 for polled I/O */
-
/* Channel info */
-/* static */ struct {
+/* static */ volatile struct {
void *tty; /* Really a struct rtems_termios_tty * */
int len; /* Record nb of chars being TX'ed */
const char *buf; /* Record where DMA is coming from */
- rtems_unsigned16 used_buf_A; /* Nb of times we used output DMA channel A */
- rtems_unsigned16 used_buf_B; /* Nb of times we used output DMA channel B */
- rtems_unsigned16 wait_buf_A; /* Nb of times we waited for output DMA channel A */
- rtems_unsigned16 wait_buf_B; /* Nb of times we waited for output DMA channel B */
rtems_unsigned32 spur_cnt; /* Nb of spurious ints so far */
rtems_unsigned32 spur_dev; /* Indo on last spurious int */
rtems_unsigned32 buserr_addr; /* Faulting address */
rtems_unsigned32 buserr_type; /* Reason of bus error during DMA */
+ rtems_unsigned8 own_buf_A; /* If true, buffer A belongs to the driver */
+ rtems_unsigned8 own_buf_B; /* If true, buffer B belongs to the driver */
+ rtems_unsigned8 txEmpty; /* If true, the output FIFO is supposed to be empty */
} CD2401_Channel_Info[4];
/*
@@ -166,7 +166,14 @@ rtems_isr_entry Prev_rx_isr; /* Previous rx isr */
rtems_isr_entry Prev_tx_isr; /* Previous tx isr */
rtems_isr_entry Prev_modem_isr; /* Previous modem/timer isr */
+
+/* Define the following symbol to trace the calls to this driver */
+/* #define CD2401_RECORD_DEBUG_INFO */
+#include "console-recording.c"
+
+
/* Utility functions */
+void cd2401_udelay( unsigned long delay );
void cd2401_chan_cmd( rtems_unsigned8 channel, rtems_unsigned8 cmd, rtems_unsigned8 wait );
rtems_unsigned16 cd2401_bitrate_divisor( rtems_unsigned32 clkrate, rtems_unsigned32* bitrate );
void cd2401_initialize( void );
@@ -185,6 +192,7 @@ int cd2401_setAttributes( int minor, const struct termios *t );
int cd2401_startRemoteTx( int minor );
int cd2401_stopRemoteTx( int minor );
int cd2401_write( int minor, const char *buf, int len );
+int cd2401_drainOutput( int minor );
int _167Bug_pollRead( int minor );
int _167Bug_pollWrite( int minor, const char *buf, int len );
@@ -194,6 +202,38 @@ int _167Bug_pollWrite( int minor, const char *buf, int len );
*/
/*
+ * Assumes that clock ticks 1 million times per second.
+ *
+ * MAXIMUM DELAY IS ABOUT 20 ms
+ *
+ * Input parameters:
+ * delay: Number of microseconds to delay.
+ *
+ * Output parameters: NONE
+ *
+ * Return values: NONE
+ */
+ void cd2401_udelay
+(
+ unsigned long delay
+)
+{
+ unsigned long i = 20000; /* In case clock is off */
+ rtems_interval ticks_per_second, start_ticks, end_ticks, current_ticks;
+
+ rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
+ rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks );
+ end_ticks = start_ticks + delay;
+
+ do {
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &current_ticks);
+ } while ( --i && (current_ticks <= end_ticks) );
+
+ CD2401_RECORD_DELAY_INFO(( start_ticks, end_ticks, current_ticks, i ));
+}
+
+
+/*
* cd2401_chan_cmd
*
* Sends a CCR command to the specified channel. Waits for any unfinished
@@ -288,21 +328,16 @@ void cd2401_initialize( void )
int i;
for ( i = 3; i >= 0; i-- ) {
- /*
- * Paranoia -- Should already be blank because array should be in bss
- * section, which is explicitly zeroed at boot time.
- */
CD2401_Channel_Info[i].tty = NULL;
CD2401_Channel_Info[i].len = 0;
CD2401_Channel_Info[i].buf = NULL;
- CD2401_Channel_Info[i].used_buf_A = 0;
- CD2401_Channel_Info[i].used_buf_B = 0;
- CD2401_Channel_Info[i].wait_buf_A = 0;
- CD2401_Channel_Info[i].wait_buf_B = 0;
CD2401_Channel_Info[i].spur_cnt = 0;
CD2401_Channel_Info[i].spur_dev = 0;
CD2401_Channel_Info[i].buserr_type = 0;
CD2401_Channel_Info[i].buserr_addr = 0;
+ CD2401_Channel_Info[i].own_buf_A = TRUE;
+ CD2401_Channel_Info[i].own_buf_B = TRUE;
+ CD2401_Channel_Info[i].txEmpty = TRUE;
}
/*
@@ -437,6 +472,9 @@ rtems_isr cd2401_modem_isr(
CD2401_Channel_Info[ch].spur_cnt++;
cd2401->meoir = 0; /* EOI */
+ CD2401_RECORD_MODEM_ISR_SPURIOUS_INFO(( ch,
+ CD2401_Channel_Info[ch].spur_dev,
+ CD2401_Channel_Info[ch].spur_cnt ));
}
@@ -472,6 +510,9 @@ rtems_isr cd2401_re_isr(
if ( cd2401->u5.b.risrl & 0x80 ) /* Timeout interrupt? */
cd2401->ier &= 0xDF; /* Disable rx timeout interrupt */
cd2401->reoir = 0x08; /* EOI; exception char not read */
+ CD2401_RECORD_RE_ISR_SPURIOUS_INFO(( ch,
+ CD2401_Channel_Info[ch].spur_dev,
+ CD2401_Channel_Info[ch].spur_cnt ));
}
@@ -492,28 +533,33 @@ rtems_isr cd2401_rx_isr(
)
{
char c;
- rtems_unsigned8 ch, nchars;
+ rtems_unsigned8 ch, status, nchars, i, total;
+ char buffer[256];
+ status = cd2401->u5.b.risrl;
ch = cd2401->licr >> 2;
- /* Has this channel been initialized? */
- if (CD2401_Channel_Info[ch].tty) {
- /* Yes, read chars, enqueue them, and issue EOI */
- nchars = cd2401->rfoc; /* Number of chars to retrieve from rx FIFO */
+ /* Has this channel been initialized or is it a condition we ignore? */
+ if ( CD2401_Channel_Info[ch].tty && !status ) {
+ /* Normal Rx Int, read chars, enqueue them, and issue EOI */
+ total = nchars = cd2401->rfoc; /* Nb of chars to retrieve from rx FIFO */
+ i = 0;
while ( nchars-- > 0 ) {
- c = (char)cd2401->dr; /* Next char in rx FIFO */
- rtems_termios_enqueue_raw_characters (
- CD2401_Channel_Info[ch].tty,
- &c,
- 1 );
+ c = (char)cd2401->dr; /* Next char in rx FIFO */
+ rtems_termios_enqueue_raw_characters( CD2401_Channel_Info[ch].tty ,&c, 1 );
+ buffer[i++] = c;
}
- cd2401->reoir = 0; /* EOI */
+ cd2401->reoir = 0; /* EOI */
+ CD2401_RECORD_RX_ISR_INFO(( ch, total, buffer ));
} else {
/* No, record as spurious interrupt */
CD2401_Channel_Info[ch].spur_dev =
(vector << 24) | (cd2401->stk << 16) | (cd2401->rir << 8) | cd2401->u5.b.risrl;
CD2401_Channel_Info[ch].spur_cnt++;
- cd2401->reoir = 0x04; /* EOI - character not read */
+ cd2401->reoir = 0x04; /* EOI - character not read */
+ CD2401_RECORD_RX_ISR_SPURIOUS_INFO(( ch, status,
+ CD2401_Channel_Info[ch].spur_dev,
+ CD2401_Channel_Info[ch].spur_cnt ));
}
}
@@ -534,10 +580,11 @@ rtems_isr cd2401_tx_isr(
rtems_vector_number vector
)
{
- rtems_unsigned8 ch, status, buserr;
+ rtems_unsigned8 ch, status, buserr, initial_ier, final_ier;
status = cd2401->tisr;
ch = cd2401->licr >> 2;
+ initial_ier = cd2401->ier;
/* Has this channel been initialized? */
if ( !CD2401_Channel_Info[ch].tty ) {
@@ -545,8 +592,11 @@ rtems_isr cd2401_tx_isr(
CD2401_Channel_Info[ch].spur_dev =
(vector << 24) | (cd2401->stk << 16) | (cd2401->tir << 8) | cd2401->tisr;
CD2401_Channel_Info[ch].spur_cnt++;
- cd2401->ier &= 0xFC; /* Shut up, whoever you are */
- cd2401->teoir = 0x88; /* EOI - Terminate buffer and no transfer */
+ final_ier = cd2401->ier &= 0xFC;/* Shut up, whoever you are */
+ cd2401->teoir = 0x88; /* EOI - Terminate buffer and no transfer */
+ CD2401_RECORD_TX_ISR_SPURIOUS_INFO(( ch, status, initial_ier, final_ier,
+ CD2401_Channel_Info[ch].spur_dev,
+ CD2401_Channel_Info[ch].spur_cnt ));
return;
}
@@ -562,26 +612,50 @@ rtems_isr cd2401_tx_isr(
CD2401_Channel_Info[ch].buserr_addr =
(((rtems_unsigned32)cd2401->tcbadru) << 16) | cd2401->tcbadrl;
- cd2401->teoir = 0x80; /* EOI - terminate bad buffer */
+ cd2401->teoir = 0x80; /* EOI - terminate bad buffer */
+ CD2401_RECORD_TX_ISR_BUSERR_INFO(( ch, status, initial_ier, buserr,
+ CD2401_Channel_Info[ch].buserr_type,
+ CD2401_Channel_Info[ch].buserr_addr ));
return;
}
if ( status & 0x20 ) {
- /* DMA done */
- cd2401->ier &= 0xFC; /* Shut up the interrupts */
-
+ /* DMA done -- Turn off TxD int, turn on TxMpty */
+ final_ier = cd2401->ier = (cd2401->ier & 0xFE) | 0x02;
+ if( status & 0x08 ) {
+ /* Transmit buffer B was released */
+ CD2401_Channel_Info[ch].own_buf_B = TRUE;
+ }
+ else {
+ /* Transmit buffer A was released */
+ CD2401_Channel_Info[ch].own_buf_A = TRUE;
+ }
+ CD2401_RECORD_TX_ISR_INFO(( ch, status, initial_ier, final_ier,
+ CD2401_Channel_Info[ch].txEmpty ));
+
/* This call can result in a call to cd2401_write() */
rtems_termios_dequeue_characters (
CD2401_Channel_Info[ch].tty,
CD2401_Channel_Info[ch].len );
- cd2401->teoir = 0x08; /* EOI - no data transfered */
+ cd2401->teoir = 0x08; /* EOI - no data transfered */
+ }
+ else if ( status & 0x02 ) {
+ /* TxEmpty */
+ CD2401_Channel_Info[ch].txEmpty = TRUE;
+ final_ier = cd2401->ier &= 0xFD;/* Shut up the interrupts */
+ cd2401->teoir = 0x08; /* EOI - no data transfered */
+ CD2401_RECORD_TX_ISR_INFO(( ch, status, initial_ier, final_ier,
+ CD2401_Channel_Info[ch].txEmpty ));
}
else {
/* Why did we get a Tx interrupt? */
CD2401_Channel_Info[ch].spur_dev =
(vector << 24) | (cd2401->stk << 16) | (cd2401->tir << 8) | cd2401->tisr;
CD2401_Channel_Info[ch].spur_cnt++;
- cd2401->teoir = 0x08; /* EOI - no data transfered */
+ cd2401->teoir = 0x08; /* EOI - no data transfered */
+ CD2401_RECORD_TX_ISR_SPURIOUS_INFO(( ch, status, initial_ier, 0xFF,
+ CD2401_Channel_Info[ch].spur_dev,
+ CD2401_Channel_Info[ch].spur_cnt ));
}
}
@@ -615,6 +689,9 @@ int cd2401_firstOpen(
rtems_libio_ioctl_args_t newarg;
struct termios termios;
rtems_status_code sc;
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable (level);
/*
* Set up the line with the specified parameters. The difficulty is that
@@ -634,7 +711,7 @@ int cd2401_firstOpen(
sc = rtems_termios_ioctl (&newarg);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
-
+
/*
* Turn off hardware flow control. It is a pain with 3-wire cables.
* The rtems_termios_ioctl() call below results in a call to
@@ -646,7 +723,7 @@ int cd2401_firstOpen(
sc = rtems_termios_ioctl (&newarg);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
-
+
/* Mark that the channel as initialized */
CD2401_Channel_Info[minor].tty = args->iop->data1;
@@ -661,6 +738,10 @@ int cd2401_firstOpen(
cd2401_interrupts_initialize( TRUE );
}
+ CD2401_RECORD_FIRST_OPEN_INFO(( minor, Init_count ));
+
+ rtems_interrupt_enable (level);
+
/* Return something */
return RTEMS_SUCCESSFUL;
}
@@ -682,6 +763,10 @@ int cd2401_lastClose(
void *arg
)
{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable (level);
+
/* Mark that the channel is no longer is use */
CD2401_Channel_Info[minor].tty = NULL;
@@ -696,6 +781,10 @@ int cd2401_lastClose(
set_vector( Prev_rx_isr, 0x5F, 1 );
}
+ CD2401_RECORD_LAST_CLOSE_INFO(( minor, Init_count ));
+
+ rtems_interrupt_enable (level);
+
/* return something */
return RTEMS_SUCCESSFUL;
}
@@ -729,10 +818,13 @@ int cd2401_setAttributes(
rtems_unsigned8 csize, cstopb, parodd, parenb, ignpar, inpck;
rtems_unsigned8 hw_flow_ctl, sw_flow_ctl, extra_flow_ctl;
rtems_unsigned8 icrnl, igncr, inlcr, brkint, ignbrk, parmrk, istrip;
+ rtems_unsigned8 need_reinitialization = FALSE;
+ rtems_unsigned8 read_enabled;
rtems_unsigned16 tx_period, rx_period;
rtems_unsigned32 out_baud, in_baud;
+ rtems_interrupt_level level;
- /* Set up the line parameters */
+ /* Determine what the line parameters should be */
/* Output baud rate */
switch ( cfgetospeed (t) ) {
@@ -876,48 +968,110 @@ int cd2401_setAttributes(
else
istrip = 0; /* Leave as 8 bits */
-
- /* Clear channel and disable rx and tx */
- cd2401_chan_cmd (minor, 0x40, 1);
-
- /* Write to the ports */
- cd2401->car = minor; /* Select channel */
- cd2401->cmr = 0x42; /* Interrupt Rx, DMA Tx, async mode */
- cd2401->cor1 = parodd | parenb | ignpar | csize;
- cd2401->cor2 = sw_flow_ctl | hw_flow_ctl;
- cd2401->cor3 = extra_flow_ctl | cstopb;
- cd2401->cor4 = 0x0A; /* No DSR/DCD/CTS detect; FIFO threshold of 10 */
- cd2401->cor5 = 0x0A; /* No DSR/DCD/CTS detect; DTR threshold of 10 */
- cd2401->cor6 = igncr | icrnl | inlcr | ignbrk | brkint | parmrk | inpck;
- cd2401->cor7 = istrip; /* No LNext; ignore XON/XOFF if frame error; no tx translations */
- cd2401->u1.async.schr1 =
- t->c_cc[VSTART]; /* Special char 1: XON character */
- cd2401->u1.async.schr2 =
- t->c_cc[VSTOP]; /* special char 2: XOFF character */
- /* Special chars 3 and 4, char range, LNext, RFAR[1..4] and CRC are unused, left as is. */
-
- /* Set baudrates for receiver and transmitter */
rx_period = cd2401_bitrate_divisor( 20000000Ul, &in_baud );
- cd2401->rbpr = (unsigned char)rx_period;
- cd2401->rcor = (unsigned char)(rx_period >> 8); /* no DPLL */
tx_period = cd2401_bitrate_divisor( 20000000Ul, &out_baud );
- cd2401->tbpr = (unsigned char)tx_period;
- cd2401->tcor = (tx_period >> 3) & 0xE0; /* no x1 ext clk, no loopback */
-
- /* NEED TO LOOK AT THIS LINE! */
- /* Timeout for 4 chars at 9600, 8 bits per char, 1 stop bit */
- cd2401->u2.w.rtpr = 0x04;
-
- /* And finally: */
- if ( t->c_cflag & CREAD ) {
- /* Re-initialize channel, enable rx and tx */
- cd2401_chan_cmd (minor, 0x2A, 1);
- /* Enable rx data ints */
- cd2401->ier = 0x08;
- } else {
- /* Re-initialize channel, enable tx, disable rx */
- cd2401_chan_cmd (minor, 0x29, 1);
+
+ /*
+ * If this is the first time that the line characteristics are set up, then
+ * the device must be re-initialized.
+ * Also check if we need to change anything. It is preferable to not touch
+ * the device if nothing changes. As soon as we touch it, it tends to
+ * glitch. If anything changes, we reprogram all registers. This is
+ * harmless.
+ */
+ if ( ( CD2401_Channel_Info[minor].tty == 0 ) ||
+ ( cd2401->cor1 != (parodd | parenb | ignpar | csize) ) ||
+ ( cd2401->cor2 != (sw_flow_ctl | hw_flow_ctl) ) ||
+ ( cd2401->cor3 != (extra_flow_ctl | cstopb) ) ||
+ ( cd2401->cor6 != (igncr | icrnl | inlcr | ignbrk | brkint | parmrk | inpck) ) ||
+ ( cd2401->cor7 != istrip ) ||
+ ( cd2401->u1.async.schr1 != t->c_cc[VSTART] ) ||
+ ( cd2401->u1.async.schr2 != t->c_cc[VSTOP] ) ||
+ ( cd2401->rbpr != (unsigned char)rx_period ) ||
+ ( cd2401->rcor != (unsigned char)(rx_period >> 8) ) ||
+ ( cd2401->tbpr != (unsigned char)tx_period ) ||
+ ( cd2401->tcor != ( (tx_period >> 3) & 0xE0 ) ) )
+ need_reinitialization = TRUE;
+
+ /* Write to the ports */
+ rtems_interrupt_disable (level);
+
+ cd2401->car = minor; /* Select channel */
+ read_enabled = cd2401->csr & 0x80 ? TRUE : FALSE;
+
+ if ( (t->c_cflag & CREAD ? TRUE : FALSE ) != read_enabled ) {
+ /* Read enable status is changing */
+ need_reinitialization = TRUE;
}
+
+ if ( need_reinitialization ) {
+ /*
+ * Could not find a way to test whether the CD2401 was done transmitting.
+ * The TxEmpty interrupt does not seem to indicate that the FIFO is empty
+ * in DMA mode. So, just wait a while for output to drain. May not be
+ * enough, but it will have to do (should be long enough for 1 char at
+ * 9600 bsp)...
+ */
+ cd2401_udelay( 2000L );
+
+ /* Clear channel */
+ cd2401_chan_cmd (minor, 0x40, 1);
+
+ cd2401->car = minor; /* Select channel */
+ cd2401->cmr = 0x42; /* Interrupt Rx, DMA Tx, async mode */
+ cd2401->cor1 = parodd | parenb | ignpar | csize;
+ cd2401->cor2 = sw_flow_ctl | hw_flow_ctl;
+ cd2401->cor3 = extra_flow_ctl | cstopb;
+ cd2401->cor4 = 0x0A; /* No DSR/DCD/CTS detect; FIFO threshold of 10 */
+ cd2401->cor5 = 0x0A; /* No DSR/DCD/CTS detect; DTR threshold of 10 */
+ cd2401->cor6 = igncr | icrnl | inlcr | ignbrk | brkint | parmrk | inpck;
+ cd2401->cor7 = istrip; /* No LNext; ignore XON/XOFF if frame error; no tx translations */
+ /* Special char 1: XON character */
+ cd2401->u1.async.schr1 = t->c_cc[VSTART];
+ /* special char 2: XOFF character */
+ cd2401->u1.async.schr2 = t->c_cc[VSTOP];
+
+ /*
+ * Special chars 3 and 4, char range, LNext, RFAR[1..4] and CRC
+ * are unused, left as is.
+ */
+
+ /* Set baudrates for receiver and transmitter */
+ cd2401->rbpr = (unsigned char)rx_period;
+ cd2401->rcor = (unsigned char)(rx_period >> 8); /* no DPLL */
+ cd2401->tbpr = (unsigned char)tx_period;
+ cd2401->tcor = (tx_period >> 3) & 0xE0; /* no x1 ext clk, no loopback */
+
+ /* Timeout for 4 chars at 9600, 8 bits per char, 1 stop bit */
+ cd2401->u2.w.rtpr = 0x04; /* NEED TO LOOK AT THIS LINE! */
+
+ if ( t->c_cflag & CREAD ) {
+ /* Re-initialize channel, enable rx and tx */
+ cd2401_chan_cmd (minor, 0x2A, 1);
+ /* Enable rx data ints */
+ cd2401->ier = 0x08;
+ } else {
+ /* Re-initialize channel, enable tx, disable rx */
+ cd2401_chan_cmd (minor, 0x29, 1);
+ }
+ }
+
+ CD2401_RECORD_SET_ATTRIBUTES_INFO(( minor, need_reinitialization, csize,
+ cstopb, parodd, parenb, ignpar, inpck,
+ hw_flow_ctl, sw_flow_ctl, extra_flow_ctl,
+ icrnl, igncr, inlcr, brkint, ignbrk,
+ parmrk, istrip, tx_period, rx_period,
+ out_baud, in_baud ));
+
+ rtems_interrupt_enable (level);
+
+ /*
+ * Looks like the CD2401 needs time to settle after initialization. Give it
+ * 10 ms. I don't really believe it, but if output resumes to quickly after
+ * this call, the first few characters are not right.
+ */
+ if ( need_reinitialization )
+ cd2401_udelay( 10000L );
/* Return something */
return RTEMS_SUCCESSFUL;
@@ -949,8 +1103,16 @@ int cd2401_startRemoteTx(
int minor
)
{
- cd2401->car = minor; /* Select channel */
- cd2401->stcr = 0x01; /* Send SCHR1 ahead of chars in FIFO */
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable (level);
+
+ cd2401->car = minor; /* Select channel */
+ cd2401->stcr = 0x01; /* Send SCHR1 ahead of chars in FIFO */
+
+ CD2401_RECORD_START_REMOTE_TX_INFO(( minor ));
+
+ rtems_interrupt_enable (level);
/* Return something */
return RTEMS_SUCCESSFUL;
@@ -958,7 +1120,7 @@ int cd2401_startRemoteTx(
/*
- * cd2401_stopRemoreTx
+ * cd2401_stopRemoteTx
*
* Defined as a callback, but it would appear that it is never called. The
* POSIX standard states that when the tcflow() function is called with the
@@ -983,8 +1145,16 @@ int cd2401_stopRemoteTx(
int minor
)
{
- cd2401->car = minor; /* Select channel */
- cd2401->stcr = 0x02; /* Send SCHR2 ahead of chars in FIFO */
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable (level);
+
+ cd2401->car = minor; /* Select channel */
+ cd2401->stcr = 0x02; /* Send SCHR2 ahead of chars in FIFO */
+
+ CD2401_RECORD_STOP_REMOTE_TX_INFO(( minor ));
+
+ rtems_interrupt_enable (level);
/* Return something */
return RTEMS_SUCCESSFUL;
@@ -992,7 +1162,7 @@ int cd2401_stopRemoteTx(
/*
- * cd2401_write
+ * cd2401_write
*
* Initiate DMA output. Termios guarantees that the buffer does not wrap
* around, so we can do DMA strait from the supplied buffer.
@@ -1017,43 +1187,75 @@ int cd2401_write(
int len
)
{
- cd2401->car = minor; /* Select channel */
+ cd2401->car = minor; /* Select channel */
if ( (cd2401->dmabsts & 0x08) == 0 ) {
/* Next buffer is A. Wait for it to be ours. */
- if ( cd2401->atbsts & 0x01 ) {
- CD2401_Channel_Info[minor].wait_buf_A++;
- while ( cd2401->atbsts & 0x01 );
- }
- CD2401_Channel_Info[minor].used_buf_A++;
+ while ( cd2401->atbsts & 0x01 );
+
+ CD2401_Channel_Info[minor].own_buf_A = FALSE;
CD2401_Channel_Info[minor].len = len;
CD2401_Channel_Info[minor].buf = buf;
cd2401->atbadru = (rtems_unsigned16)( ( (rtems_unsigned32) buf ) >> 16 );
cd2401->atbadrl = (rtems_unsigned16)( (rtems_unsigned32) buf );
cd2401->atbcnt = len;
- cd2401->atbsts = 0x03; /* CD2401 owns buffer, int when empty */
+ CD2401_RECORD_WRITE_INFO(( len, buf, 'A' ));
+ cd2401->atbsts = 0x03; /* CD2401 owns buffer, int when empty */
}
else {
/* Next buffer is B. Wait for it to be ours. */
- if ( cd2401->btbsts & 0x01 ) {
- CD2401_Channel_Info[minor].wait_buf_B++;
- while ( cd2401->btbsts & 0x01 );
- }
- CD2401_Channel_Info[minor].used_buf_B++;
+ while ( cd2401->btbsts & 0x01 );
+
+ CD2401_Channel_Info[minor].own_buf_B = FALSE;
CD2401_Channel_Info[minor].len = len;
CD2401_Channel_Info[minor].buf = buf;
cd2401->btbadru = (rtems_unsigned16)( ( (rtems_unsigned32) buf ) >> 16 );
cd2401->btbadrl = (rtems_unsigned16)( (rtems_unsigned32) buf );
cd2401->btbcnt = len;
- cd2401->btbsts = 0x03; /* CD2401 owns buffer, int when empty */
+ CD2401_RECORD_WRITE_INFO(( len, buf, 'B' ));
+ cd2401->btbsts = 0x03; /* CD2401 owns buffer, int when empty */
}
- /* Should TxD interrupts be enabled before I set up the DMA transfer? */
- cd2401->ier |= 0x01; /* enable TxD ints */
+ /* Nuts -- Need TxD ints */
+ CD2401_Channel_Info[minor].txEmpty = FALSE;
+ cd2401->ier |= 0x01;
/* Return something */
return RTEMS_SUCCESSFUL;
}
+#if 0
+/*
+ * cd2401_drainOutput
+ *
+ * Wait for the txEmpty indication on the specified channel.
+ *
+ * Input parameters:
+ * minor - selected channel
+ *
+ * Output parameters: NONE
+ *
+ * Return value: IGNORED
+ *
+ * MUST NOT BE EXECUTED WITH THE CD2401 INTERRUPTS DISABLED!
+ * The txEmpty flag is set by the tx ISR.
+ */
+int cd2401_drainOutput(
+ int minor
+)
+{
+ CD2401_RECORD_DRAIN_OUTPUT_INFO(( CD2401_Channel_Info[minor].txEmpty,
+ CD2401_Channel_Info[minor].own_buf_A,
+ CD2401_Channel_Info[minor].own_buf_B ));
+
+ while( ! (CD2401_Channel_Info[minor].txEmpty &&
+ CD2401_Channel_Info[minor].own_buf_A &&
+ CD2401_Channel_Info[minor].own_buf_B) );
+
+ /* Return something */
+ return RTEMS_SUCCESSFUL;
+}
+#endif
+
/*
* _167Bug_pollRead
@@ -1079,24 +1281,28 @@ int _167Bug_pollRead(
{
int char_not_available;
unsigned char c;
-
+
/* Check for a char in the input FIFO */
- asm volatile( "trap #15 /* Trap to 167Bug (.INSTAT) */
- .short 0x01
- move %%cc, %0 /* Get condition codes */
- andil #4, %0"
- : "=d" (char_not_available) :: "%%cc" );
-
+ asm volatile( "movew #0x1, -(%%sp) /* Code for .INSTAT */
+ movew %1, -(%%sp) /* Channel */
+ trap #15 /* Trap to 167Bug */
+ .short 0x60 /* Code for .REDIR */
+ move %%cc, %0 /* Get condition codes */
+ andil #4, %0" /* Keep the Zero bit */
+ : "=d" (char_not_available) : "d" (minor): "%%cc" );
+
if (char_not_available)
return -1;
-
+
/* Read the char and return it */
- asm volatile( "subq.l #2,%%a7 /* Space for result */
- trap #15 /* Trap to 167 Bug (.INCHR) */
- .short 0x00
- moveb (%%a7)+, %0"
- : "=d" (c) );
-
+ asm volatile( "subq.l #2,%%a7 /* Space for result */
+ movew #0x0, -(%%sp) /* Code for .INCHR */
+ movew %1, -(%%sp) /* Channel */
+ trap #15 /* Trap to 167 Bug */
+ .short 0x60 /* Code for .REDIR */
+ moveb (%%a7)+, %0" /* Pop char into c */
+ : "=d" (c) : "d" (minor) );
+
return (int)c;
}
@@ -1105,7 +1311,7 @@ int _167Bug_pollRead(
* _167Bug_pollWrite
*
* Output buffer through 167Bug. Returns only once every character has been
- * sent (polled output).
+ * sent (polled output).
*
* Input parameters:
* minor - selected channel
@@ -1127,38 +1333,62 @@ int _167Bug_pollWrite(
)
{
const char *endbuf = buf + len;
-
- asm volatile( "pea (%0)
- pea (%1)
- trap #15 /* trap to 167Bug (.OUTSTR) */
- .short 0x21"
- :: "a" (endbuf), "a" (buf) );
-
+
+ asm volatile( "pea (%0) /* endbuf */
+ pea (%1) /* buf */
+ movew #0x21, -(%%sp) /* Code for .OUTSTR */
+ movew %2, -(%%sp) /* Channel */
+ trap #15 /* Trap to 167Bug */
+ .short 0x60" /* Code for .REDIR */
+ :: "a" (endbuf), "a" (buf), "d" (minor) );
+
/* Return something */
return RTEMS_SUCCESSFUL;
}
/*
+ * Print functions: prototyped in bsp.h
+ * Debug printing on Channel 1
+ */
+
+void printk( char *fmt, ... )
+{
+ va_list ap; /* points to each unnamed argument in turn */
+ static char buf[256];
+ unsigned int level;
+
+ _CPU_ISR_Disable(level);
+
+ va_start(ap, fmt); /* make ap point to 1st unnamed arg */
+ vsprintf(buf, fmt, ap); /* send output to buffer */
+
+ BSP_output_string(buf); /* print buffer -- Channel 1 */
+
+ va_end(ap); /* clean up and re-enable interrupts */
+ _CPU_ISR_Enable(level);
+}
+
+
+void BSP_output_string( char * buf )
+{
+ int len = strlen(buf);
+ rtems_status_code sc;
+
+ /* The first argument forces a print to Port2 (ttyS1) */
+ sc = _167Bug_pollWrite(1, buf, len);
+ if (sc != RTEMS_SUCCESSFUL)
+ rtems_fatal_error_occurred (sc);
+}
+
+
+/*
***************
* BOILERPLATE *
***************
*
- * All these functions are prototyped in rtems/c/src/lib/include/console.h,
- * except console_reserve_resources(), which is prototyped in
- * rtems/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
- */
-
-/*
- * Reserve resources consumed by this driver. Allocate enough space in the
- * object table to hold semaphores for 4 minor devices.
+ * All these functions are prototyped in rtems/c/src/lib/include/console.h.
*/
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources (configuration, 4);
-}
/*
* Initialize and register the device
@@ -1229,7 +1459,7 @@ rtems_device_driver console_open(
NULL, /* startRemoteTx */
0 /* outputUsesInterrupts */
};
-
+
#else
static const rtems_termios_callbacks callbacks = {
@@ -1242,7 +1472,7 @@ rtems_device_driver console_open(
cd2401_startRemoteTx, /* startRemoteTx */
1 /* outputUsesInterrupts */
};
-
+
#endif
return rtems_termios_open (major, minor, arg, &callbacks);
diff --git a/c/src/lib/libbsp/m68k/mvme167/fatal/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/fatal/Makefile.am
index 7787c28006..978189a3ce 100644
--- a/c/src/lib/libbsp/m68k/mvme167/fatal/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/fatal/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme167/include/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/include/Makefile.am
index 3d67271c4a..cec9878eb3 100644
--- a/c/src/lib/libbsp/m68k/mvme167/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -25,7 +25,7 @@ TMPINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/bsp.h \
$(PROJECT_INCLUDE)/coverhd.h $(PROJECT_INCLUDE)/page_table.h \
$(PROJECT_INCLUDE)/fatal.h
-all-local: $(TMPINSTALL_FILES)
+all: $(TMPINSTALL_FILES)
EXTRA_DIST = bsp.h coverhd.h fatal.h page_table.h
diff --git a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
index f449e201e3..1a95d9d576 100644
--- a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h
@@ -33,6 +33,24 @@ extern "C" {
/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 4
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
+ * Network driver configuration
+ */
+
+struct rtems_bsdnet_ifconfig;
+extern int uti596_attach(struct rtems_bsdnet_ifconfig * pConfig );
+#define RTEMS_BSP_NETWORK_DRIVER_NAME "uti1"
+#define RTEMS_BSP_NETWORK_DRIVER_ATTACH uti596_attach
+
+/*
* This is NOT the base address of local RAM!
* This is the base local address of the VMEbus short I/O space. A local
* access to this space results in a A16 VMEbus I/O cycle. This base address
@@ -394,7 +412,27 @@ typedef volatile struct cd2401_regs_ {
/* CD2401 is clocked at 20 MHz */
#define CD2401_CLK_RATE 20000000
-void console_reserve_resources( rtems_configuration_table *configuration );
+/*
+ * Debug print functions: implemented in console.c
+ */
+void printk( char *fmt, ... );
+void BSP_output_string( char * buf );
+
+/*
+ * Representation of 82596CA LAN controller: Memory Map
+ */
+typedef volatile struct i82596_regs_ {
+ unsigned short port_lower; /* 0xFFF46000 */
+ unsigned short port_upper; /* 0xFFF46002 */
+ unsigned long chan_attn; /* 0xFFF46004 */
+} i82596_regs;
+
+/*
+ * Base address of the 82596.
+ */
+#define i82596 ((i82596_regs * const) 0xFFF46000)
+
+
/* BSP-wide functions */
diff --git a/c/src/lib/libbsp/m68k/mvme167/network/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/network/Makefile.am
index 601d7cd3e2..795c36566f 100644
--- a/c/src/lib/libbsp/m68k/mvme167/network/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/network/Makefile.am
@@ -9,8 +9,6 @@ PGM = $(ARCH)/network.rel
C_FILES = network.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-H_FILES = uti596.h
-
OBJS = $(C_O_FILES)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
@@ -20,6 +18,8 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
+
$(PGM): $(OBJS)
$(make-rel)
@@ -31,6 +31,6 @@ endif
.PRECIOUS: $(PGM)
-EXTRA_DIST = network.c uti596.h
+EXTRA_DIST = network.c
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/m68k/mvme167/network/network.c b/c/src/lib/libbsp/m68k/mvme167/network/network.c
index bcfc07ef00..c8a2e71734 100644
--- a/c/src/lib/libbsp/m68k/mvme167/network/network.c
+++ b/c/src/lib/libbsp/m68k/mvme167/network/network.c
@@ -1,4 +1,4 @@
-/* uti596.c: An 82596 ethernet driver for rtems-bsd.
+/* network.c: An 82596 ethernet driver for rtems-bsd.
*
* $Id$
*/
@@ -9,36 +9,36 @@
* Selectively define to debug the network driver. If you define any of these
* you must run with polled console I/O.
*/
-
-#define DBG_596
-#define DBG_596_RFA
+
+/*
+#define DBG_ADD_CMD
+#define DBG_WAIT
+#define DBG_SEND
+#define DBG_MEM
+#define DBG_SELFTEST_CMD
+#define DBG_DUMP_CMD
+#define DBG_RESET
+#define DBG_ATTACH
#define DBG_START
#define DBG_INIT
-#define DBG_INIT_2
-/*#define DBG_INIT_3*/
-#define DBG_RESET
-#define DBG_VERSION
+#define DBG_STOP
+#define DBG_RX
#define DBG_ISR
-#define DBG_RAW_ISR
-#define DBG_596_RFD
-#define DBG_FR
-#define DBG_RAW
-#define DBG_ATTACH
-#define DBG_POLLED_CMD
-#define DBG_ADD
-#define DBG_SUPPLY_FD
-
+#define DBG_IOCTL
+#define DBG_STAT
+#define DBG_PACKETS
+*/
/*
* Default number of buffer descriptors and buffer sizes.
*/
-#define RX_BUF_COUNT 15
-#define TX_BUF_COUNT 4
-#define TX_BD_PER_BUF 4
+#define RX_BUF_COUNT 15
+#define TX_BUF_COUNT 4
+#define TX_BD_PER_BUF 4
-#define RBUF_SIZE 1520
+#define RBUF_SIZE 1520
-#define UTI_596_ETH_MIN_SIZE 60
+#define UTI_596_ETH_MIN_SIZE 60
/*
* RTEMS events
@@ -62,21 +62,33 @@
#include <netinet/if_ether.h>
#include "uti596.h"
-#include "netexterns.h"
+/* If we are running interrupt driven I/O no debug output is printed */
#if CD2401_POLLED_IO == 1
- #define printk(arglist) printk arglist;
+ #define printk(arglist) printk arglist;
#else
- #define printk(arglist)
+ #define printk(arglist)
#endif
-#define UTI_596_ASSERT( condition, str ) if (!( condition ) ) { printk((str)) }
+#define UTI_596_ASSERT( condition, str ) if (!( condition ) ) { printk((str)) }
+
+/* Types of PORT commands */
+#define UTI596_RESET_PORT_FUNCTION 0
+#define UTI596_SELFTEST_PORT_FUNCTION 1
+#define UTI596_SCP_PORT_FUNCTION 2
+#define UTI596_DUMP_PORT_FUNCTION 3
-int count_rx = 0;
-i596_rfd *pISR_Rfd;
+/* Types of waiting for commands */
+#define UTI596_NO_WAIT 0
+#define UTI596_WAIT_FOR_CU_ACCEPT 1
+#define UTI596_WAIT_FOR_INITIALIZATION 2
+#define UTI596_WAIT_FOR_STAT_C 3
+/* Device dependent data structure */
static uti596_softc_ uti596_softc;
+/* Globals */
+int count_rx = 0;
static int scbStatus;
static rtems_status_code sc;
static i596_cmd *pIsrCmd;
@@ -86,131 +98,1576 @@ static i596_rfd *pIsrRfd;
* Initial 596 configuration
*/
char uti596initSetup[] = {
- 0x0E, /* Byte 0: length, prefetch off ( no RBD's ) */
- 0xC8, /* Byte 1: fifo to 8, monitor off */
- 0x40, /* Byte 2: don't save bad frames ( was save= 80, use intel's 40 )*/
- 0x2E, /* Byte 3: No source address insertion, 8 byte preamble */
- 0x00, /* Byte 4: priority and backoff defaults */
- 0x60, /* Byte 5: interframe spacing */
- 0x00, /* Byte 6: slot time LSB */
- 0xf2, /* Byte 7: slot time and retries */
- 0x0E, /* Byte 8: not promisc, disable bcast, tx no crs, crc inserted 32bit, 802.3 framing */
- 0x08, /* Byte 9: collision detect */
- 0x40, /* Byte 10: minimum frame length */
- 0xfb, /* Byte 11: tried C8 same as byte 1 in bits 6-7, else ignored*/
- 0x00, /* Byte 12: disable full duplex */
- 0x3f /* Byte 13: no multi IA, backoff enabled */
+ 0x0E, /* Byte 0: length, prefetch off ( no RBD's ) */
+ 0xC8, /* Byte 1: fifo to 8, monitor off */
+ 0x40, /* Byte 2: don't save bad frames ( was save= 80, use intel's 40 )*/
+ 0x2E, /* Byte 3: No source address insertion, 8 byte preamble */
+ 0x00, /* Byte 4: priority and backoff defaults */
+ 0x60, /* Byte 5: interframe spacing */
+ 0x00, /* Byte 6: slot time LSB */
+ 0xf2, /* Byte 7: slot time and retries */
+ 0x0C, /* Byte 8: not promisc, enable bcast, tx no crs, crc inserted 32bit, 802.3 framing */
+ 0x08, /* Byte 9: collision detect */
+ 0x40, /* Byte 10: minimum frame length */
+ 0xfb, /* Byte 11: tried C8 same as byte 1 in bits 6-7, else ignored*/
+ 0x00, /* Byte 12: disable full duplex */
+ 0x3f /* Byte 13: no multi IA, backoff enabled */
};
-/* Required RTEMS network driver functions and tasks (reset daemon extra) */
-
-static void uti596_start( struct ifnet * );
-void uti596_init( void * );
-void uti596_stop( uti596_softc_ * );
-void uti596_txDaemon( void * );
-void uti596_rxDaemon( void * );
-void uti596_resetDaemon( void * );
-rtems_isr uti596_DynamicInterruptHandler (rtems_vector_number );
-static int uti596_ioctl( struct ifnet *, int, caddr_t );
-void uti596_stats( uti596_softc_ * );
-
/* Local Routines */
-void uti596_initialize_hardware( uti596_softc_ * );
-void uti596_initMem( uti596_softc_ * );
-int uti596_initRFA( int );
-void uti596addPolledCmd( i596_cmd * );
-void uti596Diagnose( int );
-i596_rfd * uti596dequeue( i596_rfd ** );
-void uti596reset( void );
-void uti596_reset_hardware( uti596_softc_ *);
-void uti596clearListStatus( i596_rfd * );
-void send_packet( struct ifnet *, struct mbuf * );
-void uti596addCmd( i596_cmd *pCmd );
-void uti596supplyFD( i596_rfd * );
-void uti596append( i596_rfd ** , i596_rfd * );
-
-void printk_time( void );
-void dump_scb( void );
-
-#ifdef DBG_INIT_3
+static unsigned long word_swap ( unsigned long );
+static void * malloc_16byte_aligned ( void **, void ** adjusted_pointer, size_t );
+RTEMS_INLINE_ROUTINE void uti596_writePortFunction ( void *, unsigned long );
+RTEMS_INLINE_ROUTINE void uti596_portReset( void );
+static unsigned long uti596_portSelfTest( i596_selftest * );
+static int uti596_portDump ( i596_dump_result * );
+static int uti596_wait ( uti596_softc_ *, unsigned8 );
+static int uti596_issueCA ( uti596_softc_ *, unsigned8 );
+static void uti596_addCmd ( i596_cmd * );
+static void uti596_addPolledCmd ( i596_cmd * );
+static void uti596_CU_dump ( i596_dump_result * );
+static void uti596_dump_scb ( void );
+static int uti596_setScpAndScb ( uti596_softc_ * );
+static int uti596_diagnose ( void );
+static int uti596_configure ( uti596_softc_ * );
+static int uti596_IAsetup ( uti596_softc_ * );
+static int uti596_initTBD ( uti596_softc_ * );
+static int uti596_initRFA ( int );
+static void uti596_initMem ( uti596_softc_ * );
+static void uti596_initialize ( uti596_softc_ * );
+static void uti596_initialize_hardware ( uti596_softc_ * );
+static void uti596_reset_hardware ( uti596_softc_ *);
+static void uti596_reset ( void );
+static void uti596_clearListStatus ( i596_rfd * );
+static i596_rfd * uti596_dequeue ( i596_rfd ** );
+static void uti596_append ( i596_rfd ** , i596_rfd * );
+static void uti596_supplyFD ( i596_rfd * );
+static void send_packet ( struct ifnet *, struct mbuf * );
+
+
+/* Required RTEMS network driver functions and tasks (plus reset daemon) */
+
+static void uti596_start ( struct ifnet * );
+void uti596_init ( void * );
+void uti596_stop ( uti596_softc_ * );
+void uti596_txDaemon ( void * );
+void uti596_rxDaemon ( void * );
+void uti596_resetDaemon( void * );
+rtems_isr uti596_DynamicInterruptHandler ( rtems_vector_number );
+static int uti596_ioctl ( struct ifnet *, int, caddr_t );
+void uti596_stats ( uti596_softc_ * );
+
+#ifdef DBG_PACKETS
+static void dumpQ( void );
+static void show_buffers( void );
+static void show_queues( void );
static void print_eth ( unsigned char * );
static void print_hdr ( unsigned char * );
static void print_pkt ( unsigned char * );
static void print_echo ( unsigned char * );
#endif
-int uti596dump( char * );
-void dumpQ( void );
-void show_buffers( void );
-void show_queues( void );
-/* Helper function for reading/writing big endian memory structures */
-unsigned long word_swap(unsigned long);
+
+/*
+ * word_swap
+ *
+ * Return a 32 bit value, swapping the upper and lower words first.
+ *
+ * Input parameters:
+ * val - 32 bit value to swap
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * Input value with upper and lower 16-bit words swapped
+ */
+static unsigned long word_swap(
+ unsigned long val
+)
+{
+ return (((val >> 16)&(0x0000ffff)) | ((val << 16)&(0xffff0000)));
+}
+
+
+/*
+ * malloc_16byte_aligned
+ *
+ * Allocate a block of a least nbytes aligned on a 16-byte boundary.
+ * Clients are responsible to store both the real address and the adjusted
+ * address. The real address must be used to free the block.
+ *
+ * Input parameters:
+ * real_pointer - pointer to a void * pointer in which to store the starting
+ * address of the block. Required for free.
+ * adjusted_pointer - pointer to a void * pointer in which to store the
+ * starting address of the block rounded up to the next
+ * 16 byte boundary.
+ * nbytes - number of bytes of storage requested
+ *
+ * Output parameters:
+ * real_pointer - starting address of the block.
+ * adjusted_pointer - starting address of the block rounded up to the next
+ * 16 byte boundary.
+ *
+ * Return value:
+ * starting address of the block rounded up to the next 16 byte boundary.
+ * NULL if no storage was allocated.
+ */
+static void * malloc_16byte_aligned(
+ void ** real_pointer,
+ void ** adjusted_pointer,
+ size_t nbytes
+)
+{
+ *real_pointer = malloc( nbytes + 0xF, 0, M_NOWAIT );
+ *adjusted_pointer = (void *)(((unsigned long)*real_pointer + 0xF ) & 0xFFFFFFF0 );
+ return *adjusted_pointer;
+}
+
+
+/*
+ * uti596_scp_alloc
+ *
+ * Allocate a new scp, possibly freeing a previously allocated one.
+ *
+ * Input parameters:
+ * sc - pointer to the global uti596_softc in which to store pointers
+ * to the newly allocated block.
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * Pointer to the newly allocated, 16-byte aligned scp.
+ */
+static i596_scp * uti596_scp_alloc(
+ uti596_softc_ * sc
+)
+{
+ if( sc->base_scp != NULL ) {
+ #ifdef DBG_MEM
+ printk(("uti596_scp_alloc: Already have an SCP at %p\n", sc->base_scp))
+ #endif
+ return sc->pScp;
+ }
+
+ /* allocate enough memory for the Scp block to be aligned on 16 byte boundary */
+ malloc_16byte_aligned( (void *)&(sc->base_scp), (void *)&(sc->pScp), sizeof( i596_scp ) );
+
+ #ifdef DBG_MEM
+ printk(("uti596_scp_alloc: Scp base address is %p\n", sc->base_scp))
+ printk(("uti596_scp_alloc: Scp aligned address is : %p\n",sc->pScp))
+ #endif
+
+ return sc->pScp;
+}
+
+
+/*
+ * uti596_writePortFunction
+ *
+ * Write the command into the PORT.
+ *
+ * Input parameters:
+ * addr - 16-byte aligned address to write into the PORT.
+ * cmd - 4-bit cmd to write into the PORT
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ *
+ * The Motorola manual swapped the high and low registers.
+ */
+RTEMS_INLINE_ROUTINE void uti596_writePortFunction(
+ void * addr,
+ unsigned long cmd
+)
+{
+ i82596->port_lower = (unsigned short)(((unsigned long)addr & 0xFFF0) | cmd);
+ i82596->port_upper = (unsigned short)(((unsigned long)addr >> 16 ) & 0xFFFF);
+}
+
+
+/*
+ * uti596_portReset
+ *
+ * Issue a port Reset to the uti596
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+RTEMS_INLINE_ROUTINE void uti596_portReset( void )
+{
+ uti596_writePortFunction( NULL, UTI596_RESET_PORT_FUNCTION );
+}
+
+
+/*
+ * uti596_portSelfTest
+ *
+ * Perform a self-test. Wait for up to 1 second for the test to
+ * complete. Normally, the test should complete in a very short time,
+ * so busy waiting is not an issue.
+ *
+ * Input parameters:
+ * stp - pointer to a 16-byte aligned uti596_selftest structure.
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 32-bit result field if successful, -1 otherwise.
+ */
+static unsigned long uti596_portSelfTest(
+ i596_selftest * stp
+)
+{
+ rtems_interval ticks_per_second, start_ticks, end_ticks;
+
+ stp->results = 0xFFFFFFFF;
+ uti596_writePortFunction( stp, UTI596_SELFTEST_PORT_FUNCTION );
+
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ end_ticks = start_ticks + ticks_per_second;
+
+ do {
+ if( stp->results != 0xFFFFFFFF )
+ break;
+ else
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ } while (start_ticks <= end_ticks);
+
+ if (start_ticks > end_ticks ) {
+ #ifdef DBG_SELFTEST_CMD
+ printk(("uti596_selftest: Timed out\n" ))
+ #endif
+ return -1;
+ }
+ else {
+ #ifdef DBG_SELFTEST_CMD
+ printk(("uti596_selftest: Succeeded with signature = 0x%08x, result = 0x%08x\n",
+ stp->signature,
+ stp->results))
+ #endif
+ return stp->results;
+ }
+}
+
+
+/*
+ * uti596_portDump
+ *
+ * Perform a dump Wait for up to 1 second for the test to
+ * complete. Normally, the test should complete in a very short time,
+ * so busy waiting is not an issue.
+ *
+ * Input parameters:
+ * dp - pointer to a 16-byte aligned uti596_dump structure.
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 16-bit dump_status field if successful, -1 otherwise.
+ */
+static int uti596_portDump(
+ i596_dump_result * dp
+)
+{
+ rtems_interval ticks_per_second, start_ticks, end_ticks;
+
+ dp->dump_status = 0;
+ uti596_writePortFunction( dp, UTI596_DUMP_PORT_FUNCTION );
+
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ end_ticks = start_ticks + ticks_per_second;
+
+ do {
+ if( dp->dump_status != 0xA006 )
+ break;
+ else
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ } while (start_ticks <= end_ticks);
+
+ if (start_ticks > end_ticks ) {
+ #ifdef DBG_DUMP_CMD
+ printk(("uti596_dump: Timed out with dump at 0x%08x\n", (unsigned long)dp ))
+ #endif
+ return -1;
+ }
+ else {
+ #ifdef DBG_DUMP_CMD
+ printk(("uti596_dump: Succeeded with dump at = 0x%08x\n", (unsigned long)dp ))
+ #endif
+ return dp->dump_status;
+ }
+}
+
+
+/*
+ * uti596_wait
+ *
+ * Wait for a certain condition.
+ *
+ * Input parameters:
+ * sc - pointer to the uti596_softc struct
+ * wait_type - UTI596_NO_WAIT
+ * UTI596_WAIT_FOR_CU_ACCEPT
+ * UTI596_WAIT_FOR_INITIALIZATION
+ * UTI596_WAIT_FOR_STAT_C
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise.
+ */
+static int uti596_wait(
+ uti596_softc_ *sc,
+ unsigned8 waitType
+)
+{
+ rtems_interval ticks_per_second, start_ticks, end_ticks;
+
+ switch( waitType ) {
+ case UTI596_NO_WAIT:
+ return 0;
+
+ case UTI596_WAIT_FOR_CU_ACCEPT:
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ end_ticks = start_ticks + ticks_per_second;
+
+ do {
+ if (sc->scb.command == 0)
+ break;
+ else
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+
+ } while (start_ticks <= end_ticks);
+
+ if( (sc->scb.command != 0) || (start_ticks > end_ticks) ) {
+ printf("i82596 timed out with status %x, cmd %x.\n",
+ sc->scb.status, sc->scb.command);
+ return -1;
+ }
+ else
+ return 0;
+
+ case UTI596_WAIT_FOR_INITIALIZATION:
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ end_ticks = start_ticks + ticks_per_second;
+
+ do {
+ if( !sc->iscp.busy )
+ break;
+ else
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ } while (start_ticks <= end_ticks);
+
+ if (start_ticks > end_ticks ) {
+ #ifdef DBG_WAIT
+ printk(("uti596_setScpAndScb: Timed out\n" ))
+ #endif
+ return -1;
+ }
+ else {
+ #ifdef DBG_WAIT
+ printk(("uti596_setScpAndScb: Succeeded\n" ))
+ #endif
+ return 0;
+ }
+
+ case UTI596_WAIT_FOR_STAT_C:
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second);
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ end_ticks = start_ticks + ticks_per_second;
+
+ do {
+ if( *sc->pCurrent_command_status & STAT_C )
+ break;
+ else
+ rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks);
+ } while (start_ticks <= end_ticks);
+
+ if (start_ticks > end_ticks ) {
+ #ifdef DBG_WAIT
+ printk(("uti596_initMem: timed out - STAT_C not obtained\n" ))
+ #endif
+ return -1;
+ }
+ else {
+ #ifdef DBG_WAIT
+ printk(("uti596_initMem: STAT_C obtained OK\n" ))
+ #endif
+ return 0;
+ }
+ }
+ return -1;
+}
+
+
+/*
+ * uti596_issueCA
+ *
+ * Issue a Channel Attention command. Possibly wait for the
+ * command to start or complete.
+ *
+ * Input parameters:
+ * sc - pointer to the uti596_softc
+ * wait_type - UTI596_NO_WAIT
+ * UTI596_WAIT_BEGIN
+ * UTI596_WAIT_COMPLETION
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise.
+ */
+static int uti596_issueCA(
+ uti596_softc_ *sc,
+ unsigned8 waitType
+)
+{
+ /* Issue Channel Attention */
+ i82596->chan_attn = 0x00000000;
+
+ return (uti596_wait ( sc, waitType ));
+}
+
+
+/*
+ * uti596_addCmd
+ *
+ * Add a uti596_cmd onto the end of the CBL command chain,
+ * or to the start if the chain is empty.
+ *
+ * Input parameters:
+ * pCmd - a pointer to the command to be added.
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+static void uti596_addCmd(
+ i596_cmd *pCmd
+)
+{
+ ISR_Level level;
+
+ #ifdef DBG_ADD_CMD
+ printk(("uti596_addCmd: Adding command 0x%x\n", pCmd -> command ))
+ #endif
+
+ /* Mark command as last in list, to return an interrupt */
+ pCmd->command |= (CMD_EOL | CMD_INTR );
+ pCmd->status = 0;
+ pCmd->next = I596_NULL;
+
+ _ISR_Disable(level);
+
+ if (uti596_softc.pCmdHead == I596_NULL) {
+ uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = pCmd;
+ uti596_softc.scb.cmd_pointer = word_swap ((unsigned long)pCmd);
+
+ uti596_wait ( &uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT );
+ uti596_softc.scb.command = CUC_START;
+ uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT );
+
+ _ISR_Enable(level);
+ }
+ else {
+ uti596_softc.pCmdTail->next = (i596_cmd *) word_swap ((unsigned long)pCmd);
+ uti596_softc.pCmdTail = pCmd;
+ _ISR_Enable(level);
+ }
+
+ #ifdef DBG_ADD_CMD
+ printk(("uti596_addCmd: Scb status & command 0x%x 0x%x\n",
+ uti596_softc.scb.status,
+ uti596_softc.scb.command ))
+ #endif
+}
+
+
+/*
+ * uti596_addPolledCmd
+ *
+ * Add a single uti596_cmd to the end of the command block list
+ * for processing, send a CU_START and wait for its acceptance
+ *
+ * Input parameters:
+ * sc - a pointer to the uti596_softc struct
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_addPolledCmd(
+ i596_cmd *pCmd
+)
+{
+
+ #ifdef DBG_ADD_CMD
+ printk(("uti596_addPolledCmd: Adding command 0x%x\n", pCmd -> command ))
+ #endif
+
+ pCmd->status = 0;
+ pCmd->command |= CMD_EOL ; /* only command in list*/
+ pCmd->next = I596_NULL;
+
+ uti596_wait ( &uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT );
+
+ uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = pCmd;
+ uti596_softc.scb.cmd_pointer = word_swap((unsigned long)pCmd);
+ uti596_softc.scb.command = CUC_START;
+ uti596_issueCA ( &uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT );
+
+ uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = I596_NULL;
+ uti596_softc.scb.cmd_pointer = (unsigned long) I596_NULL;
+
+ #ifdef DBG_ADD_CMD
+ printk(("uti596_addPolledCmd: Scb status & command 0x%x 0x%x\n",
+ uti596_softc.scb.status,
+ uti596_softc.scb.command ))
+ #endif
+}
+
+
+/*
+ * uti596_CU_dump
+ *
+ * Dump the LANC 82596 registers
+ * The outcome is the same as the portDump() but executed
+ * via the CU instead of via a PORT access.
+ *
+ * Input parameters:
+ * drp - a pointer to a i596_dump_result structure.
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+static void uti596_CU_dump ( i596_dump_result * drp)
+{
+ i596_dump dumpCmd;
+
+ dumpCmd.cmd.command = CmdDump;
+ dumpCmd.cmd.next = I596_NULL;
+ dumpCmd.pData = (char *) drp;
+ uti596_softc.cmdOk = 0;
+ uti596_addCmd ( (i596_cmd *) &dumpCmd );
+
+}
+
+
+/*
+ * uti596_dump_scb
+ *
+ * Dump the system control block
+ * This function expands to nothing when using interrupt driven I/O
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+static void uti596_dump_scb ( void )
+{
+ printk(("status 0x%x\n",uti596_softc.scb.status))
+ printk(("command 0x%x\n",uti596_softc.scb.command))
+ printk(("cmd 0x%x\n",(int)uti596_softc.scb.pCmd))
+ printk(("rfd 0x%x\n",(int)uti596_softc.scb.pRfd))
+ printk(("crc_err 0x%x\n",uti596_softc.scb.crc_err))
+ printk(("align_err 0x%x\n",uti596_softc.scb.align_err))
+ printk(("resource_err 0x%x\n",uti596_softc.scb.resource_err ))
+ printk(("over_err 0x%x\n",uti596_softc.scb.over_err))
+ printk(("rcvdt_err 0x%x\n",uti596_softc.scb.rcvdt_err))
+ printk(("short_err 0x%x\n",uti596_softc.scb.short_err))
+ printk(("t_on 0x%x\n",uti596_softc.scb.t_on))
+ printk(("t_off 0x%x\n",uti596_softc.scb.t_off))
+}
+
+
+/*
+ * uti596_setScpAndScb
+ *
+ * Issue the first channel attention after reset and wait for the busy
+ * field to clear in the iscp.
+ *
+ * Input parameters:
+ * sc - pointer to the global uti596_softc
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise.
+ */
+static int uti596_setScpAndScb(
+ uti596_softc_ * sc
+)
+{
+ /* set the busy flag in the iscp */
+ sc->iscp.busy = 1;
+
+ /* the command block list (CBL) is empty */
+ sc->scb.command = 0;
+ sc->scb.cmd_pointer = (unsigned long) I596_NULL; /* all 1's */
+ sc->pCmdHead = sc->scb.pCmd = I596_NULL; /* all 1's */
+
+ uti596_writePortFunction( sc->pScp, UTI596_SCP_PORT_FUNCTION );
+
+ /* Issue CA: pass the scb address to the 596 */
+ return ( uti596_issueCA ( sc, UTI596_WAIT_FOR_INITIALIZATION ) );
+}
+
+
+/*
+ * uti596_diagnose
+ *
+ * Send a diagnose command to the CU
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise
+ */
+static int uti596_diagnose( void )
+{
+ i596_cmd diagnose;
+
+ diagnose.command = CmdDiagnose;
+ diagnose.status = 0;
+ uti596_softc.pCurrent_command_status = &diagnose.status;
+ uti596_addPolledCmd(&diagnose);
+ return (uti596_wait ( &uti596_softc, UTI596_WAIT_FOR_STAT_C ));
+
+ #ifdef DBG_INIT
+ printk(("Status diagnostic: 0xa000 is a success ... 0x%2.2x\n", diagnose.status))
+ #endif
+}
+
+
+/*
+ * uti596_configure
+ *
+ * Send the CU a configure command with the desired
+ * configuration structure
+ *
+ * Input parameters:
+ * sc - a pointer to the uti596_softc struct
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise
+ */
+static int uti596_configure (
+ uti596_softc_ * sc
+)
+{
+ sc->set_conf.cmd.command = CmdConfigure;
+ memcpy (sc->set_conf.data, uti596initSetup, 14);
+ uti596_addPolledCmd( (i596_cmd *) &sc->set_conf);
+
+ /* Poll for successful command completion */
+ sc->pCurrent_command_status = &(sc->set_conf.cmd.status);
+ return ( uti596_wait ( sc, UTI596_WAIT_FOR_STAT_C ) );
+}
+
+
+/*
+ * uti596_IAsetup
+ *
+ * Send the CU an Individual Address setup command with
+ * the ethernet hardware address
+ *
+ * Input parameters:
+ * sc - a pointer to the uti596_softc struct
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise
+ */
+static int uti596_IAsetup (
+ uti596_softc_ * sc
+)
+{
+ int i;
+
+ sc->set_add.cmd.command = CmdSASetup;
+ for ( i=0; i<6; i++) {
+ sc->set_add.data[i]=sc->arpcom.ac_enaddr[i];
+ }
+ sc->cmdOk = 0;
+ uti596_addPolledCmd((i596_cmd *)&sc->set_add);
+
+ /* Poll for successful command completion */
+ sc->pCurrent_command_status = &(sc->set_add.cmd.status);
+ return ( uti596_wait ( sc, UTI596_WAIT_FOR_STAT_C ) );
+}
+
+
+/*
+ * uti596_initTBD
+ *
+ * Initialize transmit buffer descriptors
+ * dynamically allocate mem for the number of tbd's required
+ *
+ * Input parameters:
+ * sc - a pointer to the uti596_softc struct
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * 0 if successful, -1 otherwise
+ */
+static int uti596_initTBD ( uti596_softc_ * sc )
+{
+ int i;
+ i596_tbd *pTbd, *pPrev;
+
+ /* Set up a transmit command with a tbd ready */
+ sc->pLastUnkRFD = I596_NULL;
+ sc->pTxCmd = (i596_tx *) calloc (1,sizeof (struct i596_tx) );
+ sc->pTbd = (i596_tbd *) calloc (1,sizeof (struct i596_tbd) );
+ if ((sc->pTxCmd == NULL) || (sc->pTbd == NULL)) {
+ return -1;
+ }
+ sc->pTxCmd->pTbd = (i596_tbd *) word_swap ((unsigned long) sc->pTbd);
+ sc->pTxCmd->cmd.command = CMD_FLEX|CmdTx;
+ sc->pTxCmd->pad = 0;
+ sc->pTxCmd->count = 0; /* all bytes are in list of TBD's */
+
+ pPrev = pTbd = sc->pTbd;
+
+ /* Allocate a linked list of tbd's each with it's 'next' field written
+ * with upper and lower words swapped (for big endian), and mark the end.
+ */
+ for ( i=0; i<sc->txBdCount; i++) {
+ if ( (pTbd = (i596_tbd *) calloc (1,sizeof (struct i596_tbd) )) == NULL ) {
+ return -1;
+ }
+ pPrev->next = (i596_tbd *) word_swap ((unsigned long) pTbd);
+ pPrev = pTbd;
+ }
+ pTbd->next = I596_NULL;
+ return 0;
+}
+
+
+/*
+ * uti596_initRFA
+ *
+ * Initialize the Receive Frame Area
+ * dynamically allocate mem for the number of rfd's required
+ *
+ * Input parameters:
+ * sc - a pointer to the uti596_softc struct
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * # of buffer descriptors successfully allocated
+ */
+static int uti596_initRFA( int num )
+{
+ i596_rfd *pRfd;
+ int i = 0;
+
+ #ifdef DBG_INIT
+ printk(("uti596_initRFA: begins\n Requested frame descriptors ... %d.\n", num))
+ #endif
+
+ /*
+ * Create the first RFD in the RFA
+ */
+ pRfd = (i596_rfd *) calloc (1, sizeof (struct i596_rfd));
+ if ( !pRfd ) {
+ printk(("Can't allocate first buffer.\n"))
+ return 0;
+ }
+ else {
+ uti596_softc.countRFD = 1;
+ uti596_softc.pBeginRFA = uti596_softc.pEndRFA = pRfd;
+ }
+
+ /* Create remaining RFDs */
+ for (i = 1; i < num; i++) {
+ pRfd = (i596_rfd *) calloc (1, sizeof (struct i596_rfd) );
+ if ( pRfd != NULL ) {
+ uti596_softc.countRFD++; /* update count */
+ uti596_softc.pEndRFA->next =
+ (i596_rfd *) word_swap ((unsigned long) pRfd); /* write the link */
+ uti596_softc.pEndRFA = pRfd; /* move the end */
+ }
+ else {
+ printk(("Can't allocate all buffers: only %d allocated\n", i))
+ break;
+ }
+ } /* end for */
+
+ uti596_softc.pEndRFA->next = I596_NULL;
+ UTI_596_ASSERT(uti596_softc.countRFD == RX_BUF_COUNT,"INIT:WRONG RFD COUNT\n" )
+
+ #ifdef DBG_INIT
+ printk (("uti596_initRFA: Head of RFA is buffer %p \n\
+ uti596_initRFA: End of RFA is buffer %p \n",
+ uti596_softc.pBeginRFA, uti596_softc.pEndRFA ))
+ #endif
+
+ /* Walk and initialize the RFD's */
+ for ( pRfd = uti596_softc.pBeginRFA;
+ pRfd != I596_NULL;
+ pRfd = (i596_rfd *) word_swap ((unsigned long)pRfd->next) )
+ {
+ pRfd->cmd = 0x0000;
+ pRfd->stat = 0x0000;
+ pRfd->pRbd = I596_NULL;
+ pRfd->count = 0; /* number of bytes in buffer: usually less than size */
+ pRfd->size = 1532; /* was 1532; buffer size ( All RBD ) */
+ } /* end for */
+
+ /* mark the last RFD as the last one in the RDL */
+ uti596_softc.pEndRFA -> cmd = CMD_EOL;
+ uti596_softc.pSavedRfdQueue =
+ uti596_softc.pEndSavedQueue = I596_NULL; /* initially empty */
+
+ uti596_softc.savedCount = 0;
+ uti596_softc.nop.cmd.command = CmdNOp; /* initialize the nop command */
+
+ return (i); /* the number of allocated buffers */
+}
+
+
+/*
+ * uti596_initMem
+ *
+ * Initialize the 82596 memory structures for Tx and Rx
+ * dynamically allocate mem for the number of tbd's required
+ *
+ * Input parameters:
+ * sc - a pointer to the uti596_softc struct
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_initMem(
+ uti596_softc_ * sc
+)
+{
+ int i;
+
+ #ifdef DBG_INIT
+ printk(("uti596_initMem: begins\n"))
+ #endif
+
+ sc->resetDone = 0;
+
+ /*
+ * Set up receive frame area (RFA)
+ */
+ i = uti596_initRFA( sc->rxBdCount );
+ if ( i < sc->rxBdCount ) {
+ printk(("init_rfd: only able to allocate %d receive frame descriptors\n", i))
+ }
+
+ /*
+ * Write the SCB with a pointer to the receive frame area
+ * and keep a pointer for our use.
+ */
+ sc->scb.rfd_pointer = word_swap((unsigned long)sc->pBeginRFA);
+ sc->scb.pRfd = sc->pBeginRFA;
+
+ /*
+ * Diagnose the health of the board
+ */
+ uti596_diagnose();
+
+ /*
+ * Configure the 82596
+ */
+ uti596_configure( sc );
+
+ /*
+ * Set up the Individual (hardware) Address
+ */
+ uti596_IAsetup ( sc );
+
+ /*
+ * Initialize the transmit buffer descriptors
+ */
+ uti596_initTBD( sc );
+
+ /* Padding used to fill short tx frames */
+ memset ( &sc->zeroes, 0, 64);
+
+ /* now need ISR */
+ sc->resetDone = 1;
+}
+
+/*
+ * uti596_initialize
+ *
+ * Reset the 82596 and initialize it with a new SCP.
+ *
+ * Input parameters:
+ * sc - pointer to the uti596_softc
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_initialize(
+ uti596_softc_ *sc
+)
+{
+ /* Reset the device. Stops it from doing whatever it might be doing. */
+ uti596_portReset();
+
+ /* Get a new System Configuration Pointer */
+ uti596_scp_alloc( sc );
+
+ /* write the SYSBUS: interrupt pin active high, LOCK disabled,
+ * internal triggering, linear mode
+ */
+ sc->pScp->sysbus = 0x54;
+
+ /* provide the iscp to the scp, keep a pointer for our use */
+ sc->pScp->iscp_pointer = word_swap((unsigned long)&sc->iscp);
+ sc->pScp->iscp = &sc->iscp;
+
+ /* provide the scb to the iscp, keep a pointer for our use */
+ sc->iscp.scb_pointer = word_swap((unsigned long)&sc->scb);
+ sc->iscp.scb = &sc->scb;
+
+ #ifdef DBG_INIT
+ printk(("uti596_initialize: Starting i82596.\n"))
+ #endif
+
+ /* Set up the 82596 */
+ uti596_setScpAndScb( sc );
+
+ /* clear the scb command word */
+ sc->scb.command = 0;
+}
+
+
+/*
+ * uti596_initialize_hardware
+ *
+ * Reset the 82596 and initialize it with a new SCP. Enable bus snooping.
+ * Install the interrupt handlers.
+ *
+ * Input parameters:
+ * sc - pointer to the uti596_softc
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_initialize_hardware(
+ uti596_softc_ *sc
+)
+{
+ rtems_isr_entry dummy;
+
+ printk(("uti596_initialize_hardware: begins\n"))
+
+ /* Get the PCCChip2 to assert bus snooping signals on behalf of the i82596 */
+ pccchip2->LANC_berr_ctl = 0x40;
+
+ uti596_initialize( sc );
+
+ /*
+ * Configure interrupt control in PCCchip2
+ */
+ pccchip2->LANC_error = 0xff; /* clear status register */
+ pccchip2->LANC_int_ctl = 0x5d; /* lvl 5, enabled, edge-sensitive rising */
+ pccchip2->LANC_berr_ctl = 0x5d; /* bus error: lvl 5, enabled, snoop control
+ * will supply dirty data and leave dirty data
+ * on read access and sink any data on write
+ */
+ /*
+ * Install the interrupt handler
+ * calls rtems_interrupt_catch
+ */
+ dummy = (rtems_isr_entry) set_vector( uti596_DynamicInterruptHandler, 0x57, 1 );
+
+ /* Initialize the 82596 memory */
+ uti596_initMem(sc);
+
+ #ifdef DBG_INIT
+ printk(("uti596_initialize_hardware: After attach, status of board = 0x%x\n", sc->scb.status ))
+ #endif
+}
+
+
+/*
+ * uti596_reset_hardware
+ *
+ * Reset the 82596 and initialize it with an SCP.
+ *
+ * Input parameters:
+ * sc - pointer to the uti596_softc
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_reset_hardware(
+ uti596_softc_ *sc
+)
+{
+ rtems_status_code status_code;
+ i596_cmd *pCmd;
+
+ pCmd = sc->pCmdHead; /* This is a tx command for sure (99.99999%) */
+
+ /* the command block list (CBL) is empty */
+ sc->scb.cmd_pointer = (unsigned long) I596_NULL; /* all 1's */
+ sc->pCmdHead = sc->scb.pCmd = I596_NULL; /* all 1's */
+
+ #ifdef DBG_RESET
+ printk(("uti596_reset_hardware\n"))
+ #endif
+ uti596_initialize( sc );
+
+ /*
+ * Wake the transmitter if needed.
+ */
+ if ( sc->txDaemonTid && pCmd != I596_NULL ) {
+ printk(("****RESET: wakes transmitter!\n"))
+ status_code = rtems_event_send (sc->txDaemonTid,
+ INTERRUPT_EVENT);
+
+ if ( status_code != RTEMS_SUCCESSFUL ) {
+ printk(("****ERROR:Could NOT send event to tid 0x%x : %s\n",
+ sc->txDaemonTid, rtems_status_text (status_code) ))
+ }
+ }
+
+ #ifdef DBG_RESET
+ printk(("uti596_reset_hardware: After reset_hardware, status of board = 0x%x\n", sc->scb.status ))
+ #endif
+}
+
+
+/*
+ * uti596_clearListStatus
+ *
+ * Clear the stat fields for all RFDs
+ *
+ * Input parameters:
+ * pRfd - a pointer to the head of the RFA
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_clearListStatus(
+ i596_rfd *pRfd
+)
+{
+ while ( pRfd != I596_NULL ) {
+ pRfd -> stat = 0;
+ pRfd = (i596_rfd *) word_swap((unsigned long)pRfd-> next);
+ }
+}
+
+
+/*
+ * uti596_reset
+ *
+ * Reset the 82596 and reconfigure
+ *
+ * Input parameters: NONE
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void uti596_reset( void )
+{
+ uti596_softc_ *sc = &uti596_softc;
+
+ #ifdef DBG_RESET
+ printk(("uti596_reset: begin\n"))
+ #endif
+
+ /* Wait for the CU to be available, then
+ * reset the ethernet hardware. Must re-config.
+ */
+ sc->resetDone = 0;
+ uti596_wait ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
+ uti596_reset_hardware ( &uti596_softc );
+
+ #ifdef DBG_RESET
+ uti596_diagnose();
+ #endif
+
+ /*
+ * Configure the 82596
+ */
+ uti596_configure( sc );
+
+ /*
+ * Set up the Individual (hardware) Address
+ */
+ uti596_IAsetup ( sc );
+
+ sc->pCmdHead = sc->pCmdTail = sc->scb.pCmd = I596_NULL;
+
+
+ /* restore the RFA */
+
+ if ( sc->pLastUnkRFD != I596_NULL ) {
+ sc-> pEndRFA = sc->pLastUnkRFD; /* The end position can be updated */
+ sc-> pLastUnkRFD = I596_NULL;
+ }
+
+ sc->pEndRFA->next = sc->pSavedRfdQueue;
+ if ( sc->pSavedRfdQueue != I596_NULL ) {
+ sc->pEndRFA = sc->pEndSavedQueue;
+ sc->pSavedRfdQueue = sc->pEndSavedQueue = I596_NULL;
+ sc -> countRFD = sc->rxBdCount ;
+ }
+
+ /* Re-address the head of the RFA in the SCB */
+ sc->scb.pRfd = sc->pBeginRFA;
+ sc->scb.rfd_pointer = word_swap((unsigned long)sc->pBeginRFA);
+
+ /* Clear the status of all RFDs */
+ uti596_clearListStatus( sc->pBeginRFA );
+
+ printk(("uti596_reset: Starting NIC\n"))
+
+ /* Start the receiver */
+ sc->scb.command = RX_START;
+ sc->started = 1; /* assume that the start is accepted */
+ sc->resetDone = 1;
+ uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
+
+ UTI_596_ASSERT(sc->pCmdHead == I596_NULL, "Reset: CMD not cleared\n")
+
+ #ifdef DBG_RESET
+ printk(("uti596_reset: completed\n"))
+ #endif
+}
+
+
+/*
+ * uti596_dequeue
+ *
+ * Remove an RFD from the received fram queue
+ *
+ * Input parameters:
+ * ppQ - a pointer to a i596_rfd pointer
+ *
+ * Output parameters: NONE
+ *
+ * Return value:
+ * pRfd - a pointer to the dequeued RFD
+ */
+i596_rfd * uti596_dequeue(
+ i596_rfd ** ppQ
+)
+{
+ ISR_Level level;
+ i596_rfd * pRfd;
+
+ _ISR_Disable(level);
+
+ /* invalid address, or empty queue or emptied queue */
+ if( ppQ == NULL || *ppQ == NULL || *ppQ == I596_NULL) {
+ _ISR_Enable(level);
+ return I596_NULL;
+ }
+
+ /*
+ * Point to the dequeued buffer, then
+ * adjust the queue pointer and detach the buffer
+ */
+ pRfd = *ppQ;
+ *ppQ = (i596_rfd *) word_swap ((unsigned long) pRfd->next);
+ pRfd->next = I596_NULL; /* unlink the rfd being returned */
+
+ _ISR_Enable(level);
+ return pRfd;
+}
+
+
+/*
+ * uti596_append
+ *
+ * Remove an RFD buffer from the RFA and tack it on to
+ * the received frame queue for processing.
+ *
+ * Input parameters:
+ * ppQ - a pointer to the queue pointer
+ * pRfd - a pointer to the buffer to be returned
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+
+void uti596_append(
+ i596_rfd ** ppQ,
+ i596_rfd * pRfd
+)
+{
+
+ i596_rfd *p;
+
+ if ( pRfd != NULL && pRfd != I596_NULL) {
+ pRfd -> next = I596_NULL;
+ pRfd -> cmd |= CMD_EOL; /* set EL bit */
+
+ if ( *ppQ == NULL || *ppQ == I596_NULL ) {
+ /* empty list */
+ *ppQ = pRfd;
+ }
+ else {
+ /* walk to the end of the list */
+ for ( p=*ppQ;
+ p->next != I596_NULL;
+ p=(i596_rfd *) word_swap ((unsigned long)p->next) );
+
+ /* append the rfd */
+ p->cmd &= ~CMD_EOL; /* Clear EL bit at end */
+ p->next = (i596_rfd *) word_swap ((unsigned long)pRfd);
+ }
+ }
+ else {
+ printk(("Illegal attempt to append: %p\n", pRfd))
+ }
+}
-/* Waits for the command word to clear. The command word is cleared AFTER the interrupt is
- * generated. This allows the CPU to issue the next command
+/*
+ * uti596_supplyFD
+ *
+ * Return a buffer (RFD) to the receive frame area (RFA).
+ * Call with interrupts disabled.
+ *
+ * Input parameters:
+ * pRfd - a pointer to the buffer to be returned
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
*/
-#define UTI_WAIT_COMMAND_ACCEPTED(duration,function) \
-{ rtems_interval ticks_per_second, start_ticks, end_ticks; \
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second); \
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); \
- end_ticks = start_ticks + ticks_per_second; \
- do { \
- if (uti596_softc.scb.command == 0) \
- break; \
- else { \
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); \
- } \
- } while (start_ticks <= end_ticks); \
- if ((uti596_softc.scb.command != 0) || (start_ticks > end_ticks)) \
- printf("%s: i82596 timed out with status %x, cmd %x.\n", function, \
- uti596_softc.scb.status, uti596_softc.scb.command); \
+void uti596_supplyFD (
+ i596_rfd * pRfd
+)
+{
+ i596_rfd *pLastRfd;
+
+ UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD!\n")
+
+ pRfd -> cmd = CMD_EOL;
+ pRfd -> pRbd = I596_NULL;
+ pRfd -> next = I596_NULL;
+ pRfd -> stat = 0x0000; /* clear STAT_C and STAT_B bits */
+
+ /*
+ * Check if the list is empty:
+ */
+ if ( uti596_softc.pBeginRFA == I596_NULL ) {
+
+ /* Start a list with one entry */
+ uti596_softc.pBeginRFA = uti596_softc.pEndRFA = pRfd;
+ UTI_596_ASSERT(uti596_softc.countRFD == 0, "Null begin, but non-zero count\n")
+ if ( uti596_softc.pLastUnkRFD != I596_NULL ) {
+ printk(("LastUnkRFD is NOT NULL!!\n"))
+ }
+ uti596_softc.countRFD = 1;
+ return;
+ }
+
+ /*
+ * Check if the last RFD is used/read by the 596.
+ */
+ pLastRfd = uti596_softc.pEndRFA;
+
+ /* C = complete, B = busy (prefetched) */
+ if ( pLastRfd != I596_NULL && ! (pLastRfd -> stat & ( STAT_C | STAT_B ) )) {
+
+ /*
+ * Not yet too late to add it
+ */
+ pLastRfd -> next = (i596_rfd *) word_swap ((unsigned long)pRfd);
+ pLastRfd -> cmd &= ~CMD_EOL; /* RESET_EL : reset EL bit to 0 */
+ uti596_softc.countRFD++; /* Lets assume we add it successfully
+ If not, the RFD may be used, and may
+ decrement countRFD < 0 !! */
+ /*
+ * Check if the last RFD was used while appending.
+ */
+ if ( pLastRfd -> stat & ( STAT_C | STAT_B ) ) { /* completed or was prefetched */
+ /*
+ * Either the EL bit of the last rfd has been read by the 82596,
+ * and it will stop after reception,( true when RESET_EL not reached ) or
+ * the EL bit was NOT read by the 82596 and it will use the linked
+ * RFD for the next reception. ( true when RESET_EL was reached )
+ * So, it is unknown whether or not the linked rfd will be used.
+ * Therefore, the end of list CANNOT be updated.
+ */
+ UTI_596_ASSERT ( uti596_softc.pLastUnkRFD == I596_NULL, "Too many Unk RFD's\n" )
+ uti596_softc.pLastUnkRFD = pRfd;
+ return;
+ }
+ else {
+ /*
+ * The RFD being added was not touched by the 82596
+ */
+ if (uti596_softc.pLastUnkRFD != I596_NULL ) {
+
+ uti596_append(&uti596_softc.pSavedRfdQueue, pRfd); /* Only here! saved Q */
+ uti596_softc.pEndSavedQueue = pRfd;
+ uti596_softc.savedCount++;
+ uti596_softc.countRFD--;
+
+ }
+ else {
+
+ uti596_softc.pEndRFA = pRfd; /* the RFA has been extended */
+
+ if ( ( uti596_softc.scb.status & SCB_STAT_RNR ||
+ uti596_softc.scb.status & RU_NO_RESOURCES ) &&
+ uti596_softc.countRFD > 1 ) {
+
+ /* Ensure that beginRFA is not EOL */
+ uti596_softc.pBeginRFA -> cmd &= ~CMD_EOL;
+
+ UTI_596_ASSERT(uti596_softc.pEndRFA -> next == I596_NULL, "supply: List buggered\n")
+ UTI_596_ASSERT(uti596_softc.pEndRFA -> cmd & CMD_EOL, "supply: No EOL at end.\n")
+ UTI_596_ASSERT(uti596_softc.scb.command == 0, "Supply: scb command must be zero\n")
+
+ #ifdef DBG_MEM
+ printk(("uti596_supplyFD: starting receiver"))
+ #endif
+
+ /* start the receiver */
+ UTI_596_ASSERT(uti596_softc.pBeginRFA != I596_NULL, "rx start w/ NULL begin! \n")
+ uti596_softc.scb.pRfd = uti596_softc.pBeginRFA;
+ uti596_softc.scb.rfd_pointer = word_swap ((unsigned long) uti596_softc.pBeginRFA);
+
+ /* Don't ack RNR! The receiver should be stopped in this case */
+ uti596_softc.scb.command = RX_START | SCB_STAT_RNR;
+
+ UTI_596_ASSERT( !(uti596_softc.scb.status & SCB_STAT_FR),"FRAME RECEIVED INT COMING!\n")
+
+ /* send CA signal */
+ uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT );
+ }
+ }
+ return;
+ }
+ }
+ else {
+ /*
+ * too late , pLastRfd in use ( or NULL ),
+ * in either case, EL bit has been read, and RNR condition will occur
+ */
+ uti596_append( &uti596_softc.pSavedRfdQueue, pRfd); /* save it for RNR */
+
+ uti596_softc.pEndSavedQueue = pRfd; /* reset end of saved queue */
+ uti596_softc.savedCount++;
+
+ return;
+ }
}
-#define UTI_WAIT_TICKS \
-{ rtems_interval ticks_per_second, start_ticks, end_ticks; \
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second); \
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); \
- end_ticks = start_ticks + ticks_per_second; \
- do { \
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); \
- } while (start_ticks <= end_ticks); \
+
+/*
+ * send_packet
+ *
+ * Send a raw ethernet packet, add a
+ * transmit command to the CBL
+ *
+ * Input parameters:
+ * ifp - a pointer to the ifnet structure
+ * m - a pointer to the mbuf being sent
+ *
+ * Output parameters: NONE
+ *
+ * Return value: NONE
+ */
+void send_packet(
+ struct ifnet *ifp, struct mbuf *m
+)
+{
+ i596_tbd *pPrev = I596_NULL;
+ i596_tbd *pRemainingTbdList;
+ i596_tbd *pTbd;
+ struct mbuf *n, *input_m = m;
+ uti596_softc_ *sc = ifp->if_softc;
+ struct mbuf *l = NULL;
+ unsigned int length = 0;
+ rtems_status_code status;
+ int bd_count = 0;
+ rtems_event_set events;
+
+ /*
+ * For all mbufs in the chain,
+ * fill a transmit buffer descriptor for each
+ */
+ pTbd = (i596_tbd*) word_swap ((unsigned long)sc->pTxCmd->pTbd);
+
+ do {
+ if (m->m_len) {
+ /*
+ * Fill in the buffer descriptor
+ */
+ length += m->m_len;
+ pTbd->data = (char *) word_swap ((unsigned long) mtod (m, void *));
+ pTbd->size = m->m_len;
+ pPrev = pTbd;
+ pTbd = (i596_tbd *) word_swap ((unsigned long) pTbd->next);
+ l = m;
+ m = m->m_next;
+ }
+ else {
+ /*
+ * Just toss empty mbufs
+ */
+ MFREE (m, n);
+ m = n;
+ if (l != NULL)
+ l->m_next = m;
+ }
+ } while( m != NULL && ++bd_count < 16 );
+
+ /* This should never happen */
+ if ( bd_count == 16 ) {
+ printk(("TX ERROR:Too many mbufs in the packet!!!\n"))
+ printk(("Must coalesce!\n"))
+ }
+
+ if ( length < UTI_596_ETH_MIN_SIZE ) {
+ pTbd->data = (char *) word_swap ((unsigned long) sc->zeroes); /* add padding to pTbd */
+ pTbd->size = UTI_596_ETH_MIN_SIZE - length; /* zeroes have no effect on the CRC */
+ }
+ else /* Don't use pTbd in the send routine */
+ pTbd = pPrev;
+
+ /* Disconnect the packet from the list of Tbd's */
+ pRemainingTbdList = (i596_tbd *) word_swap ((unsigned long)pTbd->next);
+ pTbd->next = I596_NULL;
+ pTbd->size |= UTI_596_END_OF_FRAME;
+
+ sc->rawsndcnt++;
+
+ #ifdef DBG_SEND
+ printk(("send_packet: sending packet\n"))
+ #endif
+
+ /* Sending Zero length packet: shouldn't happen */
+ if (pTbd->size <= 0) return;
+
+ #ifdef DBG_PACKETS
+ printk (("\nsend_packet: Transmitter adds packet\n"))
+ print_hdr ( sc->pTxCmd->pTbd->data ); /* print the first part */
+ print_pkt ( sc->pTxCmd->pTbd->next->data ); /* print the first part */
+ print_echo (sc->pTxCmd->pTbd->data);
+ #endif
+
+ /* add the command to the output command queue */
+ uti596_addCmd ( (i596_cmd *) sc->pTxCmd );
+
+ /* sleep until the command has been processed or Timeout encountered. */
+ status= rtems_bsdnet_event_receive (INTERRUPT_EVENT,
+ RTEMS_WAIT|RTEMS_EVENT_ANY,
+ RTEMS_NO_TIMEOUT,
+ &events);
+
+ if ( status != RTEMS_SUCCESSFUL ) {
+ printk(("Could not sleep %s\n", rtems_status_text(status)))
+ }
+
+ #ifdef DBG_SEND
+ printk(("send_packet: RAW - wake\n"))
+ #endif
+
+ sc->txInterrupts++;
+
+ if ( sc->pTxCmd -> cmd.status & STAT_OK ) {
+ sc->stats.tx_packets++;
+ }
+ else {
+
+ printk(("*** send_packet: Driver Error 0x%x\n", sc->pTxCmd -> cmd.status ))
+
+ sc->stats.tx_errors++;
+ if ( sc->pTxCmd->cmd.status & 0x0020 )
+ sc->stats.tx_retries_exceeded++;
+ if (!(sc->pTxCmd->cmd.status & 0x0040))
+ sc->stats.tx_heartbeat_errors++;
+ if ( sc->pTxCmd->cmd.status & 0x0400 )
+ sc->stats.tx_carrier_errors++;
+ if ( sc->pTxCmd->cmd.status & 0x0800 )
+ sc->stats.collisions++;
+ if ( sc->pTxCmd->cmd.status & 0x1000 )
+ sc->stats.tx_aborted_errors++;
+ } /* end if stat_ok */
+
+ /*
+ * Restore the transmitted buffer descriptor chain.
+ */
+ pTbd -> next = (i596_tbd *) word_swap ((unsigned long)pRemainingTbdList);
+
+ /*
+ * Free the mbufs used by the sender.
+ */
+ m = input_m;
+ while ( m != NULL ) {
+ MFREE(m,n);
+ m = n;
+ }
}
-/************************************************************************/
-
-
- /***********************************************************************
- * Function: uti596_attach
- *
- * Description:
- * Configure the driver, and connect to the network stack
- *
- * Algorithm:
- *
- * Check parameters in the ifconfig structure, and
- * set driver parameters accordingly.
- * initialize required rx and tx buffers
- * link driver data structure onto device list
- * return 1 on successful completion
- *
- ***********************************************************************/
+
+
+/***********************************************************************
+ * Function: uti596_attach
+ *
+ * Description:
+ * Configure the driver, and connect to the network stack
+ *
+ * Algorithm:
+ *
+ * Check parameters in the ifconfig structure, and
+ * set driver parameters accordingly.
+ * Initialize required rx and tx buffers.
+ * Link driver data structure onto device list.
+ * Return 1 on successful completion.
+ *
+ ***********************************************************************/
int uti596_attach(
struct rtems_bsdnet_ifconfig * pConfig
)
{
- uti596_softc_ *sc = &uti596_softc; /* device dependent data structure */
- struct ifnet * ifp = &sc->arpcom.ac_if; /* ifnet structure */
+ uti596_softc_ *sc = &uti596_softc; /* device dependent data structure */
+ struct ifnet * ifp = &sc->arpcom.ac_if; /* ifnet structure */
- int unitNumber;
- char *unitName;
+ int unitNumber;
+ char *unitName;
-#ifdef DBG_ATTACH
+ #ifdef DBG_ATTACH
printk(("uti596_attach: begins\n"))
-#endif
+ #endif
/* The NIC is not started yet */
sc->started = 0;
@@ -219,9 +1676,9 @@ int uti596_attach(
ifp->if_softc = sc;
sc->pScp = NULL;
- /* Parse driver name */
- if ((unitNumber = rtems_bsdnet_parse_driver_name (pConfig, &unitName)) < 0)
- return 0;
+ /* Parse driver name */
+ if ((unitNumber = rtems_bsdnet_parse_driver_name (pConfig, &unitName)) < 0)
+ return 0;
ifp->if_name = unitName;
ifp->if_unit = unitNumber;
@@ -232,13 +1689,16 @@ int uti596_attach(
else
ifp->if_mtu = ETHERMTU;
- /* For now the ethernet address must be specified in the ifconfig structure,
- * else FIXME so it can be read in from BBRAM at $FFFC1F2C (6 bytes)
+ /* Ethernet address can be specified in the ifconfig structure or
+ * it can be read in from BBRAM at $FFFC1F2C (6 bytes)
* mvme167 manual p. 1-47
*/
if ( pConfig->hardware_address) {
memcpy (sc->arpcom.ac_enaddr, pConfig->hardware_address, ETHER_ADDR_LEN);
}
+ else {
+ memcpy (sc->arpcom.ac_enaddr, (char *)0xFFFC1F2C, ETHER_ADDR_LEN);
+ }
/* Assign requested receive buffer descriptor count */
if (pConfig->rbuf_count)
@@ -253,9 +1713,9 @@ int uti596_attach(
sc->txBdCount = TX_BUF_COUNT * TX_BD_PER_BUF;
/* Set up fields in the ifnet structure*/
- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
- ifp->if_init = uti596_init;
+ ifp->if_init = uti596_init;
ifp->if_ioctl = uti596_ioctl;
ifp->if_start = uti596_start;
ifp->if_output = ether_output;
@@ -280,7 +1740,7 @@ int uti596_attach(
* start the driver
*
* Algorithm:
- * send an event to the tx task
+ * send an event to the tx task
* set the if_flags
*
***********************************************************************/
@@ -289,9 +1749,11 @@ static void uti596_start(
)
{
uti596_softc_ *sc = ifp->if_softc;
-#ifdef DBG_INIT
+
+ #ifdef DBG_START
printk(("uti596_start: begins\n"))
-#endif
+ #endif
+
rtems_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT);
ifp->if_flags |= IFF_OACTIVE;
}
@@ -322,43 +1784,42 @@ void uti596_init(
/*
* Initialize the 82596
*/
-#ifdef DBG_INIT
+ #ifdef DBG_INIT
printk(("uti596_init: begins\nuti596_init: initializing the 82596...\n"))
-#endif
+ #endif
uti596_initialize_hardware(sc);
/*
* Start driver tasks
*/
-#ifdef DBG_INIT
+ #ifdef DBG_INIT
printk(("uti596_init: starting driver tasks...\n"))
-#endif
+ #endif
sc->txDaemonTid = rtems_bsdnet_newproc ("UTtx", 2*4096, uti596_txDaemon, sc);
sc->rxDaemonTid = rtems_bsdnet_newproc ("UTrx", 2*4096, uti596_rxDaemon, sc);
sc->resetDaemonTid = rtems_bsdnet_newproc ("UTrt", 2*4096, uti596_resetDaemon, sc);
-#ifdef DBG_INIT
+ #ifdef DBG_INIT
printk(("uti596_init: After attach, status of board = 0x%x\n", sc->scb.status ))
-#endif
+ #endif
}
/*
* Enable receiver
*/
-#ifdef DBG_INIT
+ #ifdef DBG_INIT
printk(("uti596_init: enabling the reciever...\n" ))
-#endif
+ #endif
sc->scb.command = RX_START;
- i82596->chan_attn = 0x00000000;
- UTI_WAIT_COMMAND_ACCEPTED(4000,"uti596_init: RX_START");
+ uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT );
/*
* Tell the world that we're running.
*/
ifp->if_flags |= IFF_RUNNING;
-#ifdef DBG_INIT
+ #ifdef DBG_INIT
printk(("uti596_init: completed.\n"))
-#endif
+ #endif
}
/***********************************************************************
@@ -374,23 +1835,21 @@ void uti596_init(
* clean-up all buffers ( RFD's et. al. )
*
*
- *
- *
***********************************************************************/
/* static */ void uti596_stop(
uti596_softc_ *sc
)
{
- struct ifnet *ifp = &sc->arpcom.ac_if;
+ struct ifnet *ifp = &sc->arpcom.ac_if;
- ifp->if_flags &= ~IFF_RUNNING;
+ ifp->if_flags &= ~IFF_RUNNING;
sc->started = 0;
-#ifdef DBG_596
+ #ifdef DBG_STOP
printk(("uti596stop: %s: Shutting down ethercard, status was %4.4x.\n",
uti596_softc.arpcom.ac_if.if_name, uti596_softc.scb.status))
-#endif
+ #endif
printk(("Stopping interface\n"))
sc->scb.command = CUC_ABORT | RX_ABORT;
@@ -468,144 +1927,126 @@ void uti596_txDaemon(
struct ether_header *eh;
int frames = 0;
-#ifdef DBG_INIT_3
- int i;
-#endif
-#ifdef DBG_596
+ #ifdef DBG_RX
printk(("uti596_rxDaemon: begin\n"))
printk(("&scb = %p, pRfd = %p\n", &sc->scb,sc->scb.pRfd))
-#endif
+ #endif
rtems_task_ident (0, 0, &tid);
-#ifdef DBG_596
- printk(("uti596_rxDaemon: RX tid = 0x%x\n", tid))
-#endif
+ for(;;) {
+ /*
+ * Wait for packet.
+ */
+ #ifdef DBG_RX
+ printk(("uti596_rxDaemon: Receiver sleeps\n"))
+ #endif
+
+ rtems_bsdnet_event_receive (INTERRUPT_EVENT,
+ RTEMS_WAIT|RTEMS_EVENT_ANY,
+ RTEMS_NO_TIMEOUT,
+ &events);
+
+ #ifdef DBG_RX
+ printk(("uti596_rxDaemon: Receiver wakes\n"))
+ #endif
+ /*
+ * While received frames are available. Note that the frame may be
+ * a fragment, so it is NOT a complete packet.
+ */
+ pRfd = uti596_dequeue( &sc->pInboundFrameQueue);
+ while ( pRfd &&
+ pRfd != I596_NULL &&
+ pRfd -> stat & STAT_C )
+ {
- for(;;) {
- /*
- * Wait for packet.
- */
-#ifdef DBG_596
- printk(("uti596_rxDaemon: Receiver sleeps\n"))
-#endif
+ if ( pRfd->stat & STAT_OK) { /* a good frame */
+ int pkt_len = pRfd->count & 0x3fff; /* the actual # of bytes received */
- rtems_bsdnet_event_receive (INTERRUPT_EVENT,
- RTEMS_WAIT|RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &events);
+ #ifdef DBG_RX
+ printk(("uti596_rxDaemon: Good frame, @%p, data @%p length %d\n", pRfd, pRfd -> data , pkt_len))
+ #endif
+ frames++;
-#ifdef DBG_596
- printk(("uti596_rxDaemon: Receiver wakes\n"))
-#endif
- /*
- * While received frames are available. Note that the frame may be
- * a fragment, so it is NOT a complete packet.
- */
- pRfd = uti596dequeue( &sc->pInboundFrameQueue);
- while ( pRfd &&
- pRfd != I596_NULL &&
- pRfd -> stat & STAT_C )
- {
-
-#ifdef DBG_INIT_3
- printk(("\nuti596_rxDaemon: Received packet:\n"))
- print_eth( pRfd->data);
-#endif
- if ( pRfd->stat & STAT_OK) { /* a good frame */
- int pkt_len = pRfd->count & 0x3fff; /* the actual # of bytes received */
-
-#ifdef DBG_596
- printk(("uti596_rxDaemon: Good frame, @%p, data @%p length %d\n", pRfd, pRfd -> data , pkt_len))
-#endif
- frames++;
-
- /*
- * Allocate an mbuf to give to the stack
- * The format of the data portion of the RFD is:
- * <ethernet header, payload>.
- * The FRAME CHECK SEQUENCE / CRC is stripped by the uti596.
- * This is to be optimized later.... should not have to memcopy!
- */
- MGETHDR(m, M_WAIT, MT_DATA);
- MCLGET(m, M_WAIT);
-
- m->m_pkthdr.rcvif = ifp;
- /* move everything into an mbuf */
- memcpy(m->m_data,
- pRfd->data,
- pkt_len);
-
- m->m_len = m->m_pkthdr.len = pkt_len - sizeof(struct ether_header) - 4;
-
- /* move the header to an mbuf */
- eh = mtod (m, struct ether_header *);
- m->m_data += sizeof(struct ether_header);
-
-#ifdef DBG_596
- printk(("uti596_rxDaemon: m->m_ext: %p pRfd -> data: %p\n",
- m->m_ext, pRfd->data))
-#endif
-#ifdef DBG_INIT_3
- printk(("uti596_rxDaemon: mbuf contains:\n"))
- print_eth( (char *) (((int)m->m_data)-sizeof(struct ether_header)));
- for ( i = 0; i<20; i++) {
- printk(("."))
- }
-#endif
- ether_input (ifp, eh, m);
-
- } /* end if STAT_OK */
+ /*
+ * Allocate an mbuf to give to the stack
+ * The format of the data portion of the RFD is:
+ * <ethernet header, payload>.
+ * The FRAME CHECK SEQUENCE / CRC is stripped by the uti596.
+ * This is to be optimized later.... should not have to memcopy!
+ */
+ MGETHDR(m, M_WAIT, MT_DATA);
+ MCLGET(m, M_WAIT);
+
+ m->m_pkthdr.rcvif = ifp;
+ /* move everything into an mbuf */
+ memcpy(m->m_data, pRfd->data, pkt_len);
+ m->m_len = m->m_pkthdr.len = pkt_len - sizeof(struct ether_header) - 4;
+
+ /* move the header to an mbuf */
+ eh = mtod (m, struct ether_header *);
+ m->m_data += sizeof(struct ether_header);
+
+ #ifdef DBG_PACKETS
+ {
+ int i;
+ printk(("uti596_rxDaemon: mbuf contains:\n"))
+ print_eth( (char *) (((int)m->m_data)-sizeof(struct ether_header)));
+ for ( i = 0; i<20; i++) {
+ printk(("."))
+ }
+ }
+ #endif
+
+ ether_input (ifp, eh, m);
+
+ } /* end if STAT_OK */
+
+ else {
+ /*
+ * A bad frame is present: Note that this could be the last RFD!
+ */
+ #ifdef DBG_RX
+ printk(("uti596_rxDaemon: Bad frame\n"))
+ #endif
+ /*
+ * FIX ME: use the statistics from the SCB
+ */
+ sc->stats.rx_errors++;
+ if ((sc->scb.pRfd->stat) & 0x0001)
+ sc->stats.collisions++;
+ if ((sc->scb.pRfd->stat) & 0x0080)
+ sc->stats.rx_length_errors++;
+ if ((sc->scb.pRfd->stat) & 0x0100)
+ sc->stats.rx_over_errors++;
+ if ((sc->scb.pRfd->stat) & 0x0200)
+ sc->stats.rx_fifo_errors++;
+ if ((sc->scb.pRfd->stat) & 0x0400)
+ sc->stats.rx_frame_errors++;
+ if ((sc->scb.pRfd->stat) & 0x0800)
+ sc->stats.rx_crc_errors++;
+ if ((sc->scb.pRfd->stat) & 0x1000)
+ sc->stats.rx_length_errors++;
+ }
- else {
- /*
- * A bad frame is present: Note that this could be the last RFD!
- */
-#ifdef DBG_596
- printk(("uti596_rxDaemon: Bad frame\n"))
-#endif
- /*
- * FIX ME: use the statistics from the SCB
- */
- sc->stats.rx_errors++;
- if ((sc->scb.pRfd->stat) & 0x0001)
- sc->stats.collisions++;
- if ((sc->scb.pRfd->stat) & 0x0080)
- sc->stats.rx_length_errors++;
- if ((sc->scb.pRfd->stat) & 0x0100)
- sc->stats.rx_over_errors++;
- if ((sc->scb.pRfd->stat) & 0x0200)
- sc->stats.rx_fifo_errors++;
- if ((sc->scb.pRfd->stat) & 0x0400)
- sc->stats.rx_frame_errors++;
- if ((sc->scb.pRfd->stat) & 0x0800)
- sc->stats.rx_crc_errors++;
- if ((sc->scb.pRfd->stat) & 0x1000)
- sc->stats.rx_length_errors++;
- }
+ UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD\n")
- UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD\n")
+ _ISR_Disable(level);
+ uti596_supplyFD ( pRfd ); /* Return RFD to RFA. */
+ _ISR_Enable(level);
-#ifdef DBG_SUPPLY_FD
- printk(("uti596_rxDaemon: Supply FD Starting\n"))
-#endif
- _ISR_Disable(level);
- uti596supplyFD ( pRfd ); /* Return RFD to RFA. */
- _ISR_Enable(level);
-#ifdef DBG_SUPPLY_FD
- printk(("uti596_rxDaemon: Supply FD Complete\n"))
-#endif
- pRfd = uti596dequeue( &sc->pInboundFrameQueue); /* grab next frame */
+ pRfd = uti596_dequeue( &sc->pInboundFrameQueue); /* grab next frame */
- } /* end while */
- } /* end for(;;) */
+ } /* end while */
+ } /* end for() */
-#ifdef DBG_596
- printk (("uti596_rxDaemon: frames ... %d\n", frames))
-#endif
+ #ifdef DBG_RX
+ printk (("uti596_rxDaemon: frames ... %d\n", frames))
+ #endif
}
+
/***********************************************************************
* Function: void uti596_resetDaemon
*
@@ -634,31 +2075,29 @@ void uti596_resetDaemon(
sc->stats.nic_reset_count++;
/* Reinitialize the LANC */
rtems_bsdnet_semaphore_obtain ();
- uti596reset();
+ uti596_reset();
rtems_bsdnet_semaphore_release ();
}
}
- /***********************************************************************
- * Function: uti596_DynamicInterruptHandler
- *
- * Description:
- * This is the interrupt handler for the uti596 board
- *
- * Algorithm:
- *
- ***********************************************************************/
+/***********************************************************************
+ * Function: uti596_DynamicInterruptHandler
+ *
+ * Description:
+ * This is the interrupt handler for the uti596 board
+ *
+ ***********************************************************************/
/* static */ rtems_isr uti596_DynamicInterruptHandler(
rtems_vector_number irq
)
{
-#ifdef DEBUG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: begins"))
-#endif
+ #endif
- UTI_WAIT_COMMAND_ACCEPTED(20000,"****ERROR:on ISR entry");
+ uti596_wait (&uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT);
scbStatus = uti596_softc.scb.status & 0xf000;
@@ -676,14 +2115,14 @@ void uti596_resetDaemon(
/* Send the CA signal to acknowledge interrupt */
uti596_softc.scb.command = scbStatus;
- i82596->chan_attn = 0x00000000;
+ uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT );
if( uti596_softc.resetDone ) {
/* stack is attached */
- UTI_WAIT_COMMAND_ACCEPTED(20000,"****ERROR:ACK");
+ uti596_wait ( &uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT );
}
else {
- /* printk(("***INFO: ACK'd w/o processing. status = %x\n", scbStatus)) */
+ printk(("***INFO: ACK'd w/o processing. status = %x\n", scbStatus))
return;
}
}
@@ -693,43 +2132,38 @@ void uti596_resetDaemon(
}
- if ( (scbStatus & SCB_STAT_CX) && !(scbStatus & SCB_STAT_CNA) ){
- printk_time();
+ if ( (scbStatus & SCB_STAT_CX) && !(scbStatus & SCB_STAT_CNA) ) {
printk(("\n*****ERROR: Command Complete, and CNA available: 0x%x\nResetting...", scbStatus))
uti596_softc.nic_reset = 1;
return;
}
if ( !(scbStatus & SCB_STAT_CX) && (scbStatus & SCB_STAT_CNA) ) {
- printk_time();
printk(("\n*****ERROR: CNA, NO CX:0x%x\nResetting...",scbStatus))
uti596_softc.nic_reset = 1;
return;
}
if ( scbStatus & SCB_CUS_SUSPENDED ) {
- printk_time();
printk(("\n*****ERROR: Command unit suspended!:0x%x\nResetting...",scbStatus))
uti596_softc.nic_reset = 1;
return;
}
if ( scbStatus & RU_SUSPENDED ) {
- printk_time();
printk(("\n*****ERROR: Receive unit suspended!:0x%x\nResetting...",scbStatus))
uti596_softc.nic_reset = 1;
return;
}
if ( scbStatus & SCB_STAT_RNR ) {
- printk_time();
printk(("\n*****WARNING: RNR %x\n",scbStatus))
if (uti596_softc.pBeginRFA != I596_NULL) {
- printk(("*****INFO: RFD cmd: %x status:%x\n", uti596_softc.pBeginRFA->cmd,
- uti596_softc.pBeginRFA->stat))
+ printk(("*****INFO: RFD cmd: %x status:%x\n", uti596_softc.pBeginRFA->cmd,
+ uti596_softc.pBeginRFA->stat))
}
else {
- printk(("*****WARNING: RNR condition with NULL BeginRFA\n"))
+ printk(("*****WARNING: RNR condition with NULL BeginRFA\n"))
}
}
@@ -740,37 +2174,37 @@ void uti596_resetDaemon(
if ( scbStatus & SCB_STAT_FR ) {
uti596_softc.rxInterrupts++;
-#ifdef DBG_FR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: Frame received\n"))
-#endif
+ #endif
if ( uti596_softc.pBeginRFA == I596_NULL ||
- !( uti596_softc.pBeginRFA -> stat & STAT_C)) {
- dump_scb();
- uti596_softc.nic_reset = 1;
+ !( uti596_softc.pBeginRFA -> stat & STAT_C)) {
+ uti596_dump_scb();
+ uti596_softc.nic_reset = 1;
}
else {
while ( uti596_softc.pBeginRFA != I596_NULL &&
( uti596_softc.pBeginRFA -> stat & STAT_C)) {
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: pBeginRFA != NULL\n"))
-#endif
+ #endif
count_rx ++;
if ( count_rx > 1) {
printk(("****WARNING: Received 2 frames on 1 interrupt \n"))
- }
+ }
/* Give Received Frame to the ULCS */
uti596_softc.countRFD--;
if ( uti596_softc.countRFD < 0 ) {
printk(("ISR: Count < 0 !!! count == %d, beginRFA = %p\n",
uti596_softc.countRFD, uti596_softc.pBeginRFA))
- }
+ }
uti596_softc.stats.rx_packets++;
/* the rfd next link is stored with upper and lower words swapped so read it that way */
pIsrRfd = (i596_rfd *) word_swap ((unsigned long)uti596_softc.pBeginRFA->next);
/* the append destroys the link */
- uti596append( &uti596_softc.pInboundFrameQueue , uti596_softc.pBeginRFA );
+ uti596_append( &uti596_softc.pInboundFrameQueue , uti596_softc.pBeginRFA );
/*
* if we have just received the a frame in the last unknown RFD,
@@ -781,19 +2215,19 @@ void uti596_resetDaemon(
uti596_softc.pEndRFA = uti596_softc.pLastUnkRFD = I596_NULL;
}
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: Wake %#x\n",uti596_softc.rxDaemonTid))
-#endif
+ #endif
sc = rtems_event_send(uti596_softc.rxDaemonTid, INTERRUPT_EVENT);
if ( sc != RTEMS_SUCCESSFUL ) {
rtems_panic("Can't notify rxDaemon: %s\n",
rtems_status_text (sc));
}
-#ifdef DBG_RAW_ISR
+ #ifdef DBG_ISR
else {
printk(("uti596_DynamicInterruptHandler: Rx Wake: %#x\n",uti596_softc.rxDaemonTid))
- }
-#endif
+ }
+ #endif
uti596_softc.pBeginRFA = pIsrRfd;
} /* end while */
@@ -804,7 +2238,7 @@ void uti596_resetDaemon(
if ( uti596_softc.pLastUnkRFD == I596_NULL && uti596_softc.countRFD != 0 ) {
printk(("Last Unk is NULL, BeginRFA is null, and count == %d\n",
uti596_softc.countRFD))
- }
+ }
uti596_softc.pEndRFA = I596_NULL;
if ( uti596_softc.countRFD != 0 ) {
printk(("****ERROR:Count is %d, but begin ptr is NULL\n",
@@ -819,18 +2253,18 @@ void uti596_resetDaemon(
* a command is completed
*/
if ( scbStatus & SCB_STAT_CX ) {
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: CU\n"))
-#endif
+ #endif
pIsrCmd = uti596_softc.pCmdHead;
/* For ALL completed commands */
if ( pIsrCmd != I596_NULL && pIsrCmd->status & STAT_C ) {
-#ifdef DBG_RAW_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: pIsrCmd != NULL\n"))
-#endif
+ #endif
/* Adjust the command block list */
uti596_softc.pCmdHead = (i596_cmd *) word_swap ((unsigned long)pIsrCmd->next);
@@ -846,21 +2280,20 @@ void uti596_resetDaemon(
switch ( pIsrCmd->command & 0x7) {
case CmdConfigure:
- /* printk(("****INFO:Configure OK\n")) */
uti596_softc.cmdOk = 1;
break;
case CmdDump:
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: dump!\n"))
-#endif
+ #endif
uti596_softc.cmdOk = 1;
break;
case CmdDiagnose:
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: diagnose!\n"))
-#endif
+ #endif
uti596_softc.cmdOk = 1;
break;
@@ -871,14 +2304,14 @@ void uti596_resetDaemon(
}
else {
printk(("****ERROR:SET ADD FAILED\n"))
- }
+ }
break;
case CmdTx:
UTI_596_ASSERT(uti596_softc.txDaemonTid, "****ERROR:Null txDaemonTid\n")
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: wake TX:0x%x\n",uti596_softc.txDaemonTid))
-#endif
+ #endif
if ( uti596_softc.txDaemonTid ) {
/* Ensure that the transmitter is present */
sc = rtems_event_send (uti596_softc.txDaemonTid,
@@ -888,11 +2321,11 @@ void uti596_resetDaemon(
printk(("****ERROR:Could NOT send event to tid 0x%x : %s\n",
uti596_softc.txDaemonTid, rtems_status_text (sc) ))
}
-#ifdef DBG_RAW_ISR
+ #ifdef DBG_ISR
else {
printk(("****INFO:Tx wake: %#x\n",uti596_softc.txDaemonTid))
}
-#endif
+ #endif
}
break;
@@ -902,25 +2335,25 @@ void uti596_resetDaemon(
break;
case CmdTDR: {
- unsigned long status = *( (unsigned long *)pIsrCmd)+1;
- printk(("****ERROR:TDR?!\n"))
-
- if (status & STAT_C) {
- /* mark the TDR command successful */
- uti596_softc.cmdOk = 1;
- }
- else {
- if (status & 0x4000) {
- printk(("****WARNING:Transceiver problem.\n"))
- }
- if (status & 0x2000) {
- printk(("****WARNING:Termination problem.\n"))
- }
- if (status & 0x1000) {
- printk(("****WARNING:Short circuit.\n"))
- /* printk(("****INFO:Time %ld.\n", status & 0x07ff)) */
- }
- }
+ unsigned long status = *( (unsigned long *)pIsrCmd)+1;
+ printk(("****ERROR:TDR?!\n"))
+
+ if (status & STAT_C) {
+ /* mark the TDR command successful */
+ uti596_softc.cmdOk = 1;
+ }
+ else {
+ if (status & 0x4000) {
+ printk(("****WARNING:Transceiver problem.\n"))
+ }
+ if (status & 0x2000) {
+ printk(("****WARNING:Termination problem.\n"))
+ }
+ if (status & 0x1000) {
+ printk(("****WARNING:Short circuit.\n"))
+ /* printk(("****INFO:Time %ld.\n", status & 0x07ff)) */
+ }
+ }
}
break;
@@ -942,7 +2375,6 @@ void uti596_resetDaemon(
if ( pIsrCmd != I596_NULL ) {
/* The command MAY be NULL from a RESET */
/* Reset the ethernet card, and wake the transmitter (if necessary) */
- printk_time();
printk(("****INFO: Request board reset ( tx )\n"))
uti596_softc.nic_reset = 1;
if ( uti596_softc.txDaemonTid) {
@@ -950,13 +2382,15 @@ void uti596_resetDaemon(
sc = rtems_event_send (uti596_softc.txDaemonTid,
INTERRUPT_EVENT);
if ( sc != RTEMS_SUCCESSFUL ) {
- printk(("****ERROR:Could NOT send event to tid 0x%x : %s\n",uti596_softc.txDaemonTid, rtems_status_text (sc) ))
- }
-#ifdef DBG_RAW_ISR
+ printk(("****ERROR:Could NOT send event to tid 0x%x : %s\n",
+ uti596_softc.txDaemonTid, rtems_status_text (sc) ))
+ }
+ #ifdef DBG_ISR
else {
- printk(("uti596_DynamicInterruptHandler: ****INFO:Tx wake: %#x\n",uti596_softc.txDaemonTid))
- }
-#endif
+ printk(("uti596_DynamicInterruptHandler: ****INFO:Tx wake: %#x\n",
+ uti596_softc.txDaemonTid))
+ }
+ #endif
}
}
}
@@ -970,9 +2404,10 @@ void uti596_resetDaemon(
*/
if ( uti596_softc.started ) {
if ( scbStatus & SCB_STAT_RNR ) {
-#ifdef DBG_ISR
- printk(("uti596_DynamicInterruptHandler: INFO:RNR: status %#x \n", uti596_softc.scb.status ))
-#endif
+ #ifdef DBG_ISR
+ printk(("uti596_DynamicInterruptHandler: INFO:RNR: status %#x \n",
+ uti596_softc.scb.status ))
+ #endif
/*
* THE RECEIVER IS OFF!
*/
@@ -990,7 +2425,7 @@ void uti596_resetDaemon(
if ( uti596_softc.pEndRFA != I596_NULL ) {
/* check added feb24. */
-#ifdef DEBUG_RFA
+ #ifdef DBG_ISR
if ((i596_rfd *)word_swap((unsigned long)uti596_softc.pEndRFA->next) != uti596_softc.pLastUnkRFD) {
printk(("***ERROR:UNK: %p not end->next: %p, end: %p\n",
uti596_softc.pLastUnkRFD,
@@ -1000,10 +2435,10 @@ void uti596_resetDaemon(
uti596_softc.countRFD))
printk(("\n\n"))
}
-#endif
+ #endif
uti596_softc.pEndRFA -> next = I596_NULL; /* added feb 16 */
}
- uti596append( &uti596_softc.pSavedRfdQueue, uti596_softc.pLastUnkRFD );
+ uti596_append( &uti596_softc.pSavedRfdQueue, uti596_softc.pLastUnkRFD );
uti596_softc.savedCount++;
uti596_softc.pEndSavedQueue = uti596_softc.pLastUnkRFD;
uti596_softc.countRFD--; /* It was not in the RFA */
@@ -1012,12 +2447,12 @@ void uti596_resetDaemon(
* with the chip.
*/
if ( uti596_softc.pBeginRFA == uti596_softc.pLastUnkRFD ) {
-#ifdef DEBUG_RFA
+ #ifdef DBG_ISR
if ( uti596_softc.countRFD != 0 ) {
printk(("****INFO:About to set begin to NULL, with count == %d\n\n",
uti596_softc.countRFD ))
}
-#endif
+ #endif
uti596_softc.pBeginRFA = I596_NULL;
UTI_596_ASSERT(uti596_softc.countRFD == 0, "****ERROR:Count must be zero here!\n")
}
@@ -1034,23 +2469,23 @@ void uti596_resetDaemon(
/* entries to add */
if ( uti596_softc.pBeginRFA == I596_NULL ) {
/* add at beginning to list */
-#ifdef DEBUG_RFA
+ #ifdef DBG_ISR
if(uti596_softc.countRFD != 0) {
printk(("****ERROR:Begin pointer is NULL, but count == %d\n",
uti596_softc.countRFD))
}
-#endif
+ #endif
uti596_softc.pBeginRFA = uti596_softc.pSavedRfdQueue;
uti596_softc.pEndRFA = uti596_softc.pEndSavedQueue;
uti596_softc.pSavedRfdQueue = uti596_softc.pEndSavedQueue = I596_NULL; /* Reset the End */
}
else {
-#ifdef DEBUG_RFA
+ #ifdef DBG_ISR
if ( uti596_softc.countRFD <= 0) {
printk(("****ERROR:Begin pointer is not NULL, but count == %d\n",
uti596_softc.countRFD))
}
-#endif
+ #endif
UTI_596_ASSERT( uti596_softc.pEndRFA != I596_NULL, "****WARNING: END RFA IS NULL\n")
UTI_596_ASSERT( uti596_softc.pEndRFA->next == I596_NULL, "****ERROR:END RFA -> next must be NULL\n")
@@ -1058,11 +2493,11 @@ void uti596_resetDaemon(
uti596_softc.pEndRFA->cmd &= ~CMD_EOL; /* clear the end of list */
uti596_softc.pEndRFA = uti596_softc.pEndSavedQueue;
uti596_softc.pSavedRfdQueue = uti596_softc.pEndSavedQueue = I596_NULL; /* Reset the End */
-#ifdef DEBUG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: count... %d, saved ... %d \n",
uti596_softc.countRFD,
uti596_softc.savedCount))
-#endif
+ #endif
}
/* printk(("Isr: countRFD = %d\n",uti596_softc.countRFD)) */
uti596_softc.countRFD += uti596_softc.savedCount;
@@ -1070,18 +2505,17 @@ void uti596_resetDaemon(
uti596_softc.savedCount = 0;
}
-#ifdef DBG_596_RFD
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: The list starts here %p\n",uti596_softc.pBeginRFA ))
-#endif
+ #endif
if ( uti596_softc.countRFD > 1) {
- printk_time();
printk(("****INFO: pBeginRFA -> stat = 0x%x\n",uti596_softc.pBeginRFA -> stat))
printk(("****INFO: pBeginRFA -> cmd = 0x%x\n",uti596_softc.pBeginRFA -> cmd))
uti596_softc.pBeginRFA -> stat = 0;
UTI_596_ASSERT(uti596_softc.scb.command == 0, "****ERROR:scb command must be zero\n")
uti596_softc.scb.pRfd = uti596_softc.pBeginRFA;
- uti596_softc.scb.Rfd_val = word_swap((unsigned long)uti596_softc.pBeginRFA);
+ uti596_softc.scb.rfd_pointer = word_swap((unsigned long)uti596_softc.pBeginRFA);
/* start RX here */
printk(("****INFO: ISR Starting receiver\n"))
uti596_softc.scb.command = RX_START; /* should this also be CU start? */
@@ -1090,9 +2524,9 @@ void uti596_resetDaemon(
} /* end stat_rnr */
} /* end if receiver started */
-#ifdef DBG_ISR
+ #ifdef DBG_ISR
printk(("uti596_DynamicInterruptHandler: X\n"))
-#endif
+ #endif
count_rx=0;
@@ -1106,6 +2540,7 @@ void uti596_resetDaemon(
return;
}
+
/***********************************************************************
* Function: uti596_ioctl
*
@@ -1113,8 +2548,6 @@ void uti596_resetDaemon(
* driver ioctl function
* handles SIOCGIFADDR, SIOCSIFADDR, SIOCSIFFLAGS
*
- * Algorithm:
- *
***********************************************************************/
static int uti596_ioctl(
@@ -1125,9 +2558,9 @@ static int uti596_ioctl(
uti596_softc_ *sc = ifp->if_softc;
int error = 0;
-#ifdef DBG_INIT
+ #ifdef DBG_IOCTL
printk(("uti596_ioctl: begins\n", sc->pScp))
-#endif
+ #endif
switch (command) {
case SIOCGIFADDR:
@@ -1176,6 +2609,7 @@ static int uti596_ioctl(
return error;
}
+
/***********************************************************************
* Function: uti596_stats
*
@@ -1191,7 +2625,7 @@ void uti596_stats(
uti596_softc_ *sc
)
{
- printf("CPU Reports:\n");
+ printf ("CPU Reports:\n");
printf (" Tx raw send count:%-8lu", sc->rawsndcnt);
printf (" Rx Interrupts:%-8lu", sc->rxInterrupts);
printf (" Tx Interrupts:%-8lu\n", sc->txInterrupts);
@@ -1219,1221 +2653,143 @@ void uti596_stats(
printf (" NIC resets: %-8u\n", sc->stats.nic_reset_count);
- printf(" NIC reports\n");
+ printf (" NIC reports\n");
- dump_scb();
+ #ifdef DBG_STAT
+ uti596_dump_scb();
+ #endif
}
-/***********************************************************************
- *************************** LOCAL ROUTINES ****************************
- ***********************************************************************/
-/***********************************************************************
- * Function: void uti596_initialize_hardware
- *
- * Description:
- ***********************************************************************/
-void uti596_initialize_hardware(
- uti596_softc_ *sc
-)
-{
- int boguscnt = 1000;
- rtems_isr_entry dummy;
+/************************ PACKET DEBUG ROUTINES ************************/
- printk(("uti596_initialize_hardware: begins\n"))
-
- pccchip2->LANC_berr_ctl = 0x40; /* Enable snooping */
-
- /* reset the board */
- i82596->port_lower = 0x0000; /* Each Port access must consist of two 16-bit writes */
- i82596->port_upper = 0x0000;
-
- /* allocate enough memory for the Scp block to be aligned on 16 bit boundary */
- uti596_softc.pScp = (i596_scp *) calloc(1,sizeof(struct i596_scp) + 0xf);
-
-#ifdef DBG_INIT
- printk(("uti596_initialize_hardware: Scp address initially %p\n", sc->pScp))
-#endif
-
- /* align the block */
- sc->pScp = (i596_scp *)
- ((((int)uti596_softc.pScp) + 0xf) & 0xfffffff0);
-
-#ifdef DBG_INIT
- printk(("uti596_initialize_hardware: change scp address to : %p\n",sc->pScp))
-#endif
-
- /* change the scp address */
-#ifdef DBG_INIT
- printk(("uti596_initialize_hardware: Change the SCP address\n"))
-#endif
-
- /* reset the board */
- i82596->port_lower = 0x0000;
- i82596->port_upper = 0x0000;
-
- /* supply the Scp address
- * Lower Command Word D31-D16; Upper Command Word D15-D0
- */
- i82596->port_lower = (((int)sc->pScp) & 0xfff0) | 0x0002;
- i82596->port_upper = (((int)sc->pScp) >> 16 ) & 0xffff;
-
-
- /* write the SYSBUS: interrupt pin active high, LOCK disabled,
- * internal triggering, linear mode
- */
- sc->pScp->sysbus = word_swap(0x00540000);
-
- /* provide the iscp to the scp, keep a pointer for our use */
- sc->pScp->iscp_val = word_swap((unsigned long)&sc->iscp);
- sc->pScp->iscp = &sc->iscp;
-
- /* provide the scb to the iscp, keep a pointer for our use */
- sc->iscp.scb_val = word_swap((unsigned long)&sc->scb);
- sc->iscp.scb = &sc->scb;
-
- /* set the busy flag in the iscp */
- sc->iscp.stat = word_swap(0x00000001);
-
- /* the command block list (CBL) is empty */
- sc->scb.Cmd_val = (unsigned long) I596_NULL; /* all 1's */
- sc->pCmdHead = sc->scb.pCmd = I596_NULL; /* all 1's */
-
-#ifdef DBG_596
- printk(("uti596_initialize_hardware: Starting i82596.\n"))
-#endif
-
- /* Issue CA: pass the scb address to the 596 */
- i82596->chan_attn = 0x00000000;
-
- UTI_WAIT_TICKS
-
- /* Wait for the 596 to read the SCB address and clear 'stat' */
- while (sc->iscp.stat) {
- if (--boguscnt == 0) {
- printk(("initialize_hardware: timed out with status %4.4lx\n",
- sc->iscp.stat ))
- break;
- }
- } /* end while */
-
- /* clear the scb command word */
- sc->scb.command = 0;
-
- /*
- * Configure interrupt control in PCCchip2
- */
- pccchip2->LANC_error = 0xff; /* clear status register */
- pccchip2->LANC_int_ctl = 0x5d; /* lvl 5, enabled, edge-sensitive rising */
- pccchip2->LANC_berr_ctl = 0x5d; /* bus error: lvl 5, enabled, snoop control
- * will supply dirty data and leave dirty data
- * on read access and sink any data on write
- */
-
- /*
- * Install the interrupt handler
- * calls rtems_interrupt_catch
- */
- dummy = (rtems_isr_entry) set_vector( uti596_DynamicInterruptHandler, 0x57, 1 );
-
-
- /* Initialize the 82596 memory */
- uti596_initMem(sc);
-
-#ifdef DBG_INIT
- printk(("uti596_initialize_hardware: After attach, status of board = 0x%x\n", sc->scb.status ))
-#endif
-}
-
-/***********************************************************************
- * Function: uti596_initMem
- *
- * Description:
- * creates the necessary descriptors for the
- * uti596 board, hooks the interrupt, and starts the board.
- * Assumes that interrupts are hooked.
- *
- * Algorithm:
- *
- ***********************************************************************/
-
-void uti596_initMem(
- uti596_softc_ * sc
-)
-{
- int i,count;
- i596_tbd *pTbd, *pPrev;
-
-#ifdef DBG_INIT
- printk(("uti596_initMem: begins\n"))
-#endif
-
- sc->resetDone = 0;
-
- /*
- * Set up receive frame area (RFA)
- */
-#ifdef DBG_INIT
- printk(("uti596_initMem: Initializing the RFA...\n"))
-#endif
- i = uti596_initRFA( sc->rxBdCount );
- if ( i < sc->rxBdCount ) {
- printk(("init_rfd: only able to allocate %d receive frame descriptors\n", i))
- }
-
- sc->scb.Rfd_val = word_swap((unsigned long)sc->pBeginRFA);
- sc->scb.pRfd = sc->pBeginRFA;
-
- /*
- * Diagnose the health of the board
- * send the CU a diagnostic command
- */
-#ifdef DBG_INIT
- printk(("uti596_initMem: Running diagnostics...\n"))
-#endif
- uti596Diagnose(1);
-
- /*
- * Configure the 82596
- * send the CU a configure command with our initial setup
- */
-#ifdef DBG_INIT
- printk(("uti596_initMem: Configuring...\n"))
-#endif
- sc->set_conf.cmd.command = CmdConfigure;
- memcpy (sc->set_conf.data, uti596initSetup, 14);
- uti596addPolledCmd( (i596_cmd *) &sc->set_conf);
-
- /* Poll for successful command completion */
- count = 2000;
- while( !( sc->set_conf.cmd.status & STAT_C ) && --count ) {
- printk(("."))
- }
-
- if ( count ) {
- printk(("Configure OK, count = %d\n",count))
- }
- else {
- printk(("***Configure failed\n"))
- }
- /*
- * Set up the Internet Address
- * send the CU an IA-setup command
- */
-#ifdef DBG_INIT
- printk(("uti596_initMem: Setting Address...\n"))
-#endif
- sc->set_add.cmd.command = CmdSASetup;
- for ( i=0; i<6; i++) {
- sc->set_add.data[i]=sc->arpcom.ac_enaddr[i];
-#ifdef DBG_INIT
- printk(("uti596_initMem: copying byte %d: 0x%x\n", i, sc->set_add.data[i]))
-#endif
- }
- sc->cmdOk = 0;
- uti596addPolledCmd((i596_cmd *)&sc->set_add);
-
- /* Poll for successful command completion */
- count = 2000;
- while( !(sc->set_add.cmd.status & STAT_C ) && --count) {
- printk(("."))
- }
-
- if ( count ) {
- printk(("Set Address OK, count= %d\n",count))
- }
- else {
- printk(("Set Address Failed\n"))
- }
-#ifdef DBG_INIT
- printk(( "uti596_initMem: After initialization, status and command: 0x%x, 0x%x\n",
- sc->scb.status, sc->scb.status))
-#endif
+#ifdef DBG_PACKETS
- /*
- *Initialize transmit buffer descriptors
- */
-#ifdef DBG_INIT
- printk(( "uti596_initMem:Initializing TBDs...\n"))
-#endif
- sc->pLastUnkRFD = I596_NULL;
- sc->pTxCmd = (i596_tx *) calloc (1,sizeof (struct i596_tx) );
- sc->pTbd = (i596_tbd *) calloc (1,sizeof (struct i596_tbd) );
- sc->pTxCmd->pTbd = (i596_tbd *) word_swap ((unsigned long) sc->pTbd);
- sc->pTxCmd->cmd.command = CMD_FLEX|CmdTx;
- sc->pTxCmd->pad = 0;
- sc->pTxCmd->count = 0; /* all bytes are in list of TBD's */
-
- pPrev = pTbd = sc->pTbd;
-
- /* Allocate a linked list of tbd's each with it's 'next' field written
- * with upper and lower words swapped (for big endian), and mark the end.
- */
- for ( i=0; i<sc->txBdCount; i++) {
- pTbd = (i596_tbd *) calloc (1,sizeof (struct i596_tbd) );
- pPrev->next = (i596_tbd *) word_swap ((unsigned long) pTbd);
- pPrev = pTbd;
- }
- pTbd->next = I596_NULL;
-
- /* Padding used to fill short tx frames */
- memset ( &sc->zeroes, 0, 64);
-
-#ifdef DBG_596
- printk(( "uti596_initMem: After receiver start, status and command: 0x%x, 0x%x\n",
- sc->scb.status, sc->scb.status))
-#endif
-
-#ifdef DBG_596
- printk(("uti596_initMem allows ISR's\n"))
-#endif
- sc->resetDone = 1; /* now need ISR */
-}
-
-/***********************************************************************
- * Function: uti596initRFA(int num)
- *
- * Description:
- * attempts to allocate and initialize ( chain together )
- * the requested number of FD's
- *
- * Algorithm:
- *
- ***********************************************************************/
-
-int uti596_initRFA( int num )
-{
- i596_rfd *pRfd;
- int i = 0;
-
-#ifdef DBG_596
- printk(("uti596_initRFA: begins\n Requested frame descriptors ... %d.\n", num))
-#endif
-
- /*
- * Create the first RFD in the RFA
- */
- pRfd = (i596_rfd *) calloc (1, sizeof (struct i596_rfd));
- if ( !pRfd ) {
- printk(("Can't allocate first buffer.\n"))
- return 0;
- }
- else {
- uti596_softc.countRFD = 1;
- uti596_softc.pBeginRFA = uti596_softc.pEndRFA = pRfd;
- printk(("First Rfd allocated @: %p\n",
- uti596_softc.pBeginRFA))
- }
-
- /* Create remaining RFAs */
- for (i = 1; i < num; i++) {
- pRfd = (i596_rfd *) calloc (1, sizeof (struct i596_rfd) );
- if ( pRfd != NULL ) {
- uti596_softc.countRFD++; /* update count */
- uti596_softc.pEndRFA->next =
- (i596_rfd *) word_swap ((unsigned long) pRfd); /* write the link */
- uti596_softc.pEndRFA = pRfd; /* move the end */
-#ifdef DBG_596_RFA
- printk(("uti596_initRFA: Allocated RFD @ %p\n", pRfd))
-#endif
- }
- else {
- printk(("Can't allocate all buffers: only %d allocated\n", i))
- break;
- }
- } /* end for */
-
- uti596_softc.pEndRFA->next = I596_NULL;
- UTI_596_ASSERT(uti596_softc.countRFD == RX_BUF_COUNT,"INIT:WRONG RFD COUNT\n" )
-
-#ifdef DBG_596_RFA
- printk (("uti596_initRFA: Head of RFA is buffer %p \n\
- uti596_initRFA: End of RFA is buffer %p \n",
- uti596_softc.pBeginRFA,
- uti596_softc.pEndRFA ))
-#endif
- /* Initialize the RFD's */
- for ( pRfd = uti596_softc.pBeginRFA;
- pRfd != I596_NULL;
- pRfd = (i596_rfd *) word_swap ((unsigned long)pRfd->next) ) {
-
- pRfd->cmd = 0x0000;
- pRfd->stat = 0x0000;
- pRfd->pRbd = I596_NULL;
- pRfd->count = 0; /* number of bytes in buffer: usually less than size */
- pRfd->size = 1532; /* was 1532; buffer size ( All RBD ) */
- if ( pRfd -> data == NULL ) {
- printk(("Can't allocate the RFD data buffer\n"))
- }
- }
-
- /* mark the last RFD as the last one in the RDL */
- uti596_softc.pEndRFA -> cmd = CMD_EOL;
-
- uti596_softc.pSavedRfdQueue =
- uti596_softc.pEndSavedQueue = I596_NULL; /* initially empty */
-
- uti596_softc.savedCount = 0;
-
- uti596_softc.nop.cmd.command = CmdNOp; /* initialize the nop command */
-
- return (i); /* the number of allocated buffers */
-}
-
- /***********************************************************************
- * Function: uti596addPolledCmd
- *
- * Description:
- * This routine issues a single command then polls for it's
- * completion.
- *
- * Algorithm:
- * Give the command to the driver. ( CUC_START is ALWAYS required )
- * Poll for completion.
- *
- ***********************************************************************/
-
-void uti596addPolledCmd(
- i596_cmd *pCmd
-)
-{
-
- #ifdef DBG_596
- printk(("uti596addPolledCmd: Adding command 0x%x\n", pCmd -> command ))
- #endif
-
-#ifdef DBG_POLLED_CMD
-
- switch ( pCmd -> command & 0x7 ) { /* check bottom 3 bits */
- case CmdConfigure:
- printk(("uti596addPolledCmd: Configure Command 0x%x\n", pCmd->command))
- break;
- case CmdSASetup:
- printk(("uti596addPolledCmd: Set CMDress Command 0x%x\n", pCmd->command))
- break;
- case CmdMulticastList:
- printk(("uti596addPolledCmd: Multi-cast list 0x%x\n", pCmd->command))
- break;
- case CmdNOp:
- printk(("uti596addPolledCmd: NO op 0x%x\n", pCmd->command))
- break;
- case CmdTDR:
- printk(("uti596addPolledCmd: TDR 0x%x\n", pCmd->command))
- break;
- case CmdDump:
- printk(("uti596addPolledCmd: Dump 0x%x\n", pCmd->command))
- break;
- case CmdDiagnose:
- printk(("uti596addPolledCmd: Diagnose 0x%x\n", pCmd->command))
- break;
- case CmdTx:
- break;
- default:
- printk(("PolledCMD: ****Unknown Command encountered 0x%x\n", pCmd->command))
- break;
- } /* end switch */
-
-#endif
-
- pCmd->status = 0;
- pCmd->command |= CMD_EOL ; /* only command in list*/
-
- pCmd->next = I596_NULL;
-
- UTI_WAIT_COMMAND_ACCEPTED(10000,"Add Polled command: wait prev");
-
- uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = pCmd;
- uti596_softc.scb.Cmd_val = word_swap((unsigned long)pCmd);
- uti596_softc.scb.command = CUC_START;
- i82596->chan_attn = 0x00000000;
-
- UTI_WAIT_COMMAND_ACCEPTED(10000,"Add Polled command: start");
- uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = I596_NULL;
- uti596_softc.scb.Cmd_val = (unsigned long) I596_NULL;
-
-#ifdef DBG_POLLED_CMD
- printk(("uti596addPolledCmd: Scb status & command 0x%x 0x%x\n",
- uti596_softc.scb.status,
- uti596_softc.scb.command ))
-#endif
-}
-
-
-/***********************************************************************
- * Function: void uti596Diagnose
- *
- * Description:
- *
- ***********************************************************************/
-void uti596Diagnose(
- int verbose
-)
-{
- i596_cmd diagnose;
- int count=10000;
-
- diagnose.command = CmdDiagnose;
- diagnose.status = 0;
- uti596addPolledCmd(&diagnose);
- while( !( diagnose.status & STAT_C ) && count ) {
- if(verbose) {
- printk(("."))
- }
- count --;
- }
- if(verbose) {
- printk(("Status diagnostic: 0xa000 is a success ... 0x%2.2x\n", diagnose.status))
- }
-}
-
-/***********************************************************************
- * Function: void uti596dequeue
- *
- * Description:
- * removes an RFD from the received frame queue,
- *
- * Algorithm:
- *
- ***********************************************************************/
-i596_rfd * uti596dequeue(
- i596_rfd ** ppQ
-)
-{
- ISR_Level level;
-
- i596_rfd * pRfd;
- _ISR_Disable(level);
-
- /* invalid address, or empty queue or emptied queue */
- if( ppQ == NULL || *ppQ == NULL || *ppQ == I596_NULL) {
- _ISR_Enable(level);
- return I596_NULL;
- }
-
- pRfd = *ppQ; /* The dequeued buffer */
- *ppQ = (i596_rfd *) \
- word_swap ((unsigned long) pRfd->next); /* advance the queue pointer */
- pRfd->next = I596_NULL; /* unlink the rfd being returned */
-
- _ISR_Enable(level);
- return pRfd;
-}
-
-/***********************************************************************
- * Function: void uti596reset
+/*
+ * dumpQ
*
- * Description:
- ***********************************************************************/
-void uti596reset( void )
+ * Dumps frame queues for debugging
+ */
+static void dumpQ( void )
{
- int i,count;
- uti596_softc_ *sc = &uti596_softc;
- /* i596_rfd * pRfd; */
-
-#ifdef DBG_RESET
- printk(("uti596reset: begin\n"))
-#endif
-
- sc->resetDone = 0;
- UTI_WAIT_COMMAND_ACCEPTED(10000, "reset: wait for previous command complete");
- uti596_reset_hardware(&uti596_softc); /* reset the ethernet hardware. must re-config */
-
-#ifdef DBG_RESET
- uti596Diagnose(1);
-#endif
-
- sc->set_conf.cmd.command = CmdConfigure;
- memcpy (sc->set_conf.data, uti596initSetup, 14);
- uti596addPolledCmd( (i596_cmd *) &sc->set_conf);
-
- /* POLL */
- count = 2000;
- while( !( sc->set_conf.cmd.status & STAT_C ) && --count ) {
- printk(("."))
- }
-
- if ( count ) {
- printk(("Configure OK, count = %d\n",count))
- }
- else {
- printk(("reset: Configure failed\n"))
- }
-
- /*
- * Create the IA setup command
- */
-
-#ifdef DBG_RESET
- printk(("uti596reset: Setting Address\n"))
-#endif
- sc->set_add.cmd.command = CmdSASetup;
- for ( i=0; i<6; i++) {
- sc->set_add.data[i]=sc->arpcom.ac_enaddr[i];
- }
- sc->cmdOk = 0;
- uti596addPolledCmd((i596_cmd *)&sc->set_add);
+ i596_rfd *pRfd;
- count = 2000;
- while( !(sc->set_add.cmd.status & STAT_C ) && --count) {
- printk(("."))
- }
- if ( count ) {
- printk(("Reset Set Address OK, count= %d\n",count))
- }
- else {
- printk(("Reset Set Address Failed\n"))
+ printk(("savedQ:\n"))
+
+ for( pRfd = uti596_softc.pSavedRfdQueue;
+ pRfd != I596_NULL;
+ pRfd = pRfd -> next) {
+ printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
}
-
- sc->pCmdHead = sc->pCmdTail = sc->scb.pCmd = I596_NULL;
-
-#ifdef DBG_RESET
- printk(( "uti596reset: After reset, status and command: 0x%x, 0x%x\n",
- sc->scb.status, sc->scb.status))
-#endif
-
- /* restore the RFA */
-
- /* dumpQ(); */
-
- if ( sc->pLastUnkRFD != I596_NULL ) {
- sc-> pEndRFA = sc->pLastUnkRFD; /* The end position can be updated */
- sc-> pLastUnkRFD = I596_NULL;
+
+ printk(("Inbound:\n"))
+
+ for( pRfd = uti596_softc.pInboundFrameQueue;
+ pRfd != I596_NULL;
+ pRfd = pRfd -> next) {
+ printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
}
-
- sc->pEndRFA->next = sc->pSavedRfdQueue;
- if ( sc->pSavedRfdQueue != I596_NULL ) {
- sc->pEndRFA = sc->pEndSavedQueue;
- sc->pSavedRfdQueue = sc->pEndSavedQueue = I596_NULL;
- sc -> countRFD = sc->rxBdCount ;
+
+ printk(("Last Unk: %p\n", uti596_softc.pLastUnkRFD ))
+ printk(("RFA:\n"))
+
+ for( pRfd = uti596_softc.pBeginRFA;
+ pRfd != I596_NULL;
+ pRfd = pRfd -> next) {
+ printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
}
-
- sc->scb.pRfd = sc->pBeginRFA; /* readdress the head of the RFA in the SCB */
- sc->scb.Rfd_val = word_swap((unsigned long)sc->pBeginRFA);
-
- uti596clearListStatus(sc->pBeginRFA );
-
- /* dumpQ(); */
-
- printk(("Reset:Starting NIC\n"))
- sc->scb.command = RX_START;
- sc->started = 1; /* we assume that the start works */
- sc->resetDone = 1;
- i82596->chan_attn = 0x00000000;
- UTI_WAIT_COMMAND_ACCEPTED(4000, "reset");
- printk(("Reset:Start complete \n"))
- UTI_596_ASSERT(sc->pCmdHead == I596_NULL, "Reset: CMD not cleared\n")
-
-#ifdef DBG_RESET
- printk(("uti596reset: completed\n"))
-#endif
}
-/***********************************************************************
- * Function: void uti596_reset_hardware
- *
- * Description:
- ***********************************************************************/
-void uti596_reset_hardware(
- uti596_softc_ *sc
-)
+/*
+ * show_buffers
+ *
+ * Print out the RFA and frame queues
+ */
+static void show_buffers (void)
{
- int boguscnt = 1000;
- rtems_status_code status_code;
- i596_cmd *pCmd;
-
-
- printk(("uti596_reset_hardware\n"))
- pCmd = sc->pCmdHead; /* This is a tx command for sure (99.99999%) */
-
- /* reset the board */
- i82596->port_lower = 0x0000;
- i82596->port_upper = 0x0000;
-
- if ( sc->pScp == NULL ) {
- printk(("Calloc scp\n"))
- uti596_softc.pScp = (i596_scp *) calloc(1,sizeof(struct i596_scp) + 0xf);
- }
-
-#ifdef DBG_RESET
- printk(("uti596_reset_hardware: Scp address %p\n", sc->pScp))
-#endif
-
- /* align the block */
- sc->pScp = (i596_scp *)
- ((((int)uti596_softc.pScp) + 0xf) & 0xfffffff0);
-
-#ifdef DBG_RESET
- printk(("uti596_reset_hardware: change scp address to : %p\n",sc->pScp))
-#endif
+ i596_rfd *pRfd;
- /* change the scp address */
-#ifdef DBG_RESET
- printk(("uti596_reset_hardware: Change the SCP address\n"))
-#endif
+ printk(("82596 cmd: 0x%x, status: 0x%x RFA len: %d\n",
+ uti596_softc.scb.command,
+ uti596_softc.scb.status,
+ uti596_softc.countRFD))
- /* reset the board */
- i82596->port_lower = 0x0000;
- i82596->port_upper = 0x0000;
+ printk(("\nRFA: \n"))
- /* supply the Scp address
- * Lower Command Word D31-D16; Upper Command Word D15-D0
- */
- i82596->port_lower = (((int)sc->pScp) & 0xfff0) | 0x0002;
- i82596->port_upper = (((int)sc->pScp) >> 16 ) & 0xffff;
-
- /* write the SYSBUS: interrupt pin active high, LOCK disabled,
- * internal triggering, linear mode
- */
- sc->pScp->sysbus = word_swap(0x00540000);
+ for ( pRfd = uti596_softc.pBeginRFA;
+ pRfd != I596_NULL;
+ pRfd = pRfd->next) {
+ printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
+ pRfd, pRfd->stat, pRfd->cmd))
+ }
+ printk(("\nInbound: \n"))
- /* provide the iscp to the scp, keep a pointer for our use */
- sc->pScp->iscp_val = word_swap((unsigned long)&sc->iscp);
- sc->pScp->iscp = &sc->iscp;
-
- /* provide the scb to the iscp, keep a pointer for our use */
- sc->iscp.scb_val = word_swap((unsigned long)&sc->scb);
- sc->iscp.scb = &sc->scb;
-
- /* set the busy flag in the iscp */
- sc->iscp.stat = word_swap(0x00000001);
-
- /* the command block list (CBL) is empty */
- sc->scb.Cmd_val = (unsigned long) I596_NULL; /* all 1's */
- sc->pCmdHead = sc->scb.pCmd = I596_NULL; /* all 1's */
-
- /*
- * Wake the transmitter if needed.
- */
- if ( uti596_softc.txDaemonTid && pCmd != I596_NULL ) {
- printk(("****RESET: wakes transmitter!\n"))
- status_code = rtems_event_send (uti596_softc.txDaemonTid,
- INTERRUPT_EVENT);
-
- if ( status_code != RTEMS_SUCCESSFUL ) {
- printk(("****ERROR:Could NOT send event to tid 0x%x : %s\n",
- uti596_softc.txDaemonTid, rtems_status_text (status_code) ))
- }
- }
-
-#ifdef DBG_596
- printk(("uti596_reset_hardware: starting i82596.\n"))
-#endif
-
- /* Pass the scb address to the 596 */
- i82596->chan_attn = 0x00000000;
-
- while (sc->iscp.stat)
- if (--boguscnt == 0)
- {
- printk(("reset_hardware: timed out with status %4.4lx\n",
- sc->iscp.stat ))
- break;
- }
-
- /* clear the command word */
- sc->scb.command = 0;
-
-#ifdef DBG_RESET
- printk(("uti596_reset_hardware: After reset_hardware, status of board = 0x%x\n", sc->scb.status ))
-#endif
-}
-
- /***********************************************************************
- * Function: uti596clearListStatus
- *
- * Description:
- * Clear the stat fields for all rfd's
- * Algorithm:
- *
- ***********************************************************************/
+ for ( pRfd = uti596_softc.pInboundFrameQueue;
+ pRfd != I596_NULL;
+ pRfd = pRfd->next) {
+ printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
+ pRfd, pRfd->stat, pRfd->cmd))
+ }
-void uti596clearListStatus(
- i596_rfd *pRfd
-)
-{
- while ( pRfd != I596_NULL ) {
- pRfd -> stat = 0;
- pRfd = (i596_rfd *) word_swap((unsigned long)pRfd-> next);
+ printk(("\nSaved: \n"))
+
+ for ( pRfd = uti596_softc.pSavedRfdQueue;
+ pRfd != I596_NULL;
+ pRfd = pRfd->next) {
+ printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
+ pRfd, pRfd->stat, pRfd->cmd))
}
+
+ printk(("\nUnknown: %p\n",uti596_softc.pLastUnkRFD))
}
- /***********************************************************************
- * Function: send_packet
- *
- * Description: Send a raw ethernet packet
- *
- * Algorithm:
- * increment some stats counters,
- * create the transmit command,
- * add the command to the CBL,
- * wait for event
- *
- ***********************************************************************/
-void send_packet(
- struct ifnet *ifp, struct mbuf *m
-)
+/*
+ * show_queues
+ *
+ * Print out the saved frame queue and the RFA
+ */
+static void show_queues(void)
{
- i596_tbd *pPrev = I596_NULL;
- i596_tbd *pRemainingTbdList;
- i596_tbd *pTbd;
- struct mbuf *n, *input_m = m;
-
- uti596_softc_ *sc = ifp->if_softc;
-
- struct mbuf *l = NULL;
- unsigned int length = 0;
- rtems_status_code status;
- int bd_count = 0;
- rtems_event_set events;
-
- /*
- * For all mbufs in the chain,
- * fill a transmit buffer descriptor for each
- */
- pTbd = (i596_tbd*) word_swap ((unsigned long)sc->pTxCmd->pTbd);
-
- do {
- if (m->m_len) {
- /*
- * Fill in the buffer descriptor
- */
- length += m->m_len;
- pTbd->data = (char *) word_swap ((unsigned long) mtod (m, void *));
- pTbd->size = m->m_len;
- pPrev = pTbd;
- pTbd = (i596_tbd *) word_swap ((unsigned long) pTbd->next);
- l = m;
- m = m->m_next;
- }
- else {
- /*
- * Just toss empty mbufs
- */
- MFREE (m, n);
- m = n;
- if (l != NULL)
- l->m_next = m;
- }
- } while( m != NULL && ++bd_count < 16 );
-
- /* This should never happen */
- if ( bd_count == 16 ) {
- printk(("TX ERROR:Too many mbufs in the packet!!!\n"))
- printk(("Must coalesce!\n"))
- }
-
- if ( length < UTI_596_ETH_MIN_SIZE ) {
- pTbd->data = (char *) word_swap ((unsigned long) sc->zeroes); /* add padding to pTbd */
- pTbd->size = UTI_596_ETH_MIN_SIZE - length; /* zeroes have no effect on the CRC */
- }
- else
- pTbd = pPrev; /* Don't use pTbd in the send routine */
-
- /* Disconnect the packet from the list of Tbd's */
- pRemainingTbdList = (i596_tbd *) word_swap ((unsigned long)pTbd->next);
- pTbd->next = I596_NULL;
- pTbd->size |= UTI_596_END_OF_FRAME;
-
-#ifdef DBG_RAW
- printk(("send_packet: RAW - Add cmd and sleep\n"))
-#endif
-
- sc->rawsndcnt++;
-
-#ifdef DBG_RAW
- printk(("send_packet: RAW - sending packet\n"))
-#endif
-
- /* Sending Zero length packet: shouldn't happen */
- if (pTbd->size <= 0) return ;
-
-#ifdef DBG_INIT_3
- printk(("\nsend_packet: Transmitter adds packet\n"))
- print_hdr ( sc->pTxCmd->pTbd->data ); /* print the first part */
- print_pkt ( sc->pTxCmd->pTbd->next->data ); /* print the first part */
- /* print_echo(sc->pTxCmd->pTbd->data); */
-#endif
-
- /* add the command to the output command queue */
- uti596addCmd ( (i596_cmd *) sc->pTxCmd );
-
- /* sleep until the command has been processed or Timeout encountered. */
- status= rtems_bsdnet_event_receive (INTERRUPT_EVENT,
- RTEMS_WAIT|RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
- &events);
-
- if ( status != RTEMS_SUCCESSFUL ) {
- printk(("Could not sleep %s\n", rtems_status_text(status)))
- }
-
-#ifdef DBG_RAW
- printk(("send_packet: RAW - wake\n"))
-#endif
-
- sc->txInterrupts++;
+ i596_rfd *pRfd;
-#ifdef DBG_INIT_3
- printk(("\nsend_packet: Transmitter issued packet\n"))
- print_hdr ( sc->pTxCmd->pTbd -> data ); /* print the first part */
- print_pkt ( sc->pTxCmd->pTbd ->next-> data ); /* print the first part */
-#endif
+ printk(("CMD: 0x%x, Status: 0x%x\n",
+ uti596_softc.scb.command,
+ uti596_softc.scb.status))
+ printk(("saved Q\n"))
- if ( sc->pTxCmd -> cmd.status & STAT_OK ) {
- sc->stats.tx_packets++;
+ for ( pRfd = uti596_softc.pSavedRfdQueue;
+ pRfd != I596_NULL &&
+ pRfd != NULL;
+ pRfd = pRfd->next) {
+ printk(("0x%p\n", pRfd))
}
- else {
-#ifdef DBG_RAW
- printk(("******send_packet: Driver Error 0x%x\n", sc->pTxCmd -> cmd.status ))
-#endif
- sc->stats.tx_errors++;
- if ( sc->pTxCmd->cmd.status & 0x0020 )
- sc->stats.tx_retries_exceeded++;
- if (!(sc->pTxCmd->cmd.status & 0x0040))
- sc->stats.tx_heartbeat_errors++;
- if ( sc->pTxCmd->cmd.status & 0x0400 )
- sc->stats.tx_carrier_errors++;
- if ( sc->pTxCmd->cmd.status & 0x0800 )
- sc->stats.collisions++;
- if ( sc->pTxCmd->cmd.status & 0x1000 )
- sc->stats.tx_aborted_errors++;
- } /* end if stat_ok */
- /*
- * Restore the transmited buffer descriptor chain.
- */
- pTbd -> next = (i596_tbd *) word_swap ((unsigned long)pRemainingTbdList);
+ printk(("End saved Q 0x%p\n", uti596_softc.pEndSavedQueue))
- /*
- * Free the mbufs used by the sender.
- */
- m = input_m;
- while ( m != NULL ) {
- MFREE(m,n);
- m = n;
+ printk(("\nRFA:\n"))
+
+ for ( pRfd = uti596_softc.pBeginRFA;
+ pRfd != I596_NULL &&
+ pRfd != NULL;
+ pRfd = pRfd->next) {
+ printk(("0x%p\n", pRfd))
}
-}
-
- /***********************************************************************
- * Function: uti596addCmd
- *
- * Description:
- * This routine adds a command onto the end of the
- * command chain
- *
- * Algorithm:
- * Add the command to the end of an existing chain,
- * or start the chain and issue a CUC_START
- *
- *
- ***********************************************************************/
-
-/* static */ void uti596addCmd(
- i596_cmd *pCmd
-)
-{
- ISR_Level level;
-
- #ifdef DBG_596
- printk(("uti596addCmd: Adding command 0x%x\n", pCmd -> command ))
- #endif
-
-#ifdef DBG_ADD
-
- switch ( pCmd -> command & 0x7 ){ /* check bottom 3 bits */
- case CmdConfigure:
- printk(("uti596addCmd: Configure Command 0x%x\n", pCmd->command))
- break;
- case CmdSASetup:
- printk(("uti596addCmd: Set Address Command 0x%x\n", pCmd->command))
- break;
- case CmdMulticastList:
- printk(("uti596addCmd: Multi-cast list 0x%x\n", pCmd->command))
- break;
- case CmdNOp:
- printk(("uti596addCmd: NO op 0x%x\n", pCmd->command))
- break;
- case CmdTDR:
- printk(("uti596addCmd: TDR 0x%x\n", pCmd->command))
- break;
- case CmdDump:
- printk(("uti596addCmd: Dump 0x%x\n", pCmd->command))
- break;
- case CmdDiagnose:
- printk(("uti596addCmd: Diagnose 0x%x\n", pCmd->command))
- break;
- case CmdTx:
- break;
- default:
- printk(("****Unknown Command encountered 0x%x\n", pCmd->command))
- break;
- } /* end switch */
-#endif
-
- pCmd->status = 0;
- pCmd->command |= (CMD_EOL | CMD_INTR ); /* all commands last in list & return an interrupt */
-
- pCmd->next = I596_NULL;
-
- _ISR_Disable(level);
- if (uti596_softc.pCmdHead == I596_NULL)
- {
- uti596_softc.pCmdHead =
- uti596_softc.pCmdTail =
- uti596_softc.scb.pCmd = pCmd;
- uti596_softc.scb.Cmd_val = word_swap ((unsigned long)pCmd);
-#ifdef DBG_596
- printk(("uti596addCmd: First Cmd\n"))
-#endif
- UTI_WAIT_COMMAND_ACCEPTED(10000,"add command"); /* wait for acceptance of previous command */
- uti596_softc.scb.command = CUC_START;
- i82596->chan_attn = 0x00000000;
- _ISR_Enable(level);
- }
- else
- {
-#ifdef DBG_596
- printk(("uti596addCmd: Chained Cmd\n"))
-#endif
- uti596_softc.pCmdTail->next = (i596_cmd *) word_swap ((unsigned long)pCmd);
- uti596_softc.pCmdTail = pCmd;
- _ISR_Enable(level);
- }
-
-#ifdef DBG_596
- printk(("uti596addCmd: Scb status & command 0x%x 0x%x\n",
- uti596_softc.scb.status,
- uti596_softc.scb.command ))
-#endif
-}
-
-
-/***********************************************************************
- * Function: uti596supplyFD
- *
- * Description: returns a buffer to the receive frame pool.
- * call this with Inetrrupts disabled!
- *
- * Algorithm:
- *
- ***********************************************************************/
-
-void uti596supplyFD(
- i596_rfd * pRfd
-)
-{
- i596_rfd *pLastRfd;
-
- UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD!\n")
- pRfd -> cmd = CMD_EOL;
- pRfd -> pRbd = I596_NULL;
- pRfd -> next = I596_NULL;
- pRfd -> stat = 0x0000; /* clear STAT_C and STAT_B bits */
-
- /*
- * Check if the list is empty:
- */
- if ( uti596_softc.pBeginRFA == I596_NULL ) {
- /* Init a list w/ one entry */
- uti596_softc.pBeginRFA = uti596_softc.pEndRFA = pRfd;
- UTI_596_ASSERT(uti596_softc.countRFD == 0, "Null begin, but non-zero count\n")
- if ( uti596_softc.pLastUnkRFD != I596_NULL ) {
- printk(("LastUnkRFD is NOT NULL!!\n"))
- }
- uti596_softc.countRFD = 1;
- return;
- }
- /*
- * Check if the last RFD is used/read by the 596.
- */
- pLastRfd = uti596_softc.pEndRFA;
-
- if ( pLastRfd != I596_NULL &&
- ! (pLastRfd -> stat & ( STAT_C | STAT_B ) )) { /* C = complete, B = busy (prefetched) */
-
- /*
- * Not yet too late to add it
- */
- pLastRfd -> next = (i596_rfd *) word_swap ((unsigned long)pRfd);
- pLastRfd -> cmd &= ~CMD_EOL; /* RESET_EL : reset EL bit to 0 */
- uti596_softc.countRFD++; /* Lets assume we add it successfully
- If not, the RFD may be used, and may decrement countRFD < 0 !!*/
- /*
- * Check if the last RFD was used while appending.
- */
- if ( pLastRfd -> stat & ( STAT_C | STAT_B ) ) { /* completed or was prefetched */
- /*
- * Either the EL bit of the last rfd has been read by the 82596,
- * and it will stop after reception,( true when RESET_EL not reached ) or
- * the EL bit was NOT read by the 82596 and it will use the linked
- * RFD for the next reception. ( true is RESET_EL was reached )
- * So, it is unknown whether or not the linked rfd will be used.
- * Therefore, the end of list CANNOT be updated.
- */
- UTI_596_ASSERT ( uti596_softc.pLastUnkRFD == I596_NULL, "Too many Unk RFD's\n" )
- uti596_softc.pLastUnkRFD = pRfd;
- return;
- }
- else {
- /*
- * The RFD being added was not touched by the 82596
- */
- if (uti596_softc.pLastUnkRFD != I596_NULL ) {
-
- uti596append(&uti596_softc.pSavedRfdQueue, pRfd); /* Only here! saved Q */
- uti596_softc.pEndSavedQueue = pRfd;
- uti596_softc.savedCount++;
- uti596_softc.countRFD--;
-
- }
- else {
- uti596_softc.pEndRFA = pRfd; /* the RFA has been extended */
- if ( ( uti596_softc.scb.status & SCB_STAT_RNR ||
- uti596_softc.scb.status & RU_NO_RESOURCES ) &&
- uti596_softc.countRFD > 1 ) {
- uti596_softc.pBeginRFA -> cmd &= ~CMD_EOL; /* Ensure that beginRFA is not EOL */
-
- UTI_596_ASSERT(uti596_softc.pEndRFA -> next == I596_NULL, "supply: List buggered\n")
- UTI_596_ASSERT(uti596_softc.pEndRFA -> cmd & CMD_EOL, "supply: No EOL at end.\n")
- UTI_596_ASSERT(uti596_softc.scb.command == 0, "Supply: scb command must be zero\n")
-#ifdef DBG_START
- printk(("uti596supplyFD: starting receiver"))
-#endif
- /* start the receiver */
- UTI_596_ASSERT(uti596_softc.pBeginRFA != I596_NULL, "rx start w/ NULL begin! \n")
- uti596_softc.scb.pRfd = uti596_softc.pBeginRFA;
- uti596_softc.scb.Rfd_val = word_swap ((unsigned long) uti596_softc.pBeginRFA);
- uti596_softc.scb.command = RX_START | SCB_STAT_RNR; /* Don't ack RNR! The receiver
- * should be stopped in this case */
- UTI_596_ASSERT( !(uti596_softc.scb.status & SCB_STAT_FR),"FRAME RECEIVED INT COMING!\n")
- i82596->chan_attn = 0x00000000; /* send CA signal */
- }
- }
- return;
-
- }
- }
- else {
- /*
- * too late , pLastRfd in use ( or NULL ),
- * in either case, EL bit has been read, and RNR condition will occur
- */
- uti596append( &uti596_softc.pSavedRfdQueue, pRfd); /* save it for RNR */
-
- uti596_softc.pEndSavedQueue = pRfd; /* reset end of saved queue */
- uti596_softc.savedCount++;
-
- return;
- }
-}
-/***********************************************************************
- * Function: void uti596append
- *
- * Description:
- * adds an RFD to the end of the received frame queue,
- * for processing by the rxproc.
- * Also removes this RFD from the RFA
- *
- * Algorithm:
- *
- ***********************************************************************/
-void uti596append(
- i596_rfd ** ppQ,
- i596_rfd * pRfd
-)
-{
-
- i596_rfd *p;
-
- if ( pRfd != NULL && pRfd != I596_NULL) {
- pRfd -> next = I596_NULL;
- pRfd -> cmd |= CMD_EOL; /* set EL bit */
-
- if ( *ppQ == NULL || *ppQ == I596_NULL ) {
- /* empty list */
- *ppQ = pRfd;
- }
- else {
- /* walk to the end of the list */
- for ( p=*ppQ;
- p->next != I596_NULL;
- p=(i596_rfd *) word_swap ((unsigned long)p->next) );
-
- /* append the rfd */
- p->cmd &= ~CMD_EOL; /* Clear EL bit at end */
- p->next = (i596_rfd *) word_swap ((unsigned long)pRfd);
- }
- }
- else {
- printk(("Illegal attempt to append: %p\n", pRfd))
- }
+ printk(("uti596_softc.pEndRFA: %p\n",uti596_softc.pEndRFA))
}
-/***********************************************************************
- * Function: void printk_time
- *
- * Description:
- ***********************************************************************/
-void printk_time( void )
-{
- rtems_time_of_day tm_struct;
- rtems_clock_get(RTEMS_CLOCK_GET_TOD, &tm_struct);
- printk(("Current time: %d:%d:%d \n",
- tm_struct.hour,
- tm_struct.minute,
- tm_struct.second))
-}
-
-/***********************************************************************
- * Function: void dump_scb
+/*
+ * print_eth
*
- * Description:
- ***********************************************************************/
-void dump_scb( void )
-{
- printk(("status 0x%x\n",uti596_softc.scb.status))
- printk(("command 0x%x\n",uti596_softc.scb.command))
- printk(("cmd 0x%x\n",(int)uti596_softc.scb.pCmd))
- printk(("rfd 0x%x\n",(int)uti596_softc.scb.pRfd))
- printk(("crc_err 0x%x\n",uti596_softc.scb.crc_err))
- printk(("align_err 0x%x\n",uti596_softc.scb.align_err))
- printk(("resource_err 0x%x\n",uti596_softc.scb.resource_err ))
- printk(("over_err 0x%x\n",uti596_softc.scb.over_err))
- printk(("rcvdt_err 0x%x\n",uti596_softc.scb.rcvdt_err))
- printk(("short_err 0x%x\n",uti596_softc.scb.short_err))
- printk(("t_on 0x%x\n",uti596_softc.scb.t_on))
- printk(("t_off 0x%x\n",uti596_softc.scb.t_off))
-}
-
-
-#ifdef DBG_INIT_3
-
- /***********************************************************************
- **
- ** Debugging Functions
- **
- ***********************************************************************/
-
-
- /***********************************************************************
- * Function: print_eth
- *
- * Description:
- * Print the contents of an ethernet packet header
- * CANNOT BE CALLED FROM ISR
- *
- * Algorithm:
- * Print Destination, Src, and type of packet
- *
- ***********************************************************************/
-
-/* static */ void print_eth(
+ * Print the contents of an ethernet packet
+ * CANNOT BE CALLED FROM ISR
+ */
+static void print_eth(
unsigned char *add
)
{
@@ -2445,12 +2801,12 @@ void dump_scb( void )
for (i = 0; i < 6; i++) {
printk ((" %2.2X", add[i]))
- }
+ }
printk (("\n"))
printk (("Source"))
for (i = 6; i < 12; i++) {
- printk ((" %2.2X", add[i]))
+ printk ((" %2.2X", add[i]))
}
printk (("\n"))
@@ -2467,19 +2823,19 @@ void dump_scb( void )
for ( i=0; i< 5 ; i++) {
printk (("%x:", add[22 + i]))
- }
+ }
printk (("%x\n", add[27]))
printk (("Sender IP addr: "))
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[28 + i]))
- }
+ }
printk (("%u\n", add[31]))
printk (("Target Enet addr: "))
for ( i=0; i< 5 ; i++) {
printk (( "%x:", add[32 + i]))
- }
+ }
printk (("%x\n", add[37]))
printk (("Target IP addr: "))
@@ -2489,7 +2845,9 @@ void dump_scb( void )
printk (("%u\n", add[41]))
}
- if ( add[12] == 0x08 && add[13] == 0x00 ) { /* an IP packet */
+
+ if ( add[12] == 0x08 && add[13] == 0x00 ) {
+ /* an IP packet */
printk (("*********************IP HEADER******************\n"))
printk (("IP version/IPhdr length: %2.2X TOS: %2.2X\n", add[14] , add[15]))
printk (("IP total length: %2.2X %2.2X, decimal %d\n", add[16], add[17], length = (add[16]<<8 | add[17] )))
@@ -2502,41 +2860,25 @@ void dump_scb( void )
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[26 + i]))
- }
+ }
printk (("%u\n", add[29]))
printk (("Destination IP address: "))
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[30 + i]))
- }
- printk (("%u\n", add[33]))
- /* printk(("********************IP Packet Data*******************\n"))
- length -=20;
- for ( i=0; i < length ; i++) {
- printk(("0x%2.2x ", add[34+i]))
}
- printk(("\n"))
-
- printk(("ICMP checksum: %2.2x %2.2x\n", add[36], add[37]))
- printk(("ICMP identifier: %2.2x %2.2x\n", add[38], add[39]))
- printk(("ICMP sequence nbr: %2.2x %2.2x\n", add[40], add[41]))
- */
+ printk (("%u\n", add[33]))
}
}
- /***********************************************************************
- * Function: print_hdr
- *
- * Description:
- * Print the contents of an ethernet packet header
- * CANNOT BE CALLED FROM ISR
- *
- * Algorithm:
- * Print Destination, Src, and type of packet
- *
- ***********************************************************************/
-
-/* static */ void print_hdr(
+
+/*
+ * print_hdr
+ *
+ * Print the contents of an ethernet packet header
+ * CANNOT BE CALLED FROM ISR
+ */
+static void print_hdr(
unsigned char *add
)
{
@@ -2548,29 +2890,24 @@ void dump_scb( void )
for (i = 0; i < 6; i++) {
printk ((" %2.2X", add[i]))
- }
+ }
printk (("\nSource"))
for (i = 6; i < 12; i++) {
printk ((" %2.2X", add[i]))
- }
+ }
printk (("\nframe type %2.2X%2.2X\n", add[12], add[13]))
printk (("print_hdr: completed"))
}
- /***********************************************************************
- * Function: print_pkt
- *
- * Description:
- * Print the contents of an ethernet packet header
- * CANNOT BE CALLED FROM ISR
- *
- * Algorithm:
- * Print Destination, Src, and type of packet
- *
- ***********************************************************************/
-
-/* static */ void print_pkt(
+
+/*
+ * Function: print_pkt
+ *
+ * Print the contents of an ethernet packet & data
+ * CANNOT BE CALLED FROM ISR
+ */
+static void print_pkt(
unsigned char *add
)
{
@@ -2591,18 +2928,18 @@ void dump_scb( void )
for ( i=0; i< 5 ; i++) {
printk (( "%x:", add[22 + i]))
- }
+ }
printk (("%x\n", add[27]))
printk (("Sender IP addr: "))
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[28 + i]))
- }
+ }
printk (("%u\n", add[31]))
printk (("Target Enet addr: "))
for ( i=0; i< 5 ; i++) {
- printk (( "%x:", add[32 + i]))
+ printk (( "%x:", add[32 + i]))
}
printk (("%x\n", add[37]))
printk (("Target IP addr: "))
@@ -2627,7 +2964,7 @@ void dump_scb( void )
for ( i=0; i< 3 ; i++) {
printk(( "%u.", add[26 + i]))
- }
+ }
printk(("%u\n", add[29]))
printk(("Destination IP address: "))
@@ -2649,19 +2986,14 @@ void dump_scb( void )
}
}
- /***********************************************************************
- * Function: print_echo
- *
- * Description:
- * Print the contents of an ethernet packet header
- * CANNOT BE CALLED FROM ISR
- *
- * Algorithm:
- * Prints only echo packets
- *
- ***********************************************************************/
-
-/* static */ void print_echo(
+
+/*
+ * print_echo
+ *
+ * Print the contents of an echo packet
+ * CANNOT BE CALLED FROM ISR
+ */
+static void print_echo(
unsigned char *add
)
{
@@ -2677,13 +3009,13 @@ void dump_scb( void )
for (i = 0; i < 6; i++) {
printk ((" %2.2X", add[i]))
- }
+ }
printk (("\n"))
printk (("Source"))
for (i = 6; i < 12; i++) {
printk ((" %2.2X", add[i]))
- }
+ }
printk (("\n"))
printk (("frame type %2.2X%2.2X\n", add[12], add[13]))
@@ -2699,7 +3031,7 @@ void dump_scb( void )
for ( i=0; i< 3 ; i++) {
printk (("%u.", add[26 + i]))
- }
+ }
printk (("%u\n", add[29]))
printk (("Destination IP address: "))
@@ -2712,7 +3044,7 @@ void dump_scb( void )
for ( i=0; i < length ; i++) {
printk(("0x%2.2x ", add[34+i]))
- }
+ }
printk(("\n"))
printk(("ICMP checksum: %2.2x %2.2x\n", add[36], add[37]))
printk(("ICMP identifier: %2.2x %2.2x\n", add[38], add[39]))
@@ -2721,169 +3053,4 @@ void dump_scb( void )
}
}
-#endif
-
-/***********************************************************************
- * Function: uti596dump
- *
- * Description: Dump 596 registers
- *
- * Algorithm:
- ***********************************************************************/
-/* static */ int uti596dump(
- char * pDumpArea
-)
-{
- i596_dump dumpCmd;
- int boguscnt = 25000000; /* over a second! */
-
-#ifdef DBG_596
- printk(("uti596dump: begin\n"))
-#endif
-
- dumpCmd.cmd.command = CmdDump;
- dumpCmd.cmd.next = I596_NULL;
- dumpCmd.pData = pDumpArea;
- uti596_softc.cmdOk = 0;
- uti596addCmd ( (i596_cmd *)&dumpCmd);
- while (1) {
- if ( --boguscnt == 0) {
- printk(("Dump command was not processed within spin loop delay\n"))
- return 0;
- }
- else {
- if ( uti596_softc.cmdOk ) {
- return 1; /* successful completion */
- }
- }
- }
-}
-
-/***********************************************************************
- * Function: void dumpQ
- *
- * Description:
- ***********************************************************************/
-void dumpQ( void )
-{
- i596_rfd *pRfd;
-
- printk(("savedQ:\n"))
-
- for( pRfd = uti596_softc.pSavedRfdQueue;
- pRfd != I596_NULL;
- pRfd = pRfd -> next) {
- printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
- }
-
- printk(("Inbound:\n"))
-
- for( pRfd = uti596_softc.pInboundFrameQueue;
- pRfd != I596_NULL;
- pRfd = pRfd -> next) {
- printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
- }
-
- printk(("Last Unk: %p\n", uti596_softc.pLastUnkRFD ))
- printk(("RFA:\n"))
-
- for( pRfd = uti596_softc.pBeginRFA;
- pRfd != I596_NULL;
- pRfd = pRfd -> next) {
- printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd))
- }
-}
-
-
-/***********************************************************************
- * Function: void show_buffers
- *
- * Description:
- ***********************************************************************/
-void show_buffers (void)
-{
- i596_rfd *pRfd;
-
- printk(("82596 cmd: 0x%x, status: 0x%x RFA len: %d\n",
- uti596_softc.scb.command,
- uti596_softc.scb.status,
- uti596_softc.countRFD))
-
- printk(("\nRFA: \n"))
-
- for ( pRfd = uti596_softc.pBeginRFA;
- pRfd != I596_NULL;
- pRfd = pRfd->next) {
- printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
- pRfd, pRfd->stat, pRfd->cmd))
- }
- printk(("\nInbound: \n"))
-
- for ( pRfd = uti596_softc.pInboundFrameQueue;
- pRfd != I596_NULL;
- pRfd = pRfd->next) {
- printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
- pRfd, pRfd->stat, pRfd->cmd))
- }
-
- printk(("\nSaved: \n"))
-
- for ( pRfd = uti596_softc.pSavedRfdQueue;
- pRfd != I596_NULL;
- pRfd = pRfd->next) {
- printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n",
- pRfd, pRfd->stat, pRfd->cmd))
- }
-
- printk(("\nUnknown: %p\n",uti596_softc.pLastUnkRFD))
-}
-
-/***********************************************************************
- * Function: void show_queues
- *
- * Description:
- ***********************************************************************/
-void show_queues(void)
-{
- i596_rfd *pRfd;
-
- printk(("CMD: 0x%x, Status: 0x%x\n",
- uti596_softc.scb.command,
- uti596_softc.scb.status))
- printk(("saved Q\n"))
-
- for ( pRfd = uti596_softc.pSavedRfdQueue;
- pRfd != I596_NULL &&
- pRfd != NULL;
- pRfd = pRfd->next) {
- printk(("0x%p\n", pRfd))
- }
-
- printk(("End saved Q 0x%p\n", uti596_softc.pEndSavedQueue))
-
- printk(("\nRFA:\n"))
-
- for ( pRfd = uti596_softc.pBeginRFA;
- pRfd != I596_NULL &&
- pRfd != NULL;
- pRfd = pRfd->next) {
- printk(("0x%p\n", pRfd))
- }
-
- printk(("uti596_softc.pEndRFA: %p\n",uti596_softc.pEndRFA))
-}
-
- /***********************************************************************
- * Function: word_swap
- *
- * Description:
- * Return a 32 bit value, swapping the upper
- * and lower words first.
- *
- ***********************************************************************/
-unsigned long word_swap (unsigned long val)
-{
- return (((val >> 16)&(0x0000ffff)) | ((val << 16)&(0xffff0000)));
-}
-
-
+#endif \ No newline at end of file
diff --git a/c/src/lib/libbsp/m68k/mvme167/network/uti596.h b/c/src/lib/libbsp/m68k/mvme167/network/uti596.h
index 5757767526..d1d3d1ae2e 100644
--- a/c/src/lib/libbsp/m68k/mvme167/network/uti596.h
+++ b/c/src/lib/libbsp/m68k/mvme167/network/uti596.h
@@ -3,7 +3,6 @@
/*
* EII: March 11: Created v. 0.0
- * Jan 12/98 Added STAT bits, s11-=s5 and max_colls.
*
* $Id$
*/
@@ -55,14 +54,11 @@ struct enet_statistics{
int nic_reset_count; /* The number of times uti596reset() has been called. */
};
-#define UTI596_MUTEX 1
-
-
#define CMD_EOL 0x8000 /* The last command of the list, stop. */
#define CMD_SUSP 0x4000 /* Suspend after doing cmd. */
#define CMD_INTR 0x2000 /* Interrupt after doing cmd. */
-#define CMD_FLEX 0x0008 /* Enable flexible memory model */
+#define CMD_FLEX 0x0008 /* Enable flexible memory model */
#define SCB_STAT_CX 0x8000 /* Cmd completes with 'I' bit set */
#define SCB_STAT_FR 0x4000 /* Frame Received */
@@ -72,7 +68,6 @@ struct enet_statistics{
#define SCB_CUS_SUSPENDED 0x0100
#define SCB_CUS_ACTIVE 0x0200
-
#define STAT_C 0x8000 /* Set to 1 after execution */
#define STAT_B 0x4000 /* 1 : Cmd being executed, 0 : Cmd done. */
#define STAT_OK 0x2000 /* 1: Command executed ok 0 : Error */
@@ -87,8 +82,6 @@ struct enet_statistics{
#define STAT_S5 0x0020
#define STAT_MAX_COLLS 0x000F
-
-
#define RBD_STAT_P 0x4000 /* prefetch */
#define RBD_STAT_F 0x4000 /* used */
@@ -105,17 +98,11 @@ struct enet_statistics{
#define RU_NO_RESOURCES 0x0020
#define RU_READY 0x0040
-
-#define IO_ADDR 0x360
-#define PORT_ADDR IO_ADDR
-#define CHAN_ATTN PORT_ADDR + 4
-#define NIC_ADDR PORT_ADDR + 8
-
#define I596_NULL ( ( void * ) 0xffffffff)
#define UTI_596_END_OF_FRAME 0x8000
-#define SIZE_MASK 0x3fff
-struct i596_tbd;
+
+struct i596_tbd; /* necessary forward declaration */
enum commands {
CmdNOp = 0,
@@ -128,14 +115,100 @@ enum commands {
CmdDiagnose = 7
};
+/*
+ * 82596 Dump Command Result
+ */
+typedef volatile struct i596_dump_result {
+ unsigned char bf;
+ unsigned char config_bytes[11];
+ unsigned char reserved1[2];
+ unsigned char ia_bytes[6];
+ unsigned short last_tx_status;
+ unsigned short tx_crc_byte01;
+ unsigned short tx_crc_byte23;
+ unsigned short rx_crc_byte01;
+ unsigned short rx_crc_byte23;
+ unsigned short rx_temp_mem01;
+ unsigned short rx_temp_mem23;
+ unsigned short rx_temp_mem45;
+ unsigned short last_rx_status;
+ unsigned short hash_reg01;
+ unsigned short hash_reg23;
+ unsigned short hash_reg45;
+ unsigned short hash_reg67;
+ unsigned short slot_time_counter;
+ unsigned short wait_time_counter;
+ unsigned short rx_frame_length;
+ unsigned long reserved2;
+ unsigned long cb_in3;
+ unsigned long cb_in2;
+ unsigned long cb_in1;
+ unsigned long la_cb_addr;
+ unsigned long rdb_pointer;
+ unsigned long int_memory;
+ unsigned long rfd_size;
+ unsigned long tbd_pointer;
+ unsigned long base_addr;
+ unsigned long ru_temp_reg;
+ unsigned long tcb_count;
+ unsigned long next_rb_size;
+ unsigned long next_rb_addr;
+ unsigned long curr_rb_size;
+ unsigned long la_rbd_addr;
+ unsigned long next_rbd_addr;
+ unsigned long curr_rbd_addr;
+ unsigned long curr_rb_count;
+ unsigned long next_fd_addr;
+ unsigned long curr_fd_add;
+ unsigned long temp_cu_reg;
+ unsigned long next_tb_count;
+ unsigned long buffer_addr;
+ unsigned long la_tbd_addr;
+ unsigned long next_tbd_addr;
+ unsigned long cb_command;
+ unsigned long next_cb_addr;
+ unsigned long curr_cb_addr;
+ unsigned long scb_cmd_word;
+ unsigned long scb_pointer;
+ unsigned long cb_stat_word;
+ unsigned long mm_lfsr;
+ unsigned char micro_machine_bit_array[28];
+ unsigned char cu_port[16];
+ unsigned long mm_alu;
+ unsigned long reserved3;
+ unsigned long mm_temp_a_rr;
+ unsigned long mm_temp_a;
+ unsigned long tx_dma_b_cnt;
+ unsigned long mm_input_port_addr_reg;
+ unsigned long tx_dma_addr;
+ unsigned long mm_port_reg1;
+ unsigned long rx_dma_b_cnt;
+ unsigned long mm_port_reg2;
+ unsigned long rx_dma_addr;
+ unsigned long reserved4;
+ unsigned long bus_t_timers;
+ unsigned long diu_cntrl_reg;
+ unsigned long reserved5;
+ unsigned long sysbus;
+ unsigned long biu_cntrl_reg;
+ unsigned long mm_disp_reg;
+ unsigned long mm_status_reg;
+ unsigned short dump_status;
+} i596_dump_result;
+
+typedef volatile struct i596_selftest {
+ unsigned long rom_signature;
+ unsigned long results;
+} i596_selftest;
+
/*
* Action commands
* (big endian, linear mode)
- */
+ */
typedef volatile struct i596_cmd {
- volatile unsigned short status;
- volatile unsigned short command;
- volatile struct i596_cmd *next;
+ unsigned short status;
+ unsigned short command;
+ struct i596_cmd *next;
} i596_cmd;
typedef volatile struct i596_nop {
@@ -144,21 +217,21 @@ typedef volatile struct i596_nop {
typedef volatile struct i596_set_add {
i596_cmd cmd;
- char data[8];
+ char data[8];
} i596_set_add;
typedef volatile struct i596_configure {
i596_cmd cmd;
- char data[16];
+ char data[16];
} i596_configure;
typedef volatile struct i596_tx {
- i596_cmd cmd;
- volatile struct i596_tbd *pTbd;
- unsigned short count;
- unsigned short pad;
- char data[6];
- unsigned short length;
+ i596_cmd cmd;
+ struct i596_tbd *pTbd;
+ unsigned short count;
+ unsigned short pad;
+ char data[6];
+ unsigned short length;
} i596_tx;
typedef volatile struct i596_tdr {
@@ -168,17 +241,17 @@ typedef volatile struct i596_tdr {
typedef volatile struct i596_dump {
i596_cmd cmd;
- char *pData;
+ char *pData;
} i596_dump;
/*
* Transmit buffer descriptor
*/
typedef volatile struct i596_tbd {
- unsigned short size;
- unsigned short pad;
- volatile struct i596_tbd *next;
- char *data;
+ unsigned short size;
+ unsigned short pad;
+ struct i596_tbd *next;
+ char *data;
} i596_tbd;
/*
@@ -186,113 +259,115 @@ typedef volatile struct i596_tbd {
* (flexible memory structure)
*/
typedef volatile struct i596_rbd {
- unsigned short count;
- unsigned short offset;
- volatile struct i596_rbd *next;
- char *data;
- unsigned short size;
- unsigned short pad;
+ unsigned short count;
+ unsigned short offset;
+ struct i596_rbd *next;
+ char *data;
+ unsigned short size;
+ unsigned short pad;
} i596_rbd;
/*
* Receive Frame Descriptor
*/
typedef volatile struct i596_rfd {
- volatile unsigned short stat;
- volatile unsigned short cmd;
- volatile struct i596_rfd *next;
- i596_rbd *pRbd;
- unsigned short count;
- unsigned short size;
- char data [1532];
+ unsigned short stat;
+ unsigned short cmd;
+ struct i596_rfd *next;
+ i596_rbd *pRbd;
+ unsigned short count;
+ unsigned short size;
+ char data [1532];
} i596_rfd;
-#define RX_RING_SIZE 8
-
/*
* System Control Block
*/
typedef volatile struct i596_scb {
- volatile unsigned short status;
- volatile unsigned short command;
- volatile unsigned long Cmd_val;
- volatile unsigned long Rfd_val;
- volatile unsigned long crc_err;
- volatile unsigned long align_err;
- volatile unsigned long resource_err;
- volatile unsigned long over_err;
- volatile unsigned long rcvdt_err;
- volatile unsigned long short_err;
- volatile unsigned short t_off;
- volatile unsigned short t_on;
- i596_cmd *pCmd;
- i596_rfd *pRfd;
+ unsigned short status;
+ unsigned short command;
+ unsigned long cmd_pointer;
+ unsigned long rfd_pointer;
+ unsigned long crc_err;
+ unsigned long align_err;
+ unsigned long resource_err;
+ unsigned long over_err;
+ unsigned long rcvdt_err;
+ unsigned long short_err;
+ unsigned short t_off;
+ unsigned short t_on;
+ i596_cmd *pCmd;
+ i596_rfd *pRfd;
} i596_scb;
/*
* Intermediate System Configuration Pointer
*/
typedef volatile struct i596_iscp {
- volatile unsigned long stat;
- volatile unsigned long scb_val;
- i596_scb *scb;
+ unsigned8 null1; /* Always zero */
+ unsigned8 busy; /* Busy byte */
+ unsigned short scb_offset; /* Not used in linear mode */
+ unsigned long scb_pointer; /* Swapped pointer to scb */
+ i596_scb *scb; /* Real pointer to scb */
} i596_iscp;
/*
* System Configuration Pointer
*/
typedef volatile struct i596_scp {
- unsigned long sysbus;
- unsigned long pad;
- unsigned long iscp_val;
- i596_iscp *iscp;
+ unsigned long sysbus; /* Only low 8 bits are used */
+ unsigned long pad; /* Must be zero */
+ unsigned long iscp_pointer; /* Swapped pointer to iscp */
+ i596_iscp *iscp; /* Real pointer to iscp */
} i596_scp;
+/*
+ * Device Dependent Data Structure
+ */
typedef volatile struct uti596_softc {
- struct arpcom arpcom;
- i596_scp *pScp;
- i596_iscp iscp;
- i596_scb scb;
- i596_set_add set_add;
- i596_configure set_conf;
- i596_tdr tdr;
- i596_nop nop;
- unsigned long stat;
- i596_tx *pTxCmd;
- i596_tbd *pTbd;
-
- int ioAddr;
-
- i596_rfd *pBeginRFA;
- i596_rfd *pEndRFA;
- i596_rfd *pLastUnkRFD;
- i596_rbd *pLastUnkRBD;
- i596_rfd *pEndSavedQueue;
- i596_cmd *pCmdHead;
- i596_cmd *pCmdTail; /* unneeded, as chaining not used, but implemented */
-
- rtems_id rxDaemonTid;
- rtems_id txDaemonTid;
- rtems_id resetDaemonTid;
+ struct arpcom arpcom;
+ i596_scp *pScp; /* Block aligned on 16 byte boundary */
+ i596_scp *base_scp; /* Unaligned block. Need for free() */
+ i596_iscp iscp;
+ i596_scb scb;
+ i596_set_add set_add;
+ i596_configure set_conf;
+ i596_tdr tdr;
+ i596_nop nop;
+ i596_tx *pTxCmd;
+ i596_tbd *pTbd;
+
+ i596_rfd *pBeginRFA;
+ i596_rfd *pEndRFA;
+ i596_rfd *pLastUnkRFD;
+ i596_rbd *pLastUnkRBD;
+ i596_rfd *pEndSavedQueue;
+ i596_cmd *pCmdHead;
+ i596_cmd *pCmdTail; /* unneeded, as chaining not used, but implemented */
+
+ rtems_id rxDaemonTid;
+ rtems_id txDaemonTid;
+ rtems_id resetDaemonTid;
struct enet_statistics stats;
- int started;
- unsigned long rxInterrupts;
- unsigned long txInterrupts;
- volatile int cmdOk;
- int resetDone;
- unsigned long txRawWait;
- i596_rfd *pInboundFrameQueue;
- short int rxBdCount;
- short int txBdCount;
- short int countRFD;
- short int savedCount;
- i596_rfd *pSavedRfdQueue;
- rtems_name semaphore_name;
- rtems_id semaphore_id;
- char zeroes[64];
- unsigned long rawsndcnt;
- int nic_reset; /* flag is for requesting that ISR issue a reset quest */
+ int started;
+ unsigned long rxInterrupts;
+ unsigned long txInterrupts;
+ volatile int cmdOk;
+ unsigned short * pCurrent_command_status;
+ int resetDone;
+ unsigned long txRawWait;
+ i596_rfd *pInboundFrameQueue;
+ short int rxBdCount;
+ short int txBdCount;
+ short int countRFD;
+ short int savedCount;
+ i596_rfd *pSavedRfdQueue;
+ rtems_name semaphore_name;
+ rtems_id semaphore_id;
+ char zeroes[64];
+ unsigned long rawsndcnt;
+ int nic_reset; /* flag for requesting that ISR issue a reset quest */
} uti596_softc_;
#endif /* UTI596_H */
diff --git a/c/src/lib/libbsp/m68k/mvme167/start/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/start/Makefile.am
index 012c72b1e4..afb2a158f7 100644
--- a/c/src/lib/libbsp/m68k/mvme167/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.am
index 0ae5078b6f..e5f1fdd3a6 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,6 @@ include $(top_srcdir)/../../../../../../automake/lib.am
#
# USE_INIT_FINI tells main.c what C++ help we need.
-
AM_CPPFLAGS += -DUSE_INIT_FINI
$(PGM): $(OBJS)
@@ -32,16 +31,12 @@ $(PGM): $(OBJS)
$(PROJECT_RELEASE)/lib/linkcmds: linkcmds
$(INSTALL_DATA) $< $@
-$(PROJECT_RELEASE)/lib/elflinkcmds: elflinkcmds
- $(INSTALL_DATA) $< $@
-
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds \
- $(PROJECT_RELEASE)/lib/elflinkcmds
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds
all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
.PRECIOUS: $(PGM)
-EXTRA_DIST = bspclean.c bspstart.c elflinkcmds linkcmds page_table.c
+EXTRA_DIST = bspclean.c bspstart.c linkcmds page_table.c
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
index f443a48153..05f78e0c85 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
@@ -79,15 +79,18 @@ void bsp_pretasking_hook(void); /* m68k version */
*/
void bsp_start( void )
{
- extern void *_WorkspaceBase;
- extern m68k_isr_entry M68Kvec[];
- extern void *_WorkspaceBase;
-
void M68KFPSPInstallExceptionHandlers (void);
+ extern m68k_isr_entry M68Kvec[];
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
m68k_isr_entry *rom_monitor_vector_table;
int index;
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
+
/*
* 167Bug Vectors are at 0xFFE00000
*/
@@ -129,7 +132,8 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- Cpu_table.interrupt_stack_size = 4096; /* Must match value in start.s */
+ /* Must match value in start.s */
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
/*
* If the application has not overriden the default User_extension_table,
@@ -147,19 +151,4 @@ void bsp_start( void )
* not malloc'ed. It is just "pulled from the air".
*/
BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
-
- /*
- * Increase the number of semaphores that can be created on this node. The
- * termios package requires one semaphore to protect the list of termios-
- * capable terminals, and up to four semaphores per termios-capable
- * terminal (add calls here as required). The maximum number of semaphores
- * must be set before returning to boot_card(), which will call
- * rtems_initialize_executive_early(). This latter function eventually
- * calls _RTEMS_API_Initialize(), which in turn calls
- * _Semaphore_Manager_initialization(), which allocates the space for the
- * maximum number of semaphores in the object table. These calls occur
- * before the call to the predriver hook and the calls to the device
- * initialization callbacks. Hence, we must do this here.
- */
- console_reserve_resources( &BSP_Configuration );
}
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds
index 9cbf889dd7..c22f578905 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds
@@ -22,11 +22,11 @@ OUTPUT_ARCH(m68k)
ENTRY(_start)
/*
- * Declare some sizes.
+ * Declare some sizes. Heap is sized at whatever ram space is left.
*/
-_RamBase = 0x00800000;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00800000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
-_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
MEMORY
@@ -42,103 +42,144 @@ MEMORY
SECTIONS
{
- ram : {
- . = .;
- } >ram
+ /*
+ * Text, data and bss segments
+ */
+ .text : {
+ *(.text)
- /*
- * Text, data and bss segments
- */
- .text : {
- *(.text)
+ /*
+ * C++ constructors/destructors
+ */
+ *(.gnu.linkonce.t.*)
- /*
- * C++ constructors/destructors
- */
- *(.gnu.linkonce.t.*)
+ /*
+ * Initialization and finalization code.
+ *
+ * Various files can provide initialization and finalization
+ * functions. crtbegin.o and crtend.o are two instances. The
+ * body of these functions are in .init and .fini sections. We
+ * accumulate the bodies here, and prepend function prologues
+ * from crti.o and function epilogues from crtn.o. crti.o must
+ * be linked first; crtn.o must be linked last. Because these
+ * are wildcards, it doesn't matter if the user does not
+ * actually link against crti.o and crtn.o; the linker won't
+ * look for a file to match a wildcard. The wildcard also
+ * means that it doesn't matter which directory crti.o and
+ * crtn.o are in.
+ */
+ PROVIDE (_init = .);
+ *crti.o(.init)
+ *(.init)
+ *crtn.o(.init)
+
+ PROVIDE (_fini = .);
+ *crti.o(.fini)
+ *(.fini)
+ *crtn.o(.fini)
- /*
- * Initialization and finalization code.
- *
- * Various files can provide initialization and finalization
- * functions. crtbegin.o and crtend.o are two instances. The
- * body of these functions are in .init and .fini sections. We
- * accumulate the bodies here, and prepend function prologues
- * from crti.o and function epilogues from crtn.o. crti.o must
- * be linked first; crtn.o must be linked last. Because these
- * are wildcards, it doesn't matter if the user does not
- * actually link against crti.o and crtn.o; the linker won't
- * look for a file to match a wildcard. The wildcard also
- * means that it doesn't matter which directory crti.o and
- * crtn.o are in.
- */
- PROVIDE (_init = .);
- *crti.o(.init)
- *(.init)
- *crtn.o(.init)
- PROVIDE (_fini = .);
- *crti.o(.fini)
- *(.fini)
- *crtn.o(.fini)
+ /*
+ * C++ constructors/destructors
+ *
+ * gcc uses crtbegin.o to find the start of the constructors
+ * and destructors so we make sure it is first. Because this
+ * is a wildcard, it doesn't matter if the user does not
+ * actually link against crtbegin.o; the linker won't look for
+ * a file to match a wildcard. The wildcard also means that
+ * it doesn't matter which directory crtbegin.o is in. The
+ * constructor and destructor list are terminated in
+ * crtend.o. The same comments apply to it.
+ */
+ . = ALIGN (16);
+ *crtbegin.o(.ctors)
+ *(.ctors)
+ *crtend.o(.ctors)
+
+ *crtbegin.o(.dtors)
+ *(.dtors)
+ *crtend.o(.dtors)
- /*
- * C++ constructors/destructors
- *
- * gcc uses crtbegin.o to find the start of the constructors
- * and destructors so we make sure it is first. Because this
- * is a wildcard, it doesn't matter if the user does not
- * actually link against crtbegin.o; the linker won't look for
- * a file to match a wildcard. The wildcard also means that
- * it doesn't matter which directory crtbegin.o is in. The
- * constructor and destructor list are terminated in
- * crtend.o. The same comments apply to it.
- */
- . = ALIGN (16);
- *crtbegin.o(.ctors)
- *(.ctors)
- *crtend.o(.ctors)
- *crtbegin.o(.dtors)
- *(.dtors)
- *crtend.o(.dtors)
+ /*
+ * Exception frame info
+ */
+ . = ALIGN (16);
+ *(.eh_frame)
- /*
- * Exception frame info
- */
- . = ALIGN (16);
- *(.eh_frame)
+ /*
+ * Read-only data
+ */
+ . = ALIGN (16);
+ PROVIDE(_rodata_start = . );
+ *(.rodata)
+ *(.gnu.linkonce.r*)
+ PROVIDE(_erodata = . );
- /*
- * Read-only data
- */
- . = ALIGN (16);
- _rodata_start = . ;
- *(.rodata)
- *(.gnu.linkonce.r*)
+ . = ALIGN (16);
+ PROVIDE (_etext = .);
+ } >ram
+
+ .data : {
+ PROVIDE (_copy_start = .);
+ *(.data)
+ *(.gnu.linkonce.d*)
+ *(.gcc_except_table)
+ . = ALIGN (16);
+ PROVIDE (_edata = .);
+ PROVIDE (_copy_end = .);
+ } >ram
+
+ .bss : {
+ _clear_start = .;
+ *(.bss)
+ *(COMMON)
+ . = ALIGN (16);
+ PROVIDE (end = .);
- . = ALIGN (16);
- PROVIDE (_etext = .);
- } >ram
- .data : {
- PROVIDE (_copy_start = .);
- *(.data)
- *(.gnu.linkonce.d*)
- *(.gcc_except_table)
- . = ALIGN (16);
- PROVIDE (_edata = .);
- PROVIDE (_copy_end = .);
- } >ram
- .bss : {
- _clear_start = .;
- *(.bss)
- *(COMMON)
- . = ALIGN (16);
- PROVIDE (end = .);
+ . += _StackSize;
+ . = ALIGN (16);
+ _stack_init = .;
+ _clear_end = .;
- . += _StackSize;
- . = ALIGN (16);
- _stack_init = .;
- _clear_end = .;
+ _WorkspaceBase = .;
+ } >ram
- _WorkspaceBase = .;
- } >ram
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /* These must appear regardless of . */
}
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c
index 5d44f3159b..ebbcc9739d 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c
@@ -79,7 +79,7 @@ void page_table_init(
* E = 0b1 enable address translation
* S-Field = 0b1X ignore FC2 when matching
* U1, U0 = 0b00 user page attributes not used
- * CM = 0b01 cachable, writethrough
+ * CM = 0b01 cachable, copyback
* W = 0b0 read/write access allowed
*/
dtt0 = 0x007FC020;
diff --git a/c/src/lib/libbsp/m68k/mvme167/timer/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/mvme167/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/mvme167/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/wrapup/Makefile.am
index 90acf83471..cf6c8ecb38 100644
--- a/c/src/lib/libbsp/m68k/mvme167/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/wrapup/Makefile.am
@@ -1,15 +1,19 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-BSP_PIECES = clock console fatal startup timer
+# We only build the networking device driver if HAS_NETWORKING was defined
+if HAS_NETWORKING
+NETWORKING_DRIVER = network
+endif
+
+BSP_PIECES = clock console fatal startup timer $(NETWORKING_DRIVER)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
- $(wildcard \
- ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
+ $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel)
LIB = $(ARCH)/libbsp.a
diff --git a/c/src/lib/libbsp/m68k/ods68302/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/Makefile.am
index 487cec1fb5..06d6ecdaeb 100644
--- a/c/src/lib/libbsp/m68k/ods68302/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/ods68302/clock/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/ods68302/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/ods68302/console/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/ods68302/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/include/Makefile.am
index be193fdfaf..cddd8c5964 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
index 6efaf1ef3a..2dfa83119b 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
@@ -27,6 +27,15 @@ extern "C" {
#include <clockdrv.h>
#include <m68302.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
#if defined(VARIANT)
#define __bsp_cat(x, y) x ## y
diff --git a/c/src/lib/libbsp/m68k/ods68302/start/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/start/Makefile.am
index 0448208131..23a055f6cd 100644
--- a/c/src/lib/libbsp/m68k/ods68302/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.am
index 87408fa96e..f6c9d4e3fd 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,6 +22,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
index c980c29e63..342654ea3f 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
@@ -50,8 +50,12 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
- extern void *_WorkspaceBase;
+ extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
+
#if 0
Cpu_table.interrupt_vector_table = (mc68000_isr *) 0/*&M68Kvec*/;
#endif
@@ -70,5 +74,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/linkcmds b/c/src/lib/libbsp/m68k/ods68302/startup/linkcmds
index 3911aaed12..dc2f820414 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/linkcmds
@@ -8,7 +8,7 @@
/*
* Declare some sizes.
*/
-_RamBase = 0x0;
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
diff --git a/c/src/lib/libbsp/m68k/ods68302/timer/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/timer/Makefile.am
index c7692ccadc..c85ca86376 100644
--- a/c/src/lib/libbsp/m68k/ods68302/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile.am
index 0a9f963995..cd855d70eb 100644
--- a/c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/ods68302/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c b/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c
index b81acbb6cf..3856d8a3c0 100644
--- a/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c
+++ b/c/src/lib/libbsp/m68k/shared/m68kpretaskinghook.c
@@ -34,10 +34,13 @@
extern void bsp_libc_init( void *, unsigned long, int );
extern rtems_configuration_table BSP_Configuration;
-extern unsigned long _RamSize;
+extern void *_RamBase;
extern void *_WorkspaceBase;
extern void *_HeapSize;
+
+unsigned long _M68k_Ramsize;
+
void bsp_pretasking_hook(void)
{
void *heapStart;
@@ -46,7 +49,7 @@ void bsp_pretasking_hook(void)
heapStart = (void *)
((unsigned long)&_WorkspaceBase + BSP_Configuration.work_space_size);
- ramSpace = _RamSize - (unsigned long) heapStart;
+ ramSpace = (unsigned long) &_RamBase + _M68k_Ramsize - (unsigned long) heapStart;
if (heapSize == 0)
heapSize = ramSpace;
diff --git a/c/src/lib/libbsp/m68k/shared/start.S b/c/src/lib/libbsp/m68k/shared/start.S
index 4c9372e735..8a2273d2cc 100644
--- a/c/src/lib/libbsp/m68k/shared/start.S
+++ b/c/src/lib/libbsp/m68k/shared/start.S
@@ -91,8 +91,8 @@ loop: movel #0,a1@+ | to zero out uninitialized
lea SYM (hiintstack),a0 | a0 = high end of intr stack
movec a0,isp | set interrupt stack
#endif
- movel #0,a7@- | push environp
- movel #0,a7@- | push argv
+ pea env | push environp
+ pea arg | push argv
movel #0,a7@- | push argc
jsr SYM (boot_card)
@@ -115,6 +115,11 @@ END_CODE
BEGIN_DATA
+ PUBLIC (environ)
+ .align 2
+SYM (environ):
+ .long env
+
PUBLIC (start_frame)
SYM (start_frame):
.space 4,0
@@ -123,10 +128,8 @@ END_DATA
BEGIN_BSS
- PUBLIC (environ)
- .align 2
-SYM (environ):
- .long 0
+env: .long 0
+arg: .long 0
PUBLIC (initial_isp)
SYM (initial_isp):
diff --git a/c/src/lib/libbsp/mips/Makefile.am b/c/src/lib/libbsp/mips/Makefile.am
index c8c799c0b4..01541552c5 100644
--- a/c/src/lib/libbsp/mips/Makefile.am
+++ b/c/src/lib/libbsp/mips/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/mips/p4000/Makefile.am b/c/src/lib/libbsp/mips/p4000/Makefile.am
index 9d6732d969..66cdb27568 100644
--- a/c/src/lib/libbsp/mips/p4000/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/mips/p4000/console/Makefile.am b/c/src/lib/libbsp/mips/p4000/console/Makefile.am
index b767925096..b11cb0e79a 100644
--- a/c/src/lib/libbsp/mips/p4000/console/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips/p4000/include/Makefile.am b/c/src/lib/libbsp/mips/p4000/include/Makefile.am
index ec59942276..8fb32f359f 100644
--- a/c/src/lib/libbsp/mips/p4000/include/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips/p4000/include/bsp.h b/c/src/lib/libbsp/mips/p4000/include/bsp.h
index a2a91bc634..092c47b41f 100644
--- a/c/src/lib/libbsp/mips/p4000/include/bsp.h
+++ b/c/src/lib/libbsp/mips/p4000/include/bsp.h
@@ -26,6 +26,15 @@ extern "C" {
#include <console.h>
#include <clockdrv.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
extern void WriteDisplay( char * string );
/*
diff --git a/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am b/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am
index fea6719b3b..498c85a880 100644
--- a/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/liblnk/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips/p4000/start/Makefile.am b/c/src/lib/libbsp/mips/p4000/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/mips/p4000/start/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips/p4000/startup/Makefile.am b/c/src/lib/libbsp/mips/p4000/startup/Makefile.am
index 436e868c91..c322987d5e 100644
--- a/c/src/lib/libbsp/mips/p4000/startup/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
index 5003e3504b..9ea2a6152f 100644
--- a/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips/p4000/startup/bspstart.c
@@ -114,6 +114,6 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
}
diff --git a/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am b/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am
index 70bda608b4..5c7a76ffe8 100644
--- a/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/mips/p4000/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips64orion/Makefile.am b/c/src/lib/libbsp/mips64orion/Makefile.am
index c8c799c0b4..01541552c5 100644
--- a/c/src/lib/libbsp/mips64orion/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/mips64orion/p4000/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/Makefile.am
index 9d6732d969..66cdb27568 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/mips64orion/p4000/console/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/console/Makefile.am
index b767925096..b11cb0e79a 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/console/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips64orion/p4000/include/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/include/Makefile.am
index ec59942276..8fb32f359f 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/include/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips64orion/p4000/include/bsp.h b/c/src/lib/libbsp/mips64orion/p4000/include/bsp.h
index a2a91bc634..092c47b41f 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/include/bsp.h
+++ b/c/src/lib/libbsp/mips64orion/p4000/include/bsp.h
@@ -26,6 +26,15 @@ extern "C" {
#include <console.h>
#include <clockdrv.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
extern void WriteDisplay( char * string );
/*
diff --git a/c/src/lib/libbsp/mips64orion/p4000/liblnk/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/liblnk/Makefile.am
index fea6719b3b..498c85a880 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/liblnk/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/liblnk/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips64orion/p4000/start/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/start/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.am
index 436e868c91..c322987d5e 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c b/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
index 5003e3504b..9ea2a6152f 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
@@ -114,6 +114,6 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
}
diff --git a/c/src/lib/libbsp/mips64orion/p4000/wrapup/Makefile.am b/c/src/lib/libbsp/mips64orion/p4000/wrapup/Makefile.am
index 70bda608b4..5c7a76ffe8 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/mips64orion/p4000/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/Makefile.am b/c/src/lib/libbsp/no_cpu/Makefile.am
index 6e02be9e8e..8515dfe07b 100644
--- a/c/src/lib/libbsp/no_cpu/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
index b484f3426f..a49dd752a7 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/clock/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/clock/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/console/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/console/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/include/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/include/Makefile.am
index a97b688f4f..96bbbc3c69 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/include/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h b/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
index 8047f5a291..3f8150e42e 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
@@ -26,6 +26,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/Makefile.am
index 9bf07cebd4..703b62caed 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.am
index 2b0174264f..d5509c6d67 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c b/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
index a6e63372d5..249236036f 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
@@ -101,5 +101,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
}
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/timer/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/timer/Makefile.am
index e07e5caa10..c2391d3605 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/timer/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/wrapup/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/wrapup/Makefile.am
index 8d9f683f77..ca92b1d212 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/wrapup/Makefile.am
@@ -1,11 +1,9 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-BSP_FILES = startup clock console timer
-
if HAS_MP
GENERIC_MP_REL_FILES = shmdr
endif
@@ -14,7 +12,7 @@ GENERIC_FILES = $(GENERIC_MP_REL_FILES)
if HAS_MP
BSP_MP_O_FILES = shmsupp
endif
-BSP_FILES = $(BSP_MP_O_FILES)
+BSP_FILES = startup clock console timer $(BSP_MP_O_FILES)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_FILES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
diff --git a/c/src/lib/libbsp/powerpc/Makefile.am b/c/src/lib/libbsp/powerpc/Makefile.am
index aa7543aa89..b0225d2b1d 100644
--- a/c/src/lib/libbsp/powerpc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/dmv177/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/Makefile.am
index e8a7c6f744..622214a2e1 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/Makefile.am
@@ -1,14 +1,13 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUBDIRS = include clock console startup start timer scv64 tod \
- sonic wrapup
+SUBDIRS = include clock console startup start timer scv64 tod sonic wrapup
include $(top_srcdir)/../../bsp.am
diff --git a/c/src/lib/libbsp/powerpc/dmv177/bsp_specs b/c/src/lib/libbsp/powerpc/dmv177/bsp_specs
index 491b059df3..b0fbfa982f 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/dmv177/bsp_specs
@@ -22,5 +22,5 @@
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -T linkcmds%s -e _start -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
diff --git a/c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.am
index f5f3fd8112..f921d0730a 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.am
index 30616f4de0..ffa00c85d9 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/include/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/include/Makefile.am
index 2302aeeecb..2497acacad 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/include/bsp.h b/c/src/lib/libbsp/powerpc/dmv177/include/bsp.h
index d0c5574348..d16d6698b8 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/dmv177/include/bsp.h
@@ -20,6 +20,15 @@
extern "C" {
#endif
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 4
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024)
+
#ifdef ASM
/* Definition of where to store registers in alignment handler */
#define ALIGN_REGS 0x0140
diff --git a/c/src/lib/libbsp/powerpc/dmv177/scv64/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/scv64/Makefile.am
index 7a552ad128..7108307411 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/scv64/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/scv64/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.am
index a91fafbf9e..f5bb79a8a3 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/start/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/start/Makefile.am
index 354f02440b..58abb62a6e 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.am
index e0381c0f59..b48e9ec4db 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/startup/bspstart.c b/c/src/lib/libbsp/powerpc/dmv177/startup/bspstart.c
index 0825b0e45c..e5190c75f7 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/dmv177/startup/bspstart.c
@@ -113,12 +113,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
/*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
- /*
* initialize the CPU table for this BSP
*/
@@ -130,7 +124,7 @@ void bsp_start( void )
Cpu_table.clicks_per_usec = 66666667 / 4000000 / 2;
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = (12 * 1024);
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
/*
* Enable whatever caching is desired
diff --git a/c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.am
index 0887a9830b..6951625591 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.am
index 792d785bb5..6f4655620d 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/Makefile.am
index 889da12850..53670b1343 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/bsp_specs b/c/src/lib/libbsp/powerpc/eth_comm/bsp_specs
index fa48d8ca78..1190a2c0eb 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/eth_comm/bsp_specs
@@ -8,15 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: ecrti%O%s --start-group \
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
-lc -lgcc --end-group \
%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: \
-%{!qrtems_debug: } \
-%{qrtems_debug: }}
+%{!qrtems: %(old_startfile)} %{qrtems: ecrti%O%s \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/canbus/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/canbus/Makefile.am
index 7b624a62c9..69522a1a98 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/canbus/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/canbus/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/console/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/include/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/include/Makefile.am
index 680492e1b7..1c9de158e1 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/include/bsp.h b/c/src/lib/libbsp/powerpc/eth_comm/include/bsp.h
index 20b12bd15f..f7ccceedb2 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/eth_comm/include/bsp.h
@@ -26,6 +26,15 @@ extern "C" {
#include <clockdrv.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Network driver configuration
*/
struct rtems_bsdnet_ifconfig;
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/network/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/network/Makefile.am
index a310556fa5..c94307a351 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/network/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/network/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/start/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/start/start.S b/c/src/lib/libbsp/powerpc/eth_comm/start/start.S
index f7b9d420fe..b119379641 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/start/start.S
+++ b/c/src/lib/libbsp/powerpc/eth_comm/start/start.S
@@ -133,7 +133,9 @@ cpy_b: lwz r5, 0(r3) /* In with the old ... */
xor r4, r4, r4
.extern SYM (boot_card)
- b SYM (boot_card) /* call the first C routine */
+ bl SYM (boot_card) /* call the first C routine */
+loopstop:
+ b loopstop
/*
* bssclr - zero out bss
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.am
index 4b85006e62..08c4df7b96 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c b/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c
index e6ca71afbe..be35333ea5 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/eth_comm/startup/bspstart.c
@@ -148,7 +148,7 @@ void bsp_start(void)
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4 * 1024;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_usec = 1; /* for 4MHz extclk */
Cpu_table.serial_per_sec = 10000000;
@@ -160,11 +160,6 @@ void bsp_start(void)
Cpu_table.timer_least_valid = 0;
Cpu_table.clock_speed = 40000000;
- /*
- * Call this in case we use TERMIOS for console I/O
- */
- m860_console_reserve_resources(&BSP_Configuration);
-
/*
* Since we are currently autodetecting whether to use SCC1 or
* the FEC for ethernet, we set up a register in the ethernet
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/eth_comm/wrapup/Makefile.am
index 9fa41cc877..b84c9b000b 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/eth_comm/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/helas403/Makefile.am b/c/src/lib/libbsp/powerpc/helas403/Makefile.am
index c4a517c567..73ae3481d3 100644
--- a/c/src/lib/libbsp/powerpc/helas403/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/helas403/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am b/c/src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am
index 70c08c79f7..0e7348c235 100644
--- a/c/src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/helas403/dlentry/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am b/c/src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am
index 8ed973873f..a993f39735 100644
--- a/c/src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/helas403/flashentry/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/helas403/include/Makefile.am b/c/src/lib/libbsp/powerpc/helas403/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/powerpc/helas403/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/helas403/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/helas403/include/bsp.h b/c/src/lib/libbsp/powerpc/helas403/include/bsp.h
index 710fc75867..bd9f1ed3b4 100644
--- a/c/src/lib/libbsp/powerpc/helas403/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/helas403/include/bsp.h
@@ -44,6 +44,15 @@
extern "C" {
#endif
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
#ifdef ASM
/* Definition of where to store registers in alignment handler */
#define ALIGN_REGS 0x0140
diff --git a/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.am b/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.am
index 07786b4684..a9f24acdbd 100644
--- a/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c b/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c
index 4d26d77a6f..175f6e147b 100644
--- a/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c
@@ -156,9 +156,6 @@ void bsp_start( void )
* tell the RTEMS configuration where it is. This memory is
* not malloc'ed. It is just "pulled from the air".
*/
- /* FIXME: this should be modified. work_space_size cannot be valid
- * now, since console_reserve_resources will modify something...
- */
/* FIME: plan usage of RAM better:
- make top of ram dynamic,
- take out some part for persistant log
@@ -170,19 +167,13 @@ void bsp_start( void )
((char *)(bsp_ram_end)) - BSP_Configuration.work_space_size;
/*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
- /*
* initialize the CPU table for this BSP
*/
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_predriver_hook;
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4 * 1024;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_usec = 25;
Cpu_table.serial_per_sec = 25000000;
diff --git a/c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am
index e007524688..b098954601 100644
--- a/c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/helas403/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
index 705daffa04..63b6c40c9a 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/bootloader/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/bootloader/Makefile.am
index 8e43957699..398dee820e 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/bootloader/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/bootloader/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,12 +23,12 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CPPFLAGS += -D__BOOT__ -DDEBUG
-AM_CFLAGS += -msoft-float -mstrict-align -fno-builtin -Wall -mmultiple \
- -mstring -O2 -fomit-frame-pointer -mrelocatable -ffixed-r13 -mno-sdata \
- -D__BOOT__ -DDEBUG
+## FIXME:
+## ASFLAGS = -mrelocatable
+CFLAGS_DEBUG_V = $(CFLAGS_OPTIMIZE_V)
-ASFLAGS += -mrelocatable
+AM_CPPFLAGS += -D__BOOT__ -DDEBUG -mrelocatable
+AM_CFLAGS += -msoft-float -mstrict-align -fno-builtin -Wall -mmultiple -mstring -O2 -fomit-frame-pointer -ffixed-r13 -mno-sdata
IMAGES = rtems.gz
@@ -47,7 +47,7 @@ DISTCLEANFILES += $(IMAGES)
bootloader : $(OBJS) $(IMAGES) $(BINARY_LOADED) ppcboot.lds
$(LD) -o bootloader $(OBJS) --just-symbols=$(BINARY_LOADED) \
-b binary $(IMAGES) -T @srcdir@/../../shared/bootloader/ppcboot.lds \
- -Map bootloader.map
+ -Map $(ARCH)/bootloader.map
check_unresolved : $(OBJS)
$(LD) -r -o reloc.O $(OBJS)
@@ -55,7 +55,7 @@ check_unresolved : $(OBJS)
echo "Every symbol listed should be defined in @srcdir@/ppcboot.lds"
rtems: $(BINARY_LOADED)
- $(OBJCOPY) $(BINARY_LOADED) rtems -O binary -R .comment -S
+ $(OBJCOPY) $(BINARY_LOADED) rtems -O binary -R .comment -S
rtems.gz: rtems
gzip -vf9 rtems
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs b/c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs
index 394b4363dd..16296016c0 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs
@@ -19,5 +19,5 @@
%{qrtems_debug: start_g.o%s}}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -T linkcmds%s -e __rtems_entry_point -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e __rtems_entry_point -u __vectors}
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.am
index 979bf52f1b..1206b032bb 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/console/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/console/Makefile.am
index 202b2eaa8b..360e36037d 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/Makefile.am
index a6ee837cdc..980401fd37 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/irq/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/irq/Makefile.am
index 44fe052a2e..da96801117 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/irq/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/irq/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/motorola/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/motorola/Makefile.am
index 59e52de5c3..bd50126c27 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/motorola/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/motorola/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/openpic/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/openpic/Makefile.am
index be3141a744..03ed4ac63c 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/openpic/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/openpic/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/pci/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/pci/Makefile.am
index 32d9e7e96d..9334f0ffb2 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/pci/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/pci/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -20,6 +20,8 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+AM_CFLAGS = -O2
+
$(PROJECT_INCLUDE)/bsp:
$(mkinstalldirs) $<
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/residual/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/residual/Makefile.am
index add4fd61a8..d5382769d6 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/residual/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/residual/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/start/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/start/Makefile.am
index af4903eb54..f0c6e6180f 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am
index ca1c49cea2..c1ca73b2f5 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.am
@@ -1,11 +1,10 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-VPATH = \
- @srcdir@:@srcdir@/../console:@srcdir@/../../../shared:@srcdir@/../../shared/startup
+VPATH = @srcdir@:@srcdir@/../console:@srcdir@/../../../shared:@srcdir@/../../shared/startup
C_FILES = bootcard.c main.c bspstart.c bsppost.c bsplibc.c sbrk.c bspclean.c \
gnatinstallhandler.c
@@ -24,7 +23,7 @@ $(PROJECT_RELEASE)/lib/linkcmds: linkcmds
$(INSTALL_DATA) $< $@
# FIXME: This should not be here
-# $(PROJECT_RELEASE)/lib/libbsp.a:
+# $(PROJECT_RELEASE)/lib/libbsp.a:
# cd ../wrapup; $(MAKE) $(AM_MAKEFLAGS)
TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/vectors/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/vectors/Makefile.am
index 42bc5d4533..5d158dbe4f 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/vectors/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/vectors/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.am
index 88c149b8a8..7f45a1d1b7 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/Makefile.am b/c/src/lib/libbsp/powerpc/papyrus/Makefile.am
index fe52252374..1e5c6460c5 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/papyrus/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/papyrus/dlentry/Makefile.am b/c/src/lib/libbsp/powerpc/papyrus/dlentry/Makefile.am
index 70c08c79f7..0e7348c235 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/dlentry/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/papyrus/dlentry/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/flashentry/Makefile.am b/c/src/lib/libbsp/powerpc/papyrus/flashentry/Makefile.am
index 8ed973873f..a993f39735 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/flashentry/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/papyrus/flashentry/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/include/Makefile.am b/c/src/lib/libbsp/powerpc/papyrus/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/papyrus/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h b/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h
index bc1ab09267..34c86acf6c 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h
@@ -36,6 +36,15 @@
extern "C" {
#endif
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
#ifdef ASM
/* Definition of where to store registers in alignment handler */
#define ALIGN_REGS 0x0140
diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.am b/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.am
index 887b0fa744..db765ee0cf 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
index a330497c1e..c5e15313bf 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
@@ -120,7 +120,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = 4 * 1024;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_usec = 10;
Cpu_table.serial_per_sec = 10000000;
diff --git a/c/src/lib/libbsp/powerpc/papyrus/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/papyrus/wrapup/Makefile.am
index e007524688..b098954601 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/papyrus/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/Makefile.am
index 59c3997569..ead64fc129 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/bsp_specs b/c/src/lib/libbsp/powerpc/ppcn_60x/bsp_specs
index 491b059df3..b0fbfa982f 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/bsp_specs
@@ -22,5 +22,5 @@
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -T linkcmds%s -e _start -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/clock/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/clock/Makefile.am
index f5f3fd8112..f921d0730a 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/clock/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/console/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/console/Makefile.am
index 835d386666..05e2a7d15a 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/console/console.c b/c/src/lib/libbsp/powerpc/ppcn_60x/console/console.c
index 6b60503ec9..1c788bac0f 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/console/console.c
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/console/console.c
@@ -134,14 +134,6 @@ rtems_device_driver console_open(
return status;
}
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources( configuration, 2 );
-}
-
-
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/include/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/include/Makefile.am
index a4777f556c..ecdbc56b47 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/include/bsp.h b/c/src/lib/libbsp/powerpc/ppcn_60x/include/bsp.h
index 98fc0781bf..372a64e80f 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/include/bsp.h
@@ -33,6 +33,15 @@
extern "C" {
#endif
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (32 * 1024)
+
/* Define processor identification. */
#define MPC601 1
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/network/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/network/Makefile.am
index 59928cc3b2..f549a6409c 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/network/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/network/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/nvram/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/nvram/Makefile.am
index 8bcadd2b2f..4b739a0883 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/nvram/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/nvram/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/pci/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/pci/Makefile.am
index 25081b608a..9b504bff3d 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/pci/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/pci/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/start/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.am
index 28eb6236d8..1e11acc3ed 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
-## $Id:
-##
+##
+## $Id$
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ppcn_60x/startup/bspstart.c
index e8ecd15472..e2a4ee0d39 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/startup/bspstart.c
@@ -277,18 +277,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
/*
- * Add 1 region for RTEMS Malloc
- */
-
- BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
-
- /*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
- /*
* initialize the CPU table for this BSP
*/
@@ -297,7 +285,7 @@ void bsp_start( void )
Cpu_table.predriver_hook = bsp_predriver_hook;
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = (32 * 1024);
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_usec = ulCpuBusClock/4000000;
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/timer/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/timer/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/tod/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/tod/Makefile.am
index 90bb37fe0b..6286fc3534 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/tod/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/tod/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/universe/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/universe/Makefile.am
index a3e1e122dd..83f3319dfb 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/universe/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/universe/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/vectors/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/vectors/Makefile.am
index 3c2da3a009..a85eb2c9e8 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/vectors/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/vectors/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/ppcn_60x/wrapup/Makefile.am
index f5d8d44a5f..83b051cdf6 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -9,8 +9,8 @@ if HAS_NETWORKING
NETWORK = network
endif
-BSP_PIECES = startup clock console timer tod $(NETWORK) nvram \
- universe pci vectors
+BSP_PIECES = startup clock console timer tod $(NETWORK) nvram universe pci \
+ vectors
# pieces to pick up out of libcpu/$(RTEMS_CPU)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
diff --git a/c/src/lib/libbsp/powerpc/psim/Makefile.am b/c/src/lib/libbsp/powerpc/psim/Makefile.am
index 04b9f71aab..318781378e 100644
--- a/c/src/lib/libbsp/powerpc/psim/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/Makefile.am
@@ -1,14 +1,14 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
-SUBDIRS = include start clock console startup shmsupp timer vectors \
- wrapup tools
+SUBDIRS = include start clock console startup shmsupp timer vectors wrapup \
+ tools
include $(top_srcdir)/../../bsp.am
diff --git a/c/src/lib/libbsp/powerpc/psim/bsp_specs b/c/src/lib/libbsp/powerpc/psim/bsp_specs
index 491b059df3..b0fbfa982f 100644
--- a/c/src/lib/libbsp/powerpc/psim/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/psim/bsp_specs
@@ -22,5 +22,5 @@
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -T linkcmds%s -e _start -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
diff --git a/c/src/lib/libbsp/powerpc/psim/clock/Makefile.am b/c/src/lib/libbsp/powerpc/psim/clock/Makefile.am
index f5f3fd8112..f921d0730a 100644
--- a/c/src/lib/libbsp/powerpc/psim/clock/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/console/Makefile.am b/c/src/lib/libbsp/powerpc/psim/console/Makefile.am
index 1c753810c1..24f53c83da 100644
--- a/c/src/lib/libbsp/powerpc/psim/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/console/console.c b/c/src/lib/libbsp/powerpc/psim/console/console.c
index 161ead99a2..90e46e6c06 100644
--- a/c/src/lib/libbsp/powerpc/psim/console/console.c
+++ b/c/src/lib/libbsp/powerpc/psim/console/console.c
@@ -196,10 +196,3 @@ rtems_device_driver console_control(
{
return rtems_termios_ioctl (arg);
}
-
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources( configuration, 1 );
-}
diff --git a/c/src/lib/libbsp/powerpc/psim/include/Makefile.am b/c/src/lib/libbsp/powerpc/psim/include/Makefile.am
index 091727637a..2b8181354c 100644
--- a/c/src/lib/libbsp/powerpc/psim/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/include/bsp.h b/c/src/lib/libbsp/powerpc/psim/include/bsp.h
index aafcb261f0..1ba31efc8f 100644
--- a/c/src/lib/libbsp/powerpc/psim/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/psim/include/bsp.h
@@ -36,6 +36,15 @@
extern "C" {
#endif
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024)
+
#ifdef ASM
/* Definition of where to store registers in alignment handler */
#define ALIGN_REGS 0x0140
diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/Makefile.am b/c/src/lib/libbsp/powerpc/psim/shmsupp/Makefile.am
index 07ad321462..23fc433016 100644
--- a/c/src/lib/libbsp/powerpc/psim/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/start/Makefile.am b/c/src/lib/libbsp/powerpc/psim/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/powerpc/psim/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.am b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.am
index 0afcb9a929..6f4e5b22f0 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
index bbd470f856..a5cc6ebd9f 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
@@ -202,7 +202,7 @@ void bsp_start( void )
Cpu_table.do_zero_of_workspace = FALSE;
- Cpu_table.interrupt_stack_size = (12 * 1024);
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
/*
* The monitor likes the exception table to be at 0x0.
@@ -233,12 +233,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
- /*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
#if PSIM_FAST_IDLE
/*
* Add 1 extension for fast idle
diff --git a/c/src/lib/libbsp/powerpc/psim/timer/Makefile.am b/c/src/lib/libbsp/powerpc/psim/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/powerpc/psim/timer/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am b/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am
index 704c7c2d31..ff177ddb9d 100644
--- a/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am
@@ -5,13 +5,25 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-noinst_SCRIPTS=psim runtest
+noinst_SCRIPTS = psim runtest
+
+TMPINSTALL_FILES += $(PROJECT_ROOT)/psim/tests \
+ $(PROJECT_ROOT)/psim/tests/runtest $(PROJECT_ROOT)/psim/tests/psim \
+ $(PROJECT_ROOT)/psim/tests/psim-gdb
+
+$(PROJECT_ROOT)/psim/tests:
+ $(mkinstalldirs) $@
+
+$(PROJECT_ROOT)/psim/tests/runtest: runtest
+ $(INSTALL_SCRIPT) $< $@
+
+$(PROJECT_ROOT)/psim/tests/psim: psim
+ $(INSTALL_SCRIPT) $< $@
+
+$(PROJECT_ROOT)/psim/tests/psim-gdb: psim
+ $(INSTALL_SCRIPT) $< $@
## HACK: install to build-tree
-all-local: $(SCRIPTS)
- $(mkinstalldirs) $(PROJECT_ROOT)/psim/tests
- $(INSTALL_SCRIPT) $(srcdir)/runtest $(PROJECT_ROOT)/psim/tests/runtest
- $(INSTALL_SCRIPT) $(srcdir)/psim $(PROJECT_ROOT)/psim/tests/psim
- $(INSTALL_SCRIPT) $(srcdir)/psim $(PROJECT_ROOT)/psim/tests/psim-gdb
+all-local: $(TMPINSTALL_FILES)
-include $(top_srcdir)/../../../../../../../automake/local.am
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/runtest b/c/src/lib/libbsp/powerpc/psim/tools/runtest
index 5b53f9080e..8fa385e239 100755
--- a/c/src/lib/libbsp/powerpc/psim/tools/runtest
+++ b/c/src/lib/libbsp/powerpc/psim/tools/runtest
@@ -164,10 +164,11 @@ do
continue;;
*-node1*)
warn "Running both nodes associated with $tname"
+ variant=`echo $tname | sed 's/.*-node[12]//' | sed 's/\.exe//'`
tname=`echo $tname | sed 's/-node.*//'`
TEST_TYPE="mp"
;;
- minimum*|stackchk*|spfatal*|malloctest*)
+ minimum*|stackchk*|spfatal*|termio*)
continue
;;
esac
@@ -176,8 +177,8 @@ do
then
cpus="1 2"
- logfile1=$logdir/${tname}_1
- logfile2=$logdir/${tname}_2
+ logfile1=$logdir/${tname}_1${variant}
+ logfile2=$logdir/${tname}_2${variant}
infofile1=$logfile1.info
infofile2=$logfile2.info
@@ -193,7 +194,7 @@ do
-o "/shm@0xc0000000/key 0x1234" \
-o "/sem@0xc0010000/reg 0xc0010000 12" \
-o "/sem@0xc0010000/key 0x1234" \
- -o "/sem@0xc0010000/value 1" ${tname}-node1.exe | \
+ -o "/sem@0xc0010000/value 1" ${tname}-node1${variant}.exe | \
sed -e 's/ //' -e '/^$/d' > ${logfile1} &
${simulator} $extra_options -c ${instruction_limit} \
@@ -203,7 +204,7 @@ do
-o "/shm@0xc0000000/key 0x1234" \
-o "/sem@0xc0010000/reg 0xc0010000 12" \
-o "/sem@0xc0010000/key 0x1234" \
- -o "/sem@0xc0010000/value -1" ${tname}-node2.exe | \
+ -o "/sem@0xc0010000/value -1" ${tname}-node2${variant}.exe | \
sed -e 's/ //' -e '/^$/d' > ${logfile2} &
wait
diff --git a/c/src/lib/libbsp/powerpc/psim/vectors/Makefile.am b/c/src/lib/libbsp/powerpc/psim/vectors/Makefile.am
index a2a94d7acd..a7d103cbd9 100644
--- a/c/src/lib/libbsp/powerpc/psim/vectors/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/vectors/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/psim/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/psim/wrapup/Makefile.am
index e563b9eb63..02fb4a1625 100644
--- a/c/src/lib/libbsp/powerpc/psim/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/wrapup/Makefile.am
@@ -1,14 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
-BSP_PIECES = startup clock console timer vectors
-
if HAS_MP
GENERIC_MP_REL_PIECES = shmdr
endif
@@ -17,7 +15,7 @@ GENERIC_PIECES += $(GENERIC_MP_REL_PIECES)
if HAS_MP
BSP_MP_O_PIECES = shmsupp
endif
-BSP_PIECES += $(BSP_MP_O_PIECES)
+BSP_PIECES = startup clock console timer vectors $(BSP_MP_O_PIECES)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
diff --git a/c/src/lib/libbsp/powerpc/score603e/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/Makefile.am
index a907ce6b0f..6fd72e2f09 100644
--- a/c/src/lib/libbsp/powerpc/score603e/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/powerpc/score603e/PCI_bus/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/PCI_bus/Makefile.am
index 4cc465ced1..007befdff4 100644
--- a/c/src/lib/libbsp/powerpc/score603e/PCI_bus/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/PCI_bus/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/bsp_specs b/c/src/lib/libbsp/powerpc/score603e/bsp_specs
index 491b059df3..b0fbfa982f 100644
--- a/c/src/lib/libbsp/powerpc/score603e/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/score603e/bsp_specs
@@ -22,5 +22,5 @@
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -T linkcmds%s -e _start -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
diff --git a/c/src/lib/libbsp/powerpc/score603e/clock/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/clock/Makefile.am
index f5f3fd8112..f921d0730a 100644
--- a/c/src/lib/libbsp/powerpc/score603e/clock/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/console/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/console/Makefile.am
index d5046de240..861491254b 100644
--- a/c/src/lib/libbsp/powerpc/score603e/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/console/consolereserveresources.c b/c/src/lib/libbsp/powerpc/score603e/console/consolereserveresources.c
index 440e44f941..7039d8c8fc 100644
--- a/c/src/lib/libbsp/powerpc/score603e/console/consolereserveresources.c
+++ b/c/src/lib/libbsp/powerpc/score603e/console/consolereserveresources.c
@@ -20,10 +20,5 @@
#include "consolebsp.h"
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources( configuration, NUM_Z85C30_PORTS );
-}
+int console_reserve_resources_removed;
diff --git a/c/src/lib/libbsp/powerpc/score603e/include/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/include/Makefile.am
index 986b0fe056..8e3935008f 100644
--- a/c/src/lib/libbsp/powerpc/score603e/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
index 2888a1dc9a..f40ead300b 100644
--- a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
@@ -20,6 +20,19 @@
extern "C" {
#endif
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#if (HAS_PMC_PSC8)
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS (4 + 4)
+#else
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS (4)
+#endif
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024)
+
#ifdef ASM
/* Definition of where to store registers in alignment handler */
#define ALIGN_REGS 0x0140
diff --git a/c/src/lib/libbsp/powerpc/score603e/start/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/start/Makefile.am
index 354f02440b..58abb62a6e 100644
--- a/c/src/lib/libbsp/powerpc/score603e/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.am
index 32521bbf8f..35a35071f6 100644
--- a/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c
index 6575c7425a..4da15d89b6 100644
--- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c
@@ -276,12 +276,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
/*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
- /*
* initialize the CPU table for this BSP
*/
@@ -291,7 +285,7 @@ void bsp_start( void )
Cpu_table.postdriver_hook = SCORE603e_bsp_postdriver_hook;
Cpu_table.clicks_per_usec = 66 / 4; /* XXX get from linkcmds */
Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = (12 * 1024);
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.idle_task_stack_size = (3 * STACK_MINIMUM_SIZE);
#if ( PPC_USE_DATA_CACHE )
diff --git a/c/src/lib/libbsp/powerpc/score603e/timer/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/powerpc/score603e/timer/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/tod/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/tod/Makefile.am
index f56d2670fa..6a99b886be 100644
--- a/c/src/lib/libbsp/powerpc/score603e/tod/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/tod/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/vectors/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/vectors/Makefile.am
index edacb0973a..67266e13a2 100644
--- a/c/src/lib/libbsp/powerpc/score603e/vectors/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/vectors/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.am
index c877167f3f..75424fe399 100644
--- a/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/score603e/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/Makefile.am b/c/src/lib/libbsp/powerpc/shared/Makefile.am
index 471789bf3e..ae5a0cc05f 100644
--- a/c/src/lib/libbsp/powerpc/shared/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am b/c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am
index ad187cd187..dfe0e94c7d 100644
--- a/c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c b/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c
index e7dd568c22..e71858bc83 100644
--- a/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c
+++ b/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c
@@ -238,7 +238,7 @@ setup_hw(void)
char *cp, ch;
register RESIDUAL * res;
/* PPC_DEVICE * nvram; */
- struct pci_dev *p, *default_vga;
+ struct pci_dev *default_vga;
int timer, err;
u_short default_vga_cmd;
static unsigned int indic;
@@ -270,7 +270,7 @@ setup_hw(void)
printk("\nModel: %s\nSerial: %s\n"
"Processor/Bus frequencies (Hz): %ld/%ld\n"
"Time Base Divisor: %ld\n"
- "Memory Size: %x\n",
+ "Memory Size: %lx\n",
vpd.PrintableModel,
vpd.Serial,
vpd.ProcessorHz,
diff --git a/c/src/lib/libbsp/powerpc/shared/clock/Makefile.am b/c/src/lib/libbsp/powerpc/shared/clock/Makefile.am
index 3f2e00568f..3c4ffc9eb1 100644
--- a/c/src/lib/libbsp/powerpc/shared/clock/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/console/Makefile.am b/c/src/lib/libbsp/powerpc/shared/console/Makefile.am
index 004de3a27a..a164927d56 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/console/console.c b/c/src/lib/libbsp/powerpc/shared/console/console.c
index 834f960cfc..68158906f6 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/console.c
+++ b/c/src/lib/libbsp/powerpc/shared/console/console.c
@@ -84,16 +84,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
-void console_reserve_resources(rtems_configuration_table *conf)
-{
- if(BSPConsolePort != BSP_CONSOLE_PORT_CONSOLE)
- {
- rtems_termios_reserve_resources(conf, 1);
- }
-
- return;
-}
-
void __assert (const char *file, int line, const char *msg)
{
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
diff --git a/c/src/lib/libbsp/powerpc/shared/include/Makefile.am b/c/src/lib/libbsp/powerpc/shared/include/Makefile.am
index b1c33532a1..0f1ce0ff94 100644
--- a/c/src/lib/libbsp/powerpc/shared/include/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/include/bsp.h b/c/src/lib/libbsp/powerpc/shared/include/bsp.h
index 201351f972..db98a4c002 100644
--- a/c/src/lib/libbsp/powerpc/shared/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/shared/include/bsp.h
@@ -18,6 +18,15 @@
#include <clockdrv.h>
#include <bsp/vectors.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024)
+
#ifndef ASM
#define outport_byte(port,value) outb(value,port)
#define outport_word(port,value) outw(value,port)
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/Makefile.am b/c/src/lib/libbsp/powerpc/shared/irq/Makefile.am
index 1348121c90..07bff968a8 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/irq/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S b/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S
index 0d8ab62452..9e77146e11 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S
+++ b/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S
@@ -85,8 +85,15 @@ SYM (shared_raw_irq_code_entry):
stw r2, SRR1_FRAME_OFFSET(r1)
/*
* Enable data and instruction address translation, exception recovery
+ *
+ * also, on CPUs with FP, enable FP so that FP context can be
+ * saved and restored (using FP instructions)
*/
+#if (PPC_HAS_FPU == 0)
ori r3, r3, MSR_RI | MSR_IR | MSR_DR
+#else
+ ori r3, r3, MSR_RI | MSR_IR | MSR_DR | MSR_FP
+#endif
mtmsr r3
SYNC
/*
diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am b/c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am
index 9869a42fc1..2ba8001455 100644
--- a/c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am b/c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am
index 030c358214..14f400e8a7 100644
--- a/c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/Makefile.am b/c/src/lib/libbsp/powerpc/shared/pci/Makefile.am
index 45520cb61b..f7da13a6db 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/pci/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/residual/Makefile.am b/c/src/lib/libbsp/powerpc/shared/residual/Makefile.am
index 43890c7b67..1cdf3fd3eb 100644
--- a/c/src/lib/libbsp/powerpc/shared/residual/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/residual/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/start/Makefile.am b/c/src/lib/libbsp/powerpc/shared/start/Makefile.am
index 13330128b0..e26c892fd6 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/start/start.S b/c/src/lib/libbsp/powerpc/shared/start/start.S
index ee09686659..9f91cb7365 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/start.S
+++ b/c/src/lib/libbsp/powerpc/shared/start/start.S
@@ -106,8 +106,13 @@ enter_C_code:
.type MMUon,@function
MMUon:
mfmsr r0
- ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1
+#if (PPC_HAS_FPU == 0)
+ ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1 | MSR_FP
xori r0, r0, MSR_EE | MSR_IP | MSR_FP
+#else
+ ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1 | MSR_FP
+ xori r0, r0, MSR_EE | MSR_IP | MSR_FE0 | MSR_FE1
+#endif
mflr r11
mtsrr0 r11
mtsrr1 r0
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/Makefile.am b/c/src/lib/libbsp/powerpc/shared/startup/Makefile.am
index cc1ab757c2..161db96b44 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
index 4ca991e229..c45decac70 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
@@ -73,7 +73,7 @@ unsigned int BSP_time_base_divisor;
* system init stack and soft ir stack size
*/
#define INIT_STACK_SIZE 0x1000
-#define INTR_STACK_SIZE 0x4000
+#define INTR_STACK_SIZE CONFIGURE_INTERRUPT_STACK_MEMORY
void BSP_panic(char *s)
{
@@ -302,12 +302,12 @@ void bsp_start( void )
* they can use atexit()
*/
- Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
- Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.do_zero_of_workspace = TRUE;
- Cpu_table.interrupt_stack_size = INTR_STACK_SIZE;
- Cpu_table.clicks_per_usec = BSP_processor_frequency/(BSP_time_base_divisor * 1000);
- Cpu_table.exceptions_in_RAM = TRUE;
+ Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
+ Cpu_table.postdriver_hook = bsp_postdriver_hook;
+ Cpu_table.do_zero_of_workspace = TRUE;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
+ Cpu_table.clicks_per_usec = BSP_processor_frequency/(BSP_time_base_divisor * 1000);
+ Cpu_table.exceptions_in_RAM = TRUE;
#ifdef SHOW_MORE_INIT_SETTINGS
printk("BSP_Configuration.work_space_size = %x\n", BSP_Configuration.work_space_size);
@@ -323,11 +323,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
/*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
- /*
* Initalize RTEMS IRQ system
*/
BSP_rtems_irq_mng_init(0);
diff --git a/c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am b/c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am
index dc97722ce4..625a5260ce 100644
--- a/c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am b/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am
index c3195b159d..1f4affe8f4 100644
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/support/new_exception_processing/Makefile.am
@@ -9,7 +9,7 @@ C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
ROOT_H_FILES =
RTEMS_SCORE_H_FILES = cpu.h c_isr.inl
-noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
+noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
S_FILES = cpu_asm.S
S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
@@ -21,11 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \
+ $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
+ $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
##TMPINSTALL_FILES += \
##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
@@ -55,10 +53,8 @@ all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
## all-local: $(ARCH)/rtems.o
all-local: $(TMPINSTALL_FILES)
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
+CLEANDIRS = ../o-optimize ../o-debug ../o-profile
-EXTRA_DIST = \
-$(C_FILES) $(S_FILES)
+EXTRA_DIST = $(C_FILES) $(S_FILES)
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am b/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am
index afd66502eb..9629808140 100644
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/support/old_exception_processing/Makefile.am
@@ -19,14 +19,11 @@ S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \
+ $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
+ $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
$(INSTALL_DATA) $< $@
@@ -49,18 +46,12 @@ $(REL): $(C_O_FILES) $(S_O_FILES)
test -d ../$(ARCH) || mkdir ../$(ARCH)
$(make-rel)
-all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
-all-local: $(ARCH)/rtems.o
-all-local: $(TMPINSTALL_FILES)
+all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) $(ARCH)/rtems.o $(TMPINSTALL_FILES)
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
+CLEANDIRS = ../o-optimize ../o-debug ../o-profile
UNUSED_FILES = irq_stub.S
-EXTRA_DIST = \
-TODO \
-rtems.S \
-$(C_FILES) $(S_FILES) $(UNUSED_FILES)
+EXTRA_DIST = TODO rtems.S $(C_FILES) $(S_FILES) $(UNUSED_FILES)
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S b/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S
index 76c8927305..400cccdf73 100644
--- a/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S
+++ b/c/src/lib/libbsp/powerpc/support/old_exception_processing/irq_stub.S
@@ -55,7 +55,9 @@
lis r11,_CPU_IRQ_info@ha
addi r11,r11,_CPU_IRQ_info@l
#endif
+#if ( PPC_USE_DATA_CACHE )
dcbt r0, r11
+#endif
stw r5, IP_CR(r1)
stw r6, IP_CTR(r1)
stw r7, IP_XER(r1)
diff --git a/c/src/lib/libbsp/sh/Makefile.am b/c/src/lib/libbsp/sh/Makefile.am
index 0f5395fa38..c3e62f9f75 100644
--- a/c/src/lib/libbsp/sh/Makefile.am
+++ b/c/src/lib/libbsp/sh/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am
index 1fefc6d5a6..028ac64896 100644
--- a/c/src/lib/libbsp/sh/gensh1/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/sh/gensh1/bsp_specs b/c/src/lib/libbsp/sh/gensh1/bsp_specs
index 9436cdcd72..90ab779f9e 100644
--- a/c/src/lib/libbsp/sh/gensh1/bsp_specs
+++ b/c/src/lib/libbsp/sh/gensh1/bsp_specs
@@ -18,5 +18,5 @@
%{qrtems: %{qrtems_debug: start_g.o%s} %{!qrtems_debug: start.o%s}}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
+%(old_link) %{qrtems: -dc -dp -N -e _start}
diff --git a/c/src/lib/libbsp/sh/gensh1/console/Makefile.am b/c/src/lib/libbsp/sh/gensh1/console/Makefile.am
index 9be2f48a93..49f359cb06 100644
--- a/c/src/lib/libbsp/sh/gensh1/console/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(OBJS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(OBJS) $(PGM)
diff --git a/c/src/lib/libbsp/sh/gensh1/include/Makefile.am b/c/src/lib/libbsp/sh/gensh1/include/Makefile.am
index 43cf28d6c2..3f061aa216 100644
--- a/c/src/lib/libbsp/sh/gensh1/include/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh1/include/bsp.h b/c/src/lib/libbsp/sh/gensh1/include/bsp.h
index f02abe156d..b9dc3fb98c 100644
--- a/c/src/lib/libbsp/sh/gensh1/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh1/include/bsp.h
@@ -34,6 +34,15 @@ extern "C" {
#include <clockdrv.h>
#include <console.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
/* EDIT: To activate the sci driver, change the define below */
#if 1
#include <sh/null.h>
diff --git a/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am b/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am
index b885f76b71..f49f16e9d9 100644
--- a/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/scitab/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh1/start/Makefile.am b/c/src/lib/libbsp/sh/gensh1/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/sh/gensh1/start/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am
index b2736e9cec..b787e61383 100644
--- a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.am
@@ -1,13 +1,13 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
+VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
+
PGM = $(ARCH)/startup.rel
-VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
-
C_FILES = bsplibc.c bsppost.c bspstart.c bspclean.c sbrk.c bootcard.c main.c \
gnatinstallhandler.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
diff --git a/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c b/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
index 7f0d7f8436..16f59b5924 100644
--- a/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
+++ b/c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
@@ -117,7 +117,6 @@ void bsp_start(void)
_CPU_Interrupt_stack_low = &CPU_Interrupt_stack_low ;
_CPU_Interrupt_stack_high = &CPU_Interrupt_stack_high ;
- /* This isn't used anywhere */
Cpu_table.interrupt_stack_size =
(unsigned32) (&CPU_Interrupt_stack_high) -
(unsigned32) (&CPU_Interrupt_stack_low) ;
@@ -128,7 +127,7 @@ void bsp_start(void)
Cpu_table.postdriver_hook = bsp_postdriver_hook;
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
#endif
Cpu_table.clicks_per_second = HZ ;
}
diff --git a/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.am b/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.am
index b0699896fc..c9dc062751 100644
--- a/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.am
@@ -1,8 +1,8 @@
-##
+##
## $Id$
-##
+##
## build and install libbsp
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am
index 84c0f5d606..70913dcbf4 100644
--- a/c/src/lib/libbsp/sh/gensh2/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/sh/gensh2/README b/c/src/lib/libbsp/sh/gensh2/README
index bd78418fc8..40cd643721 100644
--- a/c/src/lib/libbsp/sh/gensh2/README
+++ b/c/src/lib/libbsp/sh/gensh2/README
@@ -49,9 +49,12 @@ NOTES
(1) Only stub console driver available at the moment.
Driver for the on-chip serial devices (sci) will be available soon.
-(2) The present 'hw_init.c' file is incomplete and does not set all
- registers required for serial I/O. The effect is that the sci devices
- are 'muted' and do not successfully transmit characters to the respective
- I/O lines on the SH7045F. If these ports have been properly initialized,
- they are not disabled by the current code. A two-part initialization will
- be available soon.
+(2) The present 'hw_init.c' file provides 'early_hw_init'(void) which
+ is normally called from 'start.S' to provide such minimal HW setup
+ as is conveniently written in 'C' and can make use of global
+ symbols for 7045F processor elements. It also provides
+ 'void bsp_hw_init (void)' normally called from 'bspstart.c', shortly
+ before RTEMS itself is started.
+
+ These are both minimal functions intended to support the RTEMS test
+ suites.
diff --git a/c/src/lib/libbsp/sh/gensh2/bsp_specs b/c/src/lib/libbsp/sh/gensh2/bsp_specs
index 9436cdcd72..90ab779f9e 100644
--- a/c/src/lib/libbsp/sh/gensh2/bsp_specs
+++ b/c/src/lib/libbsp/sh/gensh2/bsp_specs
@@ -18,5 +18,5 @@
%{qrtems: %{qrtems_debug: start_g.o%s} %{!qrtems_debug: start.o%s}}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
+%(old_link) %{qrtems: -dc -dp -N -e _start}
diff --git a/c/src/lib/libbsp/sh/gensh2/console/Makefile.am b/c/src/lib/libbsp/sh/gensh2/console/Makefile.am
index 9be2f48a93..49f359cb06 100644
--- a/c/src/lib/libbsp/sh/gensh2/console/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(OBJS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(OBJS) $(PGM)
diff --git a/c/src/lib/libbsp/sh/gensh2/include/Makefile.am b/c/src/lib/libbsp/sh/gensh2/include/Makefile.am
index 340b0a6484..ec56ba1b47 100644
--- a/c/src/lib/libbsp/sh/gensh2/include/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh2/include/bsp.h b/c/src/lib/libbsp/sh/gensh2/include/bsp.h
index a403a44ecb..115353ce96 100644
--- a/c/src/lib/libbsp/sh/gensh2/include/bsp.h
+++ b/c/src/lib/libbsp/sh/gensh2/include/bsp.h
@@ -45,6 +45,15 @@ extern "C" {
#include <clockdrv.h>
#include <console.h>
+/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
#if 0
#include <sh/null.h>
#define BSP_CONSOLE_DEVNAME "/dev/null"
diff --git a/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am b/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am
index 1b0c6454a3..09fdd1fc27 100644
--- a/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/scitab/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh2/start/Makefile.am b/c/src/lib/libbsp/sh/gensh2/start/Makefile.am
index cab0be15ab..04b0f0ae6c 100644
--- a/c/src/lib/libbsp/sh/gensh2/start/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh2/start/start.S b/c/src/lib/libbsp/sh/gensh2/start/start.S
index f06b284f50..835bdd516f 100644
--- a/c/src/lib/libbsp/sh/gensh2/start/start.S
+++ b/c/src/lib/libbsp/sh/gensh2/start/start.S
@@ -44,7 +44,7 @@ SYM (start):
! Initialize minimal hardware
mov.l hw_init_k, r0
jsr @r0
- nop !debug dead-slot target
+ nop !dead slot
#endif /* START_HW_INIT */
! zero out bss
@@ -56,7 +56,6 @@ SYM (start):
add #4,r0
cmp/ge r0,r1
bt 0b
- nop !debug dead-slot target
! copy the vector table from rom to ram
mov.l vects_k,r0 ! vectab
@@ -70,8 +69,8 @@ SYM (start):
add #1,r2
cmp/hi r3,r2
bf 1b
- nop !debug dead-slot target
+#ifndef STANDALONE_EVB
! overlay monitor vectors onto RTEMS table template
! code adapted from Hitachi EDK7045F User Manual: "Copyvect.s"
mova vects_k,r0
@@ -135,20 +134,19 @@ SYM (start):
mov.l r3, @r0
mov.l vects_k,r0 ! point vbr to vectab
ldc r0,vbr
+#endif ! STANDALONE_EVB
! call the mainline
mov #0,r4 ! argc
- mov #0,r5 ! argv - can place in dead slot
mov.l main_k,r0
jsr @r0
- nop !debug dead-slot target
+ mov #0,r5 ! argv - can place in dead slot
! call exit
mov r0,r4
mov.l exit_k,r0
- or r0,r0
jsr @r0
- nop !debug dead-slot target
+ or r0,r0
mov.l vbrtemp_k,r0 ! restore original vbr
mov.l @r0,r3
@@ -171,7 +169,7 @@ exit_k:
.long SYM(exit)
#ifdef START_HW_INIT /* from $RTEMS_BSP.cfg */
hw_init_k:
- .long SYM(hw_initialize)
+ .long SYM(early_hw_init)
#endif /* START_HW_INIT */
vbrtemp_k:
.long SYM(vbrtemp)
diff --git a/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am b/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am
index 1c39a297ed..0a03c884ad 100644
--- a/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/gensh2/startup/bspstart.c b/c/src/lib/libbsp/sh/gensh2/startup/bspstart.c
index 5761d68219..e80e6dd1a0 100644
--- a/c/src/lib/libbsp/sh/gensh2/startup/bspstart.c
+++ b/c/src/lib/libbsp/sh/gensh2/startup/bspstart.c
@@ -37,7 +37,7 @@
* some changes.
*/
-extern void hw_initialize(void);
+extern void bsp_hw_init(void);
extern rtems_configuration_table Configuration;
@@ -94,7 +94,7 @@ void bsp_start(void)
#ifndef START_HW_INIT
/* board hardware setup here, or from 'start.S' */
- hw_initialize();
+ bsp_hw_init();
#endif
/*
@@ -135,7 +135,7 @@ void bsp_start(void)
Cpu_table.postdriver_hook = bsp_postdriver_hook;
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
#endif
Cpu_table.clicks_per_second = HZ ;
diff --git a/c/src/lib/libbsp/sh/gensh2/startup/hw_init.c b/c/src/lib/libbsp/sh/gensh2/startup/hw_init.c
index f0b6e3b90e..72d714086c 100644
--- a/c/src/lib/libbsp/sh/gensh2/startup/hw_init.c
+++ b/c/src/lib/libbsp/sh/gensh2/startup/hw_init.c
@@ -3,8 +3,14 @@
* Pin and memory assignments assume
* target is Hitachi SH7045F EVB ("lcevb")
*
+ * Provides two initialization routines:
+ * A. 'void early_hw_init(void)' for 'start.S'
+ * sets up hw needed for early RTEMS boot, and
+ * B. 'void bsp_hw_init(void)' for 'bspstart.c'
+ * sets up hardware used by this BSP.
+ *
* Author: John M. Mills (jmills@tga.com)
- * COPYRIGHT(c) 1999, TGA Technologies, Inc
+ * COPYRIGHT(c) 2000, TGA Technologies, Inc
* Norcross, GA 30071 U.S.A
*
* This program is distributed in the hope that it will be useful,
@@ -40,74 +46,72 @@
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7045.h>
-/* exported entry */
-extern void hw_initialize (void);
+/* exported entries */
+extern void bsp_hw_init (void);
+extern void early_hw_init (void);
-/* STANDALONE_EVB sets up bus, DRAM, PFC, and SCI0 */
-/* no STANDALONE_EVB accepts defaults, adds RESET, SCI1, WDT */
+/* called from 'start.S' on "#ifdef START_HW_INIT" */
+void early_hw_init (void)
+{
+#ifdef STANDALONE_EVB
+ /* STANDALONE_EVB minimally sets up bus and DRAM here */
+ /* no STANDALONE_EVB accepts defaults from debug monitor */
+
+ /* FIXME: replace 'magic numbers' with logical names */
+
+ write16(0x2020, BSC_BCR1); /* Bus width access - 32-bit on CS1 */
+ write16(0xF3DD, BSC_BCR2); /* Idle cycles CS3-CS0 - 0 idle cycles*/
+ write16(0xFF3F, BSC_WCR1); /* Waits for CS3-CS0 - 3 waits on CS1 */
+ write16(0x000F, BSC_WCR2); /* Waits for DRAM/DMA access - default */
+ write16(0x0000, BSC_DCR); /* DRAM control - default */
+ write16(0x0000, BSC_RTCSR); /* DRAM refresh - default */
+ write16(0x0000, BSC_RTCNT); /* DRAM refresh counter - default*/
+ write16(0x0000, BSC_RTCOR); /* DRAM refresh compare match - default */
+#endif
-/***************************************************/
-/* Inline function to access CPU features */
-/* from C. This makes use of GNU extensions. */
-/***************************************************/
+ /* add early-init functions here */
-__inline__ void set_interrupt_mask(unsigned char mask)
-{
- asm("mov.l r0,@-r15");
- asm("mov %0,r0"::"r"(mask));
- asm("and #0xF,r0");
- asm("rotl r0");
- asm("rotl r0");
- asm("rotl r0");
- asm("rotl r0");
- asm("ldc r0,sr");
- asm("mov.l @r15+,r0");
-}
+};
-void hw_initialize (void)
+/* to be called from 'bspstart.c' */
+void bsp_hw_init (void)
{
- int a;
- unsigned8 temp8;
- unsigned16 temp16;
+ int a;
+ unsigned8 temp8;
+ unsigned16 temp16;
#ifdef STANDALONE_EVB
- /* FIXME: replace 'magic numbers' */
-
- write16(0x2020, BSC_BCR1); /* Bus width access - 32-bit on CS1 */
- write16(0xF3DD, BSC_BCR2); /* Idle cycles CS3-CS0 - 0 idle cycles*/
- write16(0xFF3F, BSC_WCR1); /* Waits for CS3-CS0 - 3 waits on CS1 */
- write16(0x000F, BSC_WCR2); /* Waits for DRAM/DMA access - default */
- write16(0x0000, BSC_DCR); /* DRAM control - default */
- write16(0x0000, BSC_RTCSR); /* DRAM refresh - default */
- write16(0x0000, BSC_RTCNT); /* DRAM refresh counter - default*/
- write16(0x0000, BSC_RTCOR); /* DRAM refresh compare match - default */
+ /* STANDALONE_EVB: sets up PFC */
+ /* no STANDALONE_EVB: accepts defaults, adds RESET */
+
+ /* FIXME: replace 'magic numbers' */
- write16(0x5000, PFC_PACRH); /* Pin function controller - WRHH, WRHL */
- write16(0x1550, PFC_PACRL1); /* Pin fun. controller - WRH,WRL,RD,CS1 */
- write16(0x0000, PFC_PBCR1); /* Pin function controller - default */
- write16(0x2005, PFC_PBCR2); /* Pin function controller - A18,A17,A16 */
- write16(0xFFFF, PFC_PCCR); /* Pin function controller - A15-A0 */
- write16(0x5555, PFC_PDCRH1; /* Pin function controller - D31-D24 */
- write16(0x5555, PFC_PDCRH2); /* Pin function controller - D23-D16 */
- write16(0xFFFF, PFC_PDCRL); /* Pin function controller - D15-D0 */
- write16(0x0000, PFC_IFCR); /* Pin function controller - default */
- write16(0x0005, PFC_PACRL2); /* Pin function controller - Tx0, Rx0 */
-
- write16(0x00, PFC_PACRL2); /* default disconnects all I/O */
- /* pins; connected by DEVICE_open() */
+ write16(0x5000, PFC_PACRH); /* Pin function controller - WRHH, WRHL */
+ write16(0x1550, PFC_PACRL1); /* Pin fun. controller - WRH,WRL,RD,CS1 */
+ write16(0x0000, PFC_PBCR1); /* Pin function controller - default */
+ write16(0x2005, PFC_PBCR2); /* Pin fcn. controller - A18,A17,A16 */
+ write16(0xFFFF, PFC_PCCR); /* Pin function controller - A15-A0 */
+ write16(0x5555, PFC_PDCRH1); /* Pin function controller - D31-D24 */
+ write16(0x5555, PFC_PDCRH2); /* Pin function controller - D23-D16 */
+ write16(0xFFFF, PFC_PDCRL); /* Pin function controller - D15-D0 */
+ write16(0x0000, PFC_IFCR); /* Pin function controller - default */
+ write16(0x0000, PFC_PACRL2); /* default disconnects all I/O pins;*/
+ /* [re-connected by DEVICE_open()] */
#endif
- /* default hardware setup for SH7045F EVB */
+ /* default hardware setup for SH7045F EVB */
- /* PFC: General I/O except pin 13 (reset): */
- temp16 = read16(PFC_PECR1) | 0x0800;
- write16(temp16, PFC_PECR1);
+ /* PFC: General I/O except pin 13 (reset): */
+ temp16 = read16(PFC_PECR1);
+ temp16 |= 0x0800;
+ write16(temp16, PFC_PECR1);
- /* All I/O lines bits 7-0: */
- write16(0x00, PFC_PECR2);
+ /* All I/O lines bits 7-0: */
+ write16(0x00, PFC_PECR2);
- /* P5 (LED) out, all other pins in: */
- temp16 = read16(PFC_PEIOR) | 0x0020;
- write16(temp16, PFC_PEIOR);
+ /* P5 (LED) out, all other pins in: */
+ temp16 = read16(PFC_PEIOR);
+ temp16 |= 0x0020;
+ write16(temp16, PFC_PEIOR);
}
diff --git a/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.am b/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.am
index 388fe1bd85..3f58ecd4c3 100644
--- a/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/wrapup/Makefile.am
@@ -1,8 +1,8 @@
-##
+##
## $Id$
-##
+##
## build and install libbsp
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sh/shared/Makefile.am b/c/src/lib/libbsp/sh/shared/Makefile.am
index cfdd79c63e..0e03be2f9f 100644
--- a/c/src/lib/libbsp/sh/shared/Makefile.am
+++ b/c/src/lib/libbsp/sh/shared/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/shared/console.c b/c/src/lib/libbsp/shared/console.c
index cf56e87873..6beb7f02a6 100644
--- a/c/src/lib/libbsp/shared/console.c
+++ b/c/src/lib/libbsp/shared/console.c
@@ -106,21 +106,6 @@ rtems_device_driver console_open(
/*PAGE
*
- * console_reserve_resources
- *
- * This routine uses the termios driver to reserve resources.
- */
-
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources( configuration, 4 );
-}
-
-
-/*PAGE
- *
* console_close
*
* This routine closes a port that has been opened as console.
diff --git a/c/src/lib/libbsp/shmdr/Makefile.am b/c/src/lib/libbsp/shmdr/Makefile.am
index c4217f0878..9890bbbcc7 100644
--- a/c/src/lib/libbsp/shmdr/Makefile.am
+++ b/c/src/lib/libbsp/shmdr/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/Makefile.am b/c/src/lib/libbsp/sparc/Makefile.am
index 6e02be9e8e..8515dfe07b 100644
--- a/c/src/lib/libbsp/sparc/Makefile.am
+++ b/c/src/lib/libbsp/sparc/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index 8e58f7529d..f3c5602470 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/sparc/erc32/clock/Makefile.am b/c/src/lib/libbsp/sparc/erc32/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/sparc/erc32/clock/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/erc32/console/Makefile.am b/c/src/lib/libbsp/sparc/erc32/console/Makefile.am
index bb01430dfc..c0107e2dcf 100644
--- a/c/src/lib/libbsp/sparc/erc32/console/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/erc32/console/consolereserveresources.c b/c/src/lib/libbsp/sparc/erc32/console/consolereserveresources.c
index 40a65de7c5..e89e30a5c8 100644
--- a/c/src/lib/libbsp/sparc/erc32/console/consolereserveresources.c
+++ b/c/src/lib/libbsp/sparc/erc32/console/consolereserveresources.c
@@ -18,9 +18,4 @@
#include <stdlib.h>
#include <assert.h>
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources( configuration, 2 );
-}
+int console_reserve_resources_removed;
diff --git a/c/src/lib/libbsp/sparc/erc32/gnatsupp/Makefile.am b/c/src/lib/libbsp/sparc/erc32/gnatsupp/Makefile.am
index b00b01bff3..a95db91da6 100644
--- a/c/src/lib/libbsp/sparc/erc32/gnatsupp/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/gnatsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/erc32/include/Makefile.am b/c/src/lib/libbsp/sparc/erc32/include/Makefile.am
index 43cf28d6c2..3f061aa216 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/erc32/include/bsp.h b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
index cb1a88f288..6af1353548 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
@@ -27,10 +27,20 @@ extern "C" {
#endif
#include <rtems.h>
-#include <clockdrv.h>
-#include <console.h>
#include <iosupp.h>
#include <erc32.h>
+#include <clockdrv.h>
+
+#include <console.h>
+
+/*
+ * confdefs.h overrides for this BSP:
+ * - two termios serial ports
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024)
/*
* Define the time limits for RTEMS Test Suite test durations.
diff --git a/c/src/lib/libbsp/sparc/erc32/start/Makefile.am b/c/src/lib/libbsp/sparc/erc32/start/Makefile.am
index 824d7a22c5..e5a9f26a27 100644
--- a/c/src/lib/libbsp/sparc/erc32/start/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/Makefile.am b/c/src/lib/libbsp/sparc/erc32/startup/Makefile.am
index 540fe1f7a6..766ef8cced 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,7 +22,6 @@ include $(top_srcdir)/../../../../../../automake/lib.am
#
# USE_INIT_FINI tells main.c what C++ help we need.
-
AM_CPPFLAGS += -DUSE_INIT_FINI
$(PGM): $(OBJS)
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c b/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
index f2f2554072..cd3df53b29 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
@@ -212,13 +212,7 @@ void bsp_start( void )
* This should be enough interrupt stack.
*/
- Cpu_table.interrupt_stack_size = (24 * 1024);
-
-/*
-#if defined(RTEMS_POSIX_API)
- BSP_Configuration.work_space_size *= 3;
-#endif
-*/
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
work_space_start =
(unsigned char *)rdb_start - BSP_Configuration.work_space_size;
@@ -230,12 +224,6 @@ void bsp_start( void )
BSP_Configuration.work_space_start = work_space_start;
- /*
- * Account for the console's resources
- */
-
- console_reserve_resources( &BSP_Configuration );
-
#if SIMSPARC_FAST_IDLE
/*
* Add 1 extension for fast idle
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/linkcmds b/c/src/lib/libbsp/sparc/erc32/startup/linkcmds
index b12ff32f77..ff78e8d74c 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/linkcmds
+++ b/c/src/lib/libbsp/sparc/erc32/startup/linkcmds
@@ -143,7 +143,8 @@ SECTIONS
*(.data)
*(.gnu.linkonce.d*)
*(.gcc_except_table)
- edata = ALIGN(0x10);
+ . = ALIGN(0x10);
+ edata = .;
_edata = .;
} > ram
.shbss :
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/spurious.c b/c/src/lib/libbsp/sparc/erc32/startup/spurious.c
index c22a5373e2..93694d47e4 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/spurious.c
+++ b/c/src/lib/libbsp/sparc/erc32/startup/spurious.c
@@ -182,7 +182,8 @@ void bsp_spurious_initialize()
(( trap >= 0x70 ) && ( trap <= 0x83 )))
continue;
- set_vector( bsp_spurious_handler, SPARC_SYNCHRONOUS_TRAP( trap ), 1 );
+ set_vector( (rtems_isr_entry) bsp_spurious_handler,
+ SPARC_SYNCHRONOUS_TRAP( trap ), 1 );
}
ERC32_MEC.Interrupt_Mask = mask;
diff --git a/c/src/lib/libbsp/sparc/erc32/timer/Makefile.am b/c/src/lib/libbsp/sparc/erc32/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/sparc/erc32/timer/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/sparc/erc32/tools/Makefile.am b/c/src/lib/libbsp/sparc/erc32/tools/Makefile.am
index 5da84d4455..a8f75c6c9e 100644
--- a/c/src/lib/libbsp/sparc/erc32/tools/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/tools/Makefile.am
@@ -5,11 +5,17 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-noinst_SCRIPTS=runtest
+noinst_SCRIPTS = runtest
-#HACK: install to build-tree
-all-local: $(SCRIPTS)
- $(mkinstalldirs) $(PROJECT_ROOT)/erc32/tests
- $(INSTALL_SCRIPT) runtest $(PROJECT_ROOT)/erc32/tests/runtest
+TMPINSTALL_FILES += $(PROJECT_ROOT)/erc32/tests \
+ $(PROJECT_ROOT)/erc32/tests/runtest
-include $(top_srcdir)/../../../../../../../automake/local.am
+$(PROJECT_ROOT)/erc32/tests:
+ $(mkinstalldirs) $@
+
+$(PROJECT_ROOT)/erc32/tests/runtest: runtest
+ $(INSTALL_SCRIPT) $< $@
+
+all-local: $(TMPINSTALL_FILES)
+
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/sparc/erc32/tools/runtest.in b/c/src/lib/libbsp/sparc/erc32/tools/runtest.in
index 3f9ffa73fe..b7c6f723c2 100644
--- a/c/src/lib/libbsp/sparc/erc32/tools/runtest.in
+++ b/c/src/lib/libbsp/sparc/erc32/tools/runtest.in
@@ -142,13 +142,13 @@ do
fatal "MP tests not supported"
warn "Skipping $tname; 'runtest' runs both nodes when for *-node1"
continue;;
- *-node1*)
- fatal "MP tests not supported"
+ *-node1*)
warn "Running both nodes associated with $tname"
+ variant=`echo $tname | sed 's/.*-node[12]//' | sed 's/\.exe//'`
tname=`echo $tname | sed 's/-node.*//'`
TEST_TYPE="mp"
;;
- minimum*|stackchk*|spfatal*|malloctest*|termio*)
+ minimum*|stackchk*|spfatal*|termio*)
warn "Skipping $tname; it locks up or takes a VERY long time to run"
continue
;;
diff --git a/c/src/lib/libbsp/sparc/erc32/wrapup/Makefile.am b/c/src/lib/libbsp/sparc/erc32/wrapup/Makefile.am
index 5871eeac1f..098eb0b26b 100644
--- a/c/src/lib/libbsp/sparc/erc32/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/unix/Makefile.am b/c/src/lib/libbsp/unix/Makefile.am
index 6e02be9e8e..8515dfe07b 100644
--- a/c/src/lib/libbsp/unix/Makefile.am
+++ b/c/src/lib/libbsp/unix/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/unix/posix/Makefile.am b/c/src/lib/libbsp/unix/posix/Makefile.am
index 3dac7596bc..f3ddd4ff45 100644
--- a/c/src/lib/libbsp/unix/posix/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/unix/posix/clock/Makefile.am b/c/src/lib/libbsp/unix/posix/clock/Makefile.am
index 8bb38a0a0a..102b1aa9d8 100644
--- a/c/src/lib/libbsp/unix/posix/clock/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/unix/posix/configure.in b/c/src/lib/libbsp/unix/posix/configure.in
index 24398e2a0b..7287f9ebe0 100644
--- a/c/src/lib/libbsp/unix/posix/configure.in
+++ b/c/src/lib/libbsp/unix/posix/configure.in
@@ -11,17 +11,22 @@ RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp-unix-posix,$RTEMS_VERSION,no)
AM_MAINTAINER_MODE
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_PROG_CXX_FOR_TARGET
-RTEMS_CANONICALIZE_TOOLS
-RTEMS_ENABLE_MULTIPROCESSING
RTEMS_ENABLE_CXX
+RTEMS_ENABLE_MULTIPROCESSING
RTEMS_ENV_RTEMSBSP
+RTEMS_CANONICAL_HOST
+
+RTEMS_PROG_CC_FOR_TARGET
+
+if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
+ RTEMS_PROG_CXX_FOR_TARGET
+fi
+
+RTEMS_CANONICALIZE_TOOLS
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
-RTEMS_CANONICAL_HOST
RTEMS_CHECK_CXX
diff --git a/c/src/lib/libbsp/unix/posix/console/Makefile.am b/c/src/lib/libbsp/unix/posix/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/unix/posix/console/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/unix/posix/include/Makefile.am b/c/src/lib/libbsp/unix/posix/include/Makefile.am
index 08a74374a3..2f0d3a70f0 100644
--- a/c/src/lib/libbsp/unix/posix/include/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/unix/posix/include/bsp.h b/c/src/lib/libbsp/unix/posix/include/bsp.h
index e775485090..ca0bdd0402 100644
--- a/c/src/lib/libbsp/unix/posix/include/bsp.h
+++ b/c/src/lib/libbsp/unix/posix/include/bsp.h
@@ -25,6 +25,15 @@ extern "C" {
#include <iosupp.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.am b/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.am
index 1f1b64bb6d..b6d4bd3580 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/unix/posix/startup/Makefile.am b/c/src/lib/libbsp/unix/posix/startup/Makefile.am
index 709696b55e..56b991c4b6 100644
--- a/c/src/lib/libbsp/unix/posix/startup/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/startup/Makefile.am
@@ -4,10 +4,10 @@
AUTOMAKE_OPTIONS = foreign 1.4
-PGM = ${ARCH}/startup.rel
-
VPATH = @srcdir@:@srcdir@/../../../shared
+PGM = ${ARCH}/startup.rel
+
if HAS_CXX
C_MAIN_C_FILES =
else
@@ -48,14 +48,13 @@ $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o: $(ARCH)/rtems-ctor.o
$(INSTALL_DATA) $< $@
if HAS_CXX
-all-local: $(ARCH) $(PGM) \
- $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a \
- $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o
+all-local: $(ARCH) $(PGM) $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a \
+ $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o
else
-all-local: $(ARCH) $(PGM)
+all-local: $(ARCH) $(PGM)
endif
EXTRA_DIST = bspclean.c bspstart.c exit.c main.c no-ctor.c rtems-ctor.cc \
- setvec.c
+ setvec.c
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
index a9c682ca52..d4cfa83495 100644
--- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c
+++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
@@ -205,7 +205,7 @@ void bsp_start(void)
* XXX; interrupt stack not currently used, so this doesn't matter
*/
- Cpu_table.interrupt_stack_size = (12 * 1024);
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.extra_mpci_receive_server_stack = 0;
diff --git a/c/src/lib/libbsp/unix/posix/timer/Makefile.am b/c/src/lib/libbsp/unix/posix/timer/Makefile.am
index 96bc1e047b..addbe3bfc5 100644
--- a/c/src/lib/libbsp/unix/posix/timer/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libbsp/unix/posix/tools/Makefile.am b/c/src/lib/libbsp/unix/posix/tools/Makefile.am
index 63929b60fc..6b498aa16a 100644
--- a/c/src/lib/libbsp/unix/posix/tools/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/tools/Makefile.am
@@ -7,15 +7,31 @@ ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
if PERL
perl_scripts = shmdump semdump
+PERL_TMPINSTALL_FILES = $(PROJECT_ROOT)/posix/tests/shmdump \
+ $(PROJECT_ROOT)/posix/tests/semdump
endif
-noinst_SCRIPTS=runtest looptest $(perl_scripts)
+noinst_SCRIPTS = runtest looptest $(perl_scripts)
+
+$(PROJECT_ROOT)/posix/tests:
+ $(mkinstalldirs) $@
+
+$(PROJECT_ROOT)/posix/tests/runtest: runtest
+ $(INSTALL_SCRIPT) $< $@
+
+$(PROJECT_ROOT)/posix/tests/looptest: looptest
+ $(INSTALL_SCRIPT) $< $@
+
+$(PROJECT_ROOT)/posix/tests/shmdump: shmdump
+ $(INSTALL_SCRIPT) $< $@
+
+$(PROJECT_ROOT)/posix/tests/semdump: semdump
+ $(INSTALL_SCRIPT) $< $@
+
+TMPINSTALL_FILES += $(PROJECT_ROOT)/posix/tests \
+ $(PROJECT_ROOT)/posix/tests/runtest $(PROJECT_ROOT)/posix/tests/looptest
## HACK: install to build-tree
-all-local: $(SCRIPTS)
- $(mkinstalldirs) $(PROJECT_ROOT)/posix/tests
- for i in $(SCRIPTS); do \
- $(INSTALL_SCRIPT) $$i $(PROJECT_ROOT)/posix/tests ; \
- done
+all-local: $(TMPINSTALL_FILES) $(PERL_TMPINSTALL_FILES)
-include $(top_srcdir)/../../../../../../../automake/local.am
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/unix/posix/wrapup/Makefile.am b/c/src/lib/libbsp/unix/posix/wrapup/Makefile.am
index 3296105fea..ca08c1cbe8 100644
--- a/c/src/lib/libbsp/unix/posix/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/unix/posix/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libc/Makefile.am b/c/src/lib/libc/Makefile.am
index 20893f29eb..54b674b2f7 100644
--- a/c/src/lib/libc/Makefile.am
+++ b/c/src/lib/libc/Makefile.am
@@ -48,15 +48,14 @@ LIBC_GLUE_C_FILES = __getpid.c __gettod.c __times.c truncate.c access.c \
UNIX_LIBC_C_FILES = unixlibc.c hosterr.c
-COMMON_C_FILES = $(BASE_FS_C_FILES) $(MALLOC_C_FILES) \
- $(TERMIOS_C_FILES) $(ERROR_C_FILES) $(ASSOCIATION_C_FILES)
+COMMON_C_FILES = gxx_wrappers.c $(BASE_FS_C_FILES) $(MALLOC_C_FILES) $(TERMIOS_C_FILES) \
+ $(ERROR_C_FILES) $(ASSOCIATION_C_FILES)
UNIX_C_FILES = $(UNIX_LIBC_C_FILES) imfs_unixstub.c
-EMBEDDED_C_FILES = $(LIBC_GLUE_C_FILES) \
- $(PASSWORD_GROUP_C_FILES) $(TERMINAL_IDENTIFICATION_C_FILES) \
- $(SYSTEM_CALL_C_FILES) $(DIRECTORY_SCAN_C_FILES) \
- $(IMFS_C_FILES)
+EMBEDDED_C_FILES = $(LIBC_GLUE_C_FILES) $(PASSWORD_GROUP_C_FILES) \
+ $(TERMINAL_IDENTIFICATION_C_FILES) $(SYSTEM_CALL_C_FILES) \
+ $(DIRECTORY_SCAN_C_FILES) $(IMFS_C_FILES)
if UNIX
C_FILES = $(COMMON_C_FILES) $(UNIX_C_FILES)
@@ -73,13 +72,10 @@ noinst_HEADERS = libio_.h
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../automake/lib.am
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems \
-$(PROJECT_INCLUDE)/sys \
-$(H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%) \
-$(SYS_H_FILES:%=$(PROJECT_INCLUDE)/sys/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems \
+ $(PROJECT_INCLUDE)/sys $(H_FILES:%=$(PROJECT_INCLUDE)/%) \
+ $(RTEMS_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%) \
+ $(SYS_H_FILES:%=$(PROJECT_INCLUDE)/sys/%)
$(PROJECT_INCLUDE):
@$(mkinstalldirs) $@
@@ -95,8 +91,7 @@ $(PROJECT_INCLUDE)/rtems/%.h: %.h
$(PROJECT_INCLUDE)/sys/%.h: %.h
$(INSTALL_DATA) $< $@
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
OBJS = $(C_O_FILES)
@@ -106,7 +101,7 @@ OBJS = $(C_O_FILES)
AM_CFLAGS += $(LIBC_DEFINES)
-all: ${ARCH} $(TMPINSTALL_FILES)
+all-local: ${ARCH} $(TMPINSTALL_FILES)
$(LIB): ${OBJS}
$(make-library)
@@ -116,9 +111,7 @@ $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
DOC_FILES = TODO CASES
-EXTRA_DIST = \
-$(DOC_FILES) \
-$(COMMON_C_FILES) $(EMBEDDED_C_FILES) $(UNIX_C_FILES) \
-$(H_FILES) $(RTEMS_H_FILES) $(SYS_H_FILES)
+EXTRA_DIST = $(DOC_FILES) $(COMMON_C_FILES) $(EMBEDDED_C_FILES) \
+ $(UNIX_C_FILES) $(H_FILES) $(RTEMS_H_FILES) $(SYS_H_FILES)
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/libc/error.h b/c/src/lib/libc/error.h
index a0698afb5d..de6e1715db 100644
--- a/c/src/lib/libc/error.h
+++ b/c/src/lib/libc/error.h
@@ -7,6 +7,10 @@
#ifndef __RTEMS_ERROR_h
#define __RTEMS_ERROR_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* rtems_error() and rtems_panic() support
*/
@@ -34,5 +38,10 @@ void rtems_panic(const char *printf_format, ...);
extern int rtems_panic_in_progress;
+#ifdef __cplusplus
+}
+#endif
+
+
#endif
/* end of include file */
diff --git a/c/src/lib/libc/gxx_wrappers.c b/c/src/lib/libc/gxx_wrappers.c
index e69de29bb2..323da73e7f 100644
--- a/c/src/lib/libc/gxx_wrappers.c
+++ b/c/src/lib/libc/gxx_wrappers.c
@@ -0,0 +1,219 @@
+/*
+ * RTEMS threads compatibily routines for libgcc2.
+ *
+ * by: Rosimildo da Silva ( rdasilva@connecttel.com
+ *
+ * Used ideas from:
+ * W. Eric Norum
+ * Canadian Light Source
+ * University of Saskatchewan
+ * Saskatoon, Saskatchewan, CANADA
+ * eric@cls.usask.ca
+ *
+ * Eric sent some e-mail in the rtems-list as a start point for this
+ * module implementation.
+ *
+ *
+ */
+
+/* We might not need, defined just in case */
+#define __RTEMS_INSIDE__ 1
+
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <rtems.h>
+#include <rtems/system.h>
+#include <rtems/rtems/tasks.h>
+
+/*
+ * These typedefs should match with the ones defined in the file
+ * gcc/gthr-rtems.h in the gcc distribution.
+ */
+typedef void *__gthread_key_t;
+typedef int __gthread_once_t;
+typedef void *__gthread_mutex_t;
+
+
+/* uncomment this if you need to debug this interface */
+
+/*
+#define DEBUG_GXX_WRAPPERS 1
+*/
+
+
+/* prototype for the terminate() */
+extern void __terminate( void );
+
+
+#ifdef DEBUG_GXX_WRAPPERS
+/* local function to return the ID of the calling thread */
+static rtems_id get_tid( void )
+{
+ rtems_id id = 0;
+ rtems_task_ident( RTEMS_SELF, 0, &id );
+ return id;
+}
+#endif
+
+
+int rtems_gxx_once(__gthread_once_t *once, void (*func) ())
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
+#endif
+ if( *once == 0 )
+ {
+ /*
+ * NOTE: could not use the call to disable "preemption", it causes
+ * one exception. Somebody might want to investiage it further
+ * sometime later.
+ */
+ _Thread_Disable_dispatch();
+ *once = 1;
+ (*func)();
+ _Thread_Enable_dispatch();
+ }
+ return 0;
+}
+
+
+int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
+{
+ /* Ok, this can be a bit tricky. We are going to return a "key" as a
+ * pointer to the buffer that will hold the value of the key itself.
+ * We have to to this, becuase the others functions on this interface
+ * deal with the value of the key, as used with the POSIX API.
+ */
+ /* Do not pull your hair, trust me this works. :-) */
+ __gthread_key_t *new_key = ( __gthread_key_t * )malloc( sizeof( __gthread_key_t ) );
+ *key = ( __gthread_key_t )new_key;
+ *new_key = NULL;
+
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key );
+#endif
+ /* register with RTEMS the buffer that will hold the key values */
+ if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, NULL ) == RTEMS_SUCCESSFUL )
+ return 0;
+ return -1;
+}
+
+int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
+#endif
+ *(void **)key = 0;
+ return 0;
+}
+
+int rtems_gxx_key_delete (__gthread_key_t key)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: delete key=%x\n", key );
+#endif
+ /* register with RTEMS the buffer that will hold the key values */
+ if( rtems_task_variable_delete( RTEMS_SELF, (void **)key ) == RTEMS_SUCCESSFUL )
+ {
+ if( key ) free( (void *)key );
+ return 0;
+ }
+ return 0;
+}
+
+
+void *rtems_gxx_getspecific(__gthread_key_t key)
+{
+ void *p= 0;
+
+ /* register with RTEMS the buffer that will hold the key values */
+ if( rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ) == RTEMS_SUCCESSFUL )
+ {
+ /* We do not have to do this, but what the heck ! */
+ p= *( void **)key;
+ }
+ else
+ {
+ /* fisrt time, always set to zero, it is unknown the value that the others
+ * threads are using at the moment of this call
+ */
+ if( rtems_task_variable_add( RTEMS_SELF, (void **)key, NULL ) != RTEMS_SUCCESSFUL )
+ {
+ __terminate ();
+ }
+ *( void ** )key = (void *)0;
+ }
+
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: getspecific key=%x, ptr=%x, id=%x\n", key, p, get_tid() );
+#endif
+ return p;
+}
+
+
+int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: setspecific key=%x, ptr=%x, id=%x\n", key, ptr, get_tid() );
+#endif
+ /* register with RTEMS the buffer that will hold the key values */
+ if( rtems_task_variable_add( RTEMS_SELF, (void **)key, NULL ) == RTEMS_SUCCESSFUL )
+ {
+ /* now let's set the proper value */
+ *( void ** )key = (void *)ptr;
+ return 0;
+ }
+ return -1;
+}
+
+
+/*
+ * MUTEX support
+ */
+void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: mutex init =%X\n", *mutex );
+#endif
+ if( rtems_semaphore_create( rtems_build_name ('G', 'C', 'C', '2'),
+ 1,
+ RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE
+ |RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
+ 0,
+ (rtems_id *)mutex ) != RTEMS_SUCCESSFUL )
+ {
+ __terminate ();
+ }
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
+#endif
+}
+
+int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
+#endif
+ return ( rtems_semaphore_obtain( (rtems_id)*mutex,
+ RTEMS_WAIT, RTEMS_NO_TIMEOUT ) == RTEMS_SUCCESSFUL) ? 0 : -1;
+}
+
+int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
+#endif
+ return (rtems_semaphore_obtain ((rtems_id)*mutex,
+ RTEMS_NO_WAIT, 0) == RTEMS_SUCCESSFUL) ? 0 : -1;
+}
+
+int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex)
+{
+#ifdef DEBUG_GXX_WRAPPERS
+ printk( "gxx_wrappers: unlock mutex=%X\n", *mutex );
+#endif
+ return (rtems_semaphore_release( (rtems_id)*mutex ) == RTEMS_SUCCESSFUL) ? 0 :-1;
+}
+
diff --git a/c/src/lib/libc/imfs.h b/c/src/lib/libc/imfs.h
index 38c770a325..3a44c50ee3 100644
--- a/c/src/lib/libc/imfs.h
+++ b/c/src/lib/libc/imfs.h
@@ -157,9 +157,9 @@ struct IMFS_jnode_tt {
uid_t st_uid; /* User ID of owner */
gid_t st_gid; /* Group ID of owner */
- time_t st_atime; /* Time of last access */
- time_t st_mtime; /* Time of last modification */
- time_t st_ctime; /* Time of last status change */
+ time_t stat_atime; /* Time of last access */
+ time_t stat_mtime; /* Time of last modification */
+ time_t stat_ctime; /* Time of last status change */
IMFS_jnode_types_t type; /* Type of this entry */
IMFS_types_union info;
};
@@ -168,29 +168,29 @@ struct IMFS_jnode_tt {
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
- _jnode->st_atime = (time_t) tv.tv_sec; \
+ _jnode->stat_atime = (time_t) tv.tv_sec; \
} while (0)
#define IMFS_update_mtime( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
+ _jnode->stat_mtime = (time_t) tv.tv_sec; \
} while (0)
#define IMFS_update_ctime( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
- _jnode->st_ctime = (time_t) tv.tv_sec; \
+ _jnode->stat_ctime = (time_t) tv.tv_sec; \
} while (0)
#define IMFS_atime_mtime_update( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
- _jnode->st_mtime = (time_t) tv.tv_sec; \
- _jnode->st_atime = (time_t) tv.tv_sec; \
+ _jnode->stat_mtime = (time_t) tv.tv_sec; \
+ _jnode->stat_atime = (time_t) tv.tv_sec; \
} while (0)
typedef struct {
diff --git a/c/src/lib/libc/imfs_creat.c b/c/src/lib/libc/imfs_creat.c
index 227b5f9300..b60e78540e 100644
--- a/c/src/lib/libc/imfs_creat.c
+++ b/c/src/lib/libc/imfs_creat.c
@@ -72,9 +72,9 @@ IMFS_jnode_t *IMFS_create_node(
gettimeofday( &tv, 0 );
- node->st_atime = (time_t) tv.tv_sec;
- node->st_mtime = (time_t) tv.tv_sec;
- node->st_ctime = (time_t) tv.tv_sec;
+ node->stat_atime = (time_t) tv.tv_sec;
+ node->stat_mtime = (time_t) tv.tv_sec;
+ node->stat_ctime = (time_t) tv.tv_sec;
/*
* Set the type specific information
diff --git a/c/src/lib/libc/imfs_directory.c b/c/src/lib/libc/imfs_directory.c
index 1f6d9b5ff5..38280c565c 100644
--- a/c/src/lib/libc/imfs_directory.c
+++ b/c/src/lib/libc/imfs_directory.c
@@ -219,9 +219,9 @@ int imfs_dir_lseek(
* dirent structure
* st_blksize 0
* st_blocks 0
- * st_atime time of last access
- * st_mtime time of last modification
- * st_ctime time of the last change
+ * stat_atime time of last access
+ * stat_mtime time of last modification
+ * stat_ctime time of the last change
*
* This information will be returned to the calling function in a -stat- struct
*
@@ -248,9 +248,9 @@ int imfs_dir_fstat(
buf->st_rdev = 0ll;
buf->st_blksize = 0;
buf->st_blocks = 0;
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
+ buf->st_atime = the_jnode->stat_atime;
+ buf->st_mtime = the_jnode->stat_mtime;
+ buf->st_ctime = the_jnode->stat_ctime;
buf->st_size = 0;
diff --git a/c/src/lib/libc/imfs_stat.c b/c/src/lib/libc/imfs_stat.c
index 2edc1a9e9b..f5858498c1 100644
--- a/c/src/lib/libc/imfs_stat.c
+++ b/c/src/lib/libc/imfs_stat.c
@@ -50,9 +50,9 @@ int IMFS_stat(
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
- buf->st_atime = the_jnode->st_atime;
- buf->st_mtime = the_jnode->st_mtime;
- buf->st_ctime = the_jnode->st_ctime;
+ buf->st_atime = the_jnode->stat_atime;
+ buf->st_mtime = the_jnode->stat_mtime;
+ buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
diff --git a/c/src/lib/libc/imfs_utime.c b/c/src/lib/libc/imfs_utime.c
index e20d352c50..c9bd9ddd90 100644
--- a/c/src/lib/libc/imfs_utime.c
+++ b/c/src/lib/libc/imfs_utime.c
@@ -30,8 +30,8 @@ int IMFS_utime(
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
- the_jnode->st_atime = actime;
- the_jnode->st_mtime = modtime;
+ the_jnode->stat_atime = actime;
+ the_jnode->stat_mtime = modtime;
return 0;
}
diff --git a/c/src/lib/libc/libio.c b/c/src/lib/libc/libio.c
index 9e075c9f0b..c878db6247 100644
--- a/c/src/lib/libc/libio.c
+++ b/c/src/lib/libc/libio.c
@@ -260,7 +260,7 @@ int rtems_libio_is_open_files_in_fs(
* Look for any active file descriptor entry.
*/
- for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
+ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
@@ -304,7 +304,7 @@ int rtems_libio_is_file_open(
* Look for any active file descriptor entry.
*/
- for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
+ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
/*
diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c
index cc63b6c7d0..08660d75cc 100644
--- a/c/src/lib/libc/malloc.c
+++ b/c/src/lib/libc/malloc.c
@@ -120,7 +120,7 @@ void RTEMS_Malloc_Initialize(
rtems_build_name( 'H', 'E', 'A', 'P' ),
starting_address,
length,
- CPU_ALIGNMENT,
+ CPU_HEAP_ALIGNMENT,
RTEMS_DEFAULT_ATTRIBUTES,
&RTEMS_Malloc_Heap
);
diff --git a/c/src/lib/libc/scandir.c b/c/src/lib/libc/scandir.c
index 43c7c51747..25f3263187 100644
--- a/c/src/lib/libc/scandir.c
+++ b/c/src/lib/libc/scandir.c
@@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp)
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
- strncpy(p->d_name, d->d_name, p->d_namlen + 1);
+ strncpy(d->d_name, p->d_name, p->d_namlen + 1);
/*
* Check to make sure the array has space left and
* realloc the maximum size.
diff --git a/c/src/lib/libc/termios.c b/c/src/lib/libc/termios.c
index 6d334ecd23..7883e94b63 100644
--- a/c/src/lib/libc/termios.c
+++ b/c/src/lib/libc/termios.c
@@ -28,7 +28,6 @@
* FreeBSD does not support a full POSIX termios so we have to help it out
*/
-
#if defined(__FreeBSD__)
#define XTABS 0
#define ONLRET 0
@@ -41,6 +40,14 @@
#endif
/*
+ * Cygwin does not define these
+ */
+
+#if defined(__CYGWIN__)
+#define ECHOPRT 0
+#endif
+
+/*
* The size of the cooked buffer
*/
#define CBUFSIZE 256
@@ -238,7 +245,7 @@ rtems_termios_open (
*/
tty->termios.c_iflag = BRKINT | ICRNL | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
- tty->termios.c_cflag = B9600 | CS8 | CREAD;
+ tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
@@ -256,8 +263,8 @@ rtems_termios_open (
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
- /* setup flow control mode, clear flow control flags */
- tty->flow_ctrl = FL_MDXON;
+ /* start with no flow control, clear flow control flags */
+ tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
diff --git a/c/src/lib/libc/termiosreserveresources.c b/c/src/lib/libc/termiosreserveresources.c
index 2d9c05c988..664bdd1f62 100644
--- a/c/src/lib/libc/termiosreserveresources.c
+++ b/c/src/lib/libc/termiosreserveresources.c
@@ -6,15 +6,19 @@
#include <rtems.h>
+#if 0
static int first_time; /* assumed to be zeroed by BSS initialization */
+#endif
void rtems_termios_reserve_resources (
rtems_configuration_table *configuration,
rtems_unsigned32 number_of_devices
)
{
+#if 0
rtems_api_configuration_table *rtems_config;
+
if (!configuration)
rtems_fatal_error_occurred (0xFFF0F001);
rtems_config = configuration->RTEMS_api_configuration;
@@ -24,5 +28,6 @@ void rtems_termios_reserve_resources (
rtems_config->maximum_semaphores += 1;
first_time = 1;
rtems_config->maximum_semaphores += (4 * number_of_devices);
+#endif
}
diff --git a/c/src/lib/libc/unmount.c b/c/src/lib/libc/unmount.c
index c4b6bdae7d..46b11d1848 100644
--- a/c/src/lib/libc/unmount.c
+++ b/c/src/lib/libc/unmount.c
@@ -62,7 +62,6 @@ int unmount(
int status;
rtems_filesystem_location_info_t temp_loc;
rtems_filesystem_mount_table_entry_t temp_mt_entry;
- int result;
/*
* Are there any file systems below the mount_path specified
@@ -101,7 +100,7 @@ int unmount(
/*
* Allow the file system being mounted on to do its cleanup.
* XXX - Did I change these correctly ??? It looks like either I did
- * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swaped.
+ * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swapped.
* XXX Add to the mt_point_node unmount to set the mt_entry back to null
* XXX I will step off in space when evaluating past the end of the node.
*/
@@ -121,12 +120,6 @@ int unmount(
}
/*
- * Allow the file system to clean up.
- */
-
- result = (*temp_loc.ops->fsunmount_me)( temp_loc.mt_entry );
-
- /*
* Extract the mount table entry from the chain
*/
@@ -140,8 +133,7 @@ int unmount(
free( temp_loc.mt_entry );
rtems_filesystem_freenode( &temp_loc );
- return result;
-
+ return 0;
}
diff --git a/c/src/lib/libcpu/Makefile.am b/c/src/lib/libcpu/Makefile.am
index e1d1694a24..c3bf45662c 100644
--- a/c/src/lib/libcpu/Makefile.am
+++ b/c/src/lib/libcpu/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/a29k/Makefile.am b/c/src/lib/libcpu/a29k/Makefile.am
index e9046ede08..d9fad31f51 100644
--- a/c/src/lib/libcpu/a29k/Makefile.am
+++ b/c/src/lib/libcpu/a29k/Makefile.am
@@ -1,11 +1,11 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-SUBDIRS = clock timer
+SUBDIRS = clock timer
include $(top_srcdir)/../../../../../automake/subdirs.am
include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/a29k/clock/Makefile.am b/c/src/lib/libcpu/a29k/clock/Makefile.am
index 00fc4bc7b8..755c132239 100644
--- a/c/src/lib/libcpu/a29k/clock/Makefile.am
+++ b/c/src/lib/libcpu/a29k/clock/Makefile.am
@@ -1,10 +1,10 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-PGM=$(ARCH)/clock.rel
+PGM = $(ARCH)/clock.rel
C_FILES = ckinit.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
diff --git a/c/src/lib/libcpu/a29k/timer/Makefile.am b/c/src/lib/libcpu/a29k/timer/Makefile.am
index c87e702427..a468af3fbe 100644
--- a/c/src/lib/libcpu/a29k/timer/Makefile.am
+++ b/c/src/lib/libcpu/a29k/timer/Makefile.am
@@ -1,10 +1,10 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-PGM=$(ARCH)/timer.rel
+PGM = $(ARCH)/timer.rel
# NOTE: timerisr is normally an assembly file!!!
diff --git a/c/src/lib/libcpu/hppa1.1/Makefile.am b/c/src/lib/libcpu/hppa1.1/Makefile.am
index 45763883d6..2abc6093f2 100644
--- a/c/src/lib/libcpu/hppa1.1/Makefile.am
+++ b/c/src/lib/libcpu/hppa1.1/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/hppa1.1/clock/Makefile.am b/c/src/lib/libcpu/hppa1.1/clock/Makefile.am
index b79f23bd38..f8b46ecc12 100644
--- a/c/src/lib/libcpu/hppa1.1/clock/Makefile.am
+++ b/c/src/lib/libcpu/hppa1.1/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/hppa1.1/include/Makefile.am b/c/src/lib/libcpu/hppa1.1/include/Makefile.am
index f99916c405..8adb914568 100644
--- a/c/src/lib/libcpu/hppa1.1/include/Makefile.am
+++ b/c/src/lib/libcpu/hppa1.1/include/Makefile.am
@@ -1,12 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
H_FILES = runway.h semaphore.h
-# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
+# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
# file name conflicts
$(PROJECT_INCLUDE)/hppa1.1:
diff --git a/c/src/lib/libcpu/hppa1.1/milli/Makefile.am b/c/src/lib/libcpu/hppa1.1/milli/Makefile.am
index d642f8ec89..41744e4ef2 100644
--- a/c/src/lib/libcpu/hppa1.1/milli/Makefile.am
+++ b/c/src/lib/libcpu/hppa1.1/milli/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am b/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am
index 96f8324776..c0af1ec990 100644
--- a/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am
+++ b/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/hppa1.1/timer/Makefile.am b/c/src/lib/libcpu/hppa1.1/timer/Makefile.am
index d586fcac77..65edc98d9f 100644
--- a/c/src/lib/libcpu/hppa1.1/timer/Makefile.am
+++ b/c/src/lib/libcpu/hppa1.1/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/i386/Makefile.am b/c/src/lib/libcpu/i386/Makefile.am
index ee4972ff64..90e2d0bc8b 100644
--- a/c/src/lib/libcpu/i386/Makefile.am
+++ b/c/src/lib/libcpu/i386/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/m68k/Makefile.am b/c/src/lib/libcpu/m68k/Makefile.am
index a0579f3cf3..6e9cd33d32 100644
--- a/c/src/lib/libcpu/m68k/Makefile.am
+++ b/c/src/lib/libcpu/m68k/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/m68k/m68040/Makefile.am b/c/src/lib/libcpu/m68k/m68040/Makefile.am
index 0ae724c75a..24fa3c6a9f 100644
--- a/c/src/lib/libcpu/m68k/m68040/Makefile.am
+++ b/c/src/lib/libcpu/m68k/m68040/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am b/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am
index 3e0284b63f..c4ffe3f26d 100644
--- a/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am
+++ b/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -28,8 +28,6 @@ OBJS = $(C_O_FILES) $(S_O_FILES)
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS += $(CFLAGS_OS_V)
-
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libcpu/mips/Makefile.am b/c/src/lib/libcpu/mips/Makefile.am
index f40a256bdd..d9fad31f51 100644
--- a/c/src/lib/libcpu/mips/Makefile.am
+++ b/c/src/lib/libcpu/mips/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/mips/clock/Makefile.am b/c/src/lib/libcpu/mips/clock/Makefile.am
index e235a5d4de..6384df0a0a 100644
--- a/c/src/lib/libcpu/mips/clock/Makefile.am
+++ b/c/src/lib/libcpu/mips/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/mips/timer/Makefile.am b/c/src/lib/libcpu/mips/timer/Makefile.am
index ee37d10453..d0c0ee598f 100644
--- a/c/src/lib/libcpu/mips/timer/Makefile.am
+++ b/c/src/lib/libcpu/mips/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/mips64orion/Makefile.am b/c/src/lib/libcpu/mips64orion/Makefile.am
index f40a256bdd..d9fad31f51 100644
--- a/c/src/lib/libcpu/mips64orion/Makefile.am
+++ b/c/src/lib/libcpu/mips64orion/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/mips64orion/clock/Makefile.am b/c/src/lib/libcpu/mips64orion/clock/Makefile.am
index e235a5d4de..6384df0a0a 100644
--- a/c/src/lib/libcpu/mips64orion/clock/Makefile.am
+++ b/c/src/lib/libcpu/mips64orion/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/mips64orion/timer/Makefile.am b/c/src/lib/libcpu/mips64orion/timer/Makefile.am
index ee37d10453..d0c0ee598f 100644
--- a/c/src/lib/libcpu/mips64orion/timer/Makefile.am
+++ b/c/src/lib/libcpu/mips64orion/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/Makefile.am b/c/src/lib/libcpu/powerpc/Makefile.am
index e8fc76d85e..9f82006795 100644
--- a/c/src/lib/libcpu/powerpc/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/Makefile.am
@@ -1,14 +1,14 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-## Check configure.in for conditions to set the conditionals below
+## Check configure.in for conditions to set the conditionals below
if shared
SHARED_LIB = shared
-endif
+endif
if mpc505
CPU_SUBDIR = mpc505
diff --git a/c/src/lib/libcpu/powerpc/mpc505/Makefile.am b/c/src/lib/libcpu/powerpc/mpc505/Makefile.am
index a482efa54f..37b11c93a3 100644
--- a/c/src/lib/libcpu/powerpc/mpc505/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc505/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am
index a8bfed1b4a..65edc98d9f 100644
--- a/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am
index 3b5aed6f7d..0f5a304686 100644
--- a/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am
@@ -1,12 +1,13 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-## FIXME
VPATH = @srcdir@:@srcdir@/../../ppc403/vectors
+## FIXME
+
PGM = ${ARCH}/vectors.rel
## Assembly sources
@@ -21,8 +22,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(vectors_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am
index 0cde1acc1e..c5452ae7a0 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am
index fb711f3414..7ac55df4a7 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -22,8 +22,6 @@ $(PROJECT_INCLUDE)/libcpu/%.h: %.h
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu \
$(PROJECT_INCLUDE)/libcpu/c_clock.h
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am
index e1aca735af..ea6b94b5b5 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -27,8 +27,6 @@ $(PROJECT_INCLUDE)/libcpu/%.h: %.h
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(exceptions_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am
index 0c3ee63743..c64da3def0 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -26,8 +26,6 @@ $(PROJECT_INCLUDE)/libcpu/%.h: %.h
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(mmu_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am
index a8bfed1b4a..65edc98d9f 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am
index 819c3a6c2b..36950229a9 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -9,9 +9,9 @@ PROC_SPECIFIC_O_FILES = exceptions mmu
GENERIC_FILES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x
-OBJS = $(foreach piece, $(PROC_SPECIFIC_O_FILES), \
- ../../mpc6xx/$(piece)/$(ARCH)/*.o) $(foreach piece, $(GENERIC_FILES), \
- ../../mpc6xx/$(piece)/$(ARCH)/*.o)
+OBJS = \
+ $(foreach piece, $(PROC_SPECIFIC_O_FILES), ../../mpc6xx/$(piece)/$(ARCH)/*.o) \
+ $(foreach piece, $(GENERIC_FILES), ../../mpc6xx/$(piece)/$(ARCH)/*.o)
LIB = $(ARCH)/libcpuspec.a
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
diff --git a/c/src/lib/libcpu/powerpc/mpc821/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/Makefile.am
index f5b09cdd4a..a5679c9061 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc821/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am
index 2ed74ad76f..f8b46ecc12 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am
index 279386ae5e..b0c900fc7c 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(console_generic_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c
index 325fcbf87d..f93022f142 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c
@@ -71,7 +71,6 @@ static volatile m821BufferDescriptor_t *RxBd[NIFACES], *TxBd[NIFACES];
*/
static int m821_get_brg_cd(int);
unsigned char m821_get_brg_clk(int);
-void m821_console_reserve_resources(rtems_configuration_table *);
unsigned char m821_get_brg_clk(int);
@@ -99,7 +98,7 @@ m821_get_brg_cd (int baud)
/* at any time since the OS started. It needs to be fixed. FIXME */
unsigned char m821_get_brg_clk(int baud)
{
- static short brg_spd[4];
+ static int brg_spd[4];
static char brg_used[4];
int i;
@@ -370,8 +369,8 @@ m821_smc_initialize (int port) /* port is the SMC number (i.e. 1 or 2) */
/*
* Put SMC in NMSI mode, connect SMC to BRG
*/
- m821.simode &= ~0x7000 << ((port-1) * 8);
- m821.simode |= brg << (12 + ((port-1) * 8));
+ m860.simode &= ~(0x7000 << ((port-1) * 16));
+ m860.simode |= brg << (12 + ((port-1) * 16));
/*
* Set up SMC1 parameter RAM common to all protocols
@@ -677,14 +676,6 @@ m821_buf_poll_write (int minor, char *buf, int len)
return 0;
}
-/*
- * This is needed in case we use TERMIOS
- */
-void m821_console_reserve_resources(rtems_configuration_table *configuration)
-{
- rtems_termios_reserve_resources (configuration, 1);
-}
-
void m821_console_initialize(void)
{
int i;
diff --git a/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am
index 2fad30df67..8a4dfbd74d 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am
@@ -1,15 +1,14 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
H_FILES = console.h mpc821.h
noinst_HEADERS = $(H_FILES)
-TMPINSTALL_FILES = \
-$(PROJECT_INCLUDE)/mpc821 \
-$(H_FILES:%=$(PROJECT_INCLUDE)/mpc821/%)
+TMPINSTALL_FILES += $(PROJECT_INCLUDE)/mpc821 \
+ $(H_FILES:%=$(PROJECT_INCLUDE)/mpc821/%)
$(PROJECT_INCLUDE)/mpc821:
$(mkinstalldirs) $@
@@ -17,6 +16,6 @@ $(PROJECT_INCLUDE)/mpc821:
$(PROJECT_INCLUDE)/mpc821/%.h: %.h
$(INSTALL_DATA) $< $@
-all-local: $(TMPINSTALL_FILES)
+all-local: $(TMPINSTALL_FILES)
include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am
index a8bfed1b4a..65edc98d9f 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am
index d82045bf32..8d8bce2c1d 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am
@@ -1,12 +1,13 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-## FIXME
VPATH = @srcdir@:@srcdir@/../../ppc403/vectors
+## FIXME
+
PGM = ${ARCH}/vectors.rel
## Assembly sources
@@ -21,8 +22,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(vectors_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc860/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/Makefile.am
index f5b09cdd4a..a5679c9061 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc860/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am
index 2ed74ad76f..f8b46ecc12 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am
index 279386ae5e..b0c900fc7c 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(console_generic_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
index e611b3bda8..76c1cb0314 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
@@ -74,7 +74,6 @@ static volatile m860BufferDescriptor_t *RxBd[NIFACES], *TxBd[NIFACES];
*/
static int m860_get_brg_cd(int);
unsigned char m860_get_brg_clk(int);
-void m860_console_reserve_resources(rtems_configuration_table *);
unsigned char m860_get_brg_clk(int);
@@ -102,8 +101,8 @@ m860_get_brg_cd (int baud)
/* at any time since the OS started. It needs to be fixed. FIXME */
unsigned char m860_get_brg_clk(int baud)
{
- static short brg_spd[4];
- static char brg_used[4];
+ static int brg_spd[4];
+ static char brg_used[4];
int i;
/* first try to find a BRG that is already at the right speed */
@@ -385,8 +384,8 @@ m860_smc_initialize (int port) /* port is the SMC number (i.e. 1 or 2) */
/*
* Put SMC in NMSI mode, connect SMC to BRG
*/
- m860.simode &= ~0x7000 << ((port-1) * 8);
- m860.simode |= brg << (12 + ((port-1) * 8));
+ m860.simode &= ~(0x7000 << ((port-1) * 16));
+ m860.simode |= brg << (12 + ((port-1) * 16));
/*
* Set up SMC1 parameter RAM common to all protocols
@@ -770,14 +769,6 @@ m860_buf_poll_write (int minor, char *buf, int len)
return 0;
}
-/*
- * This is needed in case we use TERMIOS
- */
-void m860_console_reserve_resources(rtems_configuration_table *configuration)
-{
- rtems_termios_reserve_resources (configuration, 1);
-}
-
void m860_console_initialize(void)
{
int i;
diff --git a/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am
index 4bd4d6d7b5..ebbb1a1e51 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -9,10 +9,9 @@ MPC860_H_FILES = console.h
noinst_HEADERS = $(H_FILES) $(MPC860_H_FILES)
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE)/mpc860 \
-$(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \
-$(MPC860_H_FILES:%.h=$(PROJECT_INCLUDE)/mpc860/%.h)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc860 \
+ $(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \
+ $(MPC860_H_FILES:%.h=$(PROJECT_INCLUDE)/mpc860/%.h)
$(PROJECT_INCLUDE)/mpc860:
$(mkinstalldirs) $@
@@ -23,6 +22,6 @@ $(PROJECT_INCLUDE)/%.h: %.h
$(PROJECT_INCLUDE)/mpc860/%.h: %.h
$(INSTALL_DATA) $< $@
-all-local: $(PREINSTALL_FILES)
+all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h b/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h
index 7daee45bf0..4a9c20f049 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h
+++ b/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h
@@ -112,8 +112,8 @@
* Memory controller registers
*/
typedef struct m860MEMCRegisters_ {
- rtems_unsigned32 br;
- rtems_unsigned32 or;
+ rtems_unsigned32 _br;
+ rtems_unsigned32 _or;
} m860MEMCRegisters_t;
/*
diff --git a/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am
index a8bfed1b4a..65edc98d9f 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am
index d82045bf32..8d8bce2c1d 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am
@@ -1,12 +1,13 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-## FIXME
VPATH = @srcdir@:@srcdir@/../../ppc403/vectors
+## FIXME
+
PGM = ${ARCH}/vectors.rel
## Assembly sources
@@ -21,8 +22,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(vectors_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am b/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am
index c3195b159d..1f4affe8f4 100644
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am
@@ -9,7 +9,7 @@ C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
ROOT_H_FILES =
RTEMS_SCORE_H_FILES = cpu.h c_isr.inl
-noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
+noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES)
S_FILES = cpu_asm.S
S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
@@ -21,11 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \
+ $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
+ $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
##TMPINSTALL_FILES += \
##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
@@ -55,10 +53,8 @@ all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
## all-local: $(ARCH)/rtems.o
all-local: $(TMPINSTALL_FILES)
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
+CLEANDIRS = ../o-optimize ../o-debug ../o-profile
-EXTRA_DIST = \
-$(C_FILES) $(S_FILES)
+EXTRA_DIST = $(C_FILES) $(S_FILES)
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S b/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S
index 76c8927305..400cccdf73 100644
--- a/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S
+++ b/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S
@@ -55,7 +55,9 @@
lis r11,_CPU_IRQ_info@ha
addi r11,r11,_CPU_IRQ_info@l
#endif
+#if ( PPC_USE_DATA_CACHE )
dcbt r0, r11
+#endif
stw r5, IP_CR(r1)
stw r6, IP_CTR(r1)
stw r7, IP_XER(r1)
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am b/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am
index afd66502eb..9629808140 100644
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am
@@ -19,14 +19,11 @@ S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../../../../automake/lib.am
-PREINSTALL_FILES = \
-$(PROJECT_INCLUDE) \
-$(PROJECT_INCLUDE)/rtems/score \
-$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
-$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
+PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \
+ $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \
+ $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
-TMPINSTALL_FILES += \
-$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o
$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o
$(INSTALL_DATA) $< $@
@@ -49,18 +46,12 @@ $(REL): $(C_O_FILES) $(S_O_FILES)
test -d ../$(ARCH) || mkdir ../$(ARCH)
$(make-rel)
-all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
-all-local: $(ARCH)/rtems.o
-all-local: $(TMPINSTALL_FILES)
+all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) $(ARCH)/rtems.o $(TMPINSTALL_FILES)
-clean-local:
- $(RM) -r ../o-optimize ../o-debug ../o-profile
+CLEANDIRS = ../o-optimize ../o-debug ../o-profile
UNUSED_FILES = irq_stub.S
-EXTRA_DIST = \
-TODO \
-rtems.S \
-$(C_FILES) $(S_FILES) $(UNUSED_FILES)
+EXTRA_DIST = TODO rtems.S $(C_FILES) $(S_FILES) $(UNUSED_FILES)
include $(top_srcdir)/../../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S b/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S
index 76c8927305..400cccdf73 100644
--- a/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S
+++ b/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S
@@ -55,7 +55,9 @@
lis r11,_CPU_IRQ_info@ha
addi r11,r11,_CPU_IRQ_info@l
#endif
+#if ( PPC_USE_DATA_CACHE )
dcbt r0, r11
+#endif
stw r5, IP_CR(r1)
stw r6, IP_CTR(r1)
stw r7, IP_XER(r1)
diff --git a/c/src/lib/libcpu/powerpc/ppc403/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/Makefile.am
index 78d893c980..bd55ab2ed0 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/ppc403/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am
index 2ed74ad76f..f8b46ecc12 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am
index 0dede804bf..4289321d14 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(console_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c b/c/src/lib/libcpu/powerpc/ppc403/console/console.c
index 11177c8a42..9313a9bc90 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c
@@ -404,16 +404,6 @@ spiInitialize(void)
***************
*/
-/*
- * Reserve resources consumed by this driver
- */
-void console_reserve_resources(
- rtems_configuration_table *configuration
-)
-{
- rtems_termios_reserve_resources (configuration, 1);
-}
-
/* console_initialize
*
* This routine initializes the console IO driver.
diff --git a/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am
index 7aa2278352..efefed93e9 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -24,8 +24,6 @@ $(PROJECT_INCLUDE)/%.h: %.h
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(ictrl_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am
index a8bfed1b4a..65edc98d9f 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am
index 65eb4ae728..ce95f92721 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(vectors_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/powerpc/shared/Makefile.am b/c/src/lib/libcpu/powerpc/shared/Makefile.am
index bc2d1d1ace..edbb18ae0c 100644
--- a/c/src/lib/libcpu/powerpc/shared/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/shared/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/powerpc/wrapup/Makefile.am b/c/src/lib/libcpu/powerpc/wrapup/Makefile.am
index 609b64bbfb..48af0f6dcb 100644
--- a/c/src/lib/libcpu/powerpc/wrapup/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -9,8 +9,8 @@ GENERIC_FILES = shared
# Use two variables so that I can make two ar command.
# So far FAMILY_OBJS is empty and ar dislike it...
CPU_SPECIFIC_OBJS = $(wildcard ../$(RTEMS_CPU_MODEL)/*/$(ARCH)/*.o)
-FAMILY_OBJS = $(wildcard ../shared/$(ARCH)/*.o ../shared/*/$(ARCH)/*.o \
- ../mpc6xx/*/$(ARCH)/*.o)
+FAMILY_OBJS = \
+ $(wildcard ../shared/$(ARCH)/*.o ../shared/*/$(ARCH)/*.o ../mpc6xx/*/$(ARCH)/*.o)
LIB = $(ARCH)/libcpu.a
diff --git a/c/src/lib/libcpu/sh/Makefile.am b/c/src/lib/libcpu/sh/Makefile.am
index f904c56993..8de599ce50 100644
--- a/c/src/lib/libcpu/sh/Makefile.am
+++ b/c/src/lib/libcpu/sh/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/sh/sh7032/Makefile.am b/c/src/lib/libcpu/sh/sh7032/Makefile.am
index 4817b67a71..ad159e941c 100644
--- a/c/src/lib/libcpu/sh/sh7032/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am b/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am
index 0f3042d757..10ae91df8f 100644
--- a/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS += $(CFLAGS_OS_V)
-
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am b/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am
index 5637116300..44ff144b86 100644
--- a/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7032/include/Makefile.am b/c/src/lib/libcpu/sh/sh7032/include/Makefile.am
index 72e931ea32..7d26513f10 100644
--- a/c/src/lib/libcpu/sh/sh7032/include/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/include/Makefile.am
@@ -1,12 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
H_FILES = null.h sci.h sh7_pfc.h sh7_sci.h
-# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
+# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
# file name conflicts
$(PROJECT_INCLUDE)/sh:
diff --git a/c/src/lib/libcpu/sh/sh7032/null/Makefile.am b/c/src/lib/libcpu/sh/sh7032/null/Makefile.am
index 67862acb20..2e6baea4a3 100644
--- a/c/src/lib/libcpu/sh/sh7032/null/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/null/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am b/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am
index d28034d8a8..aef7e13b3b 100644
--- a/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am b/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am
index b72f9ca03b..5a164c0d4c 100644
--- a/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7045/Makefile.am b/c/src/lib/libcpu/sh/sh7045/Makefile.am
index 77c3665b87..5452a07131 100644
--- a/c/src/lib/libcpu/sh/sh7045/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7045/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am b/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am
index 0f3042d757..10ae91df8f 100644
--- a/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS += $(CFLAGS_OS_V)
-
$(PGM): $(OBJS)
$(make-rel)
diff --git a/c/src/lib/libcpu/sh/sh7045/include/Makefile.am b/c/src/lib/libcpu/sh/sh7045/include/Makefile.am
index 7fb244b465..8a424d634f 100644
--- a/c/src/lib/libcpu/sh/sh7045/include/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7045/include/Makefile.am
@@ -1,12 +1,12 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
H_FILES = io_types.h null.h sci.h sh7_pfc.h sh7_sci.h
-# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
+# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
# file name conflicts
$(PROJECT_INCLUDE)/sh:
diff --git a/c/src/lib/libcpu/sh/sh7045/null/Makefile.am b/c/src/lib/libcpu/sh/sh7045/null/Makefile.am
index 67862acb20..2e6baea4a3 100644
--- a/c/src/lib/libcpu/sh/sh7045/null/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7045/null/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am b/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am
index d28034d8a8..aef7e13b3b 100644
--- a/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sh/sh7045/sci/sci.c b/c/src/lib/libcpu/sh/sh7045/sci/sci.c
index 9acddbde9b..5cfef8a585 100644
--- a/c/src/lib/libcpu/sh/sh7045/sci/sci.c
+++ b/c/src/lib/libcpu/sh/sh7045/sci/sci.c
@@ -51,7 +51,7 @@
#include <rtems/score/iosh7045.h>
#include <sh/sh7_sci.h>
#include <sh/sh7_pfc.h>
-/* #include <sh/io_types.h> */
+
#include <sh/sci.h>
#ifndef STANDALONE_EVB
@@ -330,18 +330,18 @@ rtems_device_driver sh_sci_open(
return RTEMS_SUCCESSFUL ;
}
- /* enable I/O pins */
+ /* set PFC registers to enable I/O pins */
if ((minor == 0) && (STANDALONE_EVB == 1)) {
- temp16 = read16(PFC_PACRL2) & /* disable SCK0, Tx0, Rx0 */
- ~(PA2MD1 | PA2MD0 | PA1MD0 | PA0MD0);
- temp16 |= (PA_TXD0 | PA_RXD0); /* assign pins for Tx0, Rx0 */
+ temp16 = read16(PFC_PACRL2); /* disable SCK0, DMA, IRQ */
+ temp16 &= ~(PA2MD1 | PA2MD0);
+ temp16 |= (PA_TXD0 | PA_RXD0); /* enable pins for Tx0, Rx0 */
write16(temp16, PFC_PACRL2);
} else if (minor == 1) {
- temp16 = read16(PFC_PACRL2) & /* disable SCK1, Tx1, Rx1 */
- ~(PA5MD1 | PA5MD0 | PA4MD0 | PA3MD0);
- temp16 |= (PA_TXD1 | PA_RXD1); /* assign pins for Tx1, Rx1 */
+ temp16 = read16(PFC_PACRL2); /* disable SCK1, DMA, IRQ */
+ temp16 &= ~(PA5MD1 | PA5MD0);
+ temp16 |= (PA_TXD1 | PA_RXD1); /* enable pins for Tx1, Rx1 */
write16(temp16, PFC_PACRL2);
} /* add other devices and pins as req'd. */
@@ -349,16 +349,23 @@ rtems_device_driver sh_sci_open(
/* set up SCI registers */
if ((minor != 0) || (STANDALONE_EVB == 1)) {
write8(0x00, sci_device[minor].addr + SCI_SCR); /* Clear SCR */
- /* set SCR and BRR */
+ /* set SMR and BRR */
_sci_set_cflags( &sci_device[minor], sci_device[minor].cflags );
- for(a=0; a < 10000L; a++) { /* One-bit delay */
+ for(a=0; a < 10000L; a++) { /* Delay */
asm volatile ("nop");
}
write8((SCI_RE | SCI_TE), /* enable async. Tx and Rx */
sci_device[minor].addr + SCI_SCR);
temp8 = read8(sci_device[minor].addr + SCI_RDR); /* flush input */
+ /* Clear RDRF flag */
+ temp8= read8(sci_device[minor].addr + SCI_SSR) & ~SCI_RDRF;
+ write8(temp8, sci_device[minor].addr + SCI_SSR);
+ write8(0x00, sci_device[minor].addr + SCI_TDR); /* force output */
+ /* Clear the TDRE bit */
+ temp8 = read8(sci_device[minor].addr + SCI_SSR) & ~SCI_TDRE;
+ write8(temp8, sci_device[minor].addr + SCI_SSR);
/* add interrupt setup if required */
diff --git a/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am b/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am
index b72f9ca03b..5a164c0d4c 100644
--- a/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am
+++ b/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libcpu/sparc/Makefile.am b/c/src/lib/libcpu/sparc/Makefile.am
index 4c5ead3d5f..d89863901e 100644
--- a/c/src/lib/libcpu/sparc/Makefile.am
+++ b/c/src/lib/libcpu/sparc/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libcpu/sparc/reg_win/Makefile.am b/c/src/lib/libcpu/sparc/reg_win/Makefile.am
index 91a8f1feb1..00e28ec1da 100644
--- a/c/src/lib/libcpu/sparc/reg_win/Makefile.am
+++ b/c/src/lib/libcpu/sparc/reg_win/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -16,8 +16,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(reg_win_rel_OBJECTS)
$(make-rel)
diff --git a/c/src/lib/libcpu/sparc/syscall/Makefile.am b/c/src/lib/libcpu/sparc/syscall/Makefile.am
index e0246b2829..7dc41907bf 100644
--- a/c/src/lib/libcpu/sparc/syscall/Makefile.am
+++ b/c/src/lib/libcpu/sparc/syscall/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -20,8 +20,6 @@ include $(top_srcdir)/../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
-AM_CFLAGS = $(CFLAGS_OS_V)
-
$(PGM): $(syscall_rel_OBJECTS)
$(make-rel)