aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2020-04-24 23:06:48 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-06-05 21:22:24 +0200
commit93a5661dc5aca5c8c4eaa4b75f36707199a78f0e (patch)
tree704eb0c3a907b95560544230874a54aa6eab3b44 /linux-user
parent538fabcb46b956b65247b4e8cf701b63a58b70cc (diff)
linux-user: Add support for /proc/cpuinfo on hppa platform
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/ and add TARGET_HPPA to guard is_proc()] Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fd5c4f1d73..9ac3af20c1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7378,7 +7378,7 @@ static int is_proc_myself(const char *filename, const char *entry)
}
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) || \
- defined(TARGET_SPARC) || defined(TARGET_M68K)
+ defined(TARGET_SPARC) || defined(TARGET_M68K) || defined(TARGET_HPPA)
static int is_proc(const char *filename, const char *entry)
{
return strcmp(filename, entry) == 0;
@@ -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)