Re: Best method to produce patches?

2003-02-10 Thread Trent Nelson
On Sun, Feb 09, 2003 at 04:33:41PM -0600, David Leimbach wrote:
 I am about to try to make some changes to FreeBSD current...
 
 What is the recommend method to use for playing with the source?

I've attached an e-mail from Matt Dillon that gives a very good de-
scription for setting up a FreeBSD development environment.

 Thanks!
 
 Dave Leimbach

Date: Sat, 21 Dec 2002 16:41:23 -0800 (PST)
From: Matthew Dillon [EMAIL PROTECTED]
To: Trent Nelson [EMAIL PROTECTED]
Subject: Re: Trying to chase up an old post.


:Hi Matt,
:
:You posted something to [EMAIL PROTECTED] (or hackers@ possibly)
:just over a year ago describing how you set up your -stable and
:-current environments for doing development.
:
:I've attempted to search for the post, but I'm coming up with false
:hits left right and centre.  Any idea which post I'm referring to,
:or even better, can you point me to a URL where it's been archived?
:
:Much appreciated.
:
:Regards,
:
:Trent.
:
:-- 
:Trent Nelson -- Director, Alcyon Enterprises, Ltd.

I remember making the post, but I don't remember when and I doubt
I could find it in my archives.

Hmm.  This would be another good manual page.  Maybe I will call
it 'developer' or 'development'.  Ok, here we go:

ENVIRONMENT SETUP 

Basically I recommend having at least two machines.  Run -stable
on your main development system.   Create a huge partition called
/FreeBSD.  Mine is 12GB (and currently holds 8G of junk in it,
including portions of NetBSD, OpenBSD, and Linux as well as
FreeBSD).

REASON This way you can export /FreeBSD to any other machines
you have via read-only NFS without exposing sensitive partitions
on your main development machine.

REASON You always want your main development environment to be
on a stable, reliable platform, otherwise you might blow something
up and then not be able to fix it.

Use cvsup (once a night via cron) to keep a local copy of the
FreeBSD CVS tree.

mkdir /FreeBSD/FreeBSD-CVS
ln -s /FreeBSD/FreeBSD-CVS /home/ncvs

cron entry:

20 6 * * *  /usr/local/bin/cvsup -g -r 20 -L 2 -h cvsup.freebsd.org 
/usr/share/examples/cvsup/cvs-supfile

Then use cvs to checkout and maintain a -stable source tree
and a -current source tree.  I do this:

mkdir /FreeBSD/FreeBSD-4.x
mkdir /FreeBSD/FreeBSD-current

cd /FreeBSD/FreeBSD-4.x
cvs -d /home/ncvs checkout -rRELENG_4 src

cd /FreeBSD/FreeBSD-current
cvs -d /home/ncvs checkout src
cvs -d /home/ncvs checkout ports
cvs -d /home/ncvs checkout doc

REASON Keeping the broken-out source in /FreeBSD allows
you to export it to other machines along with the rest 
of the development environment.

Now create a softlink for /usr/src and /usr/src2.  I
usually point /usr/src at -stable and /usr/src2 at -current:

cd /usr
rm -rf src src2
ln -s /FreeBSD/FreeBSD-4.x/src src
ln -s /FreeBSD/FreeBSD-current/src src

Put /usr/obj in /FreeBSD as well, or give it its own partition
(at least 4GB is recommended).  Example:

mkdir /FreeBSD/obj
cd /usr
rm -rf obj
ln -s /FreeBSD/obj obj

ALTERNATIVE:

(/usr/obj has its own partition)

REASON you are going to want to export /usr/obj via read-only NFS
to your other boxes, which I explain in the BUILDING section.  If
you want to be able to compile the world and kernels on the clients,
rather then only compiling on your main development box, I recommend
making /usr/obj its own partition to make it easier to give each
client its own /usr/obj (for client-side compiling), or mounting
/usr/obj on the client from the main development server via read-only 
NFS.

I usually keep track of ports via CVS and, as you can
see above, a checkedout version can be maintained in
/FreeBSD/FreeBSD-current/ports.   However, in order 
to be able to build ports on other machines you will
need to change the distfiles subdirectory:

cd /usr
rm -rf ports
ln -s /FreeBSD/FreeBSD-current/ports ports

cd /usr/ports   (this pushes into the softlink)
rm -rf distfiles
ln -s /usr/ports.distfiles distfiles

mkdir /usr/ports.distfiles
mkdir /usr/ports.workdir

IN /etc/make.conf add

--
WRKDIRPREFIX=/usr/ports.workdir
--

REASON This allows you to export /usr/ports via a read-only NFS 
mount.  In fact, just exporting /FreeBSD also gives you ports for
free and on your other machines you can simply softlink
/usr/ports to /FreeBSD/FreeBSD-current/ports.  

NOT!!! You may want to choose different directories for distfiles
and workdir, but try to make it consistent

buildkernel dying from unresolved sched_* symbols

2003-02-02 Thread Trent Nelson
I'm not sure if this is a result of the recent sched_ule import, but
buildkernel is dying on a bunch of undefined symbols (that from what
I can see, are definitely present in both sched_(4bsd|ule)).  I fol-
llowed a discussion on -arch about being able to nominate the prefe-
rred scheduler, but I'd assume both would be compiled, no?

Trent.


