History log of /freebsd-11-stable/sys/dev/aic7xxx/aicasm/aicasm_gram.y
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 369944 04-Jun-2021 jrtc27

aic7xxx: Fix re-building firmware with -fno-common

The generated C output for aicasm_scan.l defines yylineno already, so
references to it from other files should use an extern declaration.

The STAILQ_HEAD use in aicasm_symbol.h also provided an identifier,
causing it to both define the struct type and define a variable of that
struct type, causing any C file including the header to define the same
variable. This variable is not used (and confusingly clashes with a
field name just below) and was likely caused by confusion when switching
between defining fields using similar type macros and defining the type
itself.

Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30525

(cherry picked from commit 5e912f5fec025766521f535d1237330ede7f18e2)

Git Hash: b305e1dfbf695d9082661cdb9cae830cdc592b32
Git Author: jrtc27@FreeBSD.org


# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 299375 10-May-2016 pfg

aic7xxx: minor spelling fixes.

Affects mostly comments but also a visible text string,

Differential Revision: https://reviews.freebsd.org/D6270


# 243906 05-Dec-2012 bapt

remove redundant yyparse declarations

PR: conf/174079
Submitted by: Garrett Cooper <yanegomi@gmail.com>


# 243037 14-Nov-2012 dim

Fix a bug in aicasm_gram.y, noted by a newer clang 3.2 snapshot: it
compared an enum scope_type against a yacc-generated define, so the
condition would always be false.

MFC after: 3 days


# 224046 14-Jul-2011 emaste

Improve portability #defines for compiling aicasm on other systems.

Submitted by: Robert Millan rmh debian.org
Obtained from: Debian GNU/kFreeBSD


# 210055 14-Jul-2010 gibbs

Correct logic bug in aicasm's undefined register bit access detection code.

The code in question verifies that all register write operations only change
bits that are defined (in the register definition file) for that effected
register. The bug effectively disabled this checking.

o Fix the check by testing the opcode against all supported read ("and" based)
operands.

o Add missing bit definitions to the aic7xxx and aic79xx register definition
files so that the warning (treated as a fatal error) does not spuriously
fire.

Reported by: Pawel Worach <pawel.worach@gmail.com>
MFC after: 1 week


# 193244 01-Jun-2009 delphij

Code cleanups to make this WARNS=6 clean.

PR: bin/96128


# 165628 29-Dec-2006 yar

Fix a group of typos:
preceed -> precede,
preceeded -> preceded,
preceeding -> preceding.

Submitted by: Andre Guibert de Bruet <andy@siliconlandmark.com>


# 139749 05-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


# 109576 20-Jan-2003 gibbs

Allow constants to be complex expressions so long as those
expressions can be fully evaluated during assembly.

Remove the numerical_value portion of the grammer which is
no longer referenced.


# 107303 27-Nov-2002 scottl

Minor updates to the aicasm:

aicasm_gram.y:
Use a direct move from allzeros to emulate a
mvi of 0.

aicasm_insformat.h:
sync $Id$

aicasm_symbol.c:
Minor header change.

Approved by: re (blanket)


# 104028 27-Sep-2002 gibbs

Remove redundant inclusion of inttypes.h in aicasm_gram.y
and properly sort inttypes.h into list of includes.

Noticed by: Mike Barcroft <mike@freebsd.org>


# 104019 26-Sep-2002 gibbs

Use inttypes.h

Upgrade assembler to allow a move immediate of 0.
This is helpful in certain macros where we can't know the value of the
immediate in advance.


# 102668 31-Aug-2002 gibbs

Update assembler syntax and assembler to allow generation of register
description tables used for diagnostic "pretty printing".


# 100502 22-Jul-2002 robert

- Remove unnecessary break statement.
- Move a label to a syntactically correct place to keep
gcc from warning.


# 97893 05-Jun-2002 gibbs

Silence GCC warnings about multi-line strings.

Sync Perforce IDs.


# 95376 24-Apr-2002 gibbs

Add macro functionality.

Staticize and allow unique naming of data structures so that more
than on sequencer program can be statically compiled into the kernel
at a time.


# 79873 18-Jul-2001 gibbs

