Commit Graph

82 Commits

Author SHA1 Message Date
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
855012618c 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/e500_raw_exc_init.c: map DEC
	exception to ASM_BOOKE_DEC_VECTOR instead of ASM_DEC_VECTOR.

	Fixed wrong mapping of ASM_BOOKE_FIT_VECTOR
	(was ASM_BOOKE_PIT_VECTOR).
2007-12-11 07:34:10 +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
Till Straumann
4be2812f5b 2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/e500_raw_exc_init.c, new-exceptions/raw_exception.c,
	shared/include/cpuIdent.c, shared/include/cpuIdent.h:
	Added different kinds of 'bookE' to the ppc_cpu_is_bookE feature
	check; unfortunately...
2007-12-08 22:46:59 +00:00
Till Straumann
eb8420f7f2 2007-12-06 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c, new-exceptions/raw_exception.h:
	Removed all #ifdef <cpu_flavor>. All exception vectors are now
	always defined.
	Changed implementation of <cpu>_vector_is_valid() from 'case'
	statements to table lookup.
	Replaced 'ASM_VECTORS_CRITICAL' by a variable
	'bsp_raw_vector_is_405_critical' which is set at run-time.
	Removed PPC_MSR_EXC_BITS. The exception handling code
	(libbsp/shared/vectors/vectors.S and ../irq/irq_asm.S) now
	has a run-time check for these bits.
	Both files are now free of #if <cpu_flavor> constructs.
2007-12-06 19:42:47 +00:00
Till Straumann
694c00cb4e 2007-12-05 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am, configure.ac, preinstall.am,
	new-exceptions/e500_raw_exc_init.c: Started adding
	support for e500 CPU. Most stuff is borrowed from mpc6xx.
2007-12-06 00:21:07 +00:00
Joel Sherrill
7302f4c51f 2007-12-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* new-exceptions/raw_exception.c: Conditionalize call to
	e500_setup_raw_exceptions() since that is not even in the tree yet.
2007-12-05 21:50:47 +00:00
Joel Sherrill
736503e97c 2007-12-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* new-exceptions/raw_exception.c: Conditionalize some BOOKE vectors.
2007-12-05 21:29:41 +00:00
Till Straumann
464ba4d040 2007-12-05 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c, new-exceptions/raw_exception.h:
	Added typedef for exception classes (classic, critical, ...
	synchronous / asynchronous). ppc_vector_is_valid() now returns
	the appropriate class.
2007-12-05 09:29:03 +00:00
Till Straumann
0fb0eb034c 2007-12-05 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c: made all <cpu>_vector_is_valid()
	subroutines that are called from ppc_vector_is_valid() 'static'.
2007-12-05 08:35:55 +00:00
Till Straumann
7df69c3716 2007-12-05 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c, new-exceptions/raw_exception.h:
	Qualified all exception vector symbols that are only defined
	#ifdef <cpu_flavor> with <cpu_flavor> in the symbol name.
	If the special flavor __ppc_generic is effective the ALL
	vector symbols are available and ppc_vector_is_valid() works
	for all supported CPUs (run-time check).
	This is work towards a #ifdef <cpu_flavor> free libcpu and
	exception framework.
2007-12-05 08:33:11 +00:00
Joel Sherrill
4216c573e3 2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* mpc5xx/console-generic/console-generic.c, mpc8260/timer/timer.c,
	new-exceptions/cpu.c, old-exceptions/cpu.c: Move interrupt_stack_size
	field from CPU Table to Configuration Table. Eliminate CPU Table from
	all ports. Delete references to CPU Table in all forms.
2007-12-04 22:19:37 +00:00
Till Straumann
ea39487c59 2007-11-30 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c, new-exceptions/raw_exception.h,
	old-exception/cpu.c: define bsp_exceptions_in_RAM variable.
	This is probably only used by the simulator (were else
	can you install something to ROM ??).
2007-12-01 01:26:41 +00:00
Joel Sherrill
c4cc81993a 2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* mpc5xx/clock/clock.c, mpc5xx/timer/timer.c, mpc8260/clock/clock.c,
	mpc8260/cpm/brg.c, mpc8260/timer/timer.c, mpc8xx/clock/clock.c,
	mpc8xx/console-generic/console-generic.c, mpc8xx/timer/timer.c,
	new-exceptions/raw_exception.c, old-exceptions/cpu.c,
	ppc403/clock/clock.c, ppc403/console/console.c,
	ppc403/console/console.c.polled, ppc403/console/console405.c,
	ppc403/ictrl/ictrl.c, ppc403/irq/ictrl.c, ppc403/timer/timer.c,
	ppc403/tty_drv/tty_drv.c: Eliminate PowerPC specific elements from
	the CPU Table. They have been replaced with variables named bsp_XXX
	as needed.
