Commit Graph

46 Commits

Author SHA1 Message Date
Sebastian Huber
e62721c4dd 2011-01-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* new-exceptions/bspsupport/ppc_exc_categories.c: Fixed e200 machine
	check category.
2011-01-10 12:00:27 +00:00
Sebastian Huber
4e9d8ea602 2010-12-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* new-exceptions/bspsupport/ppc_exc_address.c,
	new-exceptions/bspsupport/ppc_exc_initialize.c: Fixed IVOR handling for
	e200z0 and e200z1.
2010-12-29 10:48:08 +00:00
Sebastian Huber
644448f840 2010-12-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* shared/include/cpuIdent.c, shared/include/cpuIdent.h: Added support
	for e500v2.  Removed IVPR/IVOR/HWIVOR features since they are included
	in Book E.
	* new-exceptions/bspsupport/vectors.h,
	new-exceptions/bspsupport/ppc_exc.S,
	new-exceptions/bspsupport/ppc_exc_address.c,
	new-exceptions/bspsupport/ppc_exc_categories.c,
	new-exceptions/bspsupport/ppc_exc_initialize.c,
	new-exceptions/bspsupport/ppc_exc_prologue.c: Added support for
	e500v2.  Added exception vector defines for Book E types.  Removed
	e200 exception vector defines.  Added e500 exception vector defines.
	Unified IVOR calculation for e200 and e500 (e200z1 has hard wired
	IVOR values).
2010-12-29 09:51:18 +00:00
Sebastian Huber
b5919529db 2010-12-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
* new-exceptions/bspsupport/ppc_exc.S: Comment.
	* new-exceptions/bspsupport/ppc_exc_address.c: Fixed address
	calculation for e200z1 core.
2010-12-22 14:13:03 +00:00
Joel Sherrill
7814f92a5d 2010-07-30 Gedare Bloom <giddyup44@yahoo.com>
PR 1599/cpukit
	* new-exceptions/bspsupport/ppc_exc_hdl.c: Rename
	_Context_Switch_necessary to _Thread_Dispatch_necessary to more
	properly reflect the intent.
2010-07-30 18:51:43 +00:00
Jennifer Averett
d010b9d7cf 2010-06-29 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* new-exceptions/bspsupport/ppc_exc_asm_macros.h: Added include of
	bspopts to resolve compilation problem.
2010-06-29 19:44:06 +00:00
Joel Sherrill
5048a0a0b8 2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1573/cpukit
	* mpc5xx/irq/irq.c, mpc5xx/irq/irq_asm.S,
	new-exceptions/bspsupport/ppc_exc.S,
	new-exceptions/bspsupport/ppc_exc_asm_macros.h,
	new-exceptions/bspsupport/ppc_exc_hdl.c: Add a per cpu data structure
	which contains the information required by RTEMS for each CPU core.
	This encapsulates information such as thread executing, heir, idle
	and dispatch needed.
2010-06-29 00:39:39 +00:00
Thomas Doerfler
2931336963 changes to support GW_LCFM 2010-04-07 06:45:59 +00:00
Thomas Doerfler
8e46b093b5 Removed new-exceptions/bspsupport/ppc_exc_bspsupp.h 2009-12-14 14:51:50 +00:00
Till Straumann
c7f8408d31 2009-12-01 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/cpu.c, new-exceptions/cpu_asm.S,
	new-exceptions/bspsupport/ppc_exc_asm_macros.h,
	new-exceptions/bspsupport/ppc_exc_initialize.c,
	new-exceptions/bspsupport/vectors.h:
	Added AltiVec support (save/restore volatile vregs
	across exceptions).
2009-12-02 01:41:57 +00:00
Ralf Corsepius
359e537416 Whitespace removal. 2009-11-30 05:09:41 +00:00
Till Straumann
f70c86eaff 2009-11-17 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_categories.c:
	PSIM *must*not* hook SYS vector which is used e.g.,
	for firmware I/O.

	Added entries for AltiVec on PSIM.
2009-11-17 11:42:53 +00:00
Thomas Doerfler
f7ac681b51 remove depratated powerpc exception API 2009-10-30 13:52:34 +00:00
Thomas Doerfler
856cce5068 add new files for exception handler 2009-10-23 09:51:03 +00:00
Thomas Doerfler
2d2de4eba1 Update for exception support changes. 2009-10-23 07:32:46 +00:00
Ralf Corsepius
3144f90c4f 2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* new-exceptions/bspsupport/vectors_init.c: Remove duplicate
	defines DEAR_BOOKE, DEAR_405.
