Home | History | Annotate | Download | only in pci
History log of /src/sys/arch/atari/pci/pci_machdep.c
RevisionDateAuthorComments
 1.65  07-Sep-2024  andvar spelling and grammar fixes, mainly in comments.
 1.64  01-Aug-2023  andvar fix various typos in comments.
 1.63  06-Jan-2023  tsutsui TAB/spaces/indents cleanup.
 1.62  21-Aug-2021  andvar fix some more typos in comments/log messages, improve wording as well.
 1.61  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.60  24-Apr-2021  thorpej branches: 1.60.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.59  03-Jan-2021  thorpej branches: 1.59.2;
malloc(9) -> kmem(9)
 1.58  04-May-2019  tsutsui branches: 1.58.10;
Use proper integer types for PCI configuration registers.
 1.57  04-May-2019  tsutsui Misc KNF.

No binary changes on HADES and MILAN-PCIIDE kernels.
 1.56  09-Feb-2018  tsutsui branches: 1.56.4;
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.
 1.55  31-Jan-2018  tsutsui 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.
 1.54  29-Mar-2014  christos branches: 1.54.22;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.53  26-Mar-2014  christos kill sprintf
 1.52  01-Jul-2011  dyoung branches: 1.52.2; 1.52.12; 1.52.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.51  05-Jun-2011  tsutsui - use CFATTACH_DECL_NEW() (no softc)
- use device_t, cfdata_t etc.
 1.50  17-May-2011  dyoung branches: 1.50.2;
PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.49  04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.48  13-Apr-2010  tsutsui branches: 1.48.2;
Misc KNF.
 1.47  18-Mar-2009  cegger branches: 1.47.2; 1.47.4;
Ansify function definitions w/o arguments. Generated with sed.
 1.46  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.45  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.44  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.43  11-Dec-2005  christos branches: 1.43.78; 1.43.86; 1.43.92;
merge ktrace-lwp.
 1.42  30-Aug-2004  drochner Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.41  10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.40  15-Jul-2003  lukem __KERNEL_RCSID()
 1.39  08-Dec-2002  leo branches: 1.39.6;
Make things work with the new autoconf stuff:
- The pcibus is now called 'pcib' and the isabus 'isab'. Their attributes are
'pcibus' and 'isabus' respectively. This makes the underlying busses
attach again.
- Initialize the parent structure in the config_console() function.
Otherwise we end up without a console.
 1.38  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.37  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.36  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.35  16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.34  15-May-2002  thorpej branches: 1.34.2;
Implement pci_decompose_tag().
 1.33  09-Jan-2002  leo Fix PCI interrupt allocation on the Milan.
Note that this _seems_ to work. It can't be really tested before my board
is upgraded.
 1.32  28-May-2001  leo branches: 1.32.2; 1.32.8;
Pass iot and memt to check_for_vga()
 1.31  15-May-2001  leo Split pci_machdep into a generic/hades/milan part. There is much difference
in configspace and interrupt handling.
 1.30  09-Mar-2001  leo Expand bus_dma implementation. It will now handle the bounce buffer
extensions needed to make the isa floppy driver on the Milan work.
 1.29  07-Jan-2001  leo branches: 1.29.2;
Kill a typo.
 1.28  28-Dec-2000  sommerfeld Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
 1.27  28-Sep-2000  leo Move config_console() out of the grf-layer. This allows for more than just
grf-type consoles (wscons). Config_console() is now called from consinit(),
just after setting up the kernel msgbuf, so debugging is easy(er).
To further facilitate this move, the pcibus now allows for early-console
attaches by allocating static bus_space_tags (no mallocs possible at this
point).
 1.26  28-Sep-2000  leo Nuke cf_unit abuse.
 1.25  28-Sep-2000  leo Correct some typos.
 1.24  29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.23  26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.22  04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.21  19-Jan-2000  leo branches: 1.21.2;
Allow storage-space to be passed to the alloc_bus_space_tag() functions. This
permits static tags to be used during early console init.
 1.20  07-Nov-1999  thomas Align IO and memory of PCI devices.
 1.19  21-Oct-1999  leo Fix pci-interrupt handling. It was broken by the latest slot numbering
changes.
 1.18  22-Sep-1999  leo branches: 1.18.2; 1.18.4; 1.18.6;
