mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ppc/pnv: fix XSCOM core addressing on POWER9
The XSCOM base address of the core chiplet was wrongly calculated. Use the OPAL macros to fix that and do a couple of renames. 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
b3b066e9d8
commit
c035851ac0
5 changed files with 37 additions and 21 deletions
|
@ -74,7 +74,6 @@ typedef struct PnvChipClass {
|
|||
uint64_t cores_mask;
|
||||
|
||||
hwaddr xscom_base;
|
||||
hwaddr xscom_core_base;
|
||||
|
||||
uint32_t (*core_pir)(PnvChip *chip, uint32_t core_id);
|
||||
} PnvChipClass;
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct PnvChip PnvChip;
|
||||
|
||||
typedef struct PnvXScomInterface {
|
||||
Object parent;
|
||||
} PnvXScomInterface;
|
||||
|
@ -54,8 +56,15 @@ typedef struct PnvXScomInterfaceClass {
|
|||
* PCB SLAVE 0x110Fxxxx
|
||||
*/
|
||||
|
||||
#define PNV_XSCOM_EX_CORE_BASE(base, i) ((base) | ((uint64_t)(i) << 24))
|
||||
#define PNV_XSCOM_EX_CORE_SIZE 0x100000
|
||||
#define PNV_XSCOM_EX_CORE_BASE 0x10000000ull
|
||||
|
||||
#define PNV_XSCOM_EX_BASE(core) \
|
||||
(PNV_XSCOM_EX_CORE_BASE | ((uint64_t)(core) << 24))
|
||||
#define PNV_XSCOM_EX_SIZE 0x100000
|
||||
|
||||
#define PNV_XSCOM_P9_EC_BASE(core) \
|
||||
((uint64_t)(((core) & 0x1F) + 0x20) << 24)
|
||||
#define PNV_XSCOM_P9_EC_SIZE 0x100000
|
||||
|
||||
#define PNV_XSCOM_LPC_BASE 0xb0020
|
||||
#define PNV_XSCOM_LPC_SIZE 0x4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue