mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
ppc/pnv: introduce pnv*_is_power9() helpers
These are useful when instantiating device models which are shared between the POWER8 and the POWER9 processor families. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
09279d7e7b
commit
b3b066e9d8
2 changed files with 13 additions and 5 deletions
|
@ -138,6 +138,16 @@ typedef struct PnvMachineState {
|
|||
Notifier powerdown_notifier;
|
||||
} PnvMachineState;
|
||||
|
||||
static inline bool pnv_chip_is_power9(const PnvChip *chip)
|
||||
{
|
||||
return PNV_CHIP_GET_CLASS(chip)->chip_type == PNV_CHIP_POWER9;
|
||||
}
|
||||
|
||||
static inline bool pnv_is_power9(PnvMachineState *pnv)
|
||||
{
|
||||
return pnv_chip_is_power9(pnv->chips[0]);
|
||||
}
|
||||
|
||||
#define PNV_FDT_ADDR 0x01000000
|
||||
#define PNV_TIMEBASE_FREQ 512000000ULL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue