Re: CVS commit: src

2012-09-12 Thread Emmanuel Dreyfus
Matt Thomas m...@3am-software.com wrote: Only those ports which reserve a register in mcontext for the TCB pointer should define _UC_TLSBASE. Otherwise _UC_TLSBASE has no meaning and thus should not be defined. Well, we have the choice between: - define it and keeep it unused - not define it

Re: CVS commit: src

2012-09-12 Thread Emmanuel Dreyfus
On Tue, Sep 11, 2012 at 11:20:47PM -0700, Matt Thomas wrote: _UC_TLSBASE is an MD thing. iMO it is a MI interface with a MD implementation. It just says whether TLS is part of struct mcontext or not. The MD code can handle that in the kernel or in userland if that is possible. Defining it

Fetching uboot env vars from inside netbsd kernel

2012-09-12 Thread Rajasekhar Pulluru
Hi, I would like to know if there is a way to read uboot environment variables from inside netbsd kernel. If yes, please provide few references. I would also like to know if there is an option to pass command line arguments to kernel from uboot, something like CONFIG_CMDLINE in linux. Thanks

Re: CVS commit: src

2012-09-12 Thread Martin Husemann
On Wed, Sep 12, 2012 at 01:00:52PM +, Christos Zoulas wrote: This is orthogonal. I believe that in the discussion we had in core we decided to not define _UC_TLSBASE unconditionally, and that ports should define it as needed. What does as needed mean here? Can you show an example of an

Re: CVS commit: src

2012-09-12 Thread Christos Zoulas
On Sep 12, 4:04pm, mar...@duskware.de (Martin Husemann) wrote: -- Subject: Re: CVS commit: src | On Wed, Sep 12, 2012 at 01:00:52PM +, Christos Zoulas wrote: | This is orthogonal. I believe that in the discussion we had in core | we decided to not define _UC_TLSBASE unconditionally, and

Re: CVS commit: src (_UC_TLSBASE)

2012-09-12 Thread Matt Thomas
On Sep 12, 2012, at 12:26 AM, Emmanuel Dreyfus wrote: On Tue, Sep 11, 2012 at 11:20:47PM -0700, Matt Thomas wrote: _UC_TLSBASE is an MD thing. iMO it is a MI interface with a MD implementation. It just says whether TLS is part of struct mcontext or not. The MD code can handle that in

Re: CVS commit: src

2012-09-12 Thread Matt Thomas
On Sep 12, 2012, at 7:04 AM, Martin Husemann wrote: On Wed, Sep 12, 2012 at 01:00:52PM +, Christos Zoulas wrote: This is orthogonal. I believe that in the discussion we had in core we decided to not define _UC_TLSBASE unconditionally, and that ports should define it as needed. What

Re: Fetching uboot env vars from inside netbsd kernel

2012-09-12 Thread Rajasekhar Pulluru
Hi, I figured out that we could set 'bootargs' from uboot and it's passed as last argument of the second stage loader. Thanks Regards, Rajasekhar On Wed, Sep 12, 2012 at 7:24 PM, Rajasekhar Pulluru pullururajasek...@gmail.com wrote: Hi, I would like to know if there is a way to read uboot

freebsd binary and kern.usrstack

2012-09-12 Thread Manuel Bouyer
Hello, I'm trying to run a FreeBSD binary under emulation, but it dies in this piece of code: if (sysctl(mib, 2, _usrstack, len, NULL, 0) == -1) PANIC(Cannot get kern.usrstack from sysctl); (this is in FreeBSD's src/lib/libthr/thread/thr_init.c). Is there something that

Re: freebsd binary and kern.usrstack

2012-09-12 Thread Joerg Sonnenberger
On Wed, Sep 12, 2012 at 10:28:23PM +0200, Manuel Bouyer wrote: Hello, I'm trying to run a FreeBSD binary under emulation, but it dies in this piece of code: if (sysctl(mib, 2, _usrstack, len, NULL, 0) == -1) PANIC(Cannot get kern.usrstack from sysctl); (this is in

Re: freebsd binary and kern.usrstack

2012-09-12 Thread Manuel Bouyer
On Wed, Sep 12, 2012 at 10:51:55PM +0200, Joerg Sonnenberger wrote: On Wed, Sep 12, 2012 at 10:28:23PM +0200, Manuel Bouyer wrote: Hello, I'm trying to run a FreeBSD binary under emulation, but it dies in this piece of code: if (sysctl(mib, 2, _usrstack, len, NULL, 0) == -1)

re: freebsd binary and kern.usrstack

2012-09-12 Thread matthew green
OK. Indeed it doesn't looks very good. The 32bit binary aborts on a 32bit host becuase of the missing above sysctl , but I couldn't get neither the 32 or 64bit binaries to run at all on a 64bit host. doesn't look like amd64 has any support for freebsd at all.

Re: freebsd binary and kern.usrstack

2012-09-12 Thread Christos Zoulas
In article 20120912202823.ga5...@antioche.eu.org, Manuel Bouyer bou...@antioche.eu.org wrote: Hello, I'm trying to run a FreeBSD binary under emulation, but it dies in this piece of code: if (sysctl(mib, 2, _usrstack, len, NULL, 0) == -1) PANIC(Cannot get kern.usrstack from