Compare commits

..

507 Commits
6.1 ... 4.7.3

Author SHA1 Message Date
Joel Sherrill
90a584d4ed Upgrade to 4.7.3 2008-08-08 16:35:58 +00:00
Joel Sherrill
b890d4cdad Upgrade to 4.7.4 2008-08-08 16:34:24 +00:00
Joel Sherrill
faf33fc11a Upgrade to 4.7.3 2008-08-08 16:33:38 +00:00
Joel Sherrill
9bc590da95 2008-08-08 Joel Sherrill <joel.sherrill@OARcorp.com>
* console/debugputs.c: Correct use of sparc_disable_interrupt and
	sparc_enable_interrupt.
2008-08-08 16:28:13 +00:00
Joel Sherrill
0185851c44 2008-08-08 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/include/rtems.h, sapi/Makefile.am: Add Add simple helper to get
	RTEMS version string.
	* sapi/src/getversionstring.c: New file.
2008-08-08 15:56:13 +00:00
Joel Sherrill
e5a39e3282 2008-08-08 Joel Sherrill <joel.sherrill@OARcorp.com>
* startup/linkcmds: All SPARC executables should include
	rtems_get_version_string so the monitor used can provide RTEMS
	awareness based upon the version.
2008-08-08 15:55:19 +00:00
Joel Sherrill
747c92ebad 2008-08-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/datatypes.t: Add rtems_name. Add comment about
	rtems_task_argument changing from simple unsigned thirty two bit
	integer to being derived from a C99 uintptr_t in 4.8 and newer.
2008-08-07 13:45:23 +00:00
Joel Sherrill
0f4856601e 2008-08-06 Brett Swimley <brett.swimley@aedbozeman.com>
PR 1192/filesystem
	* libblock/src/diskdevs.c: Update the disktap pointer after the
	realloc.
2008-08-06 21:02:08 +00:00
Joel Sherrill
5b9521eddb 2008-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 741/networking
	* libmisc/dummy/dummy.c: Add dummy network configuration.
2008-08-05 16:33:21 +00:00
Joel Sherrill
2a6c66e5d0 2008-08-05 Xudong Guan <xudong.guan@criticalsoftware.com>
PR 1212/cpukit
	* Makefile.am, configure.ac: Time slicing will not happen if the task
	mode is changed from a non-timeslicing mode to timeslicing mode if it
	is done by the executing thread (e.g. in its task body). This change
	includes sp44 to demonstrate the problem and verify the correction.
	* sp44/.cvsignore, sp44/Makefile.am, sp44/init.c, sp44/sp44.scn: New files.
2008-08-05 13:09:53 +00:00
Joel Sherrill
9897065c21 2008-08-05 Xudong Guan <xudong.guan@criticalsoftware.com>
PR 1212/cpukit
	* rtems/src/taskmode.c, score/src/threadtickletimeslice.c: Time slicing
	will not happen if the task mode is changed from a non-timeslicing
	mode to timeslicing mode if it is done by the executing thread (e.g.
	in its task body). This change includes sp44 to demonstrate the
	problem and verify the correction.
2008-08-05 13:09:44 +00:00
Joel Sherrill
17f5f2245b 2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1263/doc
	* user/part.t: Improve discussion of alignment and minimum buffer
	sizes.
2008-08-04 20:45:38 +00:00
Joel Sherrill
2bc42d1da6 2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1294/bsps
	* startup/spurious.c: Correct prototype and usage of
	sparc_disable_interrupts.
2008-08-04 20:37:04 +00:00
Joel Sherrill
9d976eb5b7 2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1294/bsps
	* rtems/score/cpu.h, rtems/score/sparc.h: Correct prototype and usage
	of sparc_disable_interrupts.
2008-08-04 20:35:31 +00:00
Joel Sherrill
2739c46b12 2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1265/cpukit
	* score/include/rtems/score/object.h,
	score/src/objectallocatebyindex.c: Rename index argument to avoid
	warning when rtems.h and string.h are included at the same time by
	user code.
2008-08-04 19:46:30 +00:00
Joel Sherrill
a0c866871b 2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1282/misc
	* src/rtemsInterrupt.cc: Correct vec/vector variable confusion.
2008-08-04 19:24:45 +00:00
Joel Sherrill
1b84e6a7ca 2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1288/doc
	* user/intr.t: Update callable from ISR section.
2008-08-04 19:09:55 +00:00
Joel Sherrill
f5e9743d36 2008-08-04 Tim FitzGeorge <tim.fitzgeorge@astrium.eads.net>
PR 1293/tests
	* psx10/init.c: Make sure we do not let tv_nsec go to -1.
2008-08-04 14:39:52 +00:00
Joel Sherrill
4d6e2f001d 2008-08-01 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/msg.t: Parameter is size not count. Spotted by Sebastian Huber.
2008-08-01 15:29:53 +00:00
Joel Sherrill
9b4f75ec0c 2008-07-24 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1291/cpukit
	* posix_users/mutex.t, posix_users/semaphores.t: Update tests to
	reflect changes required by POSIX blocking calls sometimes taking
	relative not absolute time.
2008-07-24 20:44:47 +00:00
Joel Sherrill
1750f5a691 2008-07-24 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1291/cpukit
	* psx05/init.c, psxmsgq01/init.c, psxmsgq01/system.h, psxsem01/init.c,
	psxsem01/psxsem01.scn: Update tests to reflect changes required by
	problem.
2008-07-24 20:43:58 +00:00
Joel Sherrill
d17c1140a8 2008-07-24 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1291/cpukit
	* posix/src/posixtimespecabsolutetimeout.c: New file.
	* itron/inline/rtems/itron/semaphore.inl, itron/src/twai_sem.c,
	posix/Makefile.am, posix/include/mqueue.h,
	posix/include/rtems/posix/mqueue.h,
	posix/include/rtems/posix/semaphore.h,
	posix/include/rtems/posix/time.h, posix/src/condtimedwait.c,
	posix/src/mqueuereceive.c, posix/src/mqueuerecvsupp.c,
	posix/src/mqueuesend.c, posix/src/mqueuesendsupp.c,
	posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c,
	posix/src/mutexfromcorestatus.c, posix/src/mutextimedlock.c,
	posix/src/semaphorewaitsupp.c, posix/src/semtimedwait.c,
	posix/src/semtrywait.c, posix/src/semwait.c, rtems/src/semobtain.c,
	rtems/src/semtranslatereturncode.c,
	score/include/rtems/score/coresem.h, score/src/coremsgseize.c,
	score/src/coresemseize.c:
	This patch addresses issues on implementation of the timeout on the
	following POSIX services. Some of these services incorrectly took a
	timeout as a relative time. Others would compute a 0 delta to timeout
	if the absolute time and the current time were equal and thus
	incorrectly block the caller forever. The root of the confusion is
	that POSIX specifies that if the timeout is incorrect (e.g. in the
	past, is now, or is numerically invalid), that it does not matter if
	the call would succeed without blocking. This is in contrast to RTEMS
	programming style where all errors are checked before any critical
	sections are entered. This fix implemented a more uniform way of
	handling POSIX absolute time timeouts.
	    + pthread_cond_timedwait - could block forever
	    + mq_timedreceive - used relative not absolute time
	    + mq_timedsend - used relative not absolute time
	    + pthread_mutex_timedlock - used relative not absolute time
	    + pthread_rwlock_timedrdlock- used relative not absolute time
	    + pthread_rwlock_timedwrlock- used relative not absolute time
	    + sem_timedwait - could block forever
2008-07-24 20:43:24 +00:00
Joel Sherrill
5e60f15d23 2008-07-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/clock.t, user/dpmem.t, user/msg.t, user/part.t, user/region.t,
	user/rtmon.t, user/sem.t, user/task.t, user/timer.t: Correct
	documentation typos noticed and thankfully reported by Fabrício de
	Novaes Kucinskis <fabricio@dea.inpe.br>
2008-07-15 21:50:40 +00:00
Joel Sherrill
3ed9ad9b83 2008-06-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/io.t: Fix typos for IO unregister reported by Catalin Morosan
	<catalin.morosan at gmail.com>.
2008-06-20 17:14:07 +00:00
Joel Sherrill
fb4f19f134 2008-06-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/conf.t: Fix text on CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER.
2008-06-20 17:06:15 +00:00
Ralf Corsepius
b6ca30ae15 Sync with rtems-4-8-branch. 2008-05-08 03:03:08 +00:00
Ralf Corsepius
d299ca4b48 New (sync with rtems-4-8-branch) 2008-05-08 02:57:51 +00:00
Ralf Corsepius
72a6eb1dce Upgrade to gdb-6.6. 2008-05-08 02:54:35 +00:00
Ralf Corsepius
1a5a29f25c Upgrade to gdb-6.8 2008-05-08 02:53:20 +00:00
Ralf Corsepius
b0ac7a0ecb Enable --with-system-readline only for gdb >= 6.7 2008-05-08 02:51:41 +00:00
Ralf Corsepius
61eddf7267 Sync with rtems-4.8. 2008-05-07 14:36:58 +00:00
Ralf Corsepius
632ea6046b Remove white line. 2008-05-06 02:46:06 +00:00
Ralf Corsepius
94baa4dd9f Sync with rtems-4-8-branch. 2008-05-06 02:35:42 +00:00
Ralf Corsepius
1971684fea New. 2008-05-03 08:34:37 +00:00
Ralf Corsepius
9ebaf4e7c7 New. Keep this outdated stuff building on modern hosts. 2008-05-03 08:18:52 +00:00
Ralf Corsepius
35b8c8ee7f Regenerate. 2008-05-03 08:17:59 +00:00
Ralf Corsepius
9ea5a2f86e Update to gcc-core-4.0.3-rtems4.7-20080503.diff. 2008-05-03 08:16:43 +00:00
Ralf Corsepius
bd6d5b949e Bump GCC_RPMREL. 2008-05-03 08:13:39 +00:00
Ralf Corsepius
1e2d157921 Update to gcc-core-4.1.1-rtems4.7-20080503.diff. 2008-05-03 05:14:35 +00:00
Ralf Corsepius
88c99a29f7 Upgrade to gcc-core-4.1.1-rtems4.7-20070405.diff 2008-05-03 04:16:05 +00:00
Ralf Corsepius
a5043d402c Update to newlib-1.15.0-rtems4.7-20080503.diff. 2008-05-03 04:08:14 +00:00
Ralf Corsepius
5e36d45331 Remove support for newlib-1.14.0. 2008-05-03 04:06:42 +00:00
Ralf Corsepius
8a13db160c Remove SIZE_MIN, fix SIZE_MAX. 2008-05-03 04:03:10 +00:00
Joel Sherrill
582d68e49e 2008-04-25 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/system.h: Fix typo in comment.
2008-04-25 15:24:28 +00:00
Joel Sherrill
de7b14e8d2 2008-02-20 Alexandru Bugnar <a-bugnar@criticalsoftware.com>
PR 1278/cpukit
	* cpu.c: Fix incorrect bit manipulation on returning old address of raw
	trap handler.
2008-02-20 21:54:01 +00:00
Joel Sherrill
febc98612f 2008-02-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/mp.t: Now builds.
2008-02-14 19:35:39 +00:00
Joel Sherrill
78a89d7299 2008-02-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* preinstall.am: Add vme_am_defs.h
2008-02-14 18:49:58 +00:00
Joel Sherrill
9e8c23a50e Upgrade to 4.7.2 2008-02-14 18:49:12 +00:00
Joel Sherrill
8dbed6ef1f 2008-02-06 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1277/networking
	* libnetworking/netinet/in_cksum_i386.h: Use q instead of r in
	constraint for assembly language. This restricts the register choice
	to the a-d registers.
2008-02-06 16:58:33 +00:00
Ralf Corsepius
55dfb11351 Sync with HEAD 2008-01-19 05:36:54 +00:00
Ralf Corsepius
e50777dfb0 Bump version to 0.10. 2008-01-19 05:36:36 +00:00
Joel Sherrill
b4bf197008 2007-12-21 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1268/cpukit
	* libcsupport/include/rtems/assoc.h: There is no
	rtems_assoc_ptr_by_value method.
2007-12-21 15:24:25 +00:00
Glenn Humphrey
1e121d8324 2007-11-29 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* develenv/direct.t, develenv/sample.t: Corrected various errors in the
	documentation.
2007-11-29 16:13:53 +00:00
Joel Sherrill
1773d3bd6f 2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* custom/mvme5500.cfg: Fix typo.
2007-11-28 21:15:41 +00:00
Glenn Humphrey
f68a8bf3ef 2007-11-28 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* user/clock.t, user/concepts.t, user/conf.t, user/datatypes.t,
	user/dpmem.t, user/fatal.t, user/init.t, user/mp.t, user/msg.t,
	user/part.t, user/region.t, user/rtmon.t, user/sem.t, user/task.t,
	user/timer.t: Corrected various errors in the documentation.
2007-11-28 16:25:29 +00:00
Joel Sherrill
0c628898fc 2007-11-27 Kate Feng <feng1@bnl.gov>
* custom/mvme5500.cfg: Add compiler arguments sine without them, the
	BSP has issues.
2007-11-27 20:47:22 +00:00
Joel Sherrill
2723df7ea3 2007-11-27 Joel Sherrill <joel.sherrill@OARcorp.com>
* develenv/develenv.texi, develenv/direct.t, develenv/intro.texi,
	develenv/sample.t, develenv/utils.t: Update directory tree.
2007-11-27 19:31:13 +00:00
Joel Sherrill
4ed0280e47 2007-11-26 Eric Norum <norume@aps.anl.gov>
* network/network.c: Fix LED configuration to match uCDIMM.
2007-11-26 19:08:16 +00:00
Ralf Corsepius
98e206b7d3 Update. 2007-11-15 05:40:15 +00:00
Ralf Corsepius
93745d5b10 Update. 2007-11-15 05:37:58 +00:00
Ralf Corsepius
1793d8bf65 Remove. 2007-11-15 05:33:53 +00:00
Ralf Corsepius
0eb005795e New. 2007-11-15 05:33:33 +00:00
Ralf Corsepius
ebfbcea713 Remove. 2007-11-15 05:27:39 +00:00
Joel Sherrill
3dbaf97582 2007-11-06 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1266/cpukit
	* posix/src/keycreate.c, posix/src/keyrundestructors.c: Use API instead
	of class for key indexing.
2007-11-06 21:40:01 +00:00
Joel Sherrill
7fa99def1e 2007-11-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* libmisc/cpuuse/cpuuse.c: Fix date formatting.
2007-11-06 20:21:21 +00:00
Joel Sherrill
0e111b7c33 2007-09-20 Kate Feng <feng1@bnl.gov>
* network/if_100MHz/GT64260eth.c: Add else.
2007-09-20 16:35:34 +00:00
Joel Sherrill
02cbce4816 2007-09-19 Kate Feng <feng1@bnl.gov>
* README: Update.
2007-09-19 14:47:14 +00:00
Joel Sherrill
b3baf73dfe Fixed formatting. 2007-09-17 15:44:55 +00:00
Joel Sherrill
e49b92e09c 2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* network/GT64260eth.c, network/GT64260eth.h, network/GT64260ethreg.h: Removed.
2007-09-14 18:56:32 +00:00
Joel Sherrill
b047186473 2007-09-14 Kate Feng <feng1@bnl.gov>
* Makefile.am, README, README.booting, README.irq,
	preinstall.am, GT64260/MVME5500I2C.c, include/bsp.h, irq/irq.c,
	irq/irq.h, irq/irq_init.c, pci/pci.c, pci/pci_interface.c,
	pci/pcifinddevice.c, start/preload.S, startup/bspclean.c,
	startup/bspstart.c, startup/pgtbl_activate.c, startup/reboot.c:
	Merge my improvements in this BSP including a new network
	driver for the 1GHz NIC.
	* network/if_100MHz/GT64260eth.c, network/if_100MHz/GT64260eth.h,
	network/if_100MHz/GT64260ethreg.h, network/if_100MHz/Makefile.am,
	network/if_1GHz/Makefile.am, network/if_1GHz/POSSIBLEBUG,
	network/if_1GHz/if_wm.c, network/if_1GHz/if_wmreg.h,
	network/if_1GHz/pci_map.c, network/if_1GHz/pcireg.h: New files.
2007-09-14 15:43:37 +00:00
Joel Sherrill
622e09b440 2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1261/cpukit
	* posix/src/semaphorecreatesupp.c: Initialize all fields during
	semaphore creation.
2007-09-14 14:53:00 +00:00
Joel Sherrill
36f1913173 2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1260/cpukit
	* posix/src/pthread.c: Get initial signals blocked from creating thread
	not from ourselves.
2007-09-14 14:44:34 +00:00
Joel Sherrill
cb53c32c40 2007-09-13 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1259/rtems
	* rtems/src/taskcreate.c: Initialize is_global in all cases since
	memory is not guaranteed to be zero.
2007-09-13 19:47:51 +00:00
Joel Sherrill
7073b0e9bd 2007-09-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, include/bsp.h: Do not include networking
	drivers if networking is disabled.
2007-09-12 20:13:54 +00:00
Joel Sherrill
cb69a20832 2007-09-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.maint: touch all documentation master files so the date on
	the manual reflects the release date of the software.
2007-09-04 23:48:25 +00:00
Joel Sherrill
81cd377d99 2007-08-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* ChangeLog, sapi/src/io.c: Revert change accidentally committed to
	io.c.
2007-08-28 14:05:20 +00:00
Joel Sherrill
4d11115798 2007-08-28 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1256/networking
	* ftpd/ftpd.c, sapi/src/io.c: Fix unaligned access.
2007-08-28 14:03:52 +00:00
Joel Sherrill
d7d5363b0e 2007-07-31 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1248/networking
	* libnetworking/rtems/rtems_glue.c: Luke Stras <luke@spacequest.com>
	reported that when no interfaces are successfully attached, the
	default route is broken and may result in a jump to an illegal
	address.
2007-08-01 00:44:26 +00:00
Joel Sherrill
b0844b9890 2007-07-31 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1249/build
	* configure.ac: Jerry Needell <jerry.needell@unh.edu> reported that the
	leon3 was left out of the cache enable logic. Thus the cache
	management support code was empty on LEON3 CPUs.
2007-07-31 20:24:08 +00:00
Ralf Corsepius
6ba34b09dc 2007-07-26 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/rtems/bspIo.h, include/rtems/pci.h:
	Add extern "C" guards. Reported by
	Robert S. Grimes <rsg@alum.mit.edu>.
2007-07-26 06:10:24 +00:00
Till Straumann
17a13b9562 * vmeUniverse/vmeTsi148.c: Use size_t for sizes. 2007-07-16 05:57:18 +00:00
Ralf Corsepius
1027ba71ed Regenerate. 2007-06-14 02:36:53 +00:00
Ralf Corsepius
6e28241b02 gcc-core-4.1.1-rtems4.7-20070613.diff 2007-06-14 02:35:20 +00:00
Ralf Corsepius
2dab99e1ad GCC_RPMREL = 11 2007-06-14 02:35:02 +00:00
Ralf Corsepius
acfc78431d Add sparc fpu fix. 2007-06-14 02:17:32 +00:00
Joel Sherrill
b883a259ec 2007-05-29 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/score/copyrt.h: Update copyright notice.
2007-05-29 20:02:34 +00:00
Joel Sherrill
41e7421452 2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1244/bsps
	* console/console.c: Remove definition of __assert.
2007-05-28 15:03:13 +00:00
Ralf Corsepius
38b21e3c79 Add gprof.info handling. 2007-05-25 08:41:42 +00:00
Ralf Corsepius
cd0eb14e94 Bump GCC_RPMREL = 10. 2007-05-24 06:16:18 +00:00
Ralf Corsepius
b37b79a5ff Update from HEAD. 2007-05-24 06:10:44 +00:00
Ralf Corsepius
65125d5aac Partial merger from HEAD. 2007-05-24 04:39:20 +00:00
Joel Sherrill
e9f3dc0120 2007-05-22 Joel Sherrill <joel.sherrill@OARcorp.com>
* user/conf.t: Fix typo -- should have read kilobytes.
2007-05-22 15:27:50 +00:00
Ralf Corsepius
caa531a25d Add suse 2007-05-22 08:12:45 +00:00
Ralf Corsepius
ffcc6d3583 Bump version to 0.7 2007-05-22 08:12:35 +00:00
Ralf Corsepius
087f84c738 Add --libexecdir. 2007-05-21 10:57:24 +00:00
Ralf Corsepius
284bcb8d61 Sync with HEAD. 2007-05-18 11:12:08 +00:00
Joel Sherrill
9fcc12cedd 2007-05-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1237/rtems
	* cpu.c, cpu_asm.S, rtems/score/cpu.h: Add logic to prevent stack creep
	when interrupts occur at a sufficient rate that the interrupted
	thread never gets to clean its stack. This patch ensures that an
	interrupted thread will not nest ISR dispatches on its stack.
2007-05-10 18:41:05 +00:00
Ralf Corsepius
b3d13de34b 2007-05-09 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1243
	* pppd/auth.c (set_allowed_addrs): Remove bogus dereference.
2007-05-09 11:24:44 +00:00
Joel Sherrill
07c92a7de3 2007-04-17 Joel Sherrill <joel@OARcorp.com>
* posix/tools/runtest.in: Do not run pppd.exe from batch mode script.
2007-04-17 17:38:05 +00:00
Joel Sherrill
d885a265dd 2007-04-17 Joel Sherrill <joel@OARcorp.com>
* erc32/tools/runtest.in, leon2/tools/runtest.in,
	leon3/tools/runtest.in: Do not run pppd.exe from batch mode script.
2007-04-17 17:38:03 +00:00
Joel Sherrill
9403f2a207 2007-04-17 Joel Sherrill <joel@OARcorp.com>
* simsh4/tools/runtest.in: Do not run pppd.exe from batch mode script.
2007-04-17 17:38:00 +00:00
Joel Sherrill
70845d158d 2007-04-17 Joel Sherrill <joel@OARcorp.com>
* psim/tools/runtest: Do not run pppd.exe from batch mode script.
2007-04-17 17:37:46 +00:00
Joel Sherrill
c41b1ac1e1 2007-04-17 Joel Sherrill <joel@OARcorp.com>
* jmr3904/tools/runtest: Do not run pppd.exe from batch mode script.
2007-04-17 17:37:42 +00:00
Joel Sherrill
93ba4f3fcc 2007-04-17 Joel Sherrill <joel@OARcorp.com>
* mcf5206elite/tools/runtest: Do not run pppd.exe from batch mode
	script.
2007-04-17 17:37:39 +00:00
Joel Sherrill
19c738467e 2007-04-16 Joel Sherrill <joel@OARcorp.com>
PR 1240/filesystem
	* libfs/src/imfs/imfs_rmnod.c: Fix link when removing a symlink. Memory
	for filename was not being freed.
2007-04-16 19:05:42 +00:00
Joel Sherrill
40e572f85a 2007-04-13 Joel Sherrill <joel@OARcorp.com>
* user/task.t: Add rtems_iterate_over_all_threads.
2007-04-13 22:34:16 +00:00
Joel Sherrill
e6466f7955 Upgrade to 4.7.1 2007-04-13 18:29:37 +00:00
Joel Sherrill
ca64c0649d 2007-04-12 Joel Sherrill <joel@OARcorp.com>
* itron/src/rsm_tsk.c: Correct error returned.
2007-04-12 19:41:55 +00:00
Joel Sherrill
caacea235c 2007-04-11 Joel Sherrill <joel@OARcorp.com>
* configure.ac: Do not configure tools. They only build on a Solaris
	VMEBus host anyway.
2007-04-11 11:18:34 +00:00
Ralf Corsepius
dd64e2bb63 GCC_RPMREL=8 2007-04-10 05:55:41 +00:00
Ralf Corsepius
31ba4cc47e Upgrade to gcc-core-4.1.1-rtems4.7-20070405.diff 2007-04-10 05:55:20 +00:00
Ralf Corsepius
9415bdbd6c Backport from rtems-4.8/gcc-4.1.2. 2007-04-10 05:53:40 +00:00
Ralf Corsepius
4449c8af71 2007-04-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/newlibc.c: Add __ATTRIBUTE_IMPURE_PTR__
	(Fixes "relocation truncated to fit: R_MIPS_GPREL16" against
	_impure_ptr bug).
	Fix abuse of _REENT_INIT().
2007-04-10 05:37:55 +00:00
Ralf Corsepius
1bc504bfe6 2007-04-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Remove --oformat=...
	Use old_link for -qrtems (Prevents *.link from killing endianness).
2007-04-10 05:25:07 +00:00
Ralf Corsepius
7adf859f75 2007-04-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Use nostdlib instead of nostdlibs (bogus).
	Use old_link for -qrtems (Prevents *.link from killing endianness).
2007-04-10 05:23:29 +00:00
Ralf Corsepius
9a94a722ed 2007-04-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Use old_link for -qrtems (Prevents *.link from killing
	endianness).
2007-04-10 05:21:57 +00:00
Ralf Corsepius
068128dc2e 2007-04-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Remove lib (Now expected to exist in GCC).
2007-04-06 05:52:18 +00:00
Ralf Corsepius
ad438184fe 2007-04-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Remove lib (Now expected to exist in GCC).
2007-04-06 05:37:02 +00:00
Joel Sherrill
fc503e59c6 2007-04-02 Jennifer Averett <jennifer.averrett@oarcorp.com>
* rtems.adb, rtems.ads: Update.
2007-04-02 20:52:57 +00:00
Joel Sherrill
a4afa905f6 2007-04-02 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/printk.c: Add %p support.
2007-04-02 14:36:01 +00:00
Joel Sherrill
29fd387849 2007-04-02 Joel Sherrill <joel@OARcorp.com>
* libmisc/stackchk/check.c: Add code to check validity of frame pointer
	in addition to the pattern area being overwritten. Also do some
	cleanup.
2007-04-02 14:34:39 +00:00
Joel Sherrill
625ef85d6a 2007-04-02 Joel Sherrill <joel@OARcorp.com>
* Makefile.am: Add dummy printk support so all tests link.
2007-04-02 11:18:03 +00:00
Joel Sherrill
1e99524efe 2007-04-02 Joel Sherrill <joel@OARcorp.com>
* dummy_printk_support.c: New file.
2007-04-02 11:17:45 +00:00
Joel Sherrill
a69b93963b 2007-04-01 Joel Sherrill <joel@OARcorp.com>
PR 1235/bsps
	* pci/pci.c: Add conditional declaration of variables used in debug
	printk's.
2007-04-01 15:38:43 +00:00
Ralf Corsepius
c884439aae 2007-03-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* monitor/init.c, rtmonuse/task1.c: Use rtems_task_argument.
2007-03-29 17:02:37 +00:00
Ralf Corsepius
7863b3f211 2007-03-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* sp06/task1.c, sp20/task1.c: Use rtems_task_argument.
2007-03-29 17:02:06 +00:00
Ralf Corsepius
77198be529 Use rtems_task_argument. 2007-03-29 17:01:59 +00:00
Joel Sherrill
53d549649f 2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1234/cpukit
	* libcsupport/Makefile.am: Provide printk() based implementation of
	__assert() to reduce dependencies in executables.
	* libcsupport/src/__assert.c: New file.
2007-03-28 19:06:33 +00:00
Joel Sherrill
7a0a872944 2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1234/cpukit
	* libcsupport/Makefile.am: Provide printk() based implementation of
	__assert() to reduce dependencies in executables.
2007-03-28 18:58:32 +00:00
Joel Sherrill
a2a6187aed 2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1233/bsps
	* Makefile.am, console/console.c, console/debugputs.c: Move printk
	support code into debug IO file so you do not get the entire console
	driver when you do not want it.
2007-03-28 18:08:58 +00:00
Joel Sherrill
2fc3592d35 2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1232/bsps
	* bsppost.c: It should not be a fatal error to not have a console.
2007-03-28 18:03:26 +00:00
Ralf Corsepius
884fba65b2 2007-03-27 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/target.m4: Strip CFLAGS (Hack to prevent bsp-cflags from
	  being used to compile "tools").
2007-03-27 06:15:16 +00:00
Joel Sherrill
9b754a25bf 2007-03-26 Joel Sherrill <joel@OARcorp.com>
PR 1231/cpukit
	* posix/src/adasupp.c, posix/src/clockgetcpuclockid.c,
	posix/src/clockgetenableattr.c, posix/src/clockgetres.c,
	posix/src/clockgettime.c, posix/src/clocksetenableattr.c,
	posix/src/mutex.c, posix/src/mutexattrdestroy.c,
	posix/src/mutexattrgetprioceiling.c,
	posix/src/mutexattrgetprotocol.c, posix/src/mutexattrgetpshared.c,
	posix/src/mutexattrinit.c, posix/src/mutexattrsetprioceiling.c,
	posix/src/mutexattrsetprotocol.c, posix/src/mutexattrsetpshared.c,
	posix/src/mutexdefaultattributes.c, posix/src/mutexdestroy.c,
	posix/src/mutexgetprioceiling.c, posix/src/mutexlock.c,
	posix/src/mutexlocksupp.c, posix/src/mutexmp.c,
	posix/src/mutexsetprioceiling.c, posix/src/mutextimedlock.c,
	posix/src/mutextrylock.c, posix/src/mutexunlock.c,
	posix/src/nanosleep.c, posix/src/posixintervaltotimespec.c,
	posix/src/posixtimespecsubtract.c,
	posix/src/posixtimespectointerval.c,
	posix/src/psignalclearprocesssignals.c,
	posix/src/psignalclearsignals.c,
	posix/src/psignalsetprocesssignals.c,
	posix/src/psignalunblockthread.c, posix/src/ptimer.c,
	posix/src/ptimer1.c, posix/src/sched.c, posix/src/time.c: Remove
	unneeded includes of assert.h
2007-03-26 22:56:34 +00:00
Joel Sherrill
bdfe63323e 2007-03-26 Joel Sherrill <joel@OARcorp.com>
PR 1230/tests
	* minimum/init.c: Minimum should not configure console driver.
2007-03-26 22:21:29 +00:00
Ralf Corsepius
84fe6d5955 Regenerate. 2007-03-19 06:58:29 +00:00
Ralf Corsepius
14a0b117f1 2007-03-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/sys/conf.h: Don't include machine/conf.h.
	Update copyright notice.
	* libnetworking/Makefile.am: Remove machine/conf.h.
	* libnetworking/machine/conf.h: Remove.
2007-03-19 06:58:03 +00:00
Ralf Corsepius
753ba4ca2b 2007-03-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/sys/conf.h: Remove linesw, struct linesw, nlinesw.
	(Clash with termiostypes.h - PR 1229).
2007-03-18 07:37:23 +00:00
Ralf Corsepius
66a0b1a57b 2007-03-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/sys/conf.h: Remove linesw, struct linesw, nlinesw.
	(Clash with termiostypes.h - PR 1229).
2007-03-17 06:42:09 +00:00
Thomas Doerfler
acdf664ec7 *** empty log message *** 2007-03-16 08:57:15 +00:00
Thomas Doerfler
9455004dd9 * startup/bspstart.c: set external clock to 0 for some boards to
match the "auto clock detection" scheme in the libcpu clock driver
	* startup/linkcmds: remove content of dpram section to avoid
	download hangs with the EPPCBug board monitor
2007-03-16 08:27:21 +00:00
Ralf Corsepius
63feedc880 2007-03-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/assocnamebad.c: Remove dead code. Use PRI* macros
	  to fix warnings.
2007-03-13 05:40:14 +00:00
Joel Sherrill
e4851067d3 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* libchip/network/cs8900.c, libchip/network/cs8900.h,
	libchip/network/greth.c, libchip/network/greth.h: Correct license URL
	and/or fix mistake in copyright notice. Both of these mistakes appear
	to be from code submitted after these changes were made previously.
2007-03-12 11:23:26 +00:00
Joel Sherrill
acf743c8e2 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* console/uart.c, start/start.S, startup/linkcmds, startup/memmap.c:
	Correct license URL and/or fix mistake in copyright notice. Both of
	these mistakes appear to be from code submitted after these changes
	were made previously.
2007-03-12 11:22:40 +00:00
Joel Sherrill
2a81b3e981 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* console/uarts.c, include/bsp.h, start/start.S, startup/bspstart.c,
	startup/exit.c, startup/linkcmds: Correct license URL and/or fix
	mistake in copyright notice. Both of these mistakes appear to be from
	code submitted after these changes were made previously.
2007-03-12 11:22:37 +00:00
Joel Sherrill
861e756a76 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* include/bsp.h, network/lan91c11x.c, network/lan91c11x.h,
	network/network.c, start/start.S, startup/bspstart.c, startup/exit.c,
	startup/linkcmds, startup/memmap.c: Correct license URL and/or fix
	mistake in copyright notice. Both of these mistakes appear to be from
	code submitted after these changes were made previously.
2007-03-12 11:22:32 +00:00
Joel Sherrill
02682585d1 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* clock/clock.c, console/console.c, include/bsp.h, include/coverhd.h,
	include/tm27.h, network/network.c, start/start.S, startup/bspclean.c,
	startup/bspstart.c, startup/init5282.c, startup/linkcmds,
	timer/timer.c: Correct license URL and/or fix mistake in copyright
	notice. Both of these mistakes appear to be from code submitted after
	these changes were made previously.
2007-03-12 11:22:17 +00:00
Joel Sherrill
89f6394a03 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* include/coverhd.h, start/start.S, startup/bspclean.c,
	startup/bspstart.c, startup/linkcmds, startup/linkcmdsflash,
	startup/linkcmdsram: Correct license URL and/or fix mistake in
	copyright notice. Both of these mistakes appear to be from code
	submitted after these changes were made previously.
2007-03-12 11:22:08 +00:00
Joel Sherrill
a596619479 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* console/console-io.c, include/bsp.h, start/start.S,
	startup/bspclean.c, startup/bspstart.c, startup/init5272.c: Correct
	license URL and/or fix mistake in copyright notice. Both of these
	mistakes appear to be from code submitted after these changes were
	made previously.
2007-03-12 11:22:05 +00:00
Joel Sherrill
c41653be29 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* console/console-io.c, startup/exception.S: Correct license URL and/or
	fix mistake in copyright notice. Both of these mistakes appear to be
	from code submitted after these changes were made previously.
2007-03-12 11:21:50 +00:00
Joel Sherrill
8093e05e69 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* clock/ckinit.c, startup/exception.S: Correct license URL and/or fix
	mistake in copyright notice. Both of these mistakes appear to be from
	code submitted after these changes were made previously.
2007-03-12 11:21:43 +00:00
Joel Sherrill
42a7952dcc 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* clock/clockdrv.c, console/console-io.c, include/bsp.h,
	network/network.c, start/start.S, startup/bspclean.c,
	startup/bspstart.c, timer/timer.c: Correct license URL and/or fix
	mistake in copyright notice. Both of these mistakes appear to be from
	code submitted after these changes were made previously.
2007-03-12 11:21:39 +00:00
Joel Sherrill
7ef0876d46 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* irq/irq_init.c: Correct license URL and/or fix mistake in copyright
	notice. Both of these mistakes appear to be from code submitted after
	these changes were made previously.
2007-03-12 11:21:27 +00:00
Joel Sherrill
0332481c11 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* clock/clock.c, console/console.c, ide/pcmcia_ide.c, irq/irq.c,
	irq/irq.h, irq/irq_asm.S, irq/irq_init.c, nvram/nvram.c,
	nvram/nvram.h, slicetimer/slicetimer.c, startup/bspstart.c,
	vectors/vectors.h, vectors/vectors_init.c: Correct license URL and/or
	fix mistake in copyright notice. Both of these mistakes appear to be
	from code submitted after these changes were made previously.
2007-03-12 11:21:23 +00:00
Joel Sherrill
20cacf5cec 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* at91rm9200/clock/clock.c, at91rm9200/dbgu/dbgu.c,
	at91rm9200/include/at91rm9200.h,
	at91rm9200/include/at91rm9200_dbgu.h,
	at91rm9200/include/at91rm9200_emac.h,
	at91rm9200/include/at91rm9200_gpio.h,
	at91rm9200/include/at91rm9200_mem.h,
	at91rm9200/include/at91rm9200_pmc.h, at91rm9200/include/bits.h,
	at91rm9200/irq/bsp_irq_asm.S, at91rm9200/irq/bsp_irq_init.c,
	at91rm9200/irq/irq.c, at91rm9200/irq/irq.h, at91rm9200/pmc/pmc.c,
	at91rm9200/timer/timer.c, mc9328mxl/clock/clockdrv.c,
	mc9328mxl/include/mc9328mxl.h, mc9328mxl/irq/bsp_irq_asm.S,
	mc9328mxl/irq/bsp_irq_init.c, mc9328mxl/irq/irq.c,
	mc9328mxl/irq/irq.h, mc9328mxl/timer/timer.c,
	s3c2400/clock/clockdrv.c, s3c2400/timer/timer.c: Correct license URL
	and/or fix mistake in copyright notice. Both of these mistakes appear
	to be from code submitted after these changes were made previously.
2007-03-12 11:21:10 +00:00
Joel Sherrill
f35c71e71e 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* mcf5272/clock/ckinit.c, mcf5272/include/mcf5272.h,
	mcf5272/timer/timer.c, mcf5272/timer/timerisr.S: Correct license URL
	and/or fix mistake in copyright notice. Both of these mistakes appear
	to be from code submitted after these changes were made previously.
2007-03-12 11:21:00 +00:00
Joel Sherrill
f870ea6476 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* au1x00/include/au1x00.h, au1x00/vectorisrs/maxvectors.c,
	au1x00/vectorisrs/vectorisrs.c: Correct license URL and/or fix
	mistake in copyright notice. Both of these mistakes appear to be from
	code submitted after these changes were made previously.
2007-03-12 11:20:52 +00:00
Joel Sherrill
87e9f35467 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* mpc6xx/mmu/mmuAsm.S: Correct license URL and/or fix mistake in
	copyright notice. Both of these mistakes appear to be from code
	submitted after these changes were made previously.
2007-03-12 11:20:43 +00:00
Joel Sherrill
819a6cfd37 2007-03-12 Joel Sherrill <joel@OARcorp.com>
* score/src/heapallocatealigned.c: Correct license URL and/or fix
	mistake in copyright notice. Both of these mistakes appear to be from
	code submitted after these changes were made previously.
2007-03-12 11:20:27 +00:00
Joel Sherrill
805fe84653 2007-03-10 Joel Sherrill <joel@OARcorp.com>
PR 1226/cpukit
	* user/conf.t: CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE not
	CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE.
2007-03-10 16:16:58 +00:00
Joel Sherrill
91f9d891f8 2007-03-10 Joel Sherrill <joel@OARcorp.com>
PR 1226/cpukit
	* sapi/include/confdefs.h: CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE not
	CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE.
2007-03-10 16:16:44 +00:00
Joel Sherrill
eaff189842 2007-03-10 Joel Sherrill <joel@OARcorp.com>
PR 1227/bsps
	* include/bsp.h: Remove MAX_LONG_TEST_DURATION and
	MAX_SHORT_TEST_DURATION. They are obsolete and unused.
2007-03-10 15:56:13 +00:00
Joel Sherrill
32ad50f234 2007-03-10 Joel Sherrill <joel@OARcorp.com>
PR 1227/bsps
	* include/bsp.h: Remove MAX_LONG_TEST_DURATION and
	MAX_SHORT_TEST_DURATION. They are obsolete and unused.
2007-03-10 15:29:55 +00:00
Joel Sherrill
ff5fefb47f 2007-03-05 Joel Sherrill <joel@OARcorp.com>
PR 1221/cpukit
	* posix/src/pthreadequal.c: Fix critical section nesting.
2007-03-05 20:53:27 +00:00
Joel Sherrill
81850181d2 2007-03-02 Joel Sherrill <joel@OARcorp.com>
PR 1221/doc
	* user/rtmon.t: Add missing exponent operator in RMS CPU Utilization
	formula.
2007-03-02 21:31:04 +00:00
Ralf Corsepius
7f14691e93 Use binutils_pkgvers instead of binutils_version in Source0. 2007-02-26 09:56:38 +00:00
Ralf Corsepius
a5f0d3f61c Add BINUTILS_PKGVERS. 2007-02-26 09:36:22 +00:00
Ralf Corsepius
9a4713cf6c Add GDB_PKGVERS. 2007-02-26 09:33:28 +00:00
Ralf Corsepius
76644b33c0 Add BINUTILS_PKGVERS. 2007-02-26 09:29:38 +00:00
Ralf Corsepius
f00a8c0269 Add GDB_PKGVERS. 2007-02-26 09:06:11 +00:00
Ralf Corsepius
2d4cbe1b53 Add BINUTILS_PKGVERS. 2007-02-26 09:04:17 +00:00
Ralf Corsepius
5868ea587a New. 2007-02-22 20:01:20 +00:00
Ralf Corsepius
a470832cc9 2007-02-22 Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/Makefile.am: Move getpagesize.c to newlib-only
	  compiled files.
2007-02-22 15:25:56 +00:00
Ralf Corsepius
94ba66b8fe Rename stamp.export into stamp.export.$(rtems_tag)$(TAG_SUFFIX) 2007-02-22 13:13:25 +00:00
Ralf Corsepius
455dcb5f38 print $(rtems_tag)$(TAG_SUFFIX) into stamp.export 2007-02-22 13:10:39 +00:00
Ralf Corsepius
17eb63c085 Append TAG_SUFFIX to tarball name. 2007-02-22 13:07:51 +00:00
Ralf Corsepius
1721983ff0 2007-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Use MKDIR_P instead of mkdir_p.
2007-02-22 12:23:20 +00:00
Ralf Corsepius
b276df4c5e 2007-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* bootloader/Makefile.am: Use MKDIR_P instead of mkdir_p.
2007-02-22 12:20:24 +00:00
Ralf Corsepius
07aa4683ce 2007-02-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* wrapup/Makefile.am: Use MKDIR_P instead of mkdir_p.
2007-02-22 12:15:48 +00:00
Ralf Corsepius
b198ebf4d7 Sync. with rtems-4.8 2007-02-22 10:11:13 +00:00
Ralf Corsepius
5d27a7569d Sync. with rtems-4.8. 2007-02-22 09:35:25 +00:00
Joel Sherrill
8c5c2cce59 2007-02-21 Joel Sherrill <joel@OARcorp.com>
* loopback/init.c: Fix exit paths in client thread and main test
	thread.
2007-02-21 23:44:10 +00:00
Joel Sherrill
300f88948c 2007-02-21 Joel Sherrill <joel@OARcorp.com>
* Makefile.maint: Added TOOL_VERSIONS stanza and fixed typo.
2007-02-21 22:56:51 +00:00
Joel Sherrill
23ae7c19d6 Upgrade to 4.7.0 2007-02-21 22:26:20 +00:00
Ralf Corsepius
f0d9f1aa5b Use /opt/rtems-4.7/bin in $PATH 2007-02-21 18:34:06 +00:00
cvs2git
eb53864847 This commit was manufactured by cvs2svn to create branch 'rtems-4-7-branch'.
Cherrypick from master 2007-02-21 18:10:50 UTC Ralf Corsepius <ralf.corsepius@rtems.org> 'Misc. hacks':
    Makefile.maint
    cpukit/libcsupport/src/getpagesize.c
2007-02-21 18:10:51 +00:00
Joel Sherrill
4075c6d02a 2007-02-21 Joel Sherrill <joel@OARcorp.com>
* score/src/coremsgsubmit.c: Use Wait.option to avoid cast.
2007-02-21 14:58:23 +00:00
Ralf Corsepius
66e86174ce Preps for gcc-4.1.2. 2007-02-20 05:41:00 +00:00
Ralf Corsepius
c24ad80131 Preps for gdb-6.6. 2007-02-20 05:11:19 +00:00
Ralf Corsepius
678a69e3c1 New (Identical to gdb-6.6-rtems4.8-20070218.diff). 2007-02-20 05:04:34 +00:00
Ralf Corsepius
f1df664d07 New (Identical to gcc-core-4.1.2-rtems4.8-20070216.diff) 2007-02-20 05:03:10 +00:00
Ralf Corsepius
2bdaba9e06 Add GCC_PGKVERS (Sync with rtems-4.8). 2007-02-20 04:52:47 +00:00
Ralf Corsepius
2fa1b3fa04 Sync with rtems-4.8. 2007-02-20 04:47:29 +00:00
Ralf Corsepius
0d0dec0515 Add GDB_OPTS 2007-02-20 04:37:50 +00:00
Ralf Corsepius
3f2171624f Increment BINUTILS_RPMREL 2007-02-19 06:03:42 +00:00
Ralf Corsepius
1f0c826d45 Cosmetics 2007-02-19 06:01:02 +00:00
Ralf Corsepius
187683fe47 2007-02-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Bump version to 0.5.
	* apt/sources.list.d/rtems.list.in,
	  yum.repos.d/rtems.repo.in: Add rtems/testing repos.
2007-02-19 04:58:25 +00:00
Ralf Corsepius
a93e0bb890 Sync. with rtems-4.8. 2007-02-18 12:45:31 +00:00
Ralf Corsepius
a9d7335809 Fix URL. 2007-02-17 07:12:04 +00:00
Ralf Corsepius
9ea253ec3c Add || : to install-info. 2007-02-17 07:03:24 +00:00
Ralf Corsepius
5870da5e69 Misc. backports from rtems-4.8 2007-02-17 06:56:06 +00:00
Ralf Corsepius
9b6ba91a44 Add ||: to install-info. 2007-02-17 06:51:47 +00:00
Ralf Corsepius
b5c3cf2e62 2007-02-16 Ralf Corsepius <ralf.corsepius@rtems.org>
* Makefile.am: Remove shared/main.c.
2007-02-16 02:01:04 +00:00
Ralf Corsepius
62c4e35147 2007-02-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libchip/Makefile.am: Correct path to README.tulipclone.
2007-02-16 01:51:38 +00:00
Ralf Corsepius
ae58a2a959 2007-02-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* make/Makefile.am: Cleanup.
2007-02-16 01:44:16 +00:00
Ralf Corsepius
473c7ac694 Sync with 4.8 2007-02-14 17:27:58 +00:00
Ralf Corsepius
28837e5a99 Bump RPMRELS. 2007-02-14 16:06:27 +00:00
Ralf Corsepius
8457b18892 Bump RPMRELS. 2007-02-14 16:04:14 +00:00
Ralf Corsepius
85a29993de Add ||: 2007-02-14 16:03:44 +00:00
Ralf Corsepius
edebdab588 Sync with rtems-4.8 2007-02-14 15:59:48 +00:00
Ralf Corsepius
a1ea247dee 2007-02-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* VERSION: sync with */version.m4.
2007-02-14 14:47:44 +00:00
Ralf Corsepius
038f3a7ed4 2007-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/check-cpuopts.m4: Check rtems/system.h instead of
	rtems/score/cpuopts.h.
2007-02-11 10:29:38 +00:00
Ralf Corsepius
8b98a1b4be 2007-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
* score/include/rtems/score/heap.h, score/src/heap.c,
	score/src/heapallocatealigned.c, score/src/heapresizeblock.c:
	More size_t for heap-sizes.
2007-02-11 08:37:19 +00:00
Ralf Corsepius
2e47f4ab55 More size_t for heap-sizes. 2007-02-11 08:36:59 +00:00
Ralf Corsepius
2aa472c1f8 2007-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
* score/include/rtems/score/heap.h, score/src/heap.c,
	score/src/heapallocate.c, score/src/heapextend.c: Use size_t for
	heap-sizes.
2007-02-11 04:53:18 +00:00
Ralf Corsepius
fbbfad9a8b Use size_t for heap-sizes. 2007-02-11 04:52:59 +00:00
Ralf Corsepius
832310a7b2 2007-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
* libnetworking/resolv.h: Typo fixes. Remove __P().
2007-02-11 04:48:09 +00:00
Ralf Corsepius
039cc452ee 2007-02-09 Ralf Corsepius <ralf.corsepius@rtems.org>
* rtems/include/rtems/rtems/tasks.h, rtems/src/taskcreate.c:
	Use size_t for stack-sizes.
2007-02-09 15:08:18 +00:00
Ralf Corsepius
9f9412cc16 Use size_t for stack-sizes. 2007-02-09 15:08:06 +00:00
Eric Norum
100673c8dd Fixed FPGA interrupt handling. 2007-02-08 19:10:18 +00:00
Ralf Corsepius
1f9f1dc50d Upgrade to newlib-1.15.0-rtems4.7-20070208.diff 2007-02-08 10:43:18 +00:00
Ralf Corsepius
7a771dbd70 Remove (Obsolete). 2007-02-08 10:41:37 +00:00
Ralf Corsepius
74829f7ece Bump GCC_RPMREL. 2007-02-08 10:40:31 +00:00
Ralf Corsepius
0de60d6de5 New. 2007-02-08 10:38:29 +00:00
Ralf Corsepius
356914bb0d 2007-02-07 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/vm/vm_extern.h: Remove non-implemented/unused
	  functions.
2007-02-07 04:37:31 +00:00
Till Straumann
4a2fee4771 2007-02-06 Till Straumann <strauman@slac.stanford.edu>
* libcsupport/src/gxx_wrappers.c: fix PR#690. Supply
	taskvar dtor to plug memory leak. Applied patch attached
	to PR#690.
2007-02-06 22:54:34 +00:00
Joel Sherrill
edffc8ed24 2007-02-06 Joel Sherrill <joel@OARcorp.com>
* tm09/task1.c, tm10/task1.c, tm11/task1.c, tm12/task1.c, tm13/task1.c,
	tm14/task1.c, tm22/task1.c: Address size_t/uint32_t typing issues in
	message queue tests.
2007-02-06 19:14:56 +00:00
Joel Sherrill
3da8388977 2007-02-06 Joel Sherrill <joel@OARcorp.com>
* sp09/screen07.c, sp09/task3.c, sp13/task1.c, sp13/task2.c,
	sp13/task3.c: Address size_t/uint32_t typing issues in message queue
	tests.
2007-02-06 19:14:54 +00:00
Joel Sherrill
809d2a6a30 2007-02-06 Joel Sherrill <joel@OARcorp.com>
* rtems++/Task1.cc, rtems++/Task3.cc: Address size_t/uint32_t typing
	issues in message queue tests.
2007-02-06 19:14:51 +00:00
Joel Sherrill
822c35d907 2007-02-06 Joel Sherrill <joel@OARcorp.com>
* itronmbf01/init.c: Address size_t/uint32_t typing issues in message
	queue tests.
2007-02-06 19:14:48 +00:00
Ralf Corsepius
1c43ddfa1d 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* smc/smc.c: include bspIo.h for printk.
2007-02-06 18:23:51 +00:00
Ralf Corsepius
ead7d3a8e5 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* libchip/ide/ata.c: Remove superfluous type casts.
2007-02-06 17:46:47 +00:00
Joel Sherrill
9babd25503 2007-02-06 Joel Sherrill <joel@OARcorp.com>
* include/rtems++/rtemsMessageQueue.h, src/rtemsMessageQueue.cc: Make
	compile by using size_t and uint32_t where appropriate.
2007-02-06 16:42:33 +00:00
Ralf Corsepius
402bdc31ed 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/getpagesize.c: New (moved from posix/src).
	* posix/src/getpagesize.c: Removed.
	* posix/Makefile.am: Remove references to getpagesize.c.
	* libcsupport/Makefile.am: Add getpagesize.c.
2007-02-06 14:51:02 +00:00
Ralf Corsepius
a725f7e641 Removed. 2007-02-06 14:50:39 +00:00
Ralf Corsepius
70b76b22fc Remove references to getpagesize.c. 2007-02-06 14:50:05 +00:00
Ralf Corsepius
7a019b4160 Add getpagesize.c. 2007-02-06 14:49:49 +00:00
Ralf Corsepius
451b8870fe 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/src/sysconf.c: Add support for _SC_PAGESIZE (PR 1215).
2007-02-06 14:35:31 +00:00
Ralf Corsepius
f8ed4e0f00 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/inline/rtems/score/coremsg.inl: More size_t and consts.
2007-02-06 13:43:20 +00:00
Ralf Corsepius
f41002fa1b 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/src/msgqsend.c: Use size_t for sizes.
	* rtems/src/msgqurgent.c: Use size_t for sizes.
2007-02-06 11:29:21 +00:00
Ralf Corsepius
dc2afc8064 Use size_t for sizes. 2007-02-06 11:28:41 +00:00
Ralf Corsepius
dbc684c55c 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* vmeUniverse/vmeUniverse.c: Use size_t for sizes.
2007-02-06 10:49:11 +00:00
Ralf Corsepius
18123fe76b 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* libchip/ide/ata.c, libchip/network/elnk.c, optman/rtems/no-msg.c:
	Use size_t for sizes.
2007-02-06 10:32:29 +00:00
Ralf Corsepius
fffe6a769c Use size_t for sizes. 2007-02-06 10:31:18 +00:00
Ralf Corsepius
12d9b1b33c Use size_t for sizes. 2007-02-06 10:24:14 +00:00
Ralf Corsepius
2cd0ae2aa5 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/src/msgqbroadcast.c: Use size_t for sizes.
	* rtems/src/msgmp.c: Use size_t for sizes.
	* rtems/src/msgqsubmit.c: Use size_t for sizes.
	* rtems/include/rtems/rtems/msgmp.h: Use size_t for sizes.
	* rtems/include/rtems/rtems/message.h: Use size_t for sizes.
	* score/inline/rtems/score/coremsg.inl: Use size_t for sizes.
2007-02-06 08:59:14 +00:00
Ralf Corsepius
8645c01c7a Use size_t for sizes. 2007-02-06 08:58:42 +00:00
Ralf Corsepius
f75461df63 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* shmsupp/getcfg.c: Replace rtems_unsigned32 with uint32_t.
2007-02-06 08:41:37 +00:00
Ralf Corsepius
d41ed94f16 Use size_t for sizes. 2007-02-06 05:58:05 +00:00
Ralf Corsepius
de4620c42d 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* itron/src/trcv_mbf.c: Use size_t for sizes.
	* libmisc/monitor/mon-object.c: Use size_t for sizes.
	* libmisc/monitor/mon-server.c: Use size_t for sizes.
	* libmisc/monitor/monitor.h: Use size_t for sizes.
	* libmisc/mw-fb/mw_uid.c: Use size_t for sizes.
2007-02-06 05:57:57 +00:00
Ralf Corsepius
edf59e7b66 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/include/rtems/rtems/message.h: Use size_t for sizes.
2007-02-06 05:19:00 +00:00
Ralf Corsepius
6a53cda9fe Use size_t for sizes. 2007-02-06 05:18:50 +00:00
Ralf Corsepius
81ab02ceff 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/src/msgqreceive.c: Use size_t for sizes.
	* posix/src/mqueuerecvsupp.c: Use size_t for sizes.
2007-02-06 04:47:41 +00:00
Ralf Corsepius
e5b095c404 Use size_t for sizes. 2007-02-06 04:47:06 +00:00
Ralf Corsepius
4bbec0cada 2007-02-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/src/coremsgseize.c: Use size_t for sizes.
2007-02-06 03:51:51 +00:00
Ralf Corsepius
c0452f3b6e Use size_t for sizes. 2007-02-06 03:51:41 +00:00
Ralf Corsepius
6e5da27234 Use size_t for sizes. 2007-02-05 18:06:40 +00:00
Ralf Corsepius
9d3e9405ef 2007-02-05 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/mqueue.h: Use size_t for sizes.
	* posix/src/mqueuesendsupp.c: Use size_t for sizes.
2007-02-05 18:06:33 +00:00
Ralf Corsepius
bd025c218a Use size_t for sizes. 2007-02-05 15:36:34 +00:00
Ralf Corsepius
beec7fde8e 2007-02-05 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/include/rtems/score/coremsg.h: Use size_t for sizes.
	* score/src/coremsgbroadcast.c: Use size_t for sizes.
	* score/src/coremsgsubmit.c: Use size_t for sizes.
2007-02-05 15:36:29 +00:00
Eric Norum
33fc4f65ab Enable RTS/CTS flow-control pins. 2007-02-05 15:27:26 +00:00
Eric Norum
037d938a84 Always assert RTS* (if flow control is on it will override). 2007-02-02 22:30:44 +00:00
Ralf Corsepius
118823ba84 2007-01-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libblock/src/show_bdbuf.c: Use inttypes.h macros.
2007-01-30 07:58:24 +00:00
Till Straumann
985082dff2 2007-01-29 Till Straumann <strauman@slac.stanford.edu>
* vmeUniverse/README.porting, vmeUniverse/README.universe:
	updated, added more information for BSP implementors.

	* vmeUniverse/VMEDMA.h (added): VME DMA API definition.

	* vmeUniverse/bspVmeDmaList.h (added), vmeUniverse/bspVmeDmaListP.h (added),
	* vmeUniverse/bspVmeDmaList.c (added):
	Driver-independent code for linked-list DMA (public + private headers,
	implementation).

	* vmeUniverse/vmeUniverseDMA.h (added), vmeUniverse/vmeTsi148DMA.h (added):
	interface to new DMA features of drivers.

	* vmeUniverse/vme_amd_defs.h: Added definition for data-width
	hint bits (VME_MODE_DBWxx).


	* vmeUniverse/vmeTsi148.c: added DMA support. Added support for
	data-width hint/modifier bits.

	* vmeUniverse/vmeUniverse.c, vmeUniverse/vmeUniverse.h:
	Added support for data-width hint/modifier bits.
	Added support for xxx_BLT, xxx_MBLT address modifiers.
	Restrict DBW to 32 in non-MBLT modes (except single-beat;
	a comment is in README.universe). Updated DMA support to
	implement new VMEDMA.h API. Added support for non-incrementing
	VME addresses. Restrict data width to 32 for single-beat AMs
	when the universe would use MBLT for DMA.
2007-01-30 07:30:12 +00:00
Till Straumann
018eb73f2f 2007-01-29 Till Straumann <strauman@slac.stanford.edu>
* shared/vme/VMEConfig.h:
	Added more comments about the semantics of the various
	symbols BSPs should define in this file.
	Removed declarations of BSP_VMEInit(), BSP_VMEIrqMgrInstall().

	* shared/vme/vmeconfig.c: declare BSP_VMEInit(),
	BSP_VMEIrqMgrInstall() here.

	* Makefile.am, shared/vme/README,
	* shared/vme/vme_universe_dma.c (added): Added glue code
	implementing the VMEDMA.h API using the vmeUniverse driver.
2007-01-30 07:12:39 +00:00
Till Straumann
6350aa2ff1 2007-01-29 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am, preinstall.am,
	* vme/vmeconfig.c (removed), vme/VMEConfig.h (added):
	cleaned up vme support - use files from libbsp/powerpc/shared/vme
	and define BSP specifica in VMEConfig.h.
	Use VME DMA support implemented by vmeUniverse and
	libbsp/powerpc/shared/vme/vme_universe_dma.c

	* irq/irq.c, include/gen2.h:
	removed _BSP_vme_bridge_irq variable and BSP_PIC_DO_EOI definition.
	Support for VME IRQ software priorities was incomplete/incorrect
	on this BSP.
2007-01-30 07:01:29 +00:00
Till Straumann
55f2643fcd * Makefile.am, preinstall.am, include/bsp.h:
Use VME DMA support implemented by vmeUniverse and
	libbsp/powerpc/shared/vme/vme_universe_dma.c
	Added explanation for use of BSP_PIC_DO_EOI by
	BSP implementors who derive from this 'include/bsp.h'.
2007-01-30 06:56:24 +00:00
Till Straumann
8f287557c6 * Makefile.am, preinstall.am, include/bsp.h,
* vme/vmeconfig.c (removed), vme/VMEConfig.h (added):
	cleaned up vme support - use files from libbsp/powerpc/shared/vme
	and define BSP specifica in VMEConfig.h.
	Use VME DMA support implemented by vmeUniverse and
	libbsp/powerpc/shared/vme/vme_universe_dma.c
2007-01-30 06:53:10 +00:00
Till Straumann
dbffeacdc1 * Makefile.am, preinstall.am, include/bsp.h,
* vme/vmeconfig.c (removed), vme/VME.h (removed):
	cleaned up vme support - use files from libbsp/powerpc/shared/vme
	and define BSP specifica in VMEConfig.h.
	Use VME DMA support implemented by vmeUniverse and
	libbsp/powerpc/shared/vme/vme_universe_dma.c
2007-01-30 06:50:00 +00:00
Till Straumann
ff3a16d591 * Makefile.am:
added new files in shared/vmeUniverse to EXTRA_DIST
2007-01-30 06:38:22 +00:00
Ralf Corsepius
fa9ed825ef 2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* GT64260/MVME5500I2C.c: Eliminate u32.
2007-01-29 05:29:12 +00:00
Ralf Corsepius
59b95d9869 2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* GT64260/MVME5500I2C.c, pci/pci.c: Eliminate unchar.
2007-01-29 05:25:59 +00:00
Ralf Corsepius
5ea0caad27 2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/mw-fb/mw_fb.h: Eliminate __u32, __u16.
2007-01-29 04:45:29 +00:00
Ralf Corsepius
5f477772d3 2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* console/fb_vga.c: Eliminate __u16, __u32.
2007-01-29 04:44:39 +00:00
Ralf Corsepius
874a8571e7 Remove. 2007-01-28 06:16:14 +00:00
Ralf Corsepius
8deda62402 2007-01-28 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/libc/gethostbyht.c: Remove warning on unused vars.
	Remove isblank (supposed to be provided by libc).
2007-01-28 03:58:10 +00:00
Ralf Corsepius
7c0f1d4bc2 2007-01-27 Ralf Corsépius <ralf.corsepius@rtems.org>
* libblock/src/show_bdbuf.c: Convert from DOS to UNIX.
2007-01-27 18:21:05 +00:00
Ralf Corsepius
e979fc841f Fix typos. 2007-01-27 07:29:30 +00:00
Ralf Corsepius
2e908e6b78 2007-01-27 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/include/rtems/system.h: Remove __RTEMS_MAJOR__,
	 __RTEMS_MINOR__, __RTEMS_REVISION__ (moved to cpuopt.h).
	* configure.ac: Dynamically derive __ __RTEMS_MAJOR__,
	__RTEMS_MINOR__, __RTEMS_REVISION__ from _RTEMS_VERSION.
	Add __RTEMS_MAJOR__, __RTEMS_MINOR__,__RTEMS_REVISION__ to cpuopt.h.
2007-01-27 07:28:06 +00:00
Ralf Corsepius
4b3a3e1d26 Remove __RTEMS_MAJOR__,
__RTEMS_MINOR__, __RTEMS_REVISION__ (moved to cpuopt.h).
2007-01-27 07:27:52 +00:00
Ralf Corsepius
51405b94e8 Dynamically derive __ __RTEMS_MAJOR__,
__RTEMS_MINOR__, __RTEMS_REVISION__ from _RTEMS_VERSION.
Add __RTEMS_MAJOR__, __RTEMS_MINOR__,__RTEMS_REVISION__ to cpuopt.h.
2007-01-27 07:27:41 +00:00
Ralf Corsepius
7246b0c9b1 Cosmetics. 2007-01-26 06:18:49 +00:00
Thomas Doerfler
4de554eb10 fixed typo in console/console.c 2007-01-24 13:04:23 +00:00
Joel Sherrill
0b7edb75f3 Formatting. 2007-01-23 16:49:11 +00:00
Joel Sherrill
14c7716c49 Formatting. 2007-01-22 23:02:45 +00:00
Eric Norum
1bf40dc84c Add capability to lock at 10-half.
Expand report to include auto/fixed status
2007-01-22 16:55:23 +00:00
Till Straumann
ce4f46651f 2007-01-19 Till Straumann <strauman@slac.stanford.edu>
* mvme5500/Makefile.am, mvme5500/preinstall.am,
	* mvme5500/vme/VME.h, mvme5500/vme/VMEConfig.h,
	* mvme5500/vme/vmeconfig.c:
	removed copies of vmeconfig.c, VME.h - use generic
	versions instead.
2007-01-19 20:45:24 +00:00
Till Straumann
8b77bd8f70 *** empty log message *** 2007-01-19 20:41:52 +00:00
Till Straumann
5a33479a64 2007-01-19 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am:
	moved VME.h from libbsp/powerpc/shared/vme to
	libbsp/shared/vmeUniverse; eventually, this (and other)
	VME API headers should migrate to cpukit.
2007-01-19 20:40:12 +00:00
Till Straumann
af2898d78c 2007-01-19 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am:
	moved VME.h from libbsp/powerpc/shared/vme to
	libbsp/shared/vmeUniverse; eventually, this (and other)
	VME API headers should migrate to cpukit.
2007-01-19 20:32:43 +00:00
Ralf Corsepius
280e1863ff 2007-01-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/Cygwin-posix.cfg, custom/FreeBSD-posix.cfg,
	custom/HPUX9-posix.cfg, custom/Linux-posix.cfg,
	custom/Solaris-posix.cfg, custom/armulator.cfg, custom/av5282.cfg,
	custom/bare.cfg, custom/csb336.cfg, custom/csb360.cfg,
	custom/dmv152.cfg, custom/edb7312.cfg, custom/ep1a.cfg,
	custom/erc32.cfg, custom/erc32nfp.cfg, custom/gba.cfg,
	custom/gen405.cfg, custom/gen5200.cfg, custom/gen68302.cfg,
	custom/gen68340.cfg, custom/gen68360.cfg, custom/gensh1.cfg,
	custom/gensh2.cfg, custom/gensh4.cfg, custom/gp32.cfg,
	custom/h8sim.cfg, custom/helas403.cfg, custom/hurricane.cfg,
	custom/i386ex.cfg, custom/idp.cfg, custom/jmr3904.cfg,
	custom/leon2.cfg, custom/leon3.cfg, custom/mbx821_002b.cfg,
	custom/mbx8xx.cfg, custom/mcf5206elite.cfg, custom/mcf5235.cfg,
	custom/mcp750.cfg, custom/mpc8260ads.cfg, custom/mrm332.cfg,
	custom/mtx603e.cfg, custom/mvme136.cfg, custom/mvme147.cfg,
	custom/mvme162.cfg, custom/mvme162lx.cfg, custom/mvme167.cfg,
	custom/mvme2100.cfg, custom/mvme2307.cfg, custom/mvme5500.cfg,
	custom/ods68302.cfg, custom/pc386.cfg, custom/psim.cfg,
	custom/rbtx4925.cfg, custom/score603e.cfg, custom/sim68000.cfg,
	custom/simcpu32.cfg, custom/simsh4.cfg, custom/simsh7032.cfg,
	custom/simsh7045.cfg, custom/ss555.cfg, custom/ts_386ex.cfg: Add -g
	to CFLAGS_OPTIMIZE_V.
2007-01-18 11:27:17 +00:00
Ralf Corsepius
2f6b417eb6 Add -g to CFLAGS_OPTIMIZE_V. 2007-01-18 11:27:07 +00:00
Ralf Corsepius
596629a20d 2007-01-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/gensh1.cfg, custom/gensh2.cfg, custom/gensh4.cfg,
	custom/hurricane.cfg, custom/rbtx4925.cfg, custom/simsh4.cfg:
	Use $(NM) -g -n instead of $(NM) -n.
2007-01-18 10:21:37 +00:00
Ralf Corsepius
ee8282993f Use $(NM) -g -n instead of $(NM) -n. 2007-01-18 10:21:00 +00:00
Ralf Corsepius
5ef125f5f3 2007-01-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/Cygwin-posix.cfg, custom/FreeBSD-posix.cfg,
	custom/HPUX9-posix.cfg, custom/Linux-posix.cfg,
	custom/Solaris-posix.cfg: Use $(NM) -g -n instead of $(NM) -ng.
2007-01-18 10:13:59 +00:00
Ralf Corsepius
4cb2634458 Use $(NM) -g -n instead of $(NM) -ng. 2007-01-18 10:13:41 +00:00
Ralf Corsepius
0a4d609ff7 2007-01-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/Linux-posix.cfg, custom/Solaris-posix.cfg,
	custom/armulator.cfg, custom/av5282.cfg, custom/bare.cfg,
	custom/brs5l.cfg, custom/csb336.cfg, custom/csb337.cfg,
	custom/csb350.cfg, custom/csb360.cfg, custom/dmv152.cfg,
	custom/edb7312.cfg, custom/ep1a.cfg, custom/erc32.cfg,
	custom/erc32nfp.cfg, custom/gba.cfg, custom/gen405.cfg,
	custom/gen5200.cfg, custom/gen68302.cfg, custom/gen68340.cfg,
	custom/gen68360.cfg, custom/genmongoosev.cfg, custom/gensh1.cfg,
	custom/gensh2.cfg, custom/gensh4.cfg, custom/gp32.cfg,
	custom/h8sim.cfg, custom/helas403.cfg, custom/hurricane.cfg,
	custom/i386ex.cfg, custom/idp.cfg, custom/jmr3904.cfg,
	custom/leon2.cfg, custom/leon3.cfg, custom/mbx821_002b.cfg,
	custom/mbx8xx.cfg, custom/mcf5206elite.cfg, custom/mcf5235.cfg,
	custom/mcp750.cfg, custom/mpc8260ads.cfg, custom/mrm332.cfg,
	custom/mtx603e.cfg, custom/mvme136.cfg, custom/mvme147.cfg,
	custom/mvme162.cfg, custom/mvme162lx.cfg, custom/mvme167.cfg,
	custom/mvme2100.cfg, custom/mvme2307.cfg, custom/mvme5500.cfg,
	custom/no_bsp.cfg, custom/ods68302.cfg, custom/pc386.cfg,
	custom/pc386dx.cfg, custom/pc486.cfg, custom/pc586.cfg,
	custom/pc686.cfg, custom/pck6.cfg, custom/psim.cfg,
	custom/rbtx4925.cfg, custom/rbtx4938.cfg, custom/score603e.cfg,
	custom/shsim.cfg, custom/sim68000.cfg, custom/simcpu32.cfg,
	custom/simsh4.cfg, custom/simsh7032.cfg, custom/simsh7045.cfg,
	custom/ss555.cfg, custom/ts_386ex.cfg, custom/uC5282.cfg: Backport
	various changes from CVS-HEAD.
2007-01-18 08:41:17 +00:00
Ralf Corsepius
32fe9962f1 Backport various changes from CVS-HEAD. 2007-01-18 08:41:06 +00:00
Joel Sherrill
ea7e978df6 Fixed spacing. 2007-01-17 14:17:34 +00:00
Till Straumann
bef8b92b57 2007-01-16 Till Straumann <strauman@slac.stanford.edu>
* vmeUniverse/vmeTsi148.c, vmeUniverse/vmeTsi148.h,
	* vmeUniverse/vmeUniverse.c, vmeUniverse/vmeUniverse.h,
	* vmeUniverse/vme_am_defs.h:
	Added SLAC/Stanford Authorship Note / Copyright + Liability Disclaimer.
2007-01-17 06:30:23 +00:00
Till Straumann
29f73d3ed3 2007-01-16 Till Straumann <strauman@slac.stanford.edu>
* libi2c/libi2c.c, libi2c/libi2c.h:
	Added SLAC/Stanford Authorship Note / Copyright + Liability Disclaimer.
2007-01-17 06:18:30 +00:00
Till Straumann
37b9679238 2007-01-16 Till Straumann <strauman@slac.stanford.edu>
* libnetworking/rtems/rtems_mii_ioctl.c,
	* libnetworking/rtems/rtems_mii_ioctl.h,
	* libnetworking/rtems/rtems_mii_ioctl_kern.c:
	Added SLAC/Stanford Authorship Note / Copyright + Liability Disclaimer.
2007-01-17 06:12:56 +00:00
Till Straumann
0945123ecd 2007-01-16 Till Straumann <strauman@slac.stanford.edu>
* libchip/i2c/i2c-2b-eeprom.c, libchip/i2c/i2c-2b-eeprom.h,
	* libchip/i2c/i2c-ds1621.c, libchip/i2c/i2c-ds1621.h:
	Added SLAC/Stanford Authorship Note / Copyright + Liability Disclaimer.
2007-01-17 06:02:41 +00:00
Till Straumann
4712cdcc8d 2007-01-16 Till Straumann <strauman@slac.stanford.edu>
* mpc6xx/mmu/pte121.h, mpc6xx/mmu/pte121.c:
	Added SLAC/Stanford Authorship Note / Copyright + Liability Disclaimer.
2007-01-17 05:55:45 +00:00
Till Straumann
88fcc6d45a * acinclude.m4: reverted erroneous addition of 'beatnik' subdir. 2007-01-17 05:41:51 +00:00
Till Straumann
2b0a037051 2007-01-16 Till Straumann <strauman@slac.stanford.edu>
* ep1a/vme/vmeconfig.c, mvme5500/pci/pcifinddevice.c,
	* mvme5500/startup/pgtbl_activate.c, mvme5500/vectors/bspException.h,
	* mvme5500/vectors/exceptionhandler.c, mvme5500/vme/VME.h,
	* mvme5500/vme/vmeconfig.c, score603e/vme/vmeconfig.c, shared/pci/pcifinddevice.c,
	* shared/startup/pgtbl_activate.c, shared/startup/pgtbl_setup.c,
	* shared/startup/probeMemEnd.c, shared/startup/sbrk.c, shared/vme/VME.h,
	* shared/vme/VMEConfig.h, shared/vme/vme_universe.c, shared/vme/vmeconfig.c:
	Added SLAC/Stanford Authorship Note / Copyright + Liability Disclaimer.
2007-01-16 23:09:50 +00:00
Ralf Corsepius
a4d1521f1c Replace nosrc.rpm with src.rpm 2007-01-15 09:51:09 +00:00
Ralf Corsepius
7a2746b7ad 2007-01-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* common/rtems.texi.in: Use bugzilla for RTEMSBUGS.
	Remove RTEMSGNATS.
2007-01-15 09:15:14 +00:00
Ralf Corsepius
c8d34d7e8e More tweaks. 2007-01-15 08:41:05 +00:00
Ralf Corsepius
9627be9c99 More tweaks. 2007-01-15 08:24:52 +00:00
Ralf Corsepius
5477a89a90 Update. 2007-01-15 07:29:21 +00:00
Ralf Corsepius
cf56606a5d 2007-01-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* started/binaries.t, started/buildc.t, started/tversions.texi.in:
	Various update to reflect current toolchains.
2007-01-15 07:28:29 +00:00
Ralf Corsepius
ab355bbc26 2007-01-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Reflect having moved setup.def.
	Eliminate gcc3*.
2007-01-15 07:24:01 +00:00
Ralf Corsepius
07beb83275 2007-01-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* setup.def: New (Formerly in ../scripts).
2007-01-15 03:38:04 +00:00
cvs2git
cbc4f7aae5 This commit was manufactured by cvs2svn to create branch 'rtems-4-7-branch'.
Cherrypick from master 2007-01-15 03:35:24 UTC Ralf Corsepius <ralf.corsepius@rtems.org> 'New (Formerly in ../scripts).':
    doc/setup.def
2007-01-15 03:35:25 +00:00
Ralf Corsepius
7812763ae1 New. 2007-01-12 14:49:41 +00:00
Ralf Corsepius
51233fd379 Upgrade to gcc-core-4.1.1-rtems4.7-20070102.diff 2007-01-12 14:45:27 +00:00
Ralf Corsepius
769cf2e06c Bump GCC_RPMREL = 6 2007-01-12 10:58:53 +00:00
Ralf Corsepius
a6ad5c52bf Upgrade to newlib-1.15.0 2007-01-12 10:45:35 +00:00
Ralf Corsepius
c0475f9dd6 Add newlib-1.15.0 support. 2007-01-12 10:36:43 +00:00
Ralf Corsepius
a420327cc2 New. 2007-01-12 10:33:47 +00:00
Ralf Corsepius
5af0411f45 Add BINUTILS += 2007-01-12 09:18:53 +00:00
Ralf Corsepius
e7f218dc78 Add BINUTILS_OPTS. 2007-01-12 09:17:05 +00:00
Joel Sherrill
ca3bacb0f9 2007-01-11 Joel Sherrill <joel@OARcorp.com>
* score/macros/rtems/score/object.inl: Fix macro implementation so it
	compiles in single processor configuration.
2007-01-11 22:28:53 +00:00
Thomas Doerfler
5299575cc3 added missing file libblock/src/show_bdbuf.c 2007-01-10 14:25:25 +00:00
Ralf Corsepius
ace2542c00 Update bugfix address 2007-01-10 06:33:50 +00:00
Ralf Corsepius
629a296ac9 AC_PREREQ(2.60) 2007-01-08 16:51:11 +00:00
Ralf Corsepius
0b04b30803 2007-01-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* acinclude.m4, configure.ac: AC_PREREQ(2.60).
2007-01-08 16:50:58 +00:00
Ralf Corsepius
47f295390f Regenerate. 2007-01-08 08:43:45 +00:00
Ralf Corsepius
87caabefe1 2007-01-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* ampolish3: Use MKDIR_P instead of mkdir_p.
2007-01-08 08:40:51 +00:00
Ralf Corsepius
fee0dc4d2f 2007-01-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove scripts/.
2007-01-08 08:36:31 +00:00
Ralf Corsepius
c624ce8908 Remove (Obsolete). 2007-01-08 08:24:50 +00:00
Ralf Corsepius
326e457ca5 2007-01-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/aio.h: s/aoi_lio_opcode/aio_lio_opcode/
	(BZ 1203).
2007-01-02 06:35:51 +00:00
Joel Sherrill
3f933c9b91 2006-12-20 Joel Sherrill <joel@OARcorp.com>
* posix_users/thread.t: Correct spelling error.
2006-12-20 21:14:46 +00:00
Till Straumann
7e278aa202 * startup/bspstart.c: Changed BSP_installVME_isr() so that
the special handling of a 'FPGA interrupt' [this FPGA is *not*
	present on the uC5282 module but is externally connected to
	IRQ1 on Eric Norum's particular 'motherboard'] is only
	activated when connecting to the special vectors > 192.
	The change allows us ordinary users [:-)] to use IRQ1
	normally, simply by connecting an ISR to vector 64+1...
	Also, BSP_enable_irq_at_pic(), BSP_disable_irq_at_pic(),
	BSP_irq_is_enabled_at_pic() were introduced (compat. with
	some PPC BSPs).
2006-12-18 22:21:19 +00:00
Thomas Doerfler
36cb812bbc corrected bug in ata.c to avoid lockup of libblock
added remote frequest support to gen5200 BSP
2006-12-18 09:46:59 +00:00
Till Straumann
d761931ed0 2006-12-14 Till Straumann <strauman@slac.stanford.edu>
* m68k/mcf5282/include/mcf5282.h: fixed wrong value
	of MCF5282_QSPI_QDLYR_SPE.
2006-12-14 23:09:11 +00:00
Joel Sherrill
c8f69360bc Fixed comment -- must be less than 80 characters wide. 2006-12-14 12:24:44 +00:00
Till Straumann
61d5ec9714 2006-12-13 Till Straumann <strauman@slac.stanford.edu>
* mvme5500/Makefile.am, mvme5500/preinstall.am:
	need to install bsp/vme_am_defs.h
2006-12-13 21:56:13 +00:00
Till Straumann
3fadd7a8a0 * oops - had worked on the wrong file. Reverted changes... 2006-12-13 21:08:44 +00:00
Till Straumann
138b8893ca * ChangeLog: fixed date of TS' last entry. 2006-12-13 21:03:50 +00:00
Till Straumann
93cd2c6efe 2006-12-13 Till Straumann <strauman@slac.stanford.edu>
* shared/vme/vmeconfig.c, shared/vme/vme_universe.c:
	use symbolic flag instead of numerical value
	(vmeUniverseInstallIrqMgrAlt()). Define __INSIDE_RTEMS_BSP__
	before including <bsp/vmeUniverse.h>
2006-12-13 20:48:37 +00:00
Till Straumann
a175c1fb77 * vmeUniverse/vme_am_defs.h: Added address modifiers for 2eVME. Added
flags for 2eSST and DBW16.

	* vmeUniverse/vmeUniverse.h: Removed AM definitions and include vme_am_defs.h
	instead. Declare new routine vmeUniverseMapCRG(). Export 'irq manager' API
	only if __INSIDE_RTEMS_BSP__ defined. Renamed 'shared' argument to
	vmeUniverseInstallIrqMgrAlt() to 'flags' since now more options are available.
	Added new flag to install 'posted-write' workaround.

	* vmeUniverse/vmeUniverse.c: Allow BSP to override BSP_PCI2LOCAL_ADDR()
	macro. Data width of outbound port can now be restricted to 16-bit
	(if new DBW16 flag set in address modifier). Added vmeUniverseMapCRG()
	for mapping local registers onto VME. Interrupt manager now implements
	a workaround (enabled at installation time) which flushes the write-fifo
	after user ISR returns. This requires the universe's registers to be
	accessible from VME (either CSR space or CRG mapped to A16/A24/A32),
	though.

	* vmeUniverse/vmeTsi148.h: vmeTsi148ClearVMEBusErrors() now returns
	the fault address as a 32-bit address (not ulonglong anymore). The
	driver only supports 32-bit addresses. Declare new routine vmeTsi148MapCRG().
	Export 'irq manager' API only if __INSIDE_RTEMS_BSP__ defined.
	Renamed 'shared' argument to vmeTsi148InstallIrqMgrAlt() to 'flags'
	to allow more options to be supported. Added comments explaining the
	'posted-write' workaround implemented by the interrupt manager.

	* vmeUniverse/vmeTsi148.c: Clear 'SYSFAIL' during initialization.
	Allow BSP to override BSP_PCI2LOCAL_ADDR() macro. Added support for
	2eSST when configuring windows (untested - I have no 2eSST).
	Added vmeTsi148MapCRG() for mapping local registers onto VME.
	Implemented 'posted-write' workaround for interrupt manager
	(consult source for details).
2006-12-13 20:39:29 +00:00
Joel Sherrill
31cd77864b 2006-12-13 Joel Sherrill <joel@OARcorp.com>
PR 1181/bsps
	* optman/rtems/no-msg.c: Clean up dead code.
2006-12-13 14:49:38 +00:00
Joel Sherrill
70443fbbdf 2006-12-13 Alexey Shamrin <shamrin@gmail.com>
PR 1189/bsps
	* console/outch.c: If you print a character with the code larger than
	127 (extended ASCII) to the VGA console, then it blinks. The reason:
	char == signed char, so such characters get represented by negative
	numbers. The sign bit then goes to attribute byte, resulting in the
	blinking.
2006-12-13 12:35:28 +00:00
Ralf Corsepius
6ac4774dd7 2006-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/rtems-ampolish.m4: Use am_aux_dir/ampolish3.
2006-12-13 05:39:46 +00:00
Ralf Corsepius
8bcd65b292 Use am_aux_dir/ampolish3. 2006-12-13 05:37:15 +00:00
Ralf Corsepius
640495db3a Fix ugly typos. 2006-12-13 02:52:34 +00:00
Ralf Corsepius
086917ba30 2006-12-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/rtems-ampolish.m4: Require AM_MAINTAINER_MODE.
	* aclocal/rtems-top.m4: Remove RTEMS_AMPOLISH.
	* aclocal/project-root.m4: Require RTEMS_AMPOLISH.
2006-12-13 02:26:56 +00:00
Ralf Corsepius
4a81293451 Require RTEMS_AMPOLISH. 2006-12-13 02:26:16 +00:00
Ralf Corsepius
38d74a3f85 Remove RTEMS_AMPOLISH. 2006-12-13 02:26:00 +00:00
Ralf Corsepius
7a1d233117 Require AM_MAINTAINER_MODE. 2006-12-13 02:25:42 +00:00
Ralf Corsepius
f65c7eb304 2006-12-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/rtems-ampolish.m4: Require AM_MAINTAINER_MODE.
	* aclocal/rtems-top.m4: Remove RTEMS_AMPOLISH.
	* configure.ac: Add RTEMS_AMPOLISH.
2006-12-12 16:45:39 +00:00
Ralf Corsepius
5054b0a917 Add RTEMS_AMPOLISH. 2006-12-12 16:44:53 +00:00
Ralf Corsepius
b02783fefd Require AM_MAINTAINER_MODE. 2006-12-12 16:44:41 +00:00
Ralf Corsepius
5a89374297 Remove RTEMS_AMPOLISH. 2006-12-12 16:44:26 +00:00
Ralf Corsepius
80e88f244a 2006-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/rtems_glue.c: Remove local
	extern strdup.
2006-12-08 09:11:24 +00:00
Ralf Corsepius
1f01d5d7a6 Remove local extern strdup. 2006-12-08 09:11:05 +00:00
Ralf Corsepius
890c768e9e 2006-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/libio.h, libcsupport/src/read.c,
	libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_dir.c,
	libfs/src/dosfs/msdos_file.c, libfs/src/imfs/deviceio.c,
	libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_directory.c,
	libfs/src/imfs/memfile.c, libnetworking/lib/ftpfs.c,
	libnetworking/lib/tftpDriver.c, libnetworking/rtems/rtems_syscall.c:
	Use size_t instead of uint32_t for read/write count-args.
2006-12-08 07:24:05 +00:00
Ralf Corsepius
9e5d4952d5 Use size_t instead of uint32_t ad/write count-args. 2006-12-08 07:23:00 +00:00
Ralf Corsepius
1e65741d06 2006-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/src/timerserverfirewhen.c: Remove local
	extern _Timer_Seconds_chain.
	* rtems/src/timerserverfireafter.c: Remove local
	extern _Timer_Ticks_chain.
2006-12-08 06:55:47 +00:00
Ralf Corsepius
1b7c831311 Remove local extern _Timer_Ticks_chain. 2006-12-08 06:55:20 +00:00
Ralf Corsepius
c0527a2d7b Remove local extern _Timer_Seconds_chain. 2006-12-08 06:55:04 +00:00
Ralf Corsepius
52781f4777 2006-12-04 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/inline/rtems/score/chain.inl: Add const qualifiers (works
	  around 651 aliasing bugs).
2006-12-04 14:46:11 +00:00
Ralf Corsepius
4b1756466e Backport from HEAD 2006-12-04 14:43:58 +00:00
Ralf Corsepius
9d7508e4f6 2006-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: New BUG-REPORT address.
2006-12-02 06:10:26 +00:00
Ralf Corsepius
5d91bedec0 2006-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: New BUG-REPORT address.
2006-12-02 06:09:45 +00:00
Ralf Corsepius
997c921551 Cleanup (Backport from HEAD). 2006-11-30 06:58:56 +00:00
Ralf Corsepius
3153d3f17c 2006-11-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/Cygwin-posix.cfg, custom/FreeBSD-posix.cfg,
	custom/HPUX9-posix.cfg, custom/Linux-posix.cfg
	custom/Solaris-posix.cfg, custom/armulator.cfg
	custom/bare.cfg, custom/csb336.cfg
	custom/csb337.cfg, custom/csb350.cfg
	custom/dmv152.cfg, custom/edb7312.cfg
	custom/ep1a.cfg, custom/erc32.cfg
	custom/erc32nfp.cfg, custom/gba.cfg
	custom/gen405.cfg, custom/gen5200.cfg
	custom/gen68302.cfg, custom/gen68340.cfg
	custom/gen68360.cfg, custom/genmongoosev.cfg
	custom/gensh1.cfg, custom/gensh2.cfg
	custom/gensh4.cfg, custom/gp32.cfg
	custom/h8sim.cfg, custom/helas403.cfg
	custom/hurricane.cfg, custom/i386ex.cfg
	custom/idp.cfg, custom/jmr3904.cfg
	custom/leon2.cfg, custom/leon3.cfg
	custom/mbx821_002b.cfg, custom/mbx8xx.cfg
	custom/mcp750.cfg, custom/mpc8260ads.cfg
	custom/mrm332.cfg, custom/mtx603e.cfg
	custom/mvme136.cfg, custom/mvme147.cfg
	custom/mvme162.cfg, custom/mvme162lx.cfg
	custom/mvme167.cfg, custom/mvme2100.cfg
	custom/mvme2307.cfg, custom/mvme5500.cfg
	custom/ods68302.cfg, custom/pc386.cfg
	custom/psim.cfg, custom/rbtx4925.cfg
	custom/rbtx4938.cfg, custom/score603e.cfg
	custom/shsim.cfg, custom/sim68000.cfg
	custom/simcpu32.cfg, custom/simsh4.cfg
	custom/simsh7032.cfg, custom/simsh7045.cfg
	custom/ss555.cfg, custom/ts_386ex.cfg:
	Cleanup (Backport from HEAD).
2006-11-30 06:55:43 +00:00
Joel Sherrill
161d158209 2006-11-20 Joel Sherrill <joel@OARcorp.com>
* sp27/init.c, sp27/sp27.scn: Correct configured number of semaphores
	and make output more compliant with other tests.
2006-11-20 23:18:37 +00:00
Ralf Corsepius
c0e38d1b90 2006-11-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove ampolish3.
2006-11-20 05:59:19 +00:00
Ralf Corsepius
f57174cdf6 2006-11-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Add ampolish3.
	* bootstrap: Add -r (autoreconf).
2006-11-20 05:44:15 +00:00
Ralf Corsepius
0cfca5fcea 2006-11-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* bootstrap: Add -p (regenerate preinstall.ams).
2006-11-18 01:59:44 +00:00
Joel Sherrill
540c746db9 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* runtest: Correct tool name to match 4.7.
2006-11-17 23:05:58 +00:00
Joel Sherrill
91cee2ef87 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* psxsem01/init.c: Account for change in POSIX semaphore time handling.
	Previously the timeout was not absolute time and checked BEFORE
	attempting to lock semaphore.
2006-11-17 23:04:38 +00:00
Joel Sherrill
bd43cde824 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* sp09/screen12.c, sp16/task2.c, sp16/task3.c: Ensure tests generate
	cases intended on all targets possible with new heap algorithm.
2006-11-17 23:03:08 +00:00
Joel Sherrill
012739eb9e 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* score/inline/rtems/score/object.inl, score/src/objectnametoid.c:
	Properly honor searching only local node even when on single CPU
	system.
2006-11-17 22:59:28 +00:00
Joel Sherrill
b5779dc1a3 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* score/src/coresemseize.c: Add missing ISR enable.
2006-11-17 22:58:21 +00:00
Joel Sherrill
1d4747f226 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* score/src/heapwalk.c: Use printk not printf.
2006-11-17 22:57:37 +00:00
Joel Sherrill
89e0ecc7b9 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* libmisc/rtmonuse/rtmonuse.c: Do not use float for calculations.
2006-11-17 22:55:39 +00:00
Joel Sherrill
e992fa47b8 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/sync.c: Do not dereference NULL reent.
2006-11-17 22:54:33 +00:00
Joel Sherrill
e2cafb006a 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* posix/src/semtimedwait.c: Used wrong constant for blocking with bad
	timeout value.
2006-11-17 22:52:24 +00:00
Joel Sherrill
ce6568eb65 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* posix/src/keygetspecific.c, posix/src/keysetspecific.c: Correct
	indexing of key data to use api and index NOT class and index.
	Class is always 1.
2006-11-17 22:51:47 +00:00
Joel Sherrill
f791c6c2c1 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* timer/timer.c: Update timer overhead for start/stop.
2006-11-17 22:45:50 +00:00
Joel Sherrill
88b86cb55a 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* runtest.in: Change toolname to match 4.7.
2006-11-17 22:45:28 +00:00
Joel Sherrill
b066112982 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* clock_driver_stub.c, clockdrv_shell.c: Use common clock driver
	template and eliminate all fast idle code specific to this BSP. This
	eliminates a fair amount of code in the BSP clock driver and
	bsp_startup. The LEON3 has to do a scan of the AMBA bus to find the
	timer so I added the new hook Clock_driver_support_find_timer to
	support this. In general, there was some clean up to the file headers
	of various files.
2006-11-17 22:44:17 +00:00
Joel Sherrill
2714a925c8 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* clock/clockdrv.c: Add copyright.
2006-11-17 22:41:34 +00:00
Joel Sherrill
a1d09f90b5 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* itrontask04/init.c, itrontask04/itrontask04.scn: Cannot print with
	dispatching disabled so fix test not to print while dispatching is
	disabled.
2006-11-17 22:40:12 +00:00
Joel Sherrill
8c3ab9fcd8 2006-11-17 Joel Sherrill <joel@OARcorp.com>
* runtest: Change toolname to match 4.7.
2006-11-17 22:36:21 +00:00
Joel Sherrill
5438bca377 2006-11-16 Joel Sherrill <joel@OARcorp.com>
* shared/bspstart.c, shared/start.S: Use common clock driver template
	and eliminate all fast idle code specific to this BSP. This
	eliminates a fair amount of code in the BSP clock driver and
	bsp_startup. The LEON3 has to do a scan of the AMBA bus to find the
	timer so I added the new hook Clock_driver_support_find_timer to
	support this. In general, there was some clean up to the file headers
	of various files.
2006-11-16 16:31:20 +00:00
Joel Sherrill
7b8dee3fbc 2006-11-16 Joel Sherrill <joel@OARcorp.com>
* clock/ckinit.c, startup/bspstart.c: Use common clock driver template
	and eliminate all fast idle code specific to this BSP. This
	eliminates a fair amount of code in the BSP clock driver and
	bsp_startup. The LEON3 has to do a scan of the AMBA bus to find the
	timer so I added the new hook Clock_driver_support_find_timer to
	support this. In general, there was some clean up to the file headers
	of various files.
2006-11-16 16:31:18 +00:00
Joel Sherrill
99ffe87f4d 2006-11-16 Joel Sherrill <joel@OARcorp.com>
* clock/ckinit.c: Use common clock driver template and eliminate all
	fast idle code specific to this BSP. This eliminates a fair amount of
	code in the BSP clock driver and bsp_startup. The LEON3 has to do a
	scan of the AMBA bus to find the timer so I added the new hook
	Clock_driver_support_find_timer to support this. In general, there
	was some clean up to the file headers of various files.
2006-11-16 16:31:16 +00:00
Joel Sherrill
44dde18e64 2006-11-16 Joel Sherrill <joel@OARcorp.com>
* clock/ckinit.c, console/console.c: Use common clock driver template
	and eliminate all fast idle code specific to this BSP. This
	eliminates a fair amount of code in the BSP clock driver and
	bsp_startup. The LEON3 has to do a scan of the AMBA bus to find the
	timer so I added the new hook Clock_driver_support_find_timer to
	support this. In general, there was some clean up to the file headers
	of various files.
2006-11-16 16:31:14 +00:00
Ralf Corsepius
143902fc6a 2006-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Remove RTEMS_AMPOLISH3.
	Don't explictly pass CFLAGS_OPTIMIZE_V, CPU_CFLAGS.
	Compose CFLAGS. Append CFLAGS to ac_configure_args.
	* aclocal/bsp-configure.m4: AC_PREREQ(2.60).
	  Remove checks for AMPOLISH3.
	* aclocal/rtems-ampolish.m4: Pick up ampolish3 from ac_aux_dir.
	* aclocal/rtems-top.m4: Add RTEMS_AMPOLISH3.
	* ampolish3: Remove.
	* aclocal/prog-cc.m4: Remove CFLAGS.
2006-11-16 05:29:25 +00:00
Ralf Corsepius
5c64772fb5 AC_PREREQ(2.60).
Remove checks for AMPOLISH3.
2006-11-16 05:28:34 +00:00
Ralf Corsepius
fa919224a1 Pick up ampolish3 from ac_aux_dir. 2006-11-16 05:28:11 +00:00
Ralf Corsepius
b7314e6c9e Add RTEMS_AMPOLISH3. 2006-11-16 05:27:54 +00:00
Ralf Corsepius
faf986a840 Remove. 2006-11-16 05:27:37 +00:00
Ralf Corsepius
17e916063e Remove CFLAGS. 2006-11-16 05:27:09 +00:00
Ralf Corsepius
e98a72fa4e Remove RTEMS_AMPOLISH3.
Don't explictly pass CFLAGS_OPTIMIZE_V, CPU_CFLAGS.
Compose CFLAGS. Append CFLAGS to ac_configure_args.
2006-11-16 05:26:43 +00:00
Ralf Corsepius
53bd9fa015 2006-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Remove RTEMS_AMPOLISH3.
	* aclocal/rtems-ampolish.m4: Pick up ampolish3 from ac_aux_dir.
	* aclocal/rtems-top.m4: Add RTEMS_AMPOLISH3.
	* ampolish3: Remove.
2006-11-16 05:18:39 +00:00
Ralf Corsepius
454ce47172 Remove RTEMS_AMPOLISH3. 2006-11-16 05:18:14 +00:00
Ralf Corsepius
a56e0cb096 Remove. 2006-11-16 05:18:01 +00:00
Ralf Corsepius
cf8bec623d Add RTEMS_AMPOLISH3. 2006-11-16 05:17:46 +00:00
Ralf Corsepius
a679d578e8 Pick up ampolish3 from ac_aux_dir. 2006-11-16 05:17:29 +00:00
Ralf Corsepius
804606b5eb 2006-11-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* ampolish3: New.
2006-11-15 14:13:07 +00:00
cvs2git
284048512f This commit was manufactured by cvs2svn to create branch 'rtems-4-7-branch'.
Cherrypick from master 2006-11-15 14:12:01 UTC Ralf Corsepius <ralf.corsepius@rtems.org> '2006-11-15	Ralf Corsépius <ralf.corsepius@rtems.org>':
    ampolish3
    contrib/repo-conf/ChangeLog
2006-11-15 14:12:02 +00:00
Ralf Corsepius
4499640036 2006-11-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/target.m4: Remove RTEMS_OUTPUT_BUILD_SUBDIRS.
2006-11-15 09:58:18 +00:00
Ralf Corsepius
601e1b4b39 2006-11-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER.
2006-11-15 09:53:32 +00:00
Ralf Corsepius
c23b0fd6fc Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER. 2006-11-15 09:53:15 +00:00
Joel Sherrill
5b0f138d2e 2006-11-14 Jiri Gaisler <jiri@gaisler.com>
* cpu_asm.S: Properly support synchronous traps.
2006-11-14 21:44:09 +00:00
Ralf Corsepius
12fbe4956f 2006-11-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac, Makefile.am, rtems-4.7/Makefile.am: Remove tic4x.
	* rtems-4.7/tic4x/: Remove.
2006-11-14 16:54:15 +00:00
Ralf Corsepius
13f4eb67cb Remove tic4x 2006-11-14 16:53:01 +00:00
Ralf Corsepius
b4c5d96696 Remove. 2006-11-14 16:52:02 +00:00
Ralf Corsepius
7c17be80b4 Regenerate. 2006-11-14 16:26:29 +00:00
Ralf Corsepius
a2be29101a RTEMS_PROVIDES_STDINT_H, RTEMS_PROVIDES_INTTYPES_H. Use external stdint.h, inttypes.h. 2006-11-14 16:26:08 +00:00
Ralf Corsepius
ccf5bfa5f6 RTEMS_PROVIDES_STDINT_H, RTEMS_PROVIDES_INTTYPES_H. 2006-11-14 16:25:50 +00:00
Ralf Corsepius
db510c5488 Remove. 2006-11-14 16:25:12 +00:00
Ralf Corsepius
ec05baa478 2006-11-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Remove c4x.
2006-11-14 06:21:34 +00:00
Ralf Corsepius
37282eeb04 2006-11-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* cpu_supplement/Makefile.am, cpu_supplement/cpu_supplement.texi:
	Remove the tic4x.
2006-11-14 05:28:40 +00:00
Ralf Corsepius
ccdcc9ce94 2006-11-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/c4xsim.cfg, custom/c3xsim.cfg: Remove (Port not ready for
	  inclusion in release).
2006-11-14 04:45:04 +00:00
Ralf Corsepius
c6c7cd4c73 Remove (Not ready for inclusion in release). 2006-11-14 04:42:32 +00:00
Ralf Corsepius
bc05492d30 2006-11-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/cpu/Makefile.am: Remove c4x.
2006-11-14 04:38:49 +00:00
Ralf Corsepius
9666ea632b Remove (Not ready for inclusion in release). 2006-11-14 04:33:49 +00:00
Ralf Corsepius
556f1e76c8 2006-11-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/uC5282.cfg: Remove hard-code compiler flags.
	* custom/av5282.cfg, custom/csb360.cfg, custom/mcf5206elite.cfg,
	custom/mcf5235.cfg: Remove ASFLAGS, CPU_ASFLAGS (Unused).
2006-11-14 02:43:28 +00:00
Ralf Corsepius
aac2fff58b Remove hard-code compiler flags. 2006-11-14 02:43:13 +00:00
Ralf Corsepius
72fbdbbeaf Remove ASFLAGS, CPU_ASFLAGS (Unused). 2006-11-14 02:42:50 +00:00
Joel Sherrill
af6c22d238 2006-11-02 Steven Johnson <sjohnson@sakuraindustries.com>
* libnetworking/netdb.h, libnetworking/libc/gethostbyht.c,
	libnetworking/libc/gethostnamadr.c: This patch adds a functional
	gethostbyname_r to RTEMS. We were having problems with multiple
	threads calling gethostbyname, so we decided the best way to deal
	with it was to do it properly, rather than kludge up our code to make
	gethostbyname safe. We have found several slightly different
	parameter lists for this function, it does not seem to be standard.
	The one we used has the linux interface. In RTEMS there was an
	existing gethostbyname_r inside a #ifdef _THREAD_SAFE which was NOT
	Threadsafe, as this just called gethostbyname. So we have placed all
	of the additional code inside the #ifdef _THREAD_SAFE.
2006-11-02 21:49:02 +00:00
Joel Sherrill
112995e502 2006-11-01 Joel Sherrill <joel@OARcorp.com>
* bsp_specs: Fix typo.
2006-11-01 15:30:55 +00:00
Joel Sherrill
fa40f3b16f 2006-11-01 Joel Sherrill <joel@OARcorp.com>
* bsp_specs: Fix typo.
2006-11-01 15:24:48 +00:00
Joel Sherrill
4b77b83772 2006-11-01 Joel Sherrill <joel@OARcorp.com>
* bsp_specs: Fix typo.
2006-11-01 15:15:40 +00:00
Joel Sherrill
ae54141bff 2006-10-30 Joel Sherrill <joel@OARcorp.com>
PR 841/rtems
	* psxsem01/init.c: Make sem_timedwait more conformant to Open Group
	specification.
2006-10-30 22:21:44 +00:00
Joel Sherrill
f5c9b893fc 2006-10-30 Joel Sherrill <joel@OARcorp.com>
PR 841/rtems
	* itron/inline/rtems/itron/semaphore.inl,
	itron/macros/rtems/itron/semaphore.inl, itron/src/twai_sem.c,
	posix/include/rtems/posix/semaphore.h,
	posix/inline/rtems/posix/semaphore.inl,
	posix/src/semaphorewaitsupp.c, posix/src/semtimedwait.c,
	posix/src/semwait.c, rtems/src/semobtain.c,
	rtems/src/semtranslatereturncode.c,
	score/include/rtems/score/coresem.h, score/src/coresemseize.c: Make
	sem_timedwait more conformant to Open Group specification.
2006-10-30 22:21:07 +00:00
Joel Sherrill
d233c88057 2006-10-30 Joel Sherrill <joel@OARcorp.com>
* startup/rtems-ctor.cc: Conditionally disable non-GCC code.
2006-10-30 22:18:57 +00:00
Joel Sherrill
d1adbaed2a 2006-10-30 Joel Sherrill <joel@OARcorp.com>
* bsp_specs: Add crti, crtbegin, crtend, and crtn.
2006-10-30 22:17:12 +00:00
Joel Sherrill
85cef698a0 2006-10-30 Joel Sherrill <joel@OARcorp.com>
* include/.cvsignore: New file.
2006-10-30 17:07:28 +00:00
Joel Sherrill
32d19cbae1 2006-10-30 Joel Sherrill <joel@OARcorp.com>
* include/.cvsignore: New file.
2006-10-30 16:52:38 +00:00
Joel Sherrill
b295019571 2006-10-25 Jennifer Averett <jennifer@oarcorp.com>
* libcsupport/src/termios.c: Change attribute of semaphore. It was
	counting interrupts not acting as a condition synchronization mutex.
	Since the caller did not always need to obtain the semaphore, it was
	not being decremented until there was no data. This could occur after
	hours of running a system and thousands of interrupts. The code in
	fillBufferQueue would spin until it had consumed all of those
	semaphore counts.
2006-10-25 11:27:28 +00:00
Ralf Corsepius
b94e68dd04 Bumb version to 0.4 2006-10-25 01:29:56 +00:00
Ralf Corsepius
63e3f71425 Let rtems-@RTEMS_API@-repo-conf.spec depend on configure.ac 2006-10-25 01:29:45 +00:00
Ralf Corsepius
73a309b72a Bump version to 0.3 2006-10-24 14:55:35 +00:00
Ralf Corsepius
045b9a6ee7 New URL ftp://ftp.rtems.org/pub/rtems/linux 2006-10-24 14:55:23 +00:00
Ralf Corsepius
3f2b8ebdc2 s/binutils-2.17-rtems4.7-20060921/binutils-2.17-rtems4.7-20061021/ 2006-10-24 05:18:22 +00:00
Ralf Corsepius
15cde9a151 Remove (Unused) 2006-10-24 05:12:23 +00:00
Ralf Corsepius
ab04516f36 Resurrect (Still in use ;) 2006-10-24 05:10:50 +00:00
Ralf Corsepius
c25e26afd7 Remove (Unused) 2006-10-24 05:06:15 +00:00
Ralf Corsepius
f760aeff11 Remove (Unused). 2006-10-24 05:05:44 +00:00
Ralf Corsepius
a08be7a0e1 New. 2006-10-24 05:04:46 +00:00
Ralf Corsepius
ab4512cd61 Sync with HEAD 2006-10-24 05:03:51 +00:00
Ralf Corsepius
9833ce0fef Update to gcc-core-4.1.1-rtems-20060909.diff/newlib-1.14.0-rtems4.7-20061019.diff 2006-10-21 10:10:54 +00:00
Ralf Corsepius
a8e7b33c68 New. 2006-10-21 10:06:26 +00:00
Ralf Corsepius
40a253b355 Change URL to ftp://ftp.gnu.org/pub/gnu 2006-10-21 10:03:45 +00:00
Ralf Corsepius
000e606a42 New. Add memleak patch. 2006-10-21 10:02:23 +00:00
Ralf Corsepius
035be149e3 Set version to 4.7 2006-10-21 05:21:35 +00:00
cvs2git
fc4035b105 This commit was manufactured by cvs2svn to create branch 'rtems-4-7-branch'.
Cherrypick from master 2006-10-21 05:18:51 UTC Ralf Corsepius <ralf.corsepius@rtems.org> 'New.':
    contrib/repo-conf/.cvsignore
    contrib/repo-conf/AUTHORS
    contrib/repo-conf/COPYING
    contrib/repo-conf/INSTALL
    contrib/repo-conf/Makefile.am
    contrib/repo-conf/NEWS
    contrib/repo-conf/README
    contrib/repo-conf/aclocal/version.m4
    contrib/repo-conf/apt/sources.list.d/.cvsignore
    contrib/repo-conf/apt/sources.list.d/rtems.list.in
    contrib/repo-conf/apt/vendors.list.d/rtems.list
    contrib/repo-conf/configure.ac
    contrib/repo-conf/gpg/gpg-pubkey-69ce4a83-44cc2b30
    contrib/repo-conf/gpg/gpg-pubkey-eac29b6f-3fe1f458
    contrib/repo-conf/rtems-repo-conf.spec.in
    contrib/repo-conf/yum.repos.d/.cvsignore
    contrib/repo-conf/yum.repos.d/rtems.repo.in
2006-10-21 05:18:52 +00:00
Ralf Corsepius
218c346ef1 2006-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove superfluous -DASM.
2006-10-20 11:55:29 +00:00
Ralf Corsepius
3b268ab7fa Remove (bogus). 2006-10-20 06:58:28 +00:00
Ralf Corsepius
197e44544e 2006-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/bspopts.h.in: Remove (bogus).
2006-10-20 05:52:07 +00:00
Ralf Corsepius
4e8ac0a3fe 2006-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/bspopts.h.in: Remove (bogus).

2006-10-19	Ralf Corsépius <ralf.corsepius@rtems.org>

	* configure.ac: Require automake-1.10. Require autoconf-2.60.

2006-09-11	Joel Sherrill <joel@OARcorp.com>

	* startup/init5282.c: Convert C++ style comments to C style.

2006-02-08	Joel Sherrill <joel@OARcorp.com>

	* startup/linkcmds, startup/linkcmdsflash, startup/linkcmdsram: Add
	sections required by newer gcc versions.

2006-01-11	Ralf Corsepius <ralf.corsepius@rtems.org>

	* Makefile.am: Add preinstall.am.

2005-11-12	Ralf Corsepius <ralf.corsepius@rtems.org>

	* bsp_specs: Remove %cpp.
	* console/console.c: Eliminate obsolete types.

2005-11-07	Ralf Corsepius <ralf.corsepius@rtems.org>

	* include/bsp.h: Eliminate unsigned32.
	* network/network.c: Several minor bug fixes.
	* startup/bspstart.c: Eliminate unsigned32.

2005-08-17	Mike Bertosh <mbertosh@motioncontrol.org>

	* .cvsignore, Makefile.am, README, bsp_specs, configure.ac,
	clock/clock.c, console/console.c, include/bsp.h,
	include/bspopts.h.in, include/coverhd.h, include/tm27.h,
	network/network.c, start/start.S, startup/bspclean.c,
	startup/bspstart.c, startup/init5282.c, startup/linkcmds,
	startup/linkcmdsflash, startup/linkcmdsram, timer/timer.c: New files.
2006-10-20 05:50:34 +00:00
Ralf Corsepius
f4d72b919c 2006-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/bspopts.h.in: Remove (bogus).

2006-10-19	Ralf Corsépius <ralf.corsepius@rtems.org>

	* configure.ac: Require automake-1.10. Require autoconf-2.60.

2006-10-15	Ralf Corsépius <ralf.corsepius@rtems.org>

	* console/defaultfont.c: Convert to utf-8.

2006-09-11	Joel Sherrill <joel@OARcorp.com>

	* include/arm_mode_bits.h: Convert C++ style comments to C style.

2006-09-11	Chris Johns <chrisj@rtems.org>

	* README, configure.ac: Remove extra CRLF.

2006-06-02	Jay Monkman <jtm@lopingdog.com>

	* irq/bsp_irq_init.c: Changed interrupt handling
	to use shared rtems_irq_connect_data struct.

2006-01-11	Ralf Corsepius <ralf.corsepius@rtems.org>

	* Makefile.am: Add preinstall.am.

2005-11-22	Ralf Corsepius <ralf.corsepius@rtems.org>

	* bsp_specs: remove %lib.

2005-11-12	Ralf Corsepius <ralf.corsepius@rtems.org>

	* bsp_specs: Remove %cpp.

2005-11-08	Ralf Corsepius <ralf.corsepius@rtems.org>

	* irq/irq.c, startup/bspstart.c: Remove obsolete types (*unsigned32).

2005-07-06	Markku Puro <markku.puro@kopteri.net>

	* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
	clock/clockdrv.c, console/conio.c, console/console.c,
	console/defaultfont.c, include/arm_mode_bits.h, include/asm_macros.h,
	include/bsp.h, include/bspopts.h.in, include/conio.h, include/gba.h,
	include/gba_registers.h, include/tm27.h, irq/bsp_irq_asm.S,
	irq/bsp_irq_init.c, irq/irq.c, irq/irq.h, irq/irq_asm.S,
	irq/irq_init.c, start/logo.S, start/start.S, startup/bspstart.c,
	startup/cpu.c, startup/cpu_asm.S, startup/exit.c, startup/linkcmds,
	timer/timer.c: New files.
2006-10-20 05:49:16 +00:00
Ralf Corsepius
dd73668084 2006-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/cpu/Makefile.am, configure.ac: Remove nios2.
2006-10-20 05:39:52 +00:00
Ralf Corsepius
8dc5cd751b Remove nios2. 2006-10-20 05:39:11 +00:00
Ralf Corsepius
2f45e83a3b 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Requires automake-1.10. Require autoconf-2.60.
	* aclocal/rtems-top.m4, aclocal/version.m4:
	Adaptions to automake-1.10.
2006-10-19 14:35:27 +00:00
Ralf Corsepius
b06cc7e76d 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.10. Require autoconf-2.60.
2006-10-19 14:26:57 +00:00
Ralf Corsepius
09c1d97a59 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.10. Require autoconf-2.60.
	* aclocal/prog-ccas.m4, aclocal/prog-cxx.m4, aclocal/rtems-top.m4,
	aclocal/version.m4, automake/compile.am:
	Adaptations to automake-1.10.
2006-10-19 14:08:29 +00:00
Ralf Corsepius
a8340dc12c Adaptations to automake-1.10. 2006-10-19 14:08:08 +00:00
Ralf Corsepius
cb5148e753 Require automake-1.10. Require autoconf-2.60. 2006-10-19 14:07:52 +00:00
Ralf Corsepius
f4470b97f4 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.10. Require autoconf-2.60.
2006-10-19 14:05:46 +00:00
Ralf Corsepius
56e2dc07e1 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.10. Require autoconf-2.60.
2006-10-19 13:46:53 +00:00
Ralf Corsepius
1d59bd93bd 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.10. Require autoconf-2.60.
2006-10-19 13:39:58 +00:00
Ralf Corsepius
70ca327fbc Adaptations to automake-1.10. 2006-10-19 13:36:47 +00:00
Ralf Corsepius
32865ab96d Require automake-1.10. Requires autoconf-2.60. 2006-10-19 13:36:32 +00:00
Ralf Corsepius
1965914292 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.10. Requires autoconf-2.60.
	* aclocal/prog-cxx.m4, aclocal/rtems-top.m4, aclocal/version.m4:
	Adaptations to automake-1.10.
2006-10-19 13:36:21 +00:00
Ralf Corsepius
0f7cfec6c1 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* autotools/Makefile.am, autotools/automake.add: Update to
	automake-1.10.
2006-10-19 13:33:32 +00:00
Ralf Corsepius
8784165c9d Update to automake-1.10. 2006-10-19 13:33:25 +00:00
Ralf Corsepius
e1f880dc11 Remove custom/nios2_iss.cfg. 2006-10-19 13:15:30 +00:00
Ralf Corsepius
b8fa666cd0 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* custom/nios2_iss.cfg: Remove.
2006-10-19 13:14:40 +00:00
Ralf Corsepius
c6d7ef67a6 Remove. 2006-10-19 13:14:29 +00:00
Ralf Corsepius
8a5810d034 Remove. 2006-10-19 12:27:15 +00:00
Ralf Corsepius
32bcbf10a2 Remove (Unused) 2006-10-19 08:08:33 +00:00
Ralf Corsepius
d7b8239187 Sync with HEAD 2006-10-19 08:01:14 +00:00
Ralf Corsepius
4fd6bcd87f 2006-10-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems-4.7/bfin/Makefile.am, rtems-4.7/bfin/.cvsignore:
	Remove (Development in CVS-HEAD, only).
2006-10-19 05:32:12 +00:00
Ralf Corsepius
55e08d6c6f Remove. 2006-10-19 05:30:43 +00:00
Ralf Corsepius
0ef6e5857a 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/capture/capture-cli.c: Use size_t instead of int.
2006-10-17 17:30:05 +00:00
Ralf Corsepius
f91d2c2b39 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* LICENSE: Convert to utf-8.
2006-10-17 17:13:24 +00:00
Ralf Corsepius
7f9fff5160 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* porting/interrupts.t: Fix bogus _CPU_ISR_Get_level.
2006-10-17 15:01:54 +00:00
Ralf Corsepius
07572d6500 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Requires autoconf-2.59.
2006-10-17 05:51:36 +00:00
Ralf Corsepius
c11d203cce 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* clock/clock.c, console/console.c, ide/pcmcia_ide.c,
	ide/pcmcia_ide.h, irq/irq.c, irq/irq.h, irq/irq_asm.S,
	irq/irq_init.c, nvram/m93cxx.h, nvram/nvram.c, nvram/nvram.h,
	slicetimer/slicetimer.c, start/start.S, startup/bspstart.c,
	startup/cpuinit.c, vectors/vectors.S, vectors/vectors_init.c:
	Convert to utf-8.
2006-10-17 02:46:35 +00:00
Ralf Corsepius
a877cc8ec6 Convert to utf-8. 2006-10-17 02:46:07 +00:00
Ralf Corsepius
11c005b840 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/m68349.inc, start/start.S, startup/dumpanic.c:
	Convert to utf-8.
2006-10-17 02:37:18 +00:00
Ralf Corsepius
c27fd5c455 Convert to utf-8 2006-10-17 02:36:57 +00:00
Ralf Corsepius
d919ef8281 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require automake-1.9.
2006-10-17 02:31:34 +00:00
Ralf Corsepius
454e6b1f74 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* bootloader/Makefile.am: Remove DEFAULT_INCLUDES.
2006-10-17 02:26:55 +00:00
Ralf Corsepius
06797827c6 2006-10-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/multi.m4, aclocal/prog-cc.m4, aclocal/prog-ccas.m4
	automake/compile.am: Adaptations to automake-1.10
	(Back port from HEAD).
2006-10-16 16:18:33 +00:00
Ralf Corsepius
0667e1b295 Adaptations to automake-1.10. 2006-10-16 16:17:07 +00:00
Ralf Corsepius
fb3b398690 Convert to utf-8. 2006-10-15 06:00:51 +00:00
Ralf Corsepius
2490f92865 2006-10-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* console/defaultfont.c: Convert to utf-8.
2006-10-15 06:00:41 +00:00
Ralf Corsepius
d333638f89 Convert to utf-8. 2006-10-15 05:55:34 +00:00
Ralf Corsepius
d0fa0ef544 2006-10-15 Ralf Corsepius <ralf.corsepius@rtems.org>
* network_ada/adasockets/AUTHORS,
	network_ada/adasockets/sockets-link.ads,
	network_ada/adasockets/sockets-multicast.adb,
	network_ada/adasockets/sockets-multicast.ads,
	network_ada/adasockets/sockets-utils.adb,
	network_ada/adasockets/sockets-utils.ads,
	network_ada/adasockets/sockets.adb,
	network_ada/adasockets/sockets.ads,
	network_ada/listener/listener.adb,
	network_ada/tcprelay/tcprelay.adb: Convert to utf-8.
2006-10-15 05:55:16 +00:00
Ralf Corsepius
0fbc65d3bb 2006-10-09 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac, rtems-4.7/Makefile.am: Remove bfin.
2006-10-09 07:35:06 +00:00
Ralf Corsepius
46147f1cad Remove bfin. 2006-10-09 07:34:24 +00:00
Ralf Corsepius
a96e073ec7 Remove (unsupported) 2006-10-09 07:33:44 +00:00
Joel Sherrill
8afb74104a 2006-09-13 Joel Sherrill <joel@OARcorp.com>
* libnetworking/rtems/rtems_malloc_mbuf.c: Removed warning by adding
	prototype of malloc.
2006-09-13 16:55:34 +00:00
Ralf Corsepius
0ecafb6e6e 2006-09-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* sh7750/include/rtems/score/sh7750_regs.h: Fix spelling of IPRC
	(Probably a cyrillic 'C' instead of an ASCI 'C').
2006-09-13 11:23:54 +00:00
Ralf Corsepius
38abd22242 2006-09-13 Ralf Corsepius <ralf.corsepius@rtems.org>
* configure.ac: Use RTEMS_AMPOLISH3.
2006-09-13 08:20:25 +00:00
Ralf Corsepius
15a333196c 2006-09-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* bspkit: Remove.
2006-09-13 04:46:54 +00:00
Ralf Corsepius
01dcac514c Remove. 2006-09-13 04:38:16 +00:00
cvs2git
343ef8e091 This commit was manufactured by cvs2svn to create branch 'rtems-4-7-branch'.
Sprout from master 2006-09-11 21:47:05 UTC Joel Sherrill <joel.sherrill@OARcorp.com> '2006-09-11	Joel Sherrill <joel@OARcorp.com>'
Cherrypick from zlib 2005-10-28 07:22:42 UTC Ralf Corsepius <ralf.corsepius@rtems.org> 'Import of zlib-1.2.2.2.tar.gz':
    cpukit/zlib/FAQ
    cpukit/zlib/INDEX
    cpukit/zlib/README
    cpukit/zlib/algorithm.txt
    cpukit/zlib/crc32.h
    cpukit/zlib/infback.c
    cpukit/zlib/inffast.c
    cpukit/zlib/inffast.h
    cpukit/zlib/inffixed.h
    cpukit/zlib/inflate.c
    cpukit/zlib/inflate.h
    cpukit/zlib/trees.h
    cpukit/zlib/zlib.3
    cpukit/zlib/zlib.h
Cherrypick from rtemsdoc-4-5-branch 1997-05-27 12:40:10 UTC Joel Sherrill <joel.sherrill@OARcorp.com> 'base RTEMS documentation':
    doc/common/treedef.tex
Delete:
    contrib/crossrpms/cygwin/.cvsignore
    contrib/crossrpms/cygwin/Makefile.am
    contrib/crossrpms/cygwin/binutils.am
    contrib/crossrpms/cygwin/gcc-prep.add
    contrib/crossrpms/cygwin/gcc.am
    contrib/crossrpms/cygwin/i686/.cvsignore
    contrib/crossrpms/cygwin/i686/Makefile.am
    contrib/crossrpms/cygwin/i686/binutils-sources.add
    contrib/crossrpms/cygwin/i686/gcc-sources.add
    contrib/crossrpms/cygwin/i686/libs.add
    contrib/crossrpms/cygwin/i686/target-libs.add
    contrib/crossrpms/cygwin/i686/target-w32api.add
    contrib/crossrpms/cygwin/i686/w32api.add
    contrib/crossrpms/freebsd5.2/.cvsignore
    contrib/crossrpms/freebsd5.2/Makefile.am
    contrib/crossrpms/freebsd5.2/binutils.am
    contrib/crossrpms/freebsd5.2/gcc-prep.add
    contrib/crossrpms/freebsd5.2/gcc.am
    contrib/crossrpms/freebsd5.2/i586/.cvsignore
    contrib/crossrpms/freebsd5.2/i586/Makefile.am
    contrib/crossrpms/freebsd5.2/i586/binutils-sources.add
    contrib/crossrpms/freebsd5.2/i586/gcc-prep.add
    contrib/crossrpms/freebsd5.2/i586/gcc-sources.add
    contrib/crossrpms/freebsd5.2/i586/libs.add
    contrib/crossrpms/freebsd5.2/i586/target-libs.add
    contrib/crossrpms/freebsd6.0/.cvsignore
    contrib/crossrpms/freebsd6.0/Makefile.am
    contrib/crossrpms/freebsd6.0/binutils.am
    contrib/crossrpms/freebsd6.0/gcc-prep.add
    contrib/crossrpms/freebsd6.0/gcc.am
    contrib/crossrpms/freebsd6.0/i586/.cvsignore
    contrib/crossrpms/freebsd6.0/i586/Makefile.am
    contrib/crossrpms/freebsd6.0/i586/binutils-sources.add
    contrib/crossrpms/freebsd6.0/i586/gcc-sources.add
    contrib/crossrpms/freebsd6.0/i586/libs.add
    contrib/crossrpms/freebsd6.0/i586/target-libs.add
    contrib/crossrpms/freebsd6.1/.cvsignore
    contrib/crossrpms/freebsd6.1/Makefile.am
    contrib/crossrpms/freebsd6.1/binutils.am
    contrib/crossrpms/freebsd6.1/gcc-prep.add
    contrib/crossrpms/freebsd6.1/gcc.am
    contrib/crossrpms/freebsd6.1/i586/.cvsignore
    contrib/crossrpms/freebsd6.1/i586/Makefile.am
    contrib/crossrpms/freebsd6.1/i586/binutils-sources.add
    contrib/crossrpms/freebsd6.1/i586/gcc-sources.add
    contrib/crossrpms/freebsd6.1/i586/libs.add
    contrib/crossrpms/freebsd6.1/i586/target-libs.add
    contrib/crossrpms/mingw32/.cvsignore
    contrib/crossrpms/mingw32/Makefile.am
    contrib/crossrpms/mingw32/binutils.am
    contrib/crossrpms/mingw32/gcc-prep.add
    contrib/crossrpms/mingw32/gcc.am
    contrib/crossrpms/mingw32/i686/.cvsignore
    contrib/crossrpms/mingw32/i686/Makefile.am
    contrib/crossrpms/mingw32/i686/binutils-sources.add
    contrib/crossrpms/mingw32/i686/gcc-sources.add
    contrib/crossrpms/mingw32/i686/libs.add
    contrib/crossrpms/mingw32/i686/target-libs.add
    contrib/crossrpms/mingw32/i686/target-w32api.add
    contrib/crossrpms/mingw32/i686/w32api.add
    contrib/crossrpms/solaris2.7/.cvsignore
    contrib/crossrpms/solaris2.7/Makefile.am
    contrib/crossrpms/solaris2.7/binutils.am
    contrib/crossrpms/solaris2.7/gcc-prep.add
    contrib/crossrpms/solaris2.7/gcc.am
    contrib/crossrpms/solaris2.7/sparc/.cvsignore
    contrib/crossrpms/solaris2.7/sparc/Makefile.am
    contrib/crossrpms/solaris2.7/sparc/binutils-sources.add
    contrib/crossrpms/solaris2.7/sparc/gcc-sources.add
    contrib/crossrpms/solaris2.7/sparc/libs.add
    contrib/crossrpms/solaris2.7/sparc/target-libs.add
    cpukit/rtems/src/clocktodtoseconds.c
    cpukit/rtems/src/clocktodvalidate.c
    cpukit/zlib/doc/rfc1950.txt
    cpukit/zlib/doc/rfc1951.txt
    cpukit/zlib/doc/rfc1952.txt
    cpukit/zlib/doc/txtvsbin.txt
    cpukit/zlib/examples/zran.c
    cpukit/zlib/old/as400/bndsrc
    cpukit/zlib/old/as400/compile.clp
    cpukit/zlib/old/as400/readme.txt
    cpukit/zlib/old/visualc6/README.txt
    cpukit/zlib/old/visualc6/example.dsp
    cpukit/zlib/old/visualc6/minigzip.dsp
    cpukit/zlib/old/visualc6/zlib.dsw
    cpukit/zlib/zlib.pc.in
2006-09-11 21:47:06 +00:00
18959 changed files with 881847 additions and 3449663 deletions

17
.cvsignore Normal file
View File

@@ -0,0 +1,17 @@
aclocal.m4
autom4te*.cache
compile
config.cache
config.guess
config.log
config.status
config.sub
configure
depcomp
install-sh
install.sh
Makefile
Makefile.in
mdate-sh
missing
texinfo.tex

6
.gitignore vendored
View File

@@ -1,6 +0,0 @@
/build
doc
/*.ini
.lock*
*.pyc
.waf*

View File

@@ -1,261 +0,0 @@
# Please keep users, directories and files sorted alphabetically.
# Directories first
#
# If there is more than 1 user in a section it must be promoted to a group in
# /approvers
[General Maintainer] @approvers/general/maintainer
*
[Documentation] @approvers/docs
*/README
*.md
*.rst
*.txt
# CPUKit
########
[CPUKit libdebugger] @approvers/cpukit/libdebugger
/cpukit/libdebugger
[CPUKit libdl] @approvers/cpukit/libdl
/cpukit/libdl
[CPUKit libdrvmgr] @approvers/cpukit/libdrvmgr
/cpukit/libdrvmgr
[CPUKit libgnat] @joel
/cpukit/libgnat
[CPUKit librtemscxx] @approvers/cpukit/librtemscxx
/cpukit/librtemscxx
[CPUKit libstdthreads] @approvers/cpukit/libstdthreads
/cpukit/libstdthreads
# Architectures
###############
[Arch AArch64] @approvers/arch/aarch64
/bsps/aarch64/
/cpukit/score/cpu/aarch64/
/spec/build/bsps/aarch64/
/cpukit/libdebugger/rtems-debugger-aarch64.v
/cpukit/libdl/rtl-mdreloc-aarch64.c
/spec/build/cpukit/*aarch64.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch ARM] @approvers/arch/arm
/bsps/arm/
/bsps/include/arm/
/bsps/include/xil/arm/
/bsps/shared/freebsd/sys/arm/
/bsps/shared/xil/arm/
/cpukit/score/cpu/arm/
/spec/build/bsps/arm/
/cpukit/libdebugger/rtems-debugger-arm.c
/cpukit/libdl/*arm*
/spec/build/cpukit/*arm.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch Blackfin] @approvers/arch/bfin
/bsps/bfin/
/cpukit/score/cpu/bfin/
/spec/build/bsps/bfin/
/cpukit/libdl/rtl-mdreloc-bfin.c
/spec/build/cpukit/cpubfin.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch i386] @approvers/arch/i386
/bsps/i386/
/cpukit/score/cpu/i386/
/spec/build/bsps/i386/
/cpukit/libdebugger/rtems-debugger-i386.c
/cpukit/libdl/rtl-mdreloc-i386.c
/spec/build/cpukit/*i386*
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch LatticeMico32] @approvers/arch/lm32
/bsps/lm32/
/cpukit/score/cpu/lm32/
/spec/build/bsps/lm32/
/cpukit/libdl/rtl-mdreloc-lm32.c
/spec/build/cpukit/cpulm32.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch Motorola 68000] @approvers/arch/m68k
/bsps/m68k/
/cpukit/score/cpu/m68k/
/spec/build/bsps/m68k/
/cpukit/libdl/rtl-mdreloc-m68k.c
/spec/build/cpukit/*m68k*
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch MicroBlaze] @approvers/arch/microblaze
/bsps/include/xil/microblaze/
/bsps/microblaze/
/cpukit/score/cpu/microblaze/
/spec/build/bsps/microblaze/
/cpukit/libdebugger/rtems-debugger-microblaze.c
/cpukit/libdl/rtl-mdreloc-microblaze.c
/spec/build/cpukit/*microblaze*
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch MIPS] @approvers/arch/mips
/bsps/mips/
/cpukit/score/cpu/mips/
/spec/build/bsps/mips/
/cpukit/libdl/rtl-mdreloc-mips.c
/spec/build/cpukit/*mips.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch Moxie] @approvers/arch/moxie
/bsps/moxie/
/cpukit/score/cpu/moxie/
/spec/build/bsps/moxie/
/cpukit/libdl/rtl-mdreloc-moxie.c
/spec/build/cpukit/*moxie.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch Nios II] @approvers/arch/nios2
/bsps/nios2/
/cpukit/score/cpu/nios2/
/spec/build/bsps/nios2/
/spec/build/cpukit/*nios2.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch OpenRISC 1000] @approvers/arch/or1k
/bsps/or1k/
/cpukit/score/cpu/or1k/
/spec/build/bsps/or1k/
/spec/build/cpukit/*or1k.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch PowerPC] @approvers/arch/powerpc
/bsps/powerpc/
/cpukit/score/cpu/powerpc/
/spec/build/bsps/powerpc/
/cpukit/libdl/rtl-mdreloc-powerpc.c
/spec/build/cpukit/*powerpc.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch RISC-V] @approvers/arch/risc-v
/bsps/riscv
/cpukit/score/cpu/riscv
/spec/build/bsps/riscv
/cpukit/libdl/rtl-mdreloc-riscv.c
/spec/build/cpukit/*riscv.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch SuperH] @approvers/arch/superh
/bsps/sh/
/cpukit/score/cpu/sh/
/spec/build/bsps/sh/
/spec/build/cpukit/cpush.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch SPARC] @approvers/arch/sparc
/bsps/sparc/
/cpukit/score/cpu/sparc/
/spec/build/bsps/sparc/
/spec/build/cpukit/cpusparc.yml
/spec/build/cpukit/objdlsparc.yml
/spec/build/testsuites/validation/bsps/*-sparc-*
/testsuites/validation/bsps/*-sparc-*
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch SPARC64] @approvers/arch/sparc64
/bsps/sparc64/
/cpukit/score/cpu/sparc64/
/spec/build/bsps/sparc64/
/spec/build/cpukit/*sparc64.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch V850] @approvers/arch/v850
/bsps/v850/
/cpukit/score/cpu/v850/
/spec/build/bsps/v850/
/cpukit/libdl/rtl-mdreloc-v850.c
/spec/build/cpukit/*v850.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs
[Arch X86_64] @approvers/arch/x86_64
/bsps/x86_64/
/cpukit/score/cpu/x86_64/
/spec/build/bsps/x86_64/
/spec/build/cpukit/*x8664.yml
*/README @approvers/docs
*.md @approvers/docs
*.rst @approvers/docs
*.txt @approvers/docs

343
COPYING Normal file
View File

@@ -0,0 +1,343 @@
#
# $RTEMS$
#
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program 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 Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

1581
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

2538
Doxyfile

File diff suppressed because it is too large Load Diff

51
INSTALL Normal file
View File

@@ -0,0 +1,51 @@
#
# $Id$
#
Building RTEMS
==============
See the file README.configure.
UNCOMPRESSING .tgz FILES
===========================
Many of the files found in this directory and its subdirectories
are gzip'ed, tar archive files. These files have the ".tgz"
extension. They were compressed with gzip version 1.2.4.
Use a command sequence similar to the following to uncompress each
file:
gzcat FILE.tgz | tar xvof -
where FILE.tgz is the file to be installed. This procedure will
extract the files in the archive into the current directory.
All of the .tgz files associated with this release RTEMS will
place their contents in a subdirectory rtems-<release> in the current
directory.
If you are unsure of what is in an RTEMS archive file, then use
the following command sequence to get a listing of the contents:
gzcat FILE.tgz | tar tvf -
NOTES:
(1) The "-o" option to tar is included on the tar command line
so that the user extracting the tar archive will own the extracted
files.
(2) gzcat is sometimes installed as zcat. Be warned that on many
(most) UNIX machines, zcat is associated with compress (.Z files).
(3) If you do not have gzip 1.2.4, it is available from numerous sites
including this one. Other sites include ftp.gnu.org and ftp.cdrom.com.
(4) The GNU archive files included in this distribution are packaged
exactly like they are on official GNU ftp sites. When extracting
GNU archives, they will not extract under a rtems-<version>
directory. They will extract themselves under a directory which
is the name and version of the tool in question. For example,
gcc-2.5.8.tgz will extract its contents into the subdirectory
gcc-2.5.8.

23
LICENSE Normal file
View File

@@ -0,0 +1,23 @@
#
# $Id$
#
LICENSE INFORMATION
RTEMS is free software; you can redistribute it and/or modify it under
terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version. RTEMS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. You should have received
a copy of the GNU General Public License along with RTEMS; see
file COPYING. If not, write to the Free Software Foundation, 675
Mass Ave, Cambridge, MA 02139, USA.
As a special exception, including RTEMS header files in a file,
instantiating RTEMS generics or templates, or linking other files
with RTEMS objects to produce an executable application, does not
by itself cause the resulting executable application to be covered
by the GNU General Public License. This exception does not
however invalidate any other reasons why the executable file might be
covered by the GNU Public License.

63
LICENSE.NET Normal file
View File

@@ -0,0 +1,63 @@
#
# $Id$
#
The RTEMS TCP/IP stack is a port of the FreeBSD TCP/IP stack. The following
copyright and licensing information applies to this code.
This code is found under the c/src/libnetworking directory but does not
constitute the entire contents of that subdirectory.
=============================================================================
Copyright (c) 1980, 1983, 1988, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgment:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-
Portions Copyright (c) 1993 by Digital Equipment Corporation.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies, and that
the name of Digital Equipment Corporation not be used in advertising or
publicity pertaining to distribution of the document or software without
specific, written prior permission.
THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
=============================================================================

44
LICENSE.RPCXDR Normal file
View File

@@ -0,0 +1,44 @@
#
# $Id$
#
The RTEMS RPC/XDR support is a port of the freely distributed
Sun Microsystems implementation. The following copyright and
licensing information applies to this code.
This code is in the c/src/librpc directory.
=============================================================================
Copyright (C) 1984, Sun Microsystems, Inc.
Sun RPC is a product of Sun Microsystems, Inc. and is provided for
unrestricted use provided that this legend is included on all tape
media and as a part of the software program in whole or part. Users
may copy or modify Sun RPC without charge, but are not authorized
to license or distribute it to anyone else except as part of a product or
program developed by the user.
SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
Sun RPC is provided with no support and without any obligation on the
part of Sun Microsystems, Inc. to assist in its use, correction,
modification or enhancement.
SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
OR ANY PART THEREOF.
In no event will Sun Microsystems, Inc. be liable for any lost revenue
or profits or other special, indirect and consequential damages, even if
Sun has been advised of the possibility of such damages.
Sun Microsystems, Inc.
2550 Garcia Avenue
Mountain View, California 94043
=============================================================================

8
LICENSE.WEBSERVER Normal file
View File

@@ -0,0 +1,8 @@
#
# $Id$
#
The source code in c/src/libnetworking/rtems_webserver is a port
of the Go Ahead Software, Inc. WebServer. Their copyright and
licensing terms apply. See c/src/libnetworking/rtems_webserver/license.txt
for details.

1377
LICENSE.md

File diff suppressed because it is too large Load Diff

55
MAINTAINERS Normal file
View File

@@ -0,0 +1,55 @@
Note
====
This file contains information about people who are permitted to make
changes to various parts of RTEMS and its associated components and
add-ons.
Please do not contact the people in this file directly to report
problems with RTEMS.
For general information about RTEMS, please visit:
http://www.rtems.com
To report problems in RTEMS, please visit:
http://www.rtems.com/bugs.html
Maintainers
===========
Blanket Write Privileges (alphabetical order)
Jennifer Averett jennifer@oarcorp.com
Ralf Corsepius ralf.corsepius@rtems.org
Chris Johns chris.johns@rtems.com
Eric Norum eric.norum@rtems.com
Joel Sherrill joel.sherrill@oarcorp.com
Various Component Maintainers
Networking NAME-TBD EMAIL-TBD
CPU Port Maintainers (CPU alphabetical order)
arm Jay Monkman jtm@lopingdog.com
avr Ralf Corsepius ralf.corsepius@rtems.org
c4x Joel Sherrill joel.sherrill@OARcorp.com
h8300 NAME-TBD EMAIL-TBD
i386 NAME-TBD EMAIL-TBD
m68k NAME-TBD EMAIL-TBD
mips NAME-TBD EMAIL-TBD
no_cpu NAME-TBD EMAIL-TBD
or32 NAME-TBD EMAIL-TBD
powerpc NAME-TBD EMAIL-TBD
sh NAME-TBD EMAIL-TBD
sparc NAME-TBD EMAIL-TBD
unix NAME-TBD EMAIL-TBD
BSP Maintainers (CPU/BSP alphabetical order)
CPU/BSP NAME-TBD EMAIL-TBD
arm/edb7312 Jay Monkman jtm@lopingdog.com
arm/gp32 Philippe Simons loki_666@fastmail.fm

44
Makefile.am Normal file
View File

@@ -0,0 +1,44 @@
#
# top level directory for RTEMS build tree
#
##
## $Id$
##
ACLOCAL_AMFLAGS = -I aclocal
SUBDIRS = make $(build_SUBDIRS) $(host_SUBDIRS) $(target_SUBDIRS)
DIST_SUBDIRS = $(SUBDIRS)
noinst_SCRIPTS = bootstrap
EXTRA_DIST = README.configure SUPPORT VERSION LICENSE $(noinst_SCRIPTS)
EXTRA_DIST += config-ml.in
EXTRA_DIST += ampolish3
dist-hook:
@files=`(cd $(srcdir); find doc cpukit c testsuites tools \
-name configure.ac -print | sed 's,/configure.ac,,' | sort)`; \
for i in $$files; do \
if test -f $(distdir)/$$i/configure.ac; then : ; \
else \
d=`dirname $(distdir)/$$i`; \
$(MKDIR_P) $$d;\
echo "cp -pR $(srcdir)/$$i $(distdir)/$$i"; \
cp -pR $(srcdir)/$$i $(distdir)/$$i; \
fi; \
done
rm -rf `find $(distdir) -name 'autom4te*'`
rm -rf `find $(distdir) -name CVS`
rm -f `find $(distdir) \( -name .cvsignore \
-o -name config.status \
-o -name config.log \)`
rm -f `find $(distdir) \( -name '*.bak' \
-o -name 'changes' -o -name 'diff' -o -name 'tmp' -o -name 'log' \
-o -name '*~' -o -name '.*~' -o -name '.#*' \)`
find $(distdir) -name '*.in' -print | while read a; do \
f=`echo $$a | sed 's,\.in$$,,'`; \
if test -f $$f; then echo "rm $$f"; rm $$f; fi; done
include $(top_srcdir)/automake/subdirs.am
include $(top_srcdir)/automake/host.am

144
Makefile.maint Normal file
View File

@@ -0,0 +1,144 @@
#
# Maintainer Makefile
#
# WARNING:
# THIS IS EXPERIMENTAL - DO NOT USE (YET) !
# * This Makefile is only useful to RTEMS maintainers
# * You must have write access to RTEMS CVS
# * Running this Makefile modifies RTEMS CVS
# * Watch out for warning and error messages - Do NOT IGNORE them!
# MAINTAINER notes:
# Cutting a new release:
# 1. Perform a non-anonymous cvs checkout of the BRANCH
# you want to cut a release tarball from
# 2. Run "make -f Makefile.maint new-revision"
# (rsp. "make -f Makefile.maint new-minor").
# 3. Run "make -f Makefile.maint commit"
# 4. Run "make -f Makefile.maint tag"
# 5. Run "make -f Makefile.maint tarball"
# -----------------
# SECURITY: Append a string to tag to avoid accidentially screwing up cvs-tags
# For "hot runs" you will want to use "make -f Makefile.maint TAG_SUFFIX= <command>"
TAG_SUFFIX = -test1
rtems_version := $(shell cat VERSION | sed -n '/.* Version /{s/^.*Version[ ]*\([0-9\.]\+\)/\1/p};')
rtems_tag := $(shell echo "rtems-$(rtems_version)" | tr . -)
rtems_api := 4.7
PATH := /opt/rtems-$(rtems_api)/bin:$(PATH)
# -----------------
# Cleanup check out and cvs-tag the files inside
tag:
cvs -z9 up -dP >/dev/null
./bootstrap -p >/dev/null
cvs tag -c $(rtems_tag)$(TAG_SUFFIX) >/dev/null
# -----------------
# Different stages of cvs-exporting
rtems-$(rtems_version)/stamp.export.$(rtems_tag)$(TAG_SUFFIX):
rm -rf rtems-$(rtems_version)
@cvs -z9 export -d rtems-$(rtems_version) -r $(rtems_tag)$(TAG_SUFFIX) rtems >/dev/null
@if ! test -f rtems-$(rtems_version)/VERSION; then \
echo "ERROR export failed"; \
echo " Did you run 'make -f Makefile.maint tag' ?"; exit1; fi
echo "$(rtems_tag)$(TAG_SUFFIX)" > rtems-$(rtems_version)/stamp.export.$(rtems_tag)$(TAG_SUFFIX)
rtems-$(rtems_version)$(TAG_SUFFIX).tar.bz2: rtems-$(rtems_version)/stamp.autofiles \
rtems-$(rtems_version)/excludes \
rtems-$(rtems_version)/TOOL_VERSIONS
cd rtems-$(rtems_version) ; \
touch doc/ada_user/ada_user.texi doc/bsp_howto/bsp_howto.texi \
doc/cpu_supplement/cpu_supplement.texi \
doc/develenv/develenv.texi doc/filesystem/filesystem.texi \
doc/itron3.0/itron.texi doc/networking/networking.texi \
doc/new_chapters/new_chapters.texi doc/porting/porting.texi \
doc/posix1003.1/posix1003_1.texi doc/posix_users/posix_users.texi \
doc/relnotes/relnotes.texi doc/started_ada/started_ada.texi \
doc/started/started.texi doc/user/c_user.texi
tar -cj -X rtems-$(rtems_version)/excludes \
-f rtems-$(rtems_version)$(TAG_SUFFIX).tar.bz2 rtems-$(rtems_version)
rtems-$(rtems_version)/stamp.cleanup: rtems-$(rtems_version)/stamp.export.$(rtems_tag)$(TAG_SUFFIX)
find rtems-$(rtems_version) -name .cvsignore -exec rm -f {} \;
find rtems-$(rtems_version) -name preinstall.am -exec touch {} \;
touch rtems-$(rtems_version)/c/src/librdbg/src/*/*/remdeb*.[hc]
rm -rf rtems-$(rtems_version)/contrib
touch rtems-$(rtems_version)/stamp.cleanup
rtems-$(rtems_version)/stamp.autofiles: rtems-$(rtems_version)/stamp.cleanup
cd rtems-$(rtems_version) && ./bootstrap -r
touch rtems-$(rtems_version)/stamp.autofiles
rtems-$(rtems_version)/excludes: Makefile.maint
@echo "Generating $@"
@echo "excludes" > $@
@echo "stamp.*" >> $@
@echo "autom4te.cache" >> $@
@echo "Makefile.maint" >> $@
tarball: rtems-$(rtems_version)$(TAG_SUFFIX).tar.bz2
rtems-$(rtems_version)/TOOL_VERSIONS: Makefile.maint
( \
date ; \
echo ; \
echo "This file contains configuration information on the " ; \
echo "primary computer used to test and make the $(rtems_version)" ; \
echo "version of RTEMS" ; \
echo ; \
echo "OS Version: " `head -1 /etc/issue` ; \
echo ; \
echo "The following RTEMS RPMs were installed on the machine" ; \
echo "where this release was made:" ; \
echo ; \
rpm -qa 'rtems-$(rtems_api)-*' | sort | sed -e 's/^/ /' ; \
echo \
) > $@
# -----------------
# Create a new minor release
# increments the 2nd digit of the version number
# set the 3rd digit of the version number to 0
# Example: 4.6.99.4 -> 4.7.0
new-minor:
@v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
r=$$(($$r + 1)); version="$$v.$$r.0"; \
echo "New minor release: $$version"; \
sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
$(VERSION_FILES); \
sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
# Create a new revision release
# increments the last digit of the version number
# Examples: 4.6.99.4 -> 4.6.99.5
# 4.7.0 -> 4.7.1
new-revision:
@m=$$(echo $(rtems_version) | sed 's,^\(.*\)\.[0-9]\+,\1,'); \
n=$$(echo $(rtems_version) | sed 's,^.*\.\([0-9]\+\),\1,'); \
n=$$(($$n + 1)); version="$$m.$$n";\
echo "New revision release: $$version"; \
sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
$(VERSION_FILES); \
sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
VERSION_FILES += aclocal/version.m4
VERSION_FILES += cpukit/aclocal/version.m4
VERSION_FILES += c/src/aclocal/version.m4
VERSION_FILES += testsuites/aclocal/version.m4
CVS_RUN := $(shell if [ -n "$(TAG_SUFFIX)" ]; then echo "cvs -n"; else echo "cvs"; fi)
commit:
$(CVS_RUN) commit -m "Upgrade to $(rtems_version)" \
$(VERSION_FILES) VERSION
.PHONY: commit new-minor new-revision tag tarball

97
README Normal file
View File

@@ -0,0 +1,97 @@
#
# $Id$
#
Building RTEMS
==============
See the file README.configure.
Directory Overview
==================
This is the top level of the RTEMS directory structure. The following
is a description of the files and directories in this directory:
INSTALL
Rudimentary installation instructions. For more detailed
information please see the Release Notes. The Postscript
version of this manual can be found in the file
c_or_ada/doc/relnotes.tgz.
LICENSE
Required legalese.
README
This file.
c
This directory contains the source code for the C
implementation of RTEMS as well as the test suites, sample
applications, Board Support Packages, Device Drivers, and
support libraries.
doc
This directory contains the PDL for the RTEMS executive.
Ada versus C
============
There are two implementations of RTEMS in this source tree --
in Ada and in C. These two implementations are functionally
and structurally equivalent. The C implementation follows
the packaging conventions and hierarchical nature of the Ada
implementation. In addition, a style has been followed which
allows one to easily find the corresponding Ada and C
implementations.
File names in C and code placement was carefully designed to insure
a close mapping to the Ada implementation. The following file name
extensions are used:
.adb - Ada body
.ads - Ada specification
.adp - Ada body requiring preprocessing
.inc - include file for .adp files
.c - C body (non-inlined routines)
.inl - C body (inlined routines)
.h - C specification
In the executive source, XYZ.c and XYZ.inl correspond directly to a
single XYZ.adb or XYZ.adp file. A .h file corresponds directly to
the .ads file. There are only a handful of .inc files in the
Ada source and these are used to insure that the desired simple
inline textual expansion is performed. This avoids scoping and
calling convention side-effects in carefully constructed tests
which usually test context switch behavior.
In addition, in Ada code and data name references are always fully
qualified as PACKAGE.NAME. In C, this convention is followed
by having the package name as part of the name itself and using a
capital letter to indicate the presence of a "." level. So we have
PACKAGE.NAME in Ada and _Package_Name in C. The leading "_" in C
is used to avoid naming conflicts between RTEMS and user variables.
By using these conventions, one can easily compare the C and Ada
implementations.
The most noticeable difference between the C and Ada83 code is
the inability to easily obtain a "typed pointer" in Ada83.
Using the "&" operator in C yields a pointer with a specific type.
The 'Address attribute is the closest feature in Ada83. This
returns a System.Address and this must be coerced via Unchecked_Conversion
into an access type of the desired type. It is easy to view
System.Address as similar to a "void *" in C, but this is not the case.
A "void *" can be assigned to any other pointer type without an
explicit conversion.
The solution adopted to this problem was to provide two routines for
each access type in the Ada implementation -- one to convert from
System.Address to the access type and another to go the opposite
direction. This results in code which accomplishes the same thing
as the corresponding C but it is easier to get lost in the clutter
of the apparent subprogram invocations than the "less bulky"
C equivalent.
A related difference is the types which are only in Ada which are used
for pointers to arrays. These types do not exist and are not needed
in the C implementation.

73
README.cdn-X Normal file
View File

@@ -0,0 +1,73 @@
Building RTEMS Canadian Cross
=============================
RTEMS now contains experimental and yet incomplete support for building
it Canadian Cross.
1. Introduction
---------------
If you don't know what Canadian Cross Building means, you probably don't want
to apply it and should consider stop reading here.
Interested readers might want to read Ian Lance Taylor's article at
http://www.airs.com/ian/configure for underlaying details and working
principles.
2. RTEMS
--------
Example: Building RTEMS for sparc-rtems under i386-pc-linux-gnu to be hosted
on a i386-cygwin platform.
2.1 Required tools
------------------
* A i386-pc-linux-gnu cross sparc-rtems toolchain.
* A i386-pc-linux-gnu cross i386-cygwin toolchain.
* A i386-pc-linux-gnu native toolchain.
We further on assume these to be installed to these locations:
/opt/rtems .. linux cross sparc-rtems toolchain
/opt/cygwin .. linux cross i386-cygwin cross-toolchain
/usr .. linux native toolchain and further tools.
2.2 Building sparc-rtems
------------------------
The first step is to build RTEMS for sparc-rtems under linux.
mkdir build
cd build
<path>/rtems/configure [options] \
--target=sparc-rtems \
--prefix=/opt/cygwin
make
make install
This will build a standard sparc-rtems RTEMS and install it to the given
PREFIX.
2.3 Building i386-cygwin host support
-------------------------------------
The next step is to build RTEMS host support for i386-cygwin.
This basically means to cross-build the host tools contained in RTEMS.
mkdir host
cd host
<path>/rtems/configure [options] \
--target=sparc-rtems \
--build=`<path>/rtems/config.guess` \
--host=i386-cygwin \
--prefix=/opt/cygwin
make
make install
This will build RTEMS host-tools for i386-cygwin and install them to the given
PREFIX.
3. Known issues
---------------
* At present time, building RTEMS Canadian Cross is known to be immature, and
to require additional work. Do not expect this to work.
* The <toplevel>/make/ directory hierarchy is not treated correctly.

260
README.configure Normal file
View File

@@ -0,0 +1,260 @@
#
# $Id$
#
1. Autoconf support
===================
This version of RTEMS is configured with GNU autoconf. RTEMS can be
configured and built either standalone or together with the compiler
tools in the Cygnus one-tree structure. Using autoconf also means
that RTEMS now can be built in a separate build directory.
To re-generate auto*tool generated files (configure, Makefile.in etc),
autoconf-2.59 and automake-1.8 are required.
2. Installation
===============
2.1 Standalone build
To configure RTEMS for a specific target, run configure in the build
directory. In addition to the standard configure options, the following
RTEMS-specific option are supported:
--disable-rtems-inlines
--disable-posix
--disable-itron
--disable-networking
--enable-cxx
--enable-bare-cpu-model=<MODEL>
--enable-bare-cpu-cflags=<FLAGS>
--enable-multiprocessing
--enable-rtemsbsp="bsp1 bsp2 ..."
--enable-tests
--enable-rdbg (only valid for i386 and some PowerPC BSPs)
--enable-docs
In addition, the following standard autoconf options are frequently
used when configuring RTEMS installations:
--prefix=INSTALL_DIRECTORY
By default, inline routines are used instead of macros where possible.
Macros can be selected using the --disable-inlines option. [NOTE:
Some APIs may not support macro versions of their inline routines.]
By default, the RTEMS POSIX 1003.1b interface is built for targets that support
it. It can be disabled with the --disable-posix option.
By default, the RTEMS uITRON interface is built for targets that support
it. It can be disabled with the --disable-itron option.
By default, the RTEMS networking support is built for targets which
support it. It can be specifically disabled for those targets
with the --disable-networking option.
By default, the RTEMS remote debugger server support is not built.
It can be specifically enabled for the targets that support it.
with the --enable-rdbg option. NB : the RTEMS networking support
must be enabled to support the remote debugger server.
By default, the RTEMS support of C++ is disabled. It can be enabled
with the --enable-cxx option. If the rtems++ C++ library is installed
it will also be build.
By default, the RTEMS test suites are NOT configured -- only the
sample tests are built. --enable-tests will configure
the RTEMS test suite. The default speeds up the build
and configure process when the tests are not desired.
By default, RTEMS is built using arguments and build rules which require a
gcc supporting the -specs option, ie. a gcc >= 2.8.
[The --disable-gcc28 option, which has been present in former releases, has
been removed.]
By default, multiprocessing is is not built. It can be enabled
for those BSPs supporting it by the --enable-multiprocessing option.
By default, all bsps for a target are built. The bare BSP is not built
unless directly specified. There are two ways of changing this:
+ use the --enable-rtemsbsp option which will set the specified
bsps as the default bsps, or
+ set the RTEMS_BSP variable during make (see below).
The --enable-rtemsbsp= option configures RTEMS for a specific board
within a target architecture. Remember that the target specifies the
CPU family while the BSP specifies the precise board you will be using.
The following targets are supported:
(none) will build the host-based version on Linux,
Solaris and HPUX.
arm-rtems
c4x-rtems
h8300-rtems
i386-rtems
m68k-rtems
mips-rtems
no_cpu-rtems
or32-rtems
powerpc-rtems
sh-rtems
sparc-rtems
bare see notes
The cross-compiler is set to $(target)-gcc by default. This can be
overridden by:
+ using the --program-prefix option to configure to specify the
string which will prepended to the tool names. Be sure to include
a trailing "-". For example, to use a m68k-coff toolset, use the
--program-prefix=m68k-coff- option.
To build, run make in the build directory. To specify which bsps to build,
add the RTEMS_BSP="bsp1 bsp2 .." to the make command. Specifying multiple
BSPs to build only works from the top level build directory.
Installation is done under $(prefix)/rtems.
As an example, to build and install the mvme136 and mvme162 bsps for m68k do:
(path_to_rtems_src)/configure --target=m68k-rtems
make RTEMS_BSP="mvme136 mvme162"
make install RTEMS_BSP="mvme136 mvme162"
The sample tests are built by 'make all', do a 'make test' to build the full
test suite.
By default, --enable-docs is disabled and documentation is not built.
2.2 Build with Cygnus one-tree release
[NOTE: This section does not apply anymore.]
To build and install RTEMS with the one-tree structure, just copy the rtems
directory to the tree. The one-tree configure.in and Makefile.in has to be
replaced with the RTEMS-aware versions. The build options are the same as
for the standalone build.
2.3 Target Dependent Notes
bare:
1. See the README in the bare bsp source directory. This should
contain all info you need.
2. The bare bsp source contains a script to show how to build it.
3. The configure flags must be used to get the bare bsp to work.
The --enable-bare-cpu-model and --enable-bare-cpu-cflags are the
only pieces of information. The module is usually a gcc module
such as m68302 or mcpu32. The flags are passed directly to gcc.
Use "" if more than one option is specified.
3. To use the installed RTEMS library
=====================================
To use the installed RTEMS bsps to build applications, the application
makefile has to include a bsp-specific makefile that will define the
RTEMS variables necessary to find include files and libraries. The
bsp-specific makefile is installed at
$(RTEMS_MAKEFILE_PATH)/Makefile.inc
For the erc32 bsp installed at /usr/local/cross, the environment
variable RTEMS_MAKEFILE_PATH would be set as follows to the
following:
/usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc
4. Supported target bsps
========================
The following bsps are supported:
host-based : posix (on Linux, FreeBSD, Cygwin, Solaris, and HPUX)
arm : arm_bare_bsp armulator csb336 csb337 edb7312 gp32 vegaplus
c4x : c3xsim c4xsim
h8300 : h8sim
i386 : i386ex pc386 pc386dx pc486 pc586 pc686 pck6 ts_386ex
NOTE: The "pc386" BSP can be compiled to support a
variety of PC configurations including PC-104
based solutions.
m68k : av5282 csb360 dmv152 gen68302 gen68340 gen68360 gen68360_040
idp mcf5206elite mcf5235 mrm332 mvme136 mvme147 mvme147s
mvme162 mvme162lx ods68302 sim68000 simcpu32 uC5282
no_cpu : no_bsp (porting example)
mips : csb350 genmongoosev
p4600 p4650 (p4000 port with either R4600 or R4650)
jmr3904
powerpc : ep1a gen405 helas403 mcp750 mbx8xx mtx603e
mpc8260ads mvme230x mvme5500 psim score603e ss555
NOTE: The "motorola_powerpc" BSP is a single BSP which
can be conditionally compiled to support most Motorola
VMEbus, CompactPCI, and MTX boards.)
sh : gensh1 gensh2 shsim simsh4 gensh4
sparc : erc32 erc32nfp leon1 leon2
any : bare
The following ports were considered obsoleted after the 4.6 releases
and were removed: a29k, hppa, i960, mips64orion, and or32.
5. Makefile structure
=====================
The makefiles have been re-organized. Most gnu-based bsps now use three
main makefiles:
+ custom/default.cfg,
+ custom/bsp.cfg and
+ compilers/gcc-target-default.cfg.
Default.cfg sets the default values of certain common build options.
Bsp.cfg set bsp-specific build options and can also override the
default settings.
Gcc-target-default.cfg contains the common gcc definitions.
6. Adding a bsp
===============
Please refer to the BSP and Device Driver Guide.
7. Tested configurations
========================
All gnu-based bsps have been built on Linux.
The native (posix) ports have been built and run only on Linux.
The following configurations have NOT been tested:
+ Anything on Nextstep, HPUX and Irix.
+ The C4x and OR32 ports (requires specially patched toolchain)
8. Prerequisites
================
Gawk version 2 or higher.
GNU make version 3.72 or higher.
Bash.
gcc version > 2.8
NOTE: These prerequisites are probably out of date but autoconf should detect
any problems.

View File

@@ -1,46 +0,0 @@
Real-Time Executive for Multiprocessing Systems
===============================================
RTEMS is a real-time executive (kernel) which provides a high performance
environment for embedded applications with the following features:
* Standards based user interfaces.
* Multitasking capabilities.
* Homogeneous and heterogeneous multiprocessor systems.
* Event-driven, priority-based, preemptive scheduling.
* Optional rate monotonic scheduling.
* Intertask communication and synchronisation.
* Priority inheritance.
* Responsive interrupt management.
* Dynamic memory allocation.
* High level of user configurability.
* Open source with a friendly user license.
Project git repositories are located at:
* https://gitlab.rtems.org/rtems/
Online documentation is available at:
* https://docs.rtems.org/
RTEMS Doxygen for CPUKit:
* https://docs.rtems.org/doxygen/branches/master/
RTEMS POSIX 1003.1 Compliance Guide:
* https://docs.rtems.org/branches/master/posix-compliance/
RTEMS Mailing Lists for general purpose use the users list and for developers
use the devel list.
* https://lists.rtems.org/mailman/listinfo
The version number for this software is indicated in the VERSION file.

22
SUPPORT Normal file
View File

@@ -0,0 +1,22 @@
#
# $Id$
#
On-Line Applications Research Corporation (OAR) offers support,
customization, and training for RTEMS. Custom RTEMS development services
includes porting RTEMS to new processors and the development of custom board
support packages and device drivers. In addition, OAR is available
to assist in the development of your real-time embedded application.
For more information, email Mark Johannes at mark.johannes@OARcorp.com
or contact OAR at:
On-Line Applications Research Corporation
4910-L Corporate Drive
Huntsville AL 35805
Voice: (205) 722-9985
Fax: (205 722-0985
RTEMS maintenance and development is funded solely by RTEMS users.
The future of RTEMS depends on its user base.

7
VERSION Normal file
View File

@@ -0,0 +1,7 @@
#
# This file is automatically generated -- DO NOT EDIT!!!
#
# $Id$
#
RTEMS Version 4.7.3

399
acinclude.m4 Normal file
View File

@@ -0,0 +1,399 @@
## All directories belong in one of 3 categories.
## ${HOST_CONFIGDIRS_LIST} is directories we build using the host tools.
## ${TARGET_CONFIGDIRS_LIST} is directories we build using the target tools.
## ${BUILD_CONFIGDIRS_LIST} is directories we build using the build tools
AC_PREREQ(2.60)
dnl RTEMS_ARG_VAR(VAR,HELP-STRING)
dnl An internal macros to have help strings pretty
dnl printed with configure --help, without letting autoconf spoil config subdir
dnl environments by trying to propagate them
dnl Stripped down version of autoconf-2.52's AC_ARG_VAR.
AC_DEFUN([_RTEMS_ARG_VAR],
[
m4_expand_once([m4_divert_once([HELP_VAR],
[AC_HELP_STRING([$1], [$2], [ ])])],
[$0($1)])dnl
])
AC_DEFUN([_RTEMS_SUBST_IFNOT],
[AS_IF([`echo " [$]$1 " | grep " $2 " > /dev/null`],
[],
[AC_SUBST([$1],["[$]$1 $2"])])
])
AC_DEFUN([_RTEMS_TOOLS],
[
m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
[
_RTEMS_ARG_VAR([CC_FOR_$2],
[c-compiler to be used for $1 subdirs (default: auto-detected)])
_RTEMS_ARG_VAR([CFLAGS_FOR_$2],
[c-flags to be used for $1 subdirs (default: provided by autoconf)])
_RTEMS_ARG_VAR([CXX_FOR_$2],
[c++-compiler to be used for $1 subdirs (default: auto-detected)])
_RTEMS_ARG_VAR([CXXFLAGS_FOR_$2],
[c++-flags to be used for $1 subdirs (default: provided by autoconf)])
])
])
AC_DEFUN([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS],
[
AC_CONFIG_COMMANDS_PRE([
if test -z "${build_alias}"; then
# build_alias is empty
if test -z "${host_alias}"; then
# host_alias is empty
if test -z "${target_alias}"; then
: target_alias is empty
else
: target_alias is not empty
fi
else
# host_alias is not empty
if test -z "${target_alias}"; then
: target_alias is empty
target_alias="${host_alias}"
else
: target_alias is not empty
fi
fi
else
# build_alias is not empty
if test -z "${host_alias}"; then
# host_alias is empty
if test -z "${target_alias}"; then
: target_alias is empty
else
: target_alias is not empty
fi
else
# host_alias is not empty
if test -z "${target_alias}"; then
: target_alias is empty
target_alias="${host_alias}"
else
: target_alias is not empty
fi
fi
fi
_RTEMS_BUILD_CONFIG_PREPARE
_RTEMS_HOST_CONFIG_PREPARE
_RTEMS_TARGET_CONFIG_PREPARE
build_subdir="."
build_SUBDIRS="${build_configdirs}"
build_configdirs="${build_configdirs}"
AS_IF([test $build != $host],
[dnl
host_subdir="${host_alias-$host}"
host_SUBDIRS=`echo "${host_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$host_subdir/\1%g"`
host_configdirs="${host_configdirs}"
],[dnl
host_SUBDIRS="${host_configdirs}"
host_configdirs="${host_configdirs}"
])
AS_IF([test $build != $target],
[dnl
target_subdir="${target_alias-$target}"
target_SUBDIRS=`echo "${target_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$target_subdir/\1%g"`
target_configdirs="${target_configdirs}"
],[dnl
target_SUBDIRS="${target_configdirs}"
target_configdirs="${target_configdirs}"
])
AC_SUBST(host_SUBDIRS)
AC_SUBST(target_SUBDIRS)
AC_SUBST(build_SUBDIRS)
])
AC_CONFIG_COMMANDS_POST([
_RTEMS_OUTPUT_SUBDIRS([build],[BUILD])
_RTEMS_OUTPUT_SUBDIRS([host],[HOST])
_RTEMS_OUTPUT_SUBDIRS([target],[TARGET])
])
])
dnl _RTEMS_SRCPATHS(BUILD-DIR-NAME)
dnl ----------------------------
dnl Inputs:
dnl - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
dnl - `$srcdir' is `top-build -> top-src'
dnl
dnl Outputs:
dnl - `ac_builddir' is `.', for symmetry only.
dnl - `ac_top_builddir' is `build -> top_build'.
dnl If not empty, has a trailing slash.
dnl - `ac_srcdir' is `build -> src'.
dnl - `ac_top_srcdir' is `build -> top-src'.
dnl
dnl and `ac_buildpath' etc., the absolute paths.
m4_define([_RTEMS_SRCPATHS],
[
m4_if([$2],,
[dstdir=$1],
[case "$2" in
"." | "" ) # No subdir was given
dstdir=$1;;
* ) # A subdir was given
dstdir=$2/$1;;
esac])
ac_builddir=.
AS_IF([test $dstdir != .],
[ # Strip off leading ./
ac_builddir_suffix=/`echo $dstdir | sed 's,^\.[[\\/]],,'`
ac_srcdir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_builddir_suffix" | sed 's,/[[^\\/]]*,../,g'`
],[
ac_dir_suffix= ac_top_builddir=
])
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[[\\/]]* | ?:[[\\/]]* ) # Absolute path.
ac_srcdir=$srcdir$ac_srcdir_suffix;
ac_top_srcdir=$srcdir;
;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_srcdir_suffix;
ac_top_srcdir=$ac_top_builddir$srcdir;
;;
esac
dnl Don't blindly perform a `cd $1/$ac_foo && pwd` since $ac_foo can be
dnl absolute.
ac_buildpath=`cd $dstdir && cd $ac_builddir && pwd`
ac_top_buildpath=`cd $dstdir && cd $ac_top_builddir && pwd`
ac_srcpath=`cd $dstdir && cd $ac_srcdir && pwd`
ac_top_srcpath=`cd $dstdir && cd $ac_top_srcdir && pwd`
])# _AC_SRCPATHS
dnl _RTEMS_OUTPUT_SUBDIRS([host|target|build],[HOST|TARGET|BUILD])
AC_DEFUN([_RTEMS_OUTPUT_SUBDIRS],[
m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
[
if test "$no_recursion" != yes; then
if test -n "${$1_SUBDIRS}"; then
ac_sub_configure_args="[$]$1args"
# Always prepend --prefix to ensure using the same prefix
# in subdir configurations.
ac_sub_configure_args="'--prefix=$prefix' $ac_sub_configure_args"
# make sure that $1_subdir is not empty
test -n "$$1_subdir" || $1_subdir="."
case "$$1_subdir" in
"." ) ;;
* )
ac_sub_configure_args="$ac_sub_configure_args '--with-target-subdir=$$1_subdir'"
ac_sub_configure_args="$ac_sub_configure_args '--exec-prefix=${prefix}/$$1_subdir'"
ac_sub_configure_args="$ac_sub_configure_args '--includedir=${prefix}/$$1_subdir/include'"
;;
esac
ac_popdir=`pwd`
for ac_dir in $$1_configdirs; do
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
test -d $srcdir/$ac_dir || continue
AC_MSG_NOTICE([configuring in $$1_subdir/$ac_dir])
AS_MKDIR_P(["$$1_subdir/$ac_dir"])
_RTEMS_SRCPATHS(["$ac_dir"],["$$1_subdir"])
cd $$1_subdir/$ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_srcdir/configure.gnu; then
ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
elif test -f $ac_srcdir/configure; then
ac_sub_configure="$SHELL '$ac_srcdir/configure'"
elif test -f $ac_srcdir/configure.in; then
ac_sub_configure=$ac_configure
else
AC_MSG_WARN([no configuration information is in $ac_dir])
ac_sub_configure=
fi
# The recursion is here.
if test -n "$ac_sub_configure"; then
# Make the cache file name correct relative to the subdirectory.
case $cache_file in
[[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
*) # Relative path.
ac_sub_cache_file=$ac_top_builddir$cache_file ;;
esac
ac_sub_configure_vars=
ac_sub_configure_vars="$ac_sub_configure_vars '--cache-file=$ac_sub_cache_file'"
ac_sub_configure_vars="$ac_sub_configure_vars '--srcdir=$ac_srcdir'"
test -n "[$]CC_FOR_$2" && \
ac_sub_configure_vars="$ac_sub_configure_vars 'CC=[$]CC_FOR_$2'"
test -n "[$]CXX_FOR_$2" && \
ac_sub_configure_vars="$ac_sub_configure_vars 'CXX=[$]CXX_FOR_$2'"
test -n "[$]CFLAGS_FOR_$2" && \
ac_sub_configure_vars="$ac_sub_configure_vars 'CFLAGS=[$]CFLAGS_FOR_$2'"
test -n "[$]CXXFLAGS_FOR_$2" && \
ac_sub_configure_vars="$ac_sub_configure_vars 'CXXFLAGS=[$]CXXFLAGS_FOR_$2'"
# The eval makes quoting arguments work.
AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args $ac_sub_configure_vars])
eval $ac_sub_configure $ac_sub_configure_args $ac_sub_configure_vars ||
AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
fi
cd "$ac_popdir"
done
fi
fi
])
])
AC_DEFUN([_RTEMS_CONFIGURE_ARGS_PRUNE],
[
$1_prune()
{
$1=
for ac_arg
do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case $ac_arg in
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
| --c=*)
;;
--config-cache | -C)
;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
-host* | --host* );;
-host | --host )
ac_prev=host_alias;;
-target* | --target* );;
-target | --target )
ac_prev=target_alias;;
-build* | --build* );;
-build | --build )
ac_prev=build_alias;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
;;
*_alias=* );;
m4_if([$2],,,[$2])
*) $1="$$1 '$ac_arg'" ;;
esac
done
export $1
}
])
## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir)
# subdirs to be built for the build environment
AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[
m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1])
dnl Always append to build_configdirs
AC_SUBST(build_configdirs,"$build_configdirs $1")
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
])
AC_DEFUN([_RTEMS_BUILD_CONFIG_PREPARE],[
## # Record the configure arguments in Makefile.
m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST],
[
m4_expand_once([_RTEMS_TOOLS([build],[BUILD])])
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([buildargs])])
eval buildargs_prune $ac_configure_args
buildargs="'--host=${build_alias-$build}' '--build=${build_alias-$build}' ${buildargs}"
buildargs="${buildargs} '--target=${target_alias-$target}'"
],[])
AC_SUBST(buildargs)
AC_SUBST(build_subdir)
])
## PUBLIC: RTEMS_HOST_CONFIG_SUBDIRS(host_subdir)
# subdirs to be build for the host environment
AC_DEFUN([RTEMS_HOST_CONFIG_SUBDIRS],[
m4_append([_RTEMS_HOST_CONFIGDIRS_LIST],[ $1])dnl
_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
])
AC_DEFUN([_RTEMS_HOST_CONFIG_PREPARE],[
m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST],
[
m4_expand_once([_RTEMS_TOOLS([host],[HOST])])
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([hostargs])])
eval hostargs_prune $ac_configure_args
hostargs="'--host=${host_alias-$host}' '--build=${build_alias-$build}' '--target=${target_alias-$target}' ${hostargs}"
],[])
AC_SUBST(hostargs)
AC_SUBST(host_subdir)
])
## PUBLIC: RTEMS_TARGET_CONFIG_SUBDIRS(target_subdir)
# subdirs to be build for the target environment
AC_DEFUN([RTEMS_TARGET_CONFIG_SUBDIRS],[
AS_IF([test -d ${srcdir}/$1],[
m4_append([_RTEMS_TARGET_CONFIGDIRS_LIST],[ $1])
_RTEMS_SUBST_IFNOT([target_configdirs],[$1])
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
])
])
AC_DEFUN([_RTEMS_TARGET_CONFIG_PREPARE],[
m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST],
[
m4_expand_once([_RTEMS_TOOLS([target],[TARGET])])
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([targetargs])])
eval targetargs_prune $ac_configure_args
targetargs="'--host=${target_alias-$target}' '--build=${build_alias-$build}' '--target=${target_alias-$target}' ${targetargs}"
],[])
AC_SUBST(targetargs)
AC_SUBST(target_subdir)
])

43
aclocal/bsp-alias.m4 Normal file
View File

@@ -0,0 +1,43 @@
dnl
dnl $Id$
dnl
dnl _RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY)
dnl Internal subroutine to RTEMS_BSP_ALIAS
AC_DEFUN([_RTEMS_BSP_ALIAS],
[# account for "aliased" bsps which share source code
case $1 in
bare*) $2=bare ;; # EXP: bare-aliases
c3xsim) $2=c4xsim ;; # TI C3x Simulator in gdb
erc32nfp) $2=erc32 ;; # erc32 without fpu
gen68360_040) $2=gen68360 ;; # m68k - 68360 in companion mode
leon1) $2=leon2 ;; # leon without fpu
mbx8*) $2=mbx8xx ;; # MBX821/MBX860 board
mcp750) $2=motorola_powerpc ;; # Motorola PPC board variant
mtx603e) $2=motorola_powerpc ;; # Motorola PPC board variant
mvme162lx) $2=mvme162 ;; # m68k - mvme162 board variant
mvme2100) $2=motorola_powerpc ;; # Motorola PPC board variant
mvme2307) $2=motorola_powerpc ;; # Motorola PPC board variant
p4600) $2=p4000 ;; # mips - p4000 board w/IDT 4600
p4650) $2=p4000 ;; # mips - p4000 board w/IDT 4650
pc386dx) $2=pc386 ;; # i386 - PC w/o FPU
pc486) $2=pc386 ;; # i386 - PC with i486DX
pc586) $2=pc386 ;; # i386 - PC with Pentium
pc686) $2=pc386 ;; # i386 - PC with PentiumPro
pck6) $2=pc386 ;; # i386 - PC with K6
brs5l*) $2=gen5200 ;; # MPC5200 based board
pm520*) $2=gen5200 ;; # MPC5200 based board
simcpu32) $2=sim68000 ;; # BSVC CPU32 variant
simsh7032) $2=shsim ;; # SH7032 simulator
simsh7045) $2=shsim ;; # SH7045 simulator
sis) $2=erc32 ;; # erc32 SIS simulator
*) $2=$1;;
esac]
)
dnl RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY)
dnl convert a bsp alias $1 into its bsp directory RTEMS_BSP_FAMILY
AC_DEFUN([RTEMS_BSP_ALIAS],
[_RTEMS_BSP_ALIAS(m4_if([$1],,[$RTEMS_BSP],[$1]),
m4_if([$2],,[RTEMS_BSP_FAMILY],[$2]))]
)

View File

@@ -0,0 +1,41 @@
dnl
dnl $Id$
dnl
dnl canonicalize target cpu
dnl NOTE: Most rtems targets do not fullfil autoconf's
dnl target naming conventions "processor-vendor-os"
dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
dnl and we have to fix it for rtems ourselves
AC_DEFUN([RTEMS_CANONICAL_TARGET_CPU],
[
AC_CANONICAL_TARGET
AC_MSG_CHECKING(rtems target cpu)
case "${target}" in
# hpux unix port should go here
i[[34567]]86-*linux*) # unix "simulator" port
RTEMS_CPU=unix
;;
i[[34567]]86-*freebsd*) # unix "simulator" port
RTEMS_CPU=unix
;;
i[[34567]]86-pc-cygwin*) # Cygwin is just enough unix like :)
RTEMS_CPU=unix
;;
no_cpu-*rtems*)
RTEMS_CPU=no_cpu
;;
sparc-sun-solaris*) # unix "simulator" port
RTEMS_CPU=unix
;;
tic4x-*rtems*) # gcc changed the name
RTEMS_CPU=c4x
;;
*)
RTEMS_CPU=`echo $target | sed 's%^\([[^-]]*\)-\(.*\)$%\1%'`
;;
esac
AC_SUBST(RTEMS_CPU)
AC_MSG_RESULT($RTEMS_CPU)
])

43
aclocal/check-bsps.m4 Normal file
View File

@@ -0,0 +1,43 @@
dnl $Id$
dnl Report all available bsps for a target within the source tree
dnl
dnl RTEMS_CHECK_BSPS(bsp_list)
AC_DEFUN([RTEMS_CHECK_BSPS],
[
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl sets RTEMS_CPU, target
AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
AC_MSG_CHECKING([for available BSPs])
$1=
for bsp_spec in `ls "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU"/*/bsp_specs 2>/dev/null`; do
bsp_family=`echo "$bsp_spec" | sed \
-e "s,^$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/,," \
-e "s,/bsp_specs$,,"`
case $bsp_family in
# Now account for BSPs with build variants
c4xsim) bsps="c4xsim c3xsim";;
gen68360) bsps="gen68360 gen68360_040";;
p4000) bsps="p4600 p4650";;
mvme162) bsps="mvme162 mvme162lx";;
mbx8xx) bsps="mbx821_001 mbx860_001b"
bsps="$bsps mbx821_002 mbx821_002b"
bsps="$bsps mbx860_1b"
bsps="$bsps mbx860_002"
bsps="$bsps mbx860_005b"
;;
gen5200) bsps="pm520_cr825 pm520_ze30 brs5l";;
motorola_powerpc) bsps="mvme2307 mcp750 mtx603e mvme2100";;
pc386) bsps="pc386 pc386dx pc486 pc586 pc686 pck6";;
erc32) bsps="erc32 erc32nfp sis";;
leon2) bsps="leon1 leon2";;
sim68000) bsps="sim68000 simcpu32";;
shsim) bsps="simsh7032 simsh7045";;
*) bsps="$bsp_family";;
esac;
$1="[$]$1 $bsps"
done
AS_IF([test -z "[$]$1"],
[AC_MSG_RESULT([none])],
[AC_MSG_RESULT([$]$1)])
])dnl

View File

@@ -0,0 +1,24 @@
dnl $Id$
AC_DEFUN([_RTEMS_CHECK_CUSTOM_BSP],[
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl sets RTEMS_CPU, target
AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
$2=
AC_MSG_CHECKING([for $1])
for i in "${srcdir}/${RTEMS_TOPdir}/bspkit/${RTEMS_CPU}"/*/cfg/"$1" \
"${srcdir}/${RTEMS_TOPdir}/make/custom/$1";
do
AS_IF([test -r $i],[
$2="$i"
break;
])
done
AS_IF([test -n "[$]$2"],
[AC_MSG_RESULT([[$]$2])],
[AC_MSG_RESULT([no])])
])
AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
AC_REQUIRE([RTEMS_TOP])
_RTEMS_CHECK_CUSTOM_BSP([[$]$1.cfg],[BSP_FOUND])
])

13
aclocal/enable-cxx.m4 Normal file
View File

@@ -0,0 +1,13 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_CXX],
[
AC_ARG_ENABLE(cxx,
[AC_HELP_STRING([--enable-cxx],
[enable C++ support and build the rtems++ library])],
[case "${enable_cxx}" in
yes) RTEMS_HAS_CPLUSPLUS=yes ;;
no) RTEMS_HAS_CPLUSPLUS=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
esac], [RTEMS_HAS_CPLUSPLUS=no])
])

11
aclocal/enable-inlines.m4 Normal file
View File

@@ -0,0 +1,11 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_INLINES],
[AC_ARG_ENABLE(rtems-inlines,
AC_HELP_STRING([--enable-rtems-inlines],[enable RTEMS inline functions (default:enabled, disable to use macros)]),
[case "${enableval}" in
yes) enable_rtems_inlines=yes ;;
no) enable_rtems_inlines=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-rtems-inlines option) ;;
esac],[enable_rtems_inlines=yes])
])

14
aclocal/enable-itron.m4 Normal file
View File

@@ -0,0 +1,14 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_ITRON],
[
## AC_BEFORE([$0], [RTEMS_CHECK_ITRON_API])dnl
AC_ARG_ENABLE(itron,
[AC_HELP_STRING([--enable-itron],[enable itron interface])],
[case "${enableval}" in
yes) RTEMS_HAS_ITRON_API=yes ;;
no) RTEMS_HAS_ITRON_API=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-itron option) ;;
esac],[RTEMS_HAS_ITRON_API=yes])
])

View File

@@ -0,0 +1,13 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_MULTIPROCESSING],
[
AC_ARG_ENABLE(multiprocessing,
[AC_HELP_STRING([--enable-multiprocessing],
[enable multiprocessing interface])],
[case "${enable_multiprocessing}" in
yes) ;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
esac],[enable_multiprocessing=no])
])

View File

@@ -0,0 +1,15 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_NETWORKING],
[
## AC_BEFORE([$0], [RTEMS_CHECK_NETWORKING])dnl
AC_ARG_ENABLE(networking,
[AC_HELP_STRING([--enable-networking],[enable TCP/IP stack])],
[case "${enableval}" in
yes) RTEMS_HAS_NETWORKING=yes ;;
no) RTEMS_HAS_NETWORKING=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
esac],[RTEMS_HAS_NETWORKING=yes])
AC_SUBST(RTEMS_HAS_NETWORKING)dnl
])

33
aclocal/enable-posix.m4 Normal file
View File

@@ -0,0 +1,33 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_POSIX],
[
## AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
AC_ARG_ENABLE(posix,
[AC_HELP_STRING([--enable-posix],[enable posix interface])],
[case "${enableval}" in
yes) RTEMS_HAS_POSIX_API=yes ;;
no) RTEMS_HAS_POSIX_API=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
esac],[RTEMS_HAS_POSIX_API=yes])
case "${host}" in
# hpux unix port should go here
i[[34567]]86-pc-linux*) # unix "simulator" port
RTEMS_HAS_POSIX_API=no
;;
i[[34567]]86-*freebsd*) # unix "simulator" port
RTEMS_HAS_POSIX_API=no
;;
no_cpu-*rtems*)
RTEMS_HAS_POSIX_API=no
;;
sparc-sun-solaris*) # unix "simulator" port
RTEMS_HAS_POSIX_API=no
;;
*)
;;
esac
AC_SUBST(RTEMS_HAS_POSIX_API)
])

15
aclocal/enable-rdbg.m4 Normal file
View File

@@ -0,0 +1,15 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_RDBG],
[
AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
AC_ARG_ENABLE(rdbg,
[AC_HELP_STRING([--enable-rdbg],[enable remote debugger])],
[case "${enableval}" in
yes) RTEMS_HAS_RDBG=yes ;;
no) RTEMS_HAS_RDBG=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;;
esac],[RTEMS_HAS_RDBG=no])
AC_SUBST(RTEMS_HAS_RDBG)dnl
])

View File

@@ -0,0 +1,12 @@
## $Id$
AC_DEFUN([RTEMS_ENABLE_RTEMS_DEBUG],
[
AC_ARG_ENABLE(rtems-debug,
AC_HELP_STRING([--enable-rtems-debug],[enable RTEMS_DEBUG]),
[case "${enable_rtems_debug}" in
yes) enable_rtems_debug=yes ;;
no) enable_rtems_debug=no ;;
*) AC_MSG_ERROR([bad value ${enable_rtems_debug} for RTEMS_DEBUG]) ;;
esac],[enable_rtems_debug=no])
])

View File

@@ -0,0 +1,17 @@
dnl $Id$
dnl Override the set of BSPs to be built.
dnl used by the toplevel configure script
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
AC_DEFUN([RTEMS_ENABLE_RTEMSBSP],
[
AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])
AC_ARG_ENABLE(rtemsbsp,
[AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],
[BSPs to include in build])],
[case "${enable_rtemsbsp}" in
yes ) enable_rtemsbsp="" ;;
no ) enable_rtemsbsp="no" ;;
*) enable_rtemsbsp="$enable_rtemsbsp" ;;
esac],[enable_rtemsbsp=""])
])

13
aclocal/enable-tests.m4 Normal file
View File

@@ -0,0 +1,13 @@
dnl $Id$
AC_DEFUN([RTEMS_ENABLE_TESTS],
[
AC_ARG_ENABLE(tests,
[AC_HELP_STRING([--enable-tests],[enable tests (default:samples)])],
[case "${enableval}" in
samples) enable_tests=samples;;
yes) enable_tests=yes ;;
no) enable_tests=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;;
esac], [enable_tests=samples])
])

17
aclocal/multilib.m4 Normal file
View File

@@ -0,0 +1,17 @@
dnl This provides configure definitions used for multilib support
dnl parts of these macros are derived from newlib-1.8.2's multilib support
AC_DEFUN([RTEMS_ENABLE_MULTILIB],
[
AC_ARG_ENABLE(multilib,
AC_HELP_STRING([--enable-multilib],
[build many library versions (default=no)]),
[case "${enableval}" in
yes) multilib=yes ;;
no) multilib=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
esac], [multilib=no])dnl
AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes")
])

14
aclocal/path-ksh.m4 Normal file
View File

@@ -0,0 +1,14 @@
dnl $Id$
AC_DEFUN([RTEMS_PATH_KSH],
[
dnl NOTE: prefer bash over ksh over sh
AC_PATH_PROGS(KSH,bash ksh sh)
if test -z "$KSH"; then
dnl NOTE: This cannot happen -- /bin/sh must always exist
AC_MSG_ERROR(
[***]
[ Cannot determine a usable shell bash/ksh/sh]
[ Please contact your system administrator] );
fi
])

22
aclocal/project-root.m4 Normal file
View File

@@ -0,0 +1,22 @@
dnl
dnl $Id$
dnl
dnl
dnl PROJECT_TOPdir .. relative path to the top of the build-tree
dnl PROJECT_ROOT .. relative path to the top of the temporary
dnl installation directory inside the build-tree
dnl RTEMS_TOPdir .. relative path of a subpackage's configure.in to the
dnl toplevel configure.in of the source-tree
dnl RTEMS_ROOT .. path to the top of a bsp's build directory
dnl [Applied by custom/*.cfg, depredicated otherwise]
dnl
AC_DEFUN([RTEMS_PROJECT_ROOT],
[dnl
AC_REQUIRE([RTEMS_TOP])
PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"
AC_SUBST(PACKHEX)
])

41
aclocal/quoting.m4 Normal file
View File

@@ -0,0 +1,41 @@
dnl RTEMS_CONFIGURE_ARGS_QUOTE(dnl RETURN_VAR, [ADDITIONAL_CASES], [VAR_TO_PROCESS]])
dnl
AC_DEFUN([_RTEMS_CONFIGURE_ARGS_QUOTE],
[
$1_prune()
{
# Remove --cache-file and --srcdir arguments so they do not pile up.
$1=
ac_prev=
for ac_arg
do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case $ac_arg in
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
| --c=*)
;;
--config-cache | -C)
;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
m4_if([$2],,,[$2])
*) $1="$$1 '$ac_arg'" ;;
esac
done
export $1
}
])
AC_DEFUN([RTEMS_CONFIGURE_ARGS_QUOTE],[
m4_expand_once([_RTEMS_CONFIGURE_ARGS_QUOTE([$1],[$2])])
eval $1_prune m4_if([$3],,[$ac_configure_args],[[$]$3])
])

20
aclocal/rpm.m4 Normal file
View File

@@ -0,0 +1,20 @@
AC_DEFUN([RTEMS_ENABLE_RPMPREFIX],[
AC_ARG_ENABLE([rpmprefix],
[ --enable-rpmprefix=<rpmprefix> prefix rpms],
[case $enable_rpmprefix in
yes ) rpmprefix="rtems-"]RTEMS_API["-";;
no ) rpmprefix="%{nil}";;
* ) AS_IF([test -z "$enable_rpmprefix"],
[rpmprefix="%{nil}"],
[rpmprefix="$enable_rpmprefix"]);;
esac],
[rpmprefix="rtems-"]RTEMS_API["-"])
AC_ARG_ENABLE([osversions],
[ --enable-osversions whether to use version numbers in os-tripples],
[case $enable_osversions in
yes ) osversion=RTEMS_API;;
* ) osversion=;;
esac],
[osversion=RTEMS_API])
])

30
aclocal/rtems-top.m4 Normal file
View File

@@ -0,0 +1,30 @@
dnl $Id$
dnl
dnl RTEMS_TOP($1)
dnl
dnl $1 .. relative path from this configure.in to the toplevel configure.in
dnl
AC_DEFUN([RTEMS_TOP],
[dnl
AC_REQUIRE([RTEMS_VERSIONING])
AC_CONFIG_AUX_DIR([$1])
AC_CHECK_PROGS(MAKE, gmake make)
AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
RTEMS_TOPdir="$1";
AC_SUBST(RTEMS_TOPdir)
dots=`echo $with_target_subdir|\
sed -e 's,^\.$,,' -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
AC_SUBST(PROJECT_TOPdir)
PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
AC_SUBST(PROJECT_ROOT)
AC_MSG_CHECKING([for RTEMS Version])
AC_MSG_RESULT([_RTEMS_VERSION])
])dnl

23
aclocal/tool-paths.m4 Normal file
View File

@@ -0,0 +1,23 @@
AC_DEFUN([RTEMS_TOOLPATHS],
[
# tooldir='$(exec_prefix)/'$target_alias
# Temporary work-around until building in source tree is supported
AC_REQUIRE([RTEMS_PROJECT_ROOT])
tooldir='$(PROJECT_ROOT)'
AC_SUBST(tooldir)
project_includedir='$(tooldir)'/include
AC_SUBST(project_includedir)
project_libdir='$(tooldir)/lib$(MULTISUBDIR)'
AC_SUBST(project_libdir)
project_bindir='$(tooldir)/bin'
AC_SUBST(project_bindir)
rtems_bspdir='$(prefix)/${RTEMS_BSP}'
AC_SUBST(rtems_bspdir)
rtems_makedir='$(prefix)/make'
AC_SUBST(rtems_makedir)
])

4
aclocal/version.m4 Normal file
View File

@@ -0,0 +1,4 @@
AC_DEFUN([RTEMS_VERSIONING],
m4_define([_RTEMS_VERSION],[4.7.3]))
m4_define([RTEMS_API],[4.7])

276
ampolish3 Executable file
View File

@@ -0,0 +1,276 @@
#! /usr/bin/perl -w
# $Id$
# Copyright (C) 2005, 2006 Ralf Corsépius, Ulm, Germany
#
# Permission to use, copy, modify, and distribute this software
# is freely granted, provided that this notice is preserved.
# Helper script to generate pre/tmpinstall rules for RTEMS Makefile.am.
#
# Usage: ampolish3 Makefile.am > preinstall.am
#
# Reads a Makefile.am from stdin and writes corresponding
# pre/tmpinstall rules to stdout.
sub replace($);
sub print_dirstamp($$$);
# Predefined directory mappings:
#
# final-installation directory => temp installation directory
my %dirmap = (
'$(includedir)' => '$(PROJECT_INCLUDE)',
'$(libdir)' => '$(PROJECT_LIB)',
'$(project_libdir)' => '$(PROJECT_LIB)',
'$(project_includedir)' => '$(PROJECT_INCLUDE)'
);
# Conventions on automake primaries:
#
# *_HEADERS -> preinstall
# noinst*_HEADERS -> noinst
# noinst_*_LIBRARIES -> noinst
# project_*_LIBRARIES -> tmpinstall
# *_LIBRARIES -> ignore (no preinstallation)
# dist_project_*_DATA -> preinstall (bsp_specs,linkcmds)
# project_*_DATA -> tmpinstall (*.o, *.a)
# dist_*_DATA -> ignore (no preinstallation)
# *SCRIPTS -> ignore (no preinstallation)
# noinst_*_PROGRAMS -> noinst
# project_*_PROGRAMS -> tmpinstall
# *_PROGRAMS -> ignore (no preinstallation)
## 1st pass: read in file
my @buffer1 = () ;
my %seen = ();
my %predefs = ();
{
my $mode = 0 ;
my $line = '';
while ( <> )
{
if ( $mode == 0 )
{
if ( /^([a-zA-Z0-9_]+\s*[\+]?[:=].*)\\$/o )
{
$line = "$1" ;
$mode = 1;
} else {
push @buffer1, $_ ;
}
} elsif ( $mode == 1 ) {
if ( /^(.*)\\$/o ) {
$line .= $1;
} else {
$line .= $_ ;
push @buffer1, $line ;
$line = '';
$mode = 0 ;
}
}
}
}
#foreach my $l ( @buffer1 ) { print STDERR "1:<$l>"; }
# Filter out all Makefile code not relevant here
my @buffer2 = ();
foreach my $l ( @buffer1 ) {
if ( $l=~ /^\t.*$/o )
{ #ignore: Production of a make rule.
} elsif ( $l =~ /^\s*([a-zA-Z0-9_]*dir)\s*\=\s*(.*)\s*$/o )
{ # dirs
push @buffer2, "$l";
$dirmap{"\$\($1\)"} = replace($2);
} elsif ( $l =~ /^\s*noinst_(.*)\s*[\+]?\=(.*)$/o )
{
#ignore: noinst_* are not relevant here.
} elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_(HEADERS|LIBRARIES|DATA|SCRIPTS|PROGRAMS)\s*([\+]?\=)\s*(.*)/o )
{
if ( ( "$5" eq '=' ) ) {
my $v = $dirmap{"\$\($3dir\)"};
if ( $v =~ /\$\(PROJECT_[^\)]+\)$/ )
{
$predefs{"$v"} = 1;
}
}
foreach my $f ( split(' ',$6) ) {
push @buffer2, "$1$2$3_$4 +=$f\n";
}
} elsif ( $l =~ /^\s*(if|else|endif)\s*.*$/o )
{ # conditionals
push @buffer2, "$l";
}
# Check if Makefile.am already contains CLEANFILES or DISTCLEANFILES
if ( $l =~ /^\s*(CLEANFILES|DISTCLEANFILES|SUBDIRS)\s*\=.*$/o )
{
$predefs{"$1"} = 1;
}
}
if ( $predefs{"\$(PROJECT_INCLUDE)"} ){
unshift @buffer2, "includedir = \$(includedir)\n";
}
if ( $predefs{"\$(PROJECT_LIB)"} ){
unshift @buffer2, "libdir = \$(libdir)\n";
}
# foreach my $l ( @buffer2 ) { print STDERR "2:<$l>"; }
my @buffer3 = ();
foreach my $l ( @buffer2 ) {
if ( $l =~ /^\s*([a-zA-Z0-9_]*dir)\s*\=\s*(.*)\s*$/o )
{ # dirs
my $v = $dirmap{"\$\($1\)"};
print_dirstamp(\@buffer3,$v,"PREINSTALL_DIRS");
$seen{"PREINSTALL_DIRS"} = 1;
} elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_HEADERS\s*\+\=(.*)/o )
{ # preinstall
my $v = $dirmap{"\$\($3dir\)"};
my $f = $4;
my $x ; my $i = rindex($f,'/');
if ($i < 0) { $x="$f";
} else { $x = substr($f,$i+1);
}
push @buffer3,
"$v/$x: $f $v/\$(dirstamp)\n",
"\t\$(INSTALL_DATA) \$< $v/$x\n",
"PREINSTALL_FILES += $v/$x\n\n";
$seen{"PREINSTALL_FILES"} = 1;
} elsif ( $l =~ /^\s*(nodist_|dist_|)(project_)([a-zA-Z0-9_]+)_LIBRARIES\s*\+\=(.*)/o )
{ # tmpinstall
my $v = $dirmap{"\$\($3dir\)"};
my $f = $4;
my $x ; my $i = rindex($f,'/');
if ($i < 0) { $x="$f";
} else { $x = substr($f,$i+1);
}
push @buffer3,
"$v/$x: $f $v/\$(dirstamp)\n",
"\t\$(INSTALL_DATA) \$< $v/$x\n",
"TMPINSTALL_FILES += $v/$x\n\n";
$seen{"TMPINSTALL_FILES"} = 1;
} elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_LIBRARIES\s*\+\=(.*)/o )
{ # ignore
} elsif ( $l =~ /^\s*(dist_)(project_)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
{ # preinstall
my $v = $dirmap{"\$\($3dir\)"};
my $f = $4;
my $x ; my $i = rindex($f,'/');
if ($i < 0) { $x="$f";
} else { $x = substr($f,$i+1);
}
push @buffer3,
"$v/$x: $f $v/\$(dirstamp)\n",
"\t\$(INSTALL_DATA) \$< $v/$x\n",
"PREINSTALL_FILES += $v/$x\n\n";
$seen{"PREINSTALL_FILES"} = 1;
} elsif ( $l =~ /^\s*(nodist_|)(project_)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
{ # tmpinstall
my $v = $dirmap{"\$\($3dir\)"};
my $f = $4;
my $x ; my $i = rindex($f,'/');
if ($i < 0) { $x="$f";
} else { $x = substr($f,$i+1);
}
push @buffer3,
"$v/$x: $f $v/\$(dirstamp)\n",
"\t\$(INSTALL_DATA) \$< $v/$x\n",
"TMPINSTALL_FILES += $v/$x\n\n";
$seen{"TMPINSTALL_FILES"} = 1;
} elsif ( $l =~ /^\s*(dist_|)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
{ # ignore
} elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_SCRIPTS\s*\+\=(.*)/o )
{ # ignore
} elsif ( $l =~ /^\s*(nodist_|dist_|)(project_)([a-zA-Z0-9_]+)_PROGRAMS\s*\+\=(.*)/o )
{ # tmpinstall
my $v = $dirmap{"\$\($3dir\)"};
my $f = $4;
my $x ; my $i = rindex($f,'/');
if ($i < 0) { $x="$f";
} else { $x = substr($f,$i+1);
}
push @buffer3,
"$v/$x: $f $v/\$(dirstamp)\n",
"\t\$(INSTALL_PROGRAM) \$< $v/$x\n",
"TMPINSTALL_FILES += $v/$x\n\n";
$seen{"TMPINSTALL_FILES"} = 1;
} elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_PROGRAMS\s*\+\=(.*)/o )
{ # ignore
} elsif ( $l =~ /^\s*(if|else|endif)\s*.*$/o )
{ # conditionals
push @buffer3, "$l";
}
}
# foreach my $l ( @buffer3 ) { print STDERR "3:<$l>"; }
my $output;
$output .= "## Automatically generated by ampolish3 - Do not edit\n\n";
$output .= "if AMPOLISH3\n";
$output .= "\$(srcdir)/preinstall.am: Makefile.am\n";
$output .= "\t\$(AMPOLISH3) \$(srcdir)/Makefile.am > \$(srcdir)/preinstall.am\n";
$output .= "endif\n\n";
foreach my $k ( keys %seen )
{
if ( $k =~ /PREINSTALL_FILES/o ) {
$output .= "all-am: \$(PREINSTALL_FILES)\n\n";
$output .= "$k =\n";
$output .= "CLEANFILES ";
if ( $predefs{"CLEANFILES"} ) { $output .= "+"; }
$output .= "= \$($k)\n";
$predefs{"CLEANFILES"} = 1;
} elsif ( $k =~ /TMPINSTALL_FILES/o ) {
$output .= "all-local: \$(TMPINSTALL_FILES)\n\n";
$output .= "$k =\n";
$output .= "CLEANFILES ";
if ( $predefs{"CLEANFILES"} ) { $output .= "+"; }
$output .= "= \$($k)\n";
$predefs{"CLEANFILES"} = 1;
} elsif ( $k =~ /.*DIRS/o ) {
$output .= "$k =\n";
$output .= "DISTCLEANFILES ";
if ( $predefs{"DISTCLEANFILES"} ) { $output .= "+"; }
$output .= "= \$($k)\n";
$predefs{"DISTCLEANFILES"} = 1;
}
$output .= "\n";
}
# Pretty printing
$output .= join ( '', @buffer3 );
$output =~ s/\nelse\n+endif/\nendif/g;
$output =~ s/\n\n+endif/\nendif/g;
$output =~ s/\nif [a-zA-Z0-9_!]+\n+endif//g;
print STDOUT $output;
exit 0;
sub replace($)
{
my ($v) = @_;
foreach my $i ( keys %dirmap )
{
$v =~ s/\Q$i/$dirmap{$i}/g;
}
return $v;
}
sub print_dirstamp($$$)
{
my ($obuf,$file,$inst) = @_ ;
push @{$obuf}, "$file/\$(dirstamp):\n\t\@\$\(MKDIR_P\) $file\n" ;
push @{$obuf}, "\t\@: \> $file/\$(dirstamp)\n" ;
push @{$obuf}, "$inst += $file/\$(dirstamp)\n\n" ;
}

10
automake/host.am Normal file
View File

@@ -0,0 +1,10 @@
## $Id$
## NOTE: This is a temporary work-around to keep
## RTEMS's non automake standard make targets working.
## Once automake is fully integrated these make targets
## and this file will probably be removed
preinstall-am: $(PREINSTALL_FILES)
preinstall: preinstall-am
.PHONY: preinstall preinstall-am

7
automake/local.am Normal file
View File

@@ -0,0 +1,7 @@
## $Id$
preinstall-am: $(PREINSTALL_FILES)
preinstall: preinstall-am
.PHONY: preinstall preinstall-am
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools

32
automake/subdirs.am Normal file
View File

@@ -0,0 +1,32 @@
## $Id$
## Borrowed from automake-1.4 and adapted to RTEMS
## NOTE: This is a temporary work-around to keep
## RTEMS's non automake standard make targets working.
## Once automake is fully integrated these make targets
## and this file will probably be removed
preinstall-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
## This trick allows "-k" to keep its natural meaning when running a
## recursive rule.
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
preinstall: preinstall-recursive
.PHONY: preinstall-recursive

228
bootstrap Executable file
View File

@@ -0,0 +1,228 @@
#! /bin/sh
#
# helps bootstrapping, when checked out from CVS
# requires GNU autoconf and GNU automake
#
# $Id$
# this is not meant to be exported outside the source tree
# NOTE: Inspired by libtool's autogen script
# to be run from the toplevel directory of RTEMS'
# source tree
progname=`basename $0`
top_srcdir=`dirname $0`
verbose="";
quiet="false"
mode="generate"
usage()
{
echo
echo "usage: ${progname} [-c|-p|-h] [-q][-v]"
echo
echo "options:"
echo " -c .. clean, remove all aclocal/autoconf/automake generated files"
echo " -h .. display this message and exit"
echo " -p .. regenerate preinstall.am files"
echo " -q .. quiet, don't display directories"
echo " -v .. verbose, pass -v to autotools"
echo
exit 1;
}
generate_bspdir_acinclude()
{
cat << EOF > acinclude.m4~
# RTEMS_CHECK_BSPDIR(RTEMS_BSP_FAMILY)
AC_DEFUN([RTEMS_CHECK_BSPDIR],
[
case "\$1" in
EOF
for i in */bsp_specs; do
d=`dirname $i`
cat << EOF >> acinclude.m4~
$d )
AC_CONFIG_SUBDIRS([$d]);;
EOF
done
cat << EOF >> acinclude.m4~
*)
AC_MSG_ERROR([Invalid BSP]);;
esac
])
EOF
if cmp -s acinclude.m4 acinclude.m4~ 2>/dev/null; then
echo "acinclude.m4 is unchanged";
else
cp acinclude.m4~ acinclude.m4
fi
rm -f acinclude.m4~
}
if test ! -f $top_srcdir/aclocal/version.m4; then
echo "${progname}:"
echo " Installation problem: Can't find file aclocal/version.m4"
exit 1;
fi
while test $# -gt 0; do
case $1 in
-h|--he|--hel|--help)
usage ;;
-q|--qu|--qui|--quie|--quiet)
quiet="true";
shift;;
-v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
verbose="-v";
shift;;
-c|--cl|--cle|--clea|--clean)
mode="clean";
shift;;
-p|--pr|--pre|--prei|--prein|--preins|--preinst)
mode="preinstall";
shift;;
-r|--re|--rec|--reco|--recon|--reconf)
mode="autoreconf";
shift;;
-*) echo "unknown option $1" ;
usage ;;
*) echo "invalid parameter $1" ;
usage ;;
esac
done
case $mode in
preinstall)
confs=`find -name Makefile.am -exec grep -l 'include .*/preinstall\.am' {} \;`
for i in $confs; do
dir=$(dirname $i);
test "$quite" = "true" || echo "Generating $dir/preinstall.am"
${top_srcdir}/ampolish3 "$dir/Makefile.am" > "$dir/preinstall.am"
done
;;
generate)
AUTOCONF=${AUTOCONF-autoconf}
if test -z "$AUTOCONF"; then
echo "You must have autoconf installed to run $program"
exit 1
fi
AUTOHEADER=${AUTOHEADER-autoheader}
if test -z "$AUTOHEADER"; then
echo "You must have autoconf installed to run $program"
exit 1
fi
AUTOMAKE=${AUTOMAKE-automake}
if test -z "$AUTOMAKE"; then
echo "You must have automake installed to run $program"
exit 1
fi
ACLOCAL=${ACLOCAL-aclocal}
if test -z "$ACLOCAL"; then
echo "You must have automake installed to run $program"
exit 1
fi
case $top_srcdir in
/* ) aclocal_dir=$top_srcdir
;;
*) aclocal_dir=`pwd`/$top_srcdir
;;
esac
confs=`find . \( -name 'configure.in' -o -name 'configure.ac' \) -print`
for i in $confs; do
dir=`dirname $i`;
configure=`basename $i`;
( test "$quiet" = "true" || echo "$dir";
cd $dir;
test -n "`grep RTEMS_CHECK_BSPDIR ${configure}`" && \
generate_bspdir_acinclude;
pat="s,\$(RTEMS_TOPdir),${aclocal_dir},g"
aclocal_args=`grep '^[ ]*ACLOCAL_AMFLAGS' Makefile.am | \
sed -e 's%.*ACLOCAL_AMFLAGS.*\=[ ]*%%g' -e $pat ` ;
test "$verbose" = "-v" && echo "${ACLOCAL} $aclocal_args"
${ACLOCAL} $aclocal_args;
test -n "`grep CONFIG_HEADER ${configure}`" && ${AUTOHEADER} \
&& test "$verbose" = "-v" && echo "${AUTOHEADER}";
test -n "`grep RTEMS_BSP_CONFIGURE ${configure}`" && ${AUTOHEADER} \
&& test "$verbose" = "-v" && echo "${AUTOHEADER}";
test -f Makefile.am && ${AUTOMAKE} -a -c $verbose ;
${AUTOCONF};
test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
&& echo timestamp > stamp-h.in
)
done
;;
autoreconf)
AUTORECONF=${AUTORECONF-autoreconf}
if test -z "$AUTORECONF"; then
echo "You must have autoreconf installed to run $program"
exit 1
fi
confs=`find . -name 'configure.ac' -print`
for i in $confs; do
dir=`dirname $i`;
configure=`basename $i`;
( test "$quiet" = "true" || echo "$dir";
cd $dir;
test -n "`grep RTEMS_CHECK_BSPDIR ${configure}`" && \
generate_bspdir_acinclude;
${AUTORECONF} -i --no-recursive $verbose;
test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
&& echo timestamp > stamp-h.in
)
done
;;
clean)
test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;
for i in $files; do if test -f $i; then
rm -f $i
test "$verbose" = "-v" && echo "$i"
fi; done
test "$quiet" = "true" || echo "removing configure files"
files=`find . -name 'configure' -print` ;
test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
for i in $files; do if test -f $i; then
rm -f $i config.sub config.guess depcomp install-sh mdate-sh missing \
mkinstalldirs texinfo.tex compile
test "$verbose" = "-v" && echo "$i"
fi; done
test "$quiet" = "true" || echo "removing aclocal.m4 files"
files=`find . -name 'aclocal.m4' -print` ;
test "$verbose" = "-v" && test -n "$files" && echo "$files" ;
for i in $files; do if test -f $i; then
rm -f $i
test "$verbose" = "-v" && echo "$i"
fi; done
find . -name '*~' -print | xargs rm -f
find . -name 'bspopts.h.in' -print | xargs rm -f
find . -name '*.orig' -print | xargs rm -f
find . -name '*.rej' -print | xargs rm -f
find . -name 'config.status' -print | xargs rm -f
find . -name 'config.log' -print | xargs rm -f
find . -name 'config.cache' -print | xargs rm -f
find . -name 'Makefile' -print | xargs rm -f
find . -name '.deps' -print | xargs rm -rf
find . -name '.libs' -print | xargs rm -rf
find . -name 'stamp-h.in' | xargs rm -rf
find . -name 'autom4te*.cache' | xargs rm -rf
;;
esac
exit 0

View File

@@ -1,70 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief Console Configuration
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/bspIo.h>
#include <bsp.h>
#include <dev/serial/arm-pl011.h>
#include <bsp/console-termios.h>
#include <bspopts.h>
arm_pl011_context a53_qemu_vpl011_context = {
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("PL011"),
.regs = (arm_pl011_uart *) BSP_A53_QEMU_VPL011_BASE,
.initial_baud = 115200,
.clock = 24000000
};
const console_device console_device_table[] = {
{
.device_file = "/dev/ttyS0",
.probe = console_device_probe_default,
.handler = &arm_pl011_fns,
.context = &a53_qemu_vpl011_context.base
}
};
const size_t console_device_count = RTEMS_ARRAY_SIZE(console_device_table);
static void output_char( char c )
{
arm_pl011_write_polled(&a53_qemu_vpl011_context.base, c);
}
BSP_output_char_function_type BSP_output_char = output_char;
BSP_polling_getchar_function_type BSP_poll_char = NULL;

View File

@@ -1,74 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief Core BSP definitions
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_A53_QEMU_BSP_H
#define LIBBSP_AARCH64_A53_QEMU_BSP_H
/**
* @addtogroup RTEMSBSPsAArch64
*
* @{
*/
#include <bspopts.h>
#ifndef ASM
#include <bsp/default-initial-extension.h>
#include <bsp/start.h>
#include <rtems.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_ARM_GIC_CPUIF_BASE 0x08010000
#define BSP_ARM_GIC_DIST_BASE 0x08000000
#define BSP_ARM_GIC_REDIST_BASE 0x080A0000
#define BSP_A53_QEMU_VPL011_BASE 0x9000000
#define BSP_A53_QEMU_VPL011_LENGTH 0x1000
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
/** @} */
#endif /* LIBBSP_AARCH64_A53_QEMU_BSP_H */

View File

@@ -1,66 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief BSP IRQ definitions
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_A53_IRQ_H
#define LIBBSP_AARCH64_A53_IRQ_H
#ifndef ASM
#include <rtems/irq.h>
#include <rtems/irq-extension.h>
#include <dev/irq/arm-gic-irq.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_INTERRUPT_VECTOR_COUNT 256
/* Interrupts vectors */
#define BSP_TIMER_VIRT_PPI 27
#define BSP_TIMER_PHYS_NS_PPI 30
#define BSP_VPL011_SPI 32
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
#endif /* LIBBSP_AARCH64_A53_IRQ_H */

View File

@@ -1,46 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief BSP tm27 header
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_TMTEST27
#error "This is an RTEMS internal file you must not include directly."
#endif
#ifndef __tm27_h
#define __tm27_h
#include <dev/irq/arm-gic-tm27.h>
#endif /* __tm27_h */

View File

@@ -1,49 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief BSP Startup
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
void bsp_start( void )
{
bsp_interrupt_initialize();
rtems_cache_coherent_add_area(
bsp_section_nocacheheap_begin,
(uintptr_t) bsp_section_nocacheheap_size
);
}

View File

@@ -1,52 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief BSP Startup Hooks
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/start.h>
#ifdef BSP_START_ENABLE_EL3_START_SUPPORT
BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
{
/* Do nothing */
}
#endif
BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
{
AArch64_start_set_vector_base();
bsp_start_copy_sections();
bsp_start_clear_bss();
}

View File

@@ -1,70 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A72
*
* @brief Console Configuration
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/bspIo.h>
#include <bsp.h>
#include <dev/serial/arm-pl011.h>
#include <bsp/console-termios.h>
#include <bspopts.h>
arm_pl011_context a72_qemu_vpl011_context = {
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("PL011"),
.regs = (arm_pl011_uart *) BSP_A72_QEMU_VPL011_BASE,
.initial_baud = 115200,
.clock = 24000000
};
const console_device console_device_table[] = {
{
.device_file = "/dev/ttyS0",
.probe = console_device_probe_default,
.handler = &arm_pl011_fns,
.context = &a72_qemu_vpl011_context.base
}
};
const size_t console_device_count = RTEMS_ARRAY_SIZE(console_device_table);
static void output_char( char c )
{
arm_pl011_write_polled(&a72_qemu_vpl011_context.base, c);
}
BSP_output_char_function_type BSP_output_char = output_char;
BSP_polling_getchar_function_type BSP_poll_char = NULL;

View File

@@ -1,74 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A72
*
* @brief Core BSP definitions
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_A72_QEMU_BSP_H
#define LIBBSP_AARCH64_A72_QEMU_BSP_H
/**
* @addtogroup RTEMSBSPsAArch64
*
* @{
*/
#include <bspopts.h>
#ifndef ASM
#include <bsp/default-initial-extension.h>
#include <bsp/start.h>
#include <rtems.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_ARM_GIC_CPUIF_BASE 0x08010000
#define BSP_ARM_GIC_DIST_BASE 0x08000000
#define BSP_ARM_GIC_REDIST_BASE 0x080A0000
#define BSP_A72_QEMU_VPL011_BASE 0x9000000
#define BSP_A72_QEMU_VPL011_LENGTH 0x1000
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
/** @} */
#endif /* LIBBSP_AARCH64_A72_QEMU_BSP_H */

View File

@@ -1,66 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A72
*
* @brief BSP IRQ definitions
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_A72_IRQ_H
#define LIBBSP_AARCH64_A72_IRQ_H
#ifndef ASM
#include <rtems/irq.h>
#include <rtems/irq-extension.h>
#include <dev/irq/arm-gic-irq.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_INTERRUPT_VECTOR_COUNT 1020
/* Interrupts vectors */
#define BSP_TIMER_VIRT_PPI 27
#define BSP_TIMER_PHYS_NS_PPI 30
#define BSP_VPL011_SPI 32
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
#endif /* LIBBSP_AARCH64_A72_IRQ_H */

View File

@@ -1,46 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A72
*
* @brief BSP tm27 header
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_TMTEST27
#error "This is an RTEMS internal file you must not include directly."
#endif
#ifndef __tm27_h
#define __tm27_h
#include <dev/irq/arm-gic-tm27.h>
#endif /* __tm27_h */

View File

@@ -1,49 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief BSP Startup
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
void bsp_start( void )
{
bsp_interrupt_initialize();
rtems_cache_coherent_add_area(
bsp_section_nocacheheap_begin,
(uintptr_t) bsp_section_nocacheheap_size
);
}

View File

@@ -1,52 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64A53
*
* @brief BSP Startup Hooks
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/start.h>
#ifdef BSP_START_ENABLE_EL3_START_SUPPORT
BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
{
/* Do nothing */
}
#endif
BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
{
AArch64_start_set_vector_base();
bsp_start_copy_sections();
bsp_start_clear_bss();
}

View File

@@ -1,271 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup aarch64_start
*
* @brief AArch64 MMU configuration.
*/
/*
* Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_SHARED_AARCH64_MMU_H
#define LIBBSP_AARCH64_SHARED_AARCH64_MMU_H
#include <bsp/fatal.h>
#include <bsp/linker-symbols.h>
#include <bsp/start.h>
#include <bsp/utility.h>
#include <bspopts.h>
#include <libcpu/mmu-vmsav8-64.h>
#include <rtems/score/aarch64-system-registers.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct {
uintptr_t begin;
uintptr_t end;
uint64_t flags;
} aarch64_mmu_config_entry;
#define AARCH64_MMU_DEFAULT_SECTIONS \
{ \
.begin = (uintptr_t) bsp_section_fast_text_begin, \
.end = (uintptr_t) bsp_section_fast_text_end, \
.flags = AARCH64_MMU_CODE_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_fast_data_begin, \
.end = (uintptr_t) bsp_section_fast_data_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_start_begin, \
.end = (uintptr_t) bsp_section_start_end, \
.flags = AARCH64_MMU_CODE_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_vector_begin, \
.end = (uintptr_t) bsp_section_vector_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_text_begin, \
.end = (uintptr_t) bsp_section_text_end, \
.flags = AARCH64_MMU_CODE_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_rodata_begin, \
.end = (uintptr_t) bsp_section_rodata_end, \
.flags = AARCH64_MMU_DATA_RO_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_data_begin, \
.end = (uintptr_t) bsp_section_data_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_bss_begin, \
.end = (uintptr_t) bsp_section_bss_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_rtemsstack_begin, \
.end = (uintptr_t) bsp_section_rtemsstack_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_noinit_begin, \
.end = (uintptr_t) bsp_section_noinit_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_work_begin, \
.end = (uintptr_t) bsp_section_work_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_stack_begin, \
.end = (uintptr_t) bsp_section_stack_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
.begin = (uintptr_t) bsp_section_nocache_begin, \
.end = (uintptr_t) bsp_section_nocache_end, \
.flags = AARCH64_MMU_DEVICE \
}, { \
.begin = (uintptr_t) bsp_section_nocachenoload_begin, \
.end = (uintptr_t) bsp_section_nocachenoload_end, \
.flags = AARCH64_MMU_DEVICE \
}, { \
.begin = (uintptr_t) bsp_translation_table_base, \
.end = (uintptr_t) bsp_translation_table_end, \
.flags = AARCH64_MMU_DATA_RW_CACHED \
}, { \
/*
* The vector table must be in writable and executable memory as it stores both
* exception code and the mutable pointer to which it jumps
*/ \
.begin = (uintptr_t) bsp_start_vector_table_begin, \
.end = (uintptr_t) bsp_start_vector_table_end, \
.flags = AARCH64_MMU_CODE_RW_CACHED \
}
/**
* @brief This is the AArch64 MMU configuration table.
*
* The default table is provided by the BSP. Applications may provide their
* own.
*/
extern const aarch64_mmu_config_entry aarch64_mmu_config_table[];
/**
* @brief This is the count of entries in the AArch64 MMU configuration table.
*
* The default table is provided by the BSP. Applications may provide their
* own.
*/
extern const size_t aarch64_mmu_config_table_size;
/**
* @brief This structure represents the state to maintain the MMU translation
* tables.
*/
typedef struct {
/**
* @brief This member references the translation table base.
*/
uint64_t *ttb;
/**
* @brief This member contains the count of used page tables.
*
* A maximum of ::AARCH64_MMU_TRANSLATION_TABLE_PAGES can be used.
*/
size_t used_page_tables;
} aarch64_mmu_control;
/**
* @brief This object is used to maintain the MMU translation tables.
*/
extern aarch64_mmu_control aarch64_mmu_instance;
/**
* @brief Sets the MMU translation table entries associated with the memory
* region.
*
* @param[in, out] control is a reference to the MMU control state.
*
* @param[in] config is the configuration entry with the memory region and
* region attributes.
*
* @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
*
* @retval ::RTEMS_INVALID_ADDRESS The begin address of the memory region
* cannot be mapped by the MMU.
*
* @retval ::RTEMS_INVALID_SIZE The end address of the memory region cannot be
* mapped by the MMU.
*
* @retval ::RTEMS_TOO_MANY There was no page table entry available to perform
* the mapping.
*/
rtems_status_code aarch64_mmu_set_translation_table_entries(
aarch64_mmu_control *control,
const aarch64_mmu_config_entry *config
);
/**
* @brief Sets up the MMU translation table.
*
* The memory regions of the configuration table are mapped by the MMU. If a
* mapping is infeasible, then the BSP fatal error
* ::AARCH64_FATAL_MMU_CANNOT_MAP_BLOCK will be issued.
*
* @param[in, out] control is a reference to the MMU control state.
*
* @param[in] config_table is the configuration table with memory regions and
* region attributes.
*
* @param config_count is the count of configuration table entries.
*/
void aarch64_mmu_setup_translation_table(
aarch64_mmu_control *control,
const aarch64_mmu_config_entry *config_table,
size_t config_count
);
BSP_START_TEXT_SECTION static inline void
aarch64_mmu_enable( const aarch64_mmu_control *control )
{
uint64_t sctlr;
/* CPUECTLR_EL1.SMPEN is already set on ZynqMP and is not writable */
/* Flush and invalidate cache */
rtems_cache_flush_entire_data();
_AArch64_Write_ttbr0_el1( (uintptr_t) control->ttb );
_AARCH64_Instruction_synchronization_barrier();
/* Enable MMU and cache */
sctlr = _AArch64_Read_sctlr_el1();
sctlr |= AARCH64_SCTLR_EL1_I | AARCH64_SCTLR_EL1_C | AARCH64_SCTLR_EL1_M;
_AArch64_Write_sctlr_el1( sctlr );
}
BSP_START_TEXT_SECTION static inline void
aarch64_mmu_disable( void )
{
uint64_t sctlr;
/*
* Flush data cache before disabling the MMU. While the MMU is disabled, all
* accesses are treated as uncached device memory.
*/
rtems_cache_flush_entire_data();
/* Disable MMU */
sctlr = _AArch64_Read_sctlr_el1();
sctlr &= ~(AARCH64_SCTLR_EL1_M);
_AArch64_Write_sctlr_el1( sctlr );
}
BSP_START_TEXT_SECTION static inline void aarch64_mmu_setup( void )
{
/* Set TCR */
/* 256TB/48 bits mappable (64-0x10) */
_AArch64_Write_tcr_el1(
AARCH64_TCR_EL1_T0SZ( 0x10 ) | AARCH64_TCR_EL1_IRGN0( 0x1 ) |
AARCH64_TCR_EL1_ORGN0( 0x1 ) | AARCH64_TCR_EL1_SH0( 0x3 ) |
AARCH64_TCR_EL1_TG0( 0x0 ) | AARCH64_TCR_EL1_IPS( 0x5ULL ) |
AARCH64_TCR_EL1_EPD1
);
/* Set MAIR */
_AArch64_Write_mair_el1(
AARCH64_MAIR_EL1_ATTR0( 0x0 ) | AARCH64_MAIR_EL1_ATTR1( 0x4 ) |
AARCH64_MAIR_EL1_ATTR2( 0x44 ) | AARCH64_MAIR_EL1_ATTR3( 0xFF )
);
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_SHARED_AARCH64_MMU_H */

View File

@@ -1,86 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsLinkerSymbolsAArch64
*
* @brief This header file provides interfaces to AArch64-specific linker
* symbols and sections.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_SHARED_LINKER_SYMBOLS_H
#define LIBBSP_AARCH64_SHARED_LINKER_SYMBOLS_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup RTEMSBSPsLinkerSymbolsAArch64 AArch64 Linker Symbols
*
* @ingroup RTEMSBSPsLinkerSymbols
*
* @brief This group provides support for AArch64-specific linker symbols and
* sections.
*
* @{
*/
#ifndef ASM
#define LINKER_SYMBOL(sym) extern char sym [];
#else
#define LINKER_SYMBOL(sym) .extern sym
#endif
LINKER_SYMBOL(bsp_stack_exception_size)
LINKER_SYMBOL(bsp_stack_hyp_size)
LINKER_SYMBOL(bsp_section_vector_begin)
LINKER_SYMBOL(bsp_section_vector_end)
LINKER_SYMBOL(bsp_section_vector_size)
LINKER_SYMBOL(bsp_vector_table_begin)
LINKER_SYMBOL(bsp_vector_table_end)
LINKER_SYMBOL(bsp_vector_table_size)
LINKER_SYMBOL(bsp_start_vector_table_begin)
LINKER_SYMBOL(bsp_start_vector_table_end)
LINKER_SYMBOL(bsp_start_vector_table_size)
LINKER_SYMBOL(bsp_translation_table_base)
LINKER_SYMBOL(bsp_translation_table_end)
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_SHARED_LINKER_SYMBOLS_H */

View File

@@ -1,184 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup aarch64_start
*
* @brief Aarch64 system low level start.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_SHARED_START_H
#define LIBBSP_AARCH64_SHARED_START_H
#include <string.h>
#include <bsp/linker-symbols.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup aarch64_start System Start
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief Aarch64 system low level start.
*
* @{
*/
#define BSP_START_TEXT_SECTION __attribute__((section(".bsp_start_text")))
#define BSP_START_DATA_SECTION __attribute__((section(".bsp_start_data")))
/**
* @brief System start entry.
*/
void _start(void);
/**
* @brief Start entry hook 0.
*
* This hook will be called from the start entry code after all modes and
* stack pointers are initialized but before the copying of the exception
* vectors.
*/
void bsp_start_hook_0(void);
/**
* @brief Start entry hook 1.
*
* This hook will be called from the start entry code after copying of the
* exception vectors but before the call to boot_card().
*/
void bsp_start_hook_1(void);
BSP_START_TEXT_SECTION static inline void
bsp_start_memcpy_libc(void *dest, const void *src, size_t n)
{
if (dest != src) {
memcpy(dest, src, n);
}
}
/**
* @brief Copies all standard sections from the load to the runtime area.
*/
BSP_START_TEXT_SECTION static inline void bsp_start_copy_sections(void)
{
/* Copy .text section */
bsp_start_memcpy_libc(
(int *) bsp_section_text_begin,
(const int *) bsp_section_text_load_begin,
(size_t) bsp_section_text_size
);
/* Copy .rodata section */
bsp_start_memcpy_libc(
(int *) bsp_section_rodata_begin,
(const int *) bsp_section_rodata_load_begin,
(size_t) bsp_section_rodata_size
);
/* Copy .data section */
bsp_start_memcpy_libc(
(int *) bsp_section_data_begin,
(const int *) bsp_section_data_load_begin,
(size_t) bsp_section_data_size
);
/* Copy .fast_text section */
bsp_start_memcpy_libc(
(int *) bsp_section_fast_text_begin,
(const int *) bsp_section_fast_text_load_begin,
(size_t) bsp_section_fast_text_size
);
/* Copy .fast_data section */
bsp_start_memcpy_libc(
(int *) bsp_section_fast_data_begin,
(const int *) bsp_section_fast_data_load_begin,
(size_t) bsp_section_fast_data_size
);
}
/**
* @brief Copies the .data, .fast_text and .fast_data sections from the load to
* the runtime area using the C library memcpy().
*
* Works only in case the .start, .text and .rodata sections reside in one
* memory region.
*/
BSP_START_TEXT_SECTION static inline void bsp_start_copy_sections_compact(void)
{
/* Copy .data section */
bsp_start_memcpy_libc(
bsp_section_data_begin,
bsp_section_data_load_begin,
(size_t) bsp_section_data_size
);
/* Copy .fast_text section */
bsp_start_memcpy_libc(
bsp_section_fast_text_begin,
bsp_section_fast_text_load_begin,
(size_t) bsp_section_fast_text_size
);
/* Copy .fast_data section */
bsp_start_memcpy_libc(
bsp_section_fast_data_begin,
bsp_section_fast_data_load_begin,
(size_t) bsp_section_fast_data_size
);
}
BSP_START_TEXT_SECTION static inline void bsp_start_clear_bss(void)
{
memset(bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);
}
BSP_START_TEXT_SECTION static inline void
AArch64_start_set_vector_base(void)
{
__asm__ volatile (
"msr VBAR_EL1, %[vtable]\n"
: : [vtable] "r" (bsp_start_vector_table_begin)
);
}
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_SHARED_START_H */

View File

@@ -1,88 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup DevIRQGIC
*
* @brief This header file provides interfaces of the ARM Generic Interrupt
* Controller (GIC) support specific to the AArch64 architecture.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_DEV_IRQ_ARM_GIC_AARCH64_H
#define _RTEMS_DEV_IRQ_ARM_GIC_AARCH64_H
#include <rtems/score/cpu.h>
#include <rtems/score/cpu_irq.h>
#include <bsp/irq-generic.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup DevIRQGIC
*
* @{
*/
static inline uint32_t arm_interrupt_enable_interrupts(void)
{
uint32_t status = _CPU_ISR_Get_level();
/* Enable interrupts for nesting */
_CPU_ISR_Set_level(0);
return status;
}
static inline void arm_interrupt_restore_interrupts(uint32_t status)
{
/* Restore interrupts to previous level */
_CPU_ISR_Set_level(status);
}
static inline void arm_interrupt_facility_set_exception_handler(void)
{
AArch64_set_exception_handler(
AARCH64_EXCEPTION_SPx_IRQ,
_AArch64_Exception_interrupt_no_nest
);
AArch64_set_exception_handler(
AARCH64_EXCEPTION_SP0_IRQ,
_AArch64_Exception_interrupt_nest
);
}
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* _RTEMS_DEV_IRQ_ARM_GIC_AARCH64_H */

View File

@@ -1,176 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief Console Configuration
*/
/*
* Copyright (C) 2022 Mohd Noor Aman
* Copyright (C) 2023 Utkarsh Verma
* Copyright (C) 2024 Ning Yang
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/bspIo.h>
#include <bsp.h>
#include <dev/serial/arm-pl011.h>
#include <bsp/irq.h>
#include <bsp/console.h>
#include <bsp/fatal.h>
#include <bsp/rpi-gpio.h>
#include <bspopts.h>
#include <rtems/console.h>
#include <rtems/rtems/status.h>
#include <rtems/termiosdevice.h>
#include <stdint.h>
#define CONSOLE_DEVICE_CONTEXT_NAME(port_no) uart##port_no##_context
#define CONSOLE_DEVICE_CONTEXT( \
port_no, _file_name, regs_base, _size, clock_freq, irq_no, \
context_type, ... \
) \
static context_type CONSOLE_DEVICE_CONTEXT_NAME(port_no) = { \
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("UART" #port_no), \
.regs = (volatile arm_pl011_uart *) regs_base, \
.clock = clock_freq, \
.initial_baud = 115200, \
.irq = irq_no, \
};
#define CONSOLE_DEVICE( \
port_no, file_name, _base, _size, _clock, _irq,_context_type, dev_handler, \
write_char_func, rx_pin, tx_pin, gpio_func, ... \
) \
[CONSOLE_DEVICE_PORT2ENUM(port_no)] = { \
.file = file_name, \
.context = &CONSOLE_DEVICE_CONTEXT_NAME(port_no).base, \
.gpio = {.rx = rx_pin, .tx = tx_pin, .function = gpio_func}, \
.handler = dev_handler, \
.write_char_polled = write_char_func, \
},
typedef struct {
const unsigned int rx;
const unsigned int tx;
const raspberrypi_gpio_function function;
} raspberrypi_console_device_gpio_config;
typedef struct {
const char* file;
rtems_termios_device_context* context;
const raspberrypi_console_device_gpio_config gpio;
const rtems_termios_device_handler* handler;
void (*write_char_polled)(rtems_termios_device_context*, char);
} raspberrypi_console_device;
/* Initialize all console device contexts */
CONSOLE_DEVICES(CONSOLE_DEVICE_CONTEXT)
/* Initialize all device configurations */
static const raspberrypi_console_device devices[CONSOLE_DEVICE_COUNT] = {
CONSOLE_DEVICES(CONSOLE_DEVICE)
};
static rtems_status_code console_device_init_gpio(
const raspberrypi_console_device_gpio_config *gpio
)
{
rtems_status_code status = raspberrypi_gpio_set_function(
gpio->rx,
gpio->function
);
if (status != RTEMS_SUCCESSFUL)
return status;
status = raspberrypi_gpio_set_function(gpio->tx, gpio->function);
if (status != RTEMS_SUCCESSFUL)
return status;
status = raspberrypi_gpio_set_pull(gpio->rx, GPIO_PULL_NONE);
if (status != RTEMS_SUCCESSFUL)
return status;
status = raspberrypi_gpio_set_pull(gpio->tx, GPIO_PULL_NONE);
return status;
}
static void output_char(const char ch) {
const raspberrypi_console_device* device = &devices[BSP_CONSOLE_PORT];
device->write_char_polled(device->context, ch);
}
static int poll_char(void) {
const raspberrypi_console_device* device = &devices[BSP_CONSOLE_PORT];
return device->handler->poll_read(device->context);
}
rtems_status_code raspberrypi_uart_init(
raspberrypi_console_device_port uart_num
)
{
const raspberrypi_console_device *device = &devices[uart_num];
rtems_status_code status = console_device_init_gpio(&device->gpio);
if (status != RTEMS_SUCCESSFUL) {
return status;
}
status = rtems_termios_device_install(
device->file, device->handler, NULL, device->context
);
return status;
}
rtems_device_driver console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
)
{
const raspberrypi_console_device* device = &devices[BSP_CONSOLE_PORT];
rtems_status_code status = raspberrypi_uart_init(BSP_CONSOLE_PORT);
if (status != RTEMS_SUCCESSFUL) {
bsp_fatal(BSP_FATAL_CONSOLE_INSTALL_0);
}
rtems_termios_initialize();
if (link(device->file, CONSOLE_DEVICE_NAME) != 0) {
bsp_fatal(BSP_FATAL_CONSOLE_INSTALL_1);
}
return RTEMS_SUCCESSFUL;
}
BSP_output_char_function_type BSP_output_char = output_char;
BSP_polling_getchar_function_type BSP_poll_char = poll_char;

View File

@@ -1,110 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief GPIO Driver
*/
/*
* Copyright (C) 2023 Utkarsh Verma
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/rtems/status.h>
#include <stdint.h>
#include <bsp/rpi-gpio.h>
#include <bsp/raspberrypi.h>
#define BSP_GPIO_BASE BCM2711_GPIO_BASE
#define BSP_GPIO_SIZE BCM2711_GPIO_SIZE
#define BSP_GPIO_PIN_COUNT BCM2711_GPIO_PIN_COUNT
#define GPFSEL0 BCM2835_REG(BSP_GPIO_BASE + 0x00)
#define GPSET0 BCM2835_REG(BSP_GPIO_BASE + 0x1c)
#define GPCLR0 BCM2835_REG(BSP_GPIO_BASE + 0x28)
#define GPIO_PUP_PDN_CTRL_REG0 BCM2835_REG(BSP_GPIO_BASE + 0xe4)
#define FSELn_SIZE 3
#define CLRn_SIZE 1
#define SETn_SIZE 1
#define REG_SET 1
static rtems_status_code raspberrypi_gpio_set_reg(
volatile uint32_t *base_reg,
const unsigned int pin,
const uint32_t value,
const unsigned int field_size
)
{
unsigned int field_mask, n_fields, shift, tmp;
volatile uint32_t *reg;
if (pin > BSP_GPIO_PIN_COUNT)
return RTEMS_INVALID_NUMBER;
field_mask = (1 << field_size) - 1;
if (value > field_mask)
return RTEMS_INVALID_NUMBER;
/* GPIO registers are uniformly subdivided */
n_fields = sizeof(uint32_t) * 8 / field_size;
/* Registers are sequentially mapped for each `n_field` GPIOs */
reg = base_reg + pin / n_fields;
shift = (pin % n_fields) * field_size;
tmp = *reg;
tmp &= ~(field_mask << shift); /* Clear the field */
tmp |= value << shift; /* Set value to the field */
*reg = tmp;
return RTEMS_SUCCESSFUL;
}
rtems_status_code raspberrypi_gpio_set_function(
const unsigned int pin,
const raspberrypi_gpio_function value
)
{
return raspberrypi_gpio_set_reg(&GPFSEL0, pin, value, FSELn_SIZE);
}
rtems_status_code raspberrypi_gpio_clear_pin(const unsigned int pin)
{
return raspberrypi_gpio_set_reg(&GPCLR0, pin, REG_SET, CLRn_SIZE);
}
rtems_status_code raspberrypi_gpio_set_pin(const unsigned int pin)
{
return raspberrypi_gpio_set_reg(&GPSET0, pin, REG_SET, SETn_SIZE);
}
rtems_status_code raspberrypi_gpio_set_pull(
const unsigned int pin,
const raspberrypi_gpio_pull value
)
{
return raspberrypi_gpio_set_reg(&GPIO_PUP_PDN_CTRL_REG0, pin, value, 2);
}

View File

@@ -1,73 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief Core BSP definitions
*/
/*
* Copyright (C) 2022 Mohd Noor Aman
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_4_BSP_H
#define LIBBSP_AARCH64_RASPBERRYPI_4_BSP_H
/**
* @addtogroup RTEMSBSPsAArch64
*
* @{
*/
#include <bspopts.h>
#ifndef ASM
#include <bsp/default-initial-extension.h>
#include <bsp/start.h>
#include <rtems.h>
/*Raspberry pi MMU initialization */
BSP_START_TEXT_SECTION void raspberrypi_4_setup_mmu_and_cache(void);
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_ARM_GIC_CPUIF_BASE 0xFF842000
#define BSP_ARM_GIC_DIST_BASE 0xFF841000
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
/** @} */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_4_BSP_H */

View File

@@ -1,71 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief Console Configuration
*/
/*
* Copyright (C) 2023 Utkarsh Verma
* Copyright (C) 2024 Ning Yang
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H
#define LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H
#include <bspopts.h>
#include <bsp/raspberrypi-uart.h>
#define CONSOLE_DEVICES RASPBERRYPI_CONSOLE_DEVICES
#define CONSOLE_DEVICE_PORT2ENUM(port_no) UART##port_no
#define CONSOLE_DEVICE_ENUM(port_no, ...) CONSOLE_DEVICE_PORT2ENUM(port_no),
typedef enum {
CONSOLE_DEVICES(CONSOLE_DEVICE_ENUM)
CONSOLE_DEVICE_COUNT,
} raspberrypi_console_device_port;
/**
* @brief Initialize gpio of UART and install UART to the dev directory.
*
* @param uart_num The optional devices are UART0, UART2, UART3, UART4, UART5.
*
* @retval RTEMS_SUCCESSFUL Successful operation.
* @retval RTEMS_INVALID_NUMBER This status code indicates that a specified
* number was invalid.
* @retval RTEMS_NO_MEMORY Not enough memory to create a device node.
* @retval RTEMS_UNSATISFIED Creation of the device file failed.
* @retval RTEMS_INCORRECT_STATE Termios is not initialized.
*/
rtems_status_code raspberrypi_uart_init(
raspberrypi_console_device_port uart_num
);
#undef CONSOLE_DEVICE_ENUM
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H */

View File

@@ -1,93 +0,0 @@
/**
* @file
*
* @ingroup raspberrypi_interrupt
*
* @brief Interrupt definitions.
*/
/**
* Copyright (c) 2013 Alan Cudmore
* Copyright (c) 2022 Mohd Noor Aman
* Copyright (c) 2024 Ning Yang
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.org/license/LICENSE
*
*/
#ifndef LIBBSP_ARM_RASPBERRYPI_IRQ_H
#define LIBBSP_ARM_RASPBERRYPI_IRQ_H
#ifndef ASM
#include <rtems.h>
#include <dev/irq/arm-gic-irq.h>
/**
* @defgroup raspberrypi_interrupt Interrrupt Support
*
* @ingroup RTEMSBSPsARMRaspberryPi
*
* @brief Interrupt support.
*/
#define BCM2835_INTC_TOTAL_IRQ 216
#define BCM2835_IRQ_SET1_MIN 0
#define BCM2835_IRQ_SET2_MIN 32
#define BCM2711_IRQ_VC_PERIPHERAL_BASE 96
/* Interrupt Vectors: System Timer */
#define BCM2835_IRQ_ID_GPU_TIMER_M0 (BCM2711_IRQ_VC_PERIPHERAL_BASE + 0)
#define BCM2835_IRQ_ID_GPU_TIMER_M1 (BCM2711_IRQ_VC_PERIPHERAL_BASE + 1)
#define BCM2835_IRQ_ID_GPU_TIMER_M2 (BCM2711_IRQ_VC_PERIPHERAL_BASE + 2)
#define BCM2835_IRQ_ID_GPU_TIMER_M3 (BCM2711_IRQ_VC_PERIPHERAL_BASE + 3)
/* Interrupt Vectors: SPI */
#define BCM2711_IRQ_SPI (BCM2711_IRQ_VC_PERIPHERAL_BASE + 54)
/* Interrupt Vectors: Videocore */
#define BCM2711_IRQ_VC_PERIPHERAL_BASE 96
#define BCM2711_IRQ_AUX (BCM2711_IRQ_VC_PERIPHERAL_BASE + 29)
#define BCM2711_IRQ_PL011_UART (BCM2711_IRQ_VC_PERIPHERAL_BASE + 57)
#define BCM2835_IRQ_ID_USB 9
#define BCM2835_IRQ_ID_AUX 29
#define BCM2835_IRQ_ID_SPI_SLAVE 43
#define BCM2835_IRQ_ID_PWA0 45
#define BCM2835_IRQ_ID_PWA1 46
#define BCM2835_IRQ_ID_SMI 48
#define BCM2835_IRQ_ID_GPIO_0 49
#define BCM2835_IRQ_ID_GPIO_1 50
#define BCM2835_IRQ_ID_GPIO_2 51
#define BCM2835_IRQ_ID_GPIO_3 52
#define BCM2835_IRQ_ID_I2C 53
#define BCM2835_IRQ_ID_SPI 54
#define BCM2835_IRQ_ID_PCM 55
#define BCM2835_IRQ_ID_UART 57
#define BCM2835_IRQ_ID_SD 62
#define BCM2835_IRQ_ID_BASIC_BASE_ID 64
#define BCM2835_IRQ_ID_TIMER_0 64
#define BCM2835_IRQ_ID_MAILBOX_0 65
#define BCM2835_IRQ_ID_DOORBELL_0 66
#define BCM2835_IRQ_ID_DOORBELL_1 67
#define BCM2835_IRQ_ID_GPU0_HALTED 68
#define BCM2835_IRQ_ID_GPU1_HALTED 69
#define BCM2835_IRQ_ID_ILL_ACCESS_1 70
#define BCM2835_IRQ_ID_ILL_ACCESS_0 71
#define BSP_TIMER_VIRT_PPI 27
#define BSP_TIMER_PHYS_NS_PPI 30
#define BSP_VPL011_SPI 32
#define BSP_INTERRUPT_VECTOR_COUNT BCM2835_INTC_TOTAL_IRQ
#define BSP_INTERRUPT_VECTOR_INVALID (UINT32_MAX)
#define BSP_IRQ_COUNT (BCM2835_INTC_TOTAL_IRQ)
#endif /* ASM */
#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */

View File

@@ -1,122 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup raspberrypi_4_spi
*
* @brief Raspberry Pi specific SPI definitions.
*/
/*
* Copyright (C) 2024 Ning Yang
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H
#define LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H
#include <bsp/utility.h>
#include <bsp/rpi-gpio.h>
typedef struct
{
uint32_t spics;
#define RPI_SPICS_LEN_LONG BSP_BIT32(25)
#define RPI_SPICS_DMA_LEN BSP_BIT32(24)
#define RPI_SPICS_CSPOL2 BSP_BIT32(23)
#define RPI_SPICS_CSPOL1 BSP_BIT32(22)
#define RPI_SPICS_CSPOL0 BSP_BIT32(21)
#define RPI_SPICS_RXF BSP_BIT32(20)
#define RPI_SPICS_RXR BSP_BIT32(19)
#define RPI_SPICS_TXD BSP_BIT32(18)
#define RPI_SPICS_RXD BSP_BIT32(17)
#define RPI_SPICS_DONE BSP_BIT32(16)
#define RPI_SPICS_LEN BSP_BIT32(13)
#define RPI_SPICS_REN BSP_BIT32(12)
#define RPI_SPICS_ADCS BSP_BIT32(11)
#define RPI_SPICS_INTR BSP_BIT32(10)
#define RPI_SPICS_INTD BSP_BIT32(9)
#define RPI_SPICS_DMAEN BSP_BIT32(8)
#define RPI_SPICS_TA BSP_BIT32(7)
#define RPI_SPICS_CSPOL BSP_BIT32(6)
#define RPI_SPICS_CLEAR_TX BSP_BIT32(5)
#define RPI_SPICS_CLEAR_RX BSP_BIT32(4)
#define RPI_SPICS_CPOL BSP_BIT32(3)
#define RPI_SPICS_CPHA BSP_BIT32(2)
#define RPI_SPICS_CS(val) BSP_FLD32(val, 0, 1)
#define RPI_SPICS_CS_SET(reg,val) BSP_FLD32SET(reg, val, 0, 1)
uint32_t spififo;
#define RPI_SPIFIFO_DATA(val) BSP_FLD32(val, 0, 31)
#define RPI_SPIFIFO_DATA_GET(reg) BSP_FLD32GET(reg, 0, 31)
#define RPI_SPIFIFO_DATA_SET(reg, val) BSP_FLD32SET(reg, val, 0, 31)
uint32_t spiclk;
#define RPI_SPICLK_CDIV(val) BSP_FLD32(val, 0, 15)
#define RPI_SPICLK_CDIV_GET(reg) BSP_FLD32GET(reg, 0, 15)
#define RPI_SPICLK_CDIV_SET(reg, val) BSP_FLD32SET(reg, val, 0, 15)
uint32_t spidlen;
#define RPI_SPIDLEN_LEN(val) BSP_FLD32(val, 0, 15)
#define RPI_SPIDLEN_LEN_GET(reg) BSP_FLD32GET(reg, 0, 15)
#define RPI_SPIDLEN_LEN_SET(reg, val) BSP_FLD32SET(reg, val, 0, 15)
uint32_t spiltoh;
#define RPI_SPILTOH_TOH(val) BSP_FLD32(val, 0, 3)
#define RPI_SPILTOH_TOH_GET(reg) BSP_FLD32GET(reg, 0, 3)
#define RPI_SPILTOH_TOH_SET(reg, val) BSP_FLD32SET(reg, val, 0, 3)
uint32_t spidc;
#define RPI_SPIDC_RPANIC(val) BSP_FLD32(val, 24, 31)
#define RPI_SPIDC_RPANIC_GET(reg) BSP_FLD32GET(reg, 24, 31)
#define RPI_SPIDC_RPANIC_SET(reg, val) BSP_FLD32SET(reg, val, 24, 31)
#define RPI_SPIDC_RDREQ(val) BSP_FLD32(val, 16, 23)
#define RPI_SPIDC_RDREQ_GET(reg) BSP_FLD32GET(reg, 16, 23)
#define RPI_SPIDC_RDREQ_SET(reg, val) BSP_FLD32SET(reg, val, 16, 23)
#define RPI_SPIDC_TPANIC(val) BSP_FLD32(val, 8, 15)
#define RPI_SPIDC_TPANIC_GET(reg) BSP_FLD32GET(reg, 8, 15)
#define RPI_SPIDC_TPANIC_SET(reg, val) BSP_FLD32SET(reg, val, 8, 15)
#define RPI_SPIDC_TDREQ(val) BSP_FLD32(val, 0, 7)
#define RPI_SPIDC_TDREQ_GET(reg) BSP_FLD32GET(reg, 0, 7)
#define RPI_SPIDC_TDREQ_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
} raspberrypi_spi;
typedef enum {
raspberrypi_SPI0,
raspberrypi_SPI3,
raspberrypi_SPI4,
raspberrypi_SPI5,
raspberrypi_SPI6
} raspberrypi_spi_device;
/**
* @brief Register a spi device.
*
* @param device The optional devices are raspberrypi_SPI0, raspberrypi_SPI3,
* raspberrypi_SPI4, raspberrypi_SPI5, raspberrypi_SPI6.
*
* @retval RTEMS_SUCCESSFUL Successfully registered SPI device.
* @retval RTEMS_INVALID_NUMBER This status code indicates that a specified
* number was invalid.
* @retval RTEMS_UNSATISFIED This status code indicates that the request was
* not satisfied.
*/
rtems_status_code raspberrypi_spi_init(raspberrypi_spi_device device);
#endif /* LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H */

View File

@@ -1,72 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief Raspberry Pi 4B Console Device Definitions
*/
/*
* Copyright (C) 2023 Utkarsh Verma
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H
#define LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H
#include <bspopts.h>
#include <bsp/irq.h>
#include <bsp/raspberrypi.h>
#include <bsp/rpi-gpio.h>
#include <dev/serial/arm-pl011.h>
/*
* This macro exists to serve as a common point of definition for the
* parameters of the UARTs present in the Raspberry Pi 4. It is used in
* multiple locations with different rendering macros to prevent duplication
* of information.
*/
#define RASPBERRYPI_CONSOLE_DEVICES(CONSOLE_DEVICE_DEFINITION_RENDERER) \
CONSOLE_DEVICE_DEFINITION_RENDERER( \
0, "/dev/ttyAMA0", BCM2711_UART0_BASE,BCM2711_UART0_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 15, 14, GPIO_AF0) \
CONSOLE_DEVICE_DEFINITION_RENDERER( \
2, "/dev/ttyAMA1", BCM2711_UART2_BASE, BCM2711_UART2_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 1, 0, GPIO_AF4) \
CONSOLE_DEVICE_DEFINITION_RENDERER( \
3, "/dev/ttyAMA2", BCM2711_UART3_BASE, BCM2711_UART3_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 5, 4, GPIO_AF4) \
CONSOLE_DEVICE_DEFINITION_RENDERER( \
4, "/dev/ttyAMA3", BCM2711_UART4_BASE, BCM2711_UART4_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 9, 8, GPIO_AF4) \
CONSOLE_DEVICE_DEFINITION_RENDERER( \
5, "/dev/ttyAMA4", BCM2711_UART5_BASE, BCM2711_UART5_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 13, 12, GPIO_AF4)
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H */

View File

@@ -1,527 +0,0 @@
/**
* @file
*
* @ingroup raspberrypi_4_regs
*
* @brief Register definitions.
*/
/*
* Copyright (c) 2022 Mohd Noor Aman
* Copyright (c) 2024 Ning Yang
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.org/license/LICENSE
*
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_RASPBERRYPI_4_H
#define LIBBSP_AARCH64_RASPBERRYPI_RASPBERRYPI_4_H
#include <bspopts.h>
#include <stdint.h>
#include <bsp/utility.h>
/**
* @defgroup raspberrypi_reg Register Definitions
*
* @ingroup RTEMSBSPsARMRaspberryPi
*
* @brief Register Definitions
*
* @{
*/
/**
* @name Register Macros
*
* @{
*/
#define BCM2711_REG(x) (*(volatile uint64_t *)(x))
#define BCM2711_BIT(n) (1 << (n))
#define BCM2835_REG(addr) (*(volatile uint32_t*)(addr))
/** @} */
/**
* @name Peripheral Base Register Address
*
* @{
*/
#define RPI_PERIPHERAL_BASE 0xFE000000
#define BASE_OFFSET 0xFE000000
#define RPI_PERIPHERAL_SIZE 0x01800000
/**
* @name Bus to Physical address translation
* Macro.
* @{
*/
#define BUS_TO_PHY(x) ((x) - BASE_OFFSET)
/** @} */
/**
* @name Internal ARM Timer Registers
*
* @{
*/
#define BCM2711_CLOCK_FREQ 250000000
#define BCM2711_TIMER_BASE (RPI_PERIPHERAL_BASE + 0xB400)
#define BCM2711_TIMER_LOD (BCM2711_TIMER_BASE + 0x00)
#define BCM2711_TIMER_VAL (BCM2711_TIMER_BASE + 0x04)
#define BCM2711_TIMER_CTL (BCM2711_TIMER_BASE + 0x08)
#define BCM2711_TIMER_CLI (BCM2711_TIMER_BASE + 0x0C)
#define BCM2711_TIMER_RIS (BCM2711_TIMER_BASE + 0x10)
#define BCM2711_TIMER_MIS (BCM2711_TIMER_BASE + 0x14)
#define BCM2711_TIMER_RLD (BCM2711_TIMER_BASE + 0x18)
#define BCM2711_TIMER_DIV (BCM2711_TIMER_BASE + 0x1C)
#define BCM2711_TIMER_CNT (BCM2711_TIMER_BASE + 0x20)
#define BCM2711_TIMER_PRESCALE 0xF9
/** @} */
/**
* @name Power Management and Watchdog Registers
*
* @{
*/
#define BCM2711_PM_PASSWD_MAGIC 0x5a000000
#define BCM2711_PM_BASE (RPI_PERIPHERAL_BASE + 0x100000)
#define BCM2711_PM_GNRIC (BCM2711_PM_BASE + 0x00)
#define BCM2711_PM_GNRIC_POWUP 0x00000001
#define BCM2711_PM_GNRIC_POWOK 0x00000002
#define BCM2711_PM_GNRIC_ISPOW 0x00000004
#define BCM2711_PM_GNRIC_MEMREP 0x00000008
#define BCM2711_PM_GNRIC_MRDONE 0x00000010
#define BCM2711_PM_GNRIC_ISFUNC 0x00000020
#define BCM2711_PM_GNRIC_RSTN 0x00000fc0
#define BCM2711_PM_GNRIC_ENAB 0x00001000
#define BCM2711_PM_GNRIC_CFG 0x007f0000
#define BCM2711_PM_AUDIO (BCM2711_PM_BASE + 0x04)
#define BCM2711_PM_AUDIO_APSM 0x000fffff
#define BCM2711_PM_AUDIO_CTRLEN 0x00100000
#define BCM2711_PM_AUDIO_RSTN 0x00200000
#define BCM2711_PM_STATUS (BCM2711_PM_BASE + 0x18)
#define BCM2711_PM_RSTC (BCM2711_PM_BASE + 0x1c)
#define BCM2711_PM_RSTC_DRCFG 0x00000003
#define BCM2711_PM_RSTC_WRCFG 0x00000030
#define BCM2711_PM_RSTC_WRCFG_FULL 0x00000020
#define BCM2711_PM_RSTC_WRCFG_CLR 0xffffffcf
#define BCM2711_PM_RSTC_SRCFG 0x00000300
#define BCM2711_PM_RSTC_QRCFG 0x00003000
#define BCM2711_PM_RSTC_FRCFG 0x00030000
#define BCM2711_PM_RSTC_HRCFG 0x00300000
#define BCM2711_PM_RSTC_RESET 0x00000102
#define BCM2711_PM_RSTS (BCM2711_PM_BASE + 0x20)
#define BCM2711_PM_RSTS_HADDRQ 0x00000001
#define BCM2711_PM_RSTS_HADDRF 0x00000002
#define BCM2711_PM_RSTS_HADDRH 0x00000004
#define BCM2711_PM_RSTS_HADWRQ 0x00000010
#define BCM2711_PM_RSTS_HADWRF 0x0000002
#define BCM2711_PM_RSTS_HADWRH 0x00000040
#define BCM2711_PM_RSTS_HADSRQ 0x00000100
#define BCM2711_PM_RSTS_HADSRF 0x00000200
#define BCM2711_PM_RSTS_HADSRH 0x00000400
#define BCM2711_PM_RSTS_HADPOR 0x00001000
#define BCM2711_PM_WDOG (BCM2711_PM_BASE + 0x24)
#define BCM2711_PM_WDOG_MASK 0x000fffff
/** @} */
/** @} */
/**
* @name AUX Registers
*
* @{
*/
#define BCM2711_AUX_BASE (RPI_PERIPHERAL_BASE + 0x215000)
#define AUX_ENABLES (BCM2711_AUX_BASE + 0x04)
#define AUX_MU_IO_REG (BCM2711_AUX_BASE + 0x40)
#define AUX_MU_IER_REG (BCM2711_AUX_BASE + 0x44)
#define AUX_MU_IIR_REG (BCM2711_AUX_BASE + 0x48)
#define AUX_MU_LCR_REG (BCM2711_AUX_BASE + 0x4C)
#define AUX_MU_MCR_REG (BCM2711_AUX_BASE + 0x50)
#define AUX_MU_LSR_REG (BCM2711_AUX_BASE + 0x54)
#define AUX_MU_MSR_REG (BCM2711_AUX_BASE + 0x58)
#define AUX_MU_SCRATCH (BCM2711_AUX_BASE + 0x5C)
#define AUX_MU_CNTL_REG (BCM2711_AUX_BASE + 0x60)
#define AUX_MU_STAT_REG (BCM2711_AUX_BASE + 0x64)
#define AUX_MU_BAUD_REG (BCM2711_AUX_BASE + 0x68)
/** @} */
/**
* @name PL011 UARTs
*
* @{
*/
#define BCM2711_PL011_BASE (RPI_PERIPHERAL_BASE + 0x201000)
#define BCM2711_PL011_SIZE 0xc00
#define BCM2711_PL011_DEVICE_SIZE 0x200
#define BCM2711_UART0_BASE (BCM2711_PL011_BASE + 0x000)
#define BCM2711_UART0_SIZE BCM2711_PL011_DEVICE_SIZE
#define BCM2711_UART2_BASE (BCM2711_PL011_BASE + 0x400)
#define BCM2711_UART2_SIZE BCM2711_PL011_DEVICE_SIZE
#define BCM2711_UART3_BASE (BCM2711_PL011_BASE + 0x600)
#define BCM2711_UART3_SIZE BCM2711_PL011_DEVICE_SIZE
#define BCM2711_UART4_BASE (BCM2711_PL011_BASE + 0x800)
#define BCM2711_UART4_SIZE BCM2711_PL011_DEVICE_SIZE
#define BCM2711_UART5_BASE (BCM2711_PL011_BASE + 0xa00)
#define BCM2711_UART5_SIZE BCM2711_PL011_DEVICE_SIZE
/** @} */
/**
* @name GPU Timer Registers
*
* @{
*/
/**
* NOTE: The GPU uses Compare registers 0 and 2 for
* it's own RTOS. 1 and 3 are available for use in
* RTEMS.
*/
#define BCM2711_GPU_TIMER_BASE (RPI_PERIPHERAL_BASE + 0x3000)
#define BCM2711_GPU_TIMER_CS (BCM2711_GPU_TIMER_BASE + 0x00)
#define BCM2711_GPU_TIMER_CS_M0 0x00000001
#define BCM2711_GPU_TIMER_CS_M1 0x00000002
#define BCM2711_GPU_TIMER_CS_M2 0x00000004
#define BCM2711_GPU_TIMER_CS_M3 0x00000008
#define BCM2711_GPU_TIMER_CLO (BCM2711_GPU_TIMER_BASE + 0x04)
#define BCM2711_GPU_TIMER_CHI (BCM2711_GPU_TIMER_BASE + 0x08)
#define BCM2711_GPU_TIMER_C0 (BCM2711_GPU_TIMER_BASE + 0x0C)
#define BCM2711_GPU_TIMER_C1 (BCM2711_GPU_TIMER_BASE + 0x10)
#define BCM2711_GPU_TIMER_C2 (BCM2711_GPU_TIMER_BASE + 0x14)
#define BCM2711_GPU_TIMER_C3 (BCM2711_GPU_TIMER_BASE + 0x18)
/**
* NOTE: compatible with the BCM2835 system timer
*/
#define BCM2835_GPU_TIMER_CS_M3 BCM2711_GPU_TIMER_CS_M3
#define BCM2835_GPU_TIMER_C3 BCM2711_GPU_TIMER_C3
#define BCM2835_GPU_TIMER_CLO BCM2711_GPU_TIMER_CLO
#define BCM2835_GPU_TIMER_CS BCM2711_GPU_TIMER_CS
/** @} */
/**
* @name GPIO Registers
*
* @{
*/
#define BCM2711_GPIO_BASE (RPI_PERIPHERAL_BASE + 0x200000)
#define BCM2711_GPIO_SIZE 0xf4
#define BCM2711_GPIO_PIN_COUNT 58
/** @} */
/**
* @name EMMC Registers
*
* @{
*/
/**
* NOTE: Since the SD controller follows the SDHCI standard,
* the rtems-libbsd tree already provides the remaining registers.
*/
#define BCM2711_EMMC_BASE (RPI_PERIPHERAL_BASE + 0x300000)
/** @} */
/**
* @name SPI Registers
*
* @{
*/
#define BCM2711_SPI0_BASE (RPI_PERIPHERAL_BASE + 0x204000)
#define BCM2711_SPI3_BASE (RPI_PERIPHERAL_BASE + 0x204600)
#define BCM2711_SPI4_BASE (RPI_PERIPHERAL_BASE + 0x204800)
#define BCM2711_SPI5_BASE (RPI_PERIPHERAL_BASE + 0x204A00)
#define BCM2711_SPI6_BASE (RPI_PERIPHERAL_BASE + 0x204C00)
/** @} */
/**
* @name Mailbox Registers
*
* @{
*/
#define BCM2711_MBOX_BASE (RPI_PERIPHERAL_BASE+0xB880)
#define BCM2711_MBOX_READ (BCM2711_MBOX_BASE+0x00)
#define BCM2711_MBOX_PEEK (BCM2711_MBOX_BASE+0x10)
#define BCM2711_MBOX_SENDER (BCM2711_MBOX_BASE+0x14)
#define BCM2711_MBOX_STATUS (BCM2711_MBOX_BASE+0x18)
#define BCM2711_MBOX_WRITE (BCM2711_MBOX_BASE+0x20)
#define BCM2711_MBOX_CONFIG (BCM2711_MBOX_BASE+0x1C)
#define BCM2711_MBOX_RESPONSE 0x80000000
#define BCM2711_MBOX_FULL 0x80000000
#define BCM2711_MBOX_EMPTY 0x40000000
/** @} */
/**
* @name Mailbox Channels
*
* @{
*/
/* Power Manager channel */
#define BCM2711_MBOX_CHANNEL_PM 0
/* Framebuffer channel */
#define BCM2711_MBOX_CHANNEL_FB 1
/* Virtual UART channel */
#define BCM2711_MBOX_CHANNEL_VUART 2
/* VCHIQ channel */
#define BCM2711_MBOX_CHANNEL_VCHIQ 3
/* LEDs channel */
#define BCM2711_MBOX_CHANNEL_LED 4
/* Button channel */
#define BCM2711_MBOX_CHANNEL_BUTTON 5
/* Touch screen channel */
#define BCM2711_MBOX_CHANNEL_TOUCHS 6
#define BCM2711_MBOX_CHANNEL_COUNT 7
/* Property tags (ARM <-> VC) channel */
#define BCM2711_MBOX_CHANNEL_PROP_AVC 8
/* Property tags (VC <-> ARM) channel */
#define BCM2711_MBOX_CHANNEL_PROP_VCA 9
/** @} */
/**
* @name Raspberry Pi 2 Interrupt Register Defines
*
* @{
*/
/* Timers interrupt control registers */
#define BCM2711_CORE0_TIMER_IRQ_CTRL_BASE 0xFF800040
#define BCM2711_CORE1_TIMER_IRQ_CTRL_BASE 0xFF800044
#define BCM2711_CORE2_TIMER_IRQ_CTRL_BASE 0xFF800048
#define BCM2711_CORE3_TIMER_IRQ_CTRL_BASE 0xFF80004C
#define BCM2711_CORE_TIMER_IRQ_CTRL(cpuidx) \
(BCM2711_CORE0_TIMER_IRQ_CTRL_BASE + 0x4 * (cpuidx))
/**
* @name Raspberry Pi 4 ARM_LOCAL registers
*
* @{
*/
#define BCM2711_LOCAL_REGS_BASE 0x4C0000000
#define BCM2711_LOCAL_REGS_SIZE 0x100
#define BCM2711_LOCAL_ARM_CONTROL (BCM2711_LOCAL_REGS_BASE + 0x00)
#define BCM2711_LOCAL_CORE_IRQ_CONTROL (BCM2711_LOCAL_REGS_BASE + 0x0c)
#define BCM2711_LOCAL_PMU_CONTROL_SET (BCM2711_LOCAL_REGS_BASE + 0x10)
#define BCM2711_LOCAL_PMU_CONTROL_CLR (BCM2711_LOCAL_REGS_BASE + 0x14)
#define BCM2711_LOCAL_PERI_IRQ_ROUTE0 (BCM2711_LOCAL_REGS_BASE + 0x24)
#define BCM2711_LOCAL_AXI_QUIET_TIME (BCM2711_LOCAL_REGS_BASE + 0x30)
#define BCM2711_LOCAL_LOCAL_TIMER_CONTROL (BCM2711_LOCAL_REGS_BASE + 0x34)
#define BCM2711_LOCAL_LOCAL_TIMER_IRQ (BCM2711_LOCAL_REGS_BASE + 0x38)
#define BCM2711_LOCAL_TIMER_CNTRL0 (BCM2711_LOCAL_REGS_BASE + 0x40)
#define BCM2711_LOCAL_TIMER_CNTRL1 (BCM2711_LOCAL_REGS_BASE + 0x44)
#define BCM2711_LOCAL_TIMER_CNTRL2 (BCM2711_LOCAL_REGS_BASE + 0x48)
#define BCM2711_LOCAL_TIMER_CNTRL3 (BCM2711_LOCAL_REGS_BASE + 0x4c)
#define BCM2711_LOCAL_MAILBOX_CNTRL0 (BCM2711_LOCAL_REGS_BASE + 0x50)
#define BCM2711_LOCAL_MAILBOX_CNTRL1 (BCM2711_LOCAL_REGS_BASE + 0x54)
#define BCM2711_LOCAL_MAILBOX_CNTRL2 (BCM2711_LOCAL_REGS_BASE + 0x58)
#define BCM2711_LOCAL_MAILBOX_CNTRL3 (BCM2711_LOCAL_REGS_BASE + 0x5c)
#define BCM2711_LOCAL_IRQ_SOURCE0 (BCM2711_LOCAL_REGS_BASE + 0x60)
#define BCM2711_LOCAL_IRQ_SOURCE1 (BCM2711_LOCAL_REGS_BASE + 0x64)
#define BCM2711_LOCAL_IRQ_SOURCE2 (BCM2711_LOCAL_REGS_BASE + 0x68)
#define BCM2711_LOCAL_IRQ_SOURCE3 (BCM2711_LOCAL_REGS_BASE + 0x6c)
#define BCM2711_LOCAL_FIQ_SOURCE0 (BCM2711_LOCAL_REGS_BASE + 0x70)
#define BCM2711_LOCAL_FIQ_SOURCE1 (BCM2711_LOCAL_REGS_BASE + 0x74)
#define BCM2711_LOCAL_FIQ_SOURCE2 (BCM2711_LOCAL_REGS_BASE + 0x78)
#define BCM2711_LOCAL_FIQ_SOURCE3 (BCM2711_LOCAL_REGS_BASE + 0x7c)
/**
* @name Raspberry Pi 4 Mailbox registers
*
* @{
*/
#define BCM2711_MAILBOX_00_WRITE_SET_BASE 0x4C000080
#define BCM2711_MAILBOX_01_WRITE_SET_BASE 0x4C000084
#define BCM2711_MAILBOX_02_WRITE_SET_BASE 0x4C000088
#define BCM2711_MAILBOX_03_WRITE_SET_BASE 0x4C00008C
#define BCM2711_MAILBOX_04_WRITE_SET_BASE 0x4C000090
#define BCM2711_MAILBOX_05_WRITE_SET_BASE 0x4C000094
#define BCM2711_MAILBOX_06_WRITE_SET_BASE 0x4C000098
#define BCM2711_MAILBOX_07_WRITE_SET_BASE 0x4C00009C
#define BCM2711_MAILBOX_08_WRITE_SET_BASE 0x4C0000A0
#define BCM2711_MAILBOX_09_WRITE_SET_BASE 0x4C0000A4
#define BCM2711_MAILBOX_10_WRITE_SET_BASE 0x4C0000A8
#define BCM2711_MAILBOX_11_WRITE_SET_BASE 0x4C0000AC
#define BCM2711_MAILBOX_12_WRITE_SET_BASE 0x4C0000B0
#define BCM2711_MAILBOX_13_WRITE_SET_BASE 0x4C0000B4
#define BCM2711_MAILBOX_14_WRITE_SET_BASE 0x4C0000B8
#define BCM2711_MAILBOX_15_WRITE_SET_BASE 0x4C0000BC
#define BCM2711_MAILBOX_00_READ_CLEAR_BASE 0x4C0000C0
#define BCM2711_MAILBOX_01_READ_CLEAR_BASE 0x4C0000C4
#define BCM2711_MAILBOX_02_READ_CLEAR_BASE 0x4C0000C8
#define BCM2711_MAILBOX_03_READ_CLEAR_BASE 0x4C0000CC
#define BCM2711_MAILBOX_04_READ_CLEAR_BASE 0x4C0000D0
#define BCM2711_MAILBOX_05_READ_CLEAR_BASE 0x4C0000D4
#define BCM2711_MAILBOX_06_READ_CLEAR_BASE 0x4C0000D8
#define BCM2711_MAILBOX_07_READ_CLEAR_BASE 0x4C0000DC
#define BCM2711_MAILBOX_08_READ_CLEAR_BASE 0x4C0000E0
#define BCM2711_MAILBOX_09_READ_CLEAR_BASE 0x4C0000E4
#define BCM2711_MAILBOX_10_READ_CLEAR_BASE 0x4C0000E8
#define BCM2711_MAILBOX_11_READ_CLEAR_BASE 0x4C0000EC
#define BCM2711_MAILBOX_12_READ_CLEAR_BASE 0x4C0000F0
#define BCM2711_MAILBOX_13_READ_CLEAR_BASE 0x4C0000F4
#define BCM2711_MAILBOX_14_READ_CLEAR_BASE 0x4C0000F8
#define BCM2711_MAILBOX_15_READ_CLEAR_BASE 0x4C0000FC
/**
* @name Raspberry Pi 4 ARM_C FIQ and IRQ registers
*
* @{
*/
#define BCM2711_ARMC_REGS_BASE (RPI_PERIPHERAL_BASE + 0xB200)
#define BCM2711_ARMC_REGS_SIZE 0x200
#define BCM2711_ARMC_IRQ0_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x00)
#define BCM2711_ARMC_IRQ0_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x04)
#define BCM2711_ARMC_IRQ0_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x08)
#define BCM2711_ARMC_IRQ0_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x10)
#define BCM2711_ARMC_IRQ0_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x14)
#define BCM2711_ARMC_IRQ0_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x18)
#define BCM2711_ARMC_IRQ0_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0x20)
#define BCM2711_ARMC_IRQ0_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0x24)
#define BCM2711_ARMC_IRQ0_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0x28)
#define BCM2711_ARMC_IRQ_STATUS0 (BCM2711_ARMC_REGS_BASE + 0x30)
#define BCM2711_ARMC_IRQ_STATUS1 (BCM2711_ARMC_REGS_BASE + 0x34)
#define BCM2711_ARMC_IRQ_STATUS2 (BCM2711_ARMC_REGS_BASE + 0x38)
#define BCM2711_ARMC_IRQ1_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x40)
#define BCM2711_ARMC_IRQ1_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x44)
#define BCM2711_ARMC_IRQ1_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x48)
#define BCM2711_ARMC_IRQ1_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x50)
#define BCM2711_ARMC_IRQ1_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x54)
#define BCM2711_ARMC_IRQ1_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x58)
#define BCM2711_ARMC_IRQ1_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0x60)
#define BCM2711_ARMC_IRQ1_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0x64)
#define BCM2711_ARMC_IRQ1_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0x68)
#define BCM2711_ARMC_IRQ2_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x80)
#define BCM2711_ARMC_IRQ2_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x84)
#define BCM2711_ARMC_IRQ2_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x88)
#define BCM2711_ARMC_IRQ2_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x90)
#define BCM2711_ARMC_IRQ2_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x94)
#define BCM2711_ARMC_IRQ2_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x98)
#define BCM2711_ARMC_IRQ2_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0xA0)
#define BCM2711_ARMC_IRQ2_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0xA4)
#define BCM2711_ARMC_IRQ2_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0xA8)
#define BCM2711_ARMC_IRQ3_PENDING0 (BCM2711_ARMC_REGS_BASE + 0xC0)
#define BCM2711_ARMC_IRQ3_PENDING1 (BCM2711_ARMC_REGS_BASE + 0xC4)
#define BCM2711_ARMC_IRQ3_PENDING2 (BCM2711_ARMC_REGS_BASE + 0xC8)
#define BCM2711_ARMC_IRQ3_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0xD0)
#define BCM2711_ARMC_IRQ3_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0xD4)
#define BCM2711_ARMC_IRQ3_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0xD8)
#define BCM2711_ARMC_IRQ3_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0xE0)
#define BCM2711_ARMC_IRQ3_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0xE4)
#define BCM2711_ARMC_IRQ3_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0xE8)
#define BCM2711_ARMC_FIQ0_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x100)
#define BCM2711_ARMC_FIQ0_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x104)
#define BCM2711_ARMC_FIQ0_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x108)
#define BCM2711_ARMC_FIQ0_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x110)
#define BCM2711_ARMC_FIQ0_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x114)
#define BCM2711_ARMC_FIQ0_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x118)
#define BCM2711_ARMC_FIQ0_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0x120)
#define BCM2711_ARMC_FIQ0_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0x124)
#define BCM2711_ARMC_FIQ0_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0x128)
#define BCM2711_ARMC_FIQ1_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x140)
#define BCM2711_ARMC_FIQ1_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x144)
#define BCM2711_ARMC_FIQ1_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x148)
#define BCM2711_ARMC_FIQ1_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x150)
#define BCM2711_ARMC_FIQ1_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x154)
#define BCM2711_ARMC_FIQ1_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x158)
#define BCM2711_ARMC_FIQ1_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0x160)
#define BCM2711_ARMC_FIQ1_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0x164)
#define BCM2711_ARMC_FIQ1_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0x168)
#define BCM2711_ARMC_FIQ2_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x180)
#define BCM2711_ARMC_FIQ2_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x184)
#define BCM2711_ARMC_FIQ2_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x188)
#define BCM2711_ARMC_FIQ2_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x190)
#define BCM2711_ARMC_FIQ2_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x194)
#define BCM2711_ARMC_FIQ2_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x198)
#define BCM2711_ARMC_FIQ2_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0x1A0)
#define BCM2711_ARMC_FIQ2_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0x1A4)
#define BCM2711_ARMC_FIQ2_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0x1A8)
#define BCM2711_ARMC_FIQ3_PENDING0 (BCM2711_ARMC_REGS_BASE + 0x1C0)
#define BCM2711_ARMC_FIQ3_PENDING1 (BCM2711_ARMC_REGS_BASE + 0x1C4)
#define BCM2711_ARMC_FIQ3_PENDING2 (BCM2711_ARMC_REGS_BASE + 0x1C8)
#define BCM2711_ARMC_FIQ3_SET_EN_0 (BCM2711_ARMC_REGS_BASE + 0x1D0)
#define BCM2711_ARMC_FIQ3_SET_EN_1 (BCM2711_ARMC_REGS_BASE + 0x1D4)
#define BCM2711_ARMC_FIQ3_SET_EN_2 (BCM2711_ARMC_REGS_BASE + 0x1D8)
#define BCM2711_ARMC_FIQ3_CLR_EN_0 (BCM2711_ARMC_REGS_BASE + 0x1E0)
#define BCM2711_ARMC_FIQ3_CLR_EN_1 (BCM2711_ARMC_REGS_BASE + 0x1E4)
#define BCM2711_ARMC_FIQ3_CLR_EN_2 (BCM2711_ARMC_REGS_BASE + 0x1E8)
#define BCM2711_ARMC_SWIRQ_SET (BCM2711_ARMC_REGS_BASE + 0x1F0)
#define BCM2711_ARMC_SWIRQ_CLEAR (BCM2711_ARMC_REGS_BASE + 0x1F4)
/** @} */
#endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */

View File

@@ -1,118 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief Raspberry Pi 4B specific GPIO definitions.
*/
/*
* Copyright (C) 2023 Utkarsh Verma
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H
#define LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H
#include <bspopts.h>
#include <rtems/rtems/status.h>
/**
* @brief Raspberry Pi GPIO functions.
*/
typedef enum {
GPIO_INPUT,
GPIO_OUTPUT,
GPIO_AF5,
GPIO_AF4,
GPIO_AF0,
GPIO_AF1,
GPIO_AF2,
GPIO_AF3,
} raspberrypi_gpio_function;
typedef enum {
GPIO_PULL_NONE,
GPIO_PULL_UP,
GPIO_PULL_DOWN,
} raspberrypi_gpio_pull;
/**
* @brief Set the operation of the general-purpose I/O pins. Each of the 58
* GPIO pins has at least two alternative functions as defined.
*
* @param pin The GPIO pin.
* @param value The optional functions are GPIO_INPUT, GPIO_OUTPUT, GPIO_AF5,
* GPIO_AF4, GPIO_AF0, GPIO_AF1, GPIO_AF2, GPIO_AF3.
*
* @retval RTEMS_SUCCESSFUL GPIO function successfully configured.
* @retval RTEMS_INVALID_NUMBER This status code indicates that a specified
* number was invalid.
*/
rtems_status_code raspberrypi_gpio_set_function(
const unsigned int pin,
const raspberrypi_gpio_function value
);
/**
* @brief Set a GPIO pin.
*
* @param pin The GPIO pin.
*
* @retval RTEMS_SUCCESSFUL GPIO pin set successfully.
* @retval RTEMS_INVALID_NUMBER This status code indicates that a specified
* number was invalid.
*/
rtems_status_code raspberrypi_gpio_set_pin(const unsigned int pin);
/**
* @brief Clear a GPIO pin.
*
* @param pin The GPIO pin.
*
* @retval RTEMS_SUCCESSFUL GPIO pin clear successfully.
* @retval RTEMS_INVALID_NUMBER This status code indicates that a specified
* number was invalid.
*/
rtems_status_code raspberrypi_gpio_clear_pin(const unsigned int pin);
/**
* @brief Control the actuation of the internal pull-up/down resistors.
*
* @param pin The GPIO pin.
* @param value The optional value are GPIO_PULL_NONE, GPIO_PULL_UP,
* GPIO_PULL_DOWN.
*
* @retval RTEMS_SUCCESSFUL GPIO pull set successfully.
* @retval RTEMS_INVALID_NUMBER This status code indicates that a specified
* number was invalid.
*/
rtems_status_code raspberrypi_gpio_set_pull(
const unsigned int pin,
const raspberrypi_gpio_pull value
);
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H */

View File

@@ -1,97 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief API of the Watchdog driver for the raspberrypi4 bsp in RTEMS.
*/
/*
* Copyright (C) 2024 Ning Yang
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_WATCHDOG_H
#define LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_WATCHDOG_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @note a brief example of expected usage.
*
* void raspberrypi_watchdog_example()
* {
* raspberrypi_watchdog_init();
* raspberrypi_watchdog_start(15000);
*
* raspberrypi_watchdog_reload();
* ...
* raspberrypi_watchdog_reload();
*
* raspberrypi_watchdog_stop();
* }
*
*/
/**
* @brief Initialize BSP watchdog routines.
*/
void raspberrypi_watchdog_init(void);
/**
* @brief Turn on the watchdog / begin the counter at the desired value.
*
* @param timeout Watchdog timeout value in ms.
* The watchdog device has 20 bits of timeout, so it only
* supports a maximum of 15999 ms for its timeout.
* This value should be between 0 and 15999.
*/
void raspberrypi_watchdog_start(uint32_t timeout_ms);
/**
* @brief Turn off the watchdog.
*/
void raspberrypi_watchdog_stop(void);
/**
* @brief Reload watchdog.
*/
void raspberrypi_watchdog_reload(void);
/**
* @brief Get the remaining time of the watchdog.
* The return value is still valid when the watchdog has been stopped.
*
* @retval Watchdog remaining time in ms.
*/
uint32_t raspberrypi_watchdog_get_remaining_time(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,46 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief BSP tm27 header
*/
/*
* Copyright (C) 2022 Mohd Noor Aman
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_TMTEST27
#error "This is an RTEMS internal file you must not include directly."
#endif
#ifndef __tm27_h
#define __tm27_h
#include <dev/irq/arm-gic-tm27.h>
#endif /* __tm27_h */

View File

@@ -1,582 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief SPI Driver
*/
/*
* Copyright (C) 2024 Ning Yang
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp/irq.h>
#include <bsp/raspberrypi.h>
#include <bsp/raspberrypi-spi.h>
#include <bsp/rpi-gpio.h>
#include <dev/spi/spi.h>
#include <bspopts.h>
typedef struct {
spi_bus base;
volatile raspberrypi_spi *regs;
const spi_ioc_transfer *msg;
uint32_t msg_todo;
uint8_t *rx_buf;
const uint8_t *tx_buf;
uint32_t todo;
uint8_t num_cs;
uint32_t in_transfer;
rtems_id task_id;
rtems_vector_number irq;
}raspberrypi_spi_bus;
static int raspberrypi_spi_check_msg(
raspberrypi_spi_bus *bus,
const spi_ioc_transfer *msg,
uint32_t n
)
{
while (n > 0) {
if (msg->bits_per_word != 8) {
return -EINVAL;
}
if ((msg->mode &
~(SPI_CPHA | SPI_CPOL | SPI_NO_CS)) != 0) {
return -EINVAL;
}
if (msg->cs >= bus->num_cs) {
return -EINVAL;
}
++msg;
--n;
}
return 0;
}
/* Calculates a clock divider to be used with the GPU core clock rate
* to set a SPI clock rate the closest (<=) to a desired frequency. */
static rtems_status_code rpi_spi_calculate_clock_divider(
uint32_t clock_hz,
uint16_t *clock_divider
)
{
uint16_t divider;
uint32_t clock_rate;
/* Calculates an initial clock divider. */
divider = GPU_CORE_CLOCK_RATE / clock_hz;
/* Because the divider must be a power of two (as per the BCM2835 datasheet),
* calculate the next greater power of two. */
--divider;
divider |= (divider >> 1);
divider |= (divider >> 2);
divider |= (divider >> 4);
divider |= (divider >> 8);
++divider;
clock_rate = GPU_CORE_CLOCK_RATE / divider;
/* If the resulting clock rate is greater than the desired frequency,
* try the next greater power of two divider. */
while (clock_rate > clock_hz) {
divider = (divider << 1);
clock_rate = GPU_CORE_CLOCK_RATE / divider;
}
*clock_divider = divider;
return RTEMS_SUCCESSFUL;
}
static int raspberrypi_spi_config(
raspberrypi_spi_bus *bus,
volatile raspberrypi_spi *regs,
uint32_t speed_hz,
uint32_t mode,
uint8_t cs
)
{
spi_bus *base = &bus->base;
uint32_t spics = regs->spics;
rtems_status_code sc;
uint16_t clock_divider;
/* Calculate the most appropriate clock divider. */
sc = rpi_spi_calculate_clock_divider(speed_hz, &clock_divider);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Set the bus clock divider. */
regs->spiclk = RPI_SPICLK_CDIV_SET(regs->spiclk, clock_divider);
if ((mode & SPI_CPHA) != 0) {
spics |= RPI_SPICS_CPHA;
} else {
spics &= ~RPI_SPICS_CPHA;
}
if ((mode & SPI_CPOL) != 0) {
spics |= RPI_SPICS_CPOL;
} else {
spics &= ~RPI_SPICS_CPOL;
}
if ((mode & SPI_CS_HIGH) != 0) {
spics |= RPI_SPICS_CSPOL;
} else {
spics &= ~RPI_SPICS_CSPOL;
}
spics = RPI_SPICS_CS_SET(spics, cs);
regs->spics = spics;
base->speed_hz = speed_hz;
base->mode = mode;
base->cs = cs;
return 0;
}
#ifdef BSP_SPI_USE_INTERRUPTS
static void raspberrypi_spi_done(raspberrypi_spi_bus *bus)
{
volatile raspberrypi_spi *regs;
regs = bus->regs;
regs->spics = regs->spics & ~RPI_SPICS_TA;
rtems_event_transient_send(bus->task_id);
}
static bool raspberrpi_spi_TX_FULL(volatile raspberrypi_spi *regs)
{
return !(regs->spics & RPI_SPICS_TXD);
}
static void raspberrypi_spi_push(
raspberrypi_spi_bus *bus,
volatile raspberrypi_spi *regs
)
{
uint8_t val;
while (bus->todo > 0 && !raspberrpi_spi_TX_FULL(regs)) {
val = 0;
if (bus->tx_buf != NULL) {
val = *bus->tx_buf;
++bus->tx_buf;
}
--bus->todo;
regs->spififo = val;
++bus->in_transfer;
}
}
static void raspberrypi_spi_next_msg(raspberrypi_spi_bus *bus)
{
const spi_ioc_transfer *msg;
spi_bus *base;
volatile raspberrypi_spi *regs;
regs=bus->regs;
if (bus->msg_todo > 0) {
base = &bus->base;
msg = bus->msg;
if (
msg->speed_hz != base->speed_hz
|| msg->mode != base->mode
|| msg->cs != base->cs
) {
raspberrypi_spi_config(
bus,
regs,
msg->speed_hz,
msg->mode,
msg->cs
);
}
bus->todo = msg->len;
bus->rx_buf = msg->rx_buf;
bus->tx_buf = msg->tx_buf;
raspberrypi_spi_push(bus, regs);
} else {
raspberrypi_spi_done(bus);
}
}
static void raspberrypi_spi_start(raspberrypi_spi_bus *bus)
{
volatile raspberrypi_spi *regs;
regs = bus->regs;
regs->spics = regs->spics | RPI_SPICS_INTR | RPI_SPICS_INTD;
/*
* Set TA = 1. This will immediately trigger a first interrupt with
* DONE = 1.
*/
regs->spics = regs->spics | RPI_SPICS_TA;
}
static bool raspberrypi_spi_irq(volatile raspberrypi_spi *regs)
{
/* Check whether the interrupt is generated by this SPI device */
if(regs->spics & RPI_SPICS_INTD && regs->spics & RPI_SPICS_DONE) {
return 1;
}
if(regs->spics & RPI_SPICS_INTR && regs->spics & RPI_SPICS_RXR) {
return 1;
}
return 0;
}
static void raspberrypi_spi_interrupt(void *arg)
{
raspberrypi_spi_bus *bus;
volatile raspberrypi_spi *regs;
uint32_t val;
bus = arg;
regs = bus->regs;
if (raspberrypi_spi_irq(regs)) {
if (bus->todo > 0) {
raspberrypi_spi_push(bus, regs);
} else {
--bus->msg_todo;
++bus->msg;
raspberrypi_spi_next_msg(bus);
}
while (regs->spics & RPI_SPICS_RXD && bus->in_transfer > 0) {
/* RX FIFO contains at least 1 byte. */
val = regs->spififo;
if (bus->rx_buf != NULL) {
*bus->rx_buf = (uint8_t)val;
++bus->rx_buf;
}
--bus->in_transfer;
}
}
}
#else
static void raspberrypi_spi_polling_tx_rx(raspberrypi_spi_bus *bus)
{
volatile raspberrypi_spi *regs = bus->regs;
const unsigned char *sbuffer = bus->tx_buf;
unsigned char *rbuffer;
unsigned int size;
unsigned int read_count, write_count;
unsigned int data;
while (bus->msg_todo) {
rbuffer = bus->rx_buf;
size = bus->todo;
regs->spics = regs->spics | RPI_SPICS_CLEAR_RX | RPI_SPICS_CLEAR_TX
| RPI_SPICS_TA;
read_count = 0;
write_count = 0;
while (read_count < size || write_count < size) {
if (write_count < size && regs->spics & RPI_SPICS_TXD) {
if (sbuffer) {
regs->spififo = *sbuffer++;
} else {
regs->spififo = 0;
}
write_count++;
}
if (read_count < size && regs->spics & RPI_SPICS_RXD) {
data = regs->spififo;
if (rbuffer) {
*rbuffer++ = data;
}
read_count++;
}
}
while (!(regs->spics & RPI_SPICS_DONE)) {
/*wait*/
}
regs->spics = (regs->spics & ~RPI_SPICS_TA);
bus->msg_todo--;
bus->msg++;
bus->rx_buf = bus->msg->rx_buf;
bus->tx_buf = bus->msg->tx_buf;
bus->todo = bus->msg->len;
}
}
static void raspberrypi_spi_transfer_msg(
raspberrypi_spi_bus *bus
)
{
volatile raspberrypi_spi *regs = bus->regs;
uint32_t msg_todo = bus->msg_todo;
const spi_ioc_transfer *msg = bus->msg;
if (msg_todo > 0) {
if (
msg->speed_hz != bus->base.speed_hz
|| msg->mode != bus->base.mode
|| msg->cs != bus->base.cs
) {
raspberrypi_spi_config(
bus,
regs,
msg->speed_hz,
msg->mode,
msg->cs
);
}
bus->todo = msg->len;
bus->rx_buf = msg->rx_buf;
bus->tx_buf = msg->tx_buf;
raspberrypi_spi_polling_tx_rx(bus);
}
}
#endif
static int raspberrypi_spi_transfer(
spi_bus *base,
const spi_ioc_transfer *msgs,
uint32_t msg_count
)
{
int rv = 0;
raspberrypi_spi_bus *bus;
bus = (raspberrypi_spi_bus *) base;
rv = raspberrypi_spi_check_msg(bus, msgs, msg_count);
if (rv == 0) {
bus->msg_todo = msg_count;
bus->msg = msgs;
#ifdef BSP_SPI_USE_INTERRUPTS
bus->task_id = rtems_task_self();
raspberrypi_spi_start(bus);
rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT);
#else
raspberrypi_spi_transfer_msg(bus);
#endif
}
return rv;
}
static void raspberrypi_spi_destroy(spi_bus *base)
{
raspberrypi_spi_bus *bus;
bus = (raspberrypi_spi_bus *) base;
#ifdef BSP_SPI_USE_INTERRUPTS
rtems_interrupt_handler_remove(
bus->irq,
raspberrypi_spi_interrupt,
bus
);
#endif
spi_bus_destroy_and_free(&bus->base);
}
static int raspberrypi_spi_setup(spi_bus *base)
{
raspberrypi_spi_bus *bus;
uint32_t mode = base->mode;
bus = (raspberrypi_spi_bus *) base;
if (mode & SPI_LOOP) {
return -EINVAL;
}
return raspberrypi_spi_config(
bus,
bus->regs,
bus->base.speed_hz,
bus->base.mode,
bus->base.cs
);
}
static rtems_status_code raspberrypi_spi_init_gpio(
raspberrypi_spi_device device
)
{
switch (device) {
case raspberrypi_SPI0:
raspberrypi_gpio_set_function(7, GPIO_AF0); /* CS1 */
raspberrypi_gpio_set_pull(7, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(8, GPIO_AF0); /* CS0 */
raspberrypi_gpio_set_pull(8, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(9, GPIO_AF0); /* MISO */
raspberrypi_gpio_set_function(10, GPIO_AF0); /* MOSI */
raspberrypi_gpio_set_function(11, GPIO_AF0); /* SCLK */
break;
case raspberrypi_SPI3:
raspberrypi_gpio_set_function(24, GPIO_AF5);
raspberrypi_gpio_set_pull(24, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(0, GPIO_AF3);
raspberrypi_gpio_set_pull(0, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(1, GPIO_AF3);
raspberrypi_gpio_set_function(2, GPIO_AF3);
raspberrypi_gpio_set_function(3, GPIO_AF3);
break;
case raspberrypi_SPI4:
raspberrypi_gpio_set_function(25, GPIO_AF5);
raspberrypi_gpio_set_pull(25, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(4, GPIO_AF3);
raspberrypi_gpio_set_pull(4, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(5, GPIO_AF3);
raspberrypi_gpio_set_function(6, GPIO_AF3);
raspberrypi_gpio_set_function(7, GPIO_AF3);
break;
case raspberrypi_SPI5:
raspberrypi_gpio_set_function(26, GPIO_AF5);
raspberrypi_gpio_set_pull(26, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(12, GPIO_AF3);
raspberrypi_gpio_set_pull(12, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(13, GPIO_AF3);
raspberrypi_gpio_set_function(14, GPIO_AF3);
raspberrypi_gpio_set_function(15, GPIO_AF3);
break;
case raspberrypi_SPI6:
raspberrypi_gpio_set_function(27, GPIO_AF5);
raspberrypi_gpio_set_pull(27, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(18, GPIO_AF3);
raspberrypi_gpio_set_pull(18, GPIO_PULL_NONE);
raspberrypi_gpio_set_function(19, GPIO_AF3);
raspberrypi_gpio_set_function(20, GPIO_AF3);
raspberrypi_gpio_set_function(21, GPIO_AF3);
break;
default:
return RTEMS_INVALID_NUMBER;
break;
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code raspberrypi_spi_init(raspberrypi_spi_device device)
{
raspberrypi_spi_bus *bus;
int eno;
volatile raspberrypi_spi *regs;
const char *bus_path;
bus = (raspberrypi_spi_bus *) spi_bus_alloc_and_init(sizeof(*bus));
if (bus == NULL) {
return RTEMS_UNSATISFIED;
}
switch (device) {
case raspberrypi_SPI0:
regs = (volatile raspberrypi_spi *) BCM2711_SPI0_BASE;
bus_path = "/dev/spidev0";
break;
case raspberrypi_SPI3:
regs = (volatile raspberrypi_spi *) BCM2711_SPI3_BASE;
bus_path = "/dev/spidev3";
break;
case raspberrypi_SPI4:
regs = (volatile raspberrypi_spi *) BCM2711_SPI4_BASE;
bus_path = "/dev/spidev4";
break;
case raspberrypi_SPI5:
regs = (volatile raspberrypi_spi *) BCM2711_SPI5_BASE;
bus_path = "/dev/spidev5";
break;
case raspberrypi_SPI6:
regs = (volatile raspberrypi_spi *) BCM2711_SPI6_BASE;
bus_path = "/dev/spidev6";
break;
default:
spi_bus_destroy_and_free(&bus->base);
return RTEMS_INVALID_NUMBER;
break;
}
bus->regs = regs;
bus->num_cs = 2;
bus->base.transfer = raspberrypi_spi_transfer;
bus->base.destroy = raspberrypi_spi_destroy;
bus->base.setup = raspberrypi_spi_setup;
bus->base.bits_per_word = 8;
bus->base.max_speed_hz = 250000000;
bus->base.cs = 0;
#ifdef BSP_SPI_USE_INTERRUPTS
bus->irq = BCM2711_IRQ_SPI;
eno = rtems_interrupt_handler_install(
bus->irq,
"SPI",
RTEMS_INTERRUPT_SHARED,
raspberrypi_spi_interrupt,
bus
);
if (eno != RTEMS_SUCCESSFUL) {
return EAGAIN;
}
#endif
eno = spi_bus_register(&bus->base, bus_path);
if (eno != 0) {
spi_bus_destroy_and_free(&bus->base);
return RTEMS_UNSATISFIED;
}
eno = raspberrypi_spi_init_gpio(device);
if (eno != 0) {
spi_bus_destroy_and_free(&bus->base);
return RTEMS_INVALID_NUMBER;
}
return RTEMS_SUCCESSFUL;
}

View File

@@ -1,49 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief BSP Startup
*/
/*
* Copyright (C) 2022 Mohd Noor Aman
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
void bsp_start( void )
{
bsp_interrupt_initialize();
rtems_cache_coherent_add_area(
bsp_section_nocacheheap_begin,
(uintptr_t) bsp_section_nocacheheap_size
);
}

View File

@@ -1,55 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief BSP Startup Hooks
*/
/*
* Copyright (C) 2022 Mohd Noor Aman
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/irq-generic.h>
#include <bsp/start.h>
#include <rtems/score/cpu.h>
#ifdef BSP_START_ENABLE_EL3_START_SUPPORT
BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
{
/* Do nothing */
}
#endif
BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
{
AArch64_start_set_vector_base();
bsp_start_copy_sections();
raspberrypi_4_setup_mmu_and_cache();
bsp_start_clear_bss();
}

View File

@@ -1,87 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief This source file contains the default MMU tables and setup.
*/
/*
* Copyright (C) 2022 Mohd Noor Aman
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/start.h>
#include <bsp/aarch64-mmu.h>
#include <bsp/raspberrypi.h>
#include <libcpu/mmu-vmsav8-64.h>
BSP_START_DATA_SECTION static const aarch64_mmu_config_entry
raspberrypi_4_mmu_config_table[] = {
AARCH64_MMU_DEFAULT_SECTIONS,
{ /* RPI peripheral address */
.begin = (unsigned)RPI_PERIPHERAL_BASE,
.end = (unsigned)RPI_PERIPHERAL_BASE + (unsigned)RPI_PERIPHERAL_SIZE,
.flags = AARCH64_MMU_DEVICE
},
{ /* RPI ARM local registers */
.begin = (unsigned)BCM2711_LOCAL_REGS_BASE,
.end = (unsigned)BCM2711_LOCAL_REGS_BASE + (unsigned)BCM2711_LOCAL_REGS_SIZE,
.flags = AARCH64_MMU_DEVICE
},
{ /* RPI GIC Interface address */
.begin = 0xFF800000U,
.end = 0xFFA00000U,
.flags = AARCH64_MMU_DEVICE
}
};
/*
* Make weak and let the user override.
*/
BSP_START_TEXT_SECTION void
raspberrypi_4_setup_mmu_and_cache( void ) __attribute__ ((weak));
BSP_START_TEXT_SECTION void
raspberrypi_4_setup_mmu_and_cache( void )
{
aarch64_mmu_control *control = &aarch64_mmu_instance;
aarch64_mmu_setup();
aarch64_mmu_setup_translation_table(
control,
&raspberrypi_4_mmu_config_table[ 0 ],
RTEMS_ARRAY_SIZE( raspberrypi_4_mmu_config_table )
);
aarch64_mmu_enable( control );
}

View File

@@ -1,73 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64RaspberryPi
*
* @brief Watchdog Driver
*/
/*
* Copyright (C) 2024 Ning Yang
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp/raspberrypi.h>
#include <bsp/watchdog.h>
#define PM_WDOG BCM2835_REG(BCM2711_PM_WDOG)
#define PM_RSTC BCM2835_REG(BCM2711_PM_RSTC)
uint32_t raspberrypi_watchdog_timeout;
void raspberrypi_watchdog_init()
{
raspberrypi_watchdog_timeout = 0;
}
void raspberrypi_watchdog_start(uint32_t timeout_ms)
{
raspberrypi_watchdog_timeout = timeout_ms;
PM_WDOG = BCM2711_PM_PASSWD_MAGIC |
((timeout_ms * 65536 / 1000) & BCM2711_PM_WDOG_MASK);
PM_RSTC &= BCM2711_PM_RSTC_WRCFG_CLR;
PM_RSTC = (BCM2711_PM_PASSWD_MAGIC | BCM2711_PM_RSTC_WRCFG_FULL);
}
void raspberrypi_watchdog_stop()
{
PM_RSTC = BCM2711_PM_PASSWD_MAGIC | BCM2711_PM_RSTC_RESET;
}
void raspberrypi_watchdog_reload()
{
raspberrypi_watchdog_start(raspberrypi_watchdog_timeout);
}
uint32_t raspberrypi_watchdog_get_remaining_time()
{
return (PM_WDOG & BCM2711_PM_WDOG_MASK)*1000/65536;
}

View File

@@ -1,415 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief AArch64 cache defines and implementation.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <bsp.h>
#include <rtems/score/aarch64-system-registers.h>
#define CPU_DATA_CACHE_ALIGNMENT 64
#define CPU_INSTRUCTION_CACHE_ALIGNMENT 64
#define CPU_CACHE_SUPPORT_PROVIDES_RANGE_FUNCTIONS
#define CPU_CACHE_SUPPORT_PROVIDES_CACHE_SIZE_FUNCTIONS
#define AARCH64_CACHE_L1_CPU_DATA_ALIGNMENT ( (size_t) 64 )
#define AARCH64_CACHE_PREPARE_MVA(mva) (const void *) \
RTEMS_ALIGN_DOWN ( (size_t) mva, AARCH64_CACHE_L1_CPU_DATA_ALIGNMENT )
static inline
void AArch64_data_cache_clean_and_invalidate_line(const void *d_addr)
{
d_addr = AARCH64_CACHE_PREPARE_MVA(d_addr);
__asm__ volatile (
"dc civac, %[d_addr]"
:
: [d_addr] "r" (d_addr)
: "memory"
);
}
static inline void
_CPU_cache_flush_data_range(
const void *d_addr,
size_t n_bytes
)
{
_AARCH64_Data_synchronization_barrier();
if ( n_bytes != 0 ) {
size_t adx = (size_t) AARCH64_CACHE_PREPARE_MVA ( d_addr );
const size_t ADDR_LAST = (size_t) d_addr + n_bytes - 1;
for (; adx <= ADDR_LAST; adx += AARCH64_CACHE_L1_CPU_DATA_ALIGNMENT ) {
/* Store and invalidate the Data cache line */
AArch64_data_cache_clean_and_invalidate_line( (void*)adx );
}
/* Wait for L1 store to complete */
_AARCH64_Data_synchronization_barrier();
}
_AARCH64_Data_synchronization_barrier();
}
static inline void AArch64_data_cache_invalidate_line(const void *d_addr)
{
d_addr = AARCH64_CACHE_PREPARE_MVA(d_addr);
__asm__ volatile (
"dc ivac, %[d_addr]"
:
: [d_addr] "r" (d_addr)
: "memory"
);
}
static inline void
_CPU_cache_invalidate_data_range(
const void *d_addr,
size_t n_bytes
)
{
if ( n_bytes != 0 ) {
size_t adx = (size_t) AARCH64_CACHE_PREPARE_MVA ( d_addr );
const size_t end = (size_t)d_addr + n_bytes -1;
/* Back starting address up to start of a line and invalidate until end */
for (;
adx <= end;
adx += AARCH64_CACHE_L1_CPU_DATA_ALIGNMENT ) {
/* Invalidate the Instruction cache line */
AArch64_data_cache_invalidate_line( (void*)adx );
}
/* Wait for L1 invalidate to complete */
_AARCH64_Data_synchronization_barrier();
}
}
static inline void _CPU_cache_freeze_data(void)
{
/* TODO */
}
static inline void _CPU_cache_unfreeze_data(void)
{
/* TODO */
}
static inline void AArch64_instruction_cache_invalidate_line(const void *i_addr)
{
/* __builtin___clear_cache is explicitly only for instruction cacche */
__builtin___clear_cache((void *)i_addr, ((char *)i_addr) + sizeof(void*) - 1);
}
static inline void
_CPU_cache_invalidate_instruction_range( const void *i_addr, size_t n_bytes)
{
if ( n_bytes != 0 ) {
__builtin___clear_cache((void *)i_addr, ((char *)i_addr) + n_bytes - 1);
}
_AARCH64_Instruction_synchronization_barrier();
}
static inline void _CPU_cache_freeze_instruction(void)
{
/* TODO */
}
static inline void _CPU_cache_unfreeze_instruction(void)
{
/* TODO */
}
static inline uint64_t AArch64_get_ccsidr_for_level(
uint64_t level, bool instruction
)
{
uint64_t csselr = AARCH64_CSSELR_EL1_LEVEL(level - 1);
csselr |= instruction ? AARCH64_CSSELR_EL1_IND : 0;
_AArch64_Write_csselr_el1(csselr);
_AARCH64_Instruction_synchronization_barrier();
return _AArch64_Read_ccsidr_el1();
}
static inline uint64_t
AArch64_ccsidr_get_line_power(uint64_t ccsidr)
{
return AARCH64_CCSIDR_EL1_LINESIZE_GET(ccsidr) + 4;
}
static inline uint64_t
AArch64_ccsidr_get_associativity(uint64_t ccsidr)
{
return AARCH64_CCSIDR_EL1_ASSOCIATIVITY_GET_0(ccsidr) + 1;
}
static inline uint64_t
AArch64_ccsidr_get_num_sets(uint64_t ccsidr)
{
return AARCH64_CCSIDR_EL1_NUMSETS_GET_0(ccsidr) + 1;
}
static inline void
AArch64_data_cache_clean_and_invalidate_level(uint64_t level)
{
uint64_t ccsidr;
uint64_t line_power;
uint64_t associativity;
uint64_t way;
uint64_t way_shift;
ccsidr = AArch64_get_ccsidr_for_level(level, false);
line_power = AArch64_ccsidr_get_line_power(ccsidr);
associativity = AArch64_ccsidr_get_associativity(ccsidr);
way_shift = __builtin_clz(associativity - 1);
for (way = 0; way < associativity; ++way) {
uint64_t num_sets = AArch64_ccsidr_get_num_sets(ccsidr);
uint64_t set;
for (set = 0; set < num_sets; ++set) {
uint64_t set_and_way = (way << way_shift)
| (set << line_power)
| ((level - 1) << 1);
__asm__ volatile (
"dc cisw, %[set_and_way]"
:
: [set_and_way] "r" (set_and_way)
: "memory"
);
}
}
}
static inline
uint64_t AArch64_clidr_get_cache_type(uint64_t clidr, uint64_t level)
{
return (clidr >> (3 * level)) & 0x7;
}
static inline uint64_t AArch64_clidr_get_level_of_coherency(uint64_t clidr)
{
return AARCH64_CLIDR_EL1_LOC_GET(clidr);
}
static inline void AArch64_data_cache_clean_and_invalidate_all_levels(void)
{
uint64_t clidr = _AArch64_Read_clidr_el1();
uint64_t loc = AArch64_clidr_get_level_of_coherency(clidr);
uint64_t level = 0;
for (level = 1; level <= loc; ++level) {
/* Assume that all levels have a data cache */
AArch64_data_cache_clean_and_invalidate_level(level);
}
}
static inline void _CPU_cache_flush_entire_data(void)
{
rtems_interrupt_level isr_level;
rtems_interrupt_local_disable(isr_level);
_AARCH64_Data_synchronization_barrier();
AArch64_data_cache_clean_and_invalidate_all_levels();
_AARCH64_Data_synchronization_barrier();
rtems_interrupt_local_enable(isr_level);
}
static inline void AArch64_cache_invalidate_level(uint64_t level)
{
uint64_t ccsidr;
uint64_t line_power;
uint64_t associativity;
uint64_t way;
uint64_t way_shift;
ccsidr = AArch64_get_ccsidr_for_level(level, false);
line_power = AArch64_ccsidr_get_line_power(ccsidr);
associativity = AArch64_ccsidr_get_associativity(ccsidr);
way_shift = __builtin_clz(associativity - 1);
for (way = 0; way < associativity; ++way) {
uint64_t num_sets = AArch64_ccsidr_get_num_sets(ccsidr);
uint64_t set;
for (set = 0; set < num_sets; ++set) {
uint64_t set_and_way = (way << way_shift)
| (set << line_power)
| ((level - 1) << 1);
__asm__ volatile (
"dc isw, %[set_and_way]"
:
: [set_and_way] "r" (set_and_way)
: "memory"
);
}
}
}
static inline void AArch64_data_cache_invalidate_all_levels(void)
{
uint64_t clidr = _AArch64_Read_clidr_el1();
uint64_t loc = AArch64_clidr_get_level_of_coherency(clidr);
uint64_t level = 0;
for (level = 1; level <= loc; ++level) {
/* Assume that all levels have a data cache */
AArch64_cache_invalidate_level(level);
}
}
static inline void _CPU_cache_invalidate_entire_data(void)
{
rtems_interrupt_level isr_level;
rtems_interrupt_local_disable(isr_level);
_AARCH64_Data_synchronization_barrier();
AArch64_data_cache_invalidate_all_levels();
_AARCH64_Data_synchronization_barrier();
rtems_interrupt_local_enable(isr_level);
}
static inline void _CPU_cache_enable_data(void)
{
rtems_interrupt_level isr_level;
uint64_t sctlr;
rtems_interrupt_local_disable(isr_level);
sctlr = _AArch64_Read_sctlr_el1();
sctlr |= AARCH64_SCTLR_EL1_C;
_AArch64_Write_sctlr_el1(sctlr);
rtems_interrupt_local_enable(isr_level);
}
static RTEMS_NO_RETURN inline void _CPU_cache_disable_data(void)
{
_Internal_error( INTERNAL_ERROR_CANNOT_DISABLE_DATA_CACHE );
}
static inline void _CPU_cache_invalidate_entire_instruction(void)
{
/*
* There is no way to manage branch prediction in AArch64. See D4.4.12 in
* the ARM Architecture Reference Manual, ARMv8, for ARMv8-A architecture
* profile (ARM DDI 0487D.a).
*/
__asm__ volatile (
#ifdef RTEMS_SMP
/*
* Invalidate all instruction caches up to
* Point of Unification, Inner Shareable.
*/
"ic ialluis\n"
#else
/* Invalidate all instruction caches up to Point of Unification */
"ic iallu\n"
#endif
"isb"
:
:
: "memory"
);
}
static inline void _CPU_cache_enable_instruction(void)
{
rtems_interrupt_level isr_level;
uint64_t sctlr;
rtems_interrupt_local_disable(isr_level);
sctlr = _AArch64_Read_sctlr_el1();
sctlr |= AARCH64_SCTLR_EL1_I;
_AArch64_Write_sctlr_el1(sctlr);
rtems_interrupt_local_enable(isr_level);
}
static inline void _CPU_cache_disable_instruction(void)
{
rtems_interrupt_level isr_level;
uint64_t sctlr;
rtems_interrupt_local_disable(isr_level);
sctlr = _AArch64_Read_sctlr_el1();
sctlr &= ~AARCH64_SCTLR_EL1_I;
_AArch64_Write_sctlr_el1(sctlr);
rtems_interrupt_local_enable(isr_level);
}
static inline size_t AArch64_get_cache_size(
uint64_t level,
bool instruction
)
{
rtems_interrupt_level isr_level;
uint64_t clidr;
uint64_t loc;
uint64_t ccsidr;
clidr = _AArch64_Read_clidr_el1();
loc = AArch64_clidr_get_level_of_coherency(clidr);
if (level > loc) {
return 0;
}
rtems_interrupt_local_disable(isr_level);
ccsidr = AArch64_get_ccsidr_for_level(level, instruction);
rtems_interrupt_local_enable(isr_level);
return (1U << (AArch64_ccsidr_get_line_power(ccsidr)+4))
* AArch64_ccsidr_get_associativity(ccsidr)
* AArch64_ccsidr_get_num_sets(ccsidr);
}
static inline size_t _CPU_cache_get_data_cache_size(uint64_t level)
{
return AArch64_get_cache_size(level, false);
}
static inline size_t _CPU_cache_get_instruction_cache_size(uint64_t level)
{
return AArch64_get_cache_size(level, true);
}
#include "../../shared/cache/cacheimpl.h"

View File

@@ -1,116 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief AArch64-specific ARM GPT system register accessors.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <dev/clock/arm-generic-timer.h>
#include <bsp/irq.h>
uint64_t arm_gt_clock_get_compare_value(void)
{
uint64_t val;
__asm__ volatile (
#ifdef AARCH64_GENERIC_TIMER_USE_VIRTUAL
"mrs %[val], cntv_cval_el0"
#elif defined(AARCH64_GENERIC_TIMER_USE_PHYSICAL_SECURE)
"mrs %[val], cntps_cval_el1"
#else
"mrs %[val], cntp_cval_el0"
#endif
: [val] "=&r" (val)
);
return val;
}
void arm_gt_clock_set_compare_value(uint64_t cval)
{
__asm__ volatile (
#ifdef AARCH64_GENERIC_TIMER_USE_VIRTUAL
"msr cntv_cval_el0, %[cval]"
#elif defined(AARCH64_GENERIC_TIMER_USE_PHYSICAL_SECURE)
"msr cntps_cval_el1, %[cval]"
#else
"msr cntp_cval_el0, %[cval]"
#endif
:
: [cval] "r" (cval)
);
}
uint64_t arm_gt_clock_get_count(void)
{
uint64_t val;
__asm__ volatile (
#ifdef AARCH64_GENERIC_TIMER_USE_VIRTUAL
"mrs %[val], cntvct_el0"
#else
"mrs %[val], cntpct_el0"
#endif
: [val] "=&r" (val)
);
return val;
}
void arm_gt_clock_set_control(uint32_t ctl)
{
__asm__ volatile (
#ifdef AARCH64_GENERIC_TIMER_USE_VIRTUAL
"msr cntv_ctl_el0, %[ctl]"
#elif defined(AARCH64_GENERIC_TIMER_USE_PHYSICAL_SECURE)
"msr cntps_ctl_el1, %[ctl]"
#else
"msr cntp_ctl_el0, %[ctl]"
#endif
:
: [ctl] "r" (ctl)
);
}
void arm_generic_timer_get_config( uint32_t *frequency, uint32_t *irq )
{
uint64_t val;
__asm__ volatile (
"mrs %[val], cntfrq_el0"
: [val] "=&r" (val)
);
*frequency = val;
#ifdef ARM_GENERIC_TIMER_USE_VIRTUAL
*irq = BSP_TIMER_VIRT_PPI;
#elif defined(AARCH64_GENERIC_TIMER_USE_PHYSICAL_SECURE)
*irq = BSP_TIMER_PHYS_S_PPI;
#else
*irq = BSP_TIMER_PHYS_NS_PPI;
#endif
}

View File

@@ -1,23 +0,0 @@
/**
* @file
*
* @ingroup RTEMSImplDoxygen
*
* @brief This header file defines BSP-specific groups.
*/
/**
* @defgroup RTEMSBSPsAArch64 AArch64
*
* @ingroup RTEMSBSPs
*
* @brief This group contains AArch64 Board Support Packages.
*/
/**
* @defgroup RTEMSBSPsAArch64Shared Shared
*
* @ingroup RTEMSBSPsAArch64
*
* @brief This group contains support shared by AArch64 Board Support Packages.
*/

View File

@@ -1,319 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup aarch64_start
*
* @brief AArch64 MMU configuration.
*/
/*
* Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp/aarch64-mmu.h>
#include <bsp/fatal.h>
#include <bsp/linker-symbols.h>
#include <bsp/start.h>
#include <rtems/score/aarch64-system-registers.h>
#include <rtems/score/assert.h>
aarch64_mmu_control aarch64_mmu_instance = {
.ttb = (uint64_t *) bsp_translation_table_base,
/* One page table is used for the initial setup at the base */
.used_page_tables = 1
};
/* AArch64 uses levels 0, 1, 2, and 3 */
#define MMU_MAX_SUBTABLE_PAGE_BITS ( 3 * MMU_BITS_PER_LEVEL + MMU_PAGE_BITS )
/* setup straight mapped block entries */
BSP_START_TEXT_SECTION static inline void aarch64_mmu_page_table_set_blocks(
uint64_t *page_table,
uint64_t base,
uint32_t bits_offset,
uint64_t default_attr
)
{
uint64_t page_flag = 0;
if ( bits_offset == MMU_PAGE_BITS ) {
page_flag = MMU_DESC_TYPE_PAGE;
}
for ( uint64_t i = 0; i < ( 1 << MMU_BITS_PER_LEVEL ); i++ ) {
page_table[i] = base | ( i << bits_offset );
page_table[i] |= default_attr | page_flag;
}
}
BSP_START_TEXT_SECTION static inline uint64_t *
aarch64_mmu_page_table_alloc( aarch64_mmu_control *control )
{
size_t used_page_tables = control->used_page_tables;
if ( used_page_tables >= AARCH64_MMU_TRANSLATION_TABLE_PAGES ) {
return NULL;
}
control->used_page_tables = used_page_tables + 1;
return (uint64_t *)
( (uintptr_t) control->ttb + ( used_page_tables << MMU_PAGE_BITS ) );
}
BSP_START_TEXT_SECTION static inline uintptr_t aarch64_mmu_get_index(
uintptr_t root_address,
uintptr_t vaddr,
uint32_t shift
)
{
uintptr_t mask = ( 1 << ( MMU_BITS_PER_LEVEL + 1 ) ) - 1;
return ( ( vaddr - root_address ) >> shift ) & mask;
}
BSP_START_TEXT_SECTION static uint64_t *
aarch64_mmu_get_sub_table(
aarch64_mmu_control *control,
uint64_t *page_table_entry,
uintptr_t physical_root_address,
uint32_t shift
)
{
/* check if the index already has a page table */
if ( ( *page_table_entry & MMU_DESC_TYPE_TABLE ) == MMU_DESC_TYPE_TABLE ) {
/* extract page table address */
uint64_t table_pointer = *page_table_entry & MMU_DESC_PAGE_TABLE_MASK;
/* This cast should be safe since the address was inserted in this mode */
return (uint64_t *) (uintptr_t) table_pointer;
}
/* allocate new page table and set block */
uint64_t *sub_table = aarch64_mmu_page_table_alloc( control );
if ( sub_table == NULL ) {
return NULL;
}
aarch64_mmu_page_table_set_blocks(
sub_table,
physical_root_address,
shift - MMU_BITS_PER_LEVEL,
*page_table_entry & ~MMU_DESC_PAGE_TABLE_MASK
);
*page_table_entry = (uintptr_t) sub_table;
*page_table_entry |= MMU_DESC_TYPE_TABLE | MMU_DESC_VALID;
return sub_table;
}
BSP_START_TEXT_SECTION static inline rtems_status_code aarch64_mmu_map_block(
aarch64_mmu_control *control,
uint64_t *page_table,
uint64_t root_address,
uint64_t addr,
uint64_t size,
int8_t level,
uint64_t flags
)
{
uint32_t shift = ( 2 - level ) * MMU_BITS_PER_LEVEL + MMU_PAGE_BITS;
uint64_t granularity = 1LLU << shift;
do {
uintptr_t index = aarch64_mmu_get_index( root_address, addr, shift );
uint64_t block_bottom = RTEMS_ALIGN_DOWN( addr, granularity );
uint64_t chunk_size = granularity;
/* check for perfect block match */
if ( block_bottom == addr ) {
if ( size >= chunk_size ) {
/* level -1 can't contain block descriptors, fall through to subtable */
if ( level != -1 ) {
uint64_t page_flag = 0;
if ( level == 2 ) {
page_flag = MMU_DESC_TYPE_PAGE;
}
/* when page_flag is set the last level must be a page descriptor */
if ( page_flag || ( page_table[index] & MMU_DESC_TYPE_TABLE ) != MMU_DESC_TYPE_TABLE ) {
/* no sub-table, apply block properties */
page_table[index] = addr | flags | page_flag;
size -= chunk_size;
addr += chunk_size;
continue;
}
}
} else {
/*
* Block starts on a boundary, but is short.
*
* The size is >= MMU_PAGE_SIZE since
* aarch64_mmu_set_translation_table_entries() aligns the memory region
* to page boundaries. The minimum chunk_size is MMU_PAGE_SIZE.
*/
_Assert( level < 2 );
chunk_size = size;
}
} else {
uintptr_t block_top = RTEMS_ALIGN_UP( addr, granularity );
chunk_size = block_top - addr;
if ( chunk_size > size ) {
chunk_size = size;
}
}
/* Deal with any subtable modification */
uint64_t new_root_address = root_address + index * granularity;
rtems_status_code sc;
uint64_t *sub_table = aarch64_mmu_get_sub_table(
control,
&page_table[index],
new_root_address,
shift
);
if ( sub_table == NULL ) {
return RTEMS_TOO_MANY;
}
sc = aarch64_mmu_map_block(
control,
sub_table,
new_root_address,
addr,
chunk_size,
level + 1,
flags
);
if ( sc != RTEMS_SUCCESSFUL ) {
return sc;
}
size -= chunk_size;
addr += chunk_size;
} while ( size > 0 );
return RTEMS_SUCCESSFUL;
}
/* Get the maximum number of bits supported by this hardware */
BSP_START_TEXT_SECTION static inline uint64_t
aarch64_mmu_get_cpu_pa_bits( void )
{
#ifdef AARCH64_MMU_PHYSICAL_ADDRESS_RANGE_BITS
return AARCH64_MMU_PHYSICAL_ADDRESS_RANGE_BITS;
#else
uint64_t id_reg = _AArch64_Read_id_aa64mmfr0_el1();
switch ( AARCH64_ID_AA64MMFR0_EL1_PARANGE_GET( id_reg ) ) {
case 0:
return 32;
case 1:
return 36;
case 2:
return 40;
case 3:
return 42;
case 4:
return 44;
case 5:
return 48;
case 6:
return 52;
default:
return 48;
}
return 48;
#endif
}
BSP_START_TEXT_SECTION rtems_status_code
aarch64_mmu_set_translation_table_entries(
aarch64_mmu_control *control,
const aarch64_mmu_config_entry *config
)
{
uint64_t max_mappable = 1LLU << aarch64_mmu_get_cpu_pa_bits();
/* Align to page boundaries */
uintptr_t begin = RTEMS_ALIGN_DOWN( config->begin, MMU_PAGE_SIZE );
uintptr_t end = RTEMS_ALIGN_UP( config->end, MMU_PAGE_SIZE );
uintptr_t size = end - begin;
if ( config->begin == config->end ) {
return RTEMS_SUCCESSFUL;
}
if ( begin >= max_mappable ) {
return RTEMS_INVALID_ADDRESS;
}
if ( size > max_mappable - begin ) {
return RTEMS_INVALID_SIZE;
}
return aarch64_mmu_map_block(
control,
control->ttb,
0x0,
begin,
size,
-1,
config->flags
);
}
BSP_START_TEXT_SECTION void aarch64_mmu_setup_translation_table(
aarch64_mmu_control *control,
const aarch64_mmu_config_entry *config_table,
size_t config_count
)
{
size_t i;
aarch64_mmu_page_table_set_blocks(
control->ttb,
(uintptr_t) NULL,
MMU_MAX_SUBTABLE_PAGE_BITS,
0
);
/* Configure entries required for each memory section */
for ( i = 0; i < config_count; ++i ) {
rtems_status_code sc;
sc = aarch64_mmu_set_translation_table_entries( control, &config_table[i] );
if ( sc != RTEMS_SUCCESSFUL ) {
bsp_fatal( AARCH64_FATAL_MMU_CANNOT_MAP_BLOCK );
}
}
}

View File

@@ -1,49 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief AArch64 MMU dummy implementation.
*/
/*
* Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <libcpu/mmu-vmsav8-64.h>
/*
* This must have a non-header implementation because it is used by libdebugger.
*/
rtems_status_code aarch64_mmu_map(
uintptr_t addr,
uint64_t size,
uint64_t flags
)
{
return RTEMS_SUCCESSFUL;
}

View File

@@ -1,78 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief AArch64 MMU implementation.
*/
/*
* Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp/aarch64-mmu.h>
#include <rtems/score/cpu.h>
/*
* This must have a non-header implementation because it is used by libdebugger.
*/
rtems_status_code aarch64_mmu_map(
uintptr_t addr,
uint64_t size,
uint64_t flags
)
{
aarch64_mmu_config_entry config = {
.begin = addr,
.end = addr + size,
.flags = flags
};
rtems_status_code sc;
ISR_Level level;
aarch64_mmu_control *control = &aarch64_mmu_instance;
/*
* Disable interrupts so they don't run while the MMU tables are being
* modified.
*/
_ISR_Local_disable( level );
sc = aarch64_mmu_set_translation_table_entries(
control,
&config
);
_AARCH64_Data_synchronization_barrier();
__asm__ volatile(
"tlbi vmalle1\n"
);
_AARCH64_Data_synchronization_barrier();
_AARCH64_Instruction_synchronization_barrier();
_ISR_Local_enable( level );
return sc;
}

View File

@@ -1,87 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief SMP startup and interop code.
*/
/*
* Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/score/smpimpl.h>
#include <bsp/irq.h>
static void bsp_inter_processor_interrupt( void *arg )
{
_SMP_Inter_processor_interrupt_handler( _Per_CPU_Get() );
}
uint32_t _CPU_SMP_Initialize( void )
{
return arm_gic_irq_processor_count();
}
static rtems_interrupt_entry aarch64_ipi_entry;
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )
{
rtems_status_code sc;
rtems_interrupt_entry_initialize(
&aarch64_ipi_entry,
bsp_inter_processor_interrupt,
NULL,
"IPI"
);
sc = rtems_interrupt_entry_install(
ARM_GIC_IRQ_SGI_0,
RTEMS_INTERRUPT_UNIQUE,
&aarch64_ipi_entry
);
_Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL );
}
void _CPU_SMP_Prepare_start_multitasking( void )
{
/* Do nothing */
}
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
{
arm_gic_trigger_sgi(
ARM_GIC_IRQ_SGI_0,
1U << target_processor_index
);
}
uint32_t _CPU_SMP_Get_current_processor( void )
{
return _Per_CPU_Get_index( _CPU_Get_current_per_CPU_control() );
}

View File

@@ -1,443 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup bsp_linker
*
* @brief Linker command base file.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
ENTRY (_start)
STARTUP (start.o)
/*
* Global symbols that may be defined externally
*/
bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 16;
bsp_stack_exception_size = DEFINED (bsp_stack_exception_size) ? bsp_stack_exception_size : 0;
bsp_stack_exception_size = ALIGN (bsp_stack_exception_size, bsp_stack_align);
bsp_vector_table_size = DEFINED (bsp_vector_table_size) ? bsp_vector_table_size : 64;
bsp_section_xbarrier_align = DEFINED (bsp_section_xbarrier_align) ? bsp_section_xbarrier_align : 1;
bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1;
bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1;
bsp_stack_hyp_size = DEFINED (bsp_stack_hyp_size) ? bsp_stack_hyp_size : 0;
bsp_stack_hyp_size = ALIGN (bsp_stack_hyp_size, bsp_stack_align);
MEMORY {
UNEXPECTED_SECTIONS : ORIGIN = 0xffffffffffffffff, LENGTH = 0
}
SECTIONS {
.start : ALIGN_WITH_INPUT {
bsp_section_start_begin = .;
KEEP (*(.bsp_start_text))
KEEP (*(.bsp_start_data))
bsp_section_start_end = .;
} > REGION_START AT > REGION_START
bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin;
.xbarrier : ALIGN_WITH_INPUT {
. = ALIGN (bsp_section_xbarrier_align);
} > REGION_VECTOR AT > REGION_VECTOR
.text : ALIGN_WITH_INPUT {
bsp_section_text_begin = .;
*(.text.unlikely .text.*_unlikely)
*(.text .stub .text.* .gnu.linkonce.t.*)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
} > REGION_TEXT AT > REGION_TEXT_LOAD
.init : ALIGN_WITH_INPUT {
KEEP (*(.init))
} > REGION_TEXT AT > REGION_TEXT_LOAD
.fini : ALIGN_WITH_INPUT {
KEEP (*(.fini))
bsp_section_text_end = .;
} > REGION_TEXT AT > REGION_TEXT_LOAD
bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
bsp_section_text_load_begin = LOADADDR (.text);
bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
.robarrier : ALIGN_WITH_INPUT {
. = ALIGN (bsp_section_robarrier_align);
} > REGION_RODATA AT > REGION_RODATA
.rodata : ALIGN_WITH_INPUT {
bsp_section_rodata_begin = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rodata1 : ALIGN_WITH_INPUT {
*(.rodata1)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.ARM.extab : ALIGN_WITH_INPUT {
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.ARM.exidx : ALIGN_WITH_INPUT {
__exidx_start = .;
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
.eh_frame : ALIGN_WITH_INPUT {
KEEP (*(.eh_frame))
} > REGION_RODATA AT > REGION_RODATA_LOAD
.gcc_except_table : ALIGN_WITH_INPUT {
*(.gcc_except_table .gcc_except_table.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.tdata : ALIGN_WITH_INPUT {
_TLS_Data_begin = .;
*(.tdata .tdata.* .gnu.linkonce.td.*)
_TLS_Data_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
.tbss : ALIGN_WITH_INPUT {
_TLS_BSS_begin = .;
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
_TLS_BSS_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
_TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
_TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
_TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
_TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
_TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
_TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
.preinit_array : ALIGN_WITH_INPUT {
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
.init_array : ALIGN_WITH_INPUT {
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
.fini_array : ALIGN_WITH_INPUT {
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
PROVIDE_HIDDEN (__fini_array_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
.data.rel.ro : ALIGN_WITH_INPUT {
*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*)
*(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.jcr : ALIGN_WITH_INPUT {
KEEP (*(.jcr))
} > REGION_RODATA AT > REGION_RODATA_LOAD
.interp : ALIGN_WITH_INPUT {
*(.interp)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.note.gnu.build-id : ALIGN_WITH_INPUT {
*(.note.gnu.build-id)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.hash : ALIGN_WITH_INPUT {
*(.hash)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.gnu.hash : ALIGN_WITH_INPUT {
*(.gnu.hash)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.dynsym : ALIGN_WITH_INPUT {
*(.dynsym)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.dynstr : ALIGN_WITH_INPUT {
*(.dynstr)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.gnu.version : ALIGN_WITH_INPUT {
*(.gnu.version)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.gnu.version_d : ALIGN_WITH_INPUT {
*(.gnu.version_d)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.gnu.version_r : ALIGN_WITH_INPUT {
*(.gnu.version_r)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rel.dyn : ALIGN_WITH_INPUT {
*(.rel.init)
*(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
*(.rel.fini)
*(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
*(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
*(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
*(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
*(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
*(.rel.ctors)
*(.rel.dtors)
*(.rel.got)
*(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
PROVIDE_HIDDEN (__rel_iplt_start = .);
*(.rel.iplt)
PROVIDE_HIDDEN (__rel_iplt_end = .);
PROVIDE_HIDDEN (__rela_iplt_start = .);
PROVIDE_HIDDEN (__rela_iplt_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rela.dyn : ALIGN_WITH_INPUT {
*(.rela.init)
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
*(.rela.fini)
*(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
*(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
*(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
*(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
*(.rela.ctors)
*(.rela.dtors)
*(.rela.got)
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
*(.rela.rtemsroset*)
*(.rela.rtemsrwset*)
PROVIDE_HIDDEN (__rel_iplt_start = .);
PROVIDE_HIDDEN (__rel_iplt_end = .);
PROVIDE_HIDDEN (__rela_iplt_start = .);
*(.rela.iplt)
PROVIDE_HIDDEN (__rela_iplt_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rel.plt : ALIGN_WITH_INPUT {
*(.rel.plt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rela.plt : ALIGN_WITH_INPUT {
*(.rela.plt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.plt : ALIGN_WITH_INPUT {
*(.plt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.iplt : ALIGN_WITH_INPUT {
*(.iplt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.dynamic : ALIGN_WITH_INPUT {
*(.dynamic)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.tm_clone_table : ALIGN_WITH_INPUT {
*(.tm_clone_table)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.got : ALIGN_WITH_INPUT {
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.rtemsroset : ALIGN_WITH_INPUT {
/* Special FreeBSD linker set sections */
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = .;
*(set_domain_*);
*(set_pseudo_*);
KEEP (*(SORT(.rtemsroset.*)))
bsp_section_rodata_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
bsp_section_rodata_load_begin = LOADADDR (.rodata);
bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
.rwbarrier : ALIGN_WITH_INPUT {
. = ALIGN (bsp_section_rwbarrier_align);
} > REGION_DATA AT > REGION_DATA
.vector : ALIGN_WITH_INPUT {
bsp_section_vector_begin = .;
. = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size;
bsp_section_vector_end = .;
} > REGION_VECTOR AT > REGION_VECTOR
bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin;
bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin;
bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size;
.fast_text : ALIGN_WITH_INPUT {
bsp_section_fast_text_begin = .;
*(.bsp_fast_text)
bsp_section_fast_text_end = .;
} > REGION_FAST_TEXT AT > REGION_FAST_TEXT_LOAD
bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin;
bsp_section_fast_text_load_begin = LOADADDR (.fast_text);
bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size;
.fast_data : ALIGN_WITH_INPUT {
bsp_section_fast_data_begin = .;
*(.bsp_fast_data)
bsp_section_fast_data_end = .;
} > REGION_FAST_DATA AT > REGION_FAST_DATA_LOAD
bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin;
bsp_section_fast_data_load_begin = LOADADDR (.fast_data);
bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size;
.data : ALIGN_WITH_INPUT {
bsp_section_data_begin = .;
*(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
} > REGION_DATA AT > REGION_DATA_LOAD
.data1 : ALIGN_WITH_INPUT {
*(.data1)
} > REGION_DATA AT > REGION_DATA_LOAD
.rtemsrwset : ALIGN_WITH_INPUT {
KEEP (*(SORT(.rtemsrwset.*)))
bsp_section_data_end = .;
} > REGION_DATA AT > REGION_DATA_LOAD
bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
bsp_section_data_load_begin = LOADADDR (.data);
bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
.bss : ALIGN_WITH_INPUT {
bsp_section_bss_begin = .;
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
bsp_section_bss_end = .;
} > REGION_BSS AT > REGION_BSS
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
.rtemsstack (NOLOAD) : ALIGN_WITH_INPUT {
bsp_section_rtemsstack_begin = .;
*(SORT_BY_ALIGNMENT (SORT_BY_NAME (.rtemsstack*)))
bsp_section_rtemsstack_end = .;
} > REGION_WORK AT > REGION_WORK
bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin;
.noinit (NOLOAD) : ALIGN_WITH_INPUT {
bsp_section_noinit_begin = .;
*(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
bsp_section_noinit_end = .;
} > REGION_WORK AT > REGION_WORK
bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin;
.work : ALIGN_WITH_INPUT {
/*
* The work section will occupy the remaining REGION_WORK region and
* contains the RTEMS work space and heap.
*/
bsp_section_work_begin = .;
. += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.);
bsp_section_work_end = .;
} > REGION_WORK AT > REGION_WORK
bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
.stack : ALIGN_WITH_INPUT {
/*
* The stack section will occupy the remaining REGION_STACK region and may
* contain the task stacks. Depending on the region distribution this
* section may be of zero size.
*/
bsp_section_stack_begin = .;
. += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.);
bsp_section_stack_end = .;
} > REGION_STACK AT > REGION_STACK
bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
.nocache : ALIGN_WITH_INPUT {
bsp_section_nocache_begin = .;
*(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_nocache*)))
bsp_section_nocache_end = .;
} > REGION_NOCACHE AT > REGION_NOCACHE_LOAD
bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin;
bsp_section_nocache_load_begin = LOADADDR (.nocache);
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
.nocachenoload (NOLOAD) : ALIGN_WITH_INPUT {
bsp_section_nocachenoload_begin = .;
*(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_noload_nocache*)))
bsp_section_nocacheheap_begin = .;
. += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
bsp_section_nocacheheap_end = .;
bsp_section_nocachenoload_end = .;
} > REGION_NOCACHE AT > REGION_NOCACHE
bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin;
bsp_section_nocachenoload_size = bsp_section_nocachenoload_end - bsp_section_nocachenoload_begin;
/* FIXME */
RamBase = ORIGIN (REGION_WORK);
RamSize = LENGTH (REGION_WORK);
RamEnd = RamBase + RamSize;
WorkAreaBase = bsp_section_work_begin;
HeapSize = 0;
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1. */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions. */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2. */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2. */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* DWARF 3. */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF 5. */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.debug_sup 0 : { *(.debug_sup) }
.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
/* Addition to let linker know about custom section for GDB pretty-printing support. */
.debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
/*
* This is a RTEMS specific section to catch all unexpected input
* sections. In case you get an error like
* "section `.unexpected_sections' will not fit in region
* `UNEXPECTED_SECTIONS'"
* you have to figure out the offending input section and add it to the
* appropriate output section definition above.
*/
.unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS
}

View File

@@ -1,47 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief This source file contains the
* _AArch64_Get_current_processor_for_system_start() default implementation
* using the MPIDR_EL1.
*/
/*
* Copyright (C) 2024 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/asm.h>
FUNCTION_ENTRY(_AArch64_Get_current_processor_for_system_start)
/* Return the affinity level 0 reported by the MPIDR_EL1 */
mrs x0, mpidr_el1
and x0, x0, #0xff
ret
FUNCTION_END(_AArch64_Get_current_processor_for_system_start)

View File

@@ -1,346 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Shared
*
* @brief Boot and system start code.
*/
/*
* Copyright (C) 2020 On-Line Applications Research Corporation (OAR)
* Written by Kinsey Moore <kinsey.moore@oarcorp.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/asm.h>
#include <rtems/score/percpu.h>
#include <bspopts.h>
/* Global symbols */
.globl _start
.section ".bsp_start_text", "ax"
/* Start entry */
_start:
/*
* We do not save the context since we do not return to the boot
* loader but preserve x1 and x2 to allow access to bootloader parameters
*/
#ifndef BSP_START_NEEDS_REGISTER_INITIALIZATION
mov x5, x1 /* machine type number or ~0 for DT boot */
mov x6, x2 /* physical address of ATAGs or DTB */
#else /* BSP_START_NEEDS_REGISTER_INITIALIZATION */
/*
* This block is dead code. No aarch64 targets require this. It might be
* needed for hardware simulations or in future processor variants with
* lock-step cores.
*/
mov x0, XZR
mov x1, XZR
mov x2, XZR
mov x3, XZR
mov x4, XZR
mov x5, XZR
mov x6, XZR
mov x7, XZR
mov x8, XZR
mov x9, XZR
mov x10, XZR
mov x11, XZR
mov x12, XZR
mov x13, XZR
mov x14, XZR
mov x15, XZR
mov x16, XZR
mov x17, XZR
mov x18, XZR
mov x19, XZR
mov x20, XZR
mov x21, XZR
mov x22, XZR
mov x23, XZR
mov x24, XZR
mov x25, XZR
mov x26, XZR
mov x27, XZR
mov x28, XZR
mov x29, XZR
mov x30, XZR
#ifdef AARCH64_MULTILIB_VFP
mov CPTR_EL3, XZR
mov CPTR_EL2, XZR
mov d0, XZR
mov d1, XZR
mov d2, XZR
mov d3, XZR
mov d4, XZR
mov d5, XZR
mov d6, XZR
mov d7, XZR
mov d8, XZR
mov d9, XZR
mov d10, XZR
mov d11, XZR
mov d12, XZR
mov d13, XZR
mov d14, XZR
mov d15, XZR
mov d16, XZR
mov d17, XZR
mov d18, XZR
mov d19, XZR
mov d20, XZR
mov d21, XZR
mov d22, XZR
mov d23, XZR
mov d24, XZR
mov d25, XZR
mov d26, XZR
mov d27, XZR
mov d28, XZR
mov d29, XZR
mov d30, XZR
mov d31, XZR
#endif /* AARCH64_MULTILIB_VFP */
#endif /* BSP_START_NEEDS_REGISTER_INITIALIZATION */
/* Initialize SCTLR_EL1 */
mov x0, XZR
#if defined(RTEMS_DEBUG)
/* Enable Stack alignment checking */
orr x0, x0, #(1<<3)
#endif
msr SCTLR_EL1, x0
#if defined(BSP_START_ENABLE_EL2_START_SUPPORT) || \
defined(BSP_START_ENABLE_EL3_START_SUPPORT)
mrs x0, CurrentEL
cmp x0, #(1<<2)
b.eq .L_el1_start
#endif
#if defined(BSP_START_ENABLE_EL3_START_SUPPORT)
cmp x0, #(2<<2)
b.eq .L_el2_start
.L_el3_start:
/*
* Before leaving the Secure World, we need to initialize the GIC. We
* do that here in an early stack context in EL3. This will NOT work
* on secondary core boot! We assume only the primary boot core will
* start in EL3 if any. Usually on real hardware, we should be running
* on top of trusted firmware and will not boot in EL3. Qemu fakes it
* for us and will start the primary core in EL3 and secondary cores
* will be brought up in EL1NS as expected.
*/
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
ldr w1, =_ISR_Stack_size
ldr w2, =_ISR_Stack_area_begin
#else
ldr x1, =_ISR_Stack_size
ldr x2, =_ISR_Stack_area_begin
#endif
add x3, x1, x2
/* using SP0 for the early init stack context at EL3 */
msr spsel, #0
mov sp, x3
/*
* Invoke the start hook 0.
* We don't set up exception handling, so this hook better behave.
*/
bl bsp_start_hook_0
/* Drop from EL3 to EL2 */
/* Initialize HCR_EL2 and SCTLR_EL2 */
msr HCR_EL2, XZR
msr SCTLR_EL2, XZR
/* Set EL2 Execution state via SCR_EL3 */
mrs x0, SCR_EL3
/* Set EL2 to AArch64 */
orr x0, x0, #(1<<10)
/* Set EL1 to NS */
orr x0, x0, #1
msr SCR_EL3, x0
/* set EL2h mode for eret */
mov x0, #0b01001
msr SPSR_EL3, x0
/* Set EL2 entry point */
adr x0, .L_el2_start
msr ELR_EL3, x0
eret
#endif
#if defined(BSP_START_ENABLE_EL2_START_SUPPORT) || \
defined(BSP_START_ENABLE_EL3_START_SUPPORT)
.L_el2_start:
/* Drop from EL2 to EL1 */
/* Configure HCR_EL2 */
mrs x0, HCR_EL2
/* Set EL1 Execution state to AArch64 */
orr x0, x0, #(1<<31)
/* Disable ID traps */
bic x0, x0, #(1<<15)
bic x0, x0, #(1<<16)
bic x0, x0, #(1<<17)
bic x0, x0, #(1<<18)
msr HCR_EL2, x0
/* Set to EL1h mode for eret */
mov x0, #0b00101
msr SPSR_EL2, x0
/* Set EL1 entry point */
adr x0, .L_el1_start
msr ELR_EL2, x0
eret
.L_el1_start:
#endif
#ifdef RTEMS_SMP
bl _AArch64_Get_current_processor_for_system_start
/*
* Check that this is a configured processor. If not, then there is
* not much that can be done since we do not have a stack available for
* this processor. Just loop forever in this case.
*/
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
ldr w1, =_SMP_Processor_configured_maximum
#else
ldr x1, =_SMP_Processor_configured_maximum
#endif
ldr w1, [x1]
cmp x1, x0
bgt .Lconfigured_processor
.Linvalid_processor_wait_for_ever:
wfe
b .Linvalid_processor_wait_for_ever
.Lconfigured_processor:
/*
* Get current per-CPU control and store it in PL1 only Thread ID
* Register (TPIDR_EL1).
*/
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
ldr w1, =_Per_CPU_Information
#else
ldr x1, =_Per_CPU_Information
#endif
add x1, x1, x0, lsl #PER_CPU_CONTROL_SIZE_LOG2
msr TPIDR_EL1, x1
#endif
/* Calculate interrupt stack area end for current processor */
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
ldr w1, =_ISR_Stack_size
#else
ldr x1, =_ISR_Stack_size
#endif
#ifdef RTEMS_SMP
add x3, x0, #1
mul x1, x1, x3
#endif
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
ldr w2, =_ISR_Stack_area_begin
#else
ldr x2, =_ISR_Stack_area_begin
#endif
add x3, x1, x2
/* Disable interrupts and debug */
msr DAIFSet, #0xa
#ifdef BSP_START_NEEDS_REGISTER_INITIALIZATION
mov x8, XZR
mov x9, XZR
mov x10, XZR
mov x11, XZR
mov x12, XZR
mov x13, XZR
mov x14, XZR
mov x15, XZR
#endif
/*
* SPx: the stack pointer corresponding to the current exception level
* Normal operation for RTEMS on AArch64 uses SPx and runs on EL1
* Exception operation (synchronous errors, IRQ, FIQ, System Errors) uses SP0
*/
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
ldr w1, =bsp_stack_exception_size
#else
ldr x1, =bsp_stack_exception_size
#endif
/* Switch to SP0 and set exception stack */
msr spsel, #0
mov sp, x3
/* Switch back to SPx for normal operation */
msr spsel, #1
sub x3, x3, x1
/* Set SP1 stack used for normal operation */
mov sp, x3
/* Stay in EL1 mode */
#ifdef AARCH64_MULTILIB_VFP
#ifdef AARCH64_MULTILIB_HAS_CPACR
/* Read CPACR */
mrs x0, CPACR_EL1
/* Enable EL1 access permissions for CP10 */
orr x0, x0, #(1 << 20)
/* Write CPACR */
msr CPACR_EL1, x0
isb
#endif
/* FPU does not need to be enabled on AArch64 */
/* Ensure FPU traps are disabled by default */
mrs x0, FPCR
bic x0, x0, #((1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12))
bic x0, x0, #(1 << 15)
msr FPCR, x0
#endif /* AARCH64_MULTILIB_VFP */
/* Branch to start hook 1 */
bl bsp_start_hook_1
/* Branch to boot card */
mov x0, #0
bl boot_card

View File

@@ -1,145 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64XilinxVersal
*
* @brief This source file contains this BSP's console configuration.
*/
/*
* Copyright (C) 2021 Gedare Bloom <gedare@rtems.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/console.h>
#include <rtems/bspIo.h>
#include <rtems/sysinit.h>
#include <bsp/irq.h>
#include <dev/serial/arm-pl011.h>
#include <dev/serial/versal-uart.h>
#include <bspopts.h>
static versal_pl011_context versal_uart_instances[2] = {
{
.pl011_ctx = {
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("Versal UART 0"),
.regs = (arm_pl011_uart *) 0xff000000,
.irq = VERSAL_IRQ_UART_0,
.clock = VERSAL_CLOCK_UART,
.initial_baud = VERSAL_UART_DEFAULT_BAUD
}
}, {
.pl011_ctx = {
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("Versal UART 1"),
.regs = (arm_pl011_uart *) 0xff010000,
.irq = VERSAL_IRQ_UART_1,
.clock = VERSAL_CLOCK_UART,
.initial_baud = VERSAL_UART_DEFAULT_BAUD
}
}
};
rtems_status_code console_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
)
{
size_t i;
rtems_termios_initialize();
for (i = 0; i < RTEMS_ARRAY_SIZE(versal_uart_instances); ++i) {
char uart[] = "/dev/ttySX";
uart[sizeof(uart) - 2] = (char) ('0' + i);
rtems_termios_device_install(
&uart[0],
&versal_uart_handler,
NULL,
&versal_uart_instances[i].pl011_ctx.base
);
if (i == BSP_CONSOLE_MINOR) {
link(&uart[0], CONSOLE_DEVICE_NAME);
}
}
return RTEMS_SUCCESSFUL;
}
void versal_debug_console_flush(void)
{
versal_uart_reset_tx_flush(
&versal_uart_instances[BSP_CONSOLE_MINOR].pl011_ctx.base
);
}
static void versal_debug_console_out(char c)
{
rtems_termios_device_context *base =
&versal_uart_instances[BSP_CONSOLE_MINOR].pl011_ctx.base;
arm_pl011_write_polled(base, c);
}
static void versal_debug_console_init(void)
{
rtems_termios_device_context *base =
&versal_uart_instances[BSP_CONSOLE_MINOR].pl011_ctx.base;
(void) versal_uart_initialize(base);
BSP_output_char = versal_debug_console_out;
}
static void versal_debug_console_early_init(char c)
{
rtems_termios_device_context *base =
&versal_uart_instances[BSP_CONSOLE_MINOR].pl011_ctx.base;
(void) versal_uart_initialize(base);
BSP_output_char = versal_debug_console_out;
versal_debug_console_out(c);
}
static int versal_debug_console_in(void)
{
rtems_termios_device_context *base =
&versal_uart_instances[BSP_CONSOLE_MINOR].pl011_ctx.base;
return arm_pl011_read_polled(base);
}
BSP_output_char_function_type BSP_output_char = versal_debug_console_early_init;
BSP_polling_getchar_function_type BSP_poll_char = versal_debug_console_in;
RTEMS_SYSINIT_ITEM(
versal_debug_console_init,
RTEMS_SYSINIT_BSP_START,
RTEMS_SYSINIT_ORDER_LAST_BUT_5
);

View File

@@ -1,378 +0,0 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2022 Chris Johns <chris@contemporary.software>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <dev/serial/versal-uart.h>
#include <dev/serial/arm-pl011.h>
#include <bsp/irq.h>
#include <bspopts.h>
static uint32_t versal_uart_intr_all(void)
{
return PL011_UARTI_OEI |
PL011_UARTI_BEI |
PL011_UARTI_PEI |
PL011_UARTI_FEI |
PL011_UARTI_RTI |
PL011_UARTI_TXI |
PL011_UARTI_RXI |
PL011_UARTI_DSRMI |
PL011_UARTI_DCDMI |
PL011_UARTI_CTSMI |
PL011_UARTI_RIMI;
}
#ifdef BSP_CONSOLE_USE_INTERRUPTS
static void versal_uart_intr_clear(volatile arm_pl011_uart *regs, uint32_t ints)
{
regs->base.uarticr = ints;
}
static void versal_uart_intr_clearall(volatile arm_pl011_uart *regs)
{
versal_uart_intr_clear(regs, versal_uart_intr_all());
}
static void versal_uart_intr_enable(volatile arm_pl011_uart *regs, uint32_t ints)
{
regs->base.uartimsc |= ints;
}
#endif
static void versal_uart_intr_disable(volatile arm_pl011_uart *regs, uint32_t ints)
{
regs->base.uartimsc &= ~ints;
}
static void versal_uart_intr_disableall(volatile arm_pl011_uart *regs)
{
versal_uart_intr_disable(regs, versal_uart_intr_all());
}
#ifdef BSP_CONSOLE_USE_INTERRUPTS
static bool versal_uart_flags_clear(volatile arm_pl011_uart *regs, uint32_t flags)
{
return (regs->base.uartfr & flags) == 0;
}
static void versal_uart_interrupt(void *arg)
{
rtems_termios_tty *tty = arg;
versal_pl011_context *ctx = rtems_termios_get_device_context(tty);
volatile arm_pl011_uart *regs = (volatile arm_pl011_uart *) ctx->pl011_ctx.regs;
uint32_t uartmis = regs->base.uartmis;
versal_uart_intr_clear(regs, uartmis);
if ((uartmis & (PL011_UARTI_RTI | PL011_UARTI_RXI)) != 0) {
char buf[32];
int c = 0;
while (c < sizeof(buf) &&
versal_uart_flags_clear(regs, PL011_UARTFR_RXFE)) {
buf[c++] = (char) PL011_UARTDR_DATA_GET(regs->base.uartdr);
}
rtems_termios_enqueue_raw_characters(tty, buf, c);
}
if (ctx->transmitting) {
int sent = ctx->pl011_ctx.tx_queued_chars;
ctx->transmitting = false;
ctx->pl011_ctx.tx_queued_chars = 0;
versal_uart_intr_disable(regs, PL011_UARTI_TXI);
rtems_termios_dequeue_characters(tty, sent);
}
}
#endif
void versal_uart_reset_tx_flush(rtems_termios_device_context *base)
{
volatile arm_pl011_uart *regs = (volatile arm_pl011_uart *) arm_pl011_get_regs(base);
int c = 4;
while (c-- > 0) {
arm_pl011_write_polled(base, '\r');
}
while ((regs->base.uartfr & PL011_UARTFR_TXFE) == 0) {
/* Wait for empty */
}
while ((regs->base.uartfr & PL011_UARTFR_BUSY) != 0) {
/* Wait for empty */
}
}
int versal_uart_initialize(rtems_termios_device_context *base)
{
volatile pl011_base *regs = (volatile pl011_base *)arm_pl011_get_regs(base);
arm_pl011_context *ctx = (arm_pl011_context *) base;
uint32_t maxerr = 3;
uint32_t ibauddiv = 0;
uint32_t fbauddiv = 0;
int rv;
versal_uart_reset_tx_flush(base);
rv = arm_pl011_compute_baudrate_params(
&ibauddiv,
&fbauddiv,
VERSAL_UART_DEFAULT_BAUD,
ctx->clock,
maxerr
);
if (rv != 0) {
return rv;
}
/* Line control: 8-bit word length, no parity, no FIFO, 1 stop bit */
regs->uartlcr_h = PL011_UARTLCR_H_WLEN( PL011_UARTLCR_H_WLEN_8 )
| PL011_UARTLCR_H_FEN;
/* Control: receive, transmit, uart enable, no CTS, no RTS, no loopback */
regs->uartcr = PL011_UARTCR_RXE
| PL011_UARTCR_TXE
| PL011_UARTCR_UARTEN;
regs->uartibrd = ibauddiv;
regs->uartfbrd = fbauddiv;
return 0;
}
static bool versal_uart_first_open(
rtems_termios_tty *tty,
rtems_termios_device_context *base,
struct termios *term,
rtems_libio_open_close_args_t *args
)
{
#ifdef BSP_CONSOLE_USE_INTERRUPTS
versal_pl011_context *ctx = (versal_pl011_context *) base;
volatile arm_pl011_uart *regs = (volatile arm_pl011_uart *) ctx->pl011_ctx.regs;
rtems_status_code sc;
ctx->transmitting = false;
ctx->pl011_ctx.tx_queued_chars = 0;
ctx->pl011_ctx.needs_sw_triggered_tx_irq = true;
#endif
rtems_termios_set_initial_baud(tty, VERSAL_UART_DEFAULT_BAUD);
versal_uart_initialize(base);
#ifdef BSP_CONSOLE_USE_INTERRUPTS
regs->base.uartifls = PL011_UARTIFLS_RXIFLSEL(2) | PL011_UARTIFLS_TXIFLSEL(2);
regs->base.uartlcr_h |= PL011_UARTLCR_H_FEN;
versal_uart_intr_disableall(regs);
sc = rtems_interrupt_handler_install(
ctx->pl011_ctx.irq,
"UART",
RTEMS_INTERRUPT_SHARED,
versal_uart_interrupt,
tty
);
if (sc != RTEMS_SUCCESSFUL) {
return false;
}
versal_uart_intr_clearall(regs);
versal_uart_intr_enable(regs, PL011_UARTI_RTI | PL011_UARTI_RXI);
#endif
return true;
}
#ifdef BSP_CONSOLE_USE_INTERRUPTS
static void versal_uart_last_close(
rtems_termios_tty *tty,
rtems_termios_device_context *base,
rtems_libio_open_close_args_t *args
)
{
versal_pl011_context *ctx = (versal_pl011_context *) base;
rtems_interrupt_handler_remove(ctx->pl011_ctx.irq, versal_uart_interrupt, tty);
}
#endif
static void versal_uart_write_support(
rtems_termios_device_context *base,
const char *buf,
size_t len
)
{
#ifdef BSP_CONSOLE_USE_INTERRUPTS
versal_pl011_context *ctx = (versal_pl011_context *) base;
volatile arm_pl011_uart *regs = (volatile arm_pl011_uart *) ctx->pl011_ctx.regs;
if (len > 0) {
size_t len_remaining = len;
const char *p = &buf[0];
versal_uart_intr_enable(regs, PL011_UARTI_TXI);
/*
* The PL011 IP in the Versal needs preloading the TX FIFO with
* exactly 17 characters for the first TX interrupt to be
* generated.
*/
if (ctx->pl011_ctx.needs_sw_triggered_tx_irq) {
ctx->pl011_ctx.needs_sw_triggered_tx_irq = false;
for (int i = 0; i < 17; ++i) {
regs->base.uartdr = PL011_UARTDR_DATA('\r');
}
}
while (versal_uart_flags_clear(regs, PL011_UARTFR_TXFF) &&
len_remaining > 0) {
regs->base.uartdr = PL011_UARTDR_DATA(*p++);
--len_remaining;
}
ctx->pl011_ctx.tx_queued_chars = len - len_remaining;
ctx->transmitting = true;
}
#else
ssize_t i;
for (i = 0; i < len; ++i) {
arm_pl011_write_polled(base, buf[i]);
}
#endif
}
static bool versal_uart_set_attributes(
rtems_termios_device_context *context,
const struct termios *term
)
{
versal_pl011_context *ctx = (versal_pl011_context *) context;
volatile arm_pl011_uart *regs = (volatile arm_pl011_uart *) ctx->pl011_ctx.regs;
int32_t baud;
uint32_t ibauddiv = 0;
uint32_t fbauddiv = 0;
uint32_t mode = 0;
int rc;
/*
* Determine the baud rate
*/
baud = rtems_termios_baud_to_number(term->c_ospeed);
if (baud > 0) {
uint32_t maxerr = 3;
rc = arm_pl011_compute_baudrate_params(
&ibauddiv,
&fbauddiv,
baud,
ctx->pl011_ctx.clock,
maxerr
);
if (rc != 0) {
return rc;
}
}
/*
* Configure the mode register
*/
mode = regs->base.uartlcr_h & PL011_UARTLCR_H_FEN;
/*
* Parity
*/
if ((term->c_cflag & PARENB) != 0) {
mode |= PL011_UARTLCR_H_PEN;
if ((term->c_cflag & PARODD) == 0) {
mode |= PL011_UARTLCR_H_EPS;
}
}
/*
* Character Size
*/
switch (term->c_cflag & CSIZE)
{
case CS5:
mode = PL011_UARTLCR_H_WLEN_SET(mode, PL011_UARTLCR_H_WLEN_5);
break;
case CS6:
mode = PL011_UARTLCR_H_WLEN_SET(mode, PL011_UARTLCR_H_WLEN_6);
break;
case CS7:
mode = PL011_UARTLCR_H_WLEN_SET(mode, PL011_UARTLCR_H_WLEN_7);
break;
case CS8:
default:
mode = PL011_UARTLCR_H_WLEN_SET(mode, PL011_UARTLCR_H_WLEN_8);
break;
}
/*
* Stop Bits
*/
if (term->c_cflag & CSTOPB) {
/* 2 stop bits */
mode |= PL011_UARTLCR_H_STP2;
}
versal_uart_intr_disableall(regs);
/*
* Wait for any data in the TXFIFO to be sent then wait while the
* transmiter is active.
*/
while ((regs->base.uartfr & PL011_UARTFR_TXFE) == 0 ||
(regs->base.uartfr & PL011_UARTFR_BUSY) != 0) {
/* Wait */
}
regs->base.uartcr = PL011_UARTCR_UARTEN;
/* Ignore baud rate of B0. There are no modem control lines to de-assert */
if (baud > 0) {
regs->base.uartibrd = ibauddiv;
regs->base.uartfbrd = fbauddiv;
}
regs->base.uartlcr_h = mode;
/* Control: receive, transmit, uart enable, no CTS, no RTS, no loopback */
regs->base.uartcr = PL011_UARTCR_RXE
| PL011_UARTCR_TXE
| PL011_UARTCR_UARTEN;
#ifdef BSP_CONSOLE_USE_INTERRUPTS
versal_uart_intr_clearall(regs);
versal_uart_intr_enable(regs, PL011_UARTI_RTI | PL011_UARTI_RXI);
#endif
return true;
}
const rtems_termios_device_handler versal_uart_handler = {
.first_open = versal_uart_first_open,
.set_attributes = versal_uart_set_attributes,
.write = versal_uart_write_support,
#ifdef BSP_CONSOLE_USE_INTERRUPTS
.last_close = versal_uart_last_close,
.mode = TERMIOS_IRQ_DRIVEN
#else
.poll_read = arm_pl011_read_polled,
.mode = TERMIOS_POLLED
#endif
};

View File

@@ -1,94 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64XilinxVersal
*
* @brief This header file provides the core BSP definitions
*/
/*
* Copyright (C) 2021 Gedare Bloom <gedare@rtems.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_XILINX_VERSAL_BSP_H
#define LIBBSP_AARCH64_XILINX_VERSAL_BSP_H
/**
* @addtogroup RTEMSBSPsAArch64
*
* @{
*/
#include <bspopts.h>
#define BSP_RESET_SMC
#ifndef ASM
#include <bsp/default-initial-extension.h>
#include <bsp/linker-symbols.h>
#include <bsp/start.h>
#include <rtems.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_ARM_GIC_CPUIF_BASE 0xf9040000
#define BSP_ARM_GIC_DIST_BASE 0xf9000000
#define BSP_ARM_GIC_REDIST_BASE 0xf9080000
/*
* DDRMC mapping
*/
LINKER_SYMBOL(bsp_r0_ram_base)
LINKER_SYMBOL(bsp_r0_ram_end)
LINKER_SYMBOL(bsp_r1_ram_base)
LINKER_SYMBOL(bsp_r1_ram_end)
/**
* @brief Versal specific set up of the MMU.
*
* Provide in the application to override the defaults in the BSP.
*/
BSP_START_TEXT_SECTION void versal_setup_mmu_and_cache(void);
void versal_debug_console_flush(void);
uint32_t versal_clock_i2c0(void);
uint32_t versal_clock_i2c1(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
/** @} */
#endif /* LIBBSP_AARCH64_XILINX_VERSAL_BSP_H */

View File

@@ -1,64 +0,0 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2022 Chris Johns <chris@contemporary.software>
* Copyright (C) 2014 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_XILINX_VERSAL_I2C_H
#define LIBBSP_ARM_XILINX_VERSAL_I2C_H
#include <dev/i2c/cadence-i2c.h>
#include <bsp/irq.h>
#include <bsp.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
static inline int versal_register_i2c_0(void)
{
return i2c_bus_register_cadence(
"/dev/i2c-0",
0x00FF020000,
versal_clock_i2c0(),
VERSAL_IRQ_I2C_0
);
}
static inline int versal_register_i2c_1(void)
{
return i2c_bus_register_cadence(
"/dev/i2c-1",
0x00FF030000,
versal_clock_i2c1(),
VERSAL_IRQ_I2C_1
);
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_ARM_XILINX_VERSAL_I2C_H */

View File

@@ -1,74 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64XilinxVersal
*
* @brief This header file provides the BSP's IRQ definitions.
*/
/*
* Copyright (C) Gedare Bloom <gedare@rtems.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_XILINX_VERSAL_IRQ_H
#define LIBBSP_AARCH64_XILINX_VERSAL_IRQ_H
#ifndef ASM
#include <rtems/irq.h>
#include <rtems/irq-extension.h>
#include <dev/irq/arm-gic-irq.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define BSP_INTERRUPT_VECTOR_COUNT 1020
/* Interrupts vectors */
#define BSP_TIMER_VIRT_PPI 27
#define BSP_TIMER_PHYS_S_PPI 29
#define BSP_TIMER_PHYS_NS_PPI 30
#define VERSAL_IRQ_I2C_0 46
#define VERSAL_IRQ_I2C_1 47
#define VERSAL_IRQ_UART_0 50
#define VERSAL_IRQ_UART_1 51
#define VERSAL_IRQ_ETHERNET_0 88
#define VERSAL_IRQ_ETHERNET_0_WAKEUP 89
#define VERSAL_IRQ_ETHERNET_1 90
#define VERSAL_IRQ_ETHERNET_1_WAKEUP 91
#define VERSAL_IRQ_QSPI 157
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
#endif /* LIBBSP_AARCH64_XILINX_VERSAL_IRQ_H */

View File

@@ -1,41 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsArmXilinxVersal
*
* @brief This header file provides BSP-specific interfaces.
*/
/*
* Copyright (C) 2024 On-Line Applications Research Corporation (OAR)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_XILINX_ZYNQMP_RPU_BSP_XIL_COMPAT_H
#define LIBBSP_ARM_XILINX_ZYNQMP_RPU_BSP_XIL_COMPAT_H
#include <bsp/xil-compat-common.h>
#endif

View File

@@ -1,73 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup versal_uart
*
* @brief Xilinx Versal UART support.
*/
/*
* Copyright (C) 2021 Gedare Bloom <gedare@rtems.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_XILINX_VERSAL_UART_H
#define LIBBSP_ARM_XILINX_VERSAL_UART_H
#include <rtems/termiostypes.h>
#include <dev/serial/arm-pl011.h>
#include <dev/serial/arm-pl011-regs.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup versal_uart Xilinx Versal UART Support
* @ingroup RTEMSBSPsARMVersal
* @brief UART Support
*
* This driver operates an instance of the Xilinx UART present in the
* family of Xilinx Versal SoCs.
*/
typedef struct {
arm_pl011_context pl011_ctx;
volatile bool transmitting;
} versal_pl011_context;
extern const rtems_termios_device_handler versal_uart_handler;
#define VERSAL_UART_DEFAULT_BAUD 115200
int versal_uart_initialize(rtems_termios_device_context *base);
void versal_uart_reset_tx_flush(rtems_termios_device_context *base);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_ARM_XILINX_VERSAL_UART_H */

View File

@@ -1,45 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64XilinxVersal
*
* @brief This header file provides functionality for the tm27 test.
*/
/*
* Copyright (C) 2021 Gedare Bloom <gedare@rtems.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_TMTEST27
#error "This is an RTEMS internal file you must not include directly."
#endif
#ifndef __tm27_h
#define __tm27_h
#include <dev/irq/arm-gic-tm27.h>
#endif /* __tm27_h */

View File

@@ -1,60 +0,0 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64XilinxVersal
*
* @brief This source file contains the implementation of bsp_start().
*/
/*
* Copyright (C) 2021 Gedare Bloom <gedare@rtems.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
#include <rtems/score/basedefs.h>
RTEMS_WEAK uint32_t versal_clock_i2c0(void)
{
return VERSAL_CLOCK_I2C0;
}
RTEMS_WEAK uint32_t versal_clock_i2c1(void)
{
return VERSAL_CLOCK_I2C1;
}
void bsp_start( void )
{
bsp_interrupt_initialize();
rtems_cache_coherent_add_area(
bsp_section_nocacheheap_begin,
(uintptr_t) bsp_section_nocacheheap_size
);
}

Some files were not shown because too many files have changed in this diff Show More