Commit Graph

12728 Commits

Author SHA1 Message Date
Sebastian Huber
e1f446d3c1 bsps/sparc: Set best baud in APBUART driver
This prevents failures of all tests using rtems_shell_wait_for_input(),
e.g. capture, termios, pppd, etc.
2014-07-09 15:56:43 +02:00
Christian Mauderer
8448a4defc bsps/sparc: Move APBUART printk support 2014-07-09 12:07:49 +02:00
Sebastian Huber
21abc43fb5 bsps/sparc: Add and use shared APBUART console
Move the APBUART console driver support to the shared SPARC area so that
it can be reused by other BSPs.  Only the console driver initialization
is now BSP specific.
2014-07-09 12:07:49 +02:00
Sebastian Huber
a0eb21ebab bsps: Basic console driver for Termios devices 2014-07-09 12:07:49 +02:00
Sebastian Huber
fbda4a8834 score: PR2183: Fix context switch on SMP
Fix context switch on SMP for ARM, PowerPC and SPARC.

Atomically test and set the is executing indicator of the heir context
to ensure that at most one processor uses the heir context.  Break the
busy wait loop also due to heir updates.
2014-07-04 13:17:19 +02:00
Sebastian Huber
7ab6046a62 bsp/altera-cyclone-v: Move MMU configuration table
This makes it possible to use application specific version.
2014-07-01 15:30:07 +02:00
Sebastian Huber
9eb1994fd2 bsps/arm: Rename bsp_mm_config_table
Rename bsp_mm_config_table to arm_cp15_start_mmu_config_table and
rename bsp_mm_config_table_size to arm_cp15_start_mmu_config_table_size
to be in line with the other names in <bsp/arm-cp15-start.h>.
2014-07-01 15:23:04 +02:00
Sebastian Huber
516a60a6f8 bsps/sparc: Reduce copy and paste 2014-07-01 10:25:27 +02:00
Daniel Hellstrom
47cf1adda9 LEON3: devfs free nodes must be sized
.. according to the maximum number of termios ports which is
8. Since LEON3 uses PnP to find how many UARTs there are
present we must make sure worst case work.

The current maximum of 4 free nodes caused for example the
GR712RC with its 6 UARTs to fail during devfs02 test.
2014-06-30 15:45:02 +02:00
Daniel Hellstrom
9f99232e4b LEON3: fix console close handling
On SMP rtems_interrupt_lock_context must be used. Most tests fail with a
NULL pointer exception when exiting, except on NGMP where main memory is
at 0x00000000.
2014-06-30 15:45:02 +02:00
Sebastian Huber
970aa80fe1 bsp/realview-pbx-a9: Fix SMP startup 2014-06-12 13:00:47 +02:00
Martin Galvan
cb42c9a242 lm3s6965-testsuite.cfg: Add pppd.
When trying to compile RTEMS for the Stellaris LM3S6965 board, I had an
issue of pppd.exe's .rodata section being too big to fit in the board's
memory image (region 'ROM_INT' overflowed).
2014-06-10 09:48:54 -05:00
Martin Boretto
19260fbe85 bsp/lpc176x: New BSP 2014-06-10 08:53:36 +02:00
Sebastian Huber
c1072919fa Revert "bsps/powerpc: Fix potential relocation truncation"
This reverts commit d9ff8b3e68.

It is not that simple:

https://sourceware.org/ml/binutils/2014-06/msg00062.html

On Fri, Jun 06, 2014 at 01:31:48PM +0200, Sebastian Huber wrote:
> On 2014-06-06 13:23, Sebastian Huber wrote:
> >Ok, so this "cmplwi cr0, rX, ppc_exc_lock_std@sdarel" is illegal,
> >since
> >ppc_exc_lock_std@sdarel is signed and the immediate is unsigned
> >16-bit?  The
> >assembler doesn't issue a warning about this.
> >
> >Exists there a way to rescue this cmplwi hack without relaxing the
> >overflow
> >checks?
>
> Hm, sorry, it was surprisingly simple.  This works:
>
> "cmplwi cr0, rX, ppc_exc_lock_std@sdarel@l"
>
> I was not aware that you can add several @ in a row.

That is the wrong thing to use here.  sdarel@l translates to a VLE
reloc which applies to a split 16-bit field in VLE insns.

You want
 cmpwi cr0, rX, ppc_exc_lock_std@sdarel
to properly compare a 16-bit signed number from sym@sdarel.

Note that the assembler does error if you write something like
 cmplwi 3,-30000
