Re: gcc -O broken in CURRENT

2002-03-14 Thread Bruce Evans

On Thu, 14 Mar 2002, ozan s. yigit wrote:

> > Add the -ffloat-store flag to your compilation flags (or
> > add -msoft-float).
>
> that really means for this compiler on certain platforms, you
> can have slow and correct or fast and incorrect, but NOT fast
> and correct.

I think fast and correct is impossible on i386's.  "Correct"
requires assignments and casts to discard any extra precision,
and the fastest way to implement this is probably to store to
memory and reload.  The -ffloat-store kludge only does a subset
of the necessary conversions.  Doing them all would be slower
and correct, which is why gcc doesn't do them.  C90 can be read
as permitting this incorrectness, but C99 doesn't permit it.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: execution access control

2002-03-14 Thread Ugen Antsilevitch

> you name an object, but what object you act on.  The namespace 
> approachhas merit too, and is the basis for the DTE work done at 
> TIS a number of
> years ago.  You might be interested in taking a look at some of 
> the DTE
> papers published at USENIX...
 I have seen this work - this is almost exactly what i am hacking
around here with a couple of notable exceptions:
- Making everything non-system-specific (hence using names - the access
  control engine doesn't need to know what's outside).
- Allowing moves between "nodes" (things they call "domains", my
  control structure is pretty much a tree, described in XML :
  based not only on execution but on external rules.
- Above should link into firewall rules - that will make some neat 
  things possible (like having identical ssh shells restricted to
  different sets of command execution and file access based on
  where you come from:)
 
 On the partially related note, this whole thing is configured through
parsing pseudo-device. It takes some (rigorously defined and enforced) 
format definitions and structure pointers, then fills the structures
and hands them back to anything in the kernel. 
 This can be useful as a generic interface for anything that 
doesn't have one (instead of abusing ioctals, raw sockets and alike).
--Ugen


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic: pmap_enter

2002-03-14 Thread Matthew Dillon

:On Tue, 12 Mar 2002, Terry Lambert wrote:
:
:> #define blkmap(fs, map, loc) \
:> (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
:>
:> looks a little suspect, doesn't it?  "& 0" for 8 is probably
:> correct, but "& 1" for 4 and "& 2" for 2 and "& 4" for 1 is
:> probably not right... maybe:
:>
:> #define blkmap(fs, map, loc) \
:> (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & 0xff & ((0xff >> (NBBY -
:> (fs)->fs_frag))^0xff))
:>
:> Would be more right?  After all, it's the high bits of the low
:> bits you want to save, not the low bits of the low bits...
:>
:> -- Terry
:
:FWIW, I didn't mean to ignore this message, I was going to look it over
:carefully before commenting.  However, Sid Meier told me that I needed to
:spend some time taking over the world, so I was unable to.
:
:If anyone familiar with FFS wants to check it out, please be my guest,
:otherwise I'll try to get to it soon.
:
:Mike "Silby" Silbersack

That doesn't look like '& 0' for 8 to me.  NBBY is 8,
fs_frag of 8, results in 0xFF >> 0 which is 0xFF, not 0.
The original code looks correct.  Try this:

-Matt
Matthew Dillon 
<[EMAIL PROTECTED]>

/*
 * BLKMAP.C
 *
 * #define blkmap(fs, map, loc) \
   (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
 *
 * bno = block number (in fragment-sized blocks)
 * frag = fragment ratio N:1
 *
 */

#include 

#define NBBY 8

int
main(int ac, char **av)
{
int bno;

for (bno = 0; bno < 32; ++bno) {
int frag;

if ((bno & 15) == 0)
printf("BLOCK\t8:1\t\t\t4:1\t\t\t2:1\t\t\t1:1\n");
printf("%5d", bno);
for (frag = 8; frag >= 1; frag >>= 1) {
printf("\t([%d] >> %d) & 0x%02x",
bno / NBBY,
bno % NBBY,
0xFF >> (NBBY - frag)
);
}
printf("\n");
}
return(0);
}


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



test

2002-03-14 Thread Ugen Antsilevitch

please disregard..sorry.
--Ugen


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: PCI read config functions

2002-03-14 Thread Daniel O'Connor

On Fri, 2002-03-15 at 03:13, M. Warner Losh wrote:
> The pci config space is always mapped.  What does pciconf -r pciX:Y:Z
> 0:0xff say?  X:Y:Z is the pci bus address.

mdtest# pciconf -r pci0:11:0 0:0xff
0x0004 0x0283 0x07000202 0x0008
0xd8002000 0xc001 0x 0xc401
0x 0x 0x 0x
0x 0x 0x 0x0109
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x
0x 0x 0x 0x

Very odd :(
Time to install Linux on the machine and see if it works there I
think...

---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Another kernel newbie

2002-03-14 Thread Terry Lambert

"Kreider, Carl" wrote:
> I've been tasked with a driver for a video capture card. I've been
> following the example of the bktr driver, searched the net for
> information, bought "The Design and Implementation of the 4.4BSD
> Operating System", read the Developer's Handbook, etc.
> 
> I am working outside the kernel tree right now, in /usr/local/src
> and am ready to compile. However, sys/bus.h wants device_if.h and
> bus_if.h, which apparently are generated dynamically. How do I
> make that magic happen?

See /sys/modules/bktr/bktr/Makefile for an example of a Makefile
that does the necessary generation using the perl scripts.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Terry Lambert

Jan Stocker wrote:
> So now i am a little bit confused... State of the art:
> 
> 1) Bug is in -stable and -current
>--> This means possible patches only in -current arent responsible for
>this behaviour

Unless they were MFC'ed to -STABLE.  THis is why you generally
should compare -RELEASE versions, not -STABLE versions, since
-STABLE versions are moving targets and -RELEASE versions are
not.


> 2) Bug is in os delivered gcc but not in port gcc.
>a) port has more or less patches / os gcc has been modified
>   --> Didn't someone told they are the same?
>b) other options were set at compile time
>   --> Why dont change to the same in the port?
>   Leads it to a broken world?
>   If the only difference is the lost of binary compatibility,
>   i would say, ok... do it now and we'll need to compile
>   or ports...

