Skip to content

Refused user mode and memory protection on the Cortex-A35 module ports - #817

Open
fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/a35-module-unsupported-options
Open

fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/a35-module-unsupported-options

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

Fixes #816

The Cortex-A35 and Cortex-A35 SMP module ports listed TXM_MODULE_USER_MODE and TXM_MODULE_MEMORY_PROTECTION as supported, so a module requesting them loaded, but the ports implement neither: module threads run at the Module Manager's exception level and call it directly, and no memory management is configured for a module. A module that asked for user mode ran privileged, and one that asked for memory protection was not confined and had most of its service calls refused.

The four port headers now list only TXM_MODULE_SHARED_EXTERNAL_MEMORY_ACCESS, so the existing load check refuses both properties with TXM_MODULE_INVALID_PROPERTIES. A module whose preamble sets TXM_MODULE_USER_MODE must clear it; the bit never had an effect on these ports. The inside-data check now reads TX_FALSE instead of TX_SUCCESS, which has the same value and is no longer reachable.

scripts/check_gcc.sh (Arm GNU 14.3.rel1) and scripts/check_clang.sh (ATfE 22.1.0) pass every stage with zero warnings, including the A35 and A35 SMP module manager sources, 31 of 31 each, and all 45 example builds. The AI disclosure check passes. No regression test is added: only macro values change, and the refusal is the existing portable load check. Not run on A35 hardware or a model.

Fixes eclipse-threadx#816

The Cortex-A35 and Cortex-A35 SMP module ports listed TXM_MODULE_USER_MODE and
TXM_MODULE_MEMORY_PROTECTION as supported, so a module requesting them loaded, but the
ports implement neither: module threads run at the Module Manager's exception level and
call it directly, and no memory management is configured for a module. A module that
asked for user mode ran privileged, and one that asked for memory protection was not
confined and had most of its service calls refused.

The four port headers now list only TXM_MODULE_SHARED_EXTERNAL_MEMORY_ACCESS, so the
existing load check refuses both properties with TXM_MODULE_INVALID_PROPERTIES. A module
whose preamble sets TXM_MODULE_USER_MODE must clear it; the bit never had an effect on
these ports. The inside-data check now reads TX_FALSE instead of TX_SUCCESS, which has
the same value and is no longer reachable.

scripts/check_gcc.sh (Arm GNU 14.3.rel1) and scripts/check_clang.sh (ATfE 22.1.0) pass
every stage with zero warnings, including the A35 and A35 SMP module manager sources,
31 of 31 each, and all 45 example builds. The AI disclosure check passes. No executable
line changed; not run on A35 hardware or a model.

Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant