Age | Commit message (Collapse) | Author |
|
The errata is worked around in the kernel without requiring toolchain
modifications. It is triggered the JMPL/RETT return from trap instruction
sequence never generated by the compiler and. There are also other
conditions that must must be true to trigger the errata, for example the
instruction that the trap returns to has to be a JMPL instruction. The
errata can only be triggered if certain data is corrected by ECC
(inflicted by radiation), thus it can not be triggered under normal
operation. For more information see:
www.gaisler.com/notes
Affected RTEMS target BSPs:
* GR712RC
* UT699
* UT700/699E
The work around is enabled by defining __FIX_LEON3_TN0018 at build time
for the leon3 BSP.
In general there are two approaches that the workaround uses:
A) avoid ECC restarting the RETT instruction
B) avoid returning from trap to a JMPL instruction
Where A) comes at a higher performance cost than B), so B) is used
where posssible. B) can be achived for certain returns from trap
handlers if trap entry is controlled by assembly, such as system calls.
A)
A special JMPL/RETT sequence where instruction cache is disabled
temporarily to avoid RETT containing ECC errors, and reading of RETT
source registers to "clean" them from incorrect ECC just before RETT
is executed.
B)
The work around prevents JMPL after system calls (TA instruction) and
modifies assembly code on return from traps jumping back to application
code. Note that for some traps the trapped instruction is always
re-executed and can therefore not trigger the errata, for example the
SAVE instruction causing window overflow or an float instruction causing
FPU disabled trap.
RTEMS SPARC traps workaround implementation:
NAME NOTE TRAP COMMENT
* window overflow 1 - 0x05 always returns to a SAVE
* window underflow 1 - 0x06 always returns to a RESTORE
* interrupt traps 2 - 0x10..1f special rett sequence workaround
* syscall 3 - 0x80 shutdown system - never returns
* ABI flush windows 2 - 0x83 special rett sequence workaround
* sparc_disable_interrupts 4 - 0x80
* sparc_enable_interrupts 4 - 0x8A
* syscall_irqdis_fp 1 - 0x8B always jumps back to FP instruction
Notes:
1) no workaround needed because trap always returns to non-JMPL instruction
2) workaround implemented by special rett sequence
3) no workaround needed because system call never returns
4) workaround implemented by inserting NOP in system call generation. Thus
fall into 1) when workaround is enabled and no trap handler fix needed.
Any custom trap handlers may also have to be updated. To simplify that,
helper work around assembly code in macros are available in a separate
include file <rtems/score/grlib-tn-0018.h>.
|
|
Not used by the driver itself, but shuold be correct if used by
application.
|
|
In shared interrupt systems it might be a problem to handle the interrupt
regardless of the interrupt is enabled. Now the same approach to the
DMA RX/TX interrupt in the ISR is taken.
|
|
|
|
|
|
Missed to enable interrupt per TX descriptor. Could lead to TX buffer
starvation.
|
|
When the DMA table has been allocated dynamically, the IOCTL_SET_PACKETSIZE
will trigger an issue where pDev->rx and pDev->tx are not updated with
the new DMA tables base address. Instead the old pointers are used.
There is no point in reallocting the DMA tables because there is no
configuration option to it. Therefore the DMA tables allocation is
moved to a separate function never called from SET_PACKETSIZE.
|
|
This update means that the defualt leon3 BSP build flags will enable
all LEON3 devices errata work-arounds. The pre-compiled RTEMS kernel
libraries will thus be compatible with UT699, GR712RC, UT700 and
UT699E.
As before, to generate faster code the leon3.cfg shuold be updated
with the optimial settings for the target deviuce and RTEMS kernel
rebuilt.
|
|
The default LEON3 BSP build flags will now be SPARCv7 UT699
soft-float, for ISA compatibility and to activate all errata work
arounds. The pre-built BSP libraries will now be compatible with
the Cobham LEON3 chips (GR712RC, UT699, UT699E, UT700, RTAX) and
with LEON4 too. The flags used are now:
-mcpu=v7 -mtune=ut699 -msoft-float
|
|
See GRLIB-TN-0009: "LEON3FT Stale Cache Entry After Store with Data
Tag Parity Error".
|
|
- Fixed grspw_dma_tx_send() so that it does not fail when an empty user packet
is provided.
- Added empty checks on some of the list handling inline functions for
GRSPW_PKT. Their use by the driver may be correct already, but the user might
not have been aware of the assumptions that certain lists had to be non-empty.
|
|
Without this patch time code interrupts was never cleared
in the STATUS register.
|
|
By introducing a spearate RX and TX DMA channel semaphore RX
operations and TX operations does not block each other. Stopping
a DMA channel needs now to take both RX and TX semaphores to
block out both RX and TX tasks.
|
|
|
|
The user has already the power to control which DMA buffer
will generate interrupt, but no clean way to enable RX/TX
interrupts on DMA channel. Without this patch the user had
to init DMA config rx/tx_irq_en_cnt to a very large value.
|
|
* Add support for reading the GRSPW TX/RX descriptor counters
directly.
* Add semaphore lock to counters to avoid couters being out
of sync
* This makes it possible for the user in polling mode to check
the amount of work before entering RX/TX descriptor table
processing.
|
|
The user is now responsible to stop and close the DMA channels
before closing the device. To prevent complicated situations and
blocking the caller of grspw_close and grspw_dma_close a return
code was added to indicate to the user that the DMA may not have
been stopped or that blocked tasks are still active within the
driver for the specified device.
|
|
|
|
|
|
|
|
Added functionality for manual handling of link status events,
configurable via grspw_link_ctrl.
Added statistics counter for disconnect error.
|
|
Improved the link error handling options. Its now possible to
disable the link on individual link errors/warnings instead of
always on all or none.
Changed name of LINKOPTS_IRQ to LINKOPTS_EIRQ to match Linux
and VxWorks SpW driver.
|
|
|
|
|
|
|
|
|
|
NOTE that this will change the association of /dev/occanN
with OCCAN[N] device to the same order as in hardware. This means
that if you have been useing /dev/occan0 before you have to use
/dev/occan1 on a dual OCCAN device system (this affects GR712RC).
|
|
The EN bit (enable separate node address for this channel) is preserved when
grspw_dma_start is called. This preserves any previous address configuration.
|
|
There was a mixup between the transmit descriptor Link error (LE) bit and
Interrupt enable (IE) bit. TXPKT_FLAG_LINKERR now correctly indicates the link
error condition.
|
|
|
|
|
|
The fix does not affect the driver since the bit definitions
were never used by the GR5133B drivers. However it could affect
and application using the definitions.
|
|
|
|
|
|
|
|
Added External datation registers to the GRSPWTDP register description.
|
|
|
|
|
|
|
|
|
|
added clock cycles after GRSPW reset to make sure CTRL.START bit
write actually have an effect. Wait until reset is completed.
|
|
|
|
Update: Daniel Hellstrom updated SpW-IRQ implementation accoring to
changes in hardware register layout and features.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|