From 93afcff7b5360fa71616d789c4d34279309a24e9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 8 Jun 2021 09:21:30 +0200 Subject: bsps/sparc: Simplify memory initialization Directly initialize the memory in the start sequence defined by start.S instead of using a system initialization handler. This avoids using the global variable rdb_start which used a memory location which was shared with _ERC32_MEC_Timer_Control_Mirror. This change makes it possible to use _Memory_Allocate() even before the system initialization is started. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053. --- bsps/sparc/shared/start/start.S | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bsps/sparc/shared/start/start.S') diff --git a/bsps/sparc/shared/start/start.S b/bsps/sparc/shared/start/start.S index c22509b038..13c3cffc00 100644 --- a/bsps/sparc/shared/start/start.S +++ b/bsps/sparc/shared/start/start.S @@ -178,16 +178,10 @@ SYM(trap_table): MEC timer control register mirror is so we can stop the timers from an external debugger. It is needed because the control register is write-only. Trap 0x7C cannot occure in ERC32... - - We also use this location to store the last location of the - usable RAM in order not to overwrite the remote debugger with - the RTEMS work-space area. - */ - .global SYM(_ERC32_MEC_Timer_Control_Mirror), SYM(rdb_start), SYM(CLOCK_SPEED) + .global SYM(_ERC32_MEC_Timer_Control_Mirror), SYM(CLOCK_SPEED) -SYM(rdb_start): SYM(_ERC32_MEC_Timer_Control_Mirror): BAD_TRAP; BAD_TRAP; ! 7C - 7D undefined @@ -320,9 +314,6 @@ SYM(hard_reset): st %l7, [%l0] #endif - set SYM(rdb_start), %g5 ! End of RAM - st %o0, [%g5] - /* clear the bss */ sethi %hi(__bss_start), %g2 ! g2 = start of bss @@ -338,6 +329,9 @@ SYM(hard_reset): bleu,a .Lzerobss nop + call SYM(_SPARC_Memory_initialize) + nop ! o0 = end of usable RAM provided by the boot loader + call SYM(boot_card) ! does not return mov %g0, %o0 ! command line -- cgit v1.2.3