【问题标题】:The frontend object does not implement the processor_info interface required by the command前端对象没有实现命令所需的processor_info接口
【发布时间】: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


【解决方案1】:

如果这是您做的唯一设置,那么 Simics 配置中没有任何东西可以运行代码。使用list-objects 检查配置内容。如果它只显示一些基本对象,则您没有配置任何机器。像这样:

simics> list-objects 
┌─────────────────────────┬───────────────────────┐
│          Class          │         Object        │
├─────────────────────────┼───────────────────────┤
│<bp-manager>             │bp                     │
│<breakpoints-old>        │breakpoints            │
│<frontend-server-console>│frontend_server_console│
│<preferences>            │prefs                  │
│<sim>                    │sim                    │
│<tcf-agent>              │tcf                    │
└─────────────────────────┴───────────────────────┘

您可以使用list-processors 检查处理器是否存在。对于一个空会话,这就是你得到的:

simics> list-processors
No processor found

load-binary 命令默认在当前前端处理器上运行。使用pselect 检查它是哪一个。这里又是一个空会话:

simics> pselect
No frontend object selected

【讨论】:

  • 这解释了为什么我的设置不起作用。也许你可以给我一个示例测试(.simics 文件?),基于它我可以让我的测试工作?
  • 使用 firststeps 脚本是一个好的开始。就像你已经做过的那样。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-03-28
  • 2010-12-17
  • 1970-01-01
  • 2019-01-07
  • 1970-01-01
  • 2018-11-23
  • 1970-01-01
相关资源
最近更新 更多