Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/atari/dev/nvram.c
RevisionDateAuthorComments
 1.23  06-Jan-2023  tsutsui TAB/spaces/indents cleanup.
 1.22  02-Jul-2022  tsutsui Use aprint_*(9) for attach messages and misc KNF.
 1.21  20-Jan-2018  tsutsui Skip NVRAM checksum check and re-initialization on Milan.

Milan's firmware seems to use different check method.
 1.20  06-Mar-2015  christos branches: 1.20.10;
rename NV_DEBUG to NVRAM_DEBUG
 1.19  05-Jun-2011  tsutsui branches: 1.19.12; 1.19.30;
Split device_t/softc. No crash on TT030.
 1.18  13-Apr-2010  tsutsui branches: 1.18.2; 1.18.6;
Include "ioconf.h" to declare struct cfdriver foo_cd.
 1.17  20-Oct-2009  snj branches: 1.17.2; 1.17.4;
Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.
 1.16  18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.15  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.14  14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.13  13-Jun-2008  cegger branches: 1.13.4; 1.13.10;
use device_lookup_private to get softc
 1.12  11-Jun-2008  tsutsui Use device_private() and device_lookup_privat() to get softc.
 1.11  11-Dec-2005  christos branches: 1.11.74; 1.11.76; 1.11.78; 1.11.80; 1.11.82;
merge ktrace-lwp.
 1.10  15-Jul-2003  lukem __KERNEL_RCSID()
 1.9  02-Oct-2002  thorpej branches: 1.9.6;
Use CFATTACH_DECL().
 1.8  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7  12-Jan-1998  thorpej branches: 1.7.28; 1.7.32;
Update for changes to config.
 1.6  20-Dec-1996  leo Get rid of BROKEN_INDIRECT_CONFIG
 1.5  13-Oct-1996  christos backout previous kprintf changes
 1.4  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3  18-Apr-1996  leo Yet more prototyping and -Wall fixes.
 1.2  17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.1  06-Jan-1996  leo Add an nvram-driver. This driver makes it possible to read/write the
configuration info stored in the nvram on the mc146818.
 1.7.32.1  18-Oct-2002  nathanw Catch up to -current.
 1.7.28.1  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.9.6.1  03-Aug-2004  skrll Sync with HEAD
 1.11.82.1  18-Jun-2008  simonb Sync with head.
 1.11.80.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.11.78.3  11-Aug-2010  yamt sync with head.
 1.11.78.2  11-Mar-2010  yamt sync with head
 1.11.78.1  04-May-2009  yamt sync with head.
 1.11.76.1  17-Jun-2008  yamt sync with head.
 1.11.74.1  29-Jun-2008  mjf Sync with HEAD.
 1.13.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.4.1  28-Apr-2009  skrll Sync with HEAD.
 1.17.4.2  12-Jun-2011  rmind sync with head
 1.17.4.1  30-May-2010  rmind sync with head
 1.17.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.18.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.18.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.19.30.1  06-Apr-2015  skrll Sync with HEAD
 1.19.12.1  03-Dec-2017  jdolecek update from HEAD
 1.20.10.1  13-Mar-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #624):
sys/arch/atari/stand/xxboot/sdboot/milan/Makefile: revision 1.4
sys/arch/atari/dev/nvram.c: revision 1.21
sys/arch/atari/conf/MILAN.in: revision 1.28
sys/arch/atari/atari/pmap_bootstrap.c: revision 1.9
sys/dev/isa/fd.c: revision 1.111
sys/arch/atari/atari/bus.c: revision 1.60
sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile: revision 1.4
sys/arch/atari/atari/locore.s: revision 1.111
sys/arch/atari/isa/isa_machdep.c: revision 1.41
distrib/sets/lists/base/md.atari: revision 1.55
sys/arch/atari/pci/pci_machdep.c: revision 1.55
sys/arch/atari/pci/pci_machdep.c: revision 1.56
sys/arch/atari/include/vmparam.h: revision 1.32
sys/arch/atari/isa/isa_milan.c: revision 1.15
sys/arch/atari/isa/isa_milan.c: revision 1.16
sys/arch/atari/atari/bus.c: revision 1.59
sys/arch/atari/atari/atari_init.c: revision 1.101
sys/arch/atari/pci/pci_milan.c: revision 1.15
Fix I/O access failures for regions allocated by bus_space_map(9) on Milan.

