mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
ppc/pnv: Clarify how the TIMA is accessed on a multichip system
The TIMA region gives access to the thread interrupt context registers of a CPU. It is mapped at the same address on all chips and can be accessed by any CPU of the system. To identify the chip from which the access is being done, the PowerBUS uses a 'chip' field in the load/store messages. QEMU does not model these messages, instead, we extract the chip id from the CPU PIR and do a lookup at the machine level to fetch the targeted interrupt controller. Introduce pnv_get_chip() and pnv_xive_tm_get_xive() helpers to clarify this process in pnv_xive_get_tctx(). The latter will be removed in the subsequent patches but the same principle will be kept. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20191125065820.927-14-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
74f23d4332
commit
5373c61d6a
3 changed files with 40 additions and 17 deletions
|
@ -103,6 +103,7 @@ typedef struct Pnv9Chip {
|
|||
* A SMT8 fused core is a pair of SMT4 cores.
|
||||
*/
|
||||
#define PNV9_PIR2FUSEDCORE(pir) (((pir) >> 3) & 0xf)
|
||||
#define PNV9_PIR2CHIP(pir) (((pir) >> 8) & 0x7f)
|
||||
|
||||
typedef struct PnvChipClass {
|
||||
/*< private >*/
|
||||
|
@ -197,6 +198,8 @@ static inline bool pnv_is_power9(PnvMachineState *pnv)
|
|||
return pnv_chip_is_power9(pnv->chips[0]);
|
||||
}
|
||||
|
||||
PnvChip *pnv_get_chip(uint32_t chip_id);
|
||||
|
||||
#define PNV_FDT_ADDR 0x01000000
|
||||
#define PNV_TIMEBASE_FREQ 512000000ULL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue