changeset 311:a2194416fd7c

gsm-fw: preparations for ARM exception handling (DAR disabled for now)
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 17 Mar 2014 07:10:57 +0000
parents 083f262b7bbe
children f05ae34f7ca0
files gsm-fw/serial/debug.c gsm-fw/services/dar/dar_emergency.c gsm-fw/services/dar/dar_gbl_var.c
diffstat 3 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/serial/debug.c	Mon Mar 17 05:56:06 2014 +0000
+++ b/gsm-fw/serial/debug.c	Mon Mar 17 07:10:57 2014 +0000
@@ -28,6 +28,7 @@
 	}
 }
 
+#if 0
 freecalypso_lldbg_intinfo()
 {
 	char strbuf[128];
@@ -45,3 +46,4 @@
 	freecalypso_raw_dbgout("*In Nucleus idle loop");
 	freecalypso_lldbg_intinfo();
 }
+#endif
--- a/gsm-fw/services/dar/dar_emergency.c	Mon Mar 17 05:56:06 2014 +0000
+++ b/gsm-fw/services/dar/dar_emergency.c	Mon Mar 17 07:10:57 2014 +0000
@@ -558,7 +558,11 @@
 
    void dar_exception(int abort_type)
    {
-	/* TODO: emit low-level serial message */
+	static char msg[] = "*ARM EXCEPTION #?";
+
+	if (abort_type >= 0 && abort_type <= 9)
+		msg[16] = abort_type + '0';
+	freecalypso_raw_dbgout(msg);
 	while (1)
 		;
    } /* dar_exception */
--- a/gsm-fw/services/dar/dar_gbl_var.c	Mon Mar 17 05:56:06 2014 +0000
+++ b/gsm-fw/services/dar/dar_gbl_var.c	Mon Mar 17 07:10:57 2014 +0000
@@ -18,28 +18,34 @@
 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
 /****************************************************************************/
 
+#define	BSS_DAR	__attribute__ ((section ("ext.ram")))
+
+#include "../../riviera/rv/general.h"
+#include "../../riviera/rv/rv_general.h"
 #include "../../riviera/rv/rv_defined_swe.h"
+
 #ifdef RVM_DAR_SWE
-  
-   #include "../../riviera/rv/general.h"
-   #include "../../riviera/rv/rv_general.h"
+
    #include "dar_api.h"
    #include "dar_const_i.h"
 
    /**** Global variables ****/
    /* Buffer used to save some parameters before a reset */
-   UINT8    dar_recovery_buffer[DAR_RECOVERY_DATA_MAX_BUFFER_SIZE];
+   UINT8    dar_recovery_buffer[DAR_RECOVERY_DATA_MAX_BUFFER_SIZE] BSS_DAR;
   
    /* dar_current_status : to get the status of the system*/
-   T_DAR_RECOVERY_STATUS dar_current_status;
+   T_DAR_RECOVERY_STATUS dar_current_status BSS_DAR;
 
    /* dar_exception_status : to get the status of the exception */
-   UINT8    dar_exception_status;
+   UINT8    dar_exception_status BSS_DAR;
 
    /* Write buffer*/
-   char    dar_write_buffer[DAR_MAX_BUFFER_SIZE];
+   char    dar_write_buffer[DAR_MAX_BUFFER_SIZE] BSS_DAR;
 
    /* Ram buffer that contains the Debug Unit register */
-   UINT32  debug_RAM[DEBUG_UNIT_WORD_SIZE];
+   UINT32  debug_RAM[DEBUG_UNIT_WORD_SIZE] BSS_DAR;
 
 #endif /* #ifdef RVM_DAR_SWE */
+
+/* used to be in the linker script in TI's original */
+UINT32 xdump_buffer[38] BSS_DAR;