This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Tidy hal/common reset and int stack size
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: eCos Patches List <ecos-patches at sources dot redhat dot com>
- Date: Tue, 24 Jun 2003 05:00:35 +0100
- Subject: Tidy hal/common reset and int stack size
Trivial bits really, although I am removing kill_by_reset - nothing uses
it (it's a hangover from history) and it is included by default all the
time in the default config, so it's only bloat.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/common/current/ChangeLog,v
retrieving revision 1.93
diff -u -5 -p -r1.93 ChangeLog
--- ChangeLog 19 Jun 2003 18:27:00 -0000 1.93
+++ ChangeLog 24 Jun 2003 03:58:00 -0000
@@ -1,5 +1,14 @@
+2003-06-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/hal_if.c (hal_if_init): Remove kill_by_reset.
+ (kill_by_reset): Remove, unused.
+ (reset): ifdef test on HAL_PLATFORM_RESET and assert on reset failure.
+
+ * cdl/interrupts.cdl (CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE): No
+ reason to forbid people setting this quite small.
+
2003-06-19 Nick Garnett <nickg@balti.calivar.com>
* src/hal_if.c (delay_us): Reorganized to cope with high frequency
timers by eliminating a source of arithmetic overflow.
Index: src/hal_if.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/common/current/src/hal_if.c,v
retrieving revision 1.23
diff -u -5 -p -r1.23 hal_if.c
--- src/hal_if.c 19 Jun 2003 18:27:00 -0000 1.23
+++ src/hal_if.c 24 Jun 2003 03:58:00 -0000
@@ -252,11 +252,13 @@ static void
reset(void)
{
CYGARC_HAL_SAVE_GP();
// With luck, the platform defines some magic that will cause a hardware
// reset.
+#ifdef HAL_PLATFORM_RESET
HAL_PLATFORM_RESET();
+#endif
#ifdef HAL_PLATFORM_RESET_ENTRY
// If that's not the case (above is an empty statement) there may
// be defined an address we can jump to - and effectively
// reinitialize the system. Not quite as good as a reset, but it
@@ -264,28 +266,14 @@ reset(void)
goto *HAL_PLATFORM_RESET_ENTRY;
#else
#error " no RESET_ENTRY"
#endif
-
+ CYG_FAIL("Reset failed");
CYGARC_HAL_RESTORE_GP();
}
-// This is the system's default kill signal routine. Unless overridden
-// by the application, it will cause a board reset when GDB quits the
-// connection. (The user can avoid the reset by using the GDB 'detach'
-// command instead of 'kill' or 'quit').
-static int
-kill_by_reset(int __irq_nr, void* __regs)
-{
- CYGARC_HAL_SAVE_GP();
-
- reset();
-
- CYGARC_HAL_RESTORE_GP();
- return 0;
-}
#endif
//------------------------------------
// NOP service
#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE) || \
@@ -943,11 +931,10 @@ hal_if_init(void)
#endif
// Miscellaneous services with wrappers in this file.
#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET
CYGACC_CALL_IF_RESET_SET(reset);
- CYGACC_CALL_IF_KILL_VECTOR_SET(kill_by_reset);
#endif
#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US
CYGACC_CALL_IF_DELAY_US_SET(delay_us);
#endif
Index: cdl/interrupts.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/common/current/cdl/interrupts.cdl,v
retrieving revision 1.4
diff -u -5 -p -r1.4 interrupts.cdl
--- cdl/interrupts.cdl 23 May 2002 23:02:46 -0000 1.4
+++ cdl/interrupts.cdl 24 Jun 2003 03:58:00 -0000
@@ -74,11 +74,11 @@ cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_
# express a relationship like this.
cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE {
display "Interrupt stack size"
flavor data
default_value { CYGPKG_KERNEL ? 4096 : 32768 }
- legal_values 1024 to 1048576
+ legal_values 128 to 1048576
description "
This configuration option specifies the stack size in bytes
for the interrupt stack. Typically this should be a multiple
of 16, but the exact requirements will vary from architecture
to architecture. The interrupt stack serves two separate