Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2010 03:34:02 +0530
From:      "Jayachandran C." <c.jayachandran@gmail.com>
To:        Randall Stewart <rrs@lakerest.net>, Juli Mallett <jmallett@freebsd.org>,  "M. Warner Losh" <imp@bsdimp.com>, freebsd-mips@freebsd.org
Subject:   Re: Merging 64 bit changes to -HEAD - part 3
Message-ID:  <AANLkTimQbw57AUGXd2A9Ql98VvtkInsdHX7jDor1rLwe@mail.gmail.com>
In-Reply-To: <AANLkTim5aGluEVgYQQxgBDn2aJIuUIIMszmk7D3lVEGi@mail.gmail.com>
References:  <AANLkTim5aGluEVgYQQxgBDn2aJIuUIIMszmk7D3lVEGi@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Mon, Jun 21, 2010 at 10:18 PM, Jayachandran C.
<c.jayachandran@gmail.com> wrote:
> On Tue, Jun 15, 2010 at 7:06 PM, Jayachandran C.
> <c.jayachandran@gmail.com> wrote:
>> I have volunteered to merge Juli's 64-bit work into HEAD,  and
>> hopefully get it to work on XLR too. The tree
>> (http://svn.freebsd.org/base/user/jmallett/octeon) has quite a bit of
>> changes, so I would like to do this over multiple changesets and
>> without breaking the current o32 code.
>
> And here's the third batch for the merge, two patches here:
>
> n64-n32-compile.patch:
> Main changes are:
> - Support for n64 and n32 kernel compilation
> - casts between registers and ptr/int updated to work on 64bit
> - 64-bit address space defines
> - syscall, exception and trap support for n32/n64
>
> I have made some minor changes from the Juli's version to reduce the
> number of #ifdefs, but mostly the code is equivalent.
>
> n32-kernel.patch:
> - Support to build n32 kernel for XLR, sample conf file and ldscript
>
> With these two patches the kernel comes up in n32 single user mode.
> Please let me know your comments.
>
> The next set should cover the full n64 support.


Here's two more patches of the same set:
n64-n32-compile-2.patch:
- changes to mips/include/asm.h I had missed in earlier set, needed
for userspace compile.

n64-32-fixes.patch
- Three small fixes to the issues I had seen in the n64/n32 changes so far

With this n32 userspace and kernel does a full multi-user SMP boot on
XLR. Will do few more tests to see if there are any obvious problems.

JC

[-- Attachment #2 --]
Index: sys/mips/include/asm.h
===================================================================
--- sys/mips/include/asm.h	(revision 209367)
+++ sys/mips/include/asm.h	(working copy)
@@ -806,10 +806,11 @@
  *       9	S7
  *       10	SP
  *       11	S8
- *       12	signal mask	(dependant on magic)
- *       13	(con't)
+ *       12	GP		(dependent on ABI)
+ *       13	signal mask	(dependant on magic)
  *       14	(con't)
  *       15	(con't)
+ *       16	(con't)
  *
  * The magic number number identifies the jmp_buf and
  * how the buffer was created as well as providing
@@ -834,9 +835,12 @@
 #define _JB_REG_S7		9
 #define _JB_REG_SP		10
 #define _JB_REG_S8		11
+#if defined(__mips_n32) || defined(__mips_n64)
+#define	_JB_REG_GP		12
+#endif
 
 /* Only valid with the _JB_MAGIC_SETJMP magic */
 
-#define _JB_SIGMASK		12
+#define _JB_SIGMASK		13
 
 #endif /* !_MACHINE_ASM_H_ */

[-- Attachment #3 --]
Index: lib/libc/mips/sys/brk.S
===================================================================
--- lib/libc/mips/sys/brk.S	(revision 209367)
+++ lib/libc/mips/sys/brk.S	(working copy)
@@ -47,7 +47,7 @@
 
 	.data
 _C_LABEL(minbrk):
-	.word	_C_LABEL(_end)
+	PTR_WORD	_C_LABEL(_end)
 
 	.text
 LEAF(__sys_brk)
Index: lib/libc/mips/sys/sbrk.S
===================================================================
--- lib/libc/mips/sys/sbrk.S	(revision 209367)
+++ lib/libc/mips/sys/sbrk.S	(working copy)
@@ -46,7 +46,7 @@
 
 	.data
 _C_LABEL(__curbrk):
-	.word	_C_LABEL(_end)
+	PTR_WORD	_C_LABEL(_end)
 	.text
 
 LEAF(__sys_sbrk)
Index: contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
===================================================================
--- contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh	(revision 209367)
+++ contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh	(working copy)
@@ -9,6 +9,7 @@
 OUTPUT_FORMAT="elf32-bigmips"
 BIG_OUTPUT_FORMAT="elf32-bigmips"
 LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+ALIGNMENT=8
 
 TEMPLATE_NAME=elf32
 

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimQbw57AUGXd2A9Ql98VvtkInsdHX7jDor1rLwe>