Date: Wed, 5 Oct 2011 17:56:10 +0530 From: "Jayachandran C." <c.jayachandran@gmail.com> To: Kostik Belousov <kostikbel@gmail.com> Cc: mips@freebsd.org Subject: Re: Mips syscall entry point Message-ID: <CA%2B7sy7CKYLL7%2BMjB242=XkFP=S728m1=77%2BBqEra9KcmJ0tBKg@mail.gmail.com> In-Reply-To: <CA%2B7sy7BfMgyw5E%2BP6QzcH02Fn4eMNiD%2B__d0Ji8Fjq9rXBg5Lg@mail.gmail.com> References: <20111004211144.GW1511@deviant.kiev.zoral.com.ua> <20111004215218.GY1511@deviant.kiev.zoral.com.ua> <CA%2B7sy7BfMgyw5E%2BP6QzcH02Fn4eMNiD%2B__d0Ji8Fjq9rXBg5Lg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Oct 5, 2011 at 5:05 PM, Jayachandran C.
<c.jayachandran@gmail.com> wrote:
> On Wed, Oct 5, 2011 at 3:22 AM, Kostik Belousov <kostikbel@gmail.com> wrote:
>> On Wed, Oct 05, 2011 at 12:11:44AM +0300, Kostik Belousov wrote:
>>> Hi,
>>> below is the patch, test-compiled for XLP64 only, which converts the
>>> only remaining architecture MIPS to the new syscall entry sequence.
>>> The advantage of the conversion is sharing most of the code with all
>>> other architectures and avoiding duplication. Also, the implementation
>>> automatically feels the missed features for the MIPS, see the BUGS
>> s/feels/fills/, sorry
>>> section in the ptrace(2).
>> For the same reason, capsicum shall not work on MIPS.
>>
>>>
>>> I am asking for you help to debug and test the patch. Please keep me
>>> on Cc:, I am not on the list.
>>>
>>> Thank you.
>>>
>>> diff --git a/sys/mips/include/proc.h b/sys/mips/include/proc.h
>>> index 11a1f8e..4c0b0b6 100644
[...]
>
> This gives me a crash when I test it on XLR (32bit compile). The
> crash does not look obvious - I am looking at it, hope to resolve this
> soon.
Actually it is fairly obvious :) the elf*_machdep.c has to be updated
for using the cpu_fetch_syscall_args. With that change it comes up on
32 bit - will do a few more tests on 64 bit to see how that goes.
The other minor issue I saw was the locr0 usage in trap(), in call to
trapdebug_enter, it is fine now since TRAP_DEBUG is not defined.
JC.
[-- Attachment #2 --]
diff --git a/sys/mips/mips/elf64_machdep.c b/sys/mips/mips/elf64_machdep.c
index 9fa31fa..ee25ef4 100644
--- a/sys/mips/mips/elf64_machdep.c
+++ b/sys/mips/mips/elf64_machdep.c
@@ -80,8 +80,8 @@ struct sysentvec elf64_freebsd_sysvec = {
.sv_maxssiz = NULL,
.sv_flags = SV_ABI_FREEBSD | SV_LP64,
.sv_set_syscall_retval = cpu_set_syscall_retval,
- .sv_fetch_syscall_args = NULL, /* XXXKIB */
- .sv_syscallnames = NULL,
+ .sv_fetch_syscall_args = cpu_fetch_syscall_args,
+ .sv_syscallnames = syscallnames,
.sv_schedtail = NULL,
};
diff --git a/sys/mips/mips/elf_machdep.c b/sys/mips/mips/elf_machdep.c
index 41611e3..85ada0b 100644
--- a/sys/mips/mips/elf_machdep.c
+++ b/sys/mips/mips/elf_machdep.c
@@ -80,7 +80,7 @@ struct sysentvec elf64_freebsd_sysvec = {
.sv_maxssiz = NULL,
.sv_flags = SV_ABI_FREEBSD | SV_LP64,
.sv_set_syscall_retval = cpu_set_syscall_retval,
- .sv_fetch_syscall_args = NULL, /* XXXKIB */
+ .sv_fetch_syscall_args = cpu_fetch_syscall_args,
.sv_syscallnames = syscallnames,
.sv_schedtail = NULL,
};
@@ -136,7 +136,7 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_maxssiz = NULL,
.sv_flags = SV_ABI_FREEBSD | SV_ILP32,
.sv_set_syscall_retval = cpu_set_syscall_retval,
- .sv_fetch_syscall_args = NULL, /* XXXKIB */
+ .sv_fetch_syscall_args = cpu_fetch_syscall_args,
.sv_syscallnames = syscallnames,
.sv_schedtail = NULL,
};
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B7sy7CKYLL7%2BMjB242=XkFP=S728m1=77%2BBqEra9KcmJ0tBKg>
