# HG changeset patch # User jlarmour # Date 1056427269 0 # Node ID 965fc7fbe135009d5c3ad9d1abcadd73e91b94fe # Parent c220ab07f5ed9d7a01d3e533ef1728ef4992db6d * 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. diff --git a/packages/hal/common/current/ChangeLog b/packages/hal/common/current/ChangeLog --- a/packages/hal/common/current/ChangeLog +++ b/packages/hal/common/current/ChangeLog @@ -1,3 +1,12 @@ +2003-06-24 Jonathan Larmour + + * 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 * src/hal_if.c (delay_us): Reorganized to cope with high frequency diff --git a/packages/hal/common/current/cdl/interrupts.cdl b/packages/hal/common/current/cdl/interrupts.cdl --- a/packages/hal/common/current/cdl/interrupts.cdl +++ b/packages/hal/common/current/cdl/interrupts.cdl @@ -76,7 +76,7 @@ cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_ 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 diff --git a/packages/hal/common/current/src/hal_if.c b/packages/hal/common/current/src/hal_if.c --- a/packages/hal/common/current/src/hal_if.c +++ b/packages/hal/common/current/src/hal_if.c @@ -11,6 +11,7 @@ // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. // Copyright (C) 2002 Gary Thomas // Copyright (C) 2003 Nick Garnett +// Copyright (C) 2003 Jonathan Larmour // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -254,7 +255,9 @@ 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 @@ -266,24 +269,10 @@ reset(void) #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 //------------------------------------ @@ -945,7 +934,6 @@ hal_if_init(void) // 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);