[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform
From: |
Laurent Vivier |
Subject: |
[PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform |
Date: |
Fri, 5 Jun 2020 13:46:44 +0200 |
From: Helge Deller <deller@gmx.de>
Provide our own /proc/cpuinfo file for the hppa (parisc) platform.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200424210648.GA26715@ls3530.fritz.box>
[lv: s/an/our/]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fd5c4f1d73e6..63c40c48e31f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7438,6 +7438,18 @@ static int open_cpuinfo(void *cpu_env, int fd)
}
#endif
+#if defined(TARGET_HPPA)
+static int open_cpuinfo(void *cpu_env, int fd)
+{
+ dprintf(fd, "cpu family\t: PA-RISC 1.1e\n");
+ dprintf(fd, "cpu\t\t: PA7300LC (PCX-L2)\n");
+ dprintf(fd, "capabilities\t: os32\n");
+ dprintf(fd, "model\t\t: 9000/778/B160L\n");
+ dprintf(fd, "model name\t: Merlin L2 160 QEMU (9000/778/B160L)\n");
+ return 0;
+}
+#endif
+
#if defined(TARGET_M68K)
static int open_hardware(void *cpu_env, int fd)
{
@@ -7462,7 +7474,7 @@ static int do_openat(void *cpu_env, int dirfd, const char
*pathname, int flags,
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
{ "/proc/net/route", open_net_route, is_proc },
#endif
-#if defined(TARGET_SPARC)
+#if defined(TARGET_SPARC) || defined(TARGET_HPPA)
{ "/proc/cpuinfo", open_cpuinfo, is_proc },
#endif
#if defined(TARGET_M68K)
--
2.26.2
- [PULL 02/19] linux-user: return target error codes for socket() and prctl(), (continued)
- [PULL 02/19] linux-user: return target error codes for socket() and prctl(), Laurent Vivier, 2020/06/05
- [PULL 01/19] linux-user, alpha: fix oldumount syscall, Laurent Vivier, 2020/06/05
- Re: [PULL 00/19] Linux user for 5.1 patches, Laurent Vivier, 2020/06/05
- [PULL 00/19] Linux user for 5.1 patches, Laurent Vivier, 2020/06/05
- [PULL 01/19] linux-user, alpha: fix oldumount syscall, Laurent Vivier, 2020/06/05
- [PULL 02/19] linux-user: return target error codes for socket() and prctl(), Laurent Vivier, 2020/06/05
- [PULL 12/19] stubs/Makefile: Reduce the user-mode object list, Laurent Vivier, 2020/06/05
- [PULL 11/19] util/Makefile: Reduce the user-mode object list, Laurent Vivier, 2020/06/05
- [PULL 06/19] linux-user: implement OFD locks, Laurent Vivier, 2020/06/05
- [PULL 09/19] tests/Makefile: Only display TCG-related tests when TCG is available, Laurent Vivier, 2020/06/05
- [PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform,
Laurent Vivier <=
- [PULL 13/19] target/riscv/cpu: Restrict CPU migration to system-mode, Laurent Vivier, 2020/06/05
- [PULL 19/19] stubs: Restrict ui/win32-kbd-hook to system-mode, Laurent Vivier, 2020/06/05
- [PULL 04/19] linux-user/strace.list: fix epoll_create{, 1} -strace output, Laurent Vivier, 2020/06/05
- [PULL 05/19] linux-user/mmap.c: fix integer underflow in target_mremap, Laurent Vivier, 2020/06/05
- [PULL 16/19] target/i386: Restrict CpuClass::get_crash_info() to system-mode, Laurent Vivier, 2020/06/05
- [PULL 10/19] tests/Makefile: Restrict some softmmu-only tests, Laurent Vivier, 2020/06/05
- [PULL 08/19] configure: Avoid building TCG when not needed, Laurent Vivier, 2020/06/05
- [PULL 07/19] Makefile: Only build virtiofsd if system-mode is enabled, Laurent Vivier, 2020/06/05
- [PULL 17/19] target/s390x: Restrict CpuClass::get_crash_info() to system-mode, Laurent Vivier, 2020/06/05
- [PULL 14/19] exec: Assert CPU migration is not used on user-only build, Laurent Vivier, 2020/06/05