Home | History | Annotate | Download | only in gumstix
History log of /src/sys/arch/evbarm/gumstix/gumstix_machdep.c
RevisionDateAuthorComments
 1.75  12-Oct-2023  skrll Fix non-DIAGNOSTIC builds
 1.74  03-Aug-2023  mrg ignore "-Warray-bounds" for various low level platform code that knows
how something is setup but technically is undefined behaviour. the
most common here is "extern int end;" and then using offsets of "&end"
that are outside the bounds of this 4-byte integer.

these uses are almost certainly all OK in reality.

found by GCC 12.
 1.73  20-Apr-2023  skrll Provide a shared pmap_devmap implementation and convert all pmap_devmap
arrays to use DEVMAP_ENTRY{,_END}
 1.72  29-Oct-2022  jmcneill branches: 1.72.2;
Remove support for OMAP based Gumstix platforms.

These changes are to prepare for the removal of arch/arm/omap. Support
for Xscale based Gumstix platforms remains.

(If someone wants to resurrect DuoVero and Pepper platforms, it's best
to do that in the GENERIC kernel using FDT.)
 1.71  03-Dec-2020  skrll Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.70  28-Nov-2020  skrll Build fixes and make BP startup detection consistent
 1.69  30-Oct-2020  skrll branches: 1.69.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.68  01-Oct-2020  skrll Fix evbarmv5 build
 1.67  29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.66  18-Apr-2020  skrll PMAP_DEBUG has been deleted on arm
 1.65  15-Feb-2020  skrll branches: 1.65.4;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.64  20-Jan-2020  skrll Fix indentation
 1.63  16-Jul-2019  skrll branches: 1.63.4;
Consistently use vaddr_t as initarm and friends return type.

Makes no difference to binaries except for aarch64 where it's required
 1.62  18-May-2019  skrll Convert remaining armv7 kernels to generic start and remove a bunch of
code including a9_mpsubr.S.

Thanks to Lwazi Dube for testing PANDABOARD and BEAGLEBONE.
 1.61  21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.60  31-Jul-2018  skrll Sprinkle #include "opt_arm_debug.h" where VERBOSE_INIT_ARM is used
 1.59  05-Jun-2018  hkenken branches: 1.59.2;
Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.58  01-Mar-2017  skrll branches: 1.58.12;
Set xscale_cache_clean_addr appropriately and re-arrange default KVA
layout to allow direct map for all boards.

OVERO/DUOVERO/PEPPER aren't tested.

PR/52010: Regression: Gumstix Verdex is hanging in enabling cache + KASSERT ram_size
 1.57  20-Oct-2016  skrll branches: 1.57.2;
Fix regisers typo
 1.56  19-Oct-2016  kiyohara Remove white spaces.
 1.55  18-Oct-2016  kiyohara Support tifb.
 1.54  16-Oct-2016  kiyohara omap2_gpio_*() into #if - #endif.
 1.53  16-Oct-2016  kiyohara Remove not commited header-file and variable.
 1.52  15-Oct-2016  kiyohara Support Duovero and Pepper.
 1.51  31-Mar-2016  kiyohara branches: 1.51.2;
Ensure enable clocks for omapmputmr.
 1.50  07-Jun-2014  kiyohara branches: 1.50.2; 1.50.4; 1.50.8;
Fix reset parameters for omap3_ehci.
 1.49  23-May-2014  kiyohara Call arm32_*_init() and initarm_common().
OVERO work fine. GUMSTIX build only now.
 1.48  26-Sep-2013  kiyohara branches: 1.48.2;
Get and calculate some clocks from register.
And change some dpll5 settings for DM37xx. But I don't have it.
Tested EarthSTORM(Sliverlode) only. EHCI works. However clock is bad?
 1.47  18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.46  24-Dec-2012  kiyohara branches: 1.46.2;
Set some properties for ehci.
 1.45  12-Dec-2012  matt Conditionalize omap includes on OVERO
 1.44  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.43  22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.42  29-Aug-2012  matt branches: 1.42.2;
Since the PMC cycle counter is started in cpufunc no reason to do so here.
Use curcpu()->ci_data.cpu_cc_freq and new armreg* inlines.
 1.41  16-Aug-2012  matt Move the standard definitions of the {UND,IRQ,FIQ,ABT}_STACK_SIZE to
