M. Warner Losh | 1 Sep 2004 04:36

Re: New computer....help wanted :-S

In message: <200408311327.33588.jhb <at> FreeBSD.org>
            John Baldwin <jhb <at> FreeBSD.org> writes:
: On Tuesday 31 August 2004 07:36 am, db wrote:
: > Hi
: >
: > Got my new computer with an Intel 915g MB and an Intel 3.0GHZ CPU. FreeBSD
: > can't find the onboard NIC, but nevermind I got a Rubytech gigabit NIC.
: > Sadly though, it can't find that either, so I tried my old 10/100 realtek
: > card, but it can't use it. So I have 3 NIC's in the computer, but 0
: > working. When I in BIOS set the OS PnP to yes, I get:
: 
: Set it to no.  FreeBSD 5 only sort of works with it set to yes.

What's the breakage?

: > pcib5 <ACPI PCI-PCI bridge> at device 30.0 on pci0
: > pcib5 device re0 requested unsupported I/O range 0x0-0x0 (decoding
: > 0x9000-0xafff) re0: couldn't map ports/memory
: > This is my gigabit card and it says the same about my rl0 (realtek).
: >
: > When I set OS PnP to no, I get:
: > rl0: <RealTek 8139 10/100BaseTX> port 0xa400-0xa4ff mem
: > 0xcffff800-0xffff8ff irq 22 at device 10.0 on pci1 rl0: reset never
: > completed!
: > rl0: Ethernet address ff:ff:ff:ff:ff:ff
: > rl0: unknown device ID: ffff
: > device_probe_and_attach: rl0 attach returned 6
: > It doesn't say anything about re0.
: 
: Well, FreeBSD is still not able to talk to the card ok.  Not sure why, but PCI 
(Continue reading)

db | 1 Sep 2004 07:56
Picon

Re: New computer....help wanted :-S

----- Original Message ----- 
From: "M. Warner Losh" <imp <at> bsdimp.com>
To: <jhb <at> freebsd.org>; <hackers <at> freebsd.org>
Sent: Wednesday, September 01, 2004 4:36 AM
Subject: Re: New computer....help wanted :-S

> This looks like some kind of resource problem:
> 
> : > 0xcffff800-0xffff8ff irq 22 at device 10.0 on pci1 rl0: reset never
> ^^^^^^^^^^^^^^^^^^^^^^^^
> 
> that's crazy man.  Is that really what it prints, or the the 'c'
> missing and it actually allocates:
> 
> 0xcffff800-0xcffff8ff irq 22 at device 10.0 on pci1

Ah sorry, yes the 'c' was missing, so 0xcffff800-0xcffff8ff is correct.

br
db
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Brian O'Shea | 1 Sep 2004 09:01
Picon
Favicon

Re: Library (ab)use in kernel land

--- Mike Bristow <mike <at> urgle.com> wrote:
> 
> And manual pages in section 9 of the manual, eg:
> 
> $ man 9 printf
> 
> will give you the docs for the printf that you can call in kernelspace.

Yes, however I can't find a man page that nicely outlines all of the
kernel libc-like functions available (something like stdio(3) but for
section 9).  I think the original poster was looking for something
like that.

-brian

		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Stijn Hoop | 1 Sep 2004 09:56
Picon
Picon
Favicon

ndis/if_ndis kernel configuration patch

Hi,

after I got frustrated by forgetting to manually make the if_ndis module after
an upgrade to -CURRENT, and subsequently having to fix /boot/loader.conf
again, I was motivated enough to try and think of a way to integrate
ndis/if_ndis into the build system.

Attached is my first try at this. Since most of the stuff has been copy &
pasted there's bound to be something wrong here, but I have verified that
having

NDIS_INF=/path/to/ndis.inf
NDIS_SYS=/path/to/ndis.sys

in /etc/make.conf makes the if_ndis module build, and I also compiled
a static kernel with

device		ndisapi
device		ndis
options		NDIS_INF
makeoptions	NDIS_INF=/path/to/ndis.inf
options		NDIS_SYS
makeoptions	NDIS_SYS=/path/to/ndis.sys

which booted & detected my Dell Truemobile 1300 card fine.

I did ran into 2 build errors when statically compiling ndisapi/ndis -- maybe
the kernel build has stricter CFLAGS? Also attached is a patch to fix those
warnings.

(Continue reading)

Gleb Smirnoff | 1 Sep 2004 14:00
Picon
Favicon

copyin() instead of sooptcopyin()?

  Dear hackers,

  I have a case, when I need to pass a small argument to kernel,
and receive large reply using getsockopt().

First I get the argument:

	char var[MAX];
	...
	if ((error = sooptcopyin(sopt, var, MAX, 2))
	...

Then I push reply to it using sooptcopyout(). But userland receives it
truncated to MAX. The problem lives in sooptcopyin() implementation,
which changes sopt->sopt_valsize.

Now, in my patch I solve this using bare copyin(). Another approach
may be saving sopt->sopt_valsize before call to sooptcopyin(), and then
restoring it. Not a nice solution however...

The questions are:

1) Is it OK to use bare copyin()? Which hidden problems can arise?
2) Is that correct that soopcopy[in|out]() changes sopt's fields?

--

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
(Continue reading)

