summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Use armv7 TLB flush code, not arm11, for cortex-a processors.ian2014-03-161-5/+9
| | | | | | | | | The armv7 architecture uses a unified TLB model for maintenence ops even if separate instruction and data TLBs are implemented in hardware. That means that there's no distinction between the 'I' and 'D' flavors of flush, they all use the same 'ID' implementation. On the other hand, there is a difference between SMP and UP on armv7, but not on arm11, so use the armv7 routines for cortex-a processors.
* Use the same terminology as the ARM docs in comments. No functional changes.ian2014-03-161-5/+5
|
* Make all the comments '# ' and align to same column. This fixes theimp2014-03-1646-1735/+1734
| | | | | rampently incosnsitent usage which made cut and paste from one file to another look ugly.
* Update kernel inclusions of capability.h to use capsicum.h instead; somerwatson2014-03-161-1/+1
| | | | | | | | further refinement is required as some device drivers intended to be portable over FreeBSD versions rely on __FreeBSD_version to decide whether to include capability.h. MFC after: 3 weeks
* Fix wandboard to include tmpfs, mbr and bsd labels.imp2014-03-151-0/+3
| | | | | PR: 187606 Submitted by: Takanori Sawada
* Delete stray clause 3 (Advertising clause) and renumber while i'mimp2014-03-111-5/+1
| | | | | | here. Approved by: alc@
* Remove #include <machine/asmacros.h> from files that don't need it.ian2014-03-114-4/+1
|
* Remove the unreferenced DATA() macro. That leaves only GET_CURTHREAD_PTR()ian2014-03-111-26/+8
| | | | | | | which was added by cognet in 2012, so remove the no-longer-applicable license stuff that referred to all the old contents, and put in a standard 2-clause BSD license (to cover the 6 lines of useful code left in here).
* Remove clause 3 (advertising clause), per regent's letter.imp2014-03-111-5/+1
|
* Use panic rather than printf to "handle" an arm26 address exceptionian2014-03-111-6/+5
| | | | | (should never happen on arm32). Pass the right arguments to panic for the reset exception (which also should never happen).
* No functional changes. Rewrite comments, use tabs consistantly, reorderian2014-03-111-159/+141
| | | | some of the functions so that similar things are grouped together.
* Remove some unnecessary indirection and jump right to the handler functions.ian2014-03-111-36/+3
|
* Revert r262994 for now, it fails to boot on armv5.ian2014-03-111-37/+83
|
* Now that the PUSHFRAME and PULLFRAME macros are used only in the swiian2014-03-111-83/+37
| | | | | entry/exit code, they don't need to be macros. Now they're just inline code, and rewritten to use shorter instruction sequences.
* Arrange for arm fork_trampoline() to return to userland via the standardian2014-03-103-223/+228
| | | | | | | swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. That means that now all references to the PUSH/PULLFRAME and DO_AST macros are localized to exception.S, so move the macros themselves into there and remove them from asmacros.h
* Change the way the asm GET_CURTHREAD_PTR() macro is defined so that codeian2014-03-103-10/+4
| | | | using it doesn't have to have an "AST_LOCALS" macro somewhere in the file.
* Move the exception vector table (so-called "page0" data) into exception.Sian2014-03-104-124/+74
| | | | | | | | | | | | | | and eliminate vectors.S. All low-level exception handling is now consolidated into exception.S. Along with moving the default FIQ handler, change it to disable FIQs before returning. An FIQ should never happen, but if it does, it's got to be disabled as part of ignoring it. In general, we have hand-wavy support for FIQs that probably hasn't been used for 10 years and probably doesn't work (almost certainly doesn't work for SMP because it only updates the vector on the current cpu). This change doesn't really make the overall situation any better or worse.
* Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.cian2014-03-1026-145/+18
| | | | | | | | and the functionality it provided into arm/exception.S. Rename the main irq handling routine from arm_handler_execute() to arm_irq_handler() to make it more congruent with how other exception handlers are named, and also update its signature to reflect what has long been reality: it is passed just a trapframe pointer, no interrupt number argument.
* Make the default exception handler vectors point to where I thought theyian2014-03-101-18/+2
| | | | | were already pointing: the default handlers (not a panic that says there is no default handler).
* Remove all traces of support for ARM chips prior to the arm9 series. Weian2014-03-0938-5331/+25
| | | | | | | never actually ran on these chips (other than using SA1 support in an emulator to do the early porting to FreeBSD long long ago). The clutter and complexity of some of this code keeps getting in the way of other maintenance, so it's time to go.
* The arm exception entry points currently vector through a function pointerian2014-03-0911-83/+0
| | | | | | | | to the actual handler routine. All the pointers are static-intialized to the only handlers available, and yet various platform-specific inits still set those pointers (to the values they're already initialized to). Begin to drain the swamp by removing all the redundant external declarations and runtime setting of the pointers that's scattered around various places.
* Make undefined exception entry MPSAFE.ian2014-03-092-36/+14
| | | | | | | | | | | | | | The old code used static storage to preserve a couple registers while setting up the trapframe for the main handler. Doing so was the last leftover crumbs from the days when a low-level debugger was hooked into the exception entry code. Now the exception entry sequence is essentially the same as for the other exceptions, which still involves needlessly indirecting through a function pointer which points to the same code on every platform. Removing that indirection will be handled as a separate cleanup. This work is based on an analysis by Juergen Weiss.
* When a thread begins life it doesn't own the VFP hardware state on any cpu.ian2014-03-092-0/+2
|
* Always call vfp_discard() on thread death, not just when the VFP isian2014-03-093-15/+14
| | | | | | | | | enabled. In vfp_discard(), if the state in the VFP hardware belongs to the thread which is dying, NULL out pcpu fpcurthread to indicate the state currently in the hardware belongs to nobody. Submitted by: Juergen Weiss Pointy hat to: me
* Remove all dregs of a per-thread undefined-exception-mode stack. This isian2014-03-096-36/+2
| | | | | | | | | | | | | | | | | | a leftover from the days when a low-level debugger had hooks in the undefined exception vector and needed stack space to function. These days it effectively isn't used because we switch immediately to the svc32 mode stack on exception entry. For that, the single undef mode stack per core that gets set up at init time works fine. The stack wasn't necessary but it was harmful, because the space for it was carved out of the normal per-thread svc32 stack, in effect cutting that 8K stack in half. If svc32 mode used more than 4k of stack space it wandered down into the undef mode stack, and then an undef exception would overwrite a couple words on the stack while switching to svc32 mode, corrupting the scv32 stack. Having another stack abut the bottom of the svc32 stack also effectively mooted the guard page below the stack. This work is based on analysis and patches submitted by Juergen Weiss.
* Rework the VFP code that handles demand-based save and restore of state.ian2014-03-095-164/+102
| | | | | | | | | | | | | | | | | | | The old code was full of complexity that would only matter if the kernel itself used the VFP hardware. Now that's reduced to either killing the userland process or panicking the kernel on an illegal VFP instruction. This removes most of the complexity from the assembler code, reducing it to just calling the save code if the outgoing thread used the VFP. The routine that stores the VFP state now takes a flag that indicates whether the hardware should be disabled after saving state. Right now it always is, but this makes the code ready to be used by get/set_mcontext() (doing so will be addressed in a future commit). Remove the arm-specific pc_vfpcthread from struct pcpu and use the MI field pc_fpcurthread instead. Reviewed by: cognet
* Remove bogus define that causes compile errors. Most of the definesimp2014-03-091-1/+0
| | | | | for SAM9X are going away soonish anyway (once FDT works), but until then...
* Follow r262916 with one more config file that references a renamed common.cian2014-03-091-1/+1
|
* Move AIC related stuff to own file.imp2014-03-088-66/+203
|
* Properly round on unmapping.imp2014-03-081-1/+5
|
* Make at91_soc_id() public.imp2014-03-082-1/+2
|
* Add commented out dts for sam9260ek as well as early printf support.imp2014-03-081-0/+10
|
* Move all the files named foo/common.c to foo/foo_common.c, asimp2014-03-0820-16/+16
| | | | | | appropriate for each of the 'foo' in the tree. This will allow us to compile them together (although symbol conflicts prevent us from doing that today, this just fixes the file name collision).
* Strip arm/conf/DEFAULTS down to just items that are mandatory for runningian2014-03-0747-5/+139
| | | | | | | the architecture. Move the other contents into each of the individual config files. Requested by: imp
* Fix the arm sys_sigreturn(): its argument is a struct ucontext, not aian2014-03-073-7/+8
| | | | | | | | | | | | | | struct sigframe containing the struct ucontext. The signal trampoline return code on the other hand DOES have just a struct sigframe on the stack to work with, so have it get a pointer to the ucontext out of there to pass along to sys_sigreturn. In other words, make everything work right whether sys_sigreturn is invoked from the trampoline or from userland code calling sigreturn(2). Submitted by: Takashi Komatsu <komatsu.taka@jp.panasonic.com> Reviewed by: cognet
* - Export panel info to DTSbr2014-03-071-13/+121
| | | | | - Reset all the layers before setup first one - Enable display
* Add driver for Port control and interrupts (PORT).br2014-03-074-33/+299
| | | | | PORT is responsible for external interrupts management, so move IRQ lines from GPIO driver.
* Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configsian2014-03-0711-10/+3
| | | | | that have it individually. Concensus on freebsd-arm@ is that it should be included in all ARM kernels.
* When calculating the MPU freq, make sure not to overflow by using a uint64_t.cognet2014-03-061-1/+1
| | | | | PR: arm/187223 Submitted by: Svatopluk Kraus <onwahe@gmail.com>
* Use the standard __used macro instead of a bare __attribute__.ian2014-03-031-2/+1
| | | | Submitted by: bde
* Add EMAC and SRAM controller entries to FDT.ganbold2014-03-034-0/+8
| | | | | | | Add EMAC device to kernel config files and enable EMAC, SRAM drivers for build. Approved by: stas (mentor)
* Add EMAC 10/100 Ethernet controller driver for A10/A20.ganbold2014-03-032-0/+1391
| | | | | | | | | | | | It is available mostly in A10 devices like Hackberry, Marsboard, Mele A1000, A2000, A100 HTPC, cubieboard1 and A20 device like cubieboard2. TX performance can be improved using both channels 0 and 1. RX performance is poor and needs improvement with the assistance of external DMA controller in case there is bulk TCP receiver. Reviewed by: yongari@ Approved by: stas (mentor)
* Add Static Random Access Memory controller driver for A10/A20.ganbold2014-03-032-0/+168
| | | | | | | A10/A20's SRAM is used by devices, such as CPU, EMAC, for extra fast memory or as cache. Approved by: stas (mentor)
* Add gpio and clock bits for A10/A20's EMAC ethernet controller driver, such as:ganbold2014-03-034-2/+76
| | | | | | | - EMAC gpio configuration - EMAC clock activation Approved by: stas (mentor)
* Add __attribute__((used)) so that the delay implementation doesn't getian2014-03-021-0/+1
| | | | | optimized away as unreferenced, causing linker errors when trying to resolve the weak reference to the missing function.
* Add a tunable to set the number of active cores, and enable SMP by default.ian2014-03-022-3/+11
|
* tcb device for fdtimp2014-02-281-0/+105
|
* shdwc device for fdtimp2014-02-281-0/+105
|
* Add device node for SDRAMC device. Currently just claims device'simp2014-02-281-0/+105
| | | | resources.
* Add an armv7 implementation of cpu_sleep(). The arm11/armv6 implementationian2014-02-283-1/+8
| | | | | | we've been using was actually just spinning due to ARM having redefined the old 'wait for interrupt' operation via the system coprocessor as a nop and replacing it with a WFI instruction.
OpenPOWER on IntegriCloud