2007-11-28 21:45:06 +00:00
Till Straumann
8e1d542c07 2007-11-06 Till Straumann <strauman@slac.stanford.edu>
* mpc5xx/irq/irq.c, mpc5xx/exceptions/raw_exception.c,
	new-exceptions/raw_exception.c: test for non-NULL-ness before calling
	'on'/'off' methods so that users don't have to provide
	no-ops if they don't want this feature.
2007-11-06 21:54:18 +00:00
Joel Sherrill
f93630db63 2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1257/bsps
	* mpc5xx/exceptions/raw_exception.c, mpc5xx/irq/irq.c,
	mpc6xx/exceptions/raw_exception.c,
	mpc8260/exceptions/raw_exception.c,
	mpc8xx/exceptions/raw_exception.c, new-exceptions/raw_exception.c,
	ppc403/ictrl/ictrl.c, ppc403/irq/ictrl.c: Code outside of cpukit
	should use the public API for
	rtems_interrupt_disable/rtems_interrupt_enable. By bypassing the
	public API and directly accessing _CPU_ISR_Disable and
	_CPU_ISR_Enable, they were bypassing the compiler memory barrier
	directive which could lead to problems. This patch also changes the
	type of the variable passed into these routines and addresses minor
	style issues.
2007-09-12 15:23:44 +00:00
Thomas Doerfler
6aff507844 added PPC_e300 to raw_exception.c
removed timed abort in ns16550.c transmit code
2007-07-18 12:51:30 +00:00
Thomas Doerfler
185da08642 additional fixes for the shared exception code 2007-07-10 18:43:12 +00:00
Thomas Doerfler
862c231785 added virtex BSP support and some missing files for common PPC
exception handling
2007-07-04 12:37:36 +00:00
Till Straumann
368894feef FP context switch may be called from environment with no
FPU available (ISR, int-only task) - switch FPU on
 for the switch and restore MSR_FP after it's done.
2006-06-19 19:59:59 +00:00
Till Straumann
bbc87852db Never allow the FPU to be switched on for integer-only tasks
(new gcc may use FP regs implicitely).
2006-06-19 19:57:01 +00:00
Till Straumann
36c30fe2e7 2005-11-21 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/cpu_asm.S: the book says a context
    synchronizing instruction (isync) is necessary after flipping
    certain bits (e.g, MSR_FP) in msr -- since this could happen as
    part of a context switch I added 'isync'.
2005-11-22 01:24:10 +00:00
Ralf Corsepius
b6a645dad7 Remove (Merged into ../ChangeLog) 2005-11-04 09:33:58 +00:00
Ralf Corsepius
cc043dc3d2 2005-02-17 Ralf Corsepius <ralf.corsepius@rtems.org>
* new-exceptions/cpu.c, rtems/powerpc/powerpc.h:
	Remove CPU_MINIMUM_STACK_FRAME_SIZE.
	Use PPC_MINIMUM_STACK_FRAME_SIZE instead.
	* rtems/powerpc/powerpc.h: Add PPC_MINIMUM_STACK_FRAME_SIZE.
2005-02-17 04:23:18 +00:00
Ralf Corsepius
21a6869c26 2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org>
* new-exceptions/cpu.c: Add CPU_MINIMUM_STACK_FRAME_SIZE.
2005-02-16 09:07:47 +00:00
Ralf Corsepius
5bd1219753 2005-02-15 Ralf Corsepius <ralf.corsepius@rtems.org>
* new-exceptions/cpu.c (_CPU_ISR_install_vector): New.
2005-02-15 16:33:27 +00:00
Ralf Corsepius
3e5a93cc86 2005-02-14 Ralf Corsepius <ralf.corsepius@rtems.org>
* cpu.c, cpu_asm.S, irq_stub.S: #include <rtems/powerpc/powerpc.h>.
2005-02-14 04:44:17 +00:00
Ralf Corsepius
1e58f5a289 2005-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
* Makefile.am, configure.ac: Remove (Unused).
2005-02-12 03:51:21 +00:00
Ralf Corsepius
844609f9f1 2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
2005-01-07 06:57:39 +00:00
Ralf Corsepius
db3fa142bb 2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
* Makefile.am: Remove build-variant support.
2005-01-03 04:33:07 +00:00
Ralf Corsepius
97891e5ea3 2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
* configure.ac: Require automake > 1.9.
2004-09-24 05:54:59 +00:00
Ralf Corsepius
f05b2ac0bc Remove duplicate white lines. 2004-04-21 16:01:48 +00:00
Ralf Corsepius
6128a4aa5e Remove stray white spaces. 2004-04-21 10:43:04 +00:00
Ralf Corsepius
3239698d1f Remove stray white spaces. 2004-04-15 13:26:21 +00:00
Ralf Corsepius
b49bcfcec6 2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
* cpu_asm.S: Include <rtems/asm.h> instead of <asm.h>.
2004-04-01 10:12:49 +00:00