SOme bugs are related to the FreeBSD use of setjmp/longjmp
to do exception unwinding rather than using the DWARF primitives.

When you change the toolchain, you change the exception unwinding
code when you use the ports version.

You also introduce incompatabilities with the installed libstdc++
library, which uses the setjmp/longjmp exception unwinding, which
will be in conflict with any exception throwing/handling code
compiled with the ports compiler that uses the DWARF2 version.

The tests that show it working with the ports version do not test
anything other than bare-bones operation, without testing code
interoperability eith vendor libraries.

Does that clear things up for you?

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: NULLFS in -STABLE

2002-03-14 Thread Terry Lambert

Attila Nagy wrote:
> The only thing, which seems to be changed that the NULLFS mount isn't
> recursive anymore.
> If I have:
> /stuff
> /stuff/.1
> /stuff/.2
> ...
> 
> (.* are directories, each one there is another partition mounted in)
> 
> and I mount /stuff to somewhere else with mount_null, I see only /stuff,
> and empty .* directories. So I have to do:
> mount_null /stuff /other_dir/stuff
> mount_null /stuff/.1 /other_dir/stuff/.1, etc.
> 
> BTW, this is only a minor issue.

THis is actually intentional.  THe mount point traversal occurs
at a covered dev_t/inode pair, and the nullfs has a different
dev_t for the vnode.

When you mount a / from a remote system NFS, you don't get the
/usr or other FS's mounted under it, either.  8-).


> Congratulations to anyone, who did this work!

B.P., Jake, and Russilan are the main guys responsible for
the work, which was mostly locing stuff introduced by changes
in the underlying code, and Russilan's major effor at emulating
the cache coherency for the VOP_GETPAGES/VOP_PUTPAGES to deal
with the cache coherency.  It's a brute-force approach, but it
works, and it was probably easier than getting the other changes
into FreeBSD to clear up the coherency through the paging path
directly.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Hiten Pandya

--- Jordan Hubbard <[EMAIL PROTECTED]> wrote:
> I'm not supposed to focus on Megahertz, I work for Apple, but various
> benchmarking folks also like to be able to print stats like this out
> on their comparison charts and it seems a lot easier than grepping
> /var/run/dmesg.boot. :)

I personally like the idea of these sysctls for cpu stats.. probably we
can have cpu.1.x.x and cpu.2.x.x and so on... just a thought :)

Regards,

  -- Hiten Pandya
  -- <[EMAIL PROTECTED]>

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Jordan Hubbard

> What for?  You haven't caught the Megahertz bug too, have you? 8)

