<feed xmlns='http://www.w3.org/2005/Atom'>
<title>threadx.git/ports/risc-v64/gnu/src, branch dev</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/threadx.git/atom/ports/risc-v64/gnu/src?h=dev</id>
<link rel='self' href='http://cgit.235523.xyz/threadx.git/atom/ports/risc-v64/gnu/src?h=dev'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/'/>
<updated>2026-09-15T21:17:26Z</updated>
<entry>
<title>Normalized the AI disclosure comment to one fixed line per file (#740)</title>
<updated>2026-09-15T21:17:26Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-09-15T21:17:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=9e4c57138dfa004cd512b60259c1c5047a8b3dd1'/>
<id>urn:sha1:9e4c57138dfa004cd512b60259c1c5047a8b3dd1</id>
<content type='text'>
The per-edit disclosure named the product and model, so every agent and every
model version appended another line. 74 files carried two to four of them, and
the same five products had accumulated 13 spellings -- Copilot against GitHub
Copilot, Claude Sonnet 4.6 against claude-sonnet-4.6, four spellings of Codex.
Twenty assembly lines carried a doubled comment marker, `; //` or `@ //`.

Every file now carries exactly one line, fixed text naming no product:

    Portions of this file were generated with AI assistance.

It is written with the comment character that file already uses, so the `;`
and `@` assembly files keep theirs and the doubled markers are gone. Precise
attribution stays on the commit, where the Assisted-by trailer is per-change,
dated and attached to the diff it describes. A header line cannot hold that
record honestly, because the code it names gets rewritten and the line stays.
A file-level flag answers whether; the history answers who.

Comment-only. 455 files, 455 insertions and 574 deletions: every removed line
was a disclosure line, every added line is the fixed text, and no file is left
with zero or with more than one. `scripts/check_ports.sh` passes, including the
reproducibility check that would catch a ports_arch master and its generated
copies drifting apart. Recompiled against dev, every file that builds without a
vendor toolchain gives a byte-identical object: 19 of 19 C files under common,
100 of 100 GNU assembly files, and all 16 assemblable files whose comment
marker changed. The 10 remaining marker changes are ac5 and IAR sources where
`;` already started the comment and only the redundant `//` was removed.

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Added lazy FPU stacking and QEMU functional tests for RV64 GNU port (#549)</title>
<updated>2026-09-09T20:25:28Z</updated>
<author>
<name>Wei-Chen Lai</name>
<email>douhualu6@gmail.com</email>
</author>
<published>2026-09-09T20:25:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=850a172bac0d26bedf8d92768e880d1613527f84'/>
<id>urn:sha1:850a172bac0d26bedf8d92768e880d1613527f84</id>
<content type='text'>
* add lazy FPU stacking to context save/restore

Save mstatus/sstatus to stack slot 29 and skip floating-point register
save/restore when FS is Off (bits 14:13). This avoids unnecessary FP
context work for threads that do not use the FPU.

- context_save: check FS in nested and first-level interrupt paths
- context_restore: gate FP restore on nested, no-preempt, and preempt paths
- use sstatus when TX_RISCV_SMODE is defined, otherwise mstatus

* add QEMU virt CMake build and automated test runner
Wire the QEMU virt demo into the CMake build system and add a
Python/GDB functional test runner, mirroring the risc-v32/gnu port.
- Add qemu_virt/CMakeLists.txt to build kernel.elf and register the
  check-functional-riscv64 target (requires Python3; skipped if absent)
- Link kernel.elf with --whole-archive so all ThreadX symbols resolve
- Pin _start at 0x80000000 via .text.boot in entry.s and
  KEEP(*(.text.boot)) in link.lds
- Extend demo_threadx.c with fpu_test_val and shorten thread_0 sleep
  for GDB-driven FPU, timer, and preemption checks
- Add test/azrtos_test_tx_gnu_riscv64_qemu.py; verified passing on
  QEMU virt (FPU, timer interrupt, preemption)

* Clean up RV64 PR scope and remove QEMU test integration leftovers

Revert accidental RV64 qemu_virt test/CMake integration changes and keep this branch
focused on lazy FPU context handling only. Also remove unintended TX_RISCV_SMODE-based
mstatus/sstatus save path and align comments/logic to mstatus-only behavior.

* Initialize mstatus.FS in RV64 stack build so new threads start with clean FP state

Slot 29 was left uninitialized while context restore reads it as an FP-live
hint; garbage FS bits could make a new thread inherit the previous thread's
floating-point registers.

* Add RV64 regression test for the FP state of a newly created thread

The test dirties every floating point register, then creates a thread and
checks that the stack builder wrote the mstatus slot and that the new
thread starts with all floating point registers zeroed. It is registered
for RV64 only, since the RV32 stack builder still leaves the slot unwritten.

* Completed the RISC-V64 lazy FPU so the restore side matches the save side

The lazy FPU save in this branch skips the floating-point stores when
mstatus.FS is Off, and records the mstatus it judged that on in frame slot
29. Merged onto current dev, only the save side had that treatment: both
restore paths and the scheduler's interrupt-frame path still reloaded the
FP registers unconditionally, from slots the save had deliberately left
alone. A thread that never touched the FP unit would have had whatever the
frame happened to contain loaded into its registers, and FS driven to
Dirty on the way out.

The guard is added at the three places that consume an interrupt frame:
both paths in _tx_thread_context_restore, and _tx_thread_schedule_loop.
Each reads slot 29 and skips the FP block when FS was Off, which is the
same shape the risc-v32 port already uses.

The solicited path is deliberately left alone. _tx_thread_system_return
saves the callee-saved FP registers unconditionally, so restoring them
unconditionally is consistent; making that pair lazy as well is a separate
change, and risc-v32 is the model for it.

Verified with QEMU on all five configurations:

  risc-v64   96 of 96 passing, five configurations, nothing unlinkable
  risc-v32   95 of 95 passing, five configurations, unchanged
  functional check-functional-riscv64 passes every check

The ninety-sixth test is the one this branch adds. It is load bearing:
seeding stack build with FS = Off instead of Initial makes it fail, and
restoring the seed makes it pass, so it guards the behaviour the rest of
this branch is about rather than passing regardless.

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: r &lt;r@r&gt;
Co-authored-by: Frédéric Desbiens &lt;frederic.desbiens@eclipse-foundation.org&gt;</content>
</entry>
<entry>
<title>riscv64: spec compliance and regression test fix (#698)</title>
<updated>2026-09-09T13:26:11Z</updated>
<author>
<name>Akif Ejaz</name>
<email>akifejaz40@gmail.com</email>
</author>
<published>2026-09-09T13:26:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=164f211a01f6bc756c6620ec8ca55f4ccf9f6041'/>
<id>urn:sha1:164f211a01f6bc756c6620ec8ca55f4ccf9f6041</id>
<content type='text'>
* spec compliance

Signed-off-by: Akif Ejaz &lt;akifejaz40@gmail.com&gt;

* revert the demo changes

Signed-off-by: Akif Ejaz &lt;akifejaz40@gmail.com&gt;

* Restored the FPU demo hook so the RISC-V64 functional test can pass

The new check-functional-riscv64 target verifies FPU context switching by
watching fpu_test_val advance by 1.1f on each pass through
thread_6_and_7_entry. The GDB script deliberately treats a missing symbol
as a failure rather than silently skipping the check, but the demo no
longer defined it, so the target failed on every run:

    FPU_VERIFIED_FAIL_NO_SYMBOL

The definition and the increment are restored, matching what the risc-v32
demo already carries. The functional target now passes end to end.

Three small corrections are folded in:

- tx_port.h carried a comment stating that the ISA string must include
  Zicsr, but nothing enforced it, so an rv64imac build failed with a wall
  of assembler "unrecognized opcode" errors. It now stops at one clear
  diagnostic.
- Removed TX_RISCV_TRAP_CALL_FRAME_SIZE, which nothing referenced.
- The example .gitignore listed qemu-riscv32.log, but the runner writes
  qemu-riscv64.log, so the generated log showed up as an untracked file.

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;

---------

Signed-off-by: Akif Ejaz &lt;akifejaz40@gmail.com&gt;
Co-authored-by: Frédéric Desbiens &lt;frederic.desbiens@eclipse-foundation.org&gt;</content>
</entry>
<entry>
<title>Fixed the clobbered return address in the RISC-V context save (#696)</title>
<updated>2026-09-03T18:17:49Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-09-03T18:17:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=d7789f0b1261fe897e2cdc5a525cfa06011dd35f'/>
<id>urn:sha1:d7789f0b1261fe897e2cdc5a525cfa06011dd35f</id>
<content type='text'>
_tx_thread_context_save() returns to its caller with ret, which uses the
return address held in ra. When TX_ENABLE_EXECUTION_CHANGE_NOTIFY was
defined, the call to _tx_execution_isr_enter overwrote ra with the address
of the instruction following the call, so the subsequent ret returned into
_tx_thread_context_save itself instead of the interrupt service routine.

The return address is now saved on the stack around the call and recovered
afterwards, which is the same idiom already used by the Arm ports. The fix
covers all three affected paths (nested save, thread save and idle system
save) in the risc-v32 GNU, risc-v32 IAR and risc-v64 GNU ports.

Fixes #348

Assisted-by: Copilot (Opus 5) &lt;noreply@github.com&gt;</content>
</entry>
<entry>
<title>Reverted ULONG to be 4 bytes long, fixing missaligment issue in the current port (#534)</title>
<updated>2026-05-25T20:12:33Z</updated>
<author>
<name>Christos Papadopoulos</name>
<email>papadopoulos.chris@icloud.com</email>
</author>
<published>2026-05-25T20:12:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=5b1b740a6610ae3434da9fc2cd55f390f7619429'/>
<id>urn:sha1:5b1b740a6610ae3434da9fc2cd55f390f7619429</id>
<content type='text'>
* Reverted RISCV-64 port

* Fixed wrong load/store instructions used</content>
</entry>
<entry>
<title>Added RISC-V board Bananapi BPI-F3 (SpacemiT K1 SoC) BSP Support  (#531)</title>
<updated>2026-05-25T19:59:17Z</updated>
<author>
<name>Akif Ejaz</name>
<email>akifejaz40@gmail.com</email>
</author>
<published>2026-05-25T19:59:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=c7d4b2f22869f1f06a99599d4ccfe201b0496f82'/>
<id>urn:sha1:c7d4b2f22869f1f06a99599d4ccfe201b0496f82</id>
<content type='text'>
* Add BananaPi BPI-F3 BSP support

Add RISC-V supervisor support to the rv64/gnu port and
provide a complete board support package for the BananaPi BPI-F3
(SpacemiT K1 SoC, X60 cores).

Port changes (risc-v64/gnu):
- Guard all CSR accesses with TX_RISCV_SMODE to select S-mode registers
  (sstatus/sepc/sie/sret) vs M-mode (mstatus/mepc/mie/mret) in
  context_save, context_restore, schedule, system_return,
  interrupt_control, and stack_build.
- Add S-mode TX_INT_ENABLE/TX_DISABLE and inline TX_RESTORE macros
  to tx_port.h.
- Add TX_RISCV_SMODE CMake option to CMakeLists.txt.

BananaPi BPI-F3 BSP (example_build/bananapi-f3):
- Boot flow: FSBL → OpenSBI (M-mode) → U-Boot (S-mode) → ThreadX
- S-mode trap handler with context save/restore integration
- SBI legacy ecall timer at 10 Hz (24 MHz timebase)
- PLIC driver with S-mode context, stale-IRQ drain, and callbacks
- PXA-compatible UART0 console (115200 8N1)
- Linker script at 0x200000 load address

Tested on risc-v board, BananaPi BPI-F3 hardware.

Signed-off-by: Akif Ejaz &lt;akif.ejaz@10xengineers.ai&gt;

* Fixed S-mode context restore and PLIC spurious IRQ handling

- tx_thread_context_restore.S (non-nested path): set SPIE(0x20) alongside
  SPP(0x100) so sret re-enables interrupts in the restored thread.
- tx_thread_context_restore.S (both S-mode paths): use FS=Dirty (0x6000)
  instead of FS=Initial (0x2000) to match tx_thread_schedule.S and prevent
  FP register corruption across context switches.
- plic.c (plic_irq_intr): return early when plic_claim() yields 0 (no
  pending interrupt) to avoid completing a spurious IRQ ID 0, which is
  undefined behavior per the PLIC spec.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;

---------

Signed-off-by: Akif Ejaz &lt;akif.ejaz@10xengineers.ai&gt;
Co-authored-by: Frédéric Desbiens &lt;frederic.desbiens@eclipse-foundation.org&gt;
Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fixed MPIE being cleared leading to have interrupts being disable after an mret instruction (#522)</title>
<updated>2026-05-13T13:00:54Z</updated>
<author>
<name>Christos Papadopoulos</name>
<email>papadopoulos.chris@icloud.com</email>
</author>
<published>2026-05-13T13:00:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=0dd6d28afb54c17eae485fa8e7c9e6a7999353ff'/>
<id>urn:sha1:0dd6d28afb54c17eae485fa8e7c9e6a7999353ff</id>
<content type='text'>
* Fixed MPIE being cleared leading to have interrupts being disable when returning from machine mode

* Removed wrong register operand and replaced by immediate value</content>
</entry>
<entry>
<title>Merge pull request #508 from goodnorning/feature/rv64_rvv_support</title>
<updated>2026-04-14T13:26:33Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-04-14T13:26:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=a0dc185f669afaf633d363996df21ed354dbcfb1'/>
<id>urn:sha1:a0dc185f669afaf633d363996df21ed354dbcfb1</id>
<content type='text'>
Added rv64 rvv support</content>
</entry>
<entry>
<title>RISC-V64 arch. port support RVV Extension;</title>
<updated>2026-04-07T03:41:33Z</updated>
<author>
<name>shuta.lst</name>
<email>shuta.lst@alibaba-inc.com</email>
</author>
<published>2026-03-04T02:51:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=2f1fc5291827ee1b4279237646a2bc808a299896'/>
<id>urn:sha1:2f1fc5291827ee1b4279237646a2bc808a299896</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Updated copyright headers and version number constants (#509)</title>
<updated>2026-03-05T09:46:30Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-03-05T09:46:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=c3259a216026372e3833dd8996a68f77e8595fbd'/>
<id>urn:sha1:c3259a216026372e3833dd8996a68f77e8595fbd</id>
<content type='text'>
* Updated version number constants

* Removed revision history from all files

* Added Eclipse ThreadX contributors' copyright header </content>
</entry>
</feed>
