我可以从help-search中看到有一个">
port_space属性指向用于端口访问的内存空间对象。您可以使用get/set(用于非体系结构访问)、read/write(用于体系结构访问)直接访问内存空间对象,例如:
simics> board.mb.cpu0.core[0][0]->port_space
"board.mb.cpu0.ports_proxy[0][0]"
simics> board.mb.cpu0.ports_proxy[0][0].write 0xcf9 0xff size=1
[board.mb.nb.pci_bus info] sending hot_reset
你也可以遍历内存空间来找到映射在那里的内容:
simics> board.mb.cpu0.ports_proxy[0][0].map
+---------+-------------------+--+------+------+------+----+-----+----+
| Base|Object |Fn|Offset|Length|Target|Prio|Align|Swap|
+---------+-------------------+--+------+------+------+----+-----+----+
|-default-|board.mb.port_mem_m| | 0x0| | | | | |
+---------+-------------------+--+------+------+------+----+-----+----+
simics> board.mb.port_mem_m.map
+----+-----------------+--+------+-------+------+----+-----+----+
|Base|Object |Fn|Offset| Length|Target|Prio|Align|Swap|
+----+-----------------+--+------+-------+------+----+-----+----+
| 0x0|board.mb.port_mem| | 0x0|0x10000| | 0| | |
+----+-----------------+--+------+-------+------+----+-----+----+
simics> board.mb.port_mem.map
+---------+-------------------------------+--+------+------+------+----+-----+----+
| Base|Object |Fn|Offset|Length|Target|Prio|Align|Swap|
+---------+-------------------------------+--+------+------+------+----+-----+----+
| 0x402|board.mb.conf | | 0x0| 0x1| | 0| | |
| 0x510|board.mb.conf | 3| 0x0| 0x2| | 0| | |
| 0x511|board.mb.conf | 4| 0x0| 0x1| | 0| | |
| 0xcf8|board.mb.nb.bridge.bank.io_regs| | 0xcf8| 0x4| | 0| | |
| 0xcf9|board.mb.sb.cf9 | | 0x0| 0x1| | 0| | |
| 0xcfc|board.mb.nb.bridge.bank.io_regs| | 0xcfc| 0x4| | 0| | |
| 0xcfd|board.mb.nb.bridge.bank.io_regs| | 0xcfd| 0x2| | 0| | |
| 0xcfe|board.mb.nb.bridge.bank.io_regs| | 0xcfe| 0x2| | 0| | |
| 0xcff|board.mb.nb.bridge.bank.io_regs| | 0xcff| 0x1| | 0| | |
| 0xfff0|board.mb.conf | | 0x0| 0x1| | 0| | |
| 0xfff1|board.mb.conf | 1| 0x0| 0x1| | 0| | |
| 0xfff2|board.mb.conf | 2| 0x0| 0x2| | 0| | |
| 0xfff4|board.mb.shadow | | 0x0| 0x1| | 0| | |
| 0xfff5|board.mb.shadow | | 0x1| 0x1| | 0| | |
|-default-|board.mb.nb.pci_bus.io_space | | 0x0| | | | | |
+---------+-------------------------------+--+------+------+------+----+-----+----+
要查找port_space对象,您可以在CLI(命令行界面)窗口中尝试以下命令:
simics> list-objects iface = port_space -all