linking kernel.debug
init_main.o: In function `proc0_init':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/init_main.c:319: undefined 
reference to `kse0_sched'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/init_main.c:320: undefined 
reference to `ksegrp0_sched'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/init_main.c:321: undefined 
reference to `proc0_sched'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/init_main.c:322: undefined 
reference to `thread0_sched'
kern_clock.o: In function `statclock_process':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_clock.c:445: undefined 
reference to `sched_clock'
kern_condvar.o: In function `cv_wait':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_condvar.c:180: undefined 
reference to `sched_sleep'
kern_condvar.o: In function `cv_wait_sig':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_condvar.c:180: undefined 
reference to `sched_sleep'
kern_condvar.o: In function `cv_timedwait':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_condvar.c:180: undefined 
reference to `sched_sleep'
kern_condvar.o: In function `cv_timedwait_sig':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_condvar.c:180: undefined 
reference to `sched_sleep'
kern_exit.o: In function `wait1':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_exit.c:623: undefined 
reference to `sched_exit'
kern_fork.o: In function `fork1':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_fork.c:513: undefined 
reference to `sched_fork'
kern_idle.o: In function `idle_proc':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_idle.c:110: undefined 
reference to `sched_runnable'
kern_mutex.o: In function `propagate_priority':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_mutex.c:153: undefined 
reference to `sched_prio'
kern_proc.o: In function `procinit':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_proc.c:125: undefined 
reference to `sched_sizeof_proc'
kern_proc.o: In function `fill_kinfo_proc':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_proc.c:745: undefined 
reference to `sched_pctcpu'
kern_resource.o: In function `donice':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_resource.c:299: undefined 
reference to `sched_nice'
kern_subr.o: In function `uio_yield':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_subr.c:557: undefined 
reference to `sched_prio'
kern_switch.o: In function `choosethread':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:126: undefined 
reference to `sched_choose'
kern_switch.o: In function `kse_reassign':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:278: undefined 
reference to `sched_add'
kern_switch.o: In function `adjustrunqueue':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:395: undefined 
reference to `sched_rem'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:396: undefined 
reference to `sched_add'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:411: undefined 
reference to `sched_rem'
kern_switch.o: In function `setrunqueue':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:493: undefined 
reference to `sched_rem'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_switch.c:556: undefined 
reference to `sched_add'
kern_synch.o: In function `msleep':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_synch.c:242: undefined 
reference to `sched_sleep'
kern_synch.o: In function `mi_switch':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_synch.c:503: undefined 
reference to `sched_switchout'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_synch.c:509: undefined 
reference to `sched_switchin'
kern_synch.o: In function `setrunnable':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_synch.c:578: undefined 
reference to `sched_wakeup'
kern_synch.o: In function `yield':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_synch.c:658: undefined 
reference to `sched_prio'
kern_thread.o: In function `threadinit':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_thread.c:623: undefined 
reference to `sched_sizeof_thread'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_thread.c:639: undefined 
reference to `sched_sizeof_ksegrp'
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/kern_thread.c:642: undefined 
reference to `sched_sizeof_kse'
subr_trap.o: In function `userret':
/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/subr_trap.c:96: 

Re: buildkernel dying from unresolved sched_* symbols

2003-02-02 Thread Trent Nelson

Okay, so it seems either 'options SCHED_4BSD/SCHED_ULE' needs to be
added to your kernel config file.  Considering that this is a comp-
letely new line, would it not be wise to update UPDATING?  I'm not
sure if /sbin/config has been modified to complain if one of either
isn't present -- as I haven't installworld'd yet -- but it'd be ni-
ce if it did.

Trent.

On Sun, Feb 02, 2003 at 03:35:00PM +, Trent Nelson wrote:
 I'm not sure if this is a result of the recent sched_ule import, but
 buildkernel is dying on a bunch of undefined symbols (that from what
 I can see, are definitely present in both sched_(4bsd|ule)).  I fol-
 llowed a discussion on -arch about being able to nominate the prefe-
 rred scheduler, but I'd assume both would be compiled, no?
 
 Trent.
 
 
 linking kernel.debug
 init_main.o: In function `proc0_init':
 /shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/kern/init_main.c:319: undefined 
reference to `kse0_sched'


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



Re: System freeze running -current

2003-01-21 Thread Trent Nelson

Hurrah, I was able to get the output from a trace when the problem
described below occurs.

db trace
Debugger(c0357efe,4,1,0,1) at Debugger+0x54
scgetc(c03c8400,2,b45afa2e,16166842,c25a6180) at scgetc+0x445
sckbdevent(c03a31e0,0,c03c8400,d1d51ccc,4e) at sckbdevent+0x1e0
atkbd_intr(c03a31e0,0,d1d51d08,c01ca531,c03a31e0) at atkbd_intr+0x2c
atkbd_isa_intr(c03a31e0,0,0,0,c25bc1c8) at atkbd_isa_intr+0x21
ithread_loop(c25a9b00,d1d51d48,0,2,200381) at ithread_loop+0x1d1
fork_exit(c01ca360,c25a9b00,d1d51d48) at fork_exit+0xb3
fork_trampoline() at fork_trampoline+0x1a
--- trap 0x1, eip = 0, esp = 0xd1d51d7c, ebp = 0 ---

Regards,

Trent.

On Fri, Jan 03, 2003 at 09:12:34AM -0600, Trent Nelson wrote:
 
 I've experienced -current lock up in exactly the same way twice now;
 once with 5.0-RC2, and just now, with sources from 30th December.
 
 The system in question is a Sharp PC-AR50 laptop.  In both instances 
 the system was idle and I was editing a file in vim on ttyv0.  Both
 systems exhibited the following symptoms:
 
   1.  Able to switch terminals using alt-F1..F8, but that's it, I'm un-
   able to type anything else (keyboard doesn't respond to letters,
   numbers, but capslock and numlock still turn on lights).
   2.  Responds to pings from other systems on the network.
   3.  Cannot connect to the machine via ssh from other systems.  The
   connection is opened, according to ssh -vvv, but just hangs.
   4.  Mouse cursor not responding to either USB mouse or touchpad.
   5.  The screensaver (blank) still came on after ten minutes, and I
   believe that pressing a key that wasn't previously working turned
   it off.  (I can't be 100% on that one, it was a pretty random bash
   at the keyboard, as you do when you turn off the screen saver.)
   6.  Trying out keys, pressing ctl-alt-break caused the following to be
   printed on ttyv0:
 sio4: detached
 ad4: removed from config
 ata2: detached
   7.  Trying out more keys, I could page up and down ttyv0 with scroll
   lock on.
   8.  When switching terminals or paging up/down, there was a very, very
   small latency between the keypress and the terminal switching or
   the page going up or down.
   9.  ctrl-alt-del did not work, had to hold down the power button for
   five seconds (hard shutdown) to turn the laptop off.
 
 I have not noticed any other problems with my laptop, and successfu-
 lly builtworld on it a number of times.
 
 Laptop has the following specs: PIII-850MHz, 20GB, DVD, 256MB RAM,
 at the time of the last freeze, had a 3Com 56K PCMCIA (3CCM156)
 modem in slot 0, and a CompactFlash PC Card adapter with a 256MB
 flash card in it in slot 1 -- which wasn't mounted.  (Actually, 
 the modem would have been present in the first freeze as well, but
 I doubt the flash card was.)
 
 % uname -a
 FreeBSD cherry.limekiln.vcisp.net 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Mon Dec 30 
