The red-black tree of the score used <rtems/score/bsd-tree.h>, an import
of the FreeBSD <sys/tree.h> of 2020. FreeBSD replaced this red-black
tree by a rank-balanced tree, so the header has no upstream any more.
The macros of the header generated the functions of the tree. Most of
the header, such as the splay tree, served no code of RTEMS.
Translate each macro which the score uses into a static inline function
of <rtems/score/rbtree.h> or <rtems/score/rbtreeimpl.h>. Each field of
a node gets a getter and a setter. The body of each generated function
moves into the function which called it. Each statement of a macro maps
to one statement of the translation. Remove the header with its unused
parts and keep its copyright in each file which receives its code. The
node keeps its layout and its field names, and the colors keep their
names.
The test sptree01 checked that the RTEMS_ prefixed macros of the header
did not clash with the macros of <sys/tree.h>. It ran no check at
runtime. Remove the test with the header.
The tests sprbtree01 and ts-unit-no-clock-0 passed on the boards of
eight targets.
Target Processor
aarch64/zynqmp_apu Cortex-A53
LS1046A Cortex-A72
arm/zynqmp_rpu_lock_step Cortex-R5F
arm/samrh71_flexram Cortex-M7
arm/xilinx_zynq_zc702 Cortex-A9
riscv/mpfs_e51 E51
riscv/mpfs_u54 U54
sparc/gr740 LEON4
Update #5804.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The thread queues and the watchdogs order their elements in red-black
trees. No test measured the runtime of the tree operations.
Add a runtime measurement test for the insert, the extract, the
minimum, the successor and the replace. The tree sizes cover the
special paths of one to three nodes and grow by a factor of about 2.6
up to 233 nodes. One operation takes 30 ns to 250 ns on the boards,
and the counter of some boards has a step of 10 ns or more. One sample
therefore covers the operation in each of 16 trees of the same shape.
Update #5804.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Move common APIC register definitions to a shared
bsps/include/bsp/apic.h header and keep architecture
specific definitions in respective BSP headers,
aviudubg cross BSP dependencies.
Standardize LAPIC register access in pc386 to use array
indexing and LAPIC_REGISTER_* definitions. Rename
architecture-specific symbols to BSP-neutral names and
standardize APIC base access.
Fixes#5516
Move the PCIe initialization logic to a helper function and derive
the PCIe address ranges from the device tree when a PCIe node is
present. If the node is not available, fall back to the previous
static PCIe MMU mappings to preserve existing BSP behaviour.
This removes the ZYNQMP_MMU_PCIE_ENABLE option and avoids hardcoded
PCIe mappings while maintaining compatibility with existing users.
Fixes#5510
No test triggered the fatal errors of leon3_check_ipi_vector(). With
the interrupt map, the default configuration cannot trigger them.
Add the two test suites which the fatal error specifications generate.
Each defines LEON3_mp_irq. With the interrupt map, it selects a bus
line which no driver uses and maps that bus line before the BSP reads
the interrupt map. Without the interrupt map, it selects an invalid
vector or an extended controller line.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
No test checked that a bus line whose map entry is zero is associated
with no interrupt vector.
Add the test case which the specification of invalid interrupt map
entries generates. Build it in the BSP validation test suite of the
GR740 and the GR765, which use the interrupt map.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
leon3_irqmap_set() is new, and no test checked it.
Add the test case which the specification of leon3_irqmap_set()
generates. Build it beside the test cases of the other interrupt map
functions.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
No test checked what leon3_ext_irq_init() writes to the interrupt
controller and to the interrupt map copy.
Add the test case which the specification of leon3_ext_irq_init()
generates. Build it beside the test case of leon3_irqmap_get().
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The validation test suite checked no LEON3 interrupt map function.
Add the test case which the specification of leon3_irqmap_get()
generates. Build it in the BSP validation test suite of the GR712RC,
the GR740 and the GR765.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP sent the inter-processor interrupt on bus line 14 and followed
the interrupt map. The GR765 reset map maps bus line 14 to controller
line 1, which the DMA controllers use. The GR765 keeps the controller
lines 13 and 14 free after reset. No peripheral drives bus line 0.
Add the option LEON3_IPI_BUS_LINE for the initial value of
LEON3_mp_irq. It is 0 for the GR740 and the GR765, and 14 otherwise.
With a map, map bus line 0 in the copy to the controller line defined
by the new option LEON3_IPI_CONTROLLER_LINE, which is 14 by default.
Accept vector 0 where its map entry is not zero. Let the shared memory
driver force the controller line of LEON3_mp_irq.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP assumed 64 bus lines for every chip with an interrupt map. The
GR740 has 32 bus lines in eight map registers. The BSP read the
undefined offsets 0x320 to 0x33C, and vector 32 passed as valid, so
ts-validation-intr failed on the GR740. The GR765 has 64 bus lines.
A map field is eight bits wide. A field value above 31 indexed past
the dispatch table of 32 entries and made the bit shifts undefined.
Replace the option LEON3_IRQAMP_IRQMAP by LEON3_IRQMAP_BUS_LINE_COUNT,
which is 32 for the GR740 and 64 for the GR765. With an interrupt map,
an interrupt vector is a bus line. The vector count is then the bus
line count, and the dispatch table keeps one entry for each controller
line. Bound each map entry by the dispatch table, so that a hardware
fault cannot index past it.
The description of LEON3_IRQAMP_EXTENDED_INTERRUPT named an interrupt
line and did not say which kind. Call it a controller line, the term
which the other options use.
The extended interrupt raise test took a vector for its controller
line. It raised 1U << vector for vectors up to the count, which is
undefined from 32 on. Its specification item did not exist.
Regenerate the test from the new item. It raises the mapped controller
line of each vector which maps to an extended controller line. It
checks that it exercised each extended controller line.
Close#5786.
Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The hurricane, rbtx4925 and rbtx4938 BSPs excluded dl01 to dl13. The
exclusion dates from 2015 and answers a link failure of dl01. The
build of that era passed the compiler flags to rtems-syms as a string
and let the tool call the compiler. The string lost -EL, so the tool
built a big endian object for a little endian target and the link
rejected it.
The waf build runs rtems-syms with -S, which writes a C source file,
and compiles that file itself with the flags of the BSP. The flag
cannot get lost.
Drop the exclusion of the three BSPs. Twelve tests return, because
dl13 belongs to arm. The other users of the item keep it.
No simulator runs these three BSPs, so the link is the only evidence
available. The link is what the report named.
Update #2279.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Nothing checked that the context switch, interrupt processing and the
exception resume of the MIPS port keep the register sets which the ABI
requires. Three defects of the port reached the test suite unseen.
The interrupt return dropped the status register. The exception path
saved a floating point data register in place of the control register.
The exception resume left the call-saved registers as the fatal error
chain left them.
Add three test cases from the specification items
spec/score/cpu/mips/val/context, spec/score/cpu/mips/val/interrupt and
spec/score/cpu/mips/val/resume. Each case loads a distinct pattern
into every register of its set, runs the operation and takes a trap.
The frame of that trap reports what the operation left behind. So no
register under test carries the address of the store-out.
The cases join ts-validation-no-clock-0. That suite needs no clock
driver, and the interrupt case raises the software interrupt of the
processor through the TM27 support.
Update #5754.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The port had no _CPU_Exception_resume(). A fatal error extension
which inspects an exception frame could not continue the interrupted
context. Every exception therefore ended the system.
The chain which reaches such an extension ends in a fatal error. No
function of that chain returns, so no function of it puts a call-saved
register back. _Terminate() also clears the interrupt enable before
it calls the extensions. The frame is the only source of s0 to s7 and
of the interrupt level.
Add the routine. It restores the registers which the interrupted
context owns and continues at the exception program counter of the
frame. The header comment of the file names the registers which it
leaves out and the reason for each.
Update #5754.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The exception codes occupied the interrupt vectors below
MIPS_INTERRUPT_BASE. A handler reached them through
rtems_interrupt_handler_install(), which passes a vector number and no
frame. mips_vector_exceptions() therefore stored the frame in the
global mips_exception_frame around the dispatch, and
bsp_interrupt_handler_default() read it back. That global is a hidden
argument of the dispatch. Two processors which take an exception at
the same time overwrite it, so the port cannot support SMP in that
form.
Give the port its own registration. mips_exc_set_handler() installs
the handler of one exception code and the handler takes a
CPU_Exception_frame pointer. ppc_exc_set_handler() of the PowerPC
port is the model. The default handler calls rtems_fatal() with
RTEMS_FATAL_SOURCE_EXCEPTION and the frame.
bsp_interrupt_is_valid_vector() rejects every vector below
MIPS_INTERRUPT_BASE, so the interrupt manager owns none of them.
An application which installed a handler on an exception vector with
rtems_interrupt_handler_install() moves to the new call.
MIPS_INTERRUPT_BASE keeps its value. No BSP renumbers its interrupt
vectors.
Update #5752.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP linked the stubs of bsps/mips/shared/irq/irqstubs.c, so
rtems_interrupt_raise(), rtems_interrupt_clear(),
rtems_interrupt_is_pending() and rtems_interrupt_vector_enable()
returned RTEMS_UNSATISFIED or did nothing for every vector.
RtemsIntrReqEntryInstall scanned for a vector which it can raise,
found none and used the vector count as a vector. Every directive
then returned RTEMS_INVALID_ID. ts-validation-intr reported 638
failed steps from this alone.
The dispatcher of the BSP printed a line for six of the eight sources
of the processor. It did not pass them to the interrupt manager, so a
handler of them was never called.
Give the BSP its own implementation. The two software interrupts of
the processor carry raise and clear through the cause register. The
mask of the status register carries enable and disable of the sources
of the processor. The cascade of the south bridge carries them for
its own lines. The dispatcher passes every source of the processor to
the interrupt manager and keeps the decode of the south bridge.
The base of that implementation needs three repairs. Each vector
number expands to a sum with no brackets around it. A subtraction of
one therefore adds the terms of the sum.
BSP_irq_enabled_at_i8259s() returns a bitwise complement which is
never zero. Eight vectors name address and data lines of the PCI
bus. Such a line reaches the processor through the south bridge.
Bracket every vector number. Return whether the cache bit is clear.
Remove the eight vectors of the PCI bus and the four aliases which
name them. Replace the note which describes the interrupt controller
of another board with the order of the vectors.
Update #5742.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP linked the software CPU counter of bsps/shared and the clock
driver set CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER. The counter counted
the calls to _CPU_Counter_read() and not the time.
rtems_counter_delay_nanoseconds() therefore delayed by a count of
calls. getentropy() took no entropy from the time. The uptime
advanced once per clock tick, so nothing resolved an interval below
the tick and spintrcritical08 never reached the window it aims at.
The count register of the coprocessor is a free running up counter of
the full width. The clock driver already takes the tick from the
compare register beside it. Read that register as the CPU counter and
install it as the timecounter. It runs from the reset of the
processor. A reader therefore needs no initialization of it, and a
system without a clock driver gets the counter as well.
Update #5742.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit separates the mvme2100 BSP out of the motorola_powerpc area
+ Apply clang-format
+ Fix OpenPIC initialization
+ Add configuration for MVME2600
Updates #5731
This commit separates the mvme2100 BSP out of the motorola_powerpc area
+ Add libi2c support for mvme2100
+ Apply clang-format
+ Use EEPROM-based VPD reading
+ Remove dependance on PPCBug's residual memory
+ Fix DBAT overlap in initialization
Updates #5731
This commit separates the mvme5100 BSP out of the motorola_powerpc area
+ Add libi2c support for mvme5100
+ Apply clang-format
+ Use EEPROM-based VPD reading
+ Remove dependance on PPCBug's residual memory for VPD
Updates #5731
The functions test_cat(), test_extend(), and test_write() were
used in multiple tests but the source was not in a shared location.
Building with LTO exposed that the prototypes for the shared
test_cat() did not always match the real signature. Making these
shared and prototyped in a header file resolves this.
Closes#5739
The BSP excluded twenty four interrupt critical tests with no reason
recorded. The exclusion predates the interrupt controller support of
the BSP, and the test framework does not need that support anyway: it
drives its interrupts from a watchdog on the clock tick.
All twenty which the build produces pass.
Close#5690.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP had no time source apart from the clock tick. The TX3904 has
three timers, one of which is the tick, so run a second one as a free
running up counter: it wraps at the width of its counter, needs no
interrupt to carry a period and a reader never sees it go backwards.
Both timers use the same divider, which ties the counter frequency to
the clicks per clock tick.
Start it in a system initialization handler rather than in the clock
driver. The benchmark timer and getentropy() read the counter and
neither of them needs the clock driver, so a test which configures the
benchmark timer alone would otherwise read a counter which never runs.
The benchmark timer of the BSP drove the same timer with its own
register writes. It is the standard implementation on top of the CPU
counter now, which is where the register knowledge belongs.
Update #5690.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The CPU port listed the placeholder of no_cpu, which counts up by one
per read and reports a frequency of one gigahertz. A BSP with real
counter hardware could not replace it: the definition is linked with the
CPU port, so a second one collides. Every other architecture leaves the
CPU counter to the BSP for this reason.
Use the identical placeholder of the BSP layer in the six mips BSPs
instead. Nothing changes for them, but the way to a real counter is
open.
Update #5690.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Move Local APIC initialization, IPI, and utility functions out of
smp-imps.c into a file bsps/i386/shared/irq/apic.c for lapic driver.
This decouples the LAPIC driver from the MPS table parsing code.
- Add apic.c with lapic_initialize(), lapic_enable(), lapic_send_ipi(),
lapic_clear_errors(), lapic_reset_and_start_ap(), and lapic_reset_ap()
- Extend apic.h with LAPIC register offset macros, inline helpers
lapic_get_id() and lapic_send_eoi(), and function declarations
- Add accessor functions lapic_get_cpu_index(), lapic_get_lapic_id(),
lapic_set_cpu_index(), and lapic_set_lapic_id() to encapsulate
the CPU/APIC ID mapping tables
- Replace IMPS_LAPIC_READ/WRITE macros with direct register access
through the i386_lapic_base pointer
- Remove send_ipi(), imps_lapic_addr, and related globals from
smp-imps.c and smp-imps.h
- Update bspsmp.c and asm.h to use the new LAPIC API
While this refactoring centralizes the Local APIC implementation behind
a common interface for C code, some assembly paths continue to access
LAPIC state directly (e.g. CPU identification through i386_lapic_base
and i386_lapic_to_cpu_map). These accesses are retained to preserve the
existing assembly interface and can be revisited in a follow-up change
if the assembly is refactored to use a different mechanism.
Closes#5518
The iconv tests are compile only tests and build here without a
complaint. The interrupt critical tests were excluded while the BSP
had no interrupt support, which it has now. All of them pass.
Close#5684.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP used the default of bsps/shared/irq/irq-default.c, where every
operation returns RTEMS_UNSATISFIED and there is one vector, so no
device interrupt could be used and ts-validation-intr reported 208
failed steps.
Implement the programmable interrupt controller of the architecture
with its 32 inputs. The inputs are level triggered, so the dispatch
acknowledges a source after its handler served the device.
The controller cannot raise an interrupt in software, its status
register can only be cleared. The transmit holding register of the
UART is always empty, because the console driver polls, so enabling the
interrupt of that condition raises the interrupt of the UART. The
validation test needs a second vector which it can raise and which no
handler occupies, and takes it from TM27_INTERRUPT_VECTOR_ALTERNATIVE.
The alarm of the real time clock of the virtual machine serves as that
one. Its registers are little endian while the processor is big
endian.
ScoreIsrValIsr wraps bsp_interrupt_dispatch(), so a BSP which defines
that function has to provide the wrapper as well. Without it
ts-validation-intr does not link.
Update #5684.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The driver declared a cycle time of 10 nanoseconds, which is 100 MHz,
while the tick timer of Qemu counts at 20 MHz for the or1k-sim and the
virtual machine alike. See TIMER_PERIOD in hw/or1k/cputimer.c. The
timecounter therefore ran at a fifth of the real rate.
The period was a constant of 0x09ED9 counts and ignored the configured
microseconds per tick, so the system time advanced at a rate which had
nothing to do with the configuration. Derive it from the configured
value and the timer frequency. The result is computed once, because the
tick handler must not need a 64-bit division.
The timer ran in restart mode, which resets the counter at every period,
and it did not run at all until the driver programmed it. An
application without a clock driver read a counter which never moved, and
_CPU_Counter_frequency() was the no_cpu placeholder and claimed 1 GHz.
Run the timer in continue mode, so that the counter is free running, and
start it from a system initialization item of its own. The counter is
the CPU counter and the timecounter of this BSP.
The timer compares the time period with the low 28 bits of the counter.
A time period which the counter passed matches only after the counter
runs through the field, which takes 13 s at this frequency. Take the
counter as the base of the next tick when the handler is late. Hold the
interrupts off while the handler reads the counter and writes the
period, so that nothing extends the distance between the two.
Update #5684.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
No AArch64 BSP can disable the data cache. The port raises
INTERNAL_ERROR_CANNOT_DISABLE_DATA_CACHE for every BSP, because they
all use bsps/aarch64/shared/cache/cache.c. The build selected the test
case which expects the directive to work for every AArch64 BSP except
xilinx-zynqmp, so ts-validation-cache terminated with that fatal error.
Select the test case by the architecture. The arm condition is
unchanged.
Built and run for aarch64/a53_lp64_qemu on Qemu. ts-validation-cache
passes with the change and fails without it.
Close#5721.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The linker command file had no output section for the .noinit input
sections. The linker placed them as orphans in input order. The two
marker symbols were equal, so the region was empty and the object
control blocks lay outside it. _Memory_Dirty_free_areas() and
_Memory_Zero_free_areas() wrote nothing, and sp54 found no pattern in
the initial objects.
Add the section between .rtemsstack and .work, as the shared linker
command base does. SORT_BY_NAME sorts .noinit.rtems.begin before the
content and the content before .noinit.rtems.end.
Built and run for microblaze/petalogix_s3adsp1800 on Qemu. sp54 passes
with the change and fails without it.
Close#5722.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP linked the software CPU counter of bsps/shared. That counter
counts the calls to _CPU_Counter_read() and not the time.
rtems_counter_delay_nanoseconds() therefore delayed by a count of
calls. getentropy() took no entropy from the time.
The AXI timer of this BSP has two counters and the clock driver uses
the first. Run the second as a free running up counter of the full
width and read it as the CPU counter. It wraps at the width of the
counter, so it needs no interrupt to carry a period. A reader never
sees it go backwards. The CPU counter step of the system
initialization starts it, so a system without a clock driver gets the
counter as well.
The tm27 support of the timing tests uses the second counter where
the interrupt controller accepts no request in software. That test
takes the counter for its duration.
Close#5726.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The i386 CPU port linked the software CPU counter of
cpukit/score/cpu/no_cpu. That counter counts the calls to
_CPU_Counter_read() and not the time.
rtems_counter_delay_nanoseconds() therefore delayed by a count of
calls. ts-validation-timecounter-1 installs a timecounter which
takes its count from rtems_counter_read() and its frequency from
rtems_counter_frequency(), so that test failed and carried an
expected-fail state.
The processors of this BSP family have a time stamp counter and the
clock driver already measured its frequency for the timecounter.
Read that counter as the CPU counter. Measure its frequency in the
CPU counter step of the system initialization, so a system without a
clock driver gets the counter as well. The measurement uses channel
2 of the 8254, which software gates and which drives no interrupt, so
the tick source on channel 0 stays untouched. A processor without a
time stamp counter keeps the software counter.
Drop the expected-fail state of ts-validation-timecounter-1.
Update #5728.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The x86_64 CPU port linked the software CPU counter of
cpukit/score/cpu/no_cpu. That counter counts the calls to
_CPU_Counter_read() and not the time.
rtems_counter_delay_nanoseconds() therefore delayed by a count of
calls. getentropy() took no entropy from the time.
The BSP reads the time stamp counter for its timecounter and measures
the frequency of that counter beside the local APIC timer. That
measurement runs with the interrupt facility, which is later than the
CPU counter step of the system initialization. Move the measurement
into the CPU counter support and read the time stamp counter as the
CPU counter. A system without a clock driver gets the counter this
way as well.
Close#5729.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The interrupt controller operations were not implemented. Every one of
them returned RTEMS_UNSATISFIED, so ts-validation-intr reported 2511
failures, most of them because rtems_interrupt_vector_is_enabled() must
work for every valid vector.
Drive the controller of the TX3904. A source passes when its level in
the interrupt level registers is greater than the level in the interrupt
mask register, so the level is both the priority and the enable, and the
vector numbers of the BSP are the source numbers of the controller. A
bit of the interrupt status register reads as zero while its source is
asserted. The two software interrupts of the processor are raised and
cleared in the cause register and are the only sources this board can
raise.
The sources which do not pass the controller are masked in the status
register, which the context of every thread enables completely, so they
report as enabled and nothing disables them.
The other BSPs of the architecture keep the operations which are not
implemented, now in their own file.
Thirteen failures remain. They need a vector which the validation tests
can raise and also enable and disable, and this board has none: the
status register belongs to the context of a thread, so a disable of a
software interrupt would not survive a context switch.
Update #5688.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The BSP used the shared reset loop, so Qemu kept running after the
system terminated. An automated test never ended and every test of the
suite hit its timeout.
The virtual machine of Qemu provides a SiFive test finisher. Write the
pass or fail value to it in bsp_reset() and keep the loop for the
or1k-sim machine, which has no such device.
Update #5687.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The two routines were empty, so the validation task of spcontext01 spun
in a loop which checked nothing.
The zero register, the stack pointer, the global pointer and the k0 and
k1 of the exception handler stay out of the pattern, and so do the
registers of the FPU, which need it enabled in the status register of
the coprocessor.
Close#5691.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The test was excluded with a null reason. It executes
_CPU_Instruction_illegal() and needs the port to trap it and report
RTEMS_FATAL_SOURCE_EXCEPTION with a printable exception frame, which the
port did not do until the exception reporting was fixed. It passes now.
Update #5691.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
The two routines were empty, so the validation task of spcontext01 spun
in a loop which checked nothing.
The floating point context of this port is the control word of the x87
unit and the control and status register of the SSE unit, and it exists
only in an SSE build. Only their rounding mode carries the pattern, so
that no exception is unmasked and the precision does not change.
Close#5697.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
ScoreIsrValIsr checks that the context which an interrupt during the
multitasking start interrupted ran on the stack of the thread which was
running. A wrapper of the interrupt dispatch of the architecture takes
the address of that stack, and there is one for six architectures only.
Everywhere else the address stays zero, the check cannot pass, and it
reports nothing but a line number, which says neither that the
architecture is unsupported nor what was expected.
Add the wrapper for mips, i386 and x86_64, and say in the check what a
zero address means, so that the next port is told why it fails rather
than left to find out.
The frame which the mips dispatch receives is built on the stack of the
interrupted context, so the address of the frame is an address within
that stack. Its stack pointer member is not used. Only the path which
the debugger stub takes fills it, and the interrupt path leaves it zero.
The two x86 ports keep the frame base of the interrupted context in the
frame pointer register and may then switch to the interrupt stack, so
the wrapper has to take the value before the compiler establishes a
frame of its own. A register variable does not do that, because the
compiler emits its prologue first and the wrapper then reads its own
frame. They get the same treatment as sparc, which has the problem for
the same reason.
Close#5712.
Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>