Repository navigation
Conversation
|
Hi @parthitce. Thank you very much for this contribution! I should be able to review it next week. In the meantime, I authorised the CI run to please keep an eye on it. |
Sure, many thanks. |
fdesbiens
left a comment
There was a problem hiding this comment.
Thanks for adding the RH850 port and putting its QEMU suite in CI. I reproduced 96/96 passes in each of the 12 hard- and soft-float configurations, plus 96/96 with low power enabled. I could not test on hardware. The two code and CI concerns below need attention. Could you also provide measured line and branch coverage for the new port code, with an explanation of any uncovered paths?
| #define TX_DISABLE \ | ||
| { \ | ||
| interrupt_save = _tx_port_mask_get(); \ | ||
| _tx_port_mask_set(TX_INT_DISABLE); \ |
There was a problem hiding this comment.
Could TX_DISABLE preserve the stricter of the current PLMR value and TX_INT_DISABLE? For example, with TX_PORT_MAX_IPL=2, a caller can set PLMR to 0 to mask every EIINT, but a ThreadX service then writes 2 and temporarily unmasks priorities 0 and 1. A test with an already masked posture would help guard this path.
There was a problem hiding this comment.
Fixed, a stricter caller PLMR is kept now. Added mask_posture for it.
| --test-output-size-passed 4194304 \ | ||
| --test-output-size-failed 4194304 \ | ||
| --output-on-failure \ | ||
| --repeat until-pass:${repeat_fail} \ |
There was a problem hiding this comment.
Could we remove --repeat until-pass:2 from the CI run? A test that fails once and passes on retry currently leaves the job green, which could hide an intermittent context-switch or interrupt problem.
There was a problem hiding this comment.
Removed, all runs pass without it.
| set(SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../regression) | ||
| set(BSP_DIR ${CMAKE_CURRENT_LIST_DIR}/../bsp) | ||
|
|
||
| set(regression_test_cases |
There was a problem hiding this comment.
The hard-float build saves and restores FPSR and FPEPC, but the selected tests do not use floating-point operations or give threads distinct FPU state. Could you add a QEMU test that switches between two threads with different FPU state and checks each after resumption?
There was a problem hiding this comment.
Added fpu_switch, two threads with their own FPSR and FPEPC.
For the Renesas RH850 G4KH core with v850-elf-gcc, hard and soft float. Issue eclipse-threadx#515. TX_DISABLE keeps a stricter PLMR of the caller when TX_PORT_MAX_IPL is above 0. TX_RH850_MAX_IPL sets TX_PORT_MAX_IPL and RH850_EXTRA_FLAGS adds compiler flags. The library builds hard and soft with RH850_EXTRA_FLAGS=-Werror and no warnings. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Runs samples/demo_threadx.c on the rh850-u2c machine of qemu-system-rh850, with two port tests. mask_posture checks that ThreadX services keep a caller PLMR of 0, and fpu_switch checks FPSR and FPEPC of switched threads in the hard float build. Tested on QEMU rh850-u2c, the example passes hard 3/3, soft 2/2 and max-ipl 3/3. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Builds test/tx/regression with the configurations of test/tx/cmake/riscv. Each test runs once, a failure is not retried. Tested on QEMU rh850-u2c, regression 576/576 hard and soft without retries. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Adds the build and QEMU run steps of the RH850 GNU port. Tested on QEMU rh850-u2c, the readme steps pass hard and soft. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Builds the RH850 port hard and soft with -Werror and runs the example, the example with TX_RH850_MAX_IPL=4 and the regression tests on qemu-system-rh850, also for kernel changes. Tool archives are checked with SHA-256. Tested locally, the workflow steps pass. actionlint and shellcheck report nothing. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2f3c371 to
04da0b0
Compare
Thanks for the review @fdesbiens, all fixed. Coverage on QEMU: port asm about 80% hard and 86% soft, timer 100%. The gaps are nested interrupts and FPU exception paths. Kindly re-visit. |
|
Hi @parthitce, thanks for addressing the PLMR, CI retry, and FPU context-switch feedback. I reran QEMU on Could you add focused QEMU tests for nested interrupts and pending FPU exceptions, then share the per-file line and branch coverage for the port and the commands used to collect it? Please include any remaining uncovered paths and why they remain uncovered. |
PR checklist
ThreadX port for the Renesas RH850 G4KH core with GCC, hard and soft float. Follows up on #515.
Includes a QEMU example, the regression suite in test/tx/cmake/rh850 and a CI workflow. All 96 tests pass in all six configurations, hard and soft. Tested on QEMU only, not on hardware yet.
Toolchain: https://github.com/linumiz/rh850-gcc-toolchain/releases/tag/v1.2.0
QEMU: https://github.com/linumiz/qemu-rh850/releases/tag/rh850-v1.2.0
Signed-off-by: Parthiban Nallathambi parthiban@linumiz.com