I'm not supposed to focus on Megahertz, I work for Apple, but various
benchmarking folks also like to be able to print stats like this out
on their comparison charts and it seems a lot easier than grepping
/var/run/dmesg.boot. :)

- Jordan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



float [was Re: gcc -O broken in CURRENT]

2002-03-14 Thread ozan s. yigit

> If you really want to investigate FreeBSD FP/math capabilities
> search for UCBTEST or visit
> www.cs.berkeley.edu/~jhauser/arithmetic/TestFloat.html 

cool! thanks for the pointer.

oz
---
gag reflex is an essential part of computing. -- anon



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Steve Kargl

On Thu, Mar 14, 2002 at 07:50:38PM +0100, Raymond Wiker wrote:
> ozan s. yigit writes:
>  > > Add the -ffloat-store flag to your compilation flags (or
>  > > add -msoft-float).
>  > 
>  > that really means for this compiler on certain platforms, you
>  > can have slow and correct or fast and incorrect, but NOT fast
>  > and correct.
> 
> Actually, if -ffloat-store is the solution, the problem arises
> because you have fast and *too* correct.
> 

If the gcc manual is to be believed, then yes you are correct.
If you really want to investigate FreeBSD FP/math capabilities
search for UCBTEST or visit
www.cs.berkeley.edu/~jhauser/arithmetic/TestFloat.html 

-- 
Steve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread David O'Brien

On Wed, Mar 13, 2002 at 10:24:20PM +0100, Martin Blapp wrote:
> > We are using a set of patches that were part of gcc 2.95.3_test3.
> > Do you have a sample program in which exceptions are still broken on
> > FreeBSD 4.5?
> 
> cd /usr/ports/devel/stlport
> make install
> cd work/STL*/test/eh
> 
> add -O to gcc-freebsd.mk
> gmake -f gcc-freebsd.mk clean
> gmake -f gcc-freebsd.mk
> 
> and see what happens ...

This is not a small, [relatively] simple example program.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Raymond Wiker

ozan s. yigit writes:
 > > Add the -ffloat-store flag to your compilation flags (or
 > > add -msoft-float).
 > 
 > that really means for this compiler on certain platforms, you
 > can have slow and correct or fast and incorrect, but NOT fast
 > and correct.

Actually, if -ffloat-store is the solution, the problem arises
because you have fast and *too* correct.

-- 
Raymond WikerMail:  [EMAIL PROTECTED]
Senior Software Engineer Web:   http://www.fast.no/
Fast Search & Transfer ASA   Phone: +47 23 01 11 60
P.O. Box 1677 Vika   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY Mob:   +47 48 01 11 60

Try FAST Search: http://alltheweb.com/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread ozan s. yigit

> Add the -ffloat-store flag to your compilation flags (or
> add -msoft-float).

that really means for this compiler on certain platforms, you
can have slow and correct or fast and incorrect, but NOT fast
and correct.

oz
---
freedom has a mental cost. -- peter roosen-runge



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread David O'Brien

On Thu, Mar 14, 2002 at 01:20:51PM -0500, Alexander Kabaev wrote:
> >b) other options were set at compile time
> >   --> Why dont change to the same in the port?
> >   Leads it to a broken world?
> >   If the only difference is the lost of binary compatibility,
> >   i would say, ok... do it now and we'll need to compile
> >   or ports...
> Pretty much each and every C++ binary and shared library will have to be
> recompiled. Massive binary compatibility breakage is not an option for
> -STABLE, one can hope.

No it is not an option for -STABLE.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Another kernel newbie

2002-03-14 Thread Julian Elischer

check how the modules do this..
also, look at the example device driver in -current
/usr/share/examples/drivers/make_device_driver.sh
that makes and then compiles a driver.


On Thu, 14 Mar 2002, Kreider, Carl wrote:

> 
> I've been tasked with a driver for a video capture card. I've been
> following the example of the bktr driver, searched the net for
> information, bought "The Design and Implementation of the 4.4BSD
> Operating System", read the Developer's Handbook, etc.
> 
> I am working outside the kernel tree right now, in /usr/local/src
> and am ready to compile. However, sys/bus.h wants device_if.h and
> bus_if.h, which apparently are generated dynamically. How do I
> make that magic happen?
> 
> -- 
> Carl Kreider
> Doctor Design Services
> 700 E Beardsley  Suite 14A 
> Elkhart Indiana 46514
> 219-206-8050  x104
>  [EMAIL PROTECTED]  [EMAIL PROTECTED]
>[EMAIL PROTECTED]  [EMAIL PROTECTED]
> =
> "The reasonable man adapts himself to the world: the unreasonable one 
> persists in trying to adapt the world to himself. Therefore all progress 
> depends on the unreasonable man."
>   -- George Bernard Shaw
> =
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Steve Kargl