<arm32/machdep.h>
Move the extern for cpu_reset_address to the same file.
Add cpu_reset_address_paddr.
Kill cpu_reset_v4_MMU_disable.
if cpu_reset_address is NULL, then the MMU will be disabled.
 1.40  30-Jul-2012  matt Add back pv_addr_t minidataclean.
 1.39  29-Jul-2012  matt Fix more -fno-common fallout.
Move more variables to common locations.
 1.38  07-Jul-2011  mrg branches: 1.38.2;
fix an off by one array bounds issue, and also fix a potentially non
nul-terminated string.
 1.37  01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.36  30-Jun-2011  wiz dependant -> dependent
 1.35  28-Nov-2010  hannken As md(4) no longer has "needs-count" there is no "md.h" anymore.
Remove the inclusion of this file.

Acorn32 now always builds load_memory_disc_from_floppy(). This should
not be a problem as all configs have md(4).

Observed by: Masao Uebayashi <uebayasi@netbsd.org>
 1.34  23-Sep-2010  kiyohara Remove #ifdef NPRCM. Always include omap2_prcm.h.
 1.33  23-Sep-2010  kiyohara If GUMSTIX_NETBSD_ARGS_CONSOLE is defined, argument 'console=ttyS0,<speed>'
that u-boot passes Linux will be interpreted.
 1.32  30-Aug-2010  kiyohara Support prcm@obio1.
 1.31  28-Aug-2010  kiyohara Fix build fail.
+ Include opt_omap.h, if defined OVERO.
+ Fix the pair of parentheses.
 1.30  28-Aug-2010  kiyohara + Add parsing keyword 'expansion=' in args from U-boot. And keep backword
compatibility 'busheader=', in case Gumstix.
+ Add GPMC device map to gumstix_devmap[].
 1.29  08-Aug-2010  kiyohara Use EVBARM_BOARDTYPE to print 'NetBSD/evbarm(*)'. That defined to
std.gumstix and std.overo.
 1.28  10-Jul-2010  kiyohara Add gumstix_device_register(). Set properties for pxa2x0_ohci here.
However this properties not used in NetBSD source tree.
 1.27  10-Jul-2010  kiyohara Support Overo (Gumstix inc).
+ This commit supports basically.
+ Expansion boards not support yet. And MicroSD, Wifi, Bluetooth too.
 1.26  07-Mar-2010  kiyohara branches: 1.26.2;
Reorder included headers.
 1.25  07-Mar-2010  kiyohara Add options GUMSTIX_NETBSD_ARGS_CONSOLE and GUMSTIX_NETBSD_ARGS_BUSHEADER.
Can specify arg 'console='(*new*) and 'busheader=' from u-boot. These args
use dynamically configuration.
Also change function name. s/_line/_liner/.
 1.24  24-Jan-2010  kiyohara branches: 1.24.2;
Please calculate KERNEL_PT_KERNEL_NUM from KERNEL_VM_BASE.
Moreover, can define KERNEL_VM_BASE somewhere. (ex. in conf/YOUR_GUMSTIX)
For instance, allow miniroot.fs over 16Mbytes.
 1.23  26-Dec-2009  uebayasi Use cpu_* prefix to call cpu_* functions (setttb() -> cpu_setttb()); no
functional changes.
 1.22  26-Dec-2009  uebayasi Garbage collect an unused global, vm_offset_t pagetables_start.
 1.21  02-Dec-2009  kiyohara Call pxa2x0_clkman_config() instead of ioreg_write().
 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  22-Nov-2009  kiyohara Move definition 'void gxlcd_cnattach(void)' to gumstixvar.h.
 1.17  21-Nov-2009  kiyohara The variable ckenreg is used only when defined macro {FF,ST,BT,HW}UARTCONSOLE.
 1.16  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.15  09-Aug-2009  kiyohara Support verdex and verdex-pro.
And
+ Support LCD controller.
+ Support SMSC LAN 9117 Ethernet controller.
+ Comment outed 'options GXIO_DEFAULT_EXPANSION'. As for verdex-pro being
sold now, this option becomes obstructive.
+ Remove some usb devices in GUMSTIX.
+ Update GUMSTIX.

