Bug Report: FVP_Base_RevC-2xAEMvA 11.30.27 GICv3_CPUInterface legacy GICC_EOIR/GICC_AEOIR strips CPUID[12:10]

Environment:
- Product: Arm Fast Models FVP_Base_RevC-2xAEMvA 11.30.27 (Nov 14 2025)
- Model library: libarmctmodel.so (SHA-256 08d79317aee6e649d18a07dc498e88e8e6de92602311de0ff4f96c97b58b684f)
- Host OS / Arch: Ubuntu 24.04.3 LTS (x86_64)
- Modes affected: Both gicv3.gicv2-only=1 and GICv3 legacy ARE=0 (gicv3.gicv2-only=0, gic_distributor.ARE-fixed-to-one=0, gic_distributor.non-ARE-core-count=4), under both cluster0.gicv3.EOI-check-ID=1 (functional EOI rejection) and default cluster0.gicv3.EOI-check-ID=0 (spurious GICv3_EndInterruptIDMismatch diagnostics).

Description:
In legacy GICv2 / ARE=0 mode, reading GICC_IAR (or GICC_AIAR) for an SGI returns the 13-bit value (CPUID[12:10] << 10) | InterruptID[9:0], and software writes that exact value back to GICC_EOIR (or GICC_AEOIR) for priority drop and deactivation.

On Arm FVP_Base_RevC-2xAEMvA 11.30.27, cluster0.cpu0.gicv3_cpu_if records the full 13-bit (CPUID << 10) | INTID on the active interrupt stack when acknowledged (0x0405, 0x0805, 0x0c05, 0x0406, 0x0407), but strips CPUID[12:10] to 10-bit INTID (0x0005, 0x0006, 0x0007) before comparing against the active stack entry on GICC_EOIR / GICC_AEOIR writes:

1. With cluster0.gicv3.EOI-check-ID=1 (3/3 on both gicv2-only=1 and legacy ARE=0):
- T1a/T1b/T1c (GICC_EOIR, Group 0 SGI 5 from PE 1/2/3): Writing the exact GICC_IAR value (0x405, 0x805, 0xc05) logs ArchMsg.Warning.GICv3_EndInterruptNotHighestPriority (INTERRUPT_ID=0x00000005 CPUID=0x01..0x03 LATEST_INTERRUPT_ID=0x00000405/0x805/0xc05 LATEST_CPUID=0x01..0x03) and is ignored. GICC_APR0 stays 0x00010000, GICC_RPR stays wedged at 0x80 (instead of 0xff), GICD_ISACTIVER0 stays 0x20, and a subsequent equal-priority SGI 8 (BLK_HPPIR=0x8) is blocked (BLK_IAR=0x3ff).
- T2 (GICC_AEOIR, Group 1 SGI 6 from PE 1): Writing AIAR=0x406 fails identically (GICC_NSAPR0=0x00010000, GICC_RPR=0x80, GICD_ISACTIVER0=0x40).
- T3 (EOImodeS=1, split GICC_EOIR + GICC_DIR, SGI 7 from PE 1): GICC_EOIR=0x407 fails priority drop (APR_EOI=0x00010000, RPR_EOI=0x80, ACT_EOI=0x80), and subsequent GICC_DIR=0x407 logs GICv3_AttemptedToDeactivateNonExistentInterrupt.
2. With default cluster0.gicv3.EOI-check-ID=0 (3/3):
- Architectural priority drop falls back to ending the highest-priority active entry, but gicv3_cpu_if emits 10 spurious ArchMsg.Warning.GICv3_EndInterruptIDMismatch warnings (END_INTERRUPT_ID=0x405/0x805/0xc05/0x406/0x407 SPECIFED_INTERRUPT_ID=0x5/6/7) across the 5 valid remote-source EOIs, versus 0 warnings for the CPUID=0 paired control.

