@samitouri / QOSamiQemu / commits / ccde37589f

hw/misc/mps2-scc.c: fix scc_partno field width

Increase the extract32 length from 8 to 12. The Primary part number is defined as bits[15:4] by the "SSE-310 with M85 and U55 FPGA" documentation. For example for the mps3-an547, 0x547 is 12 bits but we only return 8 bits right now. Signed-off-by: Simon Xu <simonxhy0404@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260724160943.52509-3-simonxhy0404@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Simon Xu committed Jul 24, 2026 at 11:09 UTC ccde37589fb4d171e540459f3dd1dc7987e86096
1 file changed +1 -1
hw/misc/mps2-scc.c
+1 -1
@@ -57,7 +57,7 @@ REG32(ID, 0xFFC)
57 static int scc_partno(MPS2SCC *s)
58 {
59 /* Return the partno field of the SCC_ID (0x524, 0x511, etc) */
60 - return extract32(s->id, 4, 8);
60 + return extract32(s->id, 4, 12);
61 }
62
63 /* Is CFG_REG2 present? */