2009-10-22 12:22:12 +00:00
Jennifer Averett
3776348f52 2009-05-05 Jennifer Averett <jennifer.averett@OARcorp.com>
* mpc6xx/mmu/bat.c, new-exceptions/e500_raw_exc_init.c,
	new-exceptions/raw_exception.h, new-exceptions/bspsupport/irq_supp.h,
	shared/include/cpuIdent.c: Removed warnings. Split
	bsp_irq_dispatch_list to allow non-standard/non-existant pics to call
	with interrupts off.
2009-05-05 16:27:59 +00:00
Ralf Corsepius
39d08d55e9 Convert to "bool". 2008-09-06 17:36:55 +00:00
Joel Sherrill
b679966dc9 2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* mpc6xx/mmu/pte121.c, mpc6xx/mmu/pte121.h, mpc6xx/timer/timer.c,
	new-exceptions/e500_raw_exc_init.c,
	new-exceptions/bspsupport/ppc_exc_bspsupp.h,
	new-exceptions/bspsupport/vectors_init.c: Fix warnings.
2008-08-18 21:17:06 +00:00
Till Straumann
84a25d82ec 2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/vectors_init.c: added
	features to C_exception_handler() (the default global
	handler):
	 - try to catch recursion
	 - print info about context where the exception occurred
	   (ISR or task with task ID).
	 - suspend offending task rather than spinning forever.
2008-07-16 23:13:24 +00:00
Till Straumann
03542996dd 2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/vectors_init.c: must not
	align start of stack downwards (we don't 'own' memory
	below start). Instead, use original boundaries but
	align the stack pointer as required.

	Added test to verify that R13 was loaded with _SDA_BASE_
	during early initialization (low-level assembly code
	relies on it).
2008-07-16 23:10:55 +00:00
Till Straumann
5166513cf5 2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_asm_macros.h: Added
	a test to TEST_LOCK_crit so that a context switch is
	always prevented if MSR_CE is not set in the interrupt mask.
	(Support mode where the user wants to leave MSR_CE always enabled
	but abstains from calling OS primitives from the exception
	handler.)
2008-07-16 21:44:14 +00:00
Thomas Doerfler
3c6fe2e7f9 added haleakala BSP contributed by Michael Hamel 2008-07-14 08:46:06 +00:00
Thomas Doerfler
25a92bc1ed adapted powerpc exception code 2008-07-11 10:02:12 +00:00
Till Straumann
8bac4851a6 2008-07-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_asm_macros.S,
	new-exceptions/bspsupport/ppc_exc_bspsupp.h,
	new-exceptions/bspsupport/ppc_exc_hdl.c,
	new-exceptions/bspsupport/vectors_init.c:
	fixed and enabled stack-switching algorithm which figures out
	if we already run on the ISR stack rather than relying on the
	_ISR_Nest_level.

	Added 'ppc_exc_crit_always_enabled' variable which defines
	the semantics of critical interrupts. Added a test to
	TEST_LOCK_crit so that calling ppc_exc_wrapup() (and
	possibly the dispatcher) is always skipped if the BSP/user
	wants to leave critical interrupts always enabled (at the
	expense of having no OS support).

	changed TEST_LOCK_mchk so that asynchronous machine-check
	handlers never call ppc_exc_wrapup() (and the dispatcher).
	We don't want to disable MSR_ME ever (to avoid checkstops)
	and hence asynchronous MEs must not use OS services anyways.

	added and commented new variables 'ppc_exc_intr_stack_size'
	'ppc_exc_crit_always_enabled'.
2008-07-10 21:31:06 +00:00
Till Straumann
38f5e616fc 2008-07-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc.S: must disable
	interrupts prior to restoring SRRs (thanks to Sebastian Huber)
2008-07-10 21:29:27 +00:00
Till Straumann
055173d46a 2008-07-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/README: added more information
2008-07-10 21:28:38 +00:00
Till Straumann
8ac748c1bf 2008-05-14 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_bspsupp.h: added
	comment about the semantics of the return value of
	ppc_exc_handler_t.
2008-05-14 22:34:06 +00:00
Till Straumann
21637fd380 2008-05-14 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/irq.c: moved malloc/free
	outside of irq-protected critical section.
2008-05-14 22:33:32 +00:00
Till Straumann
d56c6783e5 2008-03-20 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/irq.c: don't disable irqs
	at the interrupt controller (PIC) during initialization -- this
	caused problems where some BSPs's BSP_disable_irq_at_pic() routine
	did not ignore IRQ lines associated with cascaded PICs.
	Rely on the BSP (BSP_setup_the_pic()) to provide a good
	initial setup.