or
 cmpwi 3,40000
so what the linker is now doing is extending this behaviour to link
time.
2014-06-06 14:54:37 +02:00
Sebastian Huber
d9ff8b3e68 bsps/powerpc: Fix potential relocation truncation
See also

https://sourceware.org/ml/binutils/2014-06/msg00059.html

On Fri, Jun 06, 2014 at 11:01:10AM +0200, Sebastian Huber wrote:
> I performed a git bisect and found this:
>
> 93d1b056cb396d6468781fe0e40dd769891bed32 is the first bad commit
> commit 93d1b056cb396d6468781fe0e40dd769891bed32
> Author: Alan Modra <amodra@gmail.com>
> Date:   Tue May 20 11:42:42 2014 +0930
>
>     Rewrite ppc32 backend .sdata and .sdata2 handling

Hmm, I'm surprised that your git bisect found this patch.  Was
_SDA_BASE_ set differently before this?

>                 0x00000000000dfc00                _SDA_BASE_
>                 0x00000000000d7f78                ppc_exc_lock_std

>      4b8:       28 05 00 00     cmplwi  r5,0
>                         4ba: R_PPC_SDAREL16     ppc_exc_lock_std

ppc_exc_lock_std@sdarel will be calculating 0xd7f78 - 0xdfc00
which is 0xf...fff8378, and that falls foul of

commit 86c9573369616e7437481b6e5533aef3a435cdcf
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Mar 8 13:05:06 2014 +1030

    Better overflow checking for powerpc32 relocations

cmplwi has an *unsigned* 16-bit field, and we now check the overflow
properly.

I wonder how many more of these we'll hit, and whether the uproar will
be enough that I'll be forced to relax the checks?
2014-06-06 13:39:55 +02:00
Sebastian Huber
dc44de7686 bsps/arm: Fix TLB invalidation for ARMv7-A 2014-06-06 08:02:10 +02:00
Sebastian Huber
c19342a767 bsps/arm: Fix Cortex-A9 MPCore clock driver
The nanoseconds extension returned wrong values on secondary processors
since some of the global timer registeres are banked.  Use global
variables instead.
2014-06-06 08:02:10 +02:00
Sebastian Huber
1468d70f79 bsp/altera-cyclone-v: Enable unified L2 cache 2014-06-06 08:02:10 +02:00
Sebastian Huber
2a1d86c6bf bsp/altera-cyclone-v: Move SMP support 2014-06-06 08:02:10 +02:00
Sebastian Huber
40599e7e86 bsps/arm: Change L2 cache initialization
Do not touch the L1 caches since they have been initialized by the start
hooks.
2014-06-06 08:02:09 +02:00
Sebastian Huber
8fb685b7a3 bsp/altera-cyclone-v: Simplify start hooks
Use arm_a9mpcore_start_hook_0().  The L2 cache is now disabled.
2014-06-06 08:02:09 +02:00
Sebastian Huber
330ccc5f65 bsp/altera-cyclone-v: Change default baud
Use value for standard U-Boot.
2014-06-06 08:02:09 +02:00
Sebastian Huber
82054c8052 bsp/altera-cyclone-v: Use NOLOAD for nocache sec 2014-06-06 08:02:09 +02:00
Sebastian Huber
9fa88124ef bsp/altera-cyclone-v: Simplify MMU config table 2014-06-06 08:02:08 +02:00
Sebastian Huber
2d3caccf86 bsps/arm: Define ARM_CP15_TEXT_SECTION
Define ARM_CP15_TEXT_SECTION to BSP_START_TEXT_SECTION so that the
start code is in the right section.
2014-06-06 08:02:04 +02:00
Sebastian Huber
66a2409d30 bsps/arm: Add ARM_CP15_TEXT_SECTION
Allow users of this header file to optionally place the inline functions
into a non-standard section.
2014-06-05 14:55:16 +02:00
Sebastian Huber
44fbca379a bsps/arm: Simplify L1 caches support
Delete superfluous/incorrect interrupt disable/enable.
2014-06-05 14:55:16 +02:00
Sebastian Huber
d0a8f513f5 bsps/arm: Add all level data cache invalidation 2014-06-05 14:55:16 +02:00
Sebastian Huber
def03aecef bsps/arm: Typo 2014-06-05 14:55:16 +02:00
Sebastian Huber
82850b8e82 bsps/arm: Cortex-A9 MPCore start
Invalidate entire branch predictor array.
2014-06-05 14:55:16 +02:00
Sebastian Huber
e87ccf547b bsps/arm: Cortex-A9 MPCore start
Enable SCU only on the boot processor.
2014-06-05 14:55:16 +02:00
Sebastian Huber
b938108b3d bsps/arm: Cortex-A9 MPCore start
Add arm_a9mpcore_start_enable_smp_in_auxiliary_control().
2014-06-05 14:55:16 +02:00
Sebastian Huber
041bf16fd4 bsps/arm: Simplify Cortex-A9 MPCore start
Add arm_a9mpcore_start_on_secondary_processor().  Rely on error checks
in _SMP_Start_multitasking_on_secondary_processor().
2014-06-05 14:55:16 +02:00
Daniel Hellstrom
537f7271b3 LEON2: enable exception prinout by default 2014-06-05 09:34:51 +02:00
Daniel Hellstrom
8343aa414c LEON3: enable exception prinout by default 2014-06-05 09:34:51 +02:00
Daniel Hellstrom
a20c114f4a GRETH: remove TCP/UDP HW checksum generation
The GRETH doesn't support IP fragments.
2014-06-05 09:34:51 +02:00
Christian Mauderer
8df1f408fd score/sparc: Add support for paravirtualization
Guest systems in paravirtualization environments run usually in user
mode.  Thus it is not possible to directly access the PSR and TBR
registers.  Use functions instead of inline assembler to access these
registers if RTEMS_PARAVIRT is defined.
2014-06-03 08:35:47 +02:00
Joel Sherrill
36601543db mrm332: Tests now build and fewer warnings 2014-06-01 18:18:28 -05:00
Joel Sherrill
6ddc4dab20 m68k/shared/misc/memProbe.c: Add prototype to eliminate warning 2014-06-01 18:18:00 -05:00
Chris Johns
4d5845824e bsps/gdbarmsim: Add the missing bspstarthooks.c. 2014-05-30 09:11:30 +10:00
Daniel Hellstrom
d6f1ec91b6 SPARC: syscall optimizations and PSR-write fix
The last optimization missed was incorrect in regards to
PSR write instruction delay must be 3 instructions.