Also
Fix ARM ABI in gumstix_start.S. Thanks Brett Slager <bds at ifgd.net>.
Calculate RAM size in gumstix_start.S.
 1.14  18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.13  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.12  18-Nov-2008  cliff branches: 1.12.4;
fix botched LKM edits
 1.11  12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.10  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.9  27-Apr-2008  matt branches: 1.9.6; 1.9.8;
Merge kernel changes in matt-armv6 to HEAD.
 1.8  19-Jan-2008  chris branches: 1.8.6; 1.8.8; 1.8.10;
Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.7  17-Oct-2007  garbled branches: 1.7.2; 1.7.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.6  16-Sep-2007  kiyohara + Remove 'include "lcd.h"'.
+ It is easy to understand that memsize is added to physcal_freeend.
+ Add VERBOSE_INIT_ARM at befor/after with printf().
+ Call ddb_init() before db_machine_init().
+ Fix declered kgdb_devrate.
 1.5  21-Aug-2007  kiyohara branches: 1.5.2;
* Configure the GPIO to GXIO_DEFAULT_EXPANSION, if not specified 'busheader='
in boot args.
* Support NONAKA's <nonaka@netbsd.org> sdmmc.
* Add expansion target 'basix'. This is to configure GPIO to PXA MCI.
However, CardDetect is not connected as for mci of gumxtix. Therefore, it
is not possible to Insert/Remove.
* Remove white-spaces.
* Change format in comments.
 1.4  20-Apr-2007  kiyohara branches: 1.4.2; 1.4.6; 1.4.8; 1.4.10;
Change to use pxapcic from sa11xx_pcic.
Support multiple socket. But not tested.
 1.3  18-Jan-2007  kiyohara branches: 1.3.2; 1.3.6; 1.3.8;
Initialize GPIO of *UARTs and supports.
 1.2  24-Nov-2006  wiz branches: 1.2.4;
s/independant/independent/, from Zafer.
 1.1  16-Oct-2006  kiyohara branches: 1.1.2; 1.1.4;
