I can see from help-search that there's a "<port_space>.read", but I don't know how to find the <port_space> name for the CPU.
Asked
Active
Viewed 129 times
2 Answers
2
port_space attribute of a processor core points to a memory space object that is used for port accesses. You can access to memory space object directly using get/set (for non-architectural access), read/write (for architectural access) for example:
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
You can also traverse the memory space to find what is exactly mapped there:
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| | | | | |
+---------+-------------------------------+--+------+------+------+----+-----+----+

Evgenii Iuliugin
- 71
- 1
0
To find a port_space object, you can try below command in CLI (command line interface) window:
simics> list-objects iface = port_space -all