From 2365488eeb2fda1853a3ed4ac769373498c39c2d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 22 Sep 2000 20:33:08 +0000 Subject: 2000-09-22 Joel Sherrill * start/crt0.S: Renamed to start/start.S. * start/start.S: Formerly start/crt0.S. * startup/linkcmds: New file. GNU linker script that is not correct for the target board but links programs. * bsp_specs: Use linkcmds. * include/Makefile.am, start/Makefile.am startup/Makefile.am: Now work. * startup/bspstart.c, startup/setvec.c: "#if 0"'ed out references to reoutines in assembly that are in turn "#if 0"'ed out. --- c/src/lib/libbsp/a29k/portsw/ChangeLog | 12 + c/src/lib/libbsp/a29k/portsw/bsp_specs | 2 +- c/src/lib/libbsp/a29k/portsw/include/Makefile.am | 4 +- c/src/lib/libbsp/a29k/portsw/start/Makefile.am | 4 +- c/src/lib/libbsp/a29k/portsw/start/crt0.S | 288 ---------------------- c/src/lib/libbsp/a29k/portsw/start/start.S | 292 +++++++++++++++++++++++ c/src/lib/libbsp/a29k/portsw/startup/Makefile.am | 4 + c/src/lib/libbsp/a29k/portsw/startup/bspstart.c | 13 + c/src/lib/libbsp/a29k/portsw/startup/linkcmds | 34 +++ c/src/lib/libbsp/a29k/portsw/startup/setvec.c | 5 + 10 files changed, 365 insertions(+), 293 deletions(-) delete mode 100644 c/src/lib/libbsp/a29k/portsw/start/crt0.S create mode 100644 c/src/lib/libbsp/a29k/portsw/start/start.S create mode 100644 c/src/lib/libbsp/a29k/portsw/startup/linkcmds (limited to 'c') diff --git a/c/src/lib/libbsp/a29k/portsw/ChangeLog b/c/src/lib/libbsp/a29k/portsw/ChangeLog index c1d21637dc..02a3016909 100644 --- a/c/src/lib/libbsp/a29k/portsw/ChangeLog +++ b/c/src/lib/libbsp/a29k/portsw/ChangeLog @@ -1,3 +1,15 @@ +2000-09-22 Joel Sherrill + + * start/crt0.S: Renamed to start/start.S. + * start/start.S: Formerly start/crt0.S. + * startup/linkcmds: New file. GNU linker script that is not + correct for the target board but links programs. + * bsp_specs: Use linkcmds. + * include/Makefile.am, start/Makefile.am startup/Makefile.am: + Now work. + * startup/bspstart.c, startup/setvec.c: "#if 0"'ed out references + to reoutines in assembly that are in turn "#if 0"'ed out. + 2000-09-04 Ralf Corsepius * console/Makefile.am, shmsupp/Makefile.am, start/Makefile.am, diff --git a/c/src/lib/libbsp/a29k/portsw/bsp_specs b/c/src/lib/libbsp/a29k/portsw/bsp_specs index 9930dbc26b..02371f113f 100644 --- a/c/src/lib/libbsp/a29k/portsw/bsp_specs +++ b/c/src/lib/libbsp/a29k/portsw/bsp_specs @@ -16,7 +16,7 @@ *startfile: %{!qrtems: %(old_startfile)} \ -%{qrtems: %{qrtems_debug: crt0_g.o%s} %{!qrtems_debug: crt0.o%s}} +%{qrtems: %{qrtems_debug: start_g.o%s} %{!qrtems_debug: start.o%s}} *link: %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start} diff --git a/c/src/lib/libbsp/a29k/portsw/include/Makefile.am b/c/src/lib/libbsp/a29k/portsw/include/Makefile.am index aa21a7b155..534884ac59 100644 --- a/c/src/lib/libbsp/a29k/portsw/include/Makefile.am +++ b/c/src/lib/libbsp/a29k/portsw/include/Makefile.am @@ -7,9 +7,9 @@ AUTOMAKE_OPTIONS = foreign 1.4 H_FILES = bsp.h ../../../shared/include/coverhd.h $(PROJECT_INCLUDE): - @$(mkinstalldirs) $@ + $(mkinstalldirs) $@ -$(PROJECT_INCLUDE)/bsp.h: bsp.h +$(PROJECT_INCLUDE)/%.h: %.h $(INSTALL_DATA) $< $@ $(PROJECT_INCLUDE)/coverhd.h: ../../../shared/include/coverhd.h diff --git a/c/src/lib/libbsp/a29k/portsw/start/Makefile.am b/c/src/lib/libbsp/a29k/portsw/start/Makefile.am index fd906a3f01..8f9da33897 100644 --- a/c/src/lib/libbsp/a29k/portsw/start/Makefile.am +++ b/c/src/lib/libbsp/a29k/portsw/start/Makefile.am @@ -6,7 +6,7 @@ AUTOMAKE_OPTIONS = foreign 1.4 PGM = $(ARCH)/start.o -S_FILES = crt0.S register.S +S_FILES = start.S register.S S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o) OBJS = $(S_O_FILES) @@ -28,6 +28,6 @@ all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES) .PRECIOUS: $(PGM) -EXTRA_DIST = amd.ah crt0.S pswmacro.ah register.S register.ah +EXTRA_DIST = amd.ah start.S pswmacro.ah register.S register.ah include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/a29k/portsw/start/crt0.S b/c/src/lib/libbsp/a29k/portsw/start/crt0.S deleted file mode 100644 index 017f2d4cca..0000000000 --- a/c/src/lib/libbsp/a29k/portsw/start/crt0.S +++ /dev/null @@ -1,288 +0,0 @@ -; @(#)crt0.s 1.3 96/05/31 14:40:27, AMD -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc. -; -; This software is the property of Advanced Micro Devices, Inc (AMD) which -; specifically grants the user the right to modify, use and distribute this -; software provided this notice is not removed or altered. All other rights -; are reserved by AMD. -; -; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS -; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL -; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR -; USE OF THIS SOFTWARE. -; -; So that all may benefit from your experience, please report any problems -; or suggestions about this software to the 29K Technical Support Center at -; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or -; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118. -; -; Advanced Micro Devices, Inc. -; 29K Support Products -; Mail Stop 573 -; 5900 E. Ben White Blvd. -; Austin, TX 78741 -; 800-292-9263 -; -; /* $Id$ */ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - .file "crt0.s" - -; crt0.s version 3.3-0 -; -; This module gets control from the OS. -; It saves away the Am29027 Mode register settings and -; then sets up the pointers to the resident spill and fill -; trap handlers. It then establishes argv and argc for passing -; to main. It then calls _main. If main returns, it calls _exit. -; -; void = start( ); -; NOTE - not C callable (no lead underscore) -; - .include "sysmac.h" -; -; - .extern V_SPILL, V_FILL -; .comm __29027Mode, 8 ; A shadow of the mode register - .comm __LibInit, 4 - - .text - .extern _main, _exit, _atexit - - .word 0 ; Terminating tag word - .global start -start: - sub gr1, gr1, 6 * 4 - asgeu V_SPILL, gr1, rab ; better not ever happen - add lr1, gr1, 6 * 4 - -; -; Save the initial value of the Am29027's Mode register -; -; If your system does not enter crt0 with value for Am29027's Mode -; register in gr96 and gr97, and also the coprocessor is active -; uncomment the next 4 instructions. -; -; const gr96, 0xfc00820 -; consth gr96, 0xfc00820 -; const gr97, 0x1375 -; store 1, 3, gr96, gr97 -; -; const gr98, __29027Mode -; consth gr98, __29027Mode -; store 0, 0, gr96, gr98 -; add gr98, gr98, 4 -; store 0, 0, gr97, gr98 -; -; Now call the system to setup the spill and fill trap handlers -; - const lr3, spill - consth lr3, spill - const lr2, V_SPILL - syscall setvec - const lr3, fill - consth lr3, fill - const lr2, V_FILL - syscall setvec - -; -; atexit(_fini) -; -; const lr0, _atexit -; consth lr0, _atexit -; const lr2,__fini -; calli lr0,lr0 -; consth lr2,__fini -; -; Now call _init -; -; const lr0, __init -; consth lr0, __init -; calli lr0,lr0 -; nop - -; -; Get the argv base address and calculate argc. -; - syscall getargs - add lr3, v0, 0 ; argv - add lr4, v0, 0 - constn lr2, -1 -argcloop: ; scan for NULL terminator - load 0, 0, gr97, lr4 - add lr4, lr4, 4 - cpeq gr97, gr97, 0 - jmpf gr97, argcloop - add lr2, lr2, 1 -; -; Now call LibInit, if there is one. To aid runtime libraries -; that need to do some startup initialization, we have created -; a bss variable called LibInit. If the library doesn't need -; any run-time initialization, the variable is still 0. If the -; library does need run-time initialization, the library will -; contain a definition like -; void (*_LibInit)(void) = LibInitFunction; -; The linker will match up our bss LibInit with this data LibInit -; and the variable will not be 0. This results in the LibInit routine -; being called via the calli instruction below. -; - const lr0, __LibInit - consth lr0, __LibInit - load 0, 0, lr0, lr0 - cpeq gr96, lr0, 0 - jmpt gr96, NoLibInit - nop - calli lr0, lr0 - nop -NoLibInit: - -; -; Call RAMInit to initialize the data memory. -; -; The following code segment was used to create the two flavors of the -; run-time initialization routines (crt0_1.o, and crt0_2.o) as described -; in the User's Manual. If osboot is used to create a stand-alone -; application, or the call to RAMInit is made in the start-up routine, -; then the following is not needed. -; -; .ifdef ROM_LOAD -; .extern RAMInit -; -; const lr0, RAMInit -; consth lr0, RAMInit -; calli gr96, lr0 -; nop -; .else -; nop -; nop -; nop -; nop -; .endif - -; -; Uncomment the following .comm, if you ARE NOT using osboot as released -; with the High C 29K product, AND plan to use the romcoff utility to -; move code and/or data sections to ROM. -; -; .comm RAMInit, 4 -; -; Furthermore, if the above is uncommented, then use the following logic -; to call the RAMInit function, if needed. -; -; const lr0, RAMInit -; consth lr0, RAMInit -; load 0, 0, gr96, lr0 -; cpeq gr96, gr96, 0 ; nothing there? -; jmpt gr96, endRAMInit ; yes, nothing to init -; nop -; calli gr96, lr0 ; no, then instruction found -; nop ; execute function. -; - - -; -; call main, passing it 2 arguments. main( argc, argv ) -; - const lr0, _main - consth lr0, _main - calli lr0, lr0 - nop -; -; call exit -; - const lr0, _exit - consth lr0, _exit - calli lr0, lr0 - add lr2, gr96, 0 -; -; Should never get here, but just in case -; -loop: - syscall exit - jmp loop - nop - .sbttl "Spill and Fill trap handlers" - .eject -; -; SPILL, FILL trap handlers -; -; Note that these Spill and Fill trap handlers allow the OS to -; assume that the only registers of use are between gr1 and rfb. -; Therefore, if the OS desires to, it may simply preserve from -; lr0 for (rfb-gr1)/4 registers when doing a context save. -; -; -; Here is the spill handler -; -; spill registers from [*gr1..*rab) -; and move rab downto where gr1 points -; -; rab must change before rfb for signals to work -; -; On entry: rfb - rab = windowsize, gr1 < rab -; Near the end: rfb - rab > windowsize, gr1 == rab -; On exit: rfb - rab = windowsize, gr1 == rab -; - .global spill -spill: - sub tav, rab, gr1 ; tav = number of bytes to spill - srl tav, tav, 2 ; change byte count to word count - sub tav, tav, 1 ; make count zero based - mtsr CR, tav ; set Count Remaining register - sub tav, rab, gr1 - sub tav, rfb, tav ; pull down free bound and save it in rab - add rab, gr1, 0 ; first pull down allocate bound - storem 0, 0, lr0, tav ; store lr0..lr(tav) into rfb - jmpi tpc ; return... - add rfb, tav, 0 -; -; Here is the fill handler -; -; fill registers from [*rfb..*lr1) -; and move rfb upto where lr1 points. -; -; rab must change before rfb for signals to work -; -; On entry: rfb - rab = windowsize, lr1 > rfb -; Near the end: rfb - rab < windowsize, lr1 == rab + windowsize -; On exit: rfb - rab = windowsize, lr1 == rfb -; - .global fill -fill: - const tav, 0x80 << 2 - or tav, tav, rfb ; tav = ((rfb>>2) | 0x80)<<2 == [rfb]<<2 - mtsr IPA, tav ; ipa = [rfb]<<2 == 1st reg to fill - ; gr0 is now the first reg to fill - sub tav, lr1, rfb ; tav = number of bytes to fill - add rab, rab, tav ; push up allocate bound - srl tav, tav, 2 ; change byte count to word count - sub tav, tav, 1 ; make count zero based - mtsr CR, tav ; set Count Remaining register - loadm 0, 0, gr0, rfb ; load registers - jmpi tpc ; return... - add rfb, lr1, 0 ; ... first pushing up free bound - -; -; The __init function -; -; .sect .init,text -; .use .init -; .global __init -;__init: -; sub gr1,gr1,16 -; asgeu V_SPILL,gr1,gr126 -; add lr1,gr1,24 -; -; -; The __fini function -; -; .sect .fini,text -; .use .fini -; .global __fini -;__fini: -; sub gr1,gr1,16 -; asgeu V_SPILL,gr1,gr126 -; add lr1,gr1,24 -; - .end diff --git a/c/src/lib/libbsp/a29k/portsw/start/start.S b/c/src/lib/libbsp/a29k/portsw/start/start.S new file mode 100644 index 0000000000..7545b09d56 --- /dev/null +++ b/c/src/lib/libbsp/a29k/portsw/start/start.S @@ -0,0 +1,292 @@ +; @(#)crt0.s 1.3 96/05/31 14:40:27, AMD +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc. +; +; This software is the property of Advanced Micro Devices, Inc (AMD) which +; specifically grants the user the right to modify, use and distribute this +; software provided this notice is not removed or altered. All other rights +; are reserved by AMD. +; +; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS +; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL +; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR +; USE OF THIS SOFTWARE. +; +; So that all may benefit from your experience, please report any problems +; or suggestions about this software to the 29K Technical Support Center at +; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or +; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118. +; +; Advanced Micro Devices, Inc. +; 29K Support Products +; Mail Stop 573 +; 5900 E. Ben White Blvd. +; Austin, TX 78741 +; 800-292-9263 +; +; /* $Id$ */ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + .file "crt0.s" + +; crt0.s version 3.3-0 +; +; This module gets control from the OS. +; It saves away the Am29027 Mode register settings and +; then sets up the pointers to the resident spill and fill +; trap handlers. It then establishes argv and argc for passing +; to main. It then calls _main. If main returns, it calls _exit. +; +; void = start( ); +; NOTE - not C callable (no lead underscore) +; +#if 0 +#include +#endif +; +; + .extern V_SPILL, V_FILL +; .comm __29027Mode, 8 ; A shadow of the mode register + .comm __LibInit, 4 + + .text + .extern _main, _exit, _atexit + + .word 0 ; Terminating tag word + .global start +start: +#if 0 + sub gr1, gr1, 6 * 4 + asgeu V_SPILL, gr1, rab ; better not ever happen + add lr1, gr1, 6 * 4 + +; +; Save the initial value of the Am29027 Mode register +; +; If your system does not enter crt0 with value for Am29027 Mode +; register in gr96 and gr97, and also the coprocessor is active +; uncomment the next 4 instructions. +; +; const gr96, 0xfc00820 +; consth gr96, 0xfc00820 +; const gr97, 0x1375 +; store 1, 3, gr96, gr97 +; +; const gr98, __29027Mode +; consth gr98, __29027Mode +; store 0, 0, gr96, gr98 +; add gr98, gr98, 4 +; store 0, 0, gr97, gr98 +; +; Now call the system to setup the spill and fill trap handlers +; + const lr3, spill + consth lr3, spill + const lr2, V_SPILL + syscall setvec + const lr3, fill + consth lr3, fill + const lr2, V_FILL + syscall setvec + +; +; atexit(_fini) +; +; const lr0, _atexit +; consth lr0, _atexit +; const lr2,__fini +; calli lr0,lr0 +; consth lr2,__fini +; +; Now call _init +; +; const lr0, __init +; consth lr0, __init +; calli lr0,lr0 +; nop + +; +; Get the argv base address and calculate argc. +; + syscall getargs + add lr3, v0, 0 ; argv + add lr4, v0, 0 + constn lr2, -1 +argcloop: ; scan for NULL terminator + load 0, 0, gr97, lr4 + add lr4, lr4, 4 + cpeq gr97, gr97, 0 + jmpf gr97, argcloop + add lr2, lr2, 1 +; +; Now call LibInit, if there is one. To aid runtime libraries +; that need to do some startup initialization, we have created +; a bss variable called LibInit. If the library does not need +; any run-time initialization, the variable is still 0. If the +; library does need run-time initialization, the library will +; contain a definition like +; void (*_LibInit)(void) = LibInitFunction; +; The linker will match up our bss LibInit with this data LibInit +; and the variable will not be 0. This results in the LibInit routine +; being called via the calli instruction below. +; + const lr0, __LibInit + consth lr0, __LibInit + load 0, 0, lr0, lr0 + cpeq gr96, lr0, 0 + jmpt gr96, NoLibInit + nop + calli lr0, lr0 + nop +NoLibInit: + +; +; Call RAMInit to initialize the data memory. +; +; The following code segment was used to create the two flavors of the +; run-time initialization routines (crt0_1.o, and crt0_2.o) as described +; in the Users Manual. If osboot is used to create a stand-alone +; application, or the call to RAMInit is made in the start-up routine, +; then the following is not needed. +; +; .ifdef ROM_LOAD +; .extern RAMInit +; +; const lr0, RAMInit +; consth lr0, RAMInit +; calli gr96, lr0 +; nop +; .else +; nop +; nop +; nop +; nop +; .endif + +; +; Uncomment the following .comm, if you ARE NOT using osboot as released +; with the High C 29K product, AND plan to use the romcoff utility to +; move code and/or data sections to ROM. +; +; .comm RAMInit, 4 +; +; Furthermore, if the above is uncommented, then use the following logic +; to call the RAMInit function, if needed. +; +; const lr0, RAMInit +; consth lr0, RAMInit +; load 0, 0, gr96, lr0 +; cpeq gr96, gr96, 0 ; nothing there? +; jmpt gr96, endRAMInit ; yes, nothing to init +; nop +; calli gr96, lr0 ; no, then instruction found +; nop ; execute function. +; + + +; +; call main, passing it 2 arguments. main( argc, argv ) +; + const lr0, _main + consth lr0, _main + calli lr0, lr0 + nop +; +; call exit +; + const lr0, _exit + consth lr0, _exit + calli lr0, lr0 + add lr2, gr96, 0 +; +; Should never get here, but just in case +; +loop: + syscall exit + jmp loop + nop + .sbttl "Spill and Fill trap handlers" + .eject +; +; SPILL, FILL trap handlers +; +; Note that these Spill and Fill trap handlers allow the OS to +; assume that the only registers of use are between gr1 and rfb. +; Therefore, if the OS desires to, it may simply preserve from +; lr0 for (rfb-gr1)/4 registers when doing a context save. +; +; +; Here is the spill handler +; +; spill registers from [*gr1..*rab) +; and move rab downto where gr1 points +; +; rab must change before rfb for signals to work +; +; On entry: rfb - rab = windowsize, gr1 < rab +; Near the end: rfb - rab > windowsize, gr1 == rab +; On exit: rfb - rab = windowsize, gr1 == rab +; + .global spill +spill: + sub tav, rab, gr1 ; tav = number of bytes to spill + srl tav, tav, 2 ; change byte count to word count + sub tav, tav, 1 ; make count zero based + mtsr CR, tav ; set Count Remaining register + sub tav, rab, gr1 + sub tav, rfb, tav ; pull down free bound and save it in rab + add rab, gr1, 0 ; first pull down allocate bound + storem 0, 0, lr0, tav ; store lr0..lr(tav) into rfb + jmpi tpc ; return... + add rfb, tav, 0 +; +; Here is the fill handler +; +; fill registers from [*rfb..*lr1) +; and move rfb upto where lr1 points. +; +; rab must change before rfb for signals to work +; +; On entry: rfb - rab = windowsize, lr1 > rfb +; Near the end: rfb - rab < windowsize, lr1 == rab + windowsize +; On exit: rfb - rab = windowsize, lr1 == rfb +; + .global fill +fill: + const tav, 0x80 << 2 + or tav, tav, rfb ; tav = ((rfb>>2) | 0x80)<<2 == [rfb]<<2 + mtsr IPA, tav ; ipa = [rfb]<<2 == 1st reg to fill + ; gr0 is now the first reg to fill + sub tav, lr1, rfb ; tav = number of bytes to fill + add rab, rab, tav ; push up allocate bound + srl tav, tav, 2 ; change byte count to word count + sub tav, tav, 1 ; make count zero based + mtsr CR, tav ; set Count Remaining register + loadm 0, 0, gr0, rfb ; load registers + jmpi tpc ; return... + add rfb, lr1, 0 ; ... first pushing up free bound + +; +; The __init function +; +; .sect .init,text +; .use .init +; .global __init +;__init: +; sub gr1,gr1,16 +; asgeu V_SPILL,gr1,gr126 +; add lr1,gr1,24 +; +; +; The __fini function +; +; .sect .fini,text +; .use .fini +; .global __fini +;__fini: +; sub gr1,gr1,16 +; asgeu V_SPILL,gr1,gr126 +; add lr1,gr1,24 +; +#endif + .end diff --git a/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am b/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am index 799699fa2b..43ce70a1c1 100644 --- a/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am +++ b/c/src/lib/libbsp/a29k/portsw/startup/Makefile.am @@ -25,6 +25,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am $(PGM): $(OBJS) $(make-rel) +$(PROJECT_RELEASE)/lib/linkcmds: linkcmds + $(INSTALL_DATA) $< $@ + $(PROJECT_RELEASE)/lib/ramlink: ramlink $(INSTALL_DATA) $< $@ @@ -33,6 +36,7 @@ $(PROJECT_RELEASE)/lib/romlink: romlink # the .rel file built here will be put into libbsp.a by ../wrapup/Makefile TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/ramlink \ + $(PROJECT_RELEASE)/lib/linkcmds \ $(PROJECT_RELEASE)/lib/romlink all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES) diff --git a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c index 4e0eb131ba..819239cb3e 100644 --- a/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c +++ b/c/src/lib/libbsp/a29k/portsw/startup/bspstart.c @@ -76,7 +76,12 @@ void bsp_pretasking_hook(void) /* allocate all remaining memory to the heap */ do { heap_size -= HEAP_BLOCK_SIZE; +/* JRS just to link 9/22/2000 */ +#if 0 heap_start = _sysalloc( heap_size ); +#else + heap_start = 0; +#endif } while ( !heap_start ); if (!heap_start) @@ -128,7 +133,12 @@ int bsp_start( * not malloc'ed. It is just "pulled from the air". */ +/* JRS just to link 9/22/2000 */ +#if 0 BSP_Configuration.work_space_start = _sysalloc( BSP_Configuration.work_space_size + 512 ); +#else + BSP_Configuration.work_space_start = 0; +#endif if (!BSP_Configuration.work_space_start) rtems_fatal_error_occurred( BSP_Configuration.work_space_size ); @@ -142,6 +152,8 @@ int bsp_start( Cpu_table.postdriver_hook = bsp_postdriver_hook; Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; +/* JRS just to link 9/22/2000 */ +#if 0 _settrap( 109,&a29k_enable_sup); _settrap( 110,&a29k_disable_sup); _settrap( 111,&a29k_enable_all_sup); @@ -150,6 +162,7 @@ int bsp_start( _settrap( 107,&a29k_context_restore_sup); _settrap( 108,&a29k_context_save_sup); _settrap( 105,&a29k_sigdfl_sup); +#endif /* * Start RTEMS diff --git a/c/src/lib/libbsp/a29k/portsw/startup/linkcmds b/c/src/lib/libbsp/a29k/portsw/startup/linkcmds new file mode 100644 index 0000000000..09f24b6f9a --- /dev/null +++ b/c/src/lib/libbsp/a29k/portsw/startup/linkcmds @@ -0,0 +1,34 @@ +OUTPUT_FORMAT("coff-a29k-big") + SEARCH_DIR(/opt/a29k-rtems/a29k-rtems/lib); +SECTIONS +{ + .text : { + *(.text) + __etext = .; + __CTOR_LIST__ = .; + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + __CTOR_END__ = .; + __DTOR_LIST__ = .; + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + __DTOR_END__ = .; + *(.lit) + *(.shdata) + } + .shbss SIZEOF(.text) + ADDR(.text) : { + *(.shbss) + } + .data : { + *(.data) + __edata = .; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + *(COMMON) + __end = ALIGN(0x8); + } +} diff --git a/c/src/lib/libbsp/a29k/portsw/startup/setvec.c b/c/src/lib/libbsp/a29k/portsw/startup/setvec.c index f6b222d2d8..d2c68828da 100644 --- a/c/src/lib/libbsp/a29k/portsw/startup/setvec.c +++ b/c/src/lib/libbsp/a29k/portsw/startup/setvec.c @@ -41,7 +41,12 @@ no_cpu_isr_entry set_vector( /* returns old vector */ rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr ); else { /* XXX: install non-RTEMS ISR as "raw" interupt */ +/* JRS just to link 9/22/2000 */ +#if 0 _settrap( vector, handler ); +#else + ; +#endif } return previous_isr; } -- cgit v1.2.3