当前位置: 首页 > news >正文

GEM5学习(4): 运行全系统模式的ARM系统

详细说明可以见官网 gem5: Extending gem5 for ARM

下载镜像

mkdir -p cpu_tests/benchmarks/bin/arm
cd cpu_tests/benchmarks/bin/arm
wget dist.gem5.org/dist/v22-0/test-progs/cpu-tests/bin/arm/Bubblesort
wget dist.gem5.org/dist/v22-0/test-progs/cpu-tests/bin/arm/FloatMM

构建仿真器

构建arm 的仿真器

scons build/ARM/gem5.opt -j 20

运行脚本

设置环境

export IMG_ROOT=/absolute/path/to/fs_images/

运行脚本

fs 版本就是跑起来有点慢

 ./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py \--caches \--bootloader="$IMG_ROOT/binaries/boot.arm"\--kernel="$IMG_ROOT/binaries/vmlinux.arm"\--disk="$IMG_ROOT/disks/m5_exit.squashfs.arm" \--bootscript=path/to/bootscript.rcS

下面是不分输出日志

==== m5 terminal: Terminal 0 ====
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Nov 6 14:11:58 GMT 2019
[    0.000000] CPU: ARMv7 Processor [410fc0f0] revision 0 (ARMv7), cr=14c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: V2P-CA15
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] earlycon: pl11 at MMIO 0x1c090000 (options '')
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.18.0+ (arm-employee@arm-computer) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Wed Nov 6 14:11:58 GMT 2019
[    0.000000] CPU: ARMv7 Processor [410fc0f0] revision 0 (ARMv7), cr=14c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: V2P-CA15
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] earlycon: pl11 at MMIO 0x1c090000 (options '')
[    0.000000] bootconsole [pl11] enabled
[    0.000000] bootconsole [pl11] enabled
[    0.000000] Truncating memory at 0x80000000 to fit in 32-bit physical address space
[    0.000000] Truncating memory at 0x80000000 to fit in 32-bit physical address space
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0xfec00000
[    0.000000] cma: Reserved 16 MiB at 0xfec00000
[    0.000000] On node 0 totalpages: 524287
[    0.000000] On node 0 totalpages: 524287
[    0.000000]   Normal zone: 2862 pages used for memmap
[    0.000000]   Normal zone: 2862 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 325632 pages, LIFO batch:31
[    0.000000]   Normal zone: 325632 pages, LIFO batch:31
[    0.000000]   HighMem zone: 198655 pages, LIFO batch:31
[    0.000000]   HighMem zone: 198655 pages, LIFO batch:31
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x494 with crng_init=0
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x494 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @(ptrval) s41292 r8192 d24244 u73728
[    0.000000] percpu: Embedded 18 pages/cpu @(ptrval) s41292 r8192 d24244 u73728
[    0.000000] pcpu-alloc: s41292 r8192 d24244 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: s41292 r8192 d24244 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 521425
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 521425
[    0.000000] Kernel command line: earlyprintk earlycon=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GiB root=/dev/vda1 rw init=/sbin/init vmalloc=768MB
[    0.000000] Kernel command line: earlyprintk earlycon=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GiB root=/dev/vda1 rw init=/sbin/init vmalloc=768MB
[    0.000000] Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Memory: 2048700K/2097148K available (8192K kernel code, 447K rwdata, 1732K rodata, 1024K init, 167K bss, 32064K reserved, 16384K cma-reserved, 778236K highmem)
[    0.000000] Memory: 2048700K/2097148K available (8192K kernel code, 447K rwdata, 1732K rodata, 1024K init, 167K bss, 32064K reserved, 16384K cma-reserved, 778236K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0000000 - 0xff800000   ( 760 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xcf800000   (1272 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 448 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 168 kB)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0000000 - 0xff800000   ( 760 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xcf800000   (1272 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 448 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 168 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=2.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=2.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] 	Offload RCU callbacks from CPUs: (none).
[    0.000000] 	Offload RCU callbacks from CPUs: (none).
[    0.000000] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old detection method!
[    0.000000] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old detection method!
[    0.000000] clk_gem5_energy_ctrl: No clusters in DT! Falling back to using CPU topology!
[    0.000000] clk_gem5_energy_ctrl: No clusters in DT! Falling back to using CPU topology!
[    0.000002] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000002] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000236] arch_timer: cp15 and mmio timer(s) running at 25.16MHz (virt/virt).
[    0.000236] arch_timer: cp15 and mmio timer(s) running at 25.16MHz (virt/virt).
[    0.000363] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
[    0.000363] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
[    0.000547] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 4398046511084ns
[    0.000547] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 4398046511084ns
[    0.000684] Switching to timer-based delay loop, resolution 39ns
[    0.000684] Switching to timer-based delay loop, resolution 39ns
[    0.000860] Console: colour dummy device 80x30
[    0.000860] Console: colour dummy device 80x30
[    0.000941] Calibrating delay loop (skipped) preset value.. 9994.24 BogoMIPS (lpj=19988480)
[    0.000941] Calibrating delay loop (skipped) preset value.. 9994.24 BogoMIPS (lpj=19988480)
[    0.001084] pid_max: default: 32768 minimum: 301
[    0.001084] pid_max: default: 32768 minimum: 301
[    0.001213] Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.001213] Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.001342] Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.001342] Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.001687] CPU: Testing write buffer coherency: ok
[    0.001687] CPU: Testing write buffer coherency: ok
[    0.001776] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.001776] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.002033] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002033] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.024250] Setting up static identity map for 0x80100000 - 0x80100060
[    0.024250] Setting up static identity map for 0x80100000 - 0x80100060
[    0.032237] Hierarchical SRCU implementation.
[    0.032237] Hierarchical SRCU implementation.
[    0.048255] smp: Bringing up secondary CPUs ...
[    0.048255] smp: Bringing up secondary CPUs ...

