Skip to content

Commit

Permalink
target/ppc: Add SPR ASDR
Browse files Browse the repository at this point in the history
The Access Segment Descriptor Register (ASDR) provides information about
the storage element when taking a hypervisor storage interrupt. When
performing nested radix address translation, this is normally the guest
real address. This register is present on POWER9 processors and later.

Implement the ADSR, note read and write access is limited to the
hypervisor.

Signed-off-by: Suraj Jitindar Singh <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: David Gibson <[email protected]>
  • Loading branch information
sjitindarsingh authored and dgibson committed Dec 16, 2019
1 parent 5cc7e69 commit 32d0f0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions target/ppc/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,7 @@ typedef PowerPCCPU ArchCPU;
#define SPR_MPC_MD_DBRAM1 (0x32A)
#define SPR_RCPU_L2U_RA3 (0x32B)
#define SPR_TAR (0x32F)
#define SPR_ASDR (0x330)
#define SPR_IC (0x350)
#define SPR_VTB (0x351)
#define SPR_MMCRC (0x353)
Expand Down
6 changes: 6 additions & 0 deletions target/ppc/translate_init.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8295,6 +8295,12 @@ static void gen_spr_power9_mmu(CPUPPCState *env)
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_ptcr,
KVM_REG_PPC_PTCR, 0x00000000);
/* Address Segment Descriptor Register */
spr_register_hv(env, SPR_ASDR, "ASDR",
SPR_NOACCESS, SPR_NOACCESS,
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic,
0x0000000000000000);
#endif
}

Expand Down

0 comments on commit 32d0f0d

Please sign in to comment.