uart device numbering

2012-11-29 Thread Norbert Koch
disabling uarts 0 & 1 through /boot/device.hints seems not to change anything. Is this behaviour expected/wanted? Thank you, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe,

bus device/ivars

2012-05-31 Thread Norbert Koch
tion? I expected to find something like a BUS_DELETE_CHILD method. Thank you for any advice, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "

Re: bus device driver

2009-07-15 Thread Norbert Koch
No. First of all, the PCI bus driver will only allocate resources for direct children. It simply passes requests up the tree for grandchildren (this is how ISA devices behind a PCI-ISA bridge request resources). In this case, you will want to allocate resources for your BAR and your interru

Re: bus device driver

2009-07-14 Thread Norbert Koch
From a hardware perspective, how do your devices know which addresses to decode? Do they consume subranges of BARs or are they assigned fixed addresses somehow? Do they have programmable decoders of some sort themselves? If you wish to have the PCI bus assign you resources then that implie

Re: bus device driver

2009-07-14 Thread Norbert Koch
John Baldwin schrieb: On Monday 13 July 2009 10:05:15 am Norbert Koch wrote: Hello. I just started to write a device driver for a multi-function pci card. This card replaces a number of independant isa hardware devices. This pci card contains memory, i/o and interrupt sources. I want my

bus device driver

2009-07-13 Thread Norbert Koch
***/ Thank you for any help. Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

'libc_r: enter/leave_cancellation_point()

2008-10-21 Thread Norbert Koch
ime); + _thread_enter_cancellation_point(); + return (ret); +} > Shouldn't that be _thread_leave_cancellation_point() after calling _pthread_cond_timedwait() ? What effect should I see if this is wrong? Best regards, N

gdb macros xp and xxp

2007-04-05 Thread Norbert Koch
Hello, for learning about gdb macros I looked through gdbinit-1.i386. ( or is there some secret gdb manual that *explains* macros? :-) The macros xp and xxp calculate the number of possible arguments as: ((*(int*)$ebp)-(int)$ebp)/4-4 Let's see (assuming "char* ebp"): *ebp : saved ebp from pr

Re: usb keyboard attach crashes process usb0 (under FreeBSD4.11)

2007-04-03 Thread Norbert Koch
Eugene Grosbein schrieb: On Tue, Apr 03, 2007 at 11:37:31AM +, Norbert Koch wrote: You didn't mention are you running 4.11-RELEASE or 4.11-STABLE. If you are using RELEASE then you definitely should try latest 4.11-STABLE, because there were lots of anti-panic fixes to RELENG_

Re: usb keyboard attach crashes process usb0 (under FreeBSD4.11)

2007-04-03 Thread Norbert Koch
Eugene Grosbein schrieb: On Tue, Apr 03, 2007 at 09:31:05AM +, Norbert Koch wrote: First of all, I understand that there is no interest here in solving FreeBSD 4.11 problems. I only post this because there may be a chance that this could be a problem in CURRENT too. (If no, may be

usb keyboard attach crashes process usb0 (under FreeBSD4.11)

2007-04-03 Thread Norbert Koch
_detach(device_t self) { @@ -219,6 +235,8 @@ return error; DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); + +usbd_add_device_detach_event(self); return (0); } Thank you for any help or comment, Norbert Koch ___

Re: What is the proper use of mlock(2)/munlock(2)?

2006-03-28 Thread Norbert Koch
Daniel Rudy schrieb: Hello FreeBSD Hackers, I've been reading the man page on mlock(2) and a number of questions have arisen about it's use. I have looked at malloc and mmap, and I have not been able to figure this one out. There doesn't seem to be any compiler or library options dealing wit

RE: [PATCH] does ukbd delay break scan codes?

2006-02-26 Thread Norbert Koch
> > yes I too looked at ukbd code and found the same. > > I already put a patch on the bug list yesterday. > > good. does it fix your problem, i.e. keyboard freeze? if it does then i > can commit it for you. It doeos at least for me and my environment (FreeBSD 4). ___

RE: [PATCH] does ukbd delay break scan codes?

2006-02-23 Thread Norbert Koch
Hello Maksim, yes I too looked at ukbd code and found the same. I already put a patch on the bug list yesterday. In the mean time I compared the ukbd code to that of NetBSD and OpenBSD. Their code is quite different. I expect that the DragenFlyBSD guys may have the same problem, but did not find t

does ukbd delay break scan codes?

