This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Rattler - safer initialization


Avoid some dangerous hardware setups for programs that use RedBoot
(normal "user" programs)

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: hal/powerpc/rattler/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/rattler/current/ChangeLog,v
retrieving revision 1.4
diff -u -5 -p -r1.4 ChangeLog
--- hal/powerpc/rattler/current/ChangeLog	3 Sep 2003 12:58:17 -0000	1.4
+++ hal/powerpc/rattler/current/ChangeLog	8 Sep 2003 17:54:29 -0000
@@ -1,5 +1,13 @@
+2003-09-08  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/hal_aux.c (hal_platform_init): Avoid performing some hardware
+	initialization for "user" programs (those that are assuming the
+	presence of a working ROM monitor).  These initializations caused
+	the monitor (RedBoot) to get totally lost, especiall when connected
+	to GDB via ethernet.
+
 2003-09-02  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/hal_aux.c (_rattler_reset): Try to be more careful when
 	resetting the board - sometimes PCI vanished when this was done.
 
Index: hal/powerpc/rattler/current/src/hal_aux.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/rattler/current/src/hal_aux.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 hal_aux.c
--- hal/powerpc/rattler/current/src/hal_aux.c	3 Sep 2003 12:58:17 -0000	1.3
+++ hal/powerpc/rattler/current/src/hal_aux.c	8 Sep 2003 17:46:30 -0000
@@ -112,10 +112,11 @@ CYGARC_MEMDESC_TABLE CYGBLD_ATTRIB_WEAK 
 //--------------------------------------------------------------------------
 // Platform init code.
 void
 hal_platform_init(void)
 {
+#ifndef CYGSEM_HAL_USE_ROM_MONITOR
     volatile t_PQ2IMM  *IMM = (volatile t_PQ2IMM *)CYGARC_IMM_BASE;
     cyg_bool old_board_layout = *(unsigned long *)0xFE0000FC == 0;
 
     // Configure the I/O pins used by this board
     //   + = PARx = 0, PSORx = 0, PDIRx = 0
@@ -366,14 +367,16 @@ hal_platform_init(void)
     // Mux for SMCx
     // --01 --01
     //   xx                                     SMC1 - clock on BRG7
     //        xx                                SMC2 - clock on BRG8
     IMM->cpm_mux_cmxsmr = 0x11;
+#endif // CYGSEM_HAL_USE_ROM_MONITOR
     
     // Start up system I/O
     hal_if_init();
 
+#ifndef CYGSEM_HAL_USE_ROM_MONITOR
 #ifdef CYGHWR_HAL_POWERPC_RATTLER_PCI
     if ((IMM->clocks_sccr & 0x100) != 0) {
         CYG_WORD16 pci_cfg;
 
         HAL_WRITE_UINT32LE(&IMM->pci_cfg_addr, 0x80000004);
@@ -396,10 +399,11 @@ hal_platform_init(void)
         HAL_READ_UINT16LE(&IMM->pci_cfg_data, pci_cfg);
     } else {
         diag_printf("*** Warning: PCI not responding - SCCR: %x\n", IMM->clocks_sccr);
     }
 #endif
+#endif // CYGSEM_HAL_USE_ROM_MONITOR
 }
 
 //
 // Cause the platform to reset
 //

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]