【发布时间】:2021-07-08 01:09:41
【问题描述】:
我正在尝试按照https://stackoverflow.com/a/68221424/2095283 中的建议在 simics 下运行裸机测试
但是得到The frontend object does not implement the processor_info interface required by the command
这是我的工作:
- 创建一个新项目:
$HOME/simics/simics-6.0.89/bin/project-setup simics-test1 && cd simics-test1 - 创建一个小配置文件:
% cat t1.simics
$start = (load-binary ./small)
%rip = $start
%rsp = 0x40001000
%bp.hap.run-until name = X86_HLT_Instr
- 创建一个小型裸机二进制文件:
% cat small.cc
extern "C" void _start() {
asm volatile ("mov $42, %rax");
asm volatile ("hlt");
}
% clang -O2 -static -nostdlib small.cc -o small
% objdump -d small
small: file format elf64-x86-64
Disassembly of section .text:
0000000000401000 <_start>:
401000: 48 c7 c0 2a 00 00 00 mov $0x2a,%rax
401007: f4 hlt
401008: c3 retq
- 运行 simics:
./simics t1.simics
Intel Simics 6 (build 6103 linux64) Copyright 2010-2021 Intel Corporation
Use of this software is subject to appropriate license.
Type 'copyright' for details on copyright and 'help' for on-line documentation.
The frontend object does not implement the processor_info interface required by the command
[.../simics-test1/t1.simics:1] error in 'load-binary' command
Error - interrupting script.
【问题讨论】:
-
或者,是否可以在不创建二进制文件并加载它的情况下执行相同的操作,即只告诉 simics 执行哪些指令?
-
您始终可以将字节插入内存并将指令指针指向它们......但这假设您已经设置了处理器。获得处理器 + 内存的最简单方法可能是仅使用 QSP 设置,但将磁盘映像设置为空并用您自己的可执行文件替换“bios”变量。 “bios”在 QSP 系统设置中被加载到内存中,并且会首先被执行。
-
你会建议一个地方来寻找所有这些的文档和示例吗? “将字节插入内存” - 语法是什么,在哪里可以找到文档? “QSP 设置”是目标/qsp-x86/* 中的内容吗?哪一个? “替换“bios”变量” - 我在目标/qsp-x86/* 中没有看到“bios”变量。还是默认 bios_image = "%simics%/targets/qsp-x86/images/SIMICSX58IA32X64_1_0_0_bp_r.fd" ?
-
我想我可以执行 run-command-file "./targets/qsp-x86/firststeps-no-network.simics" 然后添加模式代码。现在我得到这个:解析错误:空名称空间[/home/kcc/simics-projects/t1/t1.simics:5]错误解析命令错误-中断脚本。
-
听起来解析错误已在单独的问题中得到解决。 stackoverflow.com/questions/68373004/…
标签: simics