[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/34] target/ppc: Set the correct endianness for powernv memory d
From: |
Cédric Le Goater |
Subject: |
[PULL 15/34] target/ppc: Set the correct endianness for powernv memory dumps |
Date: |
Wed, 12 Jan 2022 12:55:32 +0100 |
From: Fabiano Rosas <farosas@linux.ibm.com>
We use the endianness of interrupts to determine which endianness to
use for the guest kernel memory dump. For machines that support HILE
(powernv8 and up) we have been always generating big endian dump
files.
This patch uses the HILE support recently added to
ppc_interrupts_little_endian to fix the endianness of the dumps for
powernv machines.
Here are two dumps created at different moments:
$ file skiboot.dump
skiboot.dump: ELF 64-bit MSB core file, 64-bit PowerPC ...
$ file kernel.dump
kernel.dump: ELF 64-bit LSB core file, 64-bit PowerPC ...
Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20220107222601.4101511-9-farosas@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
target/ppc/arch_dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/arch_dump.c b/target/ppc/arch_dump.c
index 12cde198a315..993740897d83 100644
--- a/target/ppc/arch_dump.c
+++ b/target/ppc/arch_dump.c
@@ -237,7 +237,7 @@ int cpu_get_dump_info(ArchDumpInfo *info,
info->d_machine = PPC_ELF_MACHINE;
info->d_class = ELFCLASS;
- if (ppc_interrupts_little_endian(cpu, false)) {
+ if (ppc_interrupts_little_endian(cpu, cpu->env.has_hv_mode)) {
info->d_endian = ELFDATA2LSB;
} else {
info->d_endian = ELFDATA2MSB;
--
2.31.1
- [PULL 01/34] pseries: Update SLOF firmware image, (continued)
- [PULL 01/34] pseries: Update SLOF firmware image, Cédric Le Goater, 2022/01/12
- [PULL 14/34] target/ppc: Introduce a wrapper for powerpc_excp, Cédric Le Goater, 2022/01/12
- [PULL 04/34] target/ppc: Add extra float instructions to POWER5P processors, Cédric Le Goater, 2022/01/12
- [PULL 24/34] ppc/pnv: Move num_phbs under Pnv8Chip, Cédric Le Goater, 2022/01/12
- [PULL 17/34] pnv_phb4.c: add unique chassis and slot for pnv_phb4_root_port, Cédric Le Goater, 2022/01/12
- [PULL 10/34] target/ppc: powerpc_excp: Group unimplemented exceptions, Cédric Le Goater, 2022/01/12
- [PULL 25/34] pnv_phb3.h: change TYPE_PNV_PHB3_ROOT_BUS name, Cédric Le Goater, 2022/01/12
- [PULL 16/34] pnv_phb3.c: add unique chassis and slot for pnv_phb3_root_port, Cédric Le Goater, 2022/01/12
- [PULL 20/34] pnv_phb4.c: check if root port exists in rc_config functions, Cédric Le Goater, 2022/01/12
- [PULL 18/34] ppc/pnv: Attach PHB3 root port device when defaults are enabled, Cédric Le Goater, 2022/01/12
- [PULL 15/34] target/ppc: Set the correct endianness for powernv memory dumps,
Cédric Le Goater <=
- [PULL 07/34] docs: Clarifications and formatting changes in ppc docs., Cédric Le Goater, 2022/01/12
- [PULL 13/34] target/ppc: Use ppc_interrupts_little_endian in powerpc_excp, Cédric Le Goater, 2022/01/12
- [PULL 30/34] ppc/pnv: move PHB4 XSCOM init to phb4_realize(), Cédric Le Goater, 2022/01/12
- [PULL 23/34] ppc/pnv: Complete user created PHB3 devices, Cédric Le Goater, 2022/01/12
- [PULL 27/34] pnv_phb4_pec.c: move pnv_pec_phb_offset() to pnv_phb4.c, Cédric Le Goater, 2022/01/12
- [PULL 12/34] target/ppc: Add MSR_ILE support to ppc_interrupts_little_endian, Cédric Le Goater, 2022/01/12
- [PULL 11/34] target/ppc: Add HV support to ppc_interrupts_little_endian, Cédric Le Goater, 2022/01/12
- [PULL 21/34] ppc/pnv: Introduce support for user created PHB3 devices, Cédric Le Goater, 2022/01/12
- [PULL 32/34] ppc/pnv: Introduce user creatable pnv-phb4 devices, Cédric Le Goater, 2022/01/12
- [PULL 29/34] ppc/pnv: set phb4 properties in stk_realize(), Cédric Le Goater, 2022/01/12