Add initial support for the PXA255-based gumstix board.
 1.1.4.4  01-Feb-2007  ad Sync with head.
 1.1.4.3  12-Jan-2007  ad Sync with head.
 1.1.4.2  18-Nov-2006  ad Sync with head.
 1.1.4.1  16-Oct-2006  ad file gumstix_machdep.c was added on branch newlock2 on 2006-11-18 21:29:10 +0000
 1.1.2.3  10-Dec-2006  yamt sync with head.
 1.1.2.2  22-Oct-2006  yamt sync with head
 1.1.2.1  16-Oct-2006  yamt file gumstix_machdep.c was added on branch yamt-splraiseipl on 2006-10-22 06:04:38 +0000
 1.2.4.6  21-Jan-2008  yamt sync with head
 1.2.4.5  27-Oct-2007  yamt sync with head.
 1.2.4.4  03-Sep-2007  yamt sync with head.
 1.2.4.3  26-Feb-2007  yamt sync with head.
 1.2.4.2  30-Dec-2006  yamt sync with head.
 1.2.4.1  24-Nov-2006  yamt file gumstix_machdep.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:49 +0000
 1.3.8.1  11-Jul-2007  mjf Sync with head.
 1.3.6.2  09-Oct-2007  ad Sync with head.
 1.3.6.1  27-May-2007  ad Sync with head.
 1.3.2.1  07-May-2007  yamt sync with head.
 1.4.10.2  02-Oct-2007  joerg Sync with HEAD.
 1.4.10.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.4.8.2  28-Feb-2008  rjs Sync with HEAD.
 1.4.8.1  01-Nov-2007  rjs Sync with HEAD.
 1.4.6.1  03-Sep-2007  skrll Sync with HEAD.
 1.4.2.1  03-Oct-2007  garbled Sync with HEAD
 1.5.2.3  23-Mar-2008  matt sync with HEAD
 1.5.2.2  09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.5.2.1  06-Nov-2007  matt sync with HEAD
 1.7.8.1  20-Jan-2008  bouyer Sync with HEAD
 1.7.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.8.10.6  09-Oct-2010  yamt sync with head
 1.8.10.5  11-Aug-2010  yamt sync with head.
 1.8.10.4  11-Mar-2010  yamt sync with head
 1.8.10.3  19-Aug-2009  yamt sync with head.
 1.8.10.2  04-May-2009  yamt sync with head.
 1.8.10.1  16-May-2008  yamt sync with head.
 1.8.8.1  18-May-2008  yamt sync with head.
 1.8.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.8.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.9.8.3  28-Apr-2009  skrll Sync with HEAD.
 1.9.8.2  03-Mar-2009  skrll Sync with HEAD.
 1.9.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.9.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.12.4.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.24.2.3  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.24.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.24.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.26.2.1  05-Mar-2011  rmind sync with head
 1.38.2.4  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.38.2.3  23-Jan-2013  yamt sync with head
 1.38.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.38.2.1  30-Oct-2012  yamt sync with head
 1.42.2.4  03-Dec-2017  jdolecek update from HEAD
 1.42.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.42.2.2  25-Feb-2013  tls resync with head
 1.42.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.46.2.2  18-May-2014  rmind sync with head
 1.46.2.1  28-Aug-2013  rmind sync with head
 1.48.2.1  10-Aug-2014  tls Rebase.
 1.50.8.1  13-Mar-2017  skrll Sync with netbsd-7-1-RELEASE
 1.50.4.3  28-Aug-2017  skrll Sync with HEAD
 1.50.4.2  05-Dec-2016  skrll Sync with HEAD
 1.50.4.1  22-Apr-2016  skrll Sync with HEAD
 1.50.2.1  11-Mar-2017  snj Pull up following revision(s) (requested by skrll in ticket #1366):
sys/arch/arm/include/arm32/pmap.h: 1.145
sys/arch/arm/arm32/pmap.c: 1.343, 1.344
sys/arch/evbarm/gumstix/gumstix_machdep.c: 1.58 via patch
Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.
Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.
PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
--
fix unused.
--
Set xscale_cache_clean_addr appropriately and re-arrange default KVA
layout to allow direct map for all boards.
OVERO/DUOVERO/PEPPER aren't tested.
PR/52010: Regression: Gumstix Verdex is hanging in enabling cache + KASSERT ram_size
 1.51.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.51.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.57.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.58.12.3  30-Sep-2018  pgoyette Ssync with HEAD
 1.58.12.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.58.12.1  25-Jun-2018  pgoyette Sync with HEAD
 1.59.2.4  21-Apr-2020  martin Sync with HEAD
 1.59.2.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.59.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.59.2.1  10-Jun-2019  christos Sync with HEAD
 1.63.4.2  29-Feb-2020  ad Sync with head.
 1.63.4.1  25-Jan-2020  ad Sync with head.
 1.65.4.1  20-Apr-2020  bouyer Sync with HEAD
 1.69.2.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.72.2.1  14-Oct-2023  martin Pull up following revision(s) (requested by skrll in ticket #411):

sys/arch/evbarm/nslu2/nslu2_machdep.c: revision 1.41
sys/arch/evbarm/gumstix/gumstix_machdep.c: revision 1.75
sys/arch/evbarm/iq80321/iq80321_machdep.c: revision 1.66
sys/arch/iyonix/iyonix/iyonix_machdep.c: revision 1.34
sys/arch/zaurus/zaurus/machdep.c: revision 1.52
sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c: revision 1.41
sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c: revision 1.33
sys/arch/evbarm/iq80310/iq80310_machdep.c: revision 1.96
sys/arch/evbarm/adi_brh/brh_machdep.c: revision 1.53
sys/arch/arm/include/arm32/pmap.h: revision 1.177
sys/arch/evbarm/viper/viper_machdep.c: revision 1.34
sys/arch/evbarm/iyonix/iyonix_machdep.c: revision 1.5
sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c: revision 1.30
sys/arch/evbarm/hdl_g/hdlg_machdep.c: revision 1.35
sys/arch/arm/arm32/pmap.c: revision 1.440
sys/arch/evbarm/lubbock/lubbock_machdep.c: revision 1.45
sys/arch/evbarm/ixdp425/ixdp425_machdep.c: revision 1.47

Fix non-DIAGNOSTIC builds

RSS XML Feed