Find a file
Joerg Pulz 10ed63fc06 isp(4): Rework firmware handling/loading
Correctly identify the active firmware in flash on adapters with
primary and secondary firmware region in flash.
Correctly identify the active NVRAM on adapters with primary
and secondary NVRAM region in flash.

Loading ispfw(4) moved from isp_pci_attach() to isp_reset().
Drop the reference to ispfw(4) after using it so one can kldunload(8) it.
New isp_load_ram() function to load either ispfw(4) or flash firmware
into RISC's RAM.
New functions to read data from flash. The old ones will be removed later.
A bunch of new helper functions to identify and validate active flash
regions for firmware, auxiliary and NVRAM.
Overhaul ISP_FW_* macros and make use of it when comparing firmware
versions. We can handle firmware versions up to 255.255.255.

Firmware load priority slightly changed:
For 27xx and newer adapters:
- load ispfw(4) firmware
- request (active) flash firmware information
- compare version numbers of ispfw(4) and flash firmware
- load firmware with highest version into RISC's RAM
- if loading ispfw(4) is disabled or failed - load firmware from flash
- if everything else fails use MBOX_LOAD_FLASH_FIRMWARE as fallback

For 26xx and older adapters nothing changed:
- load ispfw(4) firmware and load it into RISC's RAM
- if loading ispfw(4) is disabled or failed use MBOX_EXEC_FIRMWARE
- for 26xx a preceding MBOX_LOAD_FLASH_FIRMWARE is used

New read only sysctl(8)'s:
 dev.isp.N.fw_version_run: the firmware version actually running
 dev.isp.N.fw_version_ispfw: the firmware version provided by ispfw(4)
 dev.isp.N.fw_version_flash: the (active) firmware version in flash

While here:
  - firmware attribute handling/parsing reworked
    + renamed defines from ISP2400_FW_ATTR_* to ISP_FW_ATTR_*
    + changed values to match new handling/parsing
    + added some more attributes
  - enable FLT support on 26xx based adapters
  - log level adjustments
  - new function return status codes (some for now, some for later use)
  - some minor style changes

Tested and approved to work on real hardware with:
  - Qlogic ISP 2532 (QLogic QLE2560 8Gb FC Adapter)
  - Qlogic ISP 2031 (QLogic QLE2662 16Gbit 2Port FC Adapter)
  - Qlogic ISP 2722 (QLogic QLE2690 16Gb FC Adapter)
  - Qlogic ISP 2812 (QLogic QLE2772 32Gbit 2Port FC Adapter)

PR:		273263
Reviewed by:	mav
Pull Request:	https://github.com/freebsd/freebsd-src/pull/877
MFC after:	1 month
Sponsored by:	Technical University of Munich
2023-12-28 13:33:07 -05:00
.cirrus-ci
.github MAINTAINERS: Add myself to stand 2023-05-07 22:30:10 -06:00
bin cat: Use present tense 2023-12-26 16:53:40 -07:00
cddl libicp(_rescue)?: use asm versions for all 32-bit arm flavors 2023-12-13 20:00:35 +01:00
contrib atf-sh: fix comment typo 2023-12-26 16:24:42 -07:00
crypto Implement "strict key exchange" in ssh and sshd. 2023-12-18 08:22:22 -08:00
etc mtree: Add missing directories to BSD.tests.dist 2023-12-27 22:26:31 -07:00
gnu misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
include libc: expose execvpe for Linux compat 2023-12-11 19:24:53 +00:00
kerberos5 sccs: Manual changes 2023-11-26 22:23:58 -07:00
lib Reorganize libclang_rt Makefile and make more lib/arch combos available 2023-12-28 13:57:41 +01:00
libexec libexec/rc/rc.initdiskless: make tar's path flexible 2023-12-15 03:46:44 -05:00
release release/Makefile.vm: Add cloudware overrides 2023-12-15 10:08:50 -08:00
rescue misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
sbin tree: Use 1 semicolon at the end of a statement 2023-12-27 21:05:47 -07:00
secure ossl: Move arm_arch.h to a common subdirectory 2023-12-04 12:29:11 -05:00
share isp(4): Rework firmware handling/loading 2023-12-28 13:33:07 -05:00
stand stand: Fix typo (triple S) 2023-12-27 20:24:31 -07:00
sys isp(4): Rework firmware handling/loading 2023-12-28 13:33:07 -05:00
targets Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 2023-12-08 18:34:50 +01:00
tests Block cloning tests. 2023-12-26 12:01:53 -08:00
tools gpioevents: Fix a typo in a diagnostic output message 2023-12-27 09:41:48 +01:00
usr.bin use long manpage URL (broken in last commit) 2023-12-28 15:58:56 +00:00
usr.sbin tree: Use 1 semicolon at the end of a statement 2023-12-27 21:05:56 -07:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint
.cirrus.yml Cirrus-CI: stop forcibly installing pkg 2023-12-12 19:50:19 -05:00
.clang-format Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
.git-blame-ignore-revs git-blame-ignore-revs: OptionalObsoleteFiles.inc sorting commits 2023-11-15 17:47:02 +00:00
.gitattributes Remove SVN related Git attributes 2023-12-26 10:28:28 -07:00
.gitignore .gitignore: Ignore LSP generated .cache 2023-03-07 10:04:18 -05:00
.mailmap Fix Sumit's email address 2023-10-19 15:49:05 -06:00
CONTRIBUTING.md CONTRIBUTING.md: fix typo from commmit to commit 2023-12-28 10:01:03 -05:00
COPYRIGHT misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
LOCKS Update LOCKS for Git 2023-12-26 10:28:25 -07:00
MAINTAINERS Update MAINTAINERS for Git 2023-12-26 10:28:25 -07:00
Makefile pkgbase: create source package 2023-12-04 09:05:03 +01:00
Makefile.inc1 Make kldxref a bootstrap tool and use unconditionally 2023-12-13 21:43:10 +00:00
Makefile.libcompat build{libcompat}: Pass UNIVERSE_TOOLCHAIN_PATH to the _lc_build-tools submake 2023-08-21 21:00:45 -07:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc ObsoleteFiles.inc: remove old libufs.so.7 after bump 2023-12-08 22:23:00 +01:00
README.md README.md: link to the list of supported platforms 2022-11-01 12:20:55 -03:00
RELNOTES RELNOTES: Add an entry for commit 1a87880700 2023-12-26 15:01:42 -08:00
UPDATING UPDATING: Add unset hint.acpi.0.disabled as workaround for no ACPI 2023-11-22 21:12:28 -07:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.