Re: printing boot probe messages

2007-12-20 Thread Bernd Walter
On Thu, Dec 20, 2007 at 05:48:18PM -0500, Chuck Robey wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> I've lost the printing of all of th e messages you normally see, when you are
> booting yoiur machine (you know, mostly probe messages.  I used to see them on
> this box. When I made my first kernel, I had begun (obviously, as we all do)
> with GENERIC as a base, but changing the first loaders.hints and the kernel,
> that's the last I saw of booting messages.
> 
> To illustrate what I *do* see, I watch the first character of that little
> spiller, but only the very first char, because that's when it stops working,
> right after sicking the first char.  Thbe nest thing I see, maybe 30 seconds
> later, is a Login: request.

Sounds like your console is configured to a different device.
Maybe it is configured to serial while you are waiting on vga.

> Any notion what I could do to get my booting messages back?

Switch the console to the device you are looking at.
You can easily check the configured console by running conscontrol.
Maybe you've lost the device hint for your console device to flag
it as beeing a possible console candidate.

-- 
B.Walterhttp://www.bwct.de  http://www.fizon.de
[EMAIL PROTECTED]   [EMAIL PROTECTED][EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


printing boot probe messages

2007-12-20 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I've lost the printing of all of th e messages you normally see, when you are
booting yoiur machine (you know, mostly probe messages.  I used to see them on
this box. When I made my first kernel, I had begun (obviously, as we all do)
with GENERIC as a base, but changing the first loaders.hints and the kernel,
that's the last I saw of booting messages.

To illustrate what I *do* see, I watch the first character of that little
spiller, but only the very first char, because that's when it stops working,
right after sicking the first char.  Thbe nest thing I see, maybe 30 seconds
later, is a Login: request.

Any notion what I could do to get my booting messages back?
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHavEyz62J6PPcoOkRAg7vAJ9zneAz5IuI6kwLOK31ZjeffQdt4gCfZCqF
+z0b/+Q+ZHp5MDGcADSy+Go=
=AOCE
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Some diffs

2007-12-20 Thread Diomidis Spinellis

M. Warner Losh wrote:

And the last, rather long, patch converts the .y in config to a form
that more versions of yacc would grok.

Comments?

[...]

-   INCLUDE ID SEMICOLON
- = {
+   INCLUDE ID SEMICOLON {

[...]

The = { way for specifying yacc actions is item 5 in yacc's Appendix D 
titled "Old Features Supported but not Encouraged" in the Seventh 
Edition Unix Programmer's Manual (January, 1979).  I believe it's now 
time to make the switch.  Thanks!


--
Diomidis Spinellis - http://www.spinellis.gr
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Some diffs

2007-12-20 Thread Max Laier
On Thursday 20 December 2007, M. Warner Losh wrote:
> Consider the following diffs.  The first one does a tiny cleanup of
> strfile's include style (no real reason other than it bugged me when I
> added stdint.h).
>
> The second one cleans up a minor problem where ${CFLAGS} isn't used
> where it should be.
>
> The next three cleanup the compilation by not assuming sys/types.h is
> included or by also including 
>
> And the last, rather long, patch converts the .y in config to a form
> that more versions of yacc would grok.
>
> Comments?

sys/types.h (xor param.h) is supposed to be the first include (other than 
cdefs.h) according to style.  The rest seems fine from a quick glance.

-- 
/"\  Best regards,  | [EMAIL PROTECTED]
\ /  Max Laier  | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | [EMAIL PROTECTED]
/ \  ASCII Ribbon Campaign  | Against HTML Mail and News


signature.asc
Description: This is a digitally signed message part.


Re: Some diffs

2007-12-20 Thread Julian Elischer

M. Warner Losh wrote:

In message: <[EMAIL PROTECTED]>
Diomidis Spinellis <[EMAIL PROTECTED]> writes:
: M. Warner Losh wrote:
: > And the last, rather long, patch converts the .y in config to a form
: > that more versions of yacc would grok.
: > 
: > Comments?

: [...]
: > -INCLUDE ID SEMICOLON
: > -  = {
: > +INCLUDE ID SEMICOLON {
: [...]
: 
: The = { way for specifying yacc actions is item 5 in yacc's Appendix D 
: titled "Old Features Supported but not Encouraged" in the Seventh 
: Edition Unix Programmer's Manual (January, 1979).  I believe it's now 
: time to make the switch.  Thanks!


We can't switch until the feature has been deprecated for 30 years or
more, right?


well that's only 2 years. better start prepping the diff now for comment.



Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Some diffs

2007-12-20 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
Diomidis Spinellis <[EMAIL PROTECTED]> writes:
: M. Warner Losh wrote:
: > And the last, rather long, patch converts the .y in config to a form
: > that more versions of yacc would grok.
: > 
: > Comments?
: [...]
: > -   INCLUDE ID SEMICOLON
: > - = {
: > +   INCLUDE ID SEMICOLON {
: [...]
: 
: The = { way for specifying yacc actions is item 5 in yacc's Appendix D 
: titled "Old Features Supported but not Encouraged" in the Seventh 
: Edition Unix Programmer's Manual (January, 1979).  I believe it's now 
: time to make the switch.  Thanks!

We can't switch until the feature has been deprecated for 30 years or
more, right?

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Some diffs

2007-12-20 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
John Baldwin <[EMAIL PROTECTED]> writes:
: Was the bsd.prog.mk change accidentally included?
: 
: >  //depot/projects/arm/src/share/mk/bsd.prog.mk#4 - 
/Users/imp/p4/arm/src/share/mk/bsd.prog.mk 
: > @@ -110,17 +110,18 @@
: >  
: >  .if defined(PROG)
: >  _EXTRADEPEND:
: > -.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
: > +.if !defined(FOREIGN_BUILD)
: >  .if defined(DPADD) && !empty(DPADD)
: > echo ${PROG}: ${DPADD} >> ${DEPENDFILE}
: >  .endif
: > -.else
: > +.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
: > echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE}
: >  .if defined(PROG_CXX)
: > echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}
: >  .endif
: >  .endif
: >  .endif
: > +.endif
: >  
: >  .if !target(install)

FreeBSD's build systems assumes bad things.  This is one nobody has
noticed.  Even when compiling purely dynamic, it tries to create a
.depend file with libc.a...  Or any .a for that matter.  OS X doesn't
have any .a's to speak of, so this was failing.  It is part of another
change that tries to hack together enough of an environment to make
things build under OS X, but I hit the wall in binutils and need to
rethink my approach.

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Some diffs

2007-12-20 Thread John Baldwin
On Thursday 20 December 2007 01:25:11 am M. Warner Losh wrote:
> Consider the following diffs.  The first one does a tiny cleanup of
> strfile's include style (no real reason other than it bugged me when I
> added stdint.h).
> 
> The second one cleans up a minor problem where ${CFLAGS} isn't used
> where it should be.
> 
> The next three cleanup the compilation by not assuming sys/types.h is
> included or by also including 

These all seem fine to me.

> And the last, rather long, patch converts the .y in config to a form
> that more versions of yacc would grok.

I have no yacc-clue.

> Comments?

Was the bsd.prog.mk change accidentally included?

>  //depot/projects/arm/src/share/mk/bsd.prog.mk#4 - 
> /Users/imp/p4/arm/src/share/mk/bsd.prog.mk 
> @@ -110,17 +110,18 @@
>  
>  .if defined(PROG)
>  _EXTRADEPEND:
> -.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
> +.if !defined(FOREIGN_BUILD)
>  .if defined(DPADD) && !empty(DPADD)
>   echo ${PROG}: ${DPADD} >> ${DEPENDFILE}
>  .endif
> -.else
> +.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
>   echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE}
>  .if defined(PROG_CXX)
>   echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}
>  .endif
>  .endif
>  .endif
> +.endif
>  
>  .if !target(install)

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


GCC generated assembly

2007-12-20 Thread Jeremie Le Hen
Hi list,

This mail is slightly off-topic because probably not FreeBSD-centric.

I've looked at the assembly code generated by GCC, but I am not able to
understand the point of every instruction.

I've written the following useless program:
% #include 
% 
% int
% main(int ac, char *av[])
% {
% char buf[16];
% 
% if (ac < 2)
% return 0;
% strcpy(buf, av[1]);
% return 1;
% }

Theorically, the main() function should be something like this:
%   push %ebp
%   mov %esp, %ebp
%   sub $16, %esp
%   cmp $1, 8(%ebp)
%   jle .byebye
%   mov 12(%ebp), %eax
%   push 4(%eax)
%   push -16(%ebp)
%   call strcpy
% byebye:
%   leave
%   ret

So the stack would look like this when calling strcpy() :

|   av   |
|   ac   |
|   ret  |
| old ebp| <- ebp
[]
[]
[   buf  ]
[]
|  av[1] |
|  &buf  | <- esp


On RELENG_6, with GCC 3.4.6, I get the following assembly:
% aristote# gcc -S -O vuln.c
% aristote# cat vuln.s
% .file   "vuln.c"
% .text
% .p2align 2,,3
% .globl main
% .type   main, @function
% main:
% pushl   %ebp
% movl%esp, %ebp
% subl$24, %esp
% andl$-16, %esp
% subl$16, %esp
% movl$0, %eax
% cmpl$1, 8(%ebp)
% jle .L1
% subl$8, %esp
% movl12(%ebp), %eax
% pushl   4(%eax)
% leal-24(%ebp), %eax
% pushl   %eax
% callstrcpy
% movl$1, %eax
% .L1:
% leave
% ret
% .size   main, .-main
% .ident  "GCC: (GNU) 3.4.6 [FreeBSD] 20060305"

While it works, it seems to waste much space on the stack :

|   av   |
|   ac   |
|   ret  |
| old ebp| <- ebp
{}
{}
{24 bytes}
{ (buf1) }
{}
{}  # There could be more space between the two
[]  # buffers because of alignment on 16 bytes.
[16 bytes]
[ (buf2) ]
[]
{ 8 bytes}
{ (buf3) }
|  av[1] |
|  &buf1 | <- esp

Is someone able to explain this please?

Interestingly, if I change the buffer size from 16 to 32 bytes, buf1 is
40 bytes wide while the two others keep the same size.

I've tried with GCC 2.95.3 from ports.  Stackwise the differences are:
- buf2 doesn't exist
- while buf1 is still 24 bytes long, the value passed to
  strcpy() is buf1 + 8:
% leal -16(%ebp),%eax
% pushl %eax


I will follow up with RELENG_7 GCC 4.2.1 output.

Thank you.
Regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Stale mount on disconnected device: how to delete it?

2007-12-20 Thread Momchil Ivanov
На Wednesday 19 December 2007 10:37:46 Nikos Ntarmos написа:
> Do you have any pointers to that thread? I did a quick search in
> hackers@ and current@ but failed to find anything relevant, other than
> people reporting related crashes and "don't do that, then"-type answers.

I started a thread a while ago, when I`ve experienced the same problem. The 
title is 'removing external usb hdd without unmounting causes reboot?' and it 
was on -stable. Somebody there pointed out some patches on a russian website, 
but I`ve never tested them.

-- 
This correspondence is strictly confidential. Any screening, filtering
and/or production for the purpose of public or otherwise disclosure is
forbidden without written permission by the author signed above. If you are
not the intended recipient, please immediately notify the sender and
permanently delete any copies

PGP KeyID: 0x3118168B
Keyserver: pgp.mit.edu
Key fingerprint BB50 2983 0714 36DC D02E  158A E03D 56DA 3118 168B
  


signature.asc
Description: This is a digitally signed message part.


Re: critical floating point incompatibility

2007-12-20 Thread Peter Jeremy
On Wed, Dec 19, 2007 at 09:40:34PM -0800, Carl Shapiro wrote:
>The default setting of the x87 floating point control word on the i386
>port is 0x127F.  Among other things, this value sets the precision
>control to double precision.  The default setting of the x87 floating
>point control word on the AMD64 is 0x37F.
...
>It seems clear that the right thing to do is to set the floating point
>environment to the i386 default for i386 binaries.  Is the current
>behavior intended?

I believe this is an oversight.  See the thread beginning
http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/037947.html

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.


pgpuVHlsgX4TJ.pgp
Description: PGP signature