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

PPC HAL reorganization


Hi there!

With the next available CVS snapshot (preliminary 1.3.1) comes a major
reorganization of the exception handling in the PPC HAL. The change is
_not_ backwards compatible, so be sure to update all stub ROMs if you
plan to use these new sources. Also, be prepared to revert to the old
stub ROMs if you need to load/debug old binaries, as the new stubs
cannot deal with them.

This is a bit of reasoning on the change which is from the vectors.S
file:

#===========================================================================
#
#       The PowerPC exception handling has changed as of version 1.3.1.
#       The primary motivation for rewriting the code was to bring it more
#       in line with the other HALs, in particular to allow a RAM application
#       to cleanly take over only a subset of vectors from a running ROM
#	monitor.
#
#       GDB stubs (and CygMon, should it be ported to PPC) copies
#       exception vector entry handler code to address 0. These vector entry
#       handlers (defined by the exception_vector macro below) compute
#       a vector index into the hal_vsr_table, fetch the pointer, and
#       jump to the HAL vector service routine (VSR).
#
#       The hal_vsr_table is located immediately after the vector
#       handlers (at address 0x3000), allowing RAM applications to
#       change VSRs as necessary, while still keeping desired ROM
#       monitor functionality available for debugging.
#
#       ROM applications can still be configured to leave the vector entry
#       handlers at 0xff000000, but there is at the moment no
#       provision for reclaiming the reserved vector space in RAM to
#       application usage.
#
#       RAM applications can also be configured to provide exception
#       handlers which are copied to address 0 on startup, thus taking
#       full control of the target.
#
#
#       Default configuration is for RAM applications to rely on an
#       existing ROM monitor to provide debugging functionality, and
#       for ROM applications to copy vectors to address 0.
#
#
#       Unfortunately the new exception scheme is not compatible with the
#       old scheme. Stubs and applications must be compiled using the same
#       scheme (i.e., old binaries will not run with new stubs, and new
#       binaries will not run with old stubs).
#
#===========================================================================



All PPC HALs have been updated to match the change, even the FADS
HAL. However, as we don't have access to (or actively support) FADS
boards, the HAL for this platform may have been broken by the changes.

When configuring for the FADS, it's important to ensure that
CYGSEM_HAL_USE_ROM_MONITOR in the new pkgconf/hal_powerpc_mpc8xx.h
header gets disabled.




I'll try to take the time to ensure the STUBS_config files are
up-to-date for easy rebuilding of stubs.

Jesper

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