Home | History | Annotate | only in /src/sys/arch/sandpoint/stand
History log of /src/sys/arch/sandpoint/stand
RevisionDateAuthorComments
 1.2 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.1 20-Jul-2009  nisimura branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
- fix rge.c breakage.
- stand/netboot is reported working for KuroBox and TeraStatation.
Some more fixes will follow.
- withdraw files which remain work-in-progress for now.
 1.1.10.1 08-Feb-2011  bouyer Sync with HEAD
 1.1.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 05-Mar-2011  rmind sync with head
 1.1.2.2 19-Aug-2009  yamt sync with head.
 1.1.2.1 20-Jul-2009  yamt file Makefile was added on branch yamt-nfs-mp on 2009-08-19 18:46:43 +0000
 1.2 28-Aug-2016  christos NOPIE here too
 1.1 28-Jan-2011  phx branches: 1.1.2; 1.1.4; 1.1.8; 1.1.20; 1.1.38;
Included sys/arc/sandpoint/stand/altboot in the build process.
Install altboot and altboot.bin in /usr/mdec and copy them also into the
installation directory of the sandpoint release.
 1.1.38.1 05-Oct-2016  skrll Sync with HEAD
 1.1.20.1 03-Dec-2017  jdolecek update from HEAD
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 28-Jan-2011  jruoho file Makefile.inc was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 05-Mar-2011  rmind sync with head
 1.1.4.1 28-Jan-2011  rmind file Makefile.inc was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.1.2.2 08-Feb-2011  bouyer Sync with HEAD
 1.1.2.1 28-Jan-2011  bouyer file Makefile.inc was added on branch bouyer-quota2 on 2011-02-08 16:19:37 +0000
 1.19 09-Feb-2024  christos PR/57915: Jan-Benedict Glaw: Use $MKREPRO_TIMESTAMP for repro builds in uBoot
images
 1.18 24-Mar-2021  rin Remove "lib" directory for cleandir.
 1.17 08-Apr-2017  christos branches: 1.17.26; 1.17.28;
centralize vers.c building for standalone programs.
 1.16 10-Aug-2014  joerg branches: 1.16.4; 1.16.8; 1.16.12;
Put GCC/GAS options under ACTIVE_CC == "gcc".
 1.15 08-Aug-2014  joerg Don't set -mmultiple or -mno-string for PowerPC, the difference is too
small to really matter and it sometimes even increases the size.
 1.14 12-Jan-2014  tsutsui branches: 1.14.2;
Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.13 21-Aug-2013  matt Use <bsd.klinks.mk>
 1.12 30-Oct-2011  phx branches: 1.12.2; 1.12.12; 1.12.16;
Make sure to disable interrupts, as U-Boot may call us with interrupts
enabled, causing quite unpleasant effects (e.g. by decrementer interrupts).

When DEBUG is defined, an exception handler will be installed, which reports
about all exceptions while altboot is running, including register dump and
stack frame backtrace.
 1.11 25-May-2011  phx branches: 1.11.4;
Use printf() from libsa.
Ok by nisimura@.
 1.10 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.9 06-Mar-2011  phx branches: 1.9.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.8 26-Feb-2011  phx branches: 1.8.2;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.7 28-Jan-2011  phx Included sys/arc/sandpoint/stand/altboot in the build process.
Install altboot and altboot.bin in /usr/mdec and copy them also into the
installation directory of the sandpoint release.
 1.6 27-Jan-2011  phx Some cleanup. No functional change.
 1.5 27-Jan-2011  nisimura remove an excess echo line accidentally creeped in.
 1.4 27-Jan-2011  nisimura arrange vers.c generation to honour MKREPRO for global build control.
 1.3 26-Jan-2011  nisimura one more twist to complete newvers_stand.sh transition. Include timestamp
in banner.
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.8.2.4 31-May-2011  rmind sync with head
 1.8.2.3 21-Apr-2011  rmind sync with head
 1.8.2.2 05-Mar-2011  rmind sync with head
 1.8.2.1 26-Feb-2011  rmind file Makefile was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.9.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.9.2.1 06-Mar-2011  bouyer file Makefile was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.11.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.11.4.1 25-May-2011  jruoho file Makefile was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.12.16.2 18-May-2014  rmind sync with head
 1.12.16.1 28-Aug-2013  rmind sync with head
 1.12.12.2 03-Dec-2017  jdolecek update from HEAD
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.16.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.16.8.1 26-Apr-2017  pgoyette Sync with HEAD
 1.16.4.1 28-Aug-2017  skrll Sync with HEAD
 1.17.28.1 03-Apr-2021  thorpej Sync with HEAD.
 1.17.26.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 26-Apr-2012  phx Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.10 24-Apr-2012  nisimura Add KURO-BOX/T4 vendor custom U-Boot version message.
 1.9 14-Jan-2012  phx Netronics is spelled Netronix.
 1.8 14-Jan-2012  phx Add NH230 PPCboot version.
 1.7 01-Jan-2012  phx Add Iomega StorCenter.
 1.6 13-Nov-2011  phx branches: 1.6.4;
