summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-14leon,tn-0018: work around GRLIB-TN-0018 erratarcc-v1.2.24rcc-1.2Daniel Hellstrom
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>.
2020-05-14grlib,grspw_pkt: correct link state enum numberingDaniel Hellstrom
Not used by the driver itself, but shuold be correct if used by application.
2020-05-14GRSPW_PKT: ISR activate shutdown work only if errintr enabledDaniel Hellstrom
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.
2020-05-14GRSPW_PKT: fix descriptor table memory leak on grspw_close()Daniel Hellstrom
2020-05-14GRSPW_PKT: add missing GRSPW1 IP-core supportDaniel Hellstrom
2019-04-05leon, greth: 10/100 MAC enable TX BD interruptDaniel Hellstrom
Missed to enable interrupt per TX descriptor. Could lead to TX buffer starvation.
2019-04-05grspw: fix for SET_PACKET_SIZEDaniel Hellstrom
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.
2017-11-30leon3: build-cfg enables all errata work-aroundsrcc-v1.2.23rcc-v1.2.22Daniel Hellstrom
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.
2017-02-13leon3: pre-compiled LEON3 BSPs use SPARCv7 UT699 compiler flagsrcc-v1.2.21rcc-v1.2.20crcc-v1.2.20bDaniel Hellstrom
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
2016-10-04ERRATA-FIX: Change assembler sequence that can cause stst erratarcc-v1.2.20Daniel Cederman
See GRLIB-TN-0009: "LEON3FT Stale Cache Entry After Store with Data Tag Parity Error".
2016-04-12leon, grspw_pkt: Added checks for special list casesrcc-v1.2.19Daniel Hellstrom
- 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.
2016-04-08leon, grspw_pkt: fix stscfg cfg TimeCode Int clrrcc-1.2-scheduled-8aprDaniel Hellstrom
Without this patch time code interrupts was never cleared in the STATUS register.
2016-04-07leon, grspw_pkt: split DMA sem into RX and TX semDaniel Hellstrom
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.
2016-04-07leon, grspw_pkt: coding style fixDaniel Hellstrom
2016-04-04leon, grspw_pkt: allow user controlled DMA intrDaniel Hellstrom
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.
2016-04-04leon, grspw_pkt: support for reading tx/rx DMA queueDaniel Hellstrom
* 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.
2016-03-29leon, grspw_pkt: fixed device/dma closingDaniel Hellstrom
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.
2016-03-29leon, grspw_pkt: coding style fixupsDaniel Hellstrom
2016-03-29leon, grspw_pkt: fixed and improved RX/TX waitDaniel Hellstrom
2016-03-29leon, grspw_pkt: fixed error return path in dma_openDaniel Hellstrom
2016-03-22leon, grspw_pkt: Manual handling of link status eventsDaniel Hellstrom
Added functionality for manual handling of link status events, configurable via grspw_link_ctrl. Added statistics counter for disconnect error.
2016-03-22leon, grspw_pkt: added link_ctrl optionsDaniel Hellstrom
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.
2016-03-22leon, grspw_pkt: added grspw_link_status_clr() to APIDaniel Hellstrom
2016-03-22leon, grspw_pkt: code style clean-upsDaniel Hellstrom
2016-03-21leon: GPTIMER start/reset must take RS and IP into accountDaniel Hellstrom
2016-03-21leon: RMAP tid_msb must be used as unsignedDaniel Hellstrom
2016-03-21leon: Fix ambapp_bus OCCAN device registeration orderDaniel Hellstrom
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).
2015-10-27GRSPW_PKT: Preserve DMA address enable at start.Martin Aberg
The EN bit (enable separate node address for this channel) is preserved when grspw_dma_start is called. This preserves any previous address configuration.
2015-10-20GRSPW_PKT: Fixed txpkt flag for link errorMartin Aberg
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.
2015-08-03RMAP: Correct allocation of rmap_async_priv.Martin Aberg
2015-06-30GRSPW_PKT: Fixed parameter check in grspw_dma_open()Martin Aberg
2015-04-13GR1553B: RT status words register declarations fixDaniel Hellstrom
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.
2015-03-23GR1553B: comment cleanuprcc-v1.2.18Daniel Hellstrom
2015-03-23LIBPCI: cleanupDaniel Hellstrom
2015-03-23grspw: rxPktSize must set DMA RX max lengthDaniel Hellstrom
2015-01-26SPWTDP: External datation registersMartin Aberg
Added External datation registers to the GRSPWTDP register description.
2014-11-04GRTM: fixed descriptor TS bit declarationrcc-v1.2.17Daniel Hellstrom
2014-11-04GRSPW_PKT: grspw_status renamed in headerDaniel Hellstrom
2014-08-08GR-RASTA-TMTC,rev1: add GRGPIO[0] register initDaniel Hellstrom
2014-08-08B1553BRM: change the init of the RT legalization registersDaniel Hellstrom
2014-05-02GRSPW: added clock cycles after GRSPW resetrcc-v1.2.16Daniel Hellstrom
added clock cycles after GRSPW reset to make sure CTRL.START bit write actually have an effect. Wait until reset is completed.
2014-03-07SPWTDP: clear interrupt status on interruptrcc-v1.2.15Daniel Hellstrom
2014-03-07GRSPW_PKT: Add support for Interrupt-codesAndreas Larsson
Update: Daniel Hellstrom updated SpW-IRQ implementation accoring to changes in hardware register layout and features.
2014-03-07LEON PCI: fix for PCI host bridge driver CFG space accessDaniel Hellstrom
2014-03-07SPWTDP: add driver registration to drvmgrDaniel Hellstrom
2014-03-07LIBPCI: make pci_print print slot0 on bus0Daniel Hellstrom
2014-03-07RMAP: added new asynchonous interfaceDaniel Hellstrom
2014-03-07SPWTDP: updated driver against updated HW specDaniel Hellstrom
2014-01-27GRSPW: Fix incorrect register defines - presently functionally inconsequentialAndreas Larsson
2014-01-10LIBPCI: removed unused codeDaniel Hellstrom