summaryrefslogtreecommitdiffstats
path: root/sys/arm/arm/swtch.S
Commit message (Collapse)AuthorAgeFilesLines
* MFC r280278, r280402:ian2015-05-231-6/+5
| | | | | | Allow to override default kernel virtual address assignment on ARM. Do not save/restore the TLS pointer on context switch for armv6.
* MFC r276187, r276190, r271422:ian2015-02-121-91/+37
| | | | | | | | | | Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function. Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping. Cleanup up ARM *frame structures.
* MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997,ian2014-05-171-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 263030, 263033, 263034, 263056, 263057, Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places. Remove all traces of support for ARM chips prior to the arm9 series. Make the default exception handler vectors point to where I thought they were already pointing: the default handlers (not a panic that says there is no default handler). Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S. Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code using it doesn't have to have an "AST_LOCALS" macro somewhere in the file. Arrange for arm fork_trampoline() to return to userland via the standard swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted. Remove some unnecessary indirection and jump right to the handler functions. Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Remove the unreferenced DATA() macro. Remove #include <machine/asmacros.h> from files that don't need it.
* MFC 257774, 256760, 262916, 262905, 262918, 262919, 262920, 262921, 262924,ian2014-05-171-80/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 262925, 262929, 262932, 262935, 262940, 262941, 262942, 262948, 262949, 262950 Strip arm/conf/DEFAULTS down to just items that are mandatory for running the architecture. Move all the files named foo/common.c to foo/foo_common.c Initial cut for DTS on the hl201 board. Add commented out dts for sam9260ek as well as early printf support. Make clock optional on uart nodes, then back it out ("I don't know what I was thinking, but it is lame.") Set the baud rate if it isn't 0 Make at91_soc_id() public. Properly round at91 resource on unmapping. Move AT91 AIC related stuff to own file. Fix another bug in multicast filtering. i.MX uses 6 bits from MSB in LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32. Follow r262916 with one more config file that references a renamed common.c Remove bogus AT91 define that causes compile errors. Most of the defines for SAM9X are going away soonish anyway (once FDT works), but until then... Remove all dregs of a per-thread undefined-exception-mode stack. Rework the VFP code that handles demand-based save and restore of state. Always call vfp_discard() on thread death. When a thread begins life it doesn't own the VFP hardware state on any cpu. Make undefined exception entry MP-safe.
* MFC r261414, r261415, r261417, r261418, r261419ian2014-05-151-18/+27
| | | | | | | | | | | | | Don't call device_set_ivars() for the mmchs Change the way pcpu and curthread are stored per-core Invalidate cachelines for bounce pages on PREREAD too, there may still be stale entries from a previous transfer. Only use the CPU ID register if SMP is defined. Some non-MPCore armv6 cpu, such as the one found in the RPi, don't have it, and just hang when we try to access it.
* MFC r258359, r258742, r258845, r259936, r259640ian2014-05-141-2/+2
| | | | | | | | | | | Apply access flags for managed and unmanaged pages properly on ARMv6/v7 Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write. Enable missing Access Flag for secondary cores on ARMv6/v7 Add identification and necessary type checks for Krait CPU cores.
* Add the frame information to cpu_switch to allow us to unwind out of it,andrew2013-08-251-0/+5
| | | | for example when dumping threads in the kernel debugger.
* Rename device vfp to option VFP and retire the ARM_VFP_SUPPORT option. Thisandrew2013-08-171-6/+6
| | | | | | | simplifies enabling as previously both options were required to be enabled, now we only need a single option. While here enable VFP on the PandaBoard.
* Remove the ARMFPE option. It is unsupported, and appears to be broken asandrew2013-08-171-9/+0
| | | | arm_fpe_core_changecontext is not a function.
* Insert STOP_UNWINDING directives in the _start (kernel entry point) andian2013-05-041-0/+1
| | | | | | | | | fork_trampoline (thread entry point) assembler routines, because it's not possible to unwind beyond those points. Also insert STOP_UNWINDING in the exception_exit routine, to prevent an unwind-loop at that point. This is just a stopgap until we get around to instrumenting all assembler functions with proper unwind metadata.
* Add an END macro to ARM. This is mostly used to tell gas where the boundsandrew2013-03-161-0/+6
| | | | of the functions are when creating the EABI unwind tables.
* Fix stack alignment in the kernel to be on an 8 byte boundary as requiredandrew2013-03-061-0/+5
| | | | by AAPCS.
* Only spin on the blocked_lock for SCHED_ULE+SMP, as it's done on the othercognet2013-01-151-0/+3
| | | | arches.
* Merging projects/armv6, part 1gonzo2012-08-151-60/+101
| | | | | | | | | Cummulative patch of changes that are not vendor-specific: - ARMv6 and ARMv7 architecture support - ARM SMP support - VFP/Neon support - ARM Generic Interrupt Controller driver - Simplification of startup code for all platforms
* Final whitespace trim.imp2012-06-131-5/+5
|
* Oops. ARM_RAS_END is ARM_TP_ADDRESS + 8, not 4.cognet2009-02-131-1/+1
| | | | Spotted out by: Mark Tinguely <tinguely at casselton d0t net>
* To prevent various race conditions in the RAS code, store and restore thecognet2009-02-121-4/+16
| | | | | | values in ARM_RAS_START and ARM_RAS_END at context switch time. MFC after: 1 week
* Eliminate flushing of L2 cache in ARM context switch routines.raj2008-10-161-8/+0
| | | | | | | With VIPT L2 cache such syncing not only is redundant, but also a performance penalty. Pointed out by: cognet
* Provide L2 cache synchronization (write back + invalidation) on ARM.raj2008-10-131-0/+8
| | | | | | | Note the cpu_l2cache_wbinv_* routines are no-ops on systems not populated with L2 caches. Obtained from: Marvell, Semihalf
* Store the PC while context switching, for the benefits of DDB.cognet2008-08-021-0/+1
|
* Improve ARM_TP_ADDRESS and RAS area.raj2008-02-051-2/+2
| | | | | | | | | | | | | | De-hardcode usage of ARM_TP_ADDRESS and RAS local storage, and move this special purpose page to a more convenient place i.e. after the vectors high page, more towards the end of address space. Previous location (0xe000_0000) caused grief if KVA was to go beyond the default limit. Note that ARM world rebuilding is required after this change since the location of ARM_TP_ADDRESS is shared between kernel and userland. Submitted by: Grzegorz Bernacki (gjb AT semihalf dot com) Reviewed by: imp Approved by: cognet (mentor)
* Do not use __XSCALE__ to detect if pld/strd/ldrd is available, usecognet2007-10-131-3/+3
| | | | | | _ARM_ARCH_5E instead. MFC After: 3 days
* Use the third argument of cpu_switch(), as done for i386/amd63, as it iscognet2007-08-071-6/+20
| | | | | | required for ULE. Approved by: re (blanket)
* Not only disable/enable interrupts, do it for FIQs as well, when needed.cognet2006-04-091-1/+1
|
* Remove a never reached RET.cognet2005-10-041-1/+0
|
* strd needs the destination to be double-word aligned, but the pointer passedcognet2005-10-041-6/+0
| | | | | to savectx isn't always, so always use stmia, savectx isn't called enough to need that kind of optimization.
* Implement savectx().cognet2005-10-031-0/+15
| | | | Obtained from: NetBSD
* Write back affected pages in pmap_qremove() as well. This removes the needcognet2005-05-241-1/+1
| | | | | | to change the DACR when switching to a kernel thread, thus making userland thread => kernel thread => same userland thread switch cheaper by totally avoiding data cache and TLB invalidation.
* Use [ldr|str]t instead of [ldr|str] when accessing ARM_TP_ADDRESS.cognet2005-03-061-4/+3
|
* In cpu_throw(), correctly calculate td->td_md.md_tp.cognet2005-03-011-2/+2
| | | | In cpu_switch(), set the DACR even if we're switching to a kernel thread.
* Instead of using sysarch() to store-retrieve the tp, add a magic address,cognet2005-02-261-1/+15
| | | | | | | | | | | ARM_TP_ADDRESS, where the tp will be stored. On CPUs that support it, a cache line will be allocated and locked for this address, so that it will never go to RAM. On CPUs that does not, a page is allocated for it (it will be a bit slower, and is wrong for SMP, but should be fine for UP). The tp is still stored in the mdthread struct, and at each context switch, ARM_TP_ADDRESS gets updated. Suggested by: davidxu
* Start all license statements with /*-imp2005-01-051-2/+2
|
* Update the sp after popping the regs.cognet2004-12-141-1/+1
| | | | This is a good candidate for the golden pointy hat awards.
* Save a few more cycles in cpu_switch() and cpu_throw().cognet2004-12-121-29/+24
|
* Do not change the page directory and do not flush the TLB when switching tocognet2004-12-051-26/+6
| | | | a kernel thread.
* Set the frame pointer to 0 in fork_trampoline().cognet2004-11-211-0/+1
|
* Use the RET macro.cognet2004-11-091-2/+1
|
* Remove useless code.cognet2004-11-071-14/+0
|
* Save a few cycles in context switch.cognet2004-11-051-90/+36
| | | | Update comments to reflect reality.
* Remove dead code.cognet2004-09-281-3/+0
|
* Implement cpu_throw().cognet2004-09-231-96/+105
| | | | Obtained from: NetBSD
* Import FreeBSD/arm kernel bits.cognet2004-05-141-0/+543
It only supports sa1110 (on simics) right now, but xscale support should come soon. Some of the initial work has been provided by : Stephane Potvin <sepotvin at videotron.ca> Most of this comes from NetBSD.
OpenPOWER on IntegriCloud