Add support for parsing version strings out of assembler source files
and outputing them in generated files.

Fixed a few other scanner bugs that for some reason didn't show up until
these modifications were made.

MFC after: 10 days


# 75201 04-Apr-2001 ken

Don't allow immediate values of 0 for operations that can take either an
immediate value or the accumulator. 0 is the chip's internal
representation for the accumulator, and so 0 is an invalid immediate value
when the accumulator can also be specified as an argument.

Submitted by: gibbs


# 68578 10-Nov-2000 gibbs

Sync perforce IDs.


# 68088 31-Oct-2000 gibbs

Generate bmov instructions for all move requests. The driver
converts these to an equivalent 'and' operation on chips that
don't support this opcode.


# 66270 22-Sep-2000 gibbs

Add Perforce RCSIDs for easy revision correlation to my local tree.

Add support for constructing a table of critical section regions in
the firmware image. The kernel driver will soon have support for
single stepping the sequencer outside of a critical region prior
to starting exception handling.


# 65943 16-Sep-2000 gibbs

Move aicasm to its own subdirectory.


# 63457 18-Jul-2000 gibbs

o Convert to <inttypes.h> style fixed sized types to facilitate porting to
other systems.

o Normalize copyright text.

o Clean up probe code function interfaces by passing around a single
structure of common arguments instead of passing "too many" args
in each function call.

o Add support for the AAA-131 as a SCSI adapter.

o Add support for the AHA-4944 courtesy of "Matthew N. Dodd" <winter@jurai.net

o Correct manual termination support for PCI cards. The bit definitions
for manual termination control in the SEEPROM were incorrect.

o Add support for extracting NVRAM information from SCB 2 for BIOSen
that use this mechanism to pass this data to OS drivers.

o Properly set the STPWLEVEL bit in PCI config space based on the
setting in an SEEPROM.

o Go back to useing 32byte SCBs for all controllers. The current
firmware allows us to embed 12byte cdbs on all controllers in
a 32byte SCB, and larger cdbs are rarely used, so it is a
better use of this space to offer more SCBs (32).

o Add support for U160 transfers.

o Add an idle loop executed during data transfers that prefetches
S/G segments on controllers that have a secondary DMA engine
(aic789X).

o Improve the performance of reselections by avoiding an extra
one byte DMA in the case of an SCB lookup miss for the reselecting
target. We now keep a 16byte "untagged target" array on the card
for dealing with untagged reselections. If the controller has
external SCB ram and can support 64byte SCBs, then we use an
"untagged target/lun" array to maximize concurrency. Without
external SCB ram, the controller is limited to one untagged
transaction per target, auto-request sense operations excluded.

o Correct the setup of the STPWEN bit in SXFRCTL1. This control
line is tri-stated until set to one, so set it to one and then
set it to the desired value.

o Add tagged queuing support to our target role implementation.

o Handle the common cases of the ignore wide residue message
in firmware.

o Add preliminary support for 39bit addressing.

o Add support for assembling on big-endian machines. Big-endian
support is not complete in the driver.

o Correctly remove SCBs in the waiting for selection queue when
freezing a device queue.

o Now that we understand more about the autoflush bug on the
aic7890, only use the workaround on devices that need it.

o Add a workaround for the "aic7890 hangs the system when you
attempt to pause it" problem. We can now pause the aic7890
safely regardless of what instruction it is executing.


# 54211 06-Dec-1999 gibbs

Simplify my copyright license terms.

aic7xxx.c:
Add a function for sucking firmware out of the controller
prior to reset.

Remove some inline bloat from functions that should not have
been inlined.

During initialization, wait 1ms after the chip reset before
touching any registers. You can get machine checks on certain
architectures (Atari I think?) without the delay.

Return CAM_REQ_CMP for external BDR requests instead
of CAM_BDR_SENT.

Bump some messages to bootverbose levels above 1.

Don't clear any negotiated sync rate if the target rejects
a WDTR message. The sync rate is only cleared if the target
accepts a WDTR message.

Fix a small bug in the mesgin handling code that could cause
us to believe that we had recieved a message that was actually
received by another target. This could only confuse us in
some very rare transmission negotiation scenarios.

