Home | History | Annotate | Download | only in mca
History log of /src/sys/arch/i386/mca/mca_machdep.c
RevisionDateAuthorComments
 1.44  31-Mar-2017  msaitoh Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) with
snprintb(3) (in between NetBSD 5 and 6). Old bitmask_snprint(9) didn't add
0x" automatically for hexadecimal value, so old code used it with "0x%s".
 1.43  01-Sep-2011  christos branches: 1.43.12; 1.43.30; 1.43.34; 1.43.38;
Add bus_dma overrides. From dyoung
 1.42  27-Aug-2011  christos use c99 struct initializers
 1.41  01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.40  03-Apr-2011  dyoung Clean up excessive #ifdef'age of NMI trap handling for amd64/i386/xen.
Handle NMI in all Xen kernels.
 1.39  23-Mar-2010  dyoung branches: 1.39.2;
dmaiot is supposed to be a bus_space_tag_t, not a bus_space_handle_t.
Make it so.
 1.38  04-May-2009  cegger branches: 1.38.2; 1.38.4;
struct device * -> device_t
No functional changes intended.
 1.37  16-Dec-2008  christos branches: 1.37.2;
replace bitmask_snprintf(9) with snprintb(3)
 1.36  08-Sep-2008  gmcgarry branches: 1.36.2;
Replace most gcc-specific __attribute__ uses with BSD-style sys/cdef.h
preprocessor macros.
 1.35  28-Apr-2008  martin branches: 1.35.2; 1.35.6;
Remove clause 3 and 4 from TNF licenses
 1.34  01-Dec-2007  ad branches: 1.34.14; 1.34.16; 1.34.18;
Noisy printf
 1.33  17-Oct-2007  garbled branches: 1.33.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.32  26-Sep-2007  ad x86 changes for pcc and LKMs.

- Replace most inline assembly with proper functions. As a side effect
this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
smaller amount. Nearly all of the inlines did something slow, or something
that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.
 1.31  22-Feb-2007  matt branches: 1.31.4; 1.31.12; 1.31.20; 1.31.22; 1.31.24;
Fix lossage from boolean_t -> bool and updated x86 bus_dma.
 1.30  16-Nov-2006  christos branches: 1.30.4;
__unused removal on arguments; approved by core.
 1.29  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.28  19-Feb-2006  thorpej branches: 1.28.14; 1.28.16;
Use aprint_*().
 1.27  26-Dec-2005  perry branches: 1.27.2; 1.27.4; 1.27.6;
u_intN_t -> uintN_t
 1.26  11-Dec-2005  christos merge ktrace-lwp.
 1.25  16-Apr-2005  yamt branches: 1.25.2;
tweak x86 bus_dma code so that it can be used by xen port.

- distinguish paddr_t and bus_addr_t.
for xen, use bus_addr_t in the sense of machine address.
- move _X86_BUS_DMA_PRIVATE part of bus.h into bus_private.h.
- remove special handling of xen_shm. we can always grab
machine address from pte.
 1.24  03-Feb-2005  perry branches: 1.24.4;
de-__P, partially ANSIfy
 1.23  30-Aug-2004  drochner branches: 1.23.4; 1.23.6;
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.22  15-Dec-2003  jdolecek print complete contents of the second feature byte; this also fixes
printing of DMA32 bit
 1.21  08-May-2003  fvdl branches: 1.21.2;
Adapt for new bus_dma structure.
XXX the MCA-specific stuff in here was never actually used. I pointed
the tag at all the generic functions that can now be used (bounce
functionality was integrated into them).
 1.20  03-May-2003  wiz DMA, not dma nor Dma.
 1.19  26-Feb-2003  fvdl Adapt for i386/x86 change.
 1.18  22-Nov-2002  fvdl New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.
 1.17  22-Oct-2002  christos void functions do not return values.
 1.16  01-Oct-2002  fvdl Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
 1.15  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.14  04-Dec-2001  sommerfeld branches: 1.14.2;