04:33:27 GMT 2002 
[EMAIL PROTECTED]:/usr/obj/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/CHERRY
 i386
   
 I've attached a copy of my kernel config. as well as the output from
 boot -v (taken from the next boot after the crash).
 
 Regards,
 
 Trent.
 
 Copyright (c) 1992-2002 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
 FreeBSD 5.0-CURRENT #1: Mon Dec 30 04:33:27 GMT 2002
 
[EMAIL PROTECTED]:/usr/obj/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/CHERRY
 Preloaded elf kernel /boot/kernel/kernel at 0xc0485000.
 Preloaded elf module /boot/kernel/acpi.ko at 0xc04850b4.
 Calibrating clock(s) ... TSC clock: 846271143 Hz, i8254 clock: 1193112 Hz
 CLK_USE_I8254_CALIBRATION not specified - using default frequency
 Timecounter i8254  frequency 1193182 Hz
 CLK_USE_TSC_CALIBRATION not specified - using old calibration method
 Timecounter TSC  frequency 846324031 Hz
 CPU: Pentium III/Pentium III Xeon/Celeron (846.32-MHz 686-class CPU)
   Origin = GenuineIntel  Id = 0x686  Stepping = 6
   
Features=0x383f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
 real memory  = 268369920 (255 MB)
 Physical memory chunk(s):
 0x1000 - 0x0009efff, 647168 bytes (158 pages)
 0x004ac000 - 0x0ffe7fff, 263438336 bytes (64316 pages)
 avail memory = 255811584 (243 MB)
 bios32: Found BIOS32 Service Directory header at 0xc00f71d0
 bios32: Entry = 0xfd8a0 (c00fd8a0)  Rev = 0  Len = 1
 pcibios: PCI BIOS entry at 0xfd8a0+0x12f
 pnpbios: Found PnP BIOS data at 0xc00f7200
 pnpbios: Entry = f:abbe  Rev = 1.0
 Other BIOS signatures found:
 Initializing GEOMetry subsystem
 null: null device, zero device
 random: entropy source
 mem: memory  I/O
 Pentium Pro MTRR support enabled
 npx0: math processor on motherboard
 npx0: INT 16 interface
 acpi0: SHARP  PC-XJ800

Re: System freeze running -current

2003-01-08 Thread Trent Nelson
On Fri, Jan 03, 2003 at 11:16:57AM -0800, Nate Lawson wrote:

 Sounds like an atkbd or syscons problem.

 Did you suspend the laptop and resume before this happens?

No.  However, it happened to me today shorty after I issued a sysctl
-w hw.acpi.cpu.economy_speed=8.  (Why does it default to 4 anyway?)

 How does unset acpi_load at the boot prompt change things?

Well, I can't reproduce it consistently, so it'll be hard to determ-
ine if disabling ACPI does the trick.

I also noticed I was able to drop into the debugger and the keyboard
works fine in it.  Can you suggest what I should be looking for?

 -Nate

Trent.

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



systat -ifstat patch

2003-01-04 Thread Trent Nelson

I've written an extension to systat that allows you to monitor the
traffic through active network interfaces on the system, akin to
netstat -I.  I've attached the patch to this e-mail, but it can also be
found at http://arpa.com/~trent/systat-ifstat-current.patch[.tar.gz].

All comments on code, style or functionality are welcome.

Regards,

Trent.

Common subdirectories: /shared/data/trent/src/src/usr.bin/systat/CVS and 
/usr/src/usr.bin/systat/CVS
diff -uBN /shared/data/trent/src/src/usr.bin/systat/Makefile 
/usr/src/usr.bin/systat/Makefile
--- /shared/data/trent/src/src/usr.bin/systat/Makefile  Fri Feb  8 23:07:35 2002
+++ /usr/src/usr.bin/systat/MakefileSat Dec 28 16:23:57 2002
@@ -4,7 +4,7 @@
 PROG=  systat
 SRCS=  cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \
mbufs.c netcmds.c netstat.c pigs.c swap.c icmp.c mode.c ip.c tcp.c \
-   vmstat.c
+   vmstat.c convtbl.c ifcmds.c ifstat.c
 DPADD= ${LIBCURSES} ${LIBM} ${LIBKVM} ${LIBDEVSTAT}
 LDADD= -lcurses -lm -lkvm -ldevstat
 
diff -uBN /shared/data/trent/src/src/usr.bin/systat/cmds.c 
/usr/src/usr.bin/systat/cmds.c
--- /shared/data/trent/src/src/usr.bin/systat/cmds.cWed Dec 12 00:13:37 2001
+++ /usr/src/usr.bin/systat/cmds.c  Sat Jan  4 14:11:32 2003
@@ -119,6 +119,7 @@
goto done;
 alarm(0);
