qemu-e2k/target/ppc
Suraj Jitindar Singh a8dafa5251 target/ppc: Implement large decrementer support for TCG
Prior to POWER9 the decrementer was a 32-bit register which decremented
with each tick of the timebase. From POWER9 onwards the decrementer can
be set to operate in a mode called large decrementer where it acts as a
n-bit decrementing register which is visible as a 64-bit register, that
is the value of the decrementer is sign extended to 64 bits (where n is
implementation dependant).

The mode in which the decrementer operates is controlled by the LPCR_LD
bit in the logical paritition control register (LPCR).

>From POWER9 onwards the HDEC (hypervisor decrementer) was enlarged to
h-bits, also sign extended to 64 bits (where h is implementation
dependant). Note this isn't configurable and is always enabled.

On POWER9 the large decrementer and hdec are both 56 bits, as
represented by the lrg_decr_bits cpu class property. Since they are the
same size we only add one property for now, which could be extended in
the case they ever differ in the future.

We also add the lrg_decr_bits property for POWER5+/7/8 since it is used
to determine the size of the hdec, which is only generated on the
POWER5+ processor and later. On these processors it is 32 bits.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190301024317.22137-2-sjitindarsingh@gmail.com>
[dwg: Small style fixes]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-12 12:07:49 +11:00
..
translate target/ppc: convert vmin* and vmax* to vector operations 2019-02-18 11:00:44 +11:00
arch_dump.c
compat.c
cpu-models.c
cpu-models.h
cpu-qom.h target/ppc: Implement large decrementer support for TCG 2019-03-12 12:07:49 +11:00
cpu.c
cpu.h target/ppc: Implement large decrementer support for TCG 2019-03-12 12:07:49 +11:00
dfp_helper.c
excp_helper.c target/ppc: Add support for LPCR:HEIC on POWER9 2019-02-26 09:21:25 +11:00
fpu_helper.c
gdbstub.c
helper_regs.h target/ppc: Fix synchronization of mttcg with broadcast TLB flushes 2019-02-26 09:21:25 +11:00
helper.h target/ppc: Flush the TLB locally when the LPIDR is written 2019-02-26 09:21:25 +11:00
int_helper.c target/ppc: convert vmin* and vmax* to vector operations 2019-02-18 11:00:44 +11:00
internal.h
kvm_ppc.h
kvm-stub.c
kvm.c
machine.c
Makefile.objs
mem_helper.c
mfrom_table_gen.c
mfrom_table.inc.c
misc_helper.c target/ppc: Flush the TLB locally when the LPIDR is written 2019-02-26 09:21:25 +11:00
mmu_helper.c target/ppc/mmu: Use LPCR:HR to chose radix vs. hash translation 2019-02-26 09:21:25 +11:00
mmu-book3s-v3.c target/ppc: Support for POWER9 native hash 2019-02-26 09:21:25 +11:00
mmu-book3s-v3.h target/ppc: Support for POWER9 native hash 2019-02-26 09:21:25 +11:00
mmu-hash32.c target/ppc: Fix ordering of hash MMU accesses 2019-02-26 09:21:25 +11:00
mmu-hash32.h
mmu-hash64.c target/ppc: Implement large decrementer support for TCG 2019-03-12 12:07:49 +11:00
mmu-hash64.h target/ppc: Support for POWER9 native hash 2019-02-26 09:21:25 +11:00
mmu-radix64.c target/ppc: Basic POWER9 bare-metal radix MMU support 2019-02-26 09:21:25 +11:00
mmu-radix64.h target/ppc: Rename PATB/PATBE -> PATE 2019-02-26 09:21:25 +11:00
monitor.c
timebase_helper.c
trace-events
translate_init.inc.c target/ppc: Implement large decrementer support for TCG 2019-03-12 12:07:49 +11:00
translate.c target/ppc: Implement large decrementer support for TCG 2019-03-12 12:07:49 +11:00
user_only_helper.c