Fix so these files build with options DEBUG enabled.
The change to edc_mca.c may not work as I don't have any mca hardware.
 1.13  03-Dec-2001  jdolecek fix two bugs in mca_dma_set_ioport():
* need to specify DMA channel for DMACMD_SET_IO
* the upper byte of port was masked incorrectly

also update comment in _mca_bus_dmamap_sync() to current reality
 1.12  02-Dec-2001  jdolecek Add couple hooks, needed primarily for NCR 53C90 MCA card driver:
* add flag to explicitly specify if the DMA should be done as 16bit or 8bit
* add flag to specify the DMA should happen via I/O port
* add new function mca_dma_set_ioport(), to set I/O port to be used for the
DMA operation

Also clarify copyright (welcome to 2001 :), and couple other minor nits
 1.11  23-Nov-2001  jdolecek Properly glue in the MCA DMA controller support, using bus_dma
interface, using the code from dev/mca/edc_mca.c:edc_setup_dma()
as a base. Use ISA routines for dmamap/dmamem functions, primarily
to get the buffer bouncing for >16MB RAM machines. The MCA DMA
channel is stored in unused upper 4 bits of ISA DMA cookie's
id_flags, hopefully that's not too disgusting :)
Export mca_dmamap_create(), which returns map suitable for further DMA
operations using MCA DMA controller.

mca_busprobe(): also report if machine has 32bit DMA (feature byte 2
bit 1)

Use symbolic names for DMA controller commands - I've finally got
info what they mean from Tymm Twillman's Linux include/asm/mca_dma.h.
No more magic constants! Also fix bug in the way DMA counter has been
setup - for 16bit DMA, it's necessary to tell the controller _half_
the byte count. This was wrong in the former code.
 1.10  15-Nov-2001  lukem add RCSID
 1.9  14-May-2001  jdolecek branches: 1.9.4;
Compact the BIOS CFG printout
 1.8  04-May-2001  jdolecek print the model numbers slighly different way
 1.7  02-May-2001  jdolecek Find out the presence of MCA bus via bioscall(9).
g/c some unneeded stuff, make comments more accurate.
 1.6  22-Apr-2001  jdolecek Introduce machdep mca_disk_[un]busy(), which turn on/off disk LED.
Call as appropriate from the ESDI disk driver
 1.5  22-Apr-2001  jdolecek fix argument for bitmask_snprintf() (stylistic only, code is commented out anyway)
 1.4  13-Aug-2000  jdolecek branches: 1.4.2; 1.4.6;
#if 0 bogus mca_intr_establish() added possibly mistakely
by cgd in rev. 1.2
 1.3  09-Jul-2000  jdolecek move struct sys_config from mca_machdep.c to mca_machdep.h
fix copyright (overlooked in original commit)
use bitmask_snprintf() instead of printf("...%b") (though that part is commented
out anyway ATM)
 1.2  04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.1  11-May-2000  jdolecek branches: 1.1.2;
Add i386-specific part of MicroChannel Architecture bus support, as
found in some older IBM PS/2 machines.

This code is based upon work by Scott D. Telford, with some minor bits
in arch/i386/mca/mca_machdep.c taken from FreeBSD.

XXX this is still very experimental and development version; use at your
XXX own risk
 1.1.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4.6.5  11-Dec-2002  thorpej Sync with HEAD.
 1.4.6.4  11-Nov-2002  nathanw Catch up to -current
 1.4.6.3  18-Oct-2002  nathanw Catch up to -current.
 1.4.6.2  08-Jan-2002  nathanw Catch up to -current.
 1.4.6.1  21-Jun-2001  nathanw Catch up to -current.
 1.4.2.3  23-Apr-2001  bouyer Sync with HEAD.
 1.4.2.2  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.4.2.1  13-Aug-2000  bouyer file mca_machdep.c was added on branch thorpej_scsipi on 2000-11-20 20:09:33 +0000
 1.9.4.2  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.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.2  04-Dec-2001  sommerfeld Fix so these files build with options DEBUG enabled.
