#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
300694 |
|
25-May-2016 |
ian |
Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't have ACLE support built in. The ACLE (ARM C Language Extensions) defines a set of standardized symbols which indicate the architecture version and features available. ACLE support is built in to modern compilers (both clang and gcc), but absent from gcc prior to 4.4.
ARM (the company) provides the acle-compat.h header file to define the right symbols for older versions of gcc. Basically, acle-compat.h does for arm about the same thing cdefs.h does for freebsd: defines standardized macros that work no matter which compiler you use. If ARM hadn't provided this file we would have ended up with a big #ifdef __arm__ section in cdefs.h with our own compatibility shims.
Remove #include <machine/acle-compat.h> from the zillion other places (an ever-growing list) that it appears. Since style(9) requires sys/types.h or sys/param.h early in the include list, and both of those lead to including cdefs.h, only a couple special cases still need to include acle-compat.h directly.
Loves it: imp
|
#
299069 |
|
04-May-2016 |
pfg |
sys/arm: Minor spelling fixes.
Only affects comments: no functional change.
|
#
292426 |
|
18-Dec-2015 |
adrian |
[intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c.
The ci20 port (by kan@) is going to reuse almost all of the intrng code since the SoC in question looks suspiciously like someone took an ARM SoC design and replaced the ARM core with a MIPS core.
* migrate out the code; * rename ARM_ -> INTR_; * rename arm_ -> intr_; * move the interrupt flush routine from intr.c / intrng.c into arm/machdep_intr.c - removing the code duplication and removing the ARM specific bits from here.
Thanks to the Star Wars: The Force Awakens premiere line for allowing me a couple hours of quiet time to finish the universe builds.
Tested:
* make universe
TODO:
* The structure definitions in subr_intr.c still includes machine/intr.h which requires one duplicates all of the intrng definitions in the platform code (which kan has done, and I think we don't have to.)
Instead I should break out the generic things (function declarations, common intr structures, etc) into a separate header.
* Kan has requested I make the PIC based IPI stuff optional.
|
#
291852 |
|
05-Dec-2015 |
andrew |
Move the check to see if we are tracing a function with the DTrace Function Boundary Trace to assembly to reduce the overhead of these checks.
Submitted by: Howard Su <howard0su@gmail.com> Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D4266
|
#
291153 |
|
22-Nov-2015 |
markj |
Remove unneeded includes of opt_kdtrace.h.
As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h is not needed when defining SDT(9) probes.
|
#
284115 |
|
07-Jun-2015 |
andrew |
Stop checking for ARM_TP_ADDRESS when we mean to check if building for ARMv6 or later.
|
#
283888 |
|
01-Jun-2015 |
andrew |
Remove __ARM_EABI__ from sys/arm/arm, building for oabi is unsupported.
|
#
283366 |
|
24-May-2015 |
andrew |
Remove trailing whitespace from sys/arm/arm
|
#
282779 |
|
11-May-2015 |
andrew |
Add the kernel support for Thumb-2. It is only supported on ARMv7 as the main ARMv6 target, the Raspberry Pi, doesn't support Thumb-2.
This as been tested with a Thumb-2 userland, however building one is currently unsupported as there are known toolchain issues breaking some binaries. Further work will also be needed to decide on the method of selecting which instruction set to build for, and to benchmark both to find how building everything as Thumb-2 will affect performance.
Relnotes: yes
|
#
279667 |
|
05-Mar-2015 |
andrew |
Add the MD parts of dtrace needed to use fbt on ARM. For this we need to emulate the instructions used in function entry and exit.
For function entry ARM will use a push instruction to push up to 16 registers to the stack. While we don't expect all 16 to be used we need to handle any combination the compiler may generate, even if it doesn't make sense (e.g. pushing the program counter).
On function return we will either have a pop or branch instruction. The former is similar to the push instruction, but with care to make sure we update the stack pointer and program counter correctly in the cases they are either in the list of registers or not. For branch we need to take the 24-bit offset, sign-extend it, and add that number of 4-byte words to the program counter. Care needs to be taken as, due to historical reasons, the address the branch is relative to is not the current instruction, but 8 bytes later.
This allows us to use the following probes on ARM boards: dtrace -n 'fbt::malloc:entry { stack() }' and dtrace -n 'fbt::free:return { stack() }'
Differential Revision: https://reviews.freebsd.org/D2007 Reviewed by: gnn, rpaulo Sponsored by: ABT Systems Ltd
|
#
278529 |
|
10-Feb-2015 |
gnn |
Initial version of DTrace on ARM32.
Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
|
#
276596 |
|
02-Jan-2015 |
ian |
Fix alignment directives in arm asm code after clang 3.5 import.
The ancient gas we've been using interprets .align 0 as align to the minimum required alignment for the current section. Clang's integrated assembler interprets it as align to a byte boundary. Fortunately both assemblers interpret a non-zero value as align to 2^N so just make sure we have appropriate non-zero values everywhere.
|
#
276206 |
|
25-Dec-2014 |
ian |
For data and instruction prefetch aborts, call the same handler in the C code, passing a 0/1 flag that indicates which type of abort it was. This sets the stage for unifying the handling of page faults in a single routine.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz
|
#
276197 |
|
25-Dec-2014 |
ian |
Oops, I fumbled a semicolon on the style changes; recover it.
|
#
276196 |
|
25-Dec-2014 |
ian |
Change the style of the DO_AST macro to match the others in this file -- semicolons between the code and comments instead of after the comments, and line continuations in the arbitrary but now consistant column 76.
No functional changes.
|
#
271398 |
|
10-Sep-2014 |
andrew |
Unify interrupts bit definition and usage. While here remove PSR_C_bit.
Submitted by: Svatopluk Kraus <onwahe at gmail.com>, Michal Meloun <meloun at miracle.cz> Differential Revision: https://reviews.freebsd.org/D754
|
#
269390 |
|
01-Aug-2014 |
ian |
Fix unwind-info errors in our hand-written arm assembler code.
We have functions nested within functions, and places where we start a function then never end it, we just jump to the middle of something else. We tried to express this with nested ENTRY()/END() macros (which result in .fnstart and .fnend directives), but it turns out there's no way to express that nesting in ARM EHABI unwind info, and newer tools treat multiple .fnstart directives without an intervening .fnend as an error.
These changes introduce two new macros, EENTRY() and EEND(). EENTRY() creates a global label you can call/jump to just like ENTRY(), but it doesn't emit a .fnstart. EEND() is a no-op that just documents the conceptual endpoint that matches up with the same-named EENTRY().
This is based on patches submitted by Stepan Dyatkovskiy, but I made some changes and added the EEND() stuff, so blame any problems on me.
Submitted by: Stepan Dyatkovskiy <stpworld@narod.ru>
|
#
263034 |
|
11-Mar-2014 |
ian |
Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Pass the right arguments to panic for the reset exception (which also should never happen).
|
#
263033 |
|
11-Mar-2014 |
ian |
No functional changes. Rewrite comments, use tabs consistantly, reorder some of the functions so that similar things are grouped together.
|
#
263030 |
|
11-Mar-2014 |
ian |
Remove some unnecessary indirection and jump right to the handler functions.
|
#
262997 |
|
11-Mar-2014 |
ian |
Revert r262994 for now, it fails to boot on armv5.
|
#
262995 |
|
11-Mar-2014 |
ian |
Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Now they're just inline code, and rewritten to use shorter instruction sequences.
|
#
262987 |
|
10-Mar-2014 |
ian |
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. 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
|
#
262986 |
|
10-Mar-2014 |
ian |
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.
|
#
262980 |
|
10-Mar-2014 |
ian |
Move the exception vector table (so-called "page0" data) into exception.S 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.
|
#
262979 |
|
10-Mar-2014 |
ian |
Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c 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.
|
#
262966 |
|
09-Mar-2014 |
ian |
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).
|
#
262950 |
|
09-Mar-2014 |
ian |
Make undefined exception entry MPSAFE.
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.
|
#
261393 |
|
01-Feb-2014 |
ian |
Update all arm code that manipulates the PSR registers to use modern syntax.
It turns out the version of gas we're using interprets the old '_all' mask as 'fc' instead of 'fsxc'. That is, "all" doesn't really mean "all".
This was the cause of the "wrong-endian register restore" bug that's been causing problems with some cortex-a9 chips. The 'endian' bit in the spsr register would never get changed (it falls into the 'x' mask group) and the first return-from-exception would fail if the chip had powered on with garbage in the spsr register that included the big-endian bit. It's unknown why this affected only certain cortex-a9 chips.
|
#
253985 |
|
06-Aug-2013 |
andrew |
We no longer need to align the stack before calling swi_handler as it is already aligned correctly in the PUSHFRAME macro.
|
#
252311 |
|
27-Jun-2013 |
andrew |
Add UNWINDSVCFRAME to provide the unwind pseudo ops to allow us to unwind past a trapframe.
Use this macro in exception_exit as it is the function the unwinder enters as the functions that store the frame setting lr to point to it.
|
#
250253 |
|
04-May-2013 |
ian |
Insert STOP_UNWINDING directives in the _start (kernel entry point) and 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.
|
#
248361 |
|
16-Mar-2013 |
andrew |
Add an END macro to ARM. This is mostly used to tell gas where the bounds of the functions are when creating the EABI unwind tables.
|
#
248123 |
|
10-Mar-2013 |
andrew |
Tell the unwinder we can't unwind swi_entry. This fixes an infinite loop when the kernel attempts to unwind through this function.
The .fnstart and .fnend in this function should be moved to macros but we are currently missing an END macro on ARM.
|
#
239032 |
|
04-Aug-2012 |
andrew |
Ensure we align the stack to 8 bytes in system calls.
This is not strictly required with the current ABI but will be when we switch to the ARM EABI. The aapcs requires the stack to be 4 byte aligned at all times and 8 byte aligned when calling a public subroutine where the current ABI only requires sp to be a multiple of 4.
|
#
236991 |
|
13-Jun-2012 |
imp |
Final whitespace trim.
|
#
178001 |
|
08-Apr-2008 |
kevlo |
Remove some long-dead code
Reviewed by: cognet
|
#
139735 |
|
05-Jan-2005 |
imp |
Start all license statements with /*-
|
#
137941 |
|
20-Nov-2004 |
cognet |
Remove useless code.
|
#
135649 |
|
23-Sep-2004 |
cognet |
Rename macroes, as we don't need to mess with alignment faults. Call ast() if TDF_NEEDRESCHED is set too, not just TDF_ASTPENDING.
|
#
130164 |
|
06-Jun-2004 |
phk |
Remove filename+line number from panic messages.
|
#
129198 |
|
14-May-2004 |
cognet |
Import FreeBSD/arm kernel bits. 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.
|