On 8/3/23 14:44, Helge Deller wrote:
Add emulation for /proc/cpuinfo for arm architecture.
The output below mimics output as seen on debian porterboxes.

aarch64 output example:

processor       : 0
model name      : ARMv8 Processor rev 0 (v8l)
BogoMIPS        : 100.00
Features        : swp half thumb fast_mult vfp edsp neon vfpv3 tls vfpv4 idiva 
idivt vfpd32 lpae aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd07
CPU revision    : 0
Hardware        : QEMU v8.0.92 arm,cortex-a57

arm 32-bit output example:

processor       : 0
model name      : ARMv5 Processor rev 6 (armv5l)
BogoMIPS        : 50.00
Features        : swp half thumb fast_mult edsp
CPU implementer : 0x69
CPU architecture: 5
CPU variant     : 0
CPU part        : 0x2d0
CPU revision    : 6
Hardware        : QEMU v8.0.92 marvell,xscale
Revision        : 0000
Serial          : 0000000000000000

Signed-off-by: Helge Deller<del...@gmx.de>

v5:
- use is_a64()
v4:
- more refinements based on Richards feedback
v3:
- show variant, part, revision and implementor based on midr
   value (suggested by Richard Henderson)
v2:
- show features of CPU which is actually being emulated by qemu
   (suggested by Peter Maydell)
---

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to