2006-02-22 Thread Norbert Koch
Hello, while testing an older release of kbdmux under FreeBSD4 I am seeing some strange things: I have attached a primary ps/2 and a secondary usb keyboard. I run under X (which means that kbdmux is switched to return raw key codes only) and inspect kbdmux using some printfs and xconsole. >From

device probe re-tried for failed isa device

2006-01-13 Thread Norbert Koch
in probe() when the hardware fails? Thank you, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

RE: PXE Boot FreeBSD with Etherboot

2005-08-12 Thread Norbert Koch
> > > It seems there are some problems with using pxeboot in > combination with > > > the network boot code from the etherboot project. I have tried many > > > combinations of options with no success. The result is very > similar to > > > the following photo I found: > > > > > > http://photos.

RE: PXE Boot FreeBSD with Etherboot

2005-08-11 Thread Norbert Koch
> It seems there are some problems with using pxeboot in combination with > the network boot code from the etherboot project. I have tried many > combinations of options with no success. The result is very similar to > the following photo I found: > > http://photos.night-shade.org.uk/photo.php?p

RE: (no subject)

2005-08-04 Thread Norbert Koch
> #define DEVICE2SOFTC(device) ((struct dev_softc > *)device_get_softc(device)) > > static void dev_intr(void *arg); > > struct dev_softc { > ... > int rid_irq; > struct resource* res_irq; > void*intr_cookie; > ... > }; > > static int > dev_attach(device_t device) > { > ... > >

RE: Problem with pic16l_setled

2005-07-27 Thread Norbert Koch
> You see, in C, I call the function like this (for example): > > void pic16l_setled(unsigned int val); > pic16l_setled (0x1234); > > And it gets assembled to: > > pushl $0x1234 > callpic16l_setled > > But it should be assembled to: > > pushl $0x1234 >

RE: await & asleep

