portable: remove stray installer URL from IAR TrustZone non-secure ports #1492
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1492"
general
weight: 0.35
TomasGalbickaNXP
Problem
A stray IAR installer download URL sits outside the comment delimiters in the
restore_special_regssection of the IAR TrustZone non-secure ports:Because
/appears after the URL, the assembler reads the bare URL as an operandof the preceding
ldmiaand aborts:The line sits outside the
#if ( configENABLE_PAC == 1 )block, which ends on thepreceding line, so it is not limited to PAC-enabled builds. It is, however, inside the
#elsebranch of#if ( configENABLE_MPU == 1 ): the breakage is on every non-MPUbuild, independently of
configENABLE_PAC, while MPU builds never compile the line.(Corrected — an earlier revision of this description said "breaks every configuration
of these ports". That was too strong; the guard stack for line 476 is
#else of #if ( configENABLE_MPU == 1 )and nothing else.)Scope
Issue #1480 reports this for
portable/IAR/ARM_CM33/non_secure/portasm.s.A tree-wide scan of
main(8be86d4) finds the stray URL in 7 files, all atline 476. This PR fixes all seven:
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.sportable/IAR/ARM_CM33/non_secure/portasm.sportable/IAR/ARM_CM35P/non_secure/portasm.sportable/IAR/ARM_CM52/non_secure/portasm.sportable/IAR/ARM_CM55/non_secure/portasm.sportable/IAR/ARM_CM85/non_secure/portasm.sportable/IAR/ARM_STAR_MC3/non_secure/portasm.sThe first revision covered only the last six, leaving
portable/IAR/ARM_CM33/non_secure/portasm.sto #1485. Per @jefftenney's reviewcomment that split no longer makes sense:
portable/ARMv8M/copy_files.pyderives thenon-secure IAR ports from
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33— the wholedirectory for ARM_CM33 itself, file by file for the derivatives — so running the script
after the first commit produces the ARM_CM33 fix as well. It is included here and
#1485 becomes redundant.
Note there are two distinct CM33 assembly files in the tree, both affected, and they
are easy to confuse:
| path | role |
|---|---|
|
portable/IAR/ARM_CM33/non_secure/portasm.s| generated copy ||
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s| source of truth |Fix
The stray URL is deleted, and the comment keeps its original text and column alignment:
This matches the unaffected sibling port
portable/IAR/ARM_CM23/non_secure/portasm.s(line 444), which carries the same comment text without any URL. Optionally the URL
could be kept inside the comment instead, as #1485 does — either form assembles; I
removed it because it is a meaningless installer link.
Origin
Commit 78e0cc7 ("ARMv8.1-M: Add task dedicated PAC key support", #1195) introduced the
URL into CM33, CM35P, CM55, CM85 and the ARMv8M non-secure port. The CM52 (#1334) and
STAR-MC3 (#1363) ports were later created from an already-affected
portasm.sandinherited it.
Verification
Assembled with
arm-none-eabi-gcc 13.3.1 20240614(GNU Tools for STM32 13.3.rel1),-march=armv8.1-m.main -mthumb -mfpu=fpv5-d16. IAR's own directives(
PUBLIC/EXTERN/SECTION/THUMB/END) were translated 1:1 to GNUequivalents so that the only difference between the "before" and "after" inputs is the
one comment line, making the result attributable to it. The translated pair still
diffs in exactly that single line.
Baseline (known-good sibling, proves the harness accepts a healthy file):
All seven files in this PR, over
configENABLE_MPU/configENABLE_PAC:| file | MPU=0, PAC=0 | MPU=1 |
|---|---|---|
|
portable/IAR/ARM_CM33/non_secure/portasm.s| error → OK | not compiled either way ||
portable/IAR/ARM_CM35P/non_secure/portasm.s| error → OK | not compiled either way ||
portable/IAR/ARM_CM52/non_secure/portasm.s| error → OK | not compiled either way ||
portable/IAR/ARM_CM55/non_secure/portasm.s| error → OK | not compiled either way ||
portable/IAR/ARM_CM85/non_secure/portasm.s| error → OK | not compiled either way ||
portable/IAR/ARM_STAR_MC3/non_secure/portasm.s| error → OK | not compiled either way ||
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s| error → OK | not compiled either way |Caveats, stated plainly:
iccarm(no IAR licence available here). Both reject abare token after an instruction, and the reporter of #1480 reproduced the failure on
IAR ARM 9.70.2, so the defect and the fix are cross-confirmed — but this is not an
IAR build.
PAC_KEY_mrs/msroperands on this target, before it ever reaches line 476.Note on CI
.github/workflows/kernel-demos.ymlonly builds theCORTEX_MPS2_QEMU_IAR_GCCdemo,which is compiled with GCC. The IAR ports are not built by CI at all, which is how this
slipped through. Adding an assembler-only syntax check for these ports would be a
separate, larger change — happy to look at it if you think it is worth doing.
Relates to #1480.