This is the mail archive of the ecos-bugs@sourceware.org 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]

[Bug 1001111] Access to saved registers from Cortex-M ISR


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001111

--- Comment #2 from John Dallaway <john@dallaway.org.uk> 2011-01-07 14:35:52 GMT ---
Nick, thanks for your comments.

(In reply to comment #1)

> The intention with the code as it was written is that if anything needs access
> to the interrupt state then it should enable the existing code that saves a
> full and complete CPU state and stores it in hal_saved_interrupt_state; either
> by defining the CTRLC support option or by new means. Interested code can then
> fetch it from there. That way this code is only included when this
> functionality is required.

I looked at hal_saved_interrupt_state, but it is declared only when the GDB
break/Ctrl-C support is enabled. So...

> The extra ISR argument is also a bad idea, it has
> caused problems in other architectures and my intention was to keep the
> Cortex-M architecture clean and not have it.
> 
> There is maybe a case for defining a CDL option that controls this piece of
> code and have that depend on CTRLC and BREAK support, as well as allowing it
> to be enabled by any other package.

I would like to propose a CYGINT_HAL_COMMON_SAVED_INTERRUPT_STATE_REQUIRED CDL
interface which controls the declaration of 'hal_saved_interrupt_state'. The
interface would be implemented by all of the following:

 * CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
 * CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
 * profiling CDL options within those HALs which make use of
      'hal_saved_interrupt_state' for profiling

Individual architecture HALs could then test for
CYGINT_HAL_COMMON_SAVED_INTERRUPT_STATE_REQUIRED > 0 to determine if it is
necessary to assign a value to 'hal_saved_interrupt_state'.

Other than the common HAL package, HAL packages would only require modification
if/when the use of 'hal_saved_interrupt_state' outside the context of GDB
Ctrl-C/break becomes necessary.

The advantage of a CDL interface over a CDL option in this context is that the
saved interrupt state support is automatically disabled when no-longer
required. eg When profiling was being used but is now disabled.

Again, any comments are welcome. I'll pick this up again next week.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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