2005-07-26 Thread Norbert Koch
> > The functions await() and asleep() in kern_synch.c > > are marked as EXPERIMENTAL/UNTESTED. > > Is this comment still valid? Does anyone have used > > those functions successfully? Should I better not > > use them in my device driver code for RELENG_4? > > How do I correctly cancel a request (a

await & asleep

2005-07-26 Thread Norbert Koch
Hello. The functions await() and asleep() in kern_synch.c are marked as EXPERIMENTAL/UNTESTED. Is this comment still valid? Does anyone have used those functions successfully? Should I better not use them in my device driver code for RELENG_4? How do I correctly cancel a request (as I should do ac

RE: how to use the function copyout()

2005-07-25 Thread Norbert Koch
> > > So if I get it right, it's impossible in FreeBSD to gain access to > > 64KB of user's program memory with ioctl? > > > > My situation is this - I have a device driver for Linux. My task is > > port it as it is (1:1) into FreeBSD. > > > > In the Linux driver Ioctl is realized with the macroses

RE: how to use the function copyout()

2005-07-25 Thread Norbert Koch
> #define IOCTL_GET_B_IOWR("F", 127, 0x4) I think the third parameter to _IOWR should directly specify a type, e.g. _IOWR("F", 127, int) or _IOWR("F", 127, struct MyStruct). > > driver > > struct my_softc { > ... > short unsigned int B; > }; > > ... > > static int > my_ioctl(s

Posix threads: CLOCK_REALTIME/CLOCK_MONOTONIC

2005-06-29 Thread Norbert Koch
Hello. I am working on a multi-threaded application which may call settimeofday() and therefore may have serious problems with timing calculations. In my applications I calclulate time differences using clock_gettime(CLOCK_MONOTONIC) under FreeBSD-5. Under FreeBSD-4 it is a trivial kernel patch i

pxe boot failure

2005-06-28 Thread Norbert Koch
Hello, I'm trying to get pxeboot running without any success so far. I get 'BTX halted' after a register dump showing an int 6. I read almost anything, I could find about that problem. I tried with/without LOADER_TFTP_SUPPORT, I uncommented those delay() lines in pxe.c and enlarged the delays. I

uplcom callin/callout device?

2005-06-24 Thread Norbert Koch
Hello. I'm trying to get a sub-to-rs232 adaptor running with FreeBSD-5. The vendor of this adaptor is some chinese company named High-Edge Tech, but as usbdevs shows, it identifies as USB_VENDOR_PROLIFIC(0x067b) and USB_PRODUCT_PROLIFIC_PL2303(0x2303). For testing, I connect the adaptor with th

RE: Nagios and threads

2005-06-22 Thread Norbert Koch
> [snip] > > at least some assumptions that the child won't be > > doing much before > > execing or exiting. (But Im sure one of the > > The child process should be able to call any system > calls it likes -without assuming that pthreads from > the parent process have been copied over to the chil

RE: using vkbd device

2005-06-22 Thread Norbert Koch
Hello, I did some more testing with kbdmux. 1. I wait for the screen saver becoming active. 2. I press the control key. 3. All keys, I press after that, come as control keys, e.g. I press 'j' or 'J' and see a linefeed, I press 'I' and see a tab. 4. I wait a second time for the screen save

RE: kernel panic in usb0; was: RE: using vkbd device

2005-06-16 Thread Norbert Koch
> >In gdb "bt" only shows two entries. The function where the panic > >occurred and 0x0! > > > > > > that is normal > you don't want to jump into gdb that soon. > there is hardly anything set up. > > use the sysctl to enter gdb later. > > >BTW, after boot -gd, when gdb attaches I have a kernel pani

RE: kernel panic in usb0; was: RE: using vkbd device

2005-06-14 Thread Norbert Koch
> > When quickly connecting/disconnecting > > i guess you mean here unplug the keyboard and then immediately plug it > back, right? I mean plug in / plug out, repeat for ever. > can you tell what value "pipe" handle has? i suspect its NULL yes > can you tell what value "iface" handle has? i s

RE: kernel panic in usb0; was: RE: using vkbd device

2005-06-14 Thread Norbert Koch
> > > >> When quickly connecting/disconnecting > > > > > > i guess you mean here unplug the keyboard and then immediately plug it > > back, right? > > > > sounds like he means "repeatedly." yes > booting with -gd drops you into the (gdb) debugger immediatly.. > > I presume you have a gdb looki

kernel panic in usb0; was: RE: using vkbd device

2005-06-14 Thread Norbert Koch
> The ukbd-specific detaching only works, because I implemented something in > ukbd.c, > that Hans Petter Selasky [EMAIL PROTECTED] suggested in thread > "usbd.conf: > detach ukbd". > (See the patch files, I posted there) > > When the kernel panics, it does this in usb0 kernel thread. > I figured o

RE: using vkbd device

2005-06-13 Thread Norbert Koch
> > seems to work, although I still have some stability issues with > > dynamically attaching/detaching a usb keyboard. For your reference I > > would you share with us what sort of issues you are having? feel free to > move this into private email if you are not comfortable discussing it on > publ

RE: Obvious bug in /sys/i386/include/bus.h (was: bus_at386.h)

2005-06-13 Thread Norbert Koch
> >So > >how can I fix this in assembly. I am not an expert with inlined assembly, > >so > >maybe someone can correct me if I am wrong, but something like this needs > >to > >be added: > > > >or %ecx, %ecx > >jz 2 > > > >2: > > This is wrong beacause the result is stored in ecx. Better using > JECX

RE: using vkbd device

2005-06-13 Thread Norbert Koch
> you also might want to look at experimental keyboard mux drivers. it is > based on vkbd(4) and uses the idea of one super-keyboard that consumes > scancodes from other keyboards. there are still a few issues i need to > fix, but, in general, it works. > > http://www.geocities.com/m_evmenkin/k

RE: usbd.conf: detach ukbd

2005-06-13 Thread Norbert Koch
> > Else if devd is not available on 4.11 you will have to change > > some code and > > compile a new kernel, from what I can see. > > > > To the file /sys/dev/usb/ukbd.c add this: > > > > static void > > usbd_add_device_detach_event(device_t self) > > { > >struct usb_event ue; > > > >bzero

RE: Slowing down an old program to run on a fast CPU?

2005-06-12 Thread Norbert Koch
> > You could try installing vmware and running however > > many copies of windows > > it takes to make the game playable... (i would say > > some other form of > > *BSD, but it probobly wouldn't hog as much cpu :P) > > > > ~NVX Or try qemu. I yesterday booted & installed NetBSD in a qemu box runn

RE: Determining disk device and kicking GEOM when doing automaticmounting of umass devices

2005-06-09 Thread Norbert Koch
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Dag-Erling > Smørgrav > Sent: Friday, June 10, 2005 8:03 AM > To: Darren Pilgrim > Cc: freebsd-hackers@freebsd.org > Subject: Re: Determining disk device and kicking GEOM when doing > automaticmounting of

RE: usbd.conf: detach ukbd

2005-06-09 Thread Norbert Koch
> I'm not sure if detach is supported like that, because the "ukbd" > device name > will not be passed to "usbd" during detach. Then one needs to > match against > the class/subclass of the USB-keyboard: > > device "USB keyboard" > class 3 > subclass 1 > detach " ukbd0" > But from wha

RE: usbd.conf: detach ukbd

2005-06-09 Thread Norbert Koch
> -Original Message- > From: Maksim Yevmenkin [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 09, 2005 5:50 PM > To: Norbert Koch > Cc: [EMAIL PROTECTED] Org > Subject: Re: usbd.conf: detach ukbd > > > Norbert, > > > when running usbd (under FreeB

RE: usbd.conf: detach ukbd

2005-06-09 Thread Norbert Koch
> -Original Message- > From: Hans Petter Selasky [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 09, 2005 4:31 PM > To: Norbert Koch; Freebsd-Hackers@Freebsd.Org > Subject: Re: usbd.conf: detach ukbd > > > On Thursday 09 June 2005 15:41, Norbert Koch wrote:

usbd.conf: detach ukbd

2005-06-09 Thread Norbert Koch
Hello, when running usbd (under FreeBSD 4.11) with -dv switches I can see that a usb keyboard correctly attaches as ukbd0, but detaches as fall-through "USB device". Do I just have to live with that fact or can I change that anyhow? Is that a device/device-class specific problem? Thank you, Norb

RE: synchronization question about /sys/dev/vkbd/vkbd.c

2005-06-05 Thread Norbert Koch
> > My question is: > > Is it not possible, that vkbd_dev_intr() could be > > interrupted at any position before the VKBD_LOCK() > > and then vkbd_dev_write() called? > > in theory it is possible. > > > If yes, how should vkbd_dev_write() know, that it should > > call task_enqueue(), as TASK is s

synchronization question about /sys/dev/vkbd/vkbd.c

2005-06-03 Thread Norbert Koch
Why not always call task_enqueue() unconditionally here and leave TASK only to synchronize the close call? Thank you for any help, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

O_NONBLOCK vs IO_NDELAY: what to use where?

2005-06-03 Thread Norbert Koch
should I test for? Thank you, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

using vkbd device

2005-06-03 Thread Norbert Koch
/dev/kbd0, set it to K_RAW, read chars from it and write them as ints to vkbd's control device, right? Thank you for any help, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To un

RE: mutual exclusion in vkbd

2005-05-31 Thread Norbert Koch
Thank you all. I'll try it. Norbert > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Maksim Yevmenkin > Sent: Tuesday, May 31, 2005 10:59 PM > To: Alexander Kabaev > Cc: Norbert Koch; freebsd-hackers@freebsd.org > Subject: Re

mutual exclusion in vkbd

2005-05-31 Thread Norbert Koch
() work in that context? Or should I use lockmgr with LK_EXCLUSIVE/LK_RELEASE? Is there any (pseudo)process context inside a kernel task? Thank you for any help, Norbert Koch ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman

RE: panic in device driver strategy function: bp->b_dev==NULL

2005-05-27 Thread Norbert Koch
'standard' kernel configuration. > > As soon as I boot a kernel with some debug settings the > driver crashes due to a failed assertion in my strategy > routine. > Hello again, I played around with configuration switches and found, that withou

panic in device driver strategy function: bp->b_dev==NULL

2005-05-27 Thread Norbert Koch
p, devtoname (bp->b_dev), bp->b_flags, bp->b_blkno, bp->b_bcount / DEV_BSIZE, bp->b_data); s = splbio (); ... ASSERT #2 fails. Any idea? Thank you for any help, Norbert Koch

parameters for tsleep(9)

2004-12-24 Thread Norbert Koch
Hello. I am just writing a device driver for the i82527 (can-bus) chip. For testing I need the driver to poll the chip instead of running in interrupt mode. My dev_t read function basically looks like this: for (;;) { while (chip_has_data(...)) { read_chip_data(...); error = do_uiomo

RE: A program to automatically switch keyboards for syscons

2004-12-17 Thread Norbert Koch
May be, I should do an ioctl KDSKBMODE to K_RAW to not miss any kind of keyboard event? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

A program to automatically switch keyboards for syscons

2004-12-17 Thread Norbert Koch
Hello. For an embedded system I need FreeBSD to accept input from two keyboards at the same time. As syscons cannot do that and it is obviously not trivial to change that, I wrote the enclosed program. After switching syscons to the first keyboard available, it calls select for the other keyboard

using two keyboards at the same time

2004-12-16 Thread Norbert Koch
Hello. I know, the syscons driver does not allow to have two keyboards attached at the same time. So my idea was to have a userland application which polls the keyboard(s) currently _not_ attached to syscons using select(2) or poll(2) and then switching to an active keyboard. >From reading the so