[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 14/14] target-ppc: Extend HWCAP2 bits for ISA 3.0
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 14/14] target-ppc: Extend HWCAP2 bits for ISA 3.0 |
Date: |
Fri, 7 Sep 2018 17:31:55 +1000 |
From: Sandipan Das <address@hidden>
This adds the HWCAP2 bit to detect if a linux user process is
running on an ISA 3.0 compliant cpu like POWER9. This can be
verified using a simple test program that prints the value in
the auxiliary vector for AT_HWCAP2 as shown below.
Before:
$ qemu-ppc64le -cpu power8 test
0x8c000000
$ qemu-ppc64le -cpu power9 test
0x8c000000
After:
$ qemu-ppc64le -cpu power8 test
0x8c000000
$ qemu-ppc64le -cpu power9 test
0x8c800000
Signed-off-by: Sandipan Das <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
linux-user/elfload.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 8638612aec..e97c4cde49 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -710,6 +710,7 @@ enum {
QEMU_PPC_FEATURE2_HAS_EBB = 0x10000000, /* Event Base Branching */
QEMU_PPC_FEATURE2_HAS_ISEL = 0x08000000, /* Integer Select */
QEMU_PPC_FEATURE2_HAS_TAR = 0x04000000, /* Target Address Register */
+ QEMU_PPC_FEATURE2_ARCH_3_00 = 0x00800000, /* ISA 3.00 */
};
#define ELF_HWCAP get_elf_hwcap()
@@ -764,6 +765,7 @@ static uint32_t get_elf_hwcap2(void)
GET_FEATURE2(PPC2_BCTAR_ISA207, QEMU_PPC_FEATURE2_HAS_TAR);
GET_FEATURE2((PPC2_BCTAR_ISA207 | PPC2_LSQ_ISA207 | PPC2_ALTIVEC_207 |
PPC2_ISA207S), QEMU_PPC_FEATURE2_ARCH_2_07);
+ GET_FEATURE2(PPC2_ISA300, QEMU_PPC_FEATURE2_ARCH_3_00);
#undef GET_FEATURE
#undef GET_FEATURE2
--
2.17.1
- [Qemu-ppc] [PULL 00/14] ppc-for-3.1 queue 20180907, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 02/14] spapr: fix leak of rev array, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 04/14] macio: move MACIOIDEState type declarations to macio.h, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 14/14] target-ppc: Extend HWCAP2 bits for ISA 3.0,
David Gibson <=
- [Qemu-ppc] [PULL 08/14] mac_oldworld: implement custom FWPathProvider, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 05/14] macio: add macio bus to help with fw path generation, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 09/14] uninorth: add ofw-addr property to allow correct fw path generation, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 06/14] macio: add addr property to macio IDE object, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 10/14] mac_newworld: implement custom FWPathProvider, David Gibson, 2018/09/07
- [Qemu-ppc] [PULL 01/14] ppc: Remove deprecated ppcemb target, David Gibson, 2018/09/07