The Error Active frame populates the TX and RX error counter bytes
but does not set CAN_ERR_ID_CNT.
Set CAN_ERR_ID_CNT so consumers know the counter fields are valid.
The RX overflow handling writes REG_COMMAND_CDO to CTUCANFD_TX_COMMAND
instead of CTUCANFD_COMMAND.
This writes the CDO bit to the transmit-command register (which is
reserved) so the data-overrun condition is not actually cleared.
Use CTUCANFD_COMMAND instead.
The RX overflow handling uses CAN_ERR_ID_LOSTARB, which is an
err_frame.header.can_id mask, as an err_frame.data index.
Correct it to use CAN_ERR_DATA_BYTE_TRX_CTRL as intended.
This patch reverts the deletion of the static method which is
intended to compute CRC32 on the U-Boot environment variables.
The function bsp_uboot_environ_check_crc() should be made functional,
not deleted.
Updates #5660.
Added the tms570_pin_config_prepare and tms570_pin_config_complete helper
calls to tms570_bsp_pin_set_function and tms570_bsp_pin_clear_function
which are required to unlock the IOMM and enable write access.
Added comment next to IOMM kick register unlock codes to make the source
and purpose of the magic numbers clear.
Also disabled interrupts during the operation for this small critical
section, as does the similar function tms570_bsp_pin_config_one.
This clarifies the flashdev out of band read and write interfaces and
updates any consumers of those interfaces. This was partially refactored
at one point and the refactoring didn't extend to the consumers as it
should have.
The mailbox property interface frequently needs to walk variable-sized
property tags contained within a mailbox property message. Add
rpi_get_next_tag() to encapsulate the required pointer arithmetic.
_CPU_Spin_wait() is an assembly function which prevents
aggressive speculative execution by the CPU during spin-wait
loops. Added benefit is reduction of thermal load.
Closes rtems/rtos/rtems#5643
_CPU_Spin_wait() is an assembly function which prevents
aggressive speculative execution by the CPU during spin-wait
loops. Added benefit is reduction of thermal load.
Closes rtems/rtos/rtems#5644
_CPU_Spin_wait() is an assembly function which prevents
aggressive speculative execution by the CPU during spin-wait
loops. Added benefit is reduction of thermal load.
Closes rtems/rtos/rtems#5642
Add smpspinwait01 to thoroughly exercise the new _CPU_Spin_wait()
architectural hint and compiler memory barrier in concurrent SMP
environments.
The test validates:
- Read-Shared bus contention: Verifies that a master core broadcast
wake to secondary cores spinning on a shared cache line cleanly
transitions to exclusive ownership without bus lockups.
- Compiler memory barrier enforcement: Spins on a non-volatile
shared flag to prove RTEMS_COMPILER_MEMORY_BARRIER() prevents
compiler optimization levels >= -O2 from hoisting loads into
core-local registers, avoiding SMP deadlocks.
- MESI cache-line bouncing: Executes a multi-core ring token pass
for 5,000 iterations per core. This forces continuous Modified-to-
Invalid cache invalidation traffic across the interconnect while
cores execute the architecture-specific spin-wait hint.
This patch introduces the `_CPU_Spin_wait()` function to the `no_cpu`
architecture template and adds the corresponding Doxygen documentation
for the CPU Architecture Supplement.
_CPU_Spin_wait() is an assembly function which prevents
aggressive speculative execution by the CPU during spin-wait
loops. Added benefit is reduction of thermal load. This
function is part of the Deterministic Hedged Read Library API.
When creating utf8 or default converters, if memory allocation or
initialization fails, 'self' becomes NULL. Returning '&self->super'
results in a NULL pointer dereference, which is Undefined Behavior
in C. This updates the code to explicitly check for NULL before
returning.
The previous fix has exposed more breakage if internal
SRAM self-tests is run when code starts from Flash
or external memory. The previous negated option has
disabled SRAM self-test in these cases and enabled
it for code running from SRAM which lead to code
self-clear.
But when code is running from Flash and full safety
should be achieved then then SRAM test run through
nested function
/* ESRAM Single Port PBIST */
tms570_pbist_run_and_check( 0x08300020U,
(uint32_t) PBIST_March13N_SP )
lead to situation when lr and r3 could not be
restored in return from this function.
Memory content has been overwritten by tests.
When this problem has been solved then next
problem is that memory with enabled ECC has
been unsynchronized and attempt to load already
overwritten lr and r3 in tms570_start_hook_0
has led to data-abort and fatal error with error
pin set till next power cycle.
The solution is to synchronize, reinitialize
internal SRAM after PBIST test.
Yer another problem is run of ECC failure detection
tms570_check_tcram_ecc
It fails with unrecoverable data abort as well
because for proper function it requires special
support in data-abort exception handler which
is not present on RTEMS.
Closes rtems/rtos/rtems#5547
Signed-off-by: Pavel Pisa <ppisa@pikron.com>
This commit adds 'HAS_UBOOT' conditional to 'bsp_uboot_getenv' to match
the bsp.h file.
This fixes the following errors:
error: home/tester/bsps/powerpc/shared/u-boot/uboot_getenv.c:73:13:
error: no previous prototype for 'bsp_uboot_getenv'
[-Werror=missing-prototypes]
Updates #5481
Previous commit removed the stale reserved PACT1 macro and added
TMS570_PBIST_PACT_ENABLE for enabling the PBIST internal clocks.
Use the new macro in tms570_selftest.c instead of raw writes.
The supported LS31x and LC43x variants define only PACT0 in the
PBIST PACT register. Bits 31:1 are reserved.
Remove the stale TMS570_PBIST_PACT_PACT1 macro. Add
TMS570_PBIST_PACT_ENABLE so callers can enable the PBIST
internal clocks without using a raw literal.
calls to tms570_irq_set_priority protect against requesting a
priority < 2, but not against inputs with vector < 2.
for example calling tms570_irq_set_priority(ESM_HIGH, 10)
will not only get through the guard, it will attempt to write
to CHANCTRL0 (which gets blocked by hardware), puts whatever
was there (apparently hardcoded INT-REQ0) into channel 10,
and returns success.
So the channel 10 request dissappeared from the VIM channel
map completely - yet this call returns RTEMS_SUCCESSFUL
TRM (for both TMS570LS31x and TMS570LC43x) states:
NOTE: CHAN0 and CHAN1 are hard wired to INT_REQ0 and
INT_REQ1, so they cannot be remapped.
This commit puts a guard to fail on requests with vector < 2.
uboot_environment and uboot_environment_size are configured through
build options UBOOT_ENV_BASE and UBOOT_ENV_SIZE.
Support for powerpc/qoriq is added.
For qoriq boards with u-boot, user can use the same environment
access fuctions shared with other bsps like gen83xx.
Closes#5481
The RTC driver used the unsupported BSD-style %b conversion with
only the diagnostic register value. This did not provide the
intended bitmask decoding.
Print the diagnostic register as a two-digit hexadecimal value
instead and remove the unused RTCDG_BITS definition.
The block logic uses realloc to resize memory used by libdebugger
when creating a snapshot of threads. Thread registers take a
reference to the block and if a realloc changes the base address
any references are invalid. Add rebase handler support to blocks
that is called when the block base changes and add a handler to
thread register blocks to rebase a thread's registers.
Exclude threads using both types of names they can have. This lets
all names be reported in extra thread info packets.
Closes#5635