2008-03-20 19:08:52 +00:00
Till Straumann
35506215c9 2008-03-13 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_asm_macros.h,
	new-exceptions/bspsupport/ppc_exc.S,
	new-exceptions/bspsupport/README,
	new-exceptions/bspsupport/ppc_exc_hdl.c:
	Thomas Doerfler clarified (thanks!) that raising an
	exception and executing the 1st instruction is not
	an atomical operation. I added a fix to the code that
	checks if a lower-priority interrupt is under way:
	we now not only test if the 'lock' variable was set
	but also check if the interrupted PC points to the
	'write lock' instruction.
	Added more comments and updated README.
2008-03-13 19:28:33 +00:00
Till Straumann
d0014c7545 2008-03-11 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_asm_macros.h: bugfix;
	need to crand not cror when testing lower priority locks
	during machine-check handling.
2008-03-12 05:17:13 +00:00
Till Straumann
ed5c4bd04f 2008-03-05 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_asm_macros.h: bugfix;
	need to andc with irq mask when disabling interrupts.
2008-03-06 00:16:52 +00:00
Till Straumann
bc0ff4737c 2008-01-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/irq.c: When unhooking
	and ISR only disable IRQs at the PIC if we are
	unhooking the last ISR.
2008-01-10 18:25:47 +00:00
Till Straumann
aea55715cd 2007-12-11 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am, new-exceptions/bspsupport/README:
	provide new irq_bspsupport.rel which was
	split out of exc_bspsupport.rel to provide finer-grained
	control over what BSPs want to use.
2007-12-12 00:48:54 +00:00
Till Straumann
8d2487fd60 2007-12-11 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/irq.c: enable/disable
	irq at PIC if an initial handler is present/absent
	(reproduce traditional semantics).
2007-12-12 00:47:49 +00:00
Till Straumann
d436f8c83d 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/vectors_init.c: beautification.
2007-12-11 07:32:10 +00:00
Till Straumann
4dd7d3d268 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c, new_exceptions/raw_exception.h,
	new_exceptions/bspsupport/irq.c: renamed ASM_BOOKE_PIT_VECTOR
	to ASM_BOOKE_DEC_VECTOR to be closer to 'official'
	nomenclature.
2007-12-11 07:30:52 +00:00
Till Straumann
b8982b581b 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_test.c: fixed
	wrong type in argument (signed vs. unsigned)
	compiler warning.
2007-12-11 06:35:54 +00:00
Till Straumann
bbb50590b2 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/nested_irq_test.c: adjusted
	wrong irq name/number calculation.
2007-12-11 05:21:12 +00:00
Till Straumann
f328b69076 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_hdl.c: make sure
	RI is set in the exception frame and panic if it isn't
	(state info might have been lost). This only affects
	classic PPC.
2007-12-11 05:19:55 +00:00
Till Straumann
59a4066e01 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/README,
	new-exceptions/bspsupport/ppc_exc_bspsupp.h
	new-exceptions/bspsupport/vectors_init.c:
	added crude test to make sure MMU maps memory as
	write-back enabled.
2007-12-11 05:18:06 +00:00
Till Straumann
bf5742a630 2007-12-09 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/ppc_exc_test.c,
	new-exceptions/bspsupport/vectors_init.c,
	new-exceptions/bspsupport/ppc_exc_bspsupp.h,
	new-exceptions/bspsupport/README,
	new-exceptions/bspsupport/irq_supp.h:
	Added README and some comments; now use TRAP exception
	in ppc_exc_test.c so that it works on PSIM.
2007-12-10 07:06:53 +00:00
Till Straumann
869af180c3 2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* irq_supp.h: was moved from libbsp/powerpc/shared/irq to
	libcpu/powerpc/new-exceptions/bspsupport.
2007-12-09 00:17:38 +00:00
Till Straumann
f73c6285c1 2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/irq.c,
	new-exceptions/bspsupport/ppc_exc_bspsupp.h,
	new-exceptions/bspsupport/ppc_exc_hdl.c:
	fixed some mismatching signed/unsigned types.
2007-12-09 00:00:08 +00:00
Till Straumann
94e1931c5b 2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/, new-exceptions/bspsupport/ppc_exc.S,
	new-exceptions/bspsupport/ppc_exc_test.c,
	new-exceptions/bspsupport/vectors.h,
	new-exceptions/bspsupport/vectors_init.c,
	new-exceptions/bspsupport/irq.c,
	new-exceptions/bspsupport/ppc_exc_bspsupp.h,
	new-exceptions/bspsupport/ppc_exc_hdl.c,
	new-exceptions/bspsupport/ppc_exc_asm_macros.h,
	new-exceptions/bspsupport/nested_irq_test.c:
	New files. Added 'middleware' code for helping BSPs implement
	exception and interrupt handling and implementing the 'new'
	RTEMS IRQ API (which I personally dislike).
2007-12-08 23:43:24 +00:00