Home | History | Annotate | Download | only in atheros
History log of /src/sys/arch/evbmips/atheros/machdep.c
RevisionDateAuthorComments
 1.34  05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.33  17-Aug-2020  simonb Add some compile time asserts for endianness on boards/systems that
only support a single endianness.
 1.32  22-Jul-2020  msaitoh s/reseting/resetting/
 1.31  22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.30  26-Jun-2015  matt branches: 1.30.2;
Just cpu_startup_common()
 1.29  24-Mar-2014  christos branches: 1.29.6;
use cpu_{g,s}etmodel
 1.28  02-Mar-2012  matt branches: 1.28.2; 1.28.4;
Remove reduntant/conflicting common declarations.
 1.27  10-Jul-2011  matt branches: 1.27.2; 1.27.6;
CLeanup machine includes
 1.26  07-Jul-2011  matt Revamp / rework the Atheros MIPS SoC support. Add initial support for the
AR71xx (MIPS 24K core) SoC and the AR9344 (MIPS 74K core) SoC. Force use
of -mips32 for all Atheros kernels. Make code much more common.
 1.25  20-Feb-2011  matt Merge forward from matt-nb5-mips64.
 1.24  08-Feb-2011  rmind Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.23  15-Dec-2010  matt branches: 1.23.2; 1.23.4;
Make this compile again.
 1.22  08-Feb-2010  joerg branches: 1.22.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.21  14-Dec-2009  matt branches: 1.21.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.20  27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.19  26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.18  11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.17  13-Feb-2009  apb Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
 1.16  30-Nov-2008  martin branches: 1.16.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.15  12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.14  11-Nov-2008  dyoung It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
 1.13  02-Jul-2008  ad branches: 1.13.2; 1.13.4; 1.13.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.12  26-May-2008  tsutsui branches: 1.12.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).
 1.11  08-Mar-2008  imp branches: 1.11.2; 1.11.4; 1.11.6;
Fix a typo in a comment.
 1.10  09-Jan-2008  wiz branches: 1.10.2; 1.10.6;
Fix typo in macro name and comments.
 1.9  17-Oct-2007  garbled branches: 1.9.2; 1.9.8;
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.8  17-May-2007  yamt branches: 1.8.10;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.7  06-Mar-2007  simonb branches: 1.7.2; 1.7.4; 1.7.10;
Fix some caddr_t rototill fallout.
 1.6  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.5  26-Sep-2006  gdamore branches: 1.5.4;