yangshazhou | 1 Sep 2004 04:31
Picon
Favicon

What's what on the scheduler in FreeBSD 5.x

Hi all,
    I've very interested in scheduler implementation. I got some opinions on
FreeBSD5's scheduler from source codes and articles. And I presented here,
waiting for critism, for I'm new to FreeBSD.

KSE

    1.an implementation of SA (Scheduler activation), two-level co-operating
scheduling of kernel and userland.

    2.One process can own multiple KSEG, each with different schedule policy
and diffferent priority.

    3.KSE load kernel thread and userland thread to run, as a virtual CPU.
Scheduler's choosing policy is based on the KSE-loaded thread's priority,
the highest gets running and the KSEs with the same priority get
round-robin.

    4.The userland scheduler can implement more reasonable, more complex
policy. But now, it's quite simple.

Time Slice

    1.Actually No time-slice. It's some periodic functions to make threads
be preemptied.

    2.roundrobin() works every 100ms. Other periodic functions sleep longer
till run, eg, 1s for schedcpu(). Then we can conclude roundrobin() can
invoke a schedule action every 100ms, re-selecting better KSEs to run.
That's the same effect as constant 100ms time slice.
(Continue reading)

Bagus | 1 Sep 2004 15:25
Picon

slow login, app launching, etc


 Hi, is anyone able to help me problem solve on this? Is this the right
forum for this kind of question? If not, could someone please send me a
pointer to an organization that might be able to help. I have a small budget
to get this fixed if anyone wants it.

 I'm running FreeBSD 2.2CAM-19980716-SNAP on bagus.org.

 I've been running it for a few years. Recently, after normal performance,
 I've been experiencing extremely slow login prompt appearance, extremely
 slow application launching and what bugs me the most is the extremely slow
 response time of my java-web server. OTher functionality is ok. It serves
 html files just fine and also basic command line response is fine.

 Anyone out there have any clues as to what it could be? I'm kind
 of guessing  it has something to do with some name resolution somewhere,
 but I'm not sure. Any help would be greatly appreciated.

 Thanks,

 Bagus

_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Rob Deker | 1 Sep 2004 17:38

The continued remote debugging saga...


So, after a lot of work and help from folks here, I've gotten remote
gdb functioning (thanks again to those who helped. In the end there
was a bad cable in the mix that was the final screw-up). Now I have
one other question/problem. I've got cuaa0 on the target machine as
the console, and cuaa1 as the gdb port. In the docs it says that to
switch to gdb mode I enter 'gdb'  at the ddb prompt. No problem. It
also says that typing 'gdb' again will take me back to ddb. What it
doesn't say is where to enter it. I've tried in gdb (no success) and
on the console (also no success). What am I missing on how to switch
back to ddb mode?  Alternately, if I can just cause the machine to
reset from gdb, that would work. I've tried the following from gdb:

~ > set $eax=0
~ > jump boot

This works SOMETIMES, but for example, the machine is at home and
wedged now mid-shutdown (seems I may have screwed up an mbuf pointer
and bufdaemon is upset about it). Any suggestions are welcome :)

Thanks again,

-d

John-Mark Gurney | 1 Sep 2004 19:15

Re: The continued remote debugging saga...

Rob Deker wrote this message on Wed, Sep 01, 2004 at 11:38 -0400:
> So, after a lot of work and help from folks here, I've gotten remote
> gdb functioning (thanks again to those who helped. In the end there
> was a bad cable in the mix that was the final screw-up). Now I have
> one other question/problem. I've got cuaa0 on the target machine as
> the console, and cuaa1 as the gdb port. In the docs it says that to
> switch to gdb mode I enter 'gdb'  at the ddb prompt. No problem. It
> also says that typing 'gdb' again will take me back to ddb. What it
> doesn't say is where to enter it. I've tried in gdb (no success) and
> on the console (also no success). What am I missing on how to switch
> back to ddb mode?  Alternately, if I can just cause the machine to
> reset from gdb, that would work. I've tried the following from gdb:

If you are able to be at a command line, you could try:
sysctl debug.kdb.current=ddb

> This works SOMETIMES, but for example, the machine is at home and
> wedged now mid-shutdown (seems I may have screwed up an mbuf pointer
> and bufdaemon is upset about it). Any suggestions are welcome :)

you could also try:
call reset
or:
print reset()

--

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
_______________________________________________
(Continue reading)

Rob Deker | 1 Sep 2004 19:35

Re: The continued remote debugging saga...


| If you are able to be at a command line, you could try: sysctl
| debug.kdb.current=ddb
|
If I was able to get to a command line, I'd just use shutdown :) Could
I build up the appropriate struct in gdb and use the sysctl() system
call though?

|> This works SOMETIMES, but for example, the machine is at home and
|>  wedged now mid-shutdown (seems I may have screwed up an mbuf
|> pointer and bufdaemon is upset about it). Any suggestions are
|> welcome :)
|
|
| you could also try: call reset or: print reset()
|
I think I looked for this and gdb didn't know of a 'reset' symbol. I
found reboot() which takes a uthreads pointer and an args pointer, and
boot() which just takes an int of boot flags (which was the 0 that I
shoved into eax for RB_AUTBOOT).

Thanks,

-d

Gmane