From owner-freebsd-smp Mon Nov 27 17: 9:11 2000 Delivered-To: freebsd-smp@freebsd.org Received: from mailhost.iprg.nokia.com (mailhost.iprg.nokia.com [205.226.5.12]) by hub.freebsd.org (Postfix) with ESMTP id F2A4F37B479 for ; Mon, 27 Nov 2000 17:09:08 -0800 (PST) Received: from darkstar.iprg.nokia.com (darkstar.iprg.nokia.com [205.226.5.69]) by mailhost.iprg.nokia.com (8.9.3/8.9.3-GLGS) with ESMTP id RAA08927; Mon, 27 Nov 2000 17:09:08 -0800 (PST) Received: (from root@localhost) by darkstar.iprg.nokia.com (8.11.0/8.11.0-DARKSTAR) id eAS195318688; Mon, 27 Nov 2000 17:09:05 -0800 X-Virus-Scanned: Mon, 27 Nov 2000 17:09:05 -0800 Nokia Silicon Valley Email Exploit Scanner Received: from maxdialin16.iprg.nokia.com (205.226.20.246, claiming to be "iprg.nokia.com") by darkstar.iprg.nokia.com(WTS.12.69) smtpdWalW1q; Mon, 27 Nov 2000 17:09:00 PST Message-ID: <3A2307B1.A2715334@iprg.nokia.com> Date: Mon, 27 Nov 2000 17:17:37 -0800 From: Michael Williams Organization: Nokia X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: Greg Lehey Cc: Jake Burkholder , smp@FreeBSD.ORG Subject: Re: BSD/OS interrupt code References: <20001127015006.5B7BDBA7A@io.yi.org> <20001127122736.G27697@echunga.lemis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org One application Solaris has for this "trick" of building handlers on the fly, is to install debugging/verbose handlers dynamically, especially where the initial handlers do some vectoring (small branches) before jumping off to do hard work. The miss handlers do this for example. As far as which instruction format is "simple", I'm curious, why do you suggest x86 as an example? Cheers, Michael Greg Lehey wrote: > On Sunday, 26 November 2000 at 17:50:06 -0800, Jake Burkholder wrote: > >> On Sunday, 26 November 2000 at 14:07:49 -0800, Jake Burkholder wrote: > >>> Hi, > >>> > >>> If anyone with access to the BSD/OS code is interested, I've written > >>> a little program that runs their interrupt stub code generator in > >>> userland. You can then abort(); and disassemble the stub from > >>> the core dump to look at the code all in one piece. Makes it much > >>> easier to follow. > >>> > >>> In case you haven't looked, their interrupt handlers are generated > >>> by bcopy-ing various blocks of assembler code into an array at > >>> runtime, and then poking in arguments and relocating branches. > >> > >> Interesting. I was wondering whether something similar would be a > >> good idea. On the other hand, We don't waste much space by having > >> multiple alternate stubs. What's your feeling? > > > > I suspect that it would be hard to do this for architectures > > other than x86, which has a relatively simple instruction format. > > > > I also think that BSD/OS went a little too far with this, and > > have produced code that is very difficult to understand, let > > alone maintain. I think its cool what they did, I'm humbled > > and amazed that they made it work, but I don't know that its > > right for FreeBSD. > > That's a reasonable objection. Where's your program? > > Greg > -- > Finger grog@lemis.com for PGP public key > See complete headers for address and phone numbers > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message