New optimizations:
 * align to 32-byte cache line.
 * rearrange code into three "blocks" of 4 instructions that
   is executed by syscall 2 and 3. This is to optimize for
   16/32 byte cache lines.
 * use delay-slot instruction in trap table to reduce by one
   instruction.
 * use the fact that "wr %PSR" implements XOR to reduce by
   one instruction.
2014-05-28 17:33:22 +02:00
Daniel Hellstrom
70eff78971 LEON3: coding style clean bsp_irq_fixup() 2014-05-28 17:33:22 +02:00
Daniel Hellstrom
3a76d83098 LEON3: add support for IRQ16..31 for CPU!=0 2014-05-28 17:33:22 +02:00
Chris Johns
5b45d51a59 bsps: Do not build tests that require a tick interrupt.
The following BSPs do not have tick support so the tests fail:

 arm1136jfs
 arm1136js
 arm7tdmi
 arm920
 armcortexa9 (does not run any more)
 avrtest
 h8sim
 h8sxsim
 m32csim
 m32rsim
 moxiesim
 simsh1
 simsh2
 simsh4
 v850e1sim
 v850e2sim
 v850e2v3sim
 v850esim
 v850essim
 v850sim

This list was provided by Joel in the following post:

 http://www.rtems.org/pipermail/rtems-devel/2014-April/006526.html
2014-05-28 23:44:26 +10:00
Ralf Kirchner
7280fe3f24 bsp/altera-cyclone-v: Cleanup 2014-05-28 15:01:37 +02:00
Ralf Kirchner
12a4d08553 bsp/altera-cyclone-v: Reduce size of nocache heap
Network mbufs and clusters now are cached. Thus the nocache heap can get reduced to 1 MByte.
2014-05-28 15:01:31 +02:00
Ralf Kirchner
bb70bea198 bsp/altera-cyclone-v: Cache mbufs and clusters 2014-05-28 14:59:01 +02:00
Ralf Kirchner
32c8960925 bsp/altera-cyclone-v: Enable L2 cache for network driver 2014-05-28 14:59:01 +02:00
Ralf Kirchner
dda78f43d5 bsp/altera-vyclone-v: Broadcast cache maintenances 2014-05-28 14:59:01 +02:00
Ralf Kirchner
5fd4e35f9b bsp/arm: Broadcast cache maintenances 2014-05-28 14:59:01 +02:00