Passing to PMAP_WIRED against I/O spaces seems problematic,
probably after yamt-km branch merge, which was committed
between NetBSD 3.0 and NetBSD 4.0.
(i.e. ISA and PCI devices on Milan didn't work after 4.0 release)

XXX:
According to pmap(9) man page, the "flags" arg for pmap_enter(9)
doesn't take VM_PROT_READ and VM_PROT_WRITE, but pmap_enter()
implementation in sys/arch/m68k/m68k/pmap_motolora.c historically
checks them.

Fix silent hang during config_console() (before consinit()) on Milan.
config_console() was a dirty hack used by ancient m68k ports
to probe and initialize console devices before "real" configure(9),
using subset of configure(9) functions.

In that case, most device specific data (except I/O access method)
are not initialized so we must not access device specific device_t and
softc structures in config_console() cases.

Fix silent hang after isa_intr_establish() on Milan.
The problems (wrong macro replacements) were slipped in rev 1.107:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/atari/atari/locore.s#rev1.107
Handle yet another atari specific quirk in the MI ISA fdc(4)/fd(4) driver.
This makes fd(4) drive(s) (which is necessary for installation)
properly attached on Milan.
atari uses "fdcisa" and "fdisa" for ISA fdc to co-exist other fd(4)
drivers, on-board (atari/dev/fd.c) one and Hades (atari/dev/hdfd.c) one.

Use a proper PSL value to be passed to splx(9) functions.
This should have been changed on yamt-splraiseipl branch merge
back in 2006, which made MI IPL_xxx values independent from
m68k MD PSL values for the %sr register.

Restore piixide(4) for Milan and disable other pciide devices.
piixide was removed in rev 1.18 and the log message said
"because Intel IDE disk controllers only exist as part of
Intel chipsets for x86 systems" but the Milan actually has
the Intel 82371FB southbridge on its board.
Other pciide devices are unlikely necessary for the default
kernel for such a rare machine.
Also fix pasto in comment.

Skip NVRAM checksum check and re-initialization on Milan.
Milan's firmware seems to use different check method.

Ack EOI for IRQ_SLAVE of the master PIC after ack for IRQ of the slave PIC.
I'm not sure if there are possible races in the original code, but
this is what i8259_asm_ack2() in sys/arch/x86/include/i8259.h does
and it looks this change makes a Milan kernel a bit stable.
Replace CRTC register values with ones taken from sys/dev/ic/vga_subr.c.
This fixes noise around column 3 and 4 and makes screen output clearer
on Milan with S3 Trio64V.

Explicitly setup the secondary IDE interrupt of PIIX on Milan.
The secondary IDE interrupt is connected to MBIRQ0 on PIIX, but
the Milan's ROM bootloader (at least version 0.99.7) doesn't seem
to setup the MBIRQ0 register to route it to IRQ15.

On Milan, also explicitly disable MBIRQ1 on PIIX.
Milan's ROM bootloader v1.2 and v1.4 incorrectly set MBIRQ0 connected
to the secondary IDE to IRQ14 (not 15) and unused MBIRQ1 to IRQ15,
so both IDE channels don't work properly.

Add dumb memory probe routines for Milan to use all available memory.
Tested on Milan with 32Mx1, 32Mx4, 128MBx1, and 128MBx3.
(bootloader ROM fails to load TOS with 128MBx4)
No particular comment on port-atari@:
http://mail-index.netbsd.org/port-atari/2018/02/09/msg000580.html

Provide wdboot as a copy of sdboot for Milan.
It looks Milan's bootloader ROM emulates IDE disks as SCSI disks
so sdboot works for them, but atari's installboot checks a specified
device name and requires wdboot for wd(4) devices.

Fix another possible out of bounds.

Replace bus_dmamap_sync(9) op with a newer one taken from m68k/bus_dma.c.
This could fix memory corruption issue caused by PREREAD ops with regions
whose boundaries are not aligned at cacheline size.

RSS XML Feed