In this issue:
Re: Locale errors on 5.0-CURRENT (sparc)
Re: sparc64/46729: gethostbyname fails for NIS
Re: sparc64/46730: kldxref does not work
Re: sparc64/46732: kernel linker cannot resolve dependencies
Kdump fails to build from lastest sources
Re: terminal types - 5.0-RC2 install
(hopefully) working libc_r for sparc64
----------------------------------------------------------------------
Date: Sat, 4 Jan 2003 01:09:57 +0200
From: Maxim Mazurok <ma...@km.ua>
Subject: Re: Locale errors on 5.0-CURRENT (sparc)
On Fri, Jan 03, 2003 at 02:53:32PM +0000, Olafur Osvaldsson wrote:
>Removing the exclude for sparc64 in src/share/Makefile rebuilding/installing
>fixes this for me and I see nothing wrong with the is_IS.ISO8859-1 locale so
>far.
>
>Unless there is some real reason for excluding it I suggest that the sparc64
>test is removed from that file.
YES! It's worked!
I use next:
export LANG=C
unset LC_ALL
export LC_CTYPE=ru_RU.KOI8-R
- --
Maxim Mazurok (MMP2-RIPE)
------------------------------
Date: Fri, 3 Jan 2003 17:50:23 -0800 (PST)
From: Bill Fenner <fen...@FreeBSD.org>
Subject: Re: sparc64/46729: gethostbyname fails for NIS
Synopsis: gethostbyname fails for NIS
Responsible-Changed-From-To: freebsd-sparc->fenner
Responsible-Changed-By: fenner
Responsible-Changed-When: Fri Jan 3 17:50:22 PST 2003
Responsible-Changed-Why:
http://www.freebsd.org/cgi/query-pr.cgi?pr=46729
------------------------------
Date: Fri, 3 Jan 2003 18:01:33 -0800 (PST)
From: Jake Burkholder <ja...@FreeBSD.org>
Subject: Re: sparc64/46730: kldxref does not work
Synopsis: kldxref does not work
Responsible-Changed-From-To: freebsd-sparc->jake
Responsible-Changed-By: jake
Responsible-Changed-When: Fri Jan 3 18:00:28 PST 2003
Responsible-Changed-Why:
http://www.freebsd.org/cgi/query-pr.cgi?pr=46730
------------------------------
Date: Fri, 3 Jan 2003 18:02:57 -0800 (PST)
From: Jake Burkholder <ja...@FreeBSD.org>
Subject: Re: sparc64/46732: kernel linker cannot resolve dependencies
Synopsis: kernel linker cannot resolve dependencies
Responsible-Changed-From-To: freebsd-sparc->jake
Responsible-Changed-By: jake
Responsible-Changed-When: Fri Jan 3 18:02:43 PST 2003
Responsible-Changed-Why:
http://www.freebsd.org/cgi/query-pr.cgi?pr=46732
------------------------------
Date: Sat, 4 Jan 2003 11:23:26 -0000
From: "Bri" <br...@ukip.com>
Subject: Kdump fails to build from lastest sources
===> alias
===> apply
===> asa
===> at
===> awk
===> banner
===> basename
===> biff
===> brandelf
===> bzip2
===> bzip2/doc
===> c89
===> c99
===> calendar
===> cap_mkdb
===> catman
===> chat
===> checknr
===> chflags
===> chpass
===> cksum
===> cmp
===> col
===> colcrt
===> colldef
===> colrm
===> column
===> comm
===> compile_et
===> compress
===> csplit
===> ctags
===> cut
===> dirname
===> du
===> ee
===> elf2aout
===> enigma
===> env
===> expand
===> false
===> fetch
===> file
===> file2c
===> find
===> finger
===> fmt
===> fold
===> from
===> fstat
===> fsync
===> ftp
===> gcore
===> gencat
===> getconf
===> getopt
===> gprof
===> head
===> hesinfo
===> hexdump
===> id
===> indent
===> ipcrm
===> ipcs
===> join
===> jot
===> kdump
cc -O -pipe -I/usr/cvsroot/src/usr.bin/kdump/../ktrace -I/usr/cvsroot/src/u
sr.bin/kdump/../.. -c ioctl.c
In file included from ioctl.c:73:
/usr/include/sys/diskpc98.h:47: redefinition of `struct dos_partition'
*** Error code 1
Stop in /usr/cvsroot/src/usr.bin/kdump.
*** Error code 1
Stop in /usr/cvsroot/src/usr.bin.
------------------------------
Date: Sat, 4 Jan 2003 09:24:18 -0800
From: "David O'Brien" <obr...@freebsd.org>
Subject: Re: terminal types - 5.0-RC2 install
On Fri, Jan 03, 2003 at 01:59:56PM +0100, Piotr Wo?niak wrote:
> Hi,
>
> I'm installing FreeBSD on Ultra5..
> What type of terminal (in the beginning of installation) should I choise
> not to get rubbish on the screen?
I use the conserver port for my terminal emulator and a terminal type of
"vt100".
------------------------------
Date: Sun, 5 Jan 2003 03:33:36 +0100
From: Thomas Moestl <t...@FreeBSD.org>
Subject: (hopefully) working libc_r for sparc64
- --TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
I think I got libc_r working, after rewriting longjmp() and friends so
that they do not require the corresponding setjmp() to be done in an
ancestor function in the call graph any more, i.e. it can be used to
switch stacks now. This might also get other threading packages to
work, e.g. ruby's integrated thread manager.
I've attached a diff that contains these changes, and also patches to
libc_r to add the necessary MD code. The latter are based on diffs
that des posted to this list some time ago.
To apply this, you will need to do a 'mkdir libc_r/arch/sparc64' in
your src directory before.
It would be nice if people could test these changes a bit, both with
applications that make extensive use of the *jmp() functions and with
libc_r-using programs. Please be aware however that by installing an
experimental libc you might hose your system (although things seem to
work fine for me).
- Thomas
- --
Thomas Moestl <tmo...@gmx.net> http://www.tu-bs.de/~y0015675/
<t...@FreeBSD.org> http://people.FreeBSD.org/~tmm/
PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C
- --TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="pthread.diff"
Content-Transfer-Encoding: 8bit
Index: Makefile
===================================================================
RCS file: /ncvs/src/lib/Makefile,v
retrieving revision 1.145
diff -u -r1.145 Makefile
- --- Makefile 4 Oct 2002 13:40:39 -0000 1.145
+++ Makefile 5 Jan 2003 01:56:45 -0000
@@ -40,7 +40,7 @@
_csu=csu
.endif
- -.if !defined(NOLIBC_R) && ${MACHINE_ARCH} != ia64 && ${MACHINE_ARCH} != sparc64
+.if !defined(NOLIBC_R) && ${MACHINE_ARCH} != ia64
_libc_r= libc_r
.endif
Index: libc/sparc64/gen/_setjmp.S
===================================================================
RCS file: /ncvs/src/lib/libc/sparc64/gen/_setjmp.S,v
retrieving revision 1.4
diff -u -r1.4 _setjmp.S
- --- libc/sparc64/gen/_setjmp.S 29 Jun 2002 03:23:51 -0000 1.4
+++ libc/sparc64/gen/_setjmp.S 5 Jan 2003 00:52:21 -0000
@@ -58,42 +58,26 @@
* will generate a "return(v?v:1)" from
* the last call to
* _setjmp(a)
- - * by unwinding the call stack.
+ * by restoring the previous context.
* The previous signal state is NOT restored.
*/
ENTRY(_setjmp)
stx %sp, [%o0 + _JB_SP]
stx %o7, [%o0 + _JB_PC]
- - stx %fp, [%o0 + _JB_FP]
retl
clr %o0
END(_setjmp)
- -ENTRY(_longjmp)
- - mov 1, %g1
- - movrnz %o1, %o1, %g1 ! compute v ? v : 1
- - mov %o0, %g2
- - ldx [%g2 + _JB_FP], %g3 ! fetch callers frame
- -1: cmp %fp, %g3 ! compare against desired frame
- - bl,a 1b ! if below,
- - restore ! pop frame and loop
- - be,a 2f ! if there,
- - ldx [%g2 + _JB_SP], %o0 ! fetch return %sp
- -
- -.Lbotch:
- - call CNAME(longjmperror)
- - nop
- - call CNAME(abort)
- - nop
- - illtrap
- -
- -2: cmp %o0, %sp ! %sp must not decrease
- - bge,a 3f
- - mov %o0, %sp ! it is OK, put it in place
- - b,a .Lbotch
- - nop
- -3: ldx [%g2 + _JB_PC], %o7 ! fetch return address
- - retl
- - mov %g1, %o0 ! return v ? v : 1;
+ .weak CNAME(_longjmp)
+ .set CNAME(_longjmp),CNAME(___longjmp)
+ENTRY(___longjmp)
+ save %sp, -CCFSZ, %sp
+ flushw
+ ldx [%i0 + _JB_SP], %fp
+ ldx [%i0 + _JB_PC], %i7
+ mov 1, %i0
+ movrnz %i1, %i1, %i0
+ ret
+ restore
END(_longjmp)
Index: libc/sparc64/gen/setjmp.S
===================================================================
RCS file: /ncvs/src/lib/libc/sparc64/gen/setjmp.S,v
retrieving revision 1.3
diff -u -r1.3 setjmp.S
- --- libc/sparc64/gen/setjmp.S 29 Jun 2002 03:23:51 -0000 1.3
+++ libc/sparc64/gen/setjmp.S 5 Jan 2003 00:45:56 -0000
@@ -70,7 +70,6 @@
restore
stx %sp, [%o0 + _JB_SP]
stx %o7, [%o0 + _JB_PC]
- - stx %fp, [%o0 + _JB_FP]
retl
clr %o0
END(setjmp)
@@ -79,34 +78,15 @@
.set CNAME(longjmp),CNAME(__longjmp)
ENTRY(__longjmp)
save %sp, -CCFSZ, %sp
+ flushw
mov SIG_SETMASK, %o0
add %i0, _JB_SIGMASK, %o1
call CNAME(sigprocmask)
clr %o2
- - restore
- - mov 1, %g1
- - movrnz %o1, %o1, %g1
- - mov %o0, %g2
- - ldx [%g2 + _JB_FP], %g3
- -1: cmp %fp, %g3
- - bl,a 1b
+ ldx [%i0 + _JB_SP], %fp
+ ldx [%i0 + _JB_PC], %i7
+ mov 1, %i0
+ movrnz %i1, %i1, %i0
+ ret
restore
- - be,a 2f
- - ldx [%g2 + _JB_SP], %o0
- -
- -.Lbotch:
- - call CNAME(longjmperror)
- - nop
- - call CNAME(abort)
- - nop
- - illtrap
- -
- -2: cmp %o0, %sp
- - bge,a 3f
- - mov %o0, %sp
- - b,a .Lbotch
- - nop
- -3: ldx [%g2 + _JB_PC], %o7
- - retl
- - mov %g1, %o0
END(__longjmp)
Index: libc/sparc64/gen/sigsetjmp.S
===================================================================
RCS file: /ncvs/src/lib/libc/sparc64/gen/sigsetjmp.S,v
retrieving revision 1.4
diff -u -r1.4 sigsetjmp.S
- --- libc/sparc64/gen/sigsetjmp.S 29 Jun 2002 03:23:51 -0000 1.4
+++ libc/sparc64/gen/sigsetjmp.S 4 Jan 2003 21:16:29 -0000
@@ -43,7 +43,9 @@
stx %o1, [%o0 + _JB_SIGFLAG]
END(sigsetjmp)
- -ENTRY(siglongjmp)
+ .weak CNAME(siglongjmp);
+ .set CNAME(siglongjmp),CNAME(__siglongjmp);
+ENTRY(__siglongjmp)
PIC_PROLOGUE(%o3, %o2)
SET(CNAME(longjmp), %o2, %o3)
SET(CNAME(_longjmp), %o2, %o4)
@@ -51,4 +53,4 @@
movrnz %o2, %o3, %o4
jmp %o4
nop
- -END(siglongjmp)
+END(__siglongjmp)
Index: libc_r/uthread/pthread_private.h
===================================================================
RCS file: /ncvs/src/lib/libc_r/uthread/pthread_private.h,v
retrieving revision 1.76
diff -u -r1.76 pthread_private.h
- --- libc_r/uthread/pthread_private.h 13 Nov 2002 18:13:26 -0000 1.76
+++ libc_r/uthread/pthread_private.h 5 Jan 2003 01:59:21 -0000
@@ -67,6 +67,7 @@
* address in a jmp_buf context.
*
* XXX - These need to be moved into architecture dependent support files.
+ * XXX - These need to be documented so porters know what's required.
*/
#if defined(__i386__)
#define GET_STACK_JB(jb) ((unsigned long)((jb)[0]._jb[2]))
@@ -101,6 +102,34 @@
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
} while (0)
+#elif defined(__sparc64__)
+#include <machine/frame.h>
+
+#define CCFSZ sizeof (struct frame)
+
+#define GET_STACK_JB(jb) \
+ ((unsigned long)((jb)[0]._jb[_JB_SP]) + SPOFF)
+#define GET_STACK_SJB(sjb) \
+ ((unsigned long)((sjb)[0]._sjb[_JB_SP]) + SPOFF)
+#define GET_STACK_UC(ucp) \
+ ((ucp)->uc_mcontext.mc_sp + SPOFF)
+/*
+ * XXX: sparc64 _longjmp() expects a register window on the stack
+ * at the given position, so we must make sure that the space where
+ * it is expected is readable. Subtracting the frame size here works
+ * because the SET_STACK macros are only used to set up new stacks
+ * or signal stacks, but it is a bit dirty.
+ */
+#define SET_STACK_JB(jb, stk) \
+ (jb)[0]._jb[_JB_SP] = (long)(stk - SPOFF - CCFSZ)
+#define SET_STACK_SJB(sjb, stk) \
+ (sjb)[0]._sjb[_JB_SP] = (long)(stk - SPOFF - CCFSZ)
+#define SET_STACK_UC(ucp, stk) \
+ (ucp)->uc_mcontext.mc_sp = (unsigned long)(stk - SPOFF - CCFSZ)
+#define FP_SAVE_UC(ucp) /* XXX */
+#define FP_RESTORE_UC(ucp) /* XXX */
+#define SET_RETURN_ADDR_JB(jb, ra) \
+ (jb)[0]._jb[_JB_PC] = (long)(ra - 8)
#else
#error "Don't recognize this architecture!"
#endif
- --- /dev/null Sun Jan 5 03:00:01 2003
+++ libc_r/arch/sparc64/_atomic_lock.S Sat Jan 4 21:46:19 2003
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2002 Dag-Erling Coïdan Smørgrav
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in this position and unchanged.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
+
+/*
+ * long _atomic_lock(long *)
+ *
+ * Atomically acquire a lock by storing a non-zero value in its
+ * location, provided it is not already locked. Note that we only use
+ * the first byte of the location provided.
+ */
+ENTRY(_atomic_lock)
+ ldstub [%o0], %o1
+ membar #LoadLoad | #StoreStore
+ retl
+ mov %o1, %o0
+END(_atomic_lock)
Index: usr.sbin/Makefile
===================================================================
RCS file: /ncvs/src/usr.sbin/Makefile,v
retrieving revision 1.240
diff -u -r1.240 Makefile
- --- usr.sbin/Makefile 30 Dec 2002 10:13:16 -0000 1.240
+++ usr.sbin/Makefile 5 Jan 2003 02:29:38 -0000
@@ -135,7 +135,7 @@
iptest
.endif
- -.if !defined(NOLIBC_R) && ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "sparc64"
+.if !defined(NOLIBC_R) && ${MACHINE_ARCH} != "ia64"
SUBDIR+=pppctl
.endif
- --TakKZr9L6Hm6aLOc--
------------------------------
End of freebsd-sparc-digest V5 #209
***********************************
To Unsubscribe: send mail to majo...@FreeBSD.org
with unsubscribe freebsd-sparc-digest in the body of the message