Root Cause:
Confirmed via GenericTrace.so and libarmctmodel.so inspection (GICv3_CPUInterface EOI write wrapper at 0x00c3fdd0 and endInterrupt callee at 0x00c3f1c0):
- For legacy SGIs (INTID < 16), 0x00c3fdd0 splits the written 13-bit value into a bare 10-bit intid (esi, stripped at 0x00c3fe27: cmovb r10d, esi) and a 3-bit cpuid (edx, extracted at 0x00c3fde3..0x00c3fded) so endInterrupt (0x00c3f1c0) can evaluate EOI-check-ID and EOI-check-CPUID orthogonally before re-combining (cpuid << 10) | intid for COMMAND=Deactivate.
- However, the ID comparisons inside 0x00c3f1c0 (0x00c3f92c, 0x00c3f355/0x00c3fd12, and 0x00c3f9a7/0x00c3f867) compare the unmasked 13-bit active stack entry latest->interrupt_id (e.g., 0x405) directly against the stripped 10-bit intid (0x005) without masking latest->interrupt_id & 0x3ff. Thus CPUID == 0 matches accidentally while every CPUID >= 1 fails comparison.

Steps to Reproduce:
Run the standalone 4-core bare-metal reproducer against FVP_Base_RevC-2xAEMvA with:
-C cluster0.NUM_CORES=4 -C cluster1.NUM_CORES=0 -C gic_distributor.non-ARE-core-count=4 -C cluster0.gicv3.EOI-check-ID=1
under both -C gicv3.gicv2-only=1 and -C gicv3.gicv2-only=0 -C gic_distributor.ARE-fixed-to-one=0.

Observed output (3/3 each under EOI-check-ID=1):
T1a(src1): IAR=0x00000405 APR0=0x00010000 RPR=0x00000080 ACT=0x00000020 BLK_HPPIR=0x00000008 BLK_IAR=0x000003ff
T1b(src2): IAR=0x00000805 APR0=0x00010000 RPR=0x00000080 ACT=0x00000020
T1c(src3): IAR=0x00000c05 APR0=0x00010000 RPR=0x00000080 ACT=0x00000020
T2(AEOIR src1): AIAR=0x00000406 NSAPR0=0x00010000 RPR=0x00000080 ACT=0x00000040
T3(EOImodeS=1 src1): IAR=0x00000407 APR_EOI=0x00010000 RPR_EOI=0x00000080 ACT_EOI=0x00000080 ACT_DIR=0x00000000
SETUP_ERR=0x00000000 FAILMASK=0x0000001f VERDICT=FAIL_BUG_REPRODUCED

Expected Behavior:
Per Arm IHI 0048B (4.4.4, 4.4.5, 4.4.9, 4.4.10) and Arm IHI 0069H.b (12.13.9 GICC_EOIR, 12.13.2 GICC_AEOIR, 15.1), writing the exact 13-bit (CPUID << 10) | INTID value returned by GICC_IAR/GICC_AIAR to GICC_EOIR/GICC_AEOIR must match the active SGI entry, clear GICC_APR0/GICC_NSAPR0 to 0, restore GICC_RPR to 0xff, deactivate the SGI (when EOImodeS == 0), and emit zero mismatch warnings. The paired control (CPUID=0 SGIs 5/6/7 and SPI 32 under EOI-check-ID=1) passes 3/3 with 0 warnings.

Suggested Fix (for Arm Fast Models Maintainers):
In GICv3_CPUInterface::endInterrupt (0x00c3f1c0), mask the stored active SGI ID to its 10-bit interrupt ID (latest->interrupt_id & 0x3ff) in the EOI-check-ID and mismatch-warning comparisons (0x00c3f92c, 0x00c3f355/0x00c3fd12, 0x00c3f9a7/0x00c3f867) rather than removing the 0x00c3fe27 split in 0x00c3fdd0. This preserves orthogonality between EOI-check-ID and EOI-check-CPUID and keeps INTERRUPT_ID accurate in GICv3_EndInterrupt trace events.

Standalone Reproducer (GitHub Gist):
gist.github.com/.../9ae32d745f0da45999cf3febf9e61ff8