summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Add imx6 compatibility and make the driver work for any clock frequency.ian2013-08-132-79/+132
| | | | | | | There are still a couple references to imx51 ccm driver functions that will need to be changed after an imx6 ccm driver is written. Reviewed by: ray
* Only allocate 2 bounce pages for maps that can only use them for buffers thatcognet2013-08-111-1/+6
| | | | are unaligned on cache lines boundary, as we will never need more.
* Use the correct address when calling kva_free()cognet2013-08-101-1/+1
| | | | | Pointy hat to: cognet Spotted out by: alc
* - The address lies in the bus space handle, not in the cookiecognet2013-08-101-5/+5
| | | | | | - Use the right address when calling kva_free() (Is there any reason why the s3c2xx0 comes with its own version of bs_map/ bs_unmap ? It seems to be just the same as in bus_space_generic.c)
* Instead of just trying to do it for arm, make sure vm_kmem_size is properlycognet2013-08-091-2/+2
| | | | | | aligned in kmeminit(), where it'll work for any arch. Suggested by: alc
* - The address lies in the bus space handle, not in the cookiecognet2013-08-091-5/+5
| | | | - Use the right address when calling kva_free()
* Make sure vm_kmem_size is aligned on a page boundary, since that's what vmemcognet2013-08-091-2/+2
| | | | expects.
* The soft and hard busy mechanism rely on the vm object lock to work.attilio2013-08-092-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the 2 concept into a real, minimal, sxlock where the shared acquisition represent the soft busy and the exclusive acquisition represent the hard busy. The old VPO_WANTED mechanism becames the hard-path for this new lock and it becomes per-page rather than per-object. The vm_object lock becames an interlock for this functionality: it can be held in both read or write mode. However, if the vm_object lock is held in read mode while acquiring or releasing the busy state, the thread owner cannot make any assumption on the busy state unless it is also busying it. Also: - Add a new flag to directly shared busy pages while vm_page_alloc and vm_page_grab are being executed. This will be very helpful once these functions happen under a read object lock. - Move the swapping sleep into its own per-object flag The KPI is heavilly changed this is why the version is bumped. It is very likely that some VM ports users will need to change their own code. Sponsored by: EMC / Isilon storage division Discussed with: alc Reviewed by: jeff, kib Tested by: gavin, bapt (older version) Tested by: pho, scottl
* Don't bother trying to work around buffers which are not aligned on a cachecognet2013-08-071-166/+76
| | | | | | | | | | line boundary. It has never been 100% correct, and it can't work on SMP, because nothing prevents another core from accessing data from an unrelated buffer in the same cache line while we invalidated it. Just use bounce pages instead. Reviewed by: ian Approved by: mux (mentor) (implicit)
* Bring initial support for Allwinner A20 SoC (Cubieboard2).ganbold2013-08-078-4/+408
| | | | | | | | | | | Add support for A20 timer. Correct interrupt offset depending from chip. Add basic code for CPU configuration module. For now, add kernel config and dts file (only FDT blob related problem needs to be solved later in order to have one kernel for both cubieboard1 and 2). Approved by: ray@
* Replace kernel virtual address space allocation with vmem. This providesjeff2013-08-0713-24/+25
| | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
* We no longer need to align the stack before calling swi_handler as it isandrew2013-08-061-3/+0
| | | | already aligned correctly in the PUSHFRAME macro.
* Let the platform calculate the timer frequency at runtime, and use that forcognet2013-08-052-6/+19
| | | | the omap4, instead of relying on the (wrong) value provided in the dts.
* When entering exception handlers we may not have an aligned stack. This isandrew2013-08-053-6/+17
| | | | | | | | | | | | | | | because an exception may happen at any time. The stack alignment rules on ARM EABI state the only place the stack must be 8-byte aligned is on a function boundary. If an exception happens while a function is setting up or tearing down it's stack frame it may not be correctly aligned. There is also no requirement for it to be when the function is a leaf node. The fix is to align the stack after we have stored a backup of the old stack pointer, but before we have stored anything in the trapframe. Along with this we need to adjust the size of the trapframe by 4 bytes to ensure the stack below it is also correctly aligned.
* Tweak the imx debug console code so that it works with multiple SoCs.ian2013-08-031-19/+32
| | | | | | | Instead of hard-coding the uart register addresses for the imx51, use a variable that defaults to the imx51 address. When debugging another imx-family SoC, the variable can be set early in initarm() to provide full console/printf support for debugging early boot.
* Only receive the interrupts on the first core, to avoid duplicate interrupts.cognet2013-08-021-1/+1
|
* Add identification for Cortex-A7 (R0) cores.ganbold2013-08-013-1/+5
| | | | Reviewed by: cognet@
* Back out r253779 & r253786.obrien2013-07-3139-39/+4
|
* Initialisation routines for the mailbox, spinlock and PRU-ICSS clocks.rpaulo2013-07-312-1/+79
|
* The errata 727915 requires a different workaround for r2p0, we have tocognet2013-07-291-13/+26
| | | | explicitely clean/invalidate every cache line using way/set operations.
* Remove useless cache operations.cognet2013-07-291-5/+0
|
* Decouple yarrow from random(4) device.obrien2013-07-2939-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. * random(4) device doesn't really depend on rijndael-*. Yarrow, however, does. * Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah * Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones. * If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed. * Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one. Submitted by: arthurmesh@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: obrien
* Explicitely include <machine/pcb.h>, so that we get the definition ofcognet2013-07-291-0/+1
| | | | | | | struct pcb. Submitted by: Zbyszek Bodek <zbb@semihalf.com> Pointy hat to: cognet
* Define KDB_STOPPEDPCB, so that we can access the backtraces of threads runningcognet2013-07-292-0/+5
| | | | on other cores.
* Revert r253748,253749avg2013-07-281-3/+2
| | | | | | This WIP should not have been committed yet. Pointyhat to: avg
* put contents of cpu.h under _KERNELavg2013-07-281-2/+3
| | | | | | no userland-serviceable parts inside MFC after: 20 days
* Rename the existing std.imx and imx.files to std.imx51 and files.imx51, toian2013-07-283-2/+2
| | | | pave the way for adding imx6 support.
* Revert ROOTDEVNAME change from previous commit.rpaulo2013-07-251-1/+1
|
* Enable modules for the BeagleBone and for the Raspberry Pi.rpaulo2013-07-252-3/+1
|
* Start adding support to build bits of our code using the Thumb-2andrew2013-07-201-9/+26
| | | | | | | | | | | | | | | instruction set. Thumb-2 requires an if-then instruction to implement conditional codes. When building for ARM mode the it-then instructions do not generate any assembled instruction as per the ARMv7-A Architecture Reference Manual, and are safe to use. While this allows the atomic instructions to be built, it doesn't mean we fully support Thumb code. It works in small tests, but is still known to fail in a large number of places. While here add a check for the armv6t2 architecture.
* Fix vfp:andrew2013-07-161-16/+15
| | | | | | | | | - We should check is_d32 to see howmany registers we have - In vfp_restore mark vfpscr as an output register Without the second part it appears we can return the incorrect value from vfp_bounce if the VFP condition flags are set as it may override the register holding the return value.
* Move the Raspberry Pi low level options out of the kernel config and intorpaulo2013-07-153-12/+20
| | | | | | std.rpi + std.bcm2835. Reviewed by: imp
* Introduce new structure sfstat for collecting sendfile's statisticsae2013-07-151-1/+1
| | | | | | | and remove corresponding fields from struct mbstat. Use PCPU counters and SFSTAT_INC() macro for update these statistics. Discussed with: glebius
* Indent the "scp=... rlv=..." to make it easier to read the backtrace.rpaulo2013-07-131-2/+2
|
* Remove trailing whitespaces.ray2013-07-101-6/+6
|
* Improve a comment.rpaulo2013-07-091-4/+2
|
* Remove extraneous format string converison specifieremaste2013-07-091-1/+1
| | | | Submitted by: wxs@
* Add IDs for TPS65217C and TPS65217Dgonzo2013-07-081-0/+8
|
* - AM335x requires updated soft-reset logic toogonzo2013-07-081-4/+7
|
* Convert bcm2835_mbox to the new mbox interface.rpaulo2013-07-074-55/+63
| | | | Reviewed by: gonzo
* Another warning.rpaulo2013-07-071-1/+1
|
* armadaxp_idcache_wbinv_all() is in this file.rpaulo2013-07-071-1/+2
|
* Fix all the compiler warnings in elf_trampoline.c.rpaulo2013-07-071-4/+22
|
* - Add USFS driver as an example of device mode for AM335x-based devicesgonzo2013-07-071-0/+4
|
* - Add USBSS driver for AM335x SoC. Driver is a wrapper around Mentors Graphicgonzo2013-07-072-0/+482
| | | | USB OTG core.
* Don't clear the SYSCONFIG register on boot.rpaulo2013-07-062-2/+10
| | | | | | This follows section 18.4.2.2 SD Soft Reset Flow in the TI AM335x Technical Reference Manual and seems to fix the "ti_mmchs0: Error: current cmd NULL, already done?" messages.
* Fix the build with gcc.andrew2013-07-051-4/+20
| | | | | | | | | | Gcc outputs pre-UAL asm and expects the ldcl instruction with a condition in the form ldc<c>l, where the code produces the instruction in the UAL form ldcl<c>. Work around this by checking if we are using clang or gcc and adjusting the instruction. While here correct the cmp instruction's value to include the # before the immediate value.
* o Make fields names short.ray2013-07-051-33/+23
| | | | o Slim down reg fields comments.
* Add support for ePWM submodule of PWMSSgonzo2013-07-041-4/+145
| | | | | | | | | ePWM is controlled by sysctl nodes dev.am335x_pwm.N.period, dev.am335x_pwm.N.dutyA and dev.am335x_pwm.N.dutyB that controls PWM period and duty cycles for channels A and B respectively. Period and duty cycle are measured in clock ticks. Default clock frequency for AM335x PWM subsystem is 100MHz
* Remove redundant clearing of the PGA_WRITEABLE flag ingber2013-07-041-1/+0
| | | | | | | | | pmap_remove_all() This flag should already be cleared by pmap_nuke_pv() Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
OpenPOWER on IntegriCloud