(*curcmd-c_close)(wnd);
+   curcmd-c_flags = ~CF_INIT;
wnd = (*p-c_open)();
if (wnd == 0) {
error(Couldn't open new display);
diff -uBN /shared/data/trent/src/src/usr.bin/systat/cmdtab.c 
/usr/src/usr.bin/systat/cmdtab.c
--- /shared/data/trent/src/src/usr.bin/systat/cmdtab.c  Wed Dec 12 00:13:37 2001
+++ /usr/src/usr.bin/systat/cmdtab.cSat Dec 28 16:30:52 2002
@@ -71,6 +71,9 @@
{ tcp,showtcp,fetchtcp,   labeltcp,
  inittcp,  opentcp,closetcp,   cmdmode,
  resettcp, 0 },
+   { ifstat, showifstat, fetchifstat,labelifstat,
+ initifstat,   openifstat, closeifstat,cmdifstat,
+ 0,CF_LOADAV },
 { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 }
 };
 struct  cmdtab *curcmd = cmdtab[0];
diff -uBN /shared/data/trent/src/src/usr.bin/systat/convtbl.c 
/usr/src/usr.bin/systat/convtbl.c
--- /shared/data/trent/src/src/usr.bin/systat/convtbl.c Thu Jan  1 01:00:00 1970
+++ /usr/src/usr.bin/systat/convtbl.c   Sat Jan  4 00:13:11 2003
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2003, Trent Nelson, [EMAIL PROTECTED].
+ * 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.
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ * $Id$
+ */
+
+#include sys/types.h
+#include unistd.h
+#include convtbl.h
+
+struct convtbl convtbl[] = {
+   /* mul, scale, str */
+   { BYTE, BYTES, bytes },   /* SC_BYTE  (0) */
+   { BYTE, KILO, KB },   /* SC_KILOBYTE  (1) */
+   { BYTE, MEGA, MB },   /* SC_MEGABYTE  (2) */
+   { BYTE, GIGA, GB },   /* SC_GIGABYTE  (3) */
+
+   { BIT, BITS, b }, /* SC_BITS  (4) */
+   { BIT, KILO, Kb },/* SC_KILOBITS  (5) */
+   { BIT, MEGA, Mb },/* SC_MEGABITS  (6) */
+   { BIT, GIGA, Gb },/* SC_GIGABITS  (7) */
+
+   { 0, 0,  }/* SC_AUTO  (8) */
+
+};
+
+
+static __inline__
+struct convtbl *
+get_tbl_ptr(const u_long size, const u_int scale)
+{
+   struct  convtbl *tbl_ptr = NULL;
+   u_long  tmp = 0;
+   u_int   index = scale

Re: systat -ifstat patch

2003-01-04 Thread Trent Nelson
On Sat, Jan 04, 2003 at 09:50:47PM +0100, [EMAIL PROTECTED] wrote:

 This looks pretty useful.

Thanks!  I think so, so have most other people I've spoken to.

 As far as I can see you have some genuine fixes in there:
 
 --- /shared/data/trent/src/src/usr.bin/systat/cmds.c Wed Dec 12 00:13:37 2001
 +++ /usr/src/usr.bin/systat/cmds.c   Sat Jan  4 14:11:32 2003
 @@ -119,6 +119,7 @@
  goto done;
  alarm(0);
  (*curcmd-c_close)(wnd);
 +curcmd-c_flags = ~CF_INIT;
  wnd = (*p-c_open)();
  if (wnd == 0) {
  error(Couldn't open new display);
 
 We should probably commit them in a separate commit first.

I agree.  That particular bug caused me a lot of grief this morning
before I tracked it down.  None of the other displays were affected
'cause they didn't have to allocate any structures dynamically.

I've attached cmds.c.patch to this e-mail.

 diff -uBN /shared/data/trent/src/src/usr.bin/systat/convtbl.c 
/usr/src/usr.bin/systat/convtbl.c
 --- /shared/data/trent/src/src/usr.bin/systat/convtbl.c  Thu Jan  1 01:00:00 
1970
 +++ /usr/src/usr.bin/systat/convtbl.cSat Jan  4 00:13:11 2003
 @@ -0,0 +1,98 @@
 
 This is only used for the ifstat page, right ?  Should/Could bits
 of the other code use it as well ?

Yup, it's currently only used for the ifstat display.  No other
displays did automatic scaling so I had to write it from scratch.
The only possible contender for using this code would be vmstat's
disk usage stats on the bottom left of the screen -- but I think
that would just unnecessarily clutter the display more than it
already is.

What would be nice is a new diskstat display that is the same as
ifstat, except you display transfer rates for drives on the system.
I think a lot of people would find this useful (possibly even more
so than the ifstat display).  What do you think?


  .\ @(#)systat.18.2 (Berkeley) 12/30/93
 -.\ $FreeBSD: src/usr.bin/systat/systat.1,v 1.36 2002/12/27 12:15:35 schweikh Exp $
 +.\ $FreeBSD: src/usr.bin/systat/systat.1,v 1.23.2.9 2002/12/29 16:35:40 schweikh 
Exp $
 
 This looks worrisome to me, and some of the deltas look more so:

Erm.  Eek.  I think I copied the -stable systat.1 into my -current
sources.  I fixed this in the new patch, which can be found at
http://arpa.com/~trent.  My bad.

(``systat-ifstat-current.patch'' also now has the modification to
 cmds.c taken out and placed separately in ``cmds.c.patch''.)

 Otherwise I think it looks good.

Glad to hear it.

 Poul-Henning Kamp

Regards,

Trent.

Index: cmds.c
===
RCS file: /home/ncvs/src/usr.bin/systat/cmds.c,v
retrieving revision 1.4
diff -u -r1.4 cmds.c
--- cmds.c  12 Dec 2001 00:13:37 -  1.4
+++ cmds.c  4 Jan 2003 14:11:32 -
@@ -119,6 +119,7 @@
goto done;
 alarm(0);
(*curcmd-c_close)(wnd);
+   curcmd-c_flags = ~CF_INIT;
wnd = (*p-c_open)();
if (wnd == 0) {
error(Couldn't open new display);



System freeze running -current

2003-01-03 Thread Trent Nelson

I've experienced -current lock up in exactly the same way twice now;
once with 5.0-RC2, and just now, with sources from 30th December.

The system in question is a Sharp PC-AR50 laptop.  In both instances 
the system was idle and I was editing a file in vim on ttyv0.  Both
systems exhibited the following symptoms:

  1.  Able to switch terminals using alt-F1..F8, but that's it, I'm un-
  able to type anything else (keyboard doesn't respond to letters,
  numbers, but capslock and numlock still turn on lights).
  2.  Responds to pings from other systems on the network.
  3.  Cannot connect to the machine via ssh from other systems.  The
  connection is opened, according to ssh -vvv, but just hangs.
  4.  Mouse cursor not responding to either USB mouse or touchpad.
  5.  The screensaver (blank) still came on after ten minutes, and I
  believe that pressing a key that wasn't previously working turned
  it off.  (I can't be 100% on that one, it was a pretty random bash
  at the keyboard, as you do when you turn off the screen saver.)
  6.  Trying out keys, pressing ctl-alt-break caused the following to be
  printed on ttyv0:
sio4: detached
ad4: removed from config
ata2: detached
  7.  Trying out more keys, I could page up and down ttyv0 with scroll
  lock on.
  8.  When switching terminals or paging up/down, there was a very, very
  small latency between the keypress and the terminal switching or
  the page going up or down.
  9.  ctrl-alt-del did not work, had to hold down the power button for
  five seconds (hard shutdown) to turn the laptop off.

I have not noticed any other problems with my laptop, and successfu-
lly builtworld on it a number of times.

Laptop has the following specs: PIII-850MHz, 20GB, DVD, 256MB RAM,
at the time of the last freeze, had a 3Com 56K PCMCIA (3CCM156)
modem in slot 0, and a CompactFlash PC Card adapter with a 256MB
flash card in it in slot 1 -- which wasn't mounted.  (Actually, 
the modem would have been present in the first freeze as well, but
I doubt the flash card was.)

% uname -a
FreeBSD cherry.limekiln.vcisp.net 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Mon Dec 30 
04:33:27 GMT 2002 
[EMAIL PROTECTED]:/usr/obj/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/CHERRY
 i386
  
I've attached a copy of my kernel config. as well as the output from
boot -v (taken from the next boot after the crash).

Regards,

Trent.

Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-CURRENT #1: Mon Dec 30 04:33:27 GMT 2002

[EMAIL PROTECTED]:/usr/obj/shared/work/BSD/FreeBSD/FreeBSD-CURRENT/src/sys/CHERRY
Preloaded elf kernel /boot/kernel/kernel at 0xc0485000.
Preloaded elf module /boot/kernel/acpi.ko at 0xc04850b4.
Calibrating clock(s) ... TSC clock: 846271143 Hz, i8254 clock: 1193112 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter i8254  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
Timecounter TSC  frequency 846324031 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (846.32-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0x686  Stepping = 6
  
Features=0x383f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real memory  = 268369920 (255 MB)
Physical memory chunk(s):
0x1000 - 0x0009efff, 647168 bytes (158 pages)
0x004ac000 - 0x0ffe7fff, 263438336 bytes (64316 pages)
avail memory = 255811584 (243 MB)
bios32: Found BIOS32 Service Directory header at 0xc00f71d0
bios32: Entry = 0xfd8a0 (c00fd8a0)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xfd8a0+0x12f
pnpbios: Found PnP BIOS data at 0xc00f7200
pnpbios: Entry = f:abbe  Rev = 1.0
Other BIOS signatures found:
Initializing GEOMetry subsystem
null: null device, zero device
random: entropy source
mem: memory  I/O
Pentium Pro MTRR support enabled
npx0: math processor on motherboard
npx0: INT 16 interface
acpi0: SHARP  PC-XJ800 on motherboard
ACPI-0625: *** Info: GPE Block0 defined as GPE0 to GPE15
ACPI-1287: *** Error: Method execution failed, AE_NOT_EXIST
ACPI-1287: *** Error: Method execution failed, AE_NOT_EXIST
ACPI-1287: *** Error: Method execution failed, AE_NOT_EXIST
pci_open(1):mode 1 addr port (0x0cf8) is 0x8000384c
pci_open(1a):   mode1res=0x8000 (0x8000)
pci_cfgcheck:   device 0 [class=06] [hdr=00] is there (id=71908086)
Using $PIR table, 7 entries at 0xc00fdf50
PCI-Only Interrupts: none
Location  Bus Device Pin  Link  IRQs
embedded10A   0x60  3 4 5 6 7 9 10 11 12 14 15
embedded10B   0x61  3 4 5 6 7 9 10 11 12 14 15
embedded10C   0x62  3 4 5 6 7 9 10 11 12 14 15
embedded10D   0x63  3 4 5 6 7 9 10 11 12 14 15
embedded01A   0x61  3 

Re: Sysinstall is still horribly broken.

2001-11-17 Thread Trent Nelson

On Sun, Nov 18, 2001 at 05:10:30AM +0900, Makoto Matsushita wrote:
 
 nelsont I had to toss my 2001 snapshot because it still had
 nelsont the /mnt/dev sysinstall problem which was apparently
 nelsont fixed as of 2002.  It isn't.
 
 I'll try to investigate tomorrow (strictly speaking, 'late today in
 JST'; I'm sleepy), but according to my intuition, this is yet another
 bug; something goes wrong when there are partitions already in a disk.
 
 I have several questions to you before I reproduce this bug:
 
 1) What's in your slice 1 and 2?  Windows? other FreeBSD?

The following is what the partition editor reports from the 5.0
snapshot.  I've included it 'cause I've always found it amusing 
how the partitions ended up being arranged on these drives.  (It 
was originally a PartitionMagic effort to resize the factory def-
ault Windows partition).

Offset  Size(MB) End Name  Ptype   Desc  Subtype

   0   0  62-  6 unused0
  63599212273659ad0s2  3freebsd  165 C
12273660349819438649ad0s3  3freebsd  165
19438650558530876929ad0s4  3freebsd  165
308769300   30876882-  6 unused0
30876993400039070079ad0s1  2fat   12

ad0s2 has 4.4-STABLE on it.  ad0s4 is just a shared area.  ad0s3 is
for -CURRENT, and ad0s1 gets the grand responsibility of looking
after the stock Windows ME that came with the laptop.

 2) You said that your ad0s3 was already partitioned.  Does this mean
that you have already installed FreeBSD to ad0s3 and try to
overwrite existing installations?

Well, yes and no.  I actually already had a -CURRENT installed on
ad0s3.  But this was from a slightly older 5.0 snapshot where I
Ctrl-C'd in the middle of the bin installation, then made all the
appropriate links to correct the problem of /mnt/xxx not existing.

At the time I sent out the e-mail, I had manually newfs'd ad0s3[efg]
from -CURRENT, then newfs'd ad0s3a when I was running 4.4-STABLE.

 3) Do you have other fresh (i.e., non-partitioned) disk to install
FreeBSD again?

In light of what you've just said about this being a different
problem to what other people have been reporting, I marked each
slice as being UFS+S Y so they were recreated with newfs.  This
has worked!  So, it looks like it's just a problem with existing
partitions.

 Makoto `MAR' Matsushita

Thanks for your quick reply.

Trent.

-- 
Trent Nelson - Software Engineer - [EMAIL PROTECTED]
   A man with unlimited enthusiasm can achieve 
   almost anything. --unknown 

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



Accton EN2242 MiniPCI 10/100 (dc0) not working.

2001-10-18 Thread Trent Nelson
 at device 7.3 (no driver attached)
dc0: Accton EN2242 MiniPCI 10/100BaseTX irq 11 at device 11.0 on pci0
dc0: couldn't map ports/memory
device_probe_and_attach: dc0 attach returned 6
pcic0: TI PCI-4451 PCI-CardBus Bridge irq 11 at device 12.0 on pci0
pcic0: Could not map register memory
device_probe_and_attach: pcic0 attach returned 12
pcic0: TI PCI-4451 PCI-CardBus Bridge irq 11 at device 12.1 on pci0
pcic0: Could not map register memory
device_probe_and_attach: pcic0 attach returned 12
pci0: serial bus, FireWire at device 12.2 (no driver attached)
pci0: multimedia, audio at device 14.0 (no driver attached)
pci0: simple comms at device 14.1 (no driver attached)
orm0: Option ROMs at iomem 0xc-0xcc7ff,0xe4000-0xe7fff on isa0
atkbdc0: Keyboard controller (i8042) at port 0x60,0x64 on isa0
atkbd0: AT Keyboard flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
fdc0: NEC 72065B or clone at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1440-KB 3.5 drive on fdc0 drive 0
ppc0: Parallel port at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
plip0: PLIP network interface on ppbus0
lpt0: Printer on ppbus0
lpt0: Interrupt-driven port
ppi0: Parallel I/O on ppbus0
sc0: System console at flags 0x100 on isa0
sc0: VGA 16 virtual consoles, flags=0x300
sio0 at port 0x3f8-0x3ff irq 4 flags 0x80 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
vga0: Generic ISA VGA at port 0x3c0-0x3df iomem 0xa-0xb on isa0
unknown: PNP0303 can't assign resources
unknown: PNP0c02 can't assign resources
unknown: PNP0501 can't assign resources
unknown: PNP0f13 can't assign resources
unknown: PNP0401 can't assign resources
unknown: PNP0700 can't assign resources
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, 
default to accept, logging limited to 100 packets/entry by default
Profiling kernel, textsize=1509504 [c01211c0..c0291a40]
cputime 65, empty_loop 2, nullfunc_loop_profiled 167, mcount 228, mexitcount 157
Profiling overheads: mcount: 62+163, 148+76; mexitcount: 62+92, 139+15 nsec
Profiling overheads: mcount: 53+138, 126+65; mexitcount: 53+78, 118+13 cycles
ata1-slave: ATAPI identify retries exceeded
ad0: 19077MB FUJITSU MHM2200AT [38760/16/63] at ata0-master UDMA33
acd0: DVD-ROM UJDA540 at ata1-master PIO4
Mounting root from ufs:/dev/ad0s3a


-- 
Trent Nelson - Software Engineer - [EMAIL PROTECTED]
   A man with unlimited enthusiasm can achieve 
   almost anything. --unknown 

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



Re: Best way to get a system on current?

2001-10-14 Thread Trent Nelson

On Fri, Oct 12, 2001 at 11:36:30AM -0500, Bob Willcox wrote:
 On Fri, Oct 12, 2001 at 09:20:35AM -0700, David Wolfskill wrote:
  Might help if you provided a pointer to the problems you had in the
  upgrade from -STABLE case.  For that matter, a bit more detail on the
  install failed to mount the filesystems for the install from -CURRENT
  snapshot case would be of interest, as well.

 As for the snapshot install, since it's errors were only written to the
 screen I have to work from memory here as well. I believe the first
 complaint had to do with the filesystems to be mounted (/mnt/usr, for
 example) not specified in fstab. Since all of the mounts to /mnt failed,
 the system fails pretty soon apparently running out of space in /.

Ahh, so I'm not the only one that ran into this problem.  I thought
I'd balked something up myself, so I did some extensive fiddling to
try and rectify the problem.  I got it working eventually by issuing
newfs manually on each of the new partitions, mounting them on their
respective /mnt mount points (i.e. /mnt, /mnt/var, /mnt/usr, etc),
then symlinking these back to their root mount point equivalents 
(/var, /var/tmp, /usr, etc).

I actually did all of this while the sysinstall dialog was still up
on the first terminal -- once I'd fiddled with all the mount points
and selected to try and install the bin distribution again, it
worked.

Not exactly an elegant solution, unfortunately.  It'd be interesting
to hear if anyone else has this problem.

 Thanks,
 Bob

Regards,

Trent.

-- 
Trent Nelson - Software Engineer - [EMAIL PROTECTED]
   A man with unlimited enthusiasm can achieve 
   almost anything. --unknown 

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



Re: -Current + X 4.0.1 = mouse problems

2000-09-26 Thread Trent Nelson



Christian Weisgerber wrote:
 
 Doug Barton [EMAIL PROTECTED] wrote:
 
Previously I had X + moused working just fine, so I had the best
  of both worlds. With X 4.0.1 if I use moused I get no response from the
  mouse in X at all.
 
 Make sure you use
 
 Option  "Protocol" "MouseSystems"
 
 Protocol "Auto" is not reliable.

I had XFree86 4.0.1 lock my system up completely if the options "auto"
 "/dev/sysmouse" were present - the screen would go blank, no keyboard
or mouse response, and a hard reboot was required to get out of it. This
is running a reasonably recent 5.0-CURRENT and I actually thought it may
have something to do with resource locks as X worked fine if I used
"auto"  "/dev/psm0" without `moused' present.

Your suggestion has everything working fine now, though. Much
appreciated.

Regards,

Trent.
 
 --
 Christian "naddy" Weisgerber  [EMAIL PROTECTED]


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



Re: unknown: PNP...

2000-05-09 Thread Trent Nelson



Christian Weisgerber wrote:
 
 I just updated an i386 machine after a month to the latest 5.0-CURRENT,
 and I now get some strange boot messages:
 
 isa0: too many memory ranges
 ...
 unknown0: PNP at port 0x20-0x21,0xa0-0xa1 irq 2 on isa0
 unknown1: PNP0200 at port 0-0xf,0x81-0x83,0x87,0x89-0x8b,0x8f-0x91,0xc0-0xdf drq 4 
on isa0

Mike Smith wrote:
 
   Could someone please either take a look at this, or give an
   authoritative comment as to why it's happening.
 
 This is the ISA PnP code reporting devices enumerated via the PnP BIOS.
 At the moment, our support code isn't smart enough to use either the PnP
 interface or the resource manager, so the unknown device claims these
 resources to prevent anyone else trying to use them.  It's quite
 harmless, and once things are cleaned up, you won't even see the messages.

Something else I've noticed in the mean time is that PnP devices like
my printer - that are also on buses that are probed for PnP devices -
end up being probed twice at boot time.

Can anyone give an ETA on when this "support code", as Mike puts it,
will work properly?


 Christian "naddy" Weisgerber  [EMAIL PROTECTED]

Regards,

Trent.


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



Re: can't assign resources

2000-05-04 Thread Trent Nelson



Ted Sikora wrote:

 Your right the addresses seem to be standard machine resources. Are you
 using SMP? The irq's are remapped on a SMP machine so maybe that's were
 the trouble lies? The PNP tag is what has me stumped. I replaced the isa
 cards with pci this evening out of curiosity...same thing.

Nope, I'm using a UP kernel. Like you mention, I've also taken out my
only PCI card (fxp) and disabled the sound interface via the BIOS and I
get the same thing. I've toggled the `PnP OS' flag in my BIOS as well
which doesn't do anything. 

From what you've said and what I've experienced; I'm even more
convinced the problem's nothing to do with ISA/PCI devices. I'm going to
have a look at the code a bit more later on tonight...

Another interesting point is the dmesg I get now after I set "int
bootverbose" to '1' in `/usr/src/sys/i386/i386/machdep.c'. I'd really
love to hear from a coding-type figure that could determine the severity
of a lot of the error messages reported. 

Ted, would it be possible to see a copy of your kernel? Also, what
motherboard do you have?

Are there any other coding-type figures actually following this thread?

 Ted Sikora
 Jtl Development Group
 [EMAIL PROTECTED]

Regards,

Trent.
 
(dmesg w/ bootverbose=1 attached, please take a look!)

Copyright (c) 1992-2000 The FreeBSD Project.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-CURRENT #2: Wed May  3 21:26:09 WST 2000
[EMAIL PROTECTED]:/usr/src/sys/compile/breaker_03May2000
Calibrating clock(s) ... TSC clock: 232779341 Hz, i8254 clock: 1193149 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254"  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
CPU: Pentium II/Pentium II Xeon/Celeron (232.79-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x633  Stepping = 3
  Features=0x80f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,MMX
real memory  = 66977792 (65408K bytes)
Physical memory chunk(s):
0x1000 - 0x0009efff, 647168 bytes (158 pages)
0x00372000 - 0x03fd7fff, 63332352 bytes (15462 pages)
avail memory = 60895232 (59468K bytes)
bios32: Found BIOS32 Service Directory header at 0xc00fdb60
bios32: Entry = 0xfdb70 (c00fdb70)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xf+0xdb91
pnpbios: Found PnP BIOS data at 0xc00f5ff0
pnpbios: Entry = f:5904  Rev = 1.0
Other BIOS signatures found:
ACPI: 000fa050
Preloaded elf kernel "kernel" at 0xc0359000.
Pentium Pro MTRR support enabled
md0: Malloc disk
Creating DISK md0
Math emulator present
npx0: math processor on motherboard
npx0: INT 16 interface
pcib0: Intel 82443BX (440 BX) host to PCI bridge on motherboard
found- vendor=0x8086, dev=0x7190, revid=0x03
class=06-00-00, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
map[10]: type 1, range 32, base f800, size 26, enabled
found- vendor=0x8086, dev=0x7191, revid=0x03
class=06-04-00, hdrtype=0x01, mfdev=0
subordinatebus=1secondarybus=1
found- vendor=0x8086, dev=0x7110, revid=0x02
class=06-01-00, hdrtype=0x00, mfdev=1
subordinatebus=0secondarybus=0
found- vendor=0x8086, dev=0x7111, revid=0x01
class=01-01-80, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
map[20]: type 1, range 32, base ffa0, size  4, enabled
found- vendor=0x8086, dev=0x7112, revid=0x01
class=0c-03-00, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
intpin=d, irq=10
map[20]: type 1, range 32, base ef80, size  5, enabled
found- vendor=0x8086, dev=0x7113, revid=0x02
class=06-80-00, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
map[90]: type 1, range 32, base 0440, size  4, enabled
found- vendor=0x1274, dev=0x1371, revid=0x06
class=04-01-00, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
intpin=a, irq=9
map[10]: type 1, range 32, base ef00, size  6, enabled
found- vendor=0x8086, dev=0x1229, revid=0x08
class=02-00-00, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
intpin=a, irq=9
map[10]: type 1, range 32, base febff000, size 12, enabled
map[14]: type 1, range 32, base ee80, size  6, enabled
map[18]: type 1, range 32, base fea0, size 20, enabled
pci0: PCI bus on pcib0
pcib1: Intel 82443BX (440 BX) PCI-PCI (AGP) bridge at device 1.0 on pci0
found- vendor=0x10de, dev=0x0020, revid=0x04
class=03-00-00, hdrtype=0x00, mfdev=0
subordinatebus=0secondarybus=0
intpin=a, irq=11
map[10]: type 1, range 32, base fd00, size 24, enabled
map[14]: type 1, range 32, base f300, size 24, enabled
pci1: PCI bus on pcib1
pci1: NVidia Riva TNT graphics accelerator 

Re: can't assign resources

2000-05-03 Thread Trent Nelson



Ted Sikora wrote:
 
 I have been getting these messages from my kernel for some time now.
 Could the culprit be these 2 isa cards:
 non-pnp SB16 sbc0
 ne2000 ed0
 They are on a SMP BP6

I've posted a message both to current and questions about this now. I'm
experiencing the same thing with roughly the same I/O addresses being
claimed. I doubt it has anything to do with the ISA cards you mention as
many of the addresses relate to things like the DMA registers/timer and
other associated resources. 

Could someone please either take a look at this, or give an
authoritative comment as to why it's happening.

If someone points me in the direction of the particular code where the
unknown driver is claiming the devices; I'll make an attempt to take a
look at it myself.

 May  3 14:53:19 telecast /kernel: unknown0: PNP at port
 0x20-0x21,0xa0-0xa1 irq 2 on isa0
 May  3 14:53:19 telecast /kernel: unknown1: PNP0200 at port
 0-0xf,0x81-0x83,0x87,0x89-0x8b,0x8f-0x91,0xc0-0xdf drq 4 on isa0


 Ted Sikora
 Jtl Development Group
 [EMAIL PROTECTED]

Regards,

Trent.


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



Problematic PNP probing, faulty /compat/linux/sbin/ldconfig.

2000-05-02 Thread Trent Nelson

Originally cvsup'd and made world successfully on the 30th and found
the following problems to occur. Cvsup'ing to a new -current and a new
kernel still sees the same things occurring.

Everything's detected at boot time hassle free (printer, sound, network
card) so I have no idea what the PNP info stuff is in dmesg. I've got an
Intel SunRiva M/B w/ the onboard TNT + ES1371 (detected correctly as can
be seen) and a PCI ethernet card - nothing else is plugged in to the
box.

I've mentioned the ldconfig segfault problem as I'm under suspicion I
have to do something extra (other than make world) to update the Linux
kernel modules? Note, kldload/unload of linux.ko works hassle free - as
soon as /usr/sbin/linux is executed from rc.i386,
/compat/linux/sbin/ldconfig is exec'd and cores. I'll re-compile with
debugging if requested.


FreeBSD breaker.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed May  3
05:20:41 WST 2000 root@:/usr/src/sys/compile/breaker_02May2000  i386

Thanks in advance.

Regards,

Trent.

Copyright (c) 1992-2000 The FreeBSD Project.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-CURRENT #0: Wed May  3 05:20:41 WST 2000
root@:/usr/src/sys/compile/breaker_02May2000
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium II/Pentium II Xeon/Celeron (232.79-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x633  Stepping = 3
  Features=0x80f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,MMX
real memory  = 66977792 (65408K bytes)
avail memory = 60973056 (59544K bytes)
Preloaded elf kernel "kernel" at 0xc0346000.
Pentium Pro MTRR support enabled
md0: Malloc disk
npx0: math processor on motherboard
npx0: INT 16 interface
pcib0: Intel 82443BX (440 BX) host to PCI bridge on motherboard
pci0: PCI bus on pcib0
pcib1: Intel 82443BX (440 BX) PCI-PCI (AGP) bridge at device 1.0 on pci0
pci1: PCI bus on pcib1
pci1: NVidia Riva TNT graphics accelerator at 0.0 irq 11
isab0: Intel 82371AB PCI to ISA bridge at device 7.0 on pci0
isa0: ISA bus on isab0
atapci0: Intel PIIX4 ATA33 controller port 0xffa0-0xffaf at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: Intel 82371AB/EB (PIIX4) USB controller port 0xef80-0xef9f irq 10 at device 
7.2 on pci0
usb0: Intel 82371AB/EB (PIIX4) USB controller on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
chip1: Intel 82371AB Power management controller port 0x440-0x44f at device 7.3 on 
pci0
pcm0: AudioPCI ES1371 port 0xef00-0xef3f irq 9 at device 12.0 on pci0
fxp0: Intel EtherExpress Pro 10/100B Ethernet port 0xee80-0xeebf mem 
0xfea0-0xfeaf,0xfebff000-0xfebf irq 9 at device 14.0 on pci0
fxp0: Ethernet address 00:04:ac:53:46:dd
fxp0: supplying EUI64: 00:04:ac:ff:fe:53:46:dd
fdc0: NEC 72065B or clone at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1440-KB 3.5" drive on fdc0 drive 0
atkbdc0: Keyboard controller (i8042) at port 0x60,0x64 on isa0
atkbd0: AT Keyboard irq 1 on atkbdc0
psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
vga0: Generic ISA VGA at port 0x3c0-0x3df iomem 0xa-0xb on isa0
sc0: System console on isa0
sc0: VGA 16 virtual consoles, flags=0x200
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
ppc0: Parallel port at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: IEEE1284 device found /NIBBLE
Probing for PnP devices on ppbus0:
ppbus0: Canon BJC-265SP/1.00 PRINTER BJ,LQ,BJL,BJRaster,BSCC
lpt0: Printer on ppbus0
lpt0: Interrupt-driven port
unknown0: PNP0c01 at iomem 
0-0x9fbff,0x9fc00-0x9,0xe-0xf,0x3fe-0x3ff7fff,0x3ff8000-0x3ff,0xfec0-0xfec00fff,0xfee0-0xfee00fff,0xfff8-0x
 on isa0
unknown1: PNP0c01 at iomem 0x10-0x3fd on isa0
unknown: PNP can't assign resources
unknown2: PNP0200 at port 0-0xf,0x80-0x90,0x94-0x9f,0xc0-0xde drq 4 on isa0
unknown3: PNP0100 at port 0x40-0x43 irq 0 on isa0
unknown4: PNP0b00 at port 0x70-0x71 irq 8 on isa0
unknown: PNP0303 can't assign resources
unknown5: PNP0800 at port 0x61 on isa0
unknown6: PNP0c04 at port 0xf0-0xff irq 13 on isa0
unknown7: PNP0c02 at port 
0x4d0-0x4d1,0xcf8-0xcff,0x10-0x1f,0x22-0x3f,0x50-0x52,0x72-0x77,0x91-0x93,0xa2-0xbe,0x400-0x43f,0x440-0x44f
 on isa0
unknown8: PNP0c02 at port 0x290-0x297,0x370-0x371 on isa0
unknown: PNP0501 can't assign resources
unknown9: PNP0c02 on isa0
unknown: PNP0400 can't assign resources
unknown: PNP0700 can't assign resources
unknown: PNP0f13 can't assign resources
unknown10: PNP0a03 on isa0
ad0: 8063MB QUANTUM FIREBALL CR8.4A [16383/16/63] at ata0-master using UDMA33
ad1: 3079MB QUANTUM FIREBALL ST3.2A [6256/16/63] at ata0-slave using UDMA33
acd0: CD-RW Hewlett-Packard CD-Writer Plus 8200 at