Remove some unecessary cleanup of residual information after
a residual is reported. The sequencer does this when the
command is queued now.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 41646 10-Dec-1998 gibbs

Revamp the way that exceptional message handling is performed so that it
is more robust and common code can be used for both the target and iniator
roles. The mechanism for tracking negotiation state has also been simplified.

Add support for sync/wide negotiation in target mode and fix many of
the target mode bugs running at higher speeds uncovered. Make a first
stab at getting all of the bus skew delays correct. Sync+Wide dataout
transfers still cause problems, but this may be an initiator problem.

Ensure that we exit BITBUCKET mode if the controller is restarted.

Add support for target mode only firmware downloads. This has been
tested on the aic7880, but should mean that we can perform target mode
on any aic7xxx controller. Mixed mode (initiator and target roles in
the same firmware load) is currently only supported on the aic7890, but
with optimization, may fit on chips with less instruction space.


# 39220 15-Sep-1998 gibbs

Massive overhaul of the aic7xxx driver:
- Convert to CAM
- Use a new DMA based queuing and paging scheme
- Add preliminary target mode support
- Add support for the aic789X chips
- Take advantage of external SRAM on more controllers.
- Numerous bug fixes and performance improvements.


# 29897 27-Sep-1997 gibbs

Add support to aicasm for "downloaded constants". These are immediate
operands that are set during seqeuncer program download instead of at
assembly time.

Convert the sequencer code to use" downloaded constants" for four run time
constants that vary depending on the board type. This frees up 4 bytes
of sequencer scratch ram space where these constants used to be stored and
also removes the additional instructions required to load their values
into the accumulator prior to using them.

Remove the REJBYTE sram variable. The host driver can just as easly
read the accumulator to get this value.

The scratch ram savings is important as the old code used to clober the
SCSICONF register on 274X cards which sits near the top of scratch ram
space. The SCSICONF register controls bus termination, and clobbering
it is not a good thing. Now we have 4 bytes to spare.

This should fix the reported problems with cards that don't have devices
attached to them failing with a stream of "Somone reset bus X" messages.

Doug Ledford determined the cause of the problem, fixes by me.


# 29050 03-Sep-1997 gibbs

Make the aic7xxx sequencer assembler compile in the kernel's object
directory. Rename (via repository copy) some files so that the potential
for future conflicts is minimized.

PR: conf/4363


# 26997 27-Jun-1997 gibbs

Modify my copyright notice to allow the sequencer to be used with GPLed
software (aka Linux).

Fix a few bugs in the sequencer assembler.

Make it easy to compiler the assembler with debugging turned on.


# 23925 16-Mar-1997 gibbs

Makefile gram.y scan.l sequencer.h symbol.c symbol.h aic7xxx_asm.c:
New sequencer assembler for the aic7xxx adapters. This assembler
performs some amount of register type checking, allows bit
manipulation of symbolic constants, and generates "patch tables"
for conditionalized downloading of portions of the program.
This makes it easier to take full advantage of the different
features of the aic7xxx cards without imposing run time penalies
or being bound to the small memory footprints of the low end
cards for features like target mode.

aic7xxx.reg:
New, assembler parsed, register definitions fo the aic7xxx cards.
This was done primarily in anticipation of 7810 support which
will have a different register layout, but should be able to use
the same assembler. The kernel aic7xxx driver consumes a generated
file in the compile directory to get the definitions of the register
locations.

aic7xxx.seq:
Convert to the slighly different syntax of the new assembler.

Conditionalize SCB_PAGING, ultra, and twin features which shaves
quite a bit of space once the program is downloaded.

Add code to leave the selection hardware enabled during reconnects
that win bus arbitration. This ensures that we will rearbitrate
as soon as the bus goes free instead of delaying for a bit.

When we expect the bus to go free, perform all of the cleanup
associated with that event "up front" and enter a loop awaiting
bus free. If we see a REQ first, complain, but attempt to
continue. This will hopefully address, or at least help diagnose,
the "target didn't send identify" messages that have been reported.

Spelling corrections obtained from NetBSD.