我有一块
Raspberry Pi 4 Model B Rev 1.1
板。当我发出命令 cat /proc/cpuinfo
时,我得到了以下日志。
processor : 0
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 270.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
处理器 1、2 和 3 获得了类似的数据。
但是产品规格https://www.raspberrypi.com/products/raspberry-pi-4-model-b/species/告知该板使用
Cortex-A72 (ARM v8)
。
因此,从主板日志中我得到的模型为
ARMv7 Processor rev 3 (v7l)
,但从主板规格来看,它是 Cortex-A72 (ARM v8)
。我很困惑为什么 v7 架构(主板日志)和 v8 架构(产品规格)会发生这种差异。谁能帮我解决这个困惑吗?
/proc/cpuinfo
中提供的信息的精确度确实根据我的经验而有所不同,其中重要的是CPU部分。
就您而言,它是
0xd08
,这意味着您根据 Arm 文档使用的是 Cortex-A72 此处:
Table 4-16 MIDR_EL1 bit assignments
Bits Name Function
[31:24] Implementer
Indicates the implementer code. This value is:
0x41 ARM Limited.
[23:20] Variant
Indicates the variant number of the processor. This is the major revision number in the r part of the rp description of the product revision status. This value is:nnnn
0 Major revision number.
[19:16] Architecture
Indicates the architecture code. This value is:
0xF Defined by CPUID scheme.
[15:4] Primary part number
Indicates the primary part number. This value is:
0xD08 Cortex-A72 processor.
[3:0] Revision
Indicates the minor revision number of the processor. This is the minor revision number in the p part of the rp description of the product revision status. This value is:nnnn
1 Minor revision number.
在 Raspberry PI 3 上,我得到 0x0d03,这与具有 Cortex-A53 内核的 BCM2835 一致:
[15:4] PartNum
Indicates the primary part number. This value is:
0xD03
Cortex-A53 processor.
请注意,您也可能运行 32 位版本的 Linux。您可以使用以下命令检查您正在运行 aarch64 版本(在运行 64 位版本 Armbian 的 Cortex-A53 上测试):
uname -a
Linux espressobin 5.15.93-mvebu64 #23.02.2 SMP PREEMPT Fri Feb 17 23:51:39 UTC 2023 aarch64 GNU/Linux
file $(which bash)
/usr/bin/bash: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=96c22dfc3c74ccf4ba77d9cce6fc2c5e635456c1, for GNU/Linux 3.7.0, stripped
如果您在这两个命令的输出中没有看到
aarch64
,则意味着您正在运行 32 位版本的 Linux,并且您想要从 安装 Raspberry Pi OS(64 位)这里.
正如上面评论中所指出的,这可以解释为什么 /proc/cpuinfo 报告 ARMv7 处理器 rev 3 (v7l)。这就是为什么您应该依赖主要部件号来确定您正在使用的确切处理器(恕我直言,您的问题似乎与您使用的处理器更相关,而不是与您运行的操作系统相关)。
使用
2023-05-03-raspios-bullseye-arm64-lite.img
,我们可以看到架构设置为8,但模型名称未填充:
uname -a
Linux raspberrypi3 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
cat /proc/cpuinfo
processor : 0
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 2
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 3
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : BCM2835
Revision : a22082
Serial : 0000000028b5385b
Model : Raspberry Pi 3 Model B Rev 1.2
使用
2023-05-03-raspios-bullseye-armhf-lite.img
,我们可以看到架构设置为 7,并且模型名称已填充
uname -a
Linux raspberrypi3 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
user@raspberrypi3:~$ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 2
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 3
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : BCM2835
Revision : a22082
Serial : 0000000028b5385b
Model : Raspberry Pi 3 Model B Rev 1.2