| Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
recommendation.
|
|
ppc403 interrupt control libcpu component.
|
|
|
|
1. Rtems contains some perl scripts that use hard-coded paths to
/usr/bin/perl or /usr/local/bin/perl I have already fixed these
problems by adding some checks to configure.in. While doing this,
I also cleaned up some more autoconf related problems for generating
shell scripts. This patch might seem a bit scary to you, but I am
quite confident it won't break something (I've been testing it for
almost a week now, however it might introduce typos for a limited
number configurations I don't have access to - But it shouldn't be
a problem for you to test them :-).
I expect to get this finished tonight, hence you will very likely
have the patch when you get up tomorrow.
Changes:
* Check for PERL and disable all PERL scripts if perl wasn't found.
* Generate all KSHELL-scripts with autoconf instead of make-script
* Automatic dependency handling for autoconf generated KSHELL or PERL
scripts (make/rtems.cfg)
Notes:
* this patch contains new files and deletes some other files.
* The patch is relative to rtems-4.0.0-beta4 with my previous
rtems-rc-981014-1.diff patch applied.
Testing:
I tested it with sh-rtems and posix under linux. Now all targets
which are touched by this patch and which are not used while building
for sh-rtems and posix still need to be tested. AFAIS, only the
sparc/erc32 BSP should be affected by this criterion. And if you
like to, you should also consider testing it on a Cygwin32 and a
Solaris host for one arbitrary BSP.
|
|
|
|
|
|
|
|
cosmetic things.
|
|
|
|
|
|
|
|
|
|
POSIX API.
|
|
|
|
|
|
in include file order.
|
|
<raguet@crf.canon.fr>.
|
|
|
|
now installed from the shared directory.
|
|
Thanks to Rod Barman for this one.
|
|
|
|
information to this file to be more like the gen68360.
|
|
moves pieces of the pc386 bsp up to a shared level for all i386 BSPs
and modifies the i386ex BSP to use those shared pieces. Serial remote
debugging is included for both targets. Erik's notes:
There are several workarounds in it:
1) #define NEXT_GAS is hardcoded in pc386/start/start.s
2) #define NEXT_GAS is hardcoded in i386ex/start/start.s
3) #define NEW_GAS is hardcoded in pc386/start16.s
4) #undef __assert and redeclare _assert hardcoded in console.c for
both pc386 and i386ex due to my egcs1.1b ~ newlib problem. Should have
modified t-rtems.cfg ( no time )
I've tested pc386 with both video and serial consoles and GDB remote.
All work fine, except that GDB acts weird. ( re: other posting)
I hope this will work for you. It took quite some time to locate the
autoconf error. The remainder was just grunt work.
Unfortunately, I think I've unwound the removal of the IBMPCInitVideo
stuff. Sorry. I REALLY can't spend more time... I've been at this
conversion to 4.0 locally and updating the release since Sept. 8th, and
have yet to compile my network driver.... This is as much as I can do
right now.
I look forward to the next patch to really test i368ex. I did make sure
that the sample tests worked for pc386.
|
|
|
|
|
|
|
|
|
|
The reentrant versions of the malloc functions in
c/src/lib/libc/malloc.c
do not match the definitions in newlib. These will be used if you use
newlib routines such as fdopen. I believe this patch to malloc.c is
needed to provide the correct versions.
|
|
|
|
- c/src/exec/score/cpu/powerpc/ppc.h: some small changes
(added ppc403 characteristics like a exception vector prefix
register, some special register definitions). I am quite sure, they
are compatible with the existing sources, although I did not check
- c/src/exec/score/cpu/powerpc/cpu.c: There is one severe
limitation in the exception entries: Due to the current code
arrangement, the "branch absolute" to the ISR handler may only
jump to the first 128MByte or the last 128MByte of the 4GByte
address range. When the ppc403 is running out of ROM, the ROM
functions are located in the last 128MByte (0xFFF00000 and up).
These addresses were not handled correctly (sign reduced) in
"install_raw_handler". The change I added should work on existing
ppc BSPs aswell...
|
|
helas403 BSP.
|
|
Finally I am through: I have found the last bugs that made RTEMS-
4.0-beta3 start on my ppc403 board from ROM. So now the '403
support is up to date again.
Roughly I have added the following features:
- support for the on-chip interrupt controller (in a separate module)
- interrupt support for the console device
- termios support for the console device
==============================================
Since the BSP behaivour changed in some details (console no
longer is polling, other memory layout etc) I have created a new
BSP "helas403" rather than changing the "papyrus" BSP. The old
"polled" console driver still sticks around in "console.c.polled"
To get the BSP up and running, I had to create the new BSP files
(derived from papyrus). Besides that, the following source areas
have been changed:
- c/src/lib/libcpu/powerpc/ppc403: changes to console driver, small
changes to clock driver, new "ictrl" interrupt controller driver
- c/src/exec/score/cpu/powerpc/ppc.h: some small changes
(added ppc403 characteristics like a exception vector prefix
register, some special register definitions). I am quite sure, they
are compatible with the existing sources, although I did not check
- c/src/exec/score/cpu/powerpc/cpu.c: There is one severe
limitation in the exception entries: Due to the current code
arrangement, the "branch absolute" to the ISR handler may only
jump to the first 128MByte or the last 128MByte of the 4GByte
address range. When the ppc403 is running out of ROM, the ROM
functions are located in the last 128MByte (0xFFF00000 and up).
These addresses were not handled correctly (sign reduced) in
"install_raw_handler". The change I added should work on existing
ppc BSPs aswell...
- c/src/lib/libc/termios.c: During my tests, I added one change you
sent me, so this patch will already be incorporated in the current
source tree.
There are some smaller changes, see the attached diff file.
=========================================
Concerning the GNU toolchain:
I tried several tool chains. Finally I almost succeeded with
egcs-1.0.3a with patch egcs-1.0.3-rtems-diff-19980527
I had to add the following lines to the egcs files. Without them
configure complaint that the cross compiler could not generate
executable output.
- additional lines needed in egcs distribution in file
gcc/config/rs6000/rtems.h:
+++ lines start
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "ecrti.o%s"
#undef ENDFILE_DEFAULT_SPEC
#define ENDFILE_DEFAULT_SPEC "ecrtn.o%s"
++++ lines end
As far as I have seen in the Changelog of egcs, you have recently
sent two patches affecting the powerpc support, but they were
added in the wrong order.... :-(
egcs-19980628 with patch egcs-19980628-rtems-diff-19980707 does
not work!
I used binutils 2.9.1 with patch binutils-2.9.1-rtems-diff-19980515
(binutils 2.8.1 does not work, internal error in gas)
and newlib-1.8.0 with patch newlib-1.8.0-rtems-diff-19980707
Finally I had to poke a line in the "bit" script, since, on my LINUX
machine, the GNU make is only available as "make", not as
"gmake"...
For all the tools and newlib I selected configuration "powerpc-
rtems".
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: td@imd.m.isar.de
|
|
Finally I am through: I have found the last bugs that made RTEMS-
4.0-beta3 start on my ppc403 board from ROM. So now the '403
support is up to date again.
Roughly I have added the following features:
- support for the on-chip interrupt controller (in a separate module)
- interrupt support for the console device
- termios support for the console device
==============================================
Since the BSP behaivour changed in some details (console no
longer is polling, other memory layout etc) I have created a new
BSP "helas403" rather than changing the "papyrus" BSP. The old
"polled" console driver still sticks around in "console.c.polled"
To get the BSP up and running, I had to create the new BSP files
(derived from papyrus). Besides that, the following source areas
have been changed:
- c/src/lib/libcpu/powerpc/ppc403: changes to console driver, small
changes to clock driver, new "ictrl" interrupt controller driver
- c/src/exec/score/cpu/powerpc/ppc.h: some small changes
(added ppc403 characteristics like a exception vector prefix
register, some special register definitions). I am quite sure, they
are compatible with the existing sources, although I did not check
- c/src/exec/score/cpu/powerpc/cpu.c: There is one severe
limitation in the exception entries: Due to the current code
arrangement, the "branch absolute" to the ISR handler may only
jump to the first 128MByte or the last 128MByte of the 4GByte
address range. When the ppc403 is running out of ROM, the ROM
functions are located in the last 128MByte (0xFFF00000 and up).
These addresses were not handled correctly (sign reduced) in
"install_raw_handler". The change I added should work on existing
ppc BSPs aswell...
- c/src/lib/libc/termios.c: During my tests, I added one change you
sent me, so this patch will already be incorporated in the current
source tree.
There are some smaller changes, see the attached diff file.
=========================================
Concerning the GNU toolchain:
I tried several tool chains. Finally I almost succeeded with
egcs-1.0.3a with patch egcs-1.0.3-rtems-diff-19980527
I had to add the following lines to the egcs files. Without them
configure complaint that the cross compiler could not generate
executable output.
- additional lines needed in egcs distribution in file
gcc/config/rs6000/rtems.h:
+++ lines start
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "ecrti.o%s"
#undef ENDFILE_DEFAULT_SPEC
#define ENDFILE_DEFAULT_SPEC "ecrtn.o%s"
++++ lines end
As far as I have seen in the Changelog of egcs, you have recently
sent two patches affecting the powerpc support, but they were
added in the wrong order.... :-(
egcs-19980628 with patch egcs-19980628-rtems-diff-19980707 does
not work!
I used binutils 2.9.1 with patch binutils-2.9.1-rtems-diff-19980515
(binutils 2.8.1 does not work, internal error in gas)
and newlib-1.8.0 with patch newlib-1.8.0-rtems-diff-19980707
Finally I had to poke a line in the "bit" script, since, on my LINUX
machine, the GNU make is only available as "make", not as
"gmake"...
For all the tools and newlib I selected configuration "powerpc-
rtems".
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: td@imd.m.isar.de
|
|
test were suggested by Ian Taylor <ian@airs.com> and Joel did the
hard part of putting it in aclocal and editting all the offending
Makefiles and source code which could use this feature.
|
|
|
|
<ian@airs.com>:
The pc386 linker scripts omits .gnu.linkonce.r* sections. It's not a
big deal, but they should be treated like .rodata sections. ELF
versions of g++ generate them for static constants defined in template
classes, such as string::npos.
|
|
The pc386 linker scripts omits .gnu.linkonce.r* sections. It's not a
big deal, but they should be treated like .rodata sections. ELF
versions of g++ generate them for static constants defined in template
classes, such as string::npos.
|
|
I found that my 68040/68360 test programs would not run even after
I fixed the `wrong BSP' problem.
It seems that there's a bug in the interrupt handling code for
processors with hardware interrupt stacks (e.g. 68040). The wrong
status register was getting pushed on the stack for the `return
from exception' to call _ISR__Dispatch. This ended up making
the context switch code run on the interrupt stack, so interrupt-driven
context switches would always fail.
I guess that no one has tried running any of the RTEMS-4.0 snapshots
on a 68040 machine!
Anyhow, here are the patches for
1) gen68360.cfg --- to fix the `wrong-BSP' problem.
2) m68k/cpu_asm.s --- to fix the hardware interrupt stack problem.
With these patches in place, the network demo programs run on my
68040/68360 system. The paranoia program runs with no failures,
defects nor flaws.
|
|
Please find enclosed a patch which enables me to build the bare-bsp for
sh-rtems.
Changes:
1. Add preinstall to libbsp/bare/include/Makefile.in
2. Removed FORCEIT, add preinstall to
libbsp/sh/gensh1/include/Makefile.in
3. Disabled support of set_vector from sh code (shared/setvec.c is still
present but isn't used anymore), set_vector replaced with standard rtems
functions.
Problems still present:
1. Support of spin-delays in bare bsp
2. Proper support of cpu frequency
To configure I used:
<srcdir>/configure \
--target=sh-rtems \
--prefix=<instdir>/sh-bare \
--enable-bare-cpu-model=sh7032 \
--enable-bare-cpu-cflags='-Wall -m1 -DMHZ=20
-DCPU_CONSOLE_DEVNAME="\"/dev/null\""'
--enable-rtemsbsp=bare \
--disable-networking \
--disable-cxx \
--disable-posix \
--disable-tests
IMO, if there are no objections to this patch, a similar approach should
be applied to all CPUs/BSPs (esp. hppa1.1, mips64orion, ppc403, because
they apply set_vector inside of libcpu).
|
|
Remember the test to see if a socket could be read and written at
the same time by two different tasks? I discovered that if both
tasks attempt to close the socket a panic can occur from inside the
BSD code.
Closing the same socket twice from two different threads is
certainly an error, but a panic is not the greatest error reporting
method :-)
The following small change to the socket close routine should reduce
the chances of the panic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Please find attached a start.s that includes a cli prior to the hlt
instruction. This ensures that external interrupts cannot restart
the system after returning to the startup code. ( According to the hlt
docs, they will! )
Also find a new timer.c. ( I forgot to update the countdowm value
in the timer when I changed the PSCLK frequency in start.s) . This
improves timer accuracy.
The raw_idt_notify messages are no longer infinite, I tested sp11 and
sp05, both which were bad, and I have seen the message print once in
one test. I think it's ok if it prints out once. In fact, I don't
think you can effectively stop it!
|