On Thu, Mar 14, 2002 at 12:59:31PM -0500, ozan s. yigit wrote:
> in a related tangential note, i recently found (out of sheer irritation)
> in less than an hour that several (including the latest) versions of GCC
>  -O and -O2 failed the paranoia test in different ways, to wit:
> 
> gcc -o paranoia paranoia.c
> 
> The number of  DEFECTs  discovered = 1.
> The number of  FLAWs  discovered =   1.
> 
> gcc -O2 -o paranoia paranoia.c
> 
> The number of  FAILUREs  encountered =   4.
> The number of  SERIOUS DEFECTs  discovered = 4.
> The number of  DEFECTs  discovered = 2.
> The number of  FLAWs  discovered =   2.
> 
> i assume everyone knows about kahan and paranoia. if not see netlib.
> 

Add the -ffloat-store flag to your compilation flags (or
add -msoft-float).

No failures, defects nor flaws have been discovered.
Rounding appears to conform to the proposed IEEE standard P754,
except for possibly Double Rounding during Gradual Underflow.
The arithmetic diagnosed appears to be Excellent!
END OF TEST.

-- 
Steve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Alexander Kabaev

> 2) Bug is in os delivered gcc but not in port gcc.
>a) port has more or less patches / os gcc has been modified
>   --> Didn't someone told they are the same?
GCC from ports uses DWARF2 exception unwinding while GCC in src tree
uses sjlj exceptions. The exception handling code generated by these two
compilers is very different as a result.

>b) other options were set at compile time
>   --> Why dont change to the same in the port?
>   Leads it to a broken world?
>   If the only difference is the lost of binary compatibility,
>   i would say, ok... do it now and we'll need to compile
>   or ports...
Pretty much each and every C++ binary and shared library will have to be
recompiled. Massive binary compatibility breakage is not an option for
-STABLE, one can hope.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread David O'Brien

On Thu, Mar 14, 2002 at 06:36:05PM +0100, Jan Stocker wrote:
> 2) Bug is in os delivered gcc but not in port gcc.
>a) port has more or less patches / os gcc has been modified
>   --> Didn't someone told they are the same?

Port has less patches.  If you look at
/usr/src/contrib/gcc/contrib/freebsd.h and
/usr/src/contrib/gcc/contrib/i386/freebsd.h you will see how much things
have to be modified because we support dual ELF/a.out [still].


>b) other options were set at compile time
>   --> Why dont change to the same in the port?

I am willing to -- the gcc295 port isn't used very much now AFAIK.
However, it will probably be once 5-CURRENT moves to a newer version.
The FSF GCC people had settings in the i386/freebsd.h file I did not
agree with, but it would have been too much pain to change them in the
FSF 2.95 release branch.

I am willing (and may have to anyway), make the port more agree with
the FreeBSD system compiler.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread ozan s. yigit

in a related tangential note, i recently found (out of sheer irritation)
in less than an hour that several (including the latest) versions of GCC
 -O and -O2 failed the paranoia test in different ways, to wit:

gcc -o paranoia paranoia.c

[paranoia output elided]

The number of  DEFECTs  discovered = 1.
The number of  FLAWs  discovered =   1.

gcc -O2 -o paranoia paranoia.c

[paranoia output elided]

The number of  FAILUREs  encountered =   4.
The number of  SERIOUS DEFECTs  discovered = 4.
The number of  DEFECTs  discovered = 2.
The number of  FLAWs  discovered =   2.

i assume everyone knows about kahan and paranoia. if not see netlib.

oz
---
a technology is indistinguishable from | electric: [EMAIL PROTECTED]
its implementation.   -- Marshall Rose | or 905 415 2878



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Another kernel newbie

2002-03-14 Thread Kreider, Carl


I've been tasked with a driver for a video capture card. I've been
following the example of the bktr driver, searched the net for
information, bought "The Design and Implementation of the 4.4BSD
Operating System", read the Developer's Handbook, etc.