Initial import of AR2315 support, specifically the Meraki Mini (see
the Meraki web site at http://www.meraki.net/ ) This includes changes
to the AR5312 to make it more conducive to sharing code with the AR5315,
and also includes improved early console support.

All devices including ethernet and wlan interfaces on the Meraki Mini are
functional with this port, _except_ SPI flash, which will be introduced
later.

This port was funded by the Champaign-Urbana Communit Wireless Network
Project (CUWiN).
 1.4  28-Aug-2006  gdamore branches: 1.4.2; 1.4.4; 1.4.6;
First pass at cleanup AR5312 WiSoC support to enable better & cleaner
sharing of code with the AR5315, which has many similarities, but many
differences from the AR5312.

No functional change at this time, other than the cpu_model string
(and also sysctl.hw.model node) is changed to reflect the WiSoC cpu
name rather than the identification string in ROM (which tends to not
be very informative.)
 1.3  05-Jun-2006  gdamore branches: 1.3.4;
Import new HAL 0.9.17.2. Approved by sam@

New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices. MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.

Please report any new problems with this import to garrett@.
 1.2  09-Apr-2006  tsutsui branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.
 1.1  21-Mar-2006  gdamore branches: 1.1.2;
Initial import of Atheros AR531X SoC support. Currently the onboard ethernet
and serial ports are supported, and the system appears stable with an NFS
mounted root. An earlier version of the code was reviewed by simon@, but it
has since had numerous improvements and cleanups.


At the moment, only AR5312 is known to work, but I suspect AR2313 will work
as well. Later 2315/2316 parts are substantially different, and are not yet
supported. Wifi and Marvell switch support found on some designs are not yet
supported.

Platforms known to include AR5312 include Senao Aries 2 (AP5054) and Netgear
WGU624.
 1.1.2.3  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.2.2  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.2.1  21-Mar-2006  tron file machdep.c was added on branch peter-altq on 2006-03-28 09:47:15 +0000
 1.2.8.1  19-Jun-2006  chap Sync with head.
 1.2.6.3  07-Jun-2006  kardel Sync with head.
 1.2.6.2  22-Apr-2006  simonb Sync with head.
 1.2.6.1  09-Apr-2006  simonb file machdep.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
 1.2.4.2  19-Apr-2006  elad sync with head - hopefully this will work
 1.2.4.1  09-Apr-2006  elad file machdep.c was added on branch elad-kernelauth on 2006-04-19 02:32:32 +0000
 1.2.2.5  15-Sep-2006  yamt fix merge botches.
 1.2.2.4  03-Sep-2006  yamt sync with head.
 1.2.2.3  26-Jun-2006  yamt sync with head.
 1.2.2.2  11-Apr-2006  yamt sync files somehow mis-tagged by yamt-pdpolicy-base2.
 1.2.2.1  09-Apr-2006  yamt file machdep.c was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000
 1.3.4.6  17-Mar-2008  yamt sync with head.
 1.3.4.5  21-Jan-2008  yamt sync with head
 1.3.4.4  03-Sep-2007  yamt sync with head.
 1.3.4.3  30-Dec-2006  yamt sync with head.
 1.3.4.2  21-Jun-2006  yamt sync with head.
 1.3.4.1  05-Jun-2006  yamt file machdep.c was added on branch yamt-lazymbuf on 2006-06-21 14:51:02 +0000
 1.4.6.1  22-Oct-2006  yamt sync with head
 1.4.4.2  09-Sep-2006  rpaulo sync with head
 1.4.4.1  28-Aug-2006  rpaulo file machdep.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:56 +0000
 1.4.2.1  18-Nov-2006  ad Sync with head.
 1.5.4.3  19-Apr-2007  ad Compile fixes.
 1.5.4.2  18-Apr-2007  ad - Further adaptations to MIPS for the yamt-idlelwp branch.
- Make curlwp a register variable on MIPS.
 1.5.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.7.10.1  22-May-2007  matt Update to HEAD.
 1.7.4.1  11-Jul-2007  mjf Sync with head.
 1.7.2.1  27-May-2007  ad Sync with head.
 1.8.10.2  23-Mar-2008  matt sync with HEAD
 1.8.10.1  06-Nov-2007  matt sync with HEAD
 1.9.8.1  10-Jan-2008  bouyer Sync with HEAD
 1.9.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.10.6.4  17-Jan-2009  mjf Sync with HEAD.
 1.10.6.3  02-Jul-2008  mjf Sync with HEAD.
 1.10.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.10.2.1  24-Mar-2008  keiichi sync with head.
 1.11.6.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.11.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.11.4.3  11-Mar-2010  yamt sync with head
 1.11.4.2  19-Aug-2009  yamt sync with head.
 1.11.4.1  04-May-2009  yamt sync with head.
 1.11.2.1  04-Jun-2008  yamt sync with head
 1.12.2.1  03-Jul-2008  simonb Sync with head.
 1.13.10.8  14-Feb-2012  matt mem_cluster_cnt on mips is now a u_int.
 1.13.10.7  13-May-2011  matt Update for new mips_vector_init and savectx definitions.
 1.13.10.6  21-Mar-2010  cliff mips_vector_init now takes an argument to specify splsw.
NULL specifies use the default 'std_splsw'
 1.13.10.5  01-Feb-2010  matt fix fallout from frame/trapframe merger.
 1.13.10.4  20-Jan-2010  matt Adjust things to the new world order.
 1.13.10.3  10-Jan-2010  matt Add generic support for DMA bounce buffers and real version of
bus_dmatag_subregion. MALTA uses it for ISADMA. Make RMIXL use
for creating 32bit and 29bit subregions.
 1.13.10.2  31-Dec-2009  matt Use mips_page_physload and mips_init_lwp0_uarea.
 1.13.10.1  07-Sep-2009  matt Update to deal with pcb_context being a label_t (this should be a common
routine).
 1.13.4.2  03-Mar-2009  skrll Sync with HEAD.
 1.13.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.13.2.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.16.4.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.21.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.22.2.1  05-Mar-2011  rmind sync with head
 1.23.4.2  05-Mar-2011  bouyer Sync with HEAD
 1.23.4.1  17-Feb-2011  bouyer Sync with HEAD
 1.23.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.27.6.3  06-Mar-2012  mrg sync to -current
 1.27.6.2  06-Mar-2012  mrg sync to -current
 1.27.6.1  04-Mar-2012  mrg sync to latest -current.
 1.27.2.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.27.2.1  17-Apr-2012  yamt sync with head
 1.28.4.1  18-May-2014  rmind sync with head
 1.28.2.2  03-Dec-2017  jdolecek update from HEAD
 1.28.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.6.2  05-Feb-2017  skrll Sync with HEAD
 1.29.6.1  22-Sep-2015  skrll Sync with HEAD
 1.30.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)

RSS XML Feed