#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
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 |
#
302064 |
|
21-Jun-2016 |
ian |
Revert the recent armv6 changes to ALIGNED_POINTER(), restoring the fully-pessimized implementation that requires a type to be aligned to its natural size.
On armv6+ the compiler might generate load-/store-multiple instructions which require 4-byte alignment even though the source code is only accessing individual uint32_t values in a way that doesn't require any particular alignment at all. The compiler apparently feels free to combine multiple accesses into a single instruction that requires a more-strict alignment, and no set of compiler flags seems to disable this behavior (at least in clang 3.8).
This fixes alignment faults on arm systems using wifi adapters. The wifi code uses ALIGNED_POINTER(p, uint32_t) to decide whether it needs to copy-align tcp headers. Because clang is combining several uint32_t accesses into a single ldm instruction, we need to say that accessing a uint32_t requires 4-byte alignment.
Approved by: re(gjb)
|
#
300701 |
|
25-May-2016 |
ian |
Disable alignment faults on armv6, adjust various alignment-related macros to match the new state of affairs. The hardware we support has always been able to do unaligned accesses, we've just never enabled it until now.
This brings FreeBSD into line with all the other major OSes, and should help with the growing volume of 3rd-party software that assumes unaligned access will just work on armv6 and armv7.
|
#
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
|
#
300324 |
|
20-May-2016 |
imp |
Remove hf appending code from param.h for machine arch name.
Submitted by: ian@ andyt@
|
#
295043 |
|
29-Jan-2016 |
skra |
Remove NPTEPG definition which is not used anywhere now after introduction of new pmap dump interface (r294722). And do not expose pt_entry_t type.
|
#
289372 |
|
15-Oct-2015 |
kib |
ARM userspace accessors, e.g. {s,f}uword(9), copy{in,out}(9), casuword(9) and others, use LDRT and STRT instructions to access memory with the privileges of userspace. If the *RT instruction faults on the kernel address, then additional checks must be done to not confuse the VM system with invalid kernel-mode faults.
Put ARM on line with other FreeBSD architectures and disallow usermode buffers which intersect with the kernel address space in advance, before any accesses are performed. In other words, vm_fault(9) is no longer called when e.g. suword(9) stores to invalid (i.e. not userspace) address.
Also, switch ARM to use fueword(9) and casueword(9).
Note: there is a pending patch in D3617, which adds the special processing for faults from LDRT and STRT. The addition of the processing is useful for potential other uses of the instructions and for completeness, but standard userspace accessors are better served by not allowing such faults beforehand.
Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3816 MFC after: 2 weeks
|
#
286584 |
|
10-Aug-2015 |
kib |
Make kstack_pages a tunable on arm, x86, and powepc. On i386, the initial thread stack is not adjusted by the tunable, the stack is allocated too early to get access to the kernel environment. See TD0_KSTACK_PAGES for the thread0 stack sizing on i386.
The tunable was tested on x86 only. From the visual inspection, it seems that it might work on arm and powerpc. The arm USPACE_SVC_STACK_TOP and powerpc USPACE macros seems to be already incorrect for the threads with non-default kstack size. I only changed the macros to use variable instead of constant, since I cannot test.
On arm64, mips and sparc64, some static data structures are sized by KSTACK_PAGES, so the tunable is disabled.
Sponsored by: The FreeBSD Foundation MFC after: 2 week
|
#
273783 |
|
28-Oct-2014 |
kib |
Add fueword(9) and casueword(9) functions. They are like fuword(9) and casuword(9), but do not mix value read and indication of fault.
I know (or remember) enough assembly to handle x86 and powerpc. For arm, mips and sparc64, implement fueword() and casueword() as wrappers around fuword() and casuword(), which means that the functions cannot distinguish between -1 and fault.
On architectures where fueword() and casueword() are native, implement fuword() and casuword() using fueword() and casuword(), to reduce assembly code duplication.
Sponsored by: The FreeBSD Foundation Tested by: pho MFC after: 2 weeks (ia64 needs treating)
|
#
269956 |
|
14-Aug-2014 |
imp |
From https://sourceware.org/ml/newlib/2014/msg00113.html By Richard Earnshaw at ARM > >GCC has for a number of years provides a set of pre-defined macros for >use with determining the ISA and features of the target during >pre-processing. However, the design was always somewhat cumbersome in >that each new architecture revision created a new define and then >removed the previous one. This meant that it was necessary to keep >updating the support code simply to recognise a new architecture being >added. > >The ACLE specification (ARM C Language Extentions) >(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html) >provides a much more suitable interface and GCC has supported this >since gcc-4.8. > >This patch makes use of the ACLE pre-defines to map to the internal >feature definitions. To support older versions of GCC a compatibility >header is provided that maps the traditional pre-defines onto the new >ACLE ones.
Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the couple of places in tree. clang already implements ACLE. Add a define that says we implement version 1.1, even though the implementation isn't quite complete.
|
#
263637 |
|
22-Mar-2014 |
andrew |
Simplify how we build MACHINE_ARCH. There are 3 options that may be set however only arm, armeb, armv6, and soon armv6hf will be used.
|
#
262958 |
|
09-Mar-2014 |
ian |
Remove all traces of support for ARM chips prior to the arm9 series. We 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.
|
#
262942 |
|
09-Mar-2014 |
ian |
Remove all dregs of a per-thread undefined-exception-mode stack. This is 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.
|
#
254918 |
|
26-Aug-2013 |
raj |
Introduce superpages support for ARMv6/v7.
Promoting base pages to superpages can increase TLB coverage and allow for efficient use of page table entries. This development provides FreeBSD/ARM with superpages management mechanism roughly equivalent to what we have for i386 and amd64 architectures.
1. Add mechanism for automatic promotion of 4KB page mappings to 1MB section mappings (and demotion when not needed, respectively).
2. Managed and non-kernel mappings are now superpages-aware.
3. The functionality can be enabled by setting "vm.pmap.sp_enabled" tunable to a non-zero value (either in loader.conf or by modifying "sp_enabled" variable in pmap-v6.c file). By default, automatic promotion is currently disabled.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf
|
#
250338 |
|
07-May-2013 |
attilio |
Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in order to match the MAXCPU concept. The change should also be useful for consolidation and consistency.
Sponsored by: EMC / Isilon storage division Obtained from: jeff Reviewed by: alc
|
#
248119 |
|
09-Mar-2013 |
andrew |
__FreeBSD_ARCH_armv6__ is undefined on clang. We can use __ARM_ARCH in it's place. This makes 'uname -p' correctly output 'armv6' on a kernel built with clang.
|
#
239268 |
|
15-Aug-2012 |
gonzo |
Merging projects/armv6, part 1
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
|
#
236992 |
|
13-Jun-2012 |
imp |
trim trailing whitespace
|
#
235072 |
|
06-May-2012 |
imp |
Fix the MACHINE_ARCH for big endian arm to be armeb.
|
#
224207 |
|
18-Jul-2011 |
attilio |
Add the possibility to specify from kernel configs MAXCPU value. This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU.
No MFC is previewed for this patch.
Tested by: pluknet Approved by: re (kib)
|
#
197316 |
|
18-Sep-2009 |
alc |
Add a new sysctl for reporting all of the supported page sizes.
Reviewed by: jhb MFC after: 3 weeks
|
#
196994 |
|
08-Sep-2009 |
phk |
Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating an architecture specific include file containing the _ALIGN* stuff which <sys/socket.h> needs.
|
#
195376 |
|
05-Jul-2009 |
sam |
Cleanup ALIGNED_POINTER: o add to platforms where it was missing (arm, i386, powerpc, sparc64, sun4v) o define as "1" on amd64 and i386 where there is no restriction o make the type returned consistent with ALIGN o remove _ALIGNED_POINTER o make associated comments consistent
Reviewed by: bde, imp, marcel Approved by: re (kensmith)
|
#
191309 |
|
20-Apr-2009 |
rwatson |
Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizing a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1]
Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2]
Suggested by: bde [1], jhb [2] MFC after: 2 weeks
|
#
191278 |
|
19-Apr-2009 |
rwatson |
Add description and cautionary note regarding CACHE_LINE_SIZE.
MFC after: 2 weeks Suggested by: alc
|
#
191276 |
|
19-Apr-2009 |
rwatson |
For each architecture, define CACHE_LINE_SHIFT and a derived CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available.
Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems).
MFC after: 2 weeks Discussed on: arch@
|
#
177661 |
|
27-Mar-2008 |
jb |
When building a kernel module, define MAXCPU the same as SMP so that modules work with and without SMP.
|
#
154128 |
|
09-Jan-2006 |
imp |
By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __.
Submitted by: bde, jhb, scottl, many others.
|
#
153168 |
|
06-Dec-2005 |
ru |
Drop _MACHINE_ARCH and _MACHINE defines (not to be confused with MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
|
#
137939 |
|
20-Nov-2004 |
cognet |
Get the kernel stack right now that the u-area is gone.
|
#
137919 |
|
20-Nov-2004 |
das |
Remove UAREA_PAGES and USPACE definitions. The definitions of USPACE_SVC_STACK_TOP, USPACE_SVC_STACK_BOTTOM, USPACE_UNDEF_STACK_TOP, and USPACE_UNDEF_STACK_BOTTOM look wrong to me, so I'm leaving them alone.
Reviewed by: arch@
|
#
137227 |
|
04-Nov-2004 |
cognet |
Decrease KSTACK_PAGES and UAREA_PAGES.
|
#
135660 |
|
23-Sep-2004 |
cognet |
Define STACKALIGNBYTES and STACKALIGN.
|
#
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.
|
#
103436 |
|
16-Sep-2002 |
peter |
Initiate deorbit burn for the i386-only a.out related support. Moves are under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that.
Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
|
#
96606 |
|
14-May-2002 |
phk |
Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
|
#
96604 |
|
14-May-2002 |
phk |
Remove the unused definitions of ctod() and dotc().
|
#
70651 |
|
04-Jan-2001 |
obrien |
StrongARM platform-specific definitions.
|