I am working outside the kernel tree right now, in /usr/local/src
and am ready to compile. However, sys/bus.h wants device_if.h and
bus_if.h, which apparently are generated dynamically. How do I
make that magic happen?

-- 
Carl Kreider
Doctor Design Services
700 E Beardsley  Suite 14A 
Elkhart Indiana 46514
219-206-8050  x104
 [EMAIL PROTECTED]  [EMAIL PROTECTED]
   [EMAIL PROTECTED]  [EMAIL PROTECTED]
=
"The reasonable man adapts himself to the world: the unreasonable one 
persists in trying to adapt the world to himself. Therefore all progress 
depends on the unreasonable man."
-- George Bernard Shaw
=

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread M. Warner Losh

Do you have a small, reproducible test case?

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: gcc -O broken in CURRENT

2002-03-14 Thread Jan Stocker

So now i am a little bit confused... State of the art:

1) Bug is in -stable and -current
   --> This means possible patches only in -current arent responsible for
   this behaviour
2) Bug is in os delivered gcc but not in port gcc.
   a) port has more or less patches / os gcc has been modified
  --> Didn't someone told they are the same?
   b) other options were set at compile time
  --> Why dont change to the same in the port?
  Leads it to a broken world?
  If the only difference is the lost of binary compatibility,
  i would say, ok... do it now and we'll need to compile
  or ports...

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Alexander Kabaev
> Sent: Thursday, March 14, 2002 5:26 PM
> To: Martin Blapp
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: gcc -O broken in CURRENT
> 
> 
> > Do you have a patch for this ?
>   I do not fully understand the parts of GCC involved, so I need some
> time to verify my initial diagnosis and to create a patch.  In other
> words - not yet :) 
> 
> --
> Alexander Kabaev
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
> 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Doug Rabson

On Thu, 14 Mar 2002, Michael Smith wrote:

> > hw.busfrequency = 133326902
>
> Not typically obtainable.  And which bus?

This is available for ia64. I think the speed returned by ia64 firmware
for this is the FSB speed.

>
> > hw.cpufrequency = 66700
>
> Should be obtainable on Alpha and Sparc, and calculable on x86 (though it
> will probably have to be calculated at the time the sysctl is read, since
> it's variable).

Certainly also available for ia64.

>
> > hw.cachelinesize = 32
> > hw.l1icachesize = 32768
> > hw.l1dcachesize = 32768
> > hw.l2cachesize = 262144
>
> Most of these can be obtained, one way or another.

I can get this too. Also sizes of various levels of TLB too for fun...

-- 
Doug Rabson Mail:  [EMAIL PROTECTED]
Phone: +44 20 8348 6160



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel newbie.

2002-03-14 Thread Rogier R. Mulhuijzen

At 04:40 14-3-2002 -0600, Abdul Basit wrote:

>Hi
>can anyone give me some url / book name for
>FreeBSD kernel internals ?
>
>thanks
>- basit

The Design and Implementation of the 4.4BSD Operating System
http://www.amazon.com/exec/obidos/ASIN/0201549794/qid=1016123716/sr=8-4/ref=sr_8_67_4/002-8148438-7702402

It discusses in depth the 4.4BSD kernel, just about the direct ancestor of 
FreeBSD

 Doc

P.S.: It's been on my Amazon wish-list for a while -> 
http://www.amazon.com/exec/obidos/wishlist/JVESPRQND4OJ/ref=wl_s_3/002-8148438-7702402 
(nudge nudge wink wink)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Alexander Kabaev

> Do you have a patch for this ?
  I do not fully understand the parts of GCC involved, so I need some
time to verify my initial diagnosis and to create a patch.  In other
words - not yet :) 

--
Alexander Kabaev

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: PCI read config functions

2002-03-14 Thread M. Warner Losh

In message: <[EMAIL PROTECTED]>
"Daniel O'Connor" <[EMAIL PROTECTED]> writes:
: On Thu, 2002-03-14 at 18:11, M. Warner Losh wrote:
: > : However this just ends up printing 0.
: > : 
: > : (PCI_DC_SIO_PORT is 0x2f)
: > 
: > Do you have the right dev?
: > 
: > bcr = pci_read_config(sp->sc->dev, CB_PCI_BRIDGE_CTRL, 2);
: > 
: > is what I use in the pccard bridge pci driver and it works.
: 
: I believe so..
: The code I pasted is in the probe routine of the device just after a
: check that the vendor and device ID are correct.
: 
: Perhaps not all of it is mapped? (or isn't during probe?)
: Or some other straw grabbing statement :)