The change to edc_mca.c may not work as I don't have any mca hardware.
 1.14.2.1  04-Dec-2001  sommerfeld file mca_machdep.c was added on branch sommerfeld_i386mp_1 on 2001-12-04 20:00:17 +0000
 1.21.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.21.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.21.2.2  03-Sep-2004  skrll Sync with HEAD
 1.21.2.1  03-Aug-2004  skrll Sync with HEAD
 1.23.6.1  12-Feb-2005  yamt sync with head.
 1.23.4.1  29-Apr-2005  kent sync with -current
 1.24.4.1  21-Apr-2005  tron Pull up revision 1.25 (requested by yamt in ticket #175):
tweak x86 bus_dma code so that it can be used by xen port.
- distinguish paddr_t and bus_addr_t.
for xen, use bus_addr_t in the sense of machine address.
- move _X86_BUS_DMA_PRIVATE part of bus.h into bus_private.h.
- remove special handling of xen_shm. we can always grab
machine address from pte.
 1.25.2.4  07-Dec-2007  yamt sync with head
 1.25.2.3  27-Oct-2007  yamt sync with head.
 1.25.2.2  26-Feb-2007  yamt sync with head.
 1.25.2.1  21-Jun-2006  yamt sync with head.
 1.27.6.1  22-Apr-2006  simonb Sync with head.
 1.27.4.1  09-Sep-2006  rpaulo sync with head
 1.27.2.1  01-Mar-2006  yamt sync with head.
 1.28.16.2  10-Dec-2006  yamt sync with head.
 1.28.16.1  22-Oct-2006  yamt sync with head
 1.28.14.1  18-Nov-2006  ad Sync with head.
 1.30.4.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.31.24.1  06-Oct-2007  yamt sync with head.
 1.31.22.2  09-Jan-2008  matt sync with HEAD
 1.31.22.1  06-Nov-2007  matt sync with HEAD
 1.31.20.2  03-Dec-2007  joerg Sync with HEAD.
 1.31.20.1  02-Oct-2007  joerg Sync with HEAD.
 1.31.12.1  03-Oct-2007  garbled Sync with HEAD
 1.31.4.2  03-Dec-2007  ad Sync with HEAD.
 1.31.4.1  09-Oct-2007  ad Sync with head.
 1.33.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.34.18.4  11-Aug-2010  yamt sync with head.
 1.34.18.3  16-May-2009  yamt sync with head
 1.34.18.2  04-May-2009  yamt sync with head.
 1.34.18.1  16-May-2008  yamt sync with head.
 1.34.16.1  18-May-2008  yamt sync with head.
 1.34.14.3  17-Jan-2009  mjf Sync with HEAD.
 1.34.14.2  28-Sep-2008  mjf Sync with HEAD.
 1.34.14.1  02-Jun-2008  mjf Sync with HEAD.
 1.35.6.1  19-Oct-2008  haad Sync with HEAD.
 1.35.2.1  24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.36.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.37.2.5  27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.37.2.4  02-May-2011  jym Sync with head.
 1.37.2.3  24-Oct-2010  jym Sync with HEAD
 1.37.2.2  01-Nov-2009  jym Sync with HEAD.
 1.37.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.38.4.2  21-Apr-2011  rmind sync with head
 1.38.4.1  30-May-2010  rmind sync with head
 1.38.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.39.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.43.38.1  21-Apr-2017  bouyer Sync with HEAD
 1.43.34.1  26-Apr-2017  pgoyette Sync with HEAD
 1.43.30.1  28-Aug-2017  skrll Sync with HEAD
 1.43.12.1  03-Dec-2017  jdolecek update from HEAD

RSS XML Feed