From owner-freebsd-scsi Wed Jun 2 15:10:41 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from pluto.plutotech.com (mail.plutotech.com [206.168.67.137]) by hub.freebsd.org (Postfix) with ESMTP id 1571214CAA for ; Wed, 2 Jun 1999 15:10:35 -0700 (PDT) (envelope-from gibbs@plutotech.com) Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by pluto.plutotech.com (8.9.2/8.9.1) with ESMTP id QAA32101; Wed, 2 Jun 1999 16:10:32 -0600 (MDT) (envelope-from gibbs@plutotech.com) Message-Id: <199906022210.QAA32101@pluto.plutotech.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Christopher R. Bowman" Cc: "Justin T. Gibbs" , freebsd-scsi@freebsd.org Subject: Re: Support for Symbios vs. Adaptect SCSI In-reply-to: Your message of "Wed, 02 Jun 1999 17:59:25 EDT." <199906022200.SAA32326@quark.ChrisBowman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 02 Jun 1999 16:00:19 -0600 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>The scripts syntax is somewhat obtuse, but I guess it would suffice. The >>main additional feature I'd want in the assembler is the ability to >>easily designate condition portions of the script that can be independently >>patched in. Take a look at the sys/dev/aic7xxx/aic7xxx.seq and the output >>from aicasm in sys/compile/KERNAME/aic7xxx_seq.h for an idea of the >>patching capability I'd want. > >Ok I read through some of it, but I don't get how the symbols are relocated. > >I mean I see how the sequencer script is assembled by your assembler, and I >think I understand how you have implemented what amounts to a run time >dropping of certain instruction from being downloaded to the chip using >conditional statements executed at download time. What I don't understand >is how are the assembly labels fixed up when instructions are dropped from >being download to the chip due to this conditional situation. Each instruction that references an address has that address re-calculated at download time to take into consideration the instructions that are not going to be included in the runtime load. So, a jump instruction starts out with an address relative to all instructions assembled. When the instruction is downloaded, we subtract the number of instructions discarded 'before it' from the original address. Take a look at ahc_download_instr() for details. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message