The pci config space is always mapped.  What does pciconf -r pciX:Y:Z
0:0xff say?  X:Y:Z is the pci bus address.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread M. Warner Losh

In message: <[EMAIL PROTECTED]>
Terry Lambert <[EMAIL PROTECTED]> writes:
: "M. Warner Losh" wrote:
: > In message: <[EMAIL PROTECTED]>
: > Ed Hall <[EMAIL PROTECTED]> writes:
: > : Exception-handling is broken with -O in -stable, and has been for years.
: > : FreeBSD is one of the few systems that use setjmp/longjmp stack unwinds
: > : to implement exceptions, so when the GCC folks broke that path, it was
: > : never fixed.  There are supposedly patches floating around that fix the
: > : problem, but they either didn't work as advertised or the ball got dropped.
: > 
: > H, C++ exceptions work in -stable with -O and have for at least a
: > year.  At least they are working for us in our environment.  What's
: > busted?
: 
: Per thread exception stacks?  THat's where I'd look...

Yes, that works.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Martin Blapp


Hi,

>  This is a case of exception context register getting clobbered in
> shared library function call. GCC does not reload it when needed and
> this ultimately leads to semi-random word in program memory decremented
> by the __cp_pop_exception function. The bug is only triggered under very
> specific circumstances involving inline functions and nested degenerate
> exception handlers, that's why it existed unnoticed for quite some time.

Do you have a patch for this ?

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Alexander Kabaev


 This is a case of exception context register getting clobbered in
shared library function call. GCC does not reload it when needed and
this ultimately leads to semi-random word in program memory decremented
by the __cp_pop_exception function. The bug is only triggered under very
specific circumstances involving inline functions and nested degenerate
exception handlers, that's why it existed unnoticed for quite some time.


On Wed, 13 Mar 2002 22:53:48 -0800
Terry Lambert <[EMAIL PROTECTED]> wrote:

> "M. Warner Losh" wrote:
> > In message: <[EMAIL PROTECTED]>
> > Ed Hall <[EMAIL PROTECTED]> writes:
> > : Exception-handling is broken with -O in -stable, and has been for
> > years.: FreeBSD is one of the few systems that use setjmp/longjmp
> > stack unwinds: to implement exceptions, so when the GCC folks broke
> > that path, it was: never fixed.  There are supposedly patches
> > floating around that fix the: problem, but they either didn't work
> > as advertised or the ball got dropped.
> > 
> > H, C++ exceptions work in -stable with -O and have for at least
> > a year.  At least they are working for us in our environment. 
> > What's busted?
> 
> Per thread exception stacks?  THat's where I'd look...
> 
> -- Terry
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Alexander Kabaev


 This is a case of exception context register getting clobbered in
shared library function call. GCC does not reload it when needed and
this ultimately leads to semi-random word in program memory decremented
by the __cp_pop_exception function. The bug is only triggered under very
specific circumstances involving inline functions and nested degenerate
exception handlers, that's why it existed unnoticed for quite some time.


On Wed, 13 Mar 2002 22:53:48 -0800
Terry Lambert <[EMAIL PROTECTED]> wrote:

> "M. Warner Losh" wrote:
> > In message: <[EMAIL PROTECTED]>
> > Ed Hall <[EMAIL PROTECTED]> writes:
> > : Exception-handling is broken with -O in -stable, and has been for
> > years.: FreeBSD is one of the few systems that use setjmp/longjmp
> > stack unwinds: to implement exceptions, so when the GCC folks broke
> > that path, it was: never fixed.  There are supposedly patches
> > floating around that fix the: problem, but they either didn't work
> > as advertised or the ball got dropped.
> > 
> > H, C++ exceptions work in -stable with -O and have for at least
> > a year.  At least they are working for us in our environment. 
> > What's busted?
> 
> Per thread exception stacks?  THat's where I'd look...
> 
> -- Terry
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



[no subject]

2002-03-14 Thread Moissanite




Moissanite: More Fire and Brilliance





   
http://www.moissanite.com/emailads/trade/031102/truth_header.gif";
width="500" height="45" border="0" alt="The Truth About Moissanite">
  
   
 
  
   
