Trinity for PA-RISC
Hi all,
out of boredom I did the first steps to port trinity to PA-RISC. The second patch is needed to get it compile, but since those headers are apparently not needed on other archs I suspect something is wrong with the PA-RISC headers. The implementation for some syscalls is missing, I just picked up what was available by default. Also everything currently is 32 bit. In contrast to what other archs do there currently is only a 32 bit userspace on PA-RISC, but there are many systems with a 64 bit userspace.
I have the hope that one of the usual suspects would use this to hammer on the kernel and fix the fallout. ;)
Eike
Quoted 1 line
From
563bbaf50193df24f592f41f0c0306c32d2e457dMon Sep 17 00:00:00 2001
From: Rolf Eike Beer <[email protected]>
Date: Tue, 22 Oct 2013 18:39:48 +0200
Subject: [PATCH 1/2] add basic information for PA-RISC architecture
--- include/arch-parisc.h | 22 +++ include/arch-syscalls.h | 3 + include/arch.h | 4 + include/syscalls-parisc.h | 347 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 376 insertions(+) create mode 100644 include/arch-parisc.h create mode 100644 include/syscalls-parisc.h
include/arch-parisc.h new file +22 -0
@@ -0,0 +1,22 @@ +// FIXME: depends on kernel bit size, userspace is always 32 bit + +#define PAGE_OFFSET 0x10000000 + +#if 0 +// for 64 bit +#define PAGE_OFFSET 0x40000000 +#endif + +#define KERNEL_ADDR 0xa0000000 // FIXME: Placeholder +#define MODULE_ADDR 0xa0000000L // FIXME: Placeholder +#define TASK_SIZE 0xa0000000 // FIXME: Placeholder + +#define PAGE_SHIFT 12 +#define PTE_FILE_MAX_BITS (32 - 11) + +#define PTRACE_GETREGS 0 +#define PTRACE_GETFPREGS 0 +#define PTRACE_SETREGS 0 +#define PTRACE_SETFPREGS 0 + +#define SYSCALLS syscalls_parisc
include/arch-syscalls.h +3 -0
@@ -38,4 +38,7 @@#ifdef __aarch64__#include "syscalls-aarch64.h" #endif +#ifdef __hppa__ +#include "syscalls-parisc.h" +#endif #endif /* _ARCH_SYSCALLS_H */
include/arch.h +4 -0
@@ -45,6 +45,10 @@#include "arch-aarch64.h" #endif +#ifdef __hppa__ +#include "arch-parisc.h" +#endif +#ifndef SYSCALL_OFFSET #define SYSCALL_OFFSET 0#endif
include/syscalls-parisc.h new file +347 -0
347 lines not on this page · raw message
Signature · 1 line
1.8.3.2
Quoted 1 line
From
3bb732227732e7577fe3e7c37a46eb05bea63cdcMon Sep 17 00:00:00 2001
From: Rolf Eike Beer <[email protected]>
Date: Tue, 22 Oct 2013 18:42:32 +0200
Subject: [PATCH 2/2] add more headers to fix compile on PA-RISC
--- syscalls/msgrcv.c | 1 + syscalls/msgsnd.c | 1 + 2 files changed, 2 insertions(+)
syscalls/msgrcv.c +1 -0
@@ -1,6 +1,7 @@/* * SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, long, msgtyp, int, msgflg) */ +#include <sys/types.h> #include <linux/msg.h> #include "compat.h" #include "sanitise.h"
syscalls/msgsnd.c +1 -0
@@ -1,6 +1,7 @@/* * SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, int, msgflg) */ +#include <sys/types.h> #include <linux/msg.h> #include "compat.h" #include "sanitise.h"
Signature · 1 line
1.8.3.2