1

我正在尝试按照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 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.

4

1 回答 1

1

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

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

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

simics> list-processors
No processor found

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

simics> pselect
No frontend object selected
于 2021-07-09T07:17:14.513 回答