http://www.moissanite.com/emailads/trade/031102/jfire.jpg";
width="680" height="564" border="0" alt="Fact - Moissanite delivers more
fire, brilliance and luster than any other hard jewel on Earth.">
  
  

  

  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="10"
height="1" alt="">
  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="200"
height="1" alt="">
  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="200"
height="1" alt="">
  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="200"
height="1" alt="">
  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="10"
height="1" alt="">


  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="10"
height="1" alt="">
  This unretouched photograph supports the adage
that "a picture is worth a thousand words". Here, a light source over a
similar sized moissanite and diamond placed in shallow water clearly shows
the superior fire and brilliance of this unique new jewel.
  And the picture is supported by measurable facts:
the GIA publishes the dispersion (fire) of created moissanite at 0.104,
refractive index (brilliance) at 2.65 to 2.69, and luster at 20.4%. No
other hard jewel measures up, not even a fine diamond. And only moissanite
and diamond are over 9 on the Mohs hardness scale.
  Moissanite jewels created by Charles & Colvard
are available in all popular shapes and sizes. 
http://www.moissanitesource.com";>www.moissanitesource.com
is the place to buy moissanite jewelry on the internet. Buy with
confidence at the best prices in the world. 
  
  http://www.moissanite.com/emailads/trade/031102/shim.gif"; width="10"
height="1" alt="">

  

  
   
 
  
   
http://www.moissanite.com/emailads/trade/031102/moissanite_logo_wht.gif
" width="277" height="66" border="0" alt="Moissanite Created By Charles &
Colvard">
  
   
 
  
   

  Moissanite created by Charles & Colvard is a unique jewel,
not a synthetic diamond.
  Moissanite
  Source is an authorized distributor of Moissanite.
   
  If you wish to stop receiving these occasional mailings,
simply reply to this email with the word "REMOVE" inthe subject line
and we will remove your name and email address from our database.

  





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



pax(1) enhancement

2002-03-14 Thread Bjoern Fischer

Hello,

I'm doing backups with pax(1). For indexing pax readable archives
I found it very useful to have the possibility to specify an arbitrary
strftime() formatstring that is used in verbose list mode.

The enhancement is filed as PR bin/35886.

Comments?

-Björn


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic: pmap_enter

2002-03-14 Thread Mike Silbersack


On Tue, 12 Mar 2002, Terry Lambert wrote:

> #define blkmap(fs, map, loc) \
> (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
>
> looks a little suspect, doesn't it?  "& 0" for 8 is probably
> correct, but "& 1" for 4 and "& 2" for 2 and "& 4" for 1 is
> probably not right... maybe:
>
> #define blkmap(fs, map, loc) \
> (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & 0xff & ((0xff >> (NBBY -
> (fs)->fs_frag))^0xff))
>
> Would be more right?  After all, it's the high bits of the low
> bits you want to save, not the low bits of the low bits...
>
> -- Terry

FWIW, I didn't mean to ignore this message, I was going to look it over
carefully before commenting.  However, Sid Meier told me that I needed to
spend some time taking over the world, so I was unable to.

If anyone familiar with FFS wants to check it out, please be my guest,
otherwise I'll try to get to it soon.

Mike "Silby" Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Germany trip

2002-03-14 Thread Alexey Zelkin

Folks,

I'll be visiting Germany for next week. My primary targets are
Hannover (for CeBIT show), Trier (and possibly Amsterdam, not Germany
though, but... :-).

Because of this trip I'll be rarely available at e-mail. If you will be
experiencing any problems with my recent locale/stdtime MFCs during period of
my absence please dig Andrey Chernov <[EMAIL PROTECTED]> for immediate
reaction (since he is one of authors of this code) or be patient until
I return back.

Thanks!

PS: If you're living in one of cities mentioned above I'll be
happy to meet and get a "cup" of beer or vodka along with pleasant
conversation ;-) Drop me a line privately in this case.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Michael Smith

> hw.busfrequency = 133326902

Not typically obtainable.  And which bus?

> hw.cpufrequency = 66700