上面的这些输出需要通过串口模拟器的才能看到

cd util
make 
./util/term/m5term 3456

http://www.dtcms.com/a/365206.html

相关文章:

  • Docker 运行 PolarDB-for-PostgreSQL 的命令,并已包含数据持久化配置
  • 梅赛德斯-AMG PETRONAS F1车队携手SAP Cloud ERP:以数字化驱动精确与高效
  • HTML全屏功能实现汇总
  • 缠论笔线段画线,文华财经期货指标公式,好用的缠论指标源码
  • 从全栈开发到微服务架构:一位Java工程师的实战经验分享
  • 突破闭集限制:3D-MOOD 实现开集单目 3D 检测新 SOTA
  • Cesium 实战 - 自定义纹理材质 - 箭头流动线(图片纹理)
  • Corona 13 渲染器安装与使用教程(适用于3ds Max 2016–2026)
  • 【LeetCode热题100道笔记】搜索旋转排序数组
  • 认知诊断模型发展与NeuralCD框架笔记
  • Springboot3+SpringSecurity6Oauth2+vue3前后端分离认证授权
  • 七、面向对象技术
  • Moonchain:「新加坡大华银行」加持下连接现实金融与链上经济的价值通道
  • 从公共形象到专属定制,井云交互数字人满足金融/政务多元需求
  • 23种设计模式-适配器(Adapter)模式
  • 如何通过level2千档盘口分析挂单意图
  • 【正则表达式】 正则表达式的修饰符有哪些?
  • 正则表达式的使用
  • A*(Astar)算法详解与应用
  • 【C++八股文】数据结构篇
  • Vue Vapor 事件机制深潜:从设计动机到源码解析
  • Windows 电源管理和 Shutdown 命令详解
  • QuillBot:AI文本重写神器(附官网),高效解决文案润色与语法检查需求
  • 不只会修图!谷歌发布官方指南,教你用 Nano Banana 玩转文生图
  • Mysql数据库(性能)索引学习
  • 如何获取easy-ui的表格的分页大小
  • 创建Spring MVC和注解
  • 企业资源计划(ERP)系统:数字化企业的核心引擎
  • 数据结构——顺序表和单向链表(2)
  • MybatisPlus 根据实体类获取对应的Mapper