Add DS-106j.
 1.5 02-Jun-2011  phx branches: 1.5.2; 1.5.4;
Add PPCBoot version from DS-207 and CS-407e.
 1.4 19-Apr-2011  phx branches: 1.4.2;
Added a detailed description of altboot command line and boot arguments.
 1.3 08-Apr-2011  phx QNAP support.
Note about the D-Link firmware.
 1.2 13-Mar-2011  phx With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4;
change bootloader name to "altboot". bump version and add README.
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file README.altboot was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.4 12-Jun-2011  rmind sync with head
 1.1.2.3 21-Apr-2011  rmind sync with head
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file README.altboot was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.4.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.4.2 23-May-2012  yamt sync with head.
 1.5.4.1 17-Apr-2012  yamt sync with head
 1.5.2.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.2.1 02-Jun-2011  jruoho file README.altboot was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.6.4.2 29-Apr-2012  mrg sync to latest -current.
 1.6.4.1 18-Feb-2012  mrg merge to -current.
 1.42 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.41 16-Feb-2022  riastradh powerpc: Sprinkle "memory" clobbers on eieio and nearby asm blocks.

Otherwise the compiler may reorder these around loads and stores,
which mostly defeats the purpose. `asm volatile' just ensures the
instruction isn't _deleted_; it may still move around.
 1.40 09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.39 03-Aug-2017  phx Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).
 1.38 03-Aug-2017  phx Fixed overflow in delay() for delays greater than 2 seconds.
Replaced u_long by uint32_t and u_quad by uint64_t whenever the exact
32- or 64-bit word is needed.
 1.37 15-Oct-2015  nisimura fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.36 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.35 08-Aug-2014  joerg branches: 1.35.2; 1.35.4;
Use __unreachable().
 1.34 05-Aug-2014  joerg Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.33 07-Nov-2013  nisimura branches: 1.33.2;

shut off gcc 4.8 unused variable warnings.
 1.32 25-Dec-2012  phx branches: 1.32.2;
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
 1.31 16-Apr-2012  phx branches: 1.31.2;
Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.30 09-Apr-2012  nisimura The processor ExtClk value of Kurobox/T4 is comfirmed as 32768000.
 1.29 09-Apr-2012  nisimura Change to use "kurot4" product name for Terastation TGL and
KuroBox/T4.
 1.28 08-Apr-2012  nisimura Add an entry for Terastation TGL miconv2 satellite processor which
features a more complex protocol than Linkstation/Kurobox.
 1.27 14-Jan-2012  phx branches: 1.27.2;
Netronics is spelled Netronix.
 1.26 14-Jan-2012  phx Add 0x70000000 BAT-mapping for NH230/231.
NH23x: Initialize LEDs on startup (status off, to indicate the bootloader
is running). Hardware reset routine.
 1.25 08-Jan-2012  phx Set the extclk for NH230 to 33000000Hz.
Prepare a synosetup() function which should set a different extclk for
the 400MHz models, as soon as we find a method to check for them.
 1.24 07-Jan-2012  phx NH230 PPCBoot configures the memory boundary registers for 128MB, although
the board has only 64MB. Fix that.
 1.23 12-Nov-2011  phx branches: 1.23.4;
Improved Iomega microcontroller support. Bumped version to 1.8.
 1.22 07-Nov-2011  phx Fixed Iomega microcontroller support. Implemented Iomega reboot function.
 1.21 06-Nov-2011  phx Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.20 01-Nov-2011  phx branches: 1.20.2;
The Apollo family of IDE interface chips has both channels disabled by
default, so we have to enable them in a new chipfix function. Also move
the channel enable code for the 82C686B from encpcifix() to pciide.c.
 1.19 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.18 29-May-2011  phx branches: 1.18.4;
When PPCBoot supports the SKnet interface it will configure it to automatically
byte-reverse all descriptors by setting a vendor-specific bit in PCI config
space. We have to clear that bit to make sure our driver can send and
receive.
 1.17 26-Apr-2011  phx Priority of QNAP board detection was still too high. It should be lowest,
because a Realtek chip at pci device 15 is used on several boards. Now
NH230/All6250 detection should work again.
 1.16 25-Apr-2011  phx Detect StorCenter before QNAP, otherwise the Realtek NIC will mis-detect as
StorCenter boards as QNAP.
 1.15 17-Apr-2011  phx DSM-G600 has a 33.000 MHz oscillator on board.
 1.14 13-Apr-2011  phx ExtClk for QNAP should be the same as for Synology's 266MHz systems.
This seems logical, as both boards are very similar, and the clock precision
is ok now.
 1.13 09-Apr-2011  phx Set D-Link DSM-G600 power LED to solid green on start.
 1.12 26-Mar-2011  phx QNAP support. Detect wm(4) based V1.02 and re(4) based V200 boards.
That should include all TS-101 and TS-201 models.
Add reset-code and LED-illumination code for the QNAP PIC, which listens
on the second UART with 19200 bps.
 1.11 13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10 12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9 11-Mar-2011  phx Some code cleanup, suggested by nisimura@.
 1.8 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.7 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.6 06-Mar-2011  phx branches: 1.6.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.5 14-Feb-2011  nisimura branches: 1.5.2;
- add preliminary Netronics NH230 and NH231 supports.
- assign PCI configuration register 0x3c with IDSEL value by PCI framework,
eliminating most of pcifixup() logic in simple NASes.
 1.4 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.3 08-Feb-2011  nisimura - add preliminary code to support D-Link DSM-G600 rev.B NAS.
- it features 9600bps console, Moto MCU on the 2nd DUART channel,
ACARD ATP865 PCIIDE and IP Plus IP1000A GbE. It has MiniPCI
slot.
 1.2 07-Feb-2011  nisimura add IOMEGA StorCenter fixup codes. Need more change as the satellite
microcontroller protocol is defined in 8-byte fixed length sequence.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.5.2.4 31-May-2011  rmind sync with head
 1.5.2.3 21-Apr-2011  rmind sync with head
 1.5.2.2 05-Mar-2011  rmind sync with head
 1.5.2.1 14-Feb-2011  rmind file brdsetup.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.6.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.6.2.1 06-Mar-2011  bouyer file brdsetup.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.18.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 29-May-2011  jruoho file brdsetup.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.20.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20.2.4 23-Jan-2013  yamt sync with head
 1.20.2.3 23-May-2012  yamt sync with head.
 1.20.2.2 17-Apr-2012  yamt sync with head
 1.20.2.1 10-Nov-2011  yamt sync with head
 1.23.4.2 29-Apr-2012  mrg sync to latest -current.
 1.23.4.1 18-Feb-2012  mrg merge to -current.
 1.27.2.1 18-Sep-2013  bouyer Pull up following revision(s) (requested by phx in ticket #946):
sys/arch/sandpoint/stand/altboot/rge.c: revision 1.7
sys/arch/sandpoint/stand/altboot/brdsetup.c: revision 1.32
sys/dev/ic/rtl8169.c: revision 1.138
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
Make re(4) driver always use IDR register values for its MAC address.
Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.
Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).
 1.31.2.3 03-Dec-2017  jdolecek update from HEAD
 1.31.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.2.1 25-Feb-2013  tls resync with head
 1.32.2.1 18-May-2014  rmind sync with head
 1.33.2.1 10-Aug-2014  tls Rebase.
 1.35.4.2 28-Aug-2017  skrll Sync with HEAD
 1.35.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.35.2.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.3 05-Aug-2014  joerg Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.2 17-Jul-2011  joerg branches: 1.2.12; 1.2.26;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8;
change bootloader name to "altboot". bump version and add README.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file dev_net.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file dev_net.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file dev_net.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.2.26.1 10-Aug-2014  tls Rebase.
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 05-Jan-2014  jakllsch Drop duplicate and unused extern global variable.
 1.2 06-Mar-2011  phx branches: 1.2.4; 1.2.6; 1.2.16; 1.2.20;
Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4;
change bootloader name to "altboot". bump version and add README.
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file devopen.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.3 21-Apr-2011  rmind sync with head
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file devopen.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.2.20.1 18-May-2014  rmind sync with head
 1.2.16.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.1 06-Mar-2011  jruoho file devopen.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.19 30-Apr-2022  rin Fix fallout from libsa change; stand.h includes <sys/param.h> now.

Do not use NULL for integer 0.
 1.18 29-Sep-2015  phx The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
 1.17 05-Aug-2014  joerg branches: 1.17.2; 1.17.4;
Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.16 26-Apr-2012  phx branches: 1.16.2; 1.16.12;
Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.15 09-Apr-2012  nisimura Refactor disklabel decode logic. RAIDFRAME case needs more attention
as it's not certain whether a general solution.
 1.14 22-Jan-2012  phx Cleanup in perform_atareset().
 1.13 22-Jan-2012  phx Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.12 19-Jan-2012  nisimura Change BTINFO_ROOTDEV to include boot device partition number in
its cookie field to allow a kernel to determine rootdev correctly
when kernel image is loaded from other than 'a' partition.
 1.11 12-Nov-2011  phx branches: 1.11.4;
Add support for IT821x IDE.
 1.10 01-Nov-2011  phx branches: 1.10.2;
The Apollo family of IDE interface chips has both channels disabled by
default, so we have to enable them in a new chipfix function. Also move
the channel enable code for the 82C686B from encpcifix() to pciide.c.
 1.9 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.8 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.7 20-Jun-2011  jdc Add support for booting from RAID 1.
Note, that the RAID partition must be the first partition of the disk.
Reviewed by phx@.
 1.6 08-Jun-2011  phx Support disk units from multiple IDE/SATA PCI controllers.
 1.5 06-Mar-2011  phx branches: 1.5.2; 1.5.4; 1.5.6;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.4 10-Feb-2011  nisimura branches: 1.4.2;
- some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.3 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.2 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.4.2.4 12-Jun-2011  rmind sync with head
 1.4.2.3 21-Apr-2011  rmind sync with head
 1.4.2.2 05-Mar-2011  rmind sync with head
 1.4.2.1 10-Feb-2011  rmind file dsk.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.6.1 06-Mar-2011  jruoho file dsk.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.5.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.5.2.1 06-Mar-2011  bouyer file dsk.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.10.2.2 23-May-2012  yamt sync with head.
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.11.4.2 29-Apr-2012  mrg sync to latest -current.
 1.11.4.1 18-Feb-2012  mrg merge to -current.
 1.16.12.1 10-Aug-2014  tls Rebase.
 1.16.2.2 03-Dec-2017  jdolecek update from HEAD
 1.16.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.17.2.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.6 14-Jan-2012  phx Add 0x70000000 BAT-mapping for NH230/231.
NH23x: Initialize LEDs on startup (status off, to indicate the bootloader
is running). Hardware reset routine.
 1.5 30-Oct-2011  phx branches: 1.5.2; 1.5.6;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.4 30-Oct-2011  phx Make sure to disable interrupts, as U-Boot may call us with interrupts
enabled, causing quite unpleasant effects (e.g. by decrementer interrupts).

When DEBUG is defined, an exception handler will be installed, which reports
about all exceptions while altboot is running, including register dump and
stack frame backtrace.
 1.3 13-Mar-2011  phx branches: 1.3.4;
With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.2 26-Feb-2011  phx branches: 1.2.2; 1.2.4;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 26-Feb-2011  bouyer file entry.S was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 26-Feb-2011  rmind file entry.S was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 13-Mar-2011  jruoho file entry.S was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.5.6.1 18-Feb-2012  mrg merge to -current.
 1.5.2.1 17-Apr-2012  yamt sync with head
 1.1 30-Oct-2011  phx Make sure to disable interrupts, as U-Boot may call us with interrupts
enabled, causing quite unpleasant effects (e.g. by decrementer interrupts).

When DEBUG is defined, an exception handler will be installed, which reports
about all exceptions while altboot is running, including register dump and
stack frame backtrace.
 1.3 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file fxp.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file fxp.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file fxp.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.21 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.20 29-Sep-2015  phx The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
 1.19 26-Apr-2012  phx branches: 1.19.2; 1.19.14; 1.19.16;
Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.18 16-Apr-2012  phx Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.17 08-Apr-2012  nisimura Add an entry for Terastation TGL miconv2 satellite processor which
features a more complex protocol than Linkstation/Kurobox.
 1.16 22-Jan-2012  phx Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.15 07-Jan-2012  phx NH230 PPCBoot configures the memory boundary registers for 128MB, although
the board has only 64MB. Fix that.
 1.14 06-Nov-2011  phx branches: 1.14.4;
Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.13 30-Oct-2011  phx branches: 1.13.2;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.12 26-Mar-2011  phx branches: 1.12.4;
QNAP support. Detect wm(4) based V1.02 and re(4) based V200 boards.
That should include all TS-101 and TS-201 models.
Add reset-code and LED-illumination code for the QNAP PIC, which listens
on the second UART with 19200 bps.
 1.11 13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10 12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.8 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.7 06-Mar-2011  phx branches: 1.7.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.6 14-Feb-2011  nisimura branches: 1.6.2;
- add preliminary Netronics NH230 and NH231 supports.
- assign PCI configuration register 0x3c with IDSEL value by PCI framework,
eliminating most of pcifixup() logic in simple NASes.
 1.5 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.4 08-Feb-2011  nisimura - add preliminary code to support D-Link DSM-G600 rev.B NAS.
- it features 9600bps console, Moto MCU on the 2nd DUART channel,
ACARD ATP865 PCIIDE and IP Plus IP1000A GbE. It has MiniPCI
slot.
 1.3 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.2 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.6.2.3 21-Apr-2011  rmind sync with head
 1.6.2.2 05-Mar-2011  rmind sync with head
 1.6.2.1 14-Feb-2011  rmind file globals.h was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.7.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.7.2.1 06-Mar-2011  bouyer file globals.h was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.12.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.12.4.1 26-Mar-2011  jruoho file globals.h was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.13.2.3 23-May-2012  yamt sync with head.
 1.13.2.2 17-Apr-2012  yamt sync with head
 1.13.2.1 10-Nov-2011  yamt sync with head
 1.14.4.2 29-Apr-2012  mrg sync to latest -current.
 1.14.4.1 18-Feb-2012  mrg merge to -current.
 1.19.16.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.19.14.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.19.2.1 03-Dec-2017  jdolecek update from HEAD
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8;
change bootloader name to "altboot". bump version and add README.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file kse.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file kse.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file kse.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.34 22-Sep-2022  riastradh sandpoint: Teach altboot to handle 9.99.100 modules.

Not tested, but something here will be necessary to make it work, and
the same change does work in x86 efiboot.
 1.33 23-Mar-2021  rin Make this compile with -DDEBUG.
 1.32 23-Mar-2021  rin Make sure not to run kernel if fdloadfile() fails;
it returns *non-zero* value on error.
 1.31 26-Jun-2019  christos branches: 1.31.10; 1.31.12;
make this compile again
 1.30 26-Jun-2019  pgoyette Similar to changes made for x86, allow for the boot-loader to auto-push
a list of modules for file-system support. This allows, for example,
booting from an ext2fs file-system when the kernel has no built-in ufs
or ext2fs modules.

XXX Untested, as I have no sandpoint hardware. I'd appreciate it if
XXX someone with hardware can build and test.
 1.29 08-Feb-2018  dholland branches: 1.29.4;
Typos.
 1.28 11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.27 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.26 05-Aug-2014  joerg branches: 1.26.2; 1.26.4;
Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.25 26-Mar-2014  christos branches: 1.25.2;
fix sprintf.
 1.24 22-Mar-2014  jakllsch drop trailing whitespace
 1.23 05-Jan-2014  jakllsch sprinkle const
 1.22 25-Dec-2012  phx branches: 1.22.2;
Add a DEBUG function to search the Flash for byte-streams, as U-Boot usually
doesn't offer a search function.
 1.21 21-May-2012  dsl branches: 1.21.2;
Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).
 1.20 27-Apr-2012  nisimura Comment improvement. altboot(8) is now aware of the disk removal
for mirrored drive configuration.
 1.19 26-Apr-2012  phx Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.18 16-Apr-2012  phx Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.17 22-Jan-2012  phx branches: 1.17.2;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.16 01-Jan-2012  phx Handle devices with two network interfaces (e.g. a DSM-G600 with stge(4)
and ath(4)).
 1.15 06-Nov-2011  phx branches: 1.15.4;
Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.14 25-Apr-2011  phx branches: 1.14.4; 1.14.6;
Also scan for PCI_CLASS_RAID, when looking for disk devices.
 1.13 20-Mar-2011  phx The DSM-G600 U-Boot is so restricted that there is no possibility to pass
any bootargs. So we will just do the default multiuser boot from wd0: when
altboot was started together with a Linux initrd image.
 1.12 13-Mar-2011  phx With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.11 13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10 12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9 06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.8 06-Mar-2011  phx branches: 1.8.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.7 26-Feb-2011  phx branches: 1.7.2;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.6 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.5 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.4 26-Jan-2011  nisimura one more twist to complete newvers_stand.sh transition. Include timestamp
in banner.
 1.3 26-Jan-2011  phx bootprog_maker and bootprog_date are missing since we switched to the
MI newvers_stand.sh script. Remove the refering information line.
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.7.2.4 31-May-2011  rmind sync with head
 1.7.2.3 21-Apr-2011  rmind sync with head
 1.7.2.2 05-Mar-2011  rmind sync with head
 1.7.2.1 26-Feb-2011  rmind file main.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.8.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.8.2.1 06-Mar-2011  bouyer file main.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.14.6.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.6.4 23-Jan-2013  yamt sync with head
 1.14.6.3 23-May-2012  yamt sync with head.
 1.14.6.2 17-Apr-2012  yamt sync with head
 1.14.6.1 10-Nov-2011  yamt sync with head
 1.14.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.14.4.1 25-Apr-2011  jruoho file main.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.15.4.3 02-Jun-2012  mrg sync to latest -current.
 1.15.4.2 29-Apr-2012  mrg sync to latest -current.
 1.15.4.1 18-Feb-2012  mrg merge to -current.
 1.17.2.1 03-Jun-2012  jdc Pull up revisions:
src/sys/arch/i386/stand/lib/exec.c revision 1.50
src/sys/arch/sandpoint/stand/altboot/main.c revision 1.21 via patch
src/sys/lib/libsa/ext2fs.c revision 1.13
src/sys/lib/libsa/ffsv1.c revision 1.6
src/sys/lib/libsa/ffsv2.c revision 1.6
src/sys/lib/libsa/globals.c revision 1.9
src/sys/lib/libsa/lfsv1.c revision 1.5
src/sys/lib/libsa/lfsv2.c revision 1.5
src/sys/lib/libsa/stand.h revision 1.76
src/sys/lib/libsa/ufs.c revision 1.58
(requested by dsl in ticket #279).

Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).
 1.21.2.3 03-Dec-2017  jdolecek update from HEAD
 1.21.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1 25-Feb-2013  tls resync with head
 1.22.2.1 18-May-2014  rmind sync with head
 1.25.2.1 10-Aug-2014  tls Rebase.
 1.26.4.2 09-Jul-2016  skrll Sync with HEAD
 1.26.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.26.2.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.29.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.31.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 06-Mar-2011  phx branches: 1.1.2; 1.1.6;
Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 06-Mar-2011  jruoho file memfs.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 06-Mar-2011  rmind file memfs.c was added on branch rmind-uvmplock on 2011-04-21 01:41:22 +0000
 1.1 06-Mar-2011  phx branches: 1.1.2; 1.1.6;
Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 06-Mar-2011  jruoho file memfs.h was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 06-Mar-2011  rmind file memfs.h was added on branch rmind-uvmplock on 2011-04-21 01:41:22 +0000
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.6 05-Aug-2014  joerg Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.5 12-Mar-2011  phx branches: 1.5.4; 1.5.16; 1.5.30;
Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.4 06-Mar-2011  phx Renamed "stg" to "stge" as in the kernel.
 1.3 06-Mar-2011  phx branches: 1.3.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.2 10-Feb-2011  nisimura branches: 1.2.2;
- some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 10-Feb-2011  rmind file nif.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Mar-2011  bouyer file nif.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.5.30.1 10-Aug-2014  tls Rebase.
 1.5.16.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 12-Mar-2011  jruoho file nif.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.3 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file nvt.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file nvt.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file nvt.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5 10-Mar-2011  phx branches: 1.5.4;
Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.4 14-Feb-2011  nisimura branches: 1.4.2; 1.4.4;
- add preliminary Netronics NH230 and NH231 supports.
- assign PCI configuration register 0x3c with IDSEL value by PCI framework,
eliminating most of pcifixup() logic in simple NASes.
 1.3 10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.2 27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.4.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.4.4.1 14-Feb-2011  bouyer file pci.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.4.2.3 21-Apr-2011  rmind sync with head
 1.4.2.2 05-Mar-2011  rmind sync with head
 1.4.2.1 14-Feb-2011  rmind file pci.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 10-Mar-2011  jruoho file pci.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.12 22-Jan-2012  phx Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.11 13-Nov-2011  phx branches: 1.11.4;
Make the chipfix() functions return void instead of int, as the return
value is useless. Suggested by nisimura.
 1.10 12-Nov-2011  phx Add support for IT821x IDE.
 1.9 02-Nov-2011  nisimura branches: 1.9.2;

VIA 82C586A/B 82C686A/B SouthBridges share PCI ID 0x1066-0571.
They are distinguishable by looking at PCI-ISA bridge PCI ID and
revision number.
 1.8 01-Nov-2011  phx The Apollo family of IDE interface chips has both channels disabled by
default, so we have to enable them in a new chipfix function. Also move
the channel enable code for the 82C686B from encpcifix() to pciide.c.
 1.7 25-Apr-2011  phx branches: 1.7.4;
Add VIA VT6410 vendor/product IDs (StorCenter).
 1.6 19-Apr-2011  phx Some DSM-G600 use a Acard ATP865A instead of ATP865. Added its product id.
 1.5 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.4 09-Mar-2011  phx Check the PCI-interface for legacy/native mode, not the PCI-revision.
 1.3 06-Mar-2011  phx branches: 1.3.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.2 08-Feb-2011  nisimura branches: 1.2.2;
- add preliminary code to support D-Link DSM-G600 rev.B NAS.
- it features 9600bps console, Moto MCU on the 2nd DUART channel,
ACARD ATP865 PCIIDE and IP Plus IP1000A GbE. It has MiniPCI
slot.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.2.4 31-May-2011  rmind sync with head
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 08-Feb-2011  rmind file pciide.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Mar-2011  bouyer file pciide.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.7.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.7.4.1 25-Apr-2011  jruoho file pciide.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.9.2.1 17-Apr-2012  yamt sync with head
 1.11.4.1 18-Feb-2012  mrg merge to -current.
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8;
change bootloader name to "altboot". bump version and add README.
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file pcn.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file pcn.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file pcn.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5 25-May-2011  phx Use printf() from libsa.
Ok by nisimura@.
 1.4 07-Mar-2011  phx mkdigit() didn't work with values which have bit 31 set (>=0x80000000).
Do not cast to (int).
 1.3 23-Jan-2011  nisimura branches: 1.3.2; 1.3.4;
fix a failure in the sign extension consideration.
 1.2 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.3.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.4.1 23-Jan-2011  bouyer file printf.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.3.2.4 31-May-2011  rmind sync with head
 1.3.2.3 21-Apr-2011  rmind sync with head
 1.3.2.2 05-Mar-2011  rmind sync with head
 1.3.2.1 23-Jan-2011  rmind file printf.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.8 25-Mar-2021  rin Fix tftp boot with RTL8169/8110.

When sending frame shorter than 60 octets, we add trailing \0's to
payload to construct 60-octet frame.

rge.c rev 1.4--1.7 did this tail-padding on buffer provided by caller,
which results in memory corruption if buffer is shorter than 60 bytes.

Instead, allocate temporary buffer on stack, and work on it.

This bug affects tftp_getnextblock() compiled by GCC8 and later, by
which stack layout has drastically changed. However, even with GCC7,
if tftp.c is compiled with -O0, the bug becomes tangible.
 1.7 25-Dec-2012  phx branches: 1.7.50; 1.7.52;
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
 1.6 30-Oct-2011  phx branches: 1.6.2; 1.6.8; 1.6.12;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.5 29-Apr-2011  phx branches: 1.5.4;
When we stretch a short frame to 60 bytes in rge_send() do not return 60,
but the original frame size.
 1.4 04-Apr-2011  phx Make sure a frame is at least 60 bytes, as Realtek does not automatically
expand small frames.
Patch suggested by nisimura@.
 1.3 27-Mar-2011  phx Fixed PHY access.
Support 8169SC/8110SC (as found on QNAP V200 boards).
Make frame receiving work (FRAMELEN <-> FRAMESIZE).
Driver works now, but not the first time after cold start.
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file rge.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.4 31-May-2011  rmind sync with head
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file rge.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.4.1 29-Apr-2011  jruoho file rge.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.6.12.1 25-Feb-2013  tls resync with head
 1.6.8.1 18-Sep-2013  bouyer Pull up following revision(s) (requested by phx in ticket #946):
sys/arch/sandpoint/stand/altboot/rge.c: revision 1.7
sys/arch/sandpoint/stand/altboot/brdsetup.c: revision 1.32
sys/dev/ic/rtl8169.c: revision 1.138
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
Make re(4) driver always use IDR register values for its MAC address.
Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.
Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).
 1.6.2.1 23-Jan-2013  yamt sync with head
 1.7.52.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7.50.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 03-Aug-2017  phx Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).
 1.6 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.5 22-Jan-2012  phx branches: 1.5.6; 1.5.22; 1.5.24;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.4 30-May-2011  phx branches: 1.4.4; 1.4.6; 1.4.10;
When a drive is present, retry ATA-reset for a maximum of 10 seconds, until
successful.
 1.3 06-Mar-2011  phx branches: 1.3.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.2 27-Jan-2011  phx branches: 1.2.2;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.2.4 31-May-2011  rmind sync with head
 1.2.2.3 21-Apr-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file siisata.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.3.2.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.2.1 06-Mar-2011  bouyer file siisata.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.4.10.1 18-Feb-2012  mrg merge to -current.
 1.4.6.1 17-Apr-2012  yamt sync with head
 1.4.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.4.4.1 30-May-2011  jruoho file siisata.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.5.24.2 28-Aug-2017  skrll Sync with HEAD
 1.5.24.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.22.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.5.6.1 03-Dec-2017  jdolecek update from HEAD
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file sip.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file sip.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file sip.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.5 03-Aug-2017  phx This driver should also support Schneider & Koch SK-9821 v2.0, besides
Marvell SKnet.
 1.4 30-Oct-2011  phx branches: 1.4.12; 1.4.30;
Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.3 29-May-2011  phx branches: 1.3.4;
When PPCBoot supports the SKnet interface it will configure it to automatically
byte-reverse all descriptors by setting a vendor-specific bit in PCI config
space. We have to clear that bit to make sure our driver can send and
receive.
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file skg.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.3 31-May-2011  rmind sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file skg.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.3.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 29-May-2011  jruoho file skg.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.4.30.1 28-Aug-2017  skrll Sync with HEAD
 1.4.12.1 03-Dec-2017  jdolecek update from HEAD
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file sme.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file sme.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file sme.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.6 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.5 12-Mar-2011  phx branches: 1.5.2; 1.5.6;
Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.4 11-Mar-2011  phx Some code cleanup, suggested by nisimura@.
 1.3 10-Mar-2011  phx Make sure the device class is IDE (class 0, subclass 1), before checking
the PCI interface for native/legacy mode. Different subclasses are always
assumed being in native mode. That makes the Acard IDE controller work.

New macros for PCI interface, revision and class.
 1.2 08-Mar-2011  phx Driver seems to work now. Successfully booted a kernel via BOOTP and NFS on
an ST1023-compatible IC+ IP1000A chip.
 1.1 06-Mar-2011  phx New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.5.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.5.6.1 12-Mar-2011  jruoho file stg.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.5.2.2 21-Apr-2011  rmind sync with head
 1.5.2.1 12-Mar-2011  rmind file stg.c was added on branch rmind-uvmplock on 2011-04-21 01:41:22 +0000
 1.3 05-Dec-2021  msaitoh s/stauts/status/
 1.2 27-Dec-2019  msaitoh s/transfered/transferred/
 1.1 23-Jan-2011  nisimura branches: 1.1.2; 1.1.4; 1.1.8; 1.1.62;
change bootloader name to "altboot". bump version and add README.
 1.1.62.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.8.1 23-Jan-2011  jruoho file tlp.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.1.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.1.4.1 23-Jan-2011  bouyer file tlp.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.1.2.2 05-Mar-2011  rmind sync with head
 1.1.2.1 23-Jan-2011  rmind file tlp.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.11 05-Apr-2022  andvar s/confortable/comfortable/
 1.10 04-Apr-2022  andvar fix various typos, mainly in comments.
 1.9 03-Aug-2017  phx Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).
 1.8 30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.7 15-Sep-2013  phx branches: 1.7.4; 1.7.6;
New version can read the MAC address for QNAP systems from flash.
 1.6 22-Jan-2012  phx branches: 1.6.6; 1.6.10;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.5 12-Nov-2011  phx branches: 1.5.4;
Improved Iomega microcontroller support. Bumped version to 1.8.
 1.4 13-Mar-2011  phx branches: 1.4.4; 1.4.6;
With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.3 26-Feb-2011  phx branches: 1.3.2; 1.3.4;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.2 23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1 23-Jan-2011  nisimura - add "ll" modifier to printf.
- be more conscious about int type propagation.
- add missing version and newvers.sh
 1.3.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.3.4.1 26-Feb-2011  bouyer file version was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.3.2.3 21-Apr-2011  rmind sync with head
 1.3.2.2 05-Mar-2011  rmind sync with head
 1.3.2.1 26-Feb-2011  rmind file version was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.4.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 17-Apr-2012  yamt sync with head
 1.4.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.4.4.1 13-Mar-2011  jruoho file version was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.5.4.1 18-Feb-2012  mrg merge to -current.
 1.6.10.1 18-May-2014  rmind sync with head
 1.6.6.2 03-Dec-2017  jdolecek update from HEAD
 1.6.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.2 28-Aug-2017  skrll Sync with HEAD
 1.7.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.7.4.1 16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.3 30-Oct-2011  phx Added in8() and out8() to access a byte with reorder-protection.
Use it in all drivers instead of (volatile uint8_t *).
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file vge.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file vge.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file vge.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000
 1.3 03-Sep-2021  andvar fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/
 1.2 27-Jan-2011  phx branches: 1.2.2; 1.2.4; 1.2.8;
Debugging output is only visible when DEBUG is defined.
 1.1 23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 27-Jan-2011  jruoho file wm.c was added on branch jruoho-x86intr on 2011-06-06 09:06:36 +0000
 1.2.4.2 06-Mar-2011  bouyer Sync with HEAD
 1.2.4.1 27-Jan-2011  bouyer file wm.c was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 27-Jan-2011  rmind file wm.c was added on branch rmind-uvmplock on 2011-03-05 20:51:48 +0000

RSS XML Feed