Do not enable VGA cards automatically. Since chances are high that they
claim overlapping memory areas. This causes only the 'console' VGA card
to be enabled.
 1.17  15-Mar-1999  leo First step to a framework that can be used to initialize vga-cards on the
pci-bus. The code is called early in the bootphase and tries to initialize
a known type of card into a 'standard' text mode. Wscons should be able
to handle these cards afterwards.
 1.16  19-Feb-1999  leo Add <machine/bswap.h> in the list of include-files.
 1.15  01-Jan-1999  thomas PCI I/O Start 16k because some devices allow only addresses
up to 64k.
 1.14  20-Dec-1998  thomas New code to enable PCI devices.
 1.13  15-Aug-1998  mycroft Make copyright notices with my name consistent.
 1.12  25-May-1998  leo Fix some severe bogons in the pci and isa interrupt system.
 1.11  10-Apr-1998  leo Major overhaul of the atari bus_space implementation.
 1.10  10-Mar-1998  leo Bus-dma implementation for the atari. Heavily based on the i386
implementation.
 1.9  19-Feb-1998  leo Update Hades PCI support:
- Initialize the PCI bus and hand-out mem and i/o addresses. (there is
still lots of room for improvements here...)
- Implement the interupt functions
 1.8  12-Jan-1998  thorpej Update for changes to config.
 1.7  10-Apr-1997  cgd pass memory- and i/o-enabled flags down via the PCI bus and device attach
arguments, so that a device can tell if its memory and I/O spaces are
enabled. The flags are cleared, depending on the contents of devices CSR
registers, in the machine-independent PCI bus code.
 1.6  27-Jan-1997  leo Print a new-line in attach function.
 1.5  20-Dec-1996  leo branches: 1.5.2;
Get rid of BROKEN_INDIRECT_CONFIG
 1.4  08-Nov-1996  leo pba_bc -> pba_pc
 1.3  13-Oct-1996  christos backout previous kprintf changes
 1.2  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1  05-Oct-1996  leo branches: 1.1.1;
Initial revision
 1.1.1.1  05-Oct-1996  leo minimal pci support
 1.5.2.1  30-Jan-1997  thorpej update from trunk
 1.18.6.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.4.1  15-Nov-1999  fvdl Sync with -current
 1.18.2.4  12-Mar-2001  bouyer Sync with HEAD.
 1.18.2.3  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.18.2.2  05-Jan-2001  bouyer Sync with HEAD
 1.18.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.29.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.29.2.1  09-Apr-2001  nathanw Catch up with -current.
 1.32.8.6  11-Dec-2002  thorpej Sync with HEAD.
 1.32.8.5  18-Oct-2002  nathanw Catch up to -current.
 1.32.8.4  20-Jun-2002  nathanw Catch up to -current.
 1.32.8.3  28-Feb-2002  nathanw Catch up to -current.
 1.32.8.2  11-Jan-2002  nathanw More catchup.
 1.32.8.1  28-May-2001  nathanw file pci_machdep.c was added on branch nathanw_sa on 2002-01-11 23:38:12 +0000
 1.32.2.3  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.32.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.32.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.34.2.1  30-May-2002  gehenna Catch up with -current.
 1.39.6.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.39.6.3  18-Sep-2004  skrll Sync with HEAD.
 1.39.6.2  03-Sep-2004  skrll Sync with HEAD
 1.39.6.1  03-Aug-2004  skrll Sync with HEAD
 1.43.92.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.43.86.1  28-Apr-2009  skrll Sync with HEAD.
 1.43.78.2  11-Aug-2010  yamt sync with head.
 1.43.78.1  04-May-2009  yamt sync with head.
 1.47.4.4  12-Jun-2011  rmind sync with head
 1.47.4.3  31-May-2011  rmind sync with head
 1.47.4.2  21-Apr-2011  rmind sync with head
 1.47.4.1  30-May-2010  rmind sync with head
 1.47.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.48.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.50.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.52.16.1  18-May-2014  rmind sync with head
 1.52.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.52.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.54.22.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.
 1.56.4.1  10-Jun-2019  christos Sync with HEAD
 1.58.10.1  03-Apr-2021  thorpej Sync with HEAD.
 1.59.2.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.60.8.1  03-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed