Re: pci_get_devid()

2001-08-22 Thread Weiguang SHI
Take a look at PCI_ACCESSOR in "pcivar.h" Good Luck Weiguang >From: djohnson <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: pci_get_devid() >Date: Wed, 22 Aug 2001 14:22:52 -0600 > >I'm doing some PCI related code and keep running into the >function/method pci_get_devid() in FreeBSD source

Re: Allocate a page at interrupt time

2001-08-08 Thread Weiguang SHI
I found an article on livelock at http://www.research.compaq.com/wrl/people/mogul/mogulpubsextern.html Just go there and search for "livelock". But I don't agree with Terry about the interrupt-thread-is-bad thing, because, if I read it correctly, the authors themself implemented their ideas in

Re: Kernel stack size

2001-08-07 Thread Weiguang SHI
>From: Julian Elischer <[EMAIL PROTECTED]> >To: "Semen A. Ustimenko" <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: Kernel stack size >Date: Tue, 7 Aug 2001 13:29:25 -0700 (PDT) > > > >On Wed, 8 Aug 2001, Semen A. Ustimenko wrote: > > > Hi! Thanks for light speed response! > > > > On

Re: timing question

2001-08-07 Thread Weiguang SHI
>From: Alfred Perlstein <[EMAIL PROTECTED]> >To: Jeff Behl <[EMAIL PROTECTED]> >CC: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> >Subject: Re: timing question >Date: Mon, 6 Aug 2001 14:49:55 -0500 > >* Jeff Behl <[EMAIL PROTECTED]> [010806 12:48] wrote: > > please excuse and direct me to the right

Re: Kernel Symbol Question

2001-08-06 Thread Weiguang SHI
Hi, >From: Tabor Kelly <[EMAIL PROTECTED]> >Reply-To: Tabor Kelly <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Kernel Symbol Question >Date: Mon, 6 Aug 2001 17:43:30 -0700 > >Which source file(s) are the kernel symbols defined in? By symbols I >mean the symbols that the nlist() man page

Re: address resolution question

2001-08-01 Thread Weiguang SHI
... > > According to my calculation, pte=0xbfcc0001 and *pte will yield > > 0x2FF,0xC0,0x1 as indexes to the page directory table, page table and > > an offset. My page directory table is like this (starting at physical > > address 0x2C2000): > > > > indexpage_table_base_address; p

address resolution question

2001-07-31 Thread Weiguang SHI
Hi, I need your help to understand this. In machdep.c, 1451 /* 1452 * map page 1 R/W into the kernel page table so we can use it 1453 * as a buffer. The kernel will unmap this page later. 1454 */ 1455 pte = (pt_entry_t)vtopte(KERNBASE +

kernel stack size

2001-07-27 Thread Weiguang SHI
A closer look at the code /usr/src/sys/i386/i386/locore.s astonished me with the fact that the kernel stack size for a process, at least for process 0, is 2*4096-sizeof(struct user) = 3988 bytes, less than even one page. Anyone to verify this, please? BTW, I am looking at the 4.3-stable code. Th

Re: hooks

2001-07-25 Thread Weiguang SHI
Architecture dependent. For the 4.3-stable code for i386, /usr/src/sys/i386/i386/trap.c contains the function syscall2(). I believe you can safely put your code in it before the dispatching system call part, just be aware of kernel stack overflow. Weiguang >From: Evan Sarmiento <[EMAIL PROTEC

Re: Invoking a userland function from kernel

2001-07-25 Thread Weiguang SHI
>From: Terry Lambert <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >CC: [EMAIL PROTECTED], [EMAIL PROTECTED] >Subject: Re: Invoking a userland function from kernel >Date: Wed, 25 Jul 2001 00:16:33 -0700 > >[EMAIL PROTECTED] wrote: > > > > I need pass asynchronously dat

RE: btx building error

2001-07-24 Thread Weiguang SHI
Wait a minute. I've got binutils 2.11, including as, which was the most recent version that can be found at ftp.gnu.org. Thanks Weiguang >From: John Baldwin <[EMAIL PROTECTED]> >To: Weiguang SHI <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: RE: btx building

btx building error

2001-07-24 Thread Weiguang SHI
Hi, I cvs'ed the current version of btx by "cvs co btx" and tried to build it on my FBSD-4.0 box and here is what I got: bash-2.04$ /usr/bin/make ===> btx (cd /usr/home/wgshi/tmp/btx/btx; m4 btx.s) | as --defsym BTX_FLAGS=0x0 -o btx.o {standard input}: Assembler messages: {st

RE: jmp after setting PE?

2001-07-23 Thread Weiguang SHI
found more info about this BTX before going through the ultimate source code? (I've search the mailing-lists.) Thanks Weiguang >From: John Baldwin <[EMAIL PROTECTED]> >To: Weiguang SHI <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: RE: jmp after setting PE? >Date

Re: using syscalls in a module (stack problem ?)

2001-07-23 Thread Weiguang SHI
I guess this is it (/usr/src/sys/i386/i386/locore.s): 348 /* now running relocated at KERNBASE where the system is linked to run */ 349 begin: 350 /* set up bootstrap stack */ 351 movl_proc0paddr,%esp/* location of in-kernel pages */ 352 a

jmp after setting PE?

2001-07-20 Thread Weiguang SHI
Hi, Please forgive me if this seems too easy. "http://people.freebsd.org/~jhb/386htm/s10_03.htm"; says: Immediately after setting the PE flag, the initialization code must flush the processor's instruction prefetch queue by executing a JMP instruction. The 80386 fetches and decodes inst

help on mounting linux partition

2001-06-24 Thread Weiguang Shi
Hi, I've sent this to freebsd-questions but no luck yet. I am using freebsd 4.0. and failed to mount a Linux partition on the second hard disk. Could you please shed some light? Thanks very much Weiguang == bash-2.04# fdisk /dev/a