Should be obtainable on Alpha and Sparc, and calculable on x86 (though it 
will probably have to be calculated at the time the sysctl is read, since 
it's variable).

> hw.cachelinesize = 32
> hw.l1icachesize = 32768
> hw.l1dcachesize = 32768
> hw.l2cachesize = 262144

Most of these can be obtained, one way or another.

> hw.l2settings = -2147483648

No idea what that's meant to mean.

> Assuming that some or all of this information can be derived on x86 /
> alpha / sparc, how useful do folks think it would be to have this
> information be available from sysctl space?  I personally would love
> to see CPU and bus speed info.

What for?  You haven't caught the Megahertz bug too, have you? 8)

-- 
To announce that there must be no criticism of the president,
or that we are to stand by the president, right or wrong, is not
only unpatriotic and servile, but is morally treasonable to 
the American public.  - Theodore Roosevelt



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



file crashing: start of story: attachments

2002-03-14 Thread A. V.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



kernel newbie.

2002-03-14 Thread Abdul Basit


Hi
can anyone give me some url / book name for
FreeBSD kernel internals ?

thanks
- basit


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



NULLFS in -STABLE

2002-03-14 Thread Attila Nagy

Hello,

I run FreeBSD 4-STABLE (Sun Feb 10 14:58:04 CET 2002) since that date with
NULLFS, from which I do an average of 500-600 GB daily traffic (FTP site,
with the built in FTP daemon).

Previously I have had problems with this setup, because I had to remove
the sendfile() support from all of the running daemons (or else I got
corrupt files), which use NULLFS as the spool and after this when the
server had busier days than the others, I got random reboots.

Now, after one month I can say, that NULLFS is much more usable and stable
than before. I got no reboots and it works with sendfile() too. I did
about 18 TB traffic from those directories without any problems in the
previous month.

The only thing, which seems to be changed that the NULLFS mount isn't
recursive anymore.
If I have:
/stuff
/stuff/.1
/stuff/.2
...

(.* are directories, each one there is another partition mounted in)

and I mount /stuff to somewhere else with mount_null, I see only /stuff,
and empty .* directories. So I have to do:
mount_null /stuff /other_dir/stuff
mount_null /stuff/.1 /other_dir/stuff/.1, etc.

BTW, this is only a minor issue.

Congratulations to anyone, who did this work!

[ Free Software ISOs - ftp://ftp.fsn.hu/pub/CDROM-Images/ ]---
Attila Nagy e-mail: [EMAIL PROTECTED]
Free Software Network (FSN.HU)phone @work: +361 210 1415 (194)
cell.: +3630 306 6758


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



file crashing: start of story

2002-03-14 Thread A. V.

Hi, hackers

As i wrote before yesterday my system was crashed.
Today i test it again. And crash again.
HOWTO-Reproduce: (every step i do as root)
i mounted cdrom (/dev/acd0c)
# mount /cdrom
then started 15 backgroup cp process
# cp -R 01 /u1/xxx/ &
# cp -R 02 /u1/xxx/ &
...
# cp -R 15 /u1/xxx/ &
i tried to kill this processes but i couldn't
# killall -9 cp
# kill -9 pid
then i bomb my system
# umount -f /cdrom
BANG! BANG! BANG!
kernel panic
I attached picture of my screen in that moment.














To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



file crashing

2002-03-14 Thread A. V.

Hi, hackers.

Yesterday i was editing a file. After some manipulations my system was
crashed. After reboot i couldn't find this file. Another opened file was
truncated. This files were on vncrypt disk with softupdate enabled slice.

Today i created file on non-vncrypt softupdate disabled disk, edited it,
saved it, edited again and pressed reset botton on my comp. File disappeared
too.

Why?

I can't find any part of this file on disk typing
more /dev/ad0s1a or more /dev/vnc0c (with key enabled)
System i use is freebsd 4.5 release.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: gcc -O broken in CURRENT

2002-03-14 Thread Martin Blapp

> Per thread exception stacks?  THat's where I'd look...

Hmm, good point. The programms that crashed were all threaded ...

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Porting a userland NFS server

2002-03-14 Thread Ian Dowse

In message <[EMAIL PROTECTED]>, Daniel O'Connor writ
es:
>I end up with EFBIG when trying to read the .katie-server-info file, but
>if I create a file inside the view (eg echo "abc" >foo) then it can be
>read  with no problem, _but_ the dump of NFS traffic doesn't show a read
>for that file.

At a guess, the server is incorrectly reporting the maximum file
size. You might be able to verify this by creating a file of the
same size as .katie-server-info and checking if you get the same
error. The bug in the server is likely to be in its "fsinfo" op
function - see the FSINFO3resok definition in RFC1813 for how the
fsinfo reply is supposed to be formed.

Ian

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message