| History log of /src/sys/arch/evbmips/rmixl/machdep.c | 
    | Revision |  | Date | Author | Comments | 
| 1.22 |  | 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.21 |  | 20-Dec-2023 | thorpej | Remove unnecessary <sys/malloc.h>. 
 | 
| 1.20 |  | 02-Aug-2021 | andvar | fix various typos in comments and log messages. 
 | 
| 1.19 |  | 06-Jun-2018 | maya | Remove duplicate ; 
 | 
| 1.18 |  | 22-Dec-2016 | cherry | branches:  1.18.14; switch all ports to use uvm_init.c:uvm_md_init()
 
 uvm_setpagesize() is now subsumed within this funciton.
 
 | 
| 1.17 |  | 30-Jun-2015 | matt | branches:  1.17.2; Use cpu_startup_common()
 
 | 
| 1.16 |  | 10-Jun-2015 | matt | Avoid using curpcb (use lwp_getpcb(curlwp)) instead. 
 | 
| 1.15 |  | 01-Jun-2015 | matt | Rework cavium support in preparation for MULTIPROCESSOR support 
 | 
| 1.14 |  | 24-Mar-2014 | christos | branches:  1.14.6; use cpu_{g,s}etmodel
 
 | 
| 1.13 |  | 03-Mar-2012 | matt | branches:  1.13.2;  1.13.4; Remove redundant common declaration.
 
 | 
| 1.12 |  | 02-Mar-2012 | matt | Remove reduntant/conflicting common declarations. 
 | 
| 1.11 |  | 12-Feb-2012 | matt | Change old-style function defintions to C89 prototypes. 
 Approved by releng.
 
 | 
| 1.10 |  | 27-Jan-2012 | para | converting extent(9) from malloc(9) to kmem(9) preceding kmem-vmem-pool-uvm patch
 
 releng@ acknowledged
 
 | 
| 1.9 |  | 12-Apr-2011 | matt | branches:  1.9.4;  1.9.8; Make sure we init MIPS COP0 OSSCRATCH for UP as well as for MP.
 
 | 
| 1.8 |  | 11-Apr-2011 | matt | Add code to fixup the text segment to replace loads from L_CPU(MIPS_CURLWP) or curlwp->l_cpu with
 loads from COP0 register OSSCRATCH.
 
 | 
| 1.7 |  | 20-Feb-2011 | matt | Merge forward from matt-nb5-mips64. 
 | 
| 1.6 |  | 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.5 |  | 14-Jan-2011 | rmind | branches:  1.5.2;  1.5.4; Retire struct user, remove sys/user.h inclusions.  Note sys/user.h header
 as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.
 
 Various #include fixes and review by matt@.
 
 | 
| 1.4 |  | 08-Feb-2010 | joerg | branches:  1.4.2;  1.4.4; 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.3 |  | 20-Dec-2009 | rmind | branches:  1.3.2; Fix few problems in evbmips/rmixl:
 - mach_init: use mips_init_lwp0_uarea(), do not hardcode it.  Do not call
 ksyms_init(), it's called in MI.  Also, avoid struct user in few places.
 - findroot: use deviter interface.
 
 | 
| 1.2 |  | 14-Dec-2009 | matt | Merge from matt-nb5-mips64 Merge mips-specific arch files.
 
 | 
| 1.1 |  | 13-Sep-2009 | cliff | branches:  1.1.2; file machdep.c was initially added on branch matt-nb5-mips64.
 
 | 
| 1.1.2.46 |  | 19-Jan-2012 | matt | Restore RCSID 
 | 
| 1.1.2.45 |  | 19-Jan-2012 | matt | Use extern for machdep_debug. 
 | 
| 1.1.2.44 |  | 04-Jan-2012 | matt | Rework Fast Messaging Network support (it's now lockless). Workaround a problem with bus 0 BAR sizing causing the registers behind
 the BAR to become inaccessible.
 Move much/most of the startup code from evbmips/rmixl/machdep to
 mips/rmi/rmixl_machdep.c
 Move the code to find the XLP variant to the early boot so it can be used
 early.
 8bit and 16bit accessed to PCI bus 0 cause cache errors so chagne the access
 of pci mem to 32bits.
 
 | 
| 1.1.2.43 |  | 30-Dec-2011 | matt | Initially mark all GPIO pins as available. 
 | 
| 1.1.2.42 |  | 28-Dec-2011 | matt | Add commented out AB_DEBUG. 
 | 
| 1.1.2.41 |  | 27-Dec-2011 | matt | Fix c&p error. 
 | 
| 1.1.2.40 |  | 27-Dec-2011 | matt | When filling out the physical extent, make sure to probe NOR base/limit pairs. 
 | 
| 1.1.2.39 |  | 24-Dec-2011 | matt | Rework to add early support. Add XLP support.  Allow one kernel to support XLR/XLS and XLP.
 Do bus_dma init in cpu_configure.
 
 | 
| 1.1.2.38 |  | 15-Dec-2011 | matt | Add earlycons support. 
 | 
| 1.1.2.37 |  | 03-Dec-2011 | matt | Rework things a bit for the XLR/XLS/XLP TLB.  Before dealing with the TLB when MP on the XL?, disable interrupts and take out a lock to prevent concurrent
 updates to the TLB.  In the TLB miss and invalid exception handlers, if the
 lock is already owned by another CPU, simply return from the exception and
 let it continue or restart as appropriate.  This prevents concurrent TLB
 exceptions in multiple threads from possibly updating the TLB multiple times
 for a single address.
 
 | 
| 1.1.2.36 |  | 29-Nov-2011 | matt | Take part of the KSEG2 space and use it to "almost" direct another 256MB of memory so that N32 kernels can make use of ram outside of KSEG0.  This
 allows N32 kernels to be useful on systems with 4GB of RAM or more.
 
 | 
| 1.1.2.35 |  | 26-May-2011 | matt | Use new MIPS64*_RMIXL options If MP, store address of &pmap_tlb0_info.ti_lock->mtx_lock to OSSCRATCH 2
 
 | 
| 1.1.2.34 |  | 29-Apr-2011 | matt | Major merge to/from current. Adds MIPS32/MIPS64 R2 support (24k, 74k, etc.) including COP0_USERLOCAL
 Adds support for emulation of rdhwr $3,$29 instruction.
 Major cleanup of SMP code.  (stable on multi-core / single thread per core)
 llsc locking code only used in MP capable kernels.
 
 | 
| 1.1.2.33 |  | 05-Feb-2011 | cliff | - include opt_multiprocessor.h for MULTIPROCESSOR dependency - in rmixl_pcr_init_core(), ifdef MIPS_DDB_WATCH, clear IEU_DEFEATURE
 so we can get T_WATCH execeptions if/when we set COP0 watchpoint
 
 | 
| 1.1.2.32 |  | 07-Jan-2011 | cliff | - add rmixl_pcr_init_core() to initialize per-core processor control regs 
 | 
| 1.1.2.31 |  | 17-Dec-2010 | matt | When doing MP, make sure the TLB is global mode (shared among all threads). 
 | 
| 1.1.2.30 |  | 17-Aug-2010 | matt | Add new psb_version. 
 | 
| 1.1.2.29 |  | 06-May-2010 | cliff | add psb version 0x4b67d03200000056 to the list of known versions 
 | 
| 1.1.2.28 |  | 12-Apr-2010 | cliff | - include "rmixl_pcix.h" and "rmixl_pcie.h" to get the config flags - include rmixl_pcixvar.h to get proto for rmixl_physaddr_init_pcix()
 - calls to rmixl_physaddr_init_pcix() and rmixl_physaddr_init_pcie()
 depend on the config flags
 - eliminate vm_clusters[], just use mem_clusters[] for everything
 - add mem_cluster_maxaddr to track highest RAM addr,
 used to check PCI-X Host BARs; calculate his value just before
 calling mips_page_physload() i.e. once mem_clusters[] is stable.
 
 | 
| 1.1.2.27 |  | 29-Mar-2010 | cliff | turn off MACHDEP_DEBUG 
 | 
| 1.1.2.26 |  | 29-Mar-2010 | cliff | - add new recognized psb (firmware) ID 0x4b8ead3100000056 - pcie physical regions discovery is moved to rmixl_pcie.c
 and is conditional on RMI chip type (XLR has no PCIE)
 
 | 
| 1.1.2.25 |  | 21-Mar-2010 | cliff | - specify rmixl_splsw to mips_vector_init note that __INTR_PRIVATE must be defined to do that
 - print MEMLIMIT if it is defined, after printing memsize
 - improve some comments
 
 | 
| 1.1.2.24 |  | 09-Mar-2010 | matt | Use dmtc0 too. 
 | 
| 1.1.2.23 |  | 09-Mar-2010 | matt | Use dmfc0 k0,cop0_osscratch if _LP64 
 | 
| 1.1.2.22 |  | 27-Feb-2010 | matt | Fix tpyo (missing ;) 
 | 
| 1.1.2.21 |  | 27-Feb-2010 | snj | Fix gimplish. 
 | 
| 1.1.2.20 |  | 27-Feb-2010 | matt | For MULTIPROCESSOR kernels, enable exception fixups. 
 | 
| 1.1.2.19 |  | 01-Feb-2010 | matt | fix fallout from frame/trapframe merger. 
 | 
| 1.1.2.18 |  | 29-Jan-2010 | cliff | - rmiclfw_psb_versions[] is replaced by rmiclfw_psb_id[] which now lists type to distinguish between RMI and Dell
 firmware variants
 - use MEMLIMIT to limit max mem addr given to uvm
 
 | 
| 1.1.2.17 |  | 24-Jan-2010 | cliff | - move firmware info stuff into struct rmixl_config 
 | 
| 1.1.2.16 |  | 22-Jan-2010 | cliff | - memsize and related now uint64_t to handle >4GB mem - if MULTIPROCESSOR do not 'disable all threads except #0' or
 'set single MMU Thread Mode'
 
 | 
| 1.1.2.15 |  | 20-Jan-2010 | matt | Adjust things to the new world order. 
 | 
| 1.1.2.14 |  | 17-Jan-2010 | cliff | - get cpu wakeup info from firmware - reserve the cpu_wakeup_info shared memory area from uvm
 - initialize cpu_model from mycpu->cpu_name
 - dont disable all non-0 threads if MULTIPROCESSOR
 
 | 
| 1.1.2.13 |  | 08-Jan-2010 | cliff | - if the firmware version is unknown, we use MEMSIZE instead of maps prpovided by firmware; if MEMSIZE if nt configure, print
 error message are halt; if would defer until consinit
 then we could panic.
 - fix seg count when MEMSIZE is used to constrain memory  obtained from firmware maps
 - cast physmem to to uint64_t before applying ctob() when passing
 bytes count to format_bytes()
 
 | 
| 1.1.2.12 |  | 03-Jan-2010 | cliff | - rmixl_reset() now uses RESET bit in RMIXL_GPIO_RESET register to reboot 
 | 
| 1.1.2.11 |  | 31-Dec-2009 | matt | Use mips_page_physload and mips_init_lwp0_uarea. 
 | 
| 1.1.2.10 |  | 14-Dec-2009 | cliff | - delete MACHDEP_DEBUG define - adjust name of (big endian) obio bus space init function
 
 | 
| 1.1.2.9 |  | 11-Dec-2009 | cliff | - add another known/recognized psb_version ID# - useing comcnfreq instead of -1 in rmixl_com_cnattach now
 - MIPS_RESET_EXC_VEC is physical addr, no need for translation to phys
 when reserving from phys memory (should never be in the list anyway).
 - in rmixlfw_init(), when untested psb_version, initialize mem_clusters[]
 (to use MEMSIZE)
 
 | 
| 1.1.2.8 |  | 16-Nov-2009 | cliff | set up some Processor Control registers at start of mach_init(): - disable all threads except #0
 - disable Unaligned Access
 - set single MMU Thread Mode, single TLB partition
 
 | 
| 1.1.2.7 |  | 15-Nov-2009 | cliff | - make infop work for N32 or N64; firmware gives us a non-sign-extended 32 bit pointer in a 64 bit variable
 - in rmixlfw_init(), when PSB version not found,
 fix rc_io_pbase initialization, and add the missing return MEMSIZE.
 - use PRIx64 format to make some printfs work for N32 or N64
 - use (intptr_t) as needed to make int to pointer casts work for N32 and N64
 - init rc_obio_memt replaces init of rc_eb_memt, rc_el_memt
 
 | 
| 1.1.2.6 |  | 09-Nov-2009 | cliff | - rmixl_physaddr_init() instantiates a fixed extent used to allocate physical address regions;
 allocate regions known to be occupied by DRAM or I/O BARs
 - physmap_print() prints the physmap as provided by boot firmware
 - add ram_seg_resv() to reserve regions in a phys_ram_seg_to
 by splitting segments where needed.
 - in mem_clusters_init(),
 if possible use avail_mem_map,
 else use psb_physmem_map,
 otherwise use MEMSIZE.
 avail_mem_map and psb_physmem_map can be limited w/ MEMSIZE
 
 | 
| 1.1.2.5 |  | 22-Sep-2009 | cliff | fix typo 
 | 
| 1.1.2.4 |  | 22-Sep-2009 | cliff | - if COMFREQ is undefined, define as -1 (inherit BRG settings from FW) - add a new recognized FW version entry to rmiclfw_psb_versions
 - break out initialization of mem_clusters into own function
 - imprpove early boot diagnostics
 - avoid faulting on possible NULL avail_mem_map pointer from FW
 - avoid using possible NULL reset FW callback pointer
 
 | 
| 1.1.2.3 |  | 15-Sep-2009 | cliff | initialize the rmixl el and eb bus spaces 
 | 
| 1.1.2.2 |  | 13-Sep-2009 | cliff | improve how some config data are managed 
 | 
| 1.1.2.1 |  | 13-Sep-2009 | cliff | add netbsd support for RMI XLS6ATX_7A board and XL SoC family 
 | 
| 1.3.2.1 |  | 30-Apr-2010 | uebayasi | Sync with HEAD. 
 | 
| 1.4.4.2 |  | 21-Apr-2011 | rmind | sync with head 
 | 
| 1.4.4.1 |  | 05-Mar-2011 | rmind | sync with head 
 | 
| 1.4.2.2 |  | 11-Mar-2010 | yamt | sync with head 
 | 
| 1.4.2.1 |  | 08-Feb-2010 | yamt | file machdep.c was added on branch yamt-nfs-mp on 2010-03-11 15:02:20 +0000 
 | 
| 1.5.4.2 |  | 05-Mar-2011 | bouyer | Sync with HEAD 
 | 
| 1.5.4.1 |  | 17-Feb-2011 | bouyer | Sync with HEAD 
 | 
| 1.5.2.1 |  | 06-Jun-2011 | jruoho | Sync with HEAD. 
 | 
| 1.9.8.4 |  | 06-Mar-2012 | mrg | sync to -current 
 | 
| 1.9.8.3 |  | 06-Mar-2012 | mrg | sync to -current 
 | 
| 1.9.8.2 |  | 04-Mar-2012 | mrg | sync to latest -current. 
 | 
| 1.9.8.1 |  | 18-Feb-2012 | mrg | merge to -current. 
 | 
| 1.9.4.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.9.4.1 |  | 17-Apr-2012 | yamt | sync with head 
 | 
| 1.13.4.1 |  | 18-May-2014 | rmind | sync with head 
 | 
| 1.13.2.2 |  | 03-Dec-2017 | jdolecek | update from HEAD 
 | 
| 1.13.2.1 |  | 20-Aug-2014 | tls | Rebase to HEAD as of a few days ago. 
 | 
| 1.14.6.3 |  | 05-Feb-2017 | skrll | Sync with HEAD 
 | 
| 1.14.6.2 |  | 22-Sep-2015 | skrll | Sync with HEAD 
 | 
| 1.14.6.1 |  | 06-Jun-2015 | skrll | Sync with HEAD 
 | 
| 1.17.2.1 |  | 07-Jan-2017 | pgoyette | Sync with HEAD.  (Note that most of these changes are simply $NetBSD$ tag issues.)
 
 | 
| 1.18.14.1 |  | 25-Jun-2018 | pgoyette | Sync with HEAD 
 |