369843 |
23-May-2021 |
otis |
rpi_ft5406: Recognize raspberrypi,firmware-ts touchscreen
- Recognize raspberrypi,firmware-ts touchscreen - Move the driver from ofwbus to simplebus
Reviewed by: manu MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30169
(cherry picked from commit c2c9ef3cedf6d83bdf27308e9e022658cc9b2a08)
Git Hash: c988a558fafe7a361e448c26254d4832ec3fd1ff Git Author: otis@FreeBSD.org |
367457 |
07-Nov-2020 |
dim |
MFC r344855 (by jhb):
Drop "All rights reserved" from my copyright statements.
Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D19485 |
360659 |
05-May-2020 |
dim |
Fix-up for arm, armeb and armv6 builds erroring after r360658, with:
In file included from /usr/src/contrib/compiler-rt/lib/builtins/clear_cache.c:26: /usr/obj/arm.armv6/usr/src/tmp/usr/include/machine/sysarch.h:95:22: error: unknown type name 'u_int' int arm_sync_icache (u_int addr, int len); ^
MFC r349887 (by ian):
De-pollute arm's sysarch.h.
Instead of including stdint.h for uintptr_t, include sys/_types.h and use __types for everything that isn't a native C keyword type.
Remove the #include of cdefs.h. It appears after the include of armreg.h which has a precondition of cdefs.h being included before it, so everyone including sysarch.h is already including cdefs.h. (When armv5 support goes away, there will be no need include armreg.h here either.)
Unfortunately, the unprefixed struct member names "addr" and "len" cannot be changed, because 3rd-party software is relying on them (libcompiler_rt is one known consumer). |
358591 |
03-Mar-2020 |
dim |
MFC r358407:
Merge r358406 from the clang1000-import branch:
Fix the following -Werror warning from clang 10.0.0:
sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (val & CPUV7_CT_CTYPE_RA) ^ sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here if (val & CPUV7_CT_CTYPE_WB) ^
This was due to an accidentally inserted tab before the if statement. |
356110 |
27-Dec-2019 |
kevans |
MFC r355936, r356045: remove unused kbd drivers
r355936: Kill off dummy kbd drivers
As far as I can tell, these are an artifact of times when linker sets couldn't be empty, otherwise the kernel build would fail due to unresolved symbols. hselasky fixed this in r268138, and I've audited the kbd portions to make sure nothing would blow up due to the empty linker set and successfully compiled+ran a kernel with no keyboard support at all.
Kill them off now since they're no longer required.
r356045: terasic_mtl: kill off final dummy keyboard driver
The rest were removed in r355936, which speculated that the cause of this phenomenon was due to an inability to have an empty linker set. The comment included with this one shows that this was, in fact, not the reason.
Regardless, syscons no longer seems to have an issue with not having any keyboard drivers and in-fact ignores the keyboard probe anyways. |
356064 |
24-Dec-2019 |
loos |
MFC r320001 by zbb:
Fix typo in "Marvell" string
Change Marwell to Marvell
Pointed out by: Ravi Pokala <rpokala@mac.com> Sponsored by: Rubicon Communications, LLC (Netgate) |
356021 |
22-Dec-2019 |
kevans |
MFC r355932: VERSATILEPB: also use default get_fkeystr/diag
In head/, this config was broken from the defaulting commits, but in stable branches we left the genkbd_* defaults exposed. Do this anyways. |
356020 |
22-Dec-2019 |
kevans |
MFC r355206, r355212, r355257, r355271: tty nits
r355206: tty_pts: don't rely on tty header pollution for sys/mutex.h r355212: tty_rel_gone: add locking assertion r355257: usb: remove some extraneous tty.h includes r355271: Remove more needless <sys/tty.h> includes |
356013 |
22-Dec-2019 |
kevans |
MFC r355796-r355797, r355799: kbd: defaults for get_fkeystr/diag
The genkbd version of these remains exposed for stable branches, but keyboard drivers that just want to use the defaults can simply not provide their own. There shouldn't be any unset in the wild.
r355796: kbd: provide default implementations of get_fkeystr/diag
Most keyboard drivers are using the genkbd implementations as it is; formally use them for any that aren't set.
r355797: chrome_kb: remove default get_fkeystr/diag implementations
This file was missed in r355796, but no harm would have come from this.
r355799: kbd: patch linker set methods, too
This is needed after r355796. Some double-registration of kbd drivers needs to be sorted out, then this sysinit will simply add these drivers into the normal list and kill off any other bits in the driver that are aware of the linker set, for simplicity. |
356012 |
22-Dec-2019 |
kevans |
MFC r355793: kbd drivers: use kbdd_* indirection for diag invocation |
355346 |
03-Dec-2019 |
kevans |
MFC rarm: correct kernelstack allocation size
This appears to be a copy-pasto from previous lines that propagated to v6 over the years. Indeed, nothing references kernelstack beyond USPACE_SVC_STACK_TOP and it would be odd if anything did. |
352023 |
07-Sep-2019 |
imp |
MFC: r351429, r351430, r351485, r351497, r351498
All changes related to disabling Werror on stable/11 to ease MFCs now that we've disabled them in head. |
351675 |
02-Sep-2019 |
emaste |
MFC r351618, r351619: exynos5: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect Sponsored by: The FreeBSD Foundation |
347072 |
03-May-2019 |
peterj |
MFC: r346266 Specify correct Ethernet phy for RPI-B
Approved by: grog, jhb (mentors) |
347070 |
03-May-2019 |
peterj |
MFC: r346265 Fix cpufreq(4) on RPI-B
Approved by: grog, jhb (mentors) |
346561 |
22-Apr-2019 |
ian |
MFC r346312:
Only set up the interrupts that will actually be used in arm generic_timer.
The code previously set up interrupt handlers for all the interrupt resources available, including for timers that are not in use. That could lead to interrupt storms. For example, if boot firmware enabled the virtual timer but the kernel is using the physical timer, it could get flooded with interrupts on the virtual timer which it cannot shut off. By only setting up an interrupt handler for the hardware that will actually be used, any interrupts from other timer units will remain masked in the interrupt controller.
Differential Revision: https://reviews.freebsd.org/D19871 |
346558 |
22-Apr-2019 |
ian |
MFC r345000:
Mark the imx_spi device busy while transfers are in progress, so that the module can't be unloaded while interrupts are pending. |
346553 |
22-Apr-2019 |
ian |
MFC r342652:
Support the SPI mode and bus clock frequency parameters set by the devices requesting SPI transfers.
Reported by: SAITOU Toshihide <toshi@ruby.ocn.ne.jp> |
346552 |
22-Apr-2019 |
ian |
MFC r344267:
Add a compatible string to match recent changes in the upstream dts. |
346551 |
22-Apr-2019 |
ian |
MFC r342850:
Add a missing \n to a bootverbose printf. |
346547 |
22-Apr-2019 |
ian |
MFC r336137-r336138, r336202, r336214, r336216
r336137: Add a manpage for the imx_spi driver.
r336138: Add pnp info to the imx_spi driver.
r336202: Enhancements and fixes for the spigen(4) driver...
- Resources used by spigen_mmap_single() are now tracked using devfs_set_cdevpriv() rather than in the softc.
- Since resources are now tracked per-open-fd, there is no need to try to impose any exclusive-open logic, so flags related to that are removed.
- Flags used to track open status to prevent detach() when the device is open are replaced with calls to device_busy()/device_unbusy(). That extends the protection up the hierarchy so that the spibus and hardware controller drivers also can't be detached while the device is open/in use.
- Arbitrary limits on the maximum size of a transfer are removed, along with the sysctl variables that allowed the limits to be changed. There is just no reason to limit the size of a spi transfer to the machine's page size. Or to any other arbitrary value, really.
- Most of the locking is removed. It was mostly protecting access to flags and fields in the softc that no longer exist. The locking that remains is just to prevent concurrent calls to device_[un]busy().
- The code was calling malloc() with M_WAITOK while holding a mutex in several places. Since most of the locking is gone, that's fixed.
r336214: Add various spi devices to NOTES.
r336216: Actually build and install the spigen.4 manpage. |
346526 |
22-Apr-2019 |
ian |
MFC r336094, r336096
r336094: Catch up with improvements in RTC handling... It's no longer necessary to ignore the timestamp passed in to settime() due to inaccuracy, the core routines now pass in a nanosecond-accurate time freshly-obtained before calling each driver's settime() method. Also, add calls to the new debugging output helpers.
r336096: Make the imx6_snvs driver usable as a module, add pnp info. Add a manpage. |
346525 |
22-Apr-2019 |
ian |
MFC r336079:
Add pnp info to imx6_ahci, and add a module makefile, and a manpage for it. |
346524 |
22-Apr-2019 |
ian |
MFC r333073-r333074
r333073 by manu: arm: Fix duplicate ahci DRIVER_MODULE
Name each ahci driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/ahci from kernel; already loaded from kernel
r333074 by manu: arm: Fix duplicate ehci DRIVER_MODULE
Name each ehci driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/ehci from kernel; already loaded from kernel |
346522 |
22-Apr-2019 |
ian |
MFC r336070, r336072-r336073, r336076
r336070: Add pnp info and a module makefile for the imx_wdog watchdog driver.
r336072: Correctly calculate the value to put in the imx wdog countdown register.
The correct value is seconds*2-1. The code was using just seconds*2, which led to being off by a half-second -- usually not a big deal, except when the value was the max (128) it overflowed so zero would get written to the countdown register, which equates to a timeout of a half second.
r336073: Add support to the imx watchdog for the FDT "timeout-sec" property, by automatically initializing the watchdog using the given value. Also, attach at BUS_PASS_TIMER to extend watchdog protection to more of the kernel init process.
r336076: Add a manpage for the imx5/6 watchdog driver. |
346520 |
22-Apr-2019 |
ian |
MFC r335982, r335985, r335988-r335989
r335982: Fix an out-of-bounds array access... the irq data for teardown is in two arrays, as elements 0 and 1 of one array and elements 1 and 2 of the other. Run the loop 0..1 instead of 1..2 and use named constants to offset into one of the arrays.
PR: 229508
r335985: Remove a test and early-out which just can't possibly be right. It causes detach() to do nothing if attach() succeeded, which is the opposite of what's needed. Also, move device_delete_children() from the end to the beginning of detach(), so that children won't be trying to make use of the hardware we're in the process of shutting down.
PR: 229510
r335988: Add a missing call to usb_bus_mem_free_all() when detaching.
r335989: Detach all children before beginning to tear down the hardware, instead of doing it last. Also, remove the local tracking of whether usb's busdma memory allocation got done, because it's safe to call the free_all function even if it wasn't. |
346519 |
22-Apr-2019 |
ian |
MFC r335594:
Retrieve the bus clock speed and mode (polarity/phase) from the child device and set up the hardware accordingly on each transfer. This replaces the old configuration done via sysctl, and allows both fdt configuration data and userland control via the spigen device to work.
Submitted by: Bob Frazier Differential Revision: https://reviews.freebsd.org/D15031 |
346397 |
19-Apr-2019 |
bz |
MFC r345757:
Improve debugging options in bcm2835_sdhci.c
Similar to bcm2835_sdhost.c add a TUNABLE and SYSCTL to selectively turn on debugging printfs if debugging is turned on at compile time. |
346296 |
16-Apr-2019 |
dim |
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 8.0.0 final release r356365.
MFC r306265 (by emaste):
Force LLVM_LIBUNWIND off if we don't have a C++11 compiler
Tested by: bde Differential Revision: https://reviews.freebsd.org/D7746
MFC r308100 (by emaste):
compile libunwind c source with -fexceptions
When an exception is thrown the unwinder must unwind its own C source (starting with _Unwind_RaiseException in UnwindLevel1.c), so it needs to be built with unwinding data.
MFC r324998 (by bdrewery):
Prefix {TARGET,BUILD}_TRIPLE with LLVM_ to avoid Makefile.inc1 collision.
The Makefile.inc1 TARGET_TRIPLE is for specifying which -target is used during the build of world.
Reviewed by: dim, imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12792
MFC r329093 (by emaste):
Promote llvm-cov to a standalone option
Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV. It is intended to provide a superset of the interface and functionality of gcov.
It is enabled by default when building Clang, similarly to gcov and GCC.
This change moves one file in libllvm to be compiled unconditionally. Previously it was included only when WITH_CLANG_EXTRAS was set, but the complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not worth avoiding a tiny increase in build time.
Reviewed by: dim, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D142645
MFC r331244 (by jhb):
Add support for MIPS to LLVM's libunwind.
This is originally based on a patch from David Chisnall for soft-float N64 but has since been updated to support O32, N32, and hard-float ABIs. The soft-float O32, N32, and N64 support has been committed upstream. The hard-float changes are still in review upstream.
Enable LLVM_LIBUNWIND on mips when building with a suitable (C+11-capable) toolchain. This has been tested with external GCC for all ABIs and O32 and N64 with clang.
Reviewed by: emaste Obtained from: CheriBSD (original N64 patch) Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D14701
MFC r336691 (by emaste):
llvm: remove __FreeBSD_version conditionals
All supported FreeBSD build host versions have backtrace.h, so we can just eliminate that test. For futimes() we can test the compiler's built-in __FreeBSD__ major version rather than relying on including osreldate.h. This should reduce the frequency with which Clang gets rebuilt when building world.
Reviewed by: dim Sponsored by: The FreeBSD Foundation
MFC r337379 (by andrew):
Default to armv5te in LINT on arm. This should fix building LINT there.
MFC r337552:
Add optional LLVM BPF target support
BPF (eBPF) is an independent instruction set architecture which is introduced in Linux a few years ago. Originally, eBPF execute environment was only inside Linux kernel. However, recent years there are some user space implementation (https://github.com/iovisor/ubpf, https://doc.dpdk.org/guides/prog_guide/bpf_lib.html) and kernel space implementation for FreeBSD is going on (https://github.com/YutaroHayakawa/generic-ebpf).
The BPF target support can be enabled using WITH_LLVM_TARGET_BPF, as it is not built by default.
Submitted by: Yutaro Hayakawa <yhayakawa3720@gmail.com> Reviewed by: dim, bdrewery Differential Revision: https://reviews.freebsd.org/D16033
MFC r337585:
In r308100, an explicit -fexceptions flag was added for the C sources from LLVM's libunwind, which end up in libgcc_eh.a and libgcc_s.so. This is because the unwinder needs the unwinder data for its own functions.
However, for the C++ sources in libunwind, -fexceptions is already the default, and this can have the side effect of generating a reference to __gxx_personality_v0, the so-called personality function, which is normally provided by the C++ ABI library (libcxxrt or libsupc++).
If the reference ends up in the eventual libgcc_s.so, linking any non-C++ programs against it will fail with "undefined reference to `__gxx_personality_v0'".
Note that at high optimization levels, the reference is usually optimized away, which is why we have never noticed this problem before.
With clang 7.0.0 though, higher optimization levels don't help anymore, since the addition of address-significance tables [1] in <https://reviews.llvm.org/rL337339>. Effectively, this always causes a reference to __gxx_personality_v0.
After discussion with the upstream author of that change, it turns out that we should compile libunwind sources with the -fno-exceptions -funwind-tables flags instead. This ensures unwind tables are generated, but no references to any personality functions are emitted.
[1] https://lists.llvm.org/pipermail/llvm-dev/2018-May/123514.html
Reported by: jbeich PR: 230399
MFC r340287 (by emaste):
Consolidate gcov entries in OptionalObsoleteFiles
Sponsored by: The FreeBSD Foundation
MFC r340289 (by emaste):
llvm-cov: also install as gcov (if GNU gcov is disabled)
llvm-cov provides a gcov-compatible interface when invoked as gcov.
Reviewed by: dim, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17923
MFC r340296 (by emaste):
Move llvm-profdata build into MK_LLVM_COV block
llvm-profdata is used with llvm-cov for code coverage (although llvm-cov can also operate independently in a gcov-compatible mode). Although llvm-profdata can be used independently of llvm-cov it makes sense to group these under one option.
Also handle these in OptionalObsoleteFiles.inc while here.
Sponsored by: The FreeBSD Foundation
MFC r340300 (by emaste):
libllvm: Move SampleProfWriter to SRCS_MIN
It is required by llvm-profdata, now built by default under the LLVM_COV knob. The additional complexity that would come from avoiding building it if CLANG_EXTRAS and LLVM_COV are both disabled is not worth the small savings in build time.
Sponsored by: The FreeBSD Foundation
MFC r340972 (by emaste):
llvm-objdump: initial man page
Based on llvm-objdump's online documentation and usage information. This serves as a starting point; additional detail and cleanup still required.
Also being submitted upstream in LLVM review D54864. I expect to use this bespoke copy while we have LLVM 6.0 or 7.0 in FreeBSD; when we update to LLVM 8.0 it should be upstream and we will switch to it.
PR: 233437 Reviewed by: bcr (man formatting) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18309
MFC r340973 (by emaste):
llvm-objdump.1: remove invalid options
Some options appear in llvm-objdump's usage information as a side effect of its option parsing implementation and are not actually llvm-objdump options. Reported in LLVM review https://reviews.llvm.org/D54864.
Reported by: Fangrui Song Sponsored by: The FreeBSD Foundation
MFC r340975 (by emaste):
llvm-objdump.1: fix igor / mandoc -Tlint warnings
Accidentally omitted from r340972.
MFC r341055 (by emaste):
llvm-objdump.1: remove more unintentional options
Some options come from static constructors in LLVM libraries and are automatically added to llvm's usage output. They're not really supposed to be llvm-objdump options.
Reported by: Fangrui Song in LLVM review D54864 Sponsored by: The FreeBSD Foundation
MFC r344779:
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to the upstream release_80 branch r355313 (effectively, 8.0.0 rc3). The release will follow very soon, but no more functional changes are expected.
Release notes for llvm, clang and lld 8.0.0 will soon be available here: <https://releases.llvm.org/8.0.0/docs/ReleaseNotes.html> <https://releases.llvm.org/8.0.0/tools/clang/docs/ReleaseNotes.html> <https://releases.llvm.org/8.0.0/tools/lld/docs/ReleaseNotes.html>
PR: 236062 Relnotes: yes
MFC r344798 (by emaste):
libllvm: promote WithColor and xxhash to SRCS_MIN
The armv6 build failed in CI due to missing symbols (from these two source files) in the bootstrap Clang.
This affected only armv6 because other Clang-using archs are using LLD as the bootstrap linker, and thus include SRCS_MIW via LLD_BOOTSTRAP.
Reported by: CI, via lwhsu Sponsored by: The FreeBSD Foundation
MFC r344825:
Add a few missed files to the MK_LLVM_TARGET_BPF=yes case, otherwise clang and various other executables will fail to link with undefined symbols.
Reported by: O. Hartmann <ohartmann@walstatt.org>
MFC r344852:
Put in a temporary workaround for what is likely a gcc 6 bug (it does not occur with gcc 7 or later). This should prevent the following error from breaking the head-amd64-gcc CI builds:
In file included from /workspace/src/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfo.cpp:14:0: /workspace/src/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h:128:54: error: 'template<class _InputIterator> lldb_private::MemoryRegionInfos::MemoryRegionInfos(_InputIterator, _InputIterator, const allocator_type&)' inherited from 'std::__1::vector<lldb_private::MemoryRegionInfo>' using std::vector<lldb_private::MemoryRegionInfo>::vector; ^~~~~~ /workspace/src/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h:128:54: error: conflicts with version inherited from 'std::__1::vector<lldb_private::MemoryRegionInfo>'
Reported by: CI
MFC r344896:
Pull in r354937 from upstream clang trunk (by Jörg Sonnenberger):
Fix inline assembler constraint validation
The current constraint logic is both too lax and too strict. It fails for input outside the [INT_MIN..INT_MAX] range, but it also implicitly accepts 0 as value when it should not. Adjust logic to handle both correctly.
Differential Revision: https://reviews.llvm.org/D58649
Pull in r355491 from upstream clang trunk (by Hans Wennborg):
Inline asm constraints: allow ICE-like pointers for the "n" constraint (PR40890)
Apparently GCC allows this, and there's code relying on it (see bug).
The idea is to allow expression that would have been allowed if they were cast to int. So I based the code on how such a cast would be done (the CK_PointerToIntegral case in IntExprEvaluator::VisitCastExpr()).
Differential Revision: https://reviews.llvm.org/D58821
These should fix assertions and errors when using the inline assembly "n" constraint in certain ways.
In case of devel/valgrind, a pointer was used as the input for the constraint, which lead to "Assertion failed: (isInt() && "Invalid accessor"), function getInt".
In case of math/secp256k1, a very large integer value was used as input for the constraint, which lead to "error: value '4624529908474429119' out of range for constraint 'n'".
PR: 236216, 236194
MFC r344951:
Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch r355677 (effectively, 8.0.0 rc4), resolve conflicts, and bump version numbers.
PR: 236062
MFC r345018:
Merge LLVM libunwind trunk r351319, from just before upstream's release_80 branch point. Afterwards, we will merge the rest of the changes in the actual release_80 branch.
PR: 236062
MFC r345019:
Merge LLVM libunwind release_80 branch r355677 (effectively, 8.0.0 rc4).
PR: 236062
MFC r345021:
Pull in r355854 from upstream llvm trunk (by Jonas Paulsson):
[RegAlloc] Avoid compile time regression with multiple copy hints.
As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive compile time building opencollada"), this patch makes sure that no phys reg is hinted more than once from getRegAllocationHints().
This handles the case were many virtual registers are assigned to the same physreg. The previous compile time fix (r343686) in weightCalcHelper() only made sure that physical/virtual registers are passed no more than once to addRegAllocationHint().
Review: Dimitry Andric, Quentin Colombet https://reviews.llvm.org/D59201
This should fix a hang when compiling certain generated .cpp files in the graphics/opencollada port.
PR: 236313
MFC r345068 (by jhb):
Move libunwind out of contrib/llvm/projects.
Move LLVM's libunwind to its own contrib/ directory similar to other runtime libraries like libc++ and libcxxrt.
Reviewed by: dim, emaste Differential Revision: https://reviews.freebsd.org/D19534
MFC r345073:
Revert r308867 (which was originally committed in the clang390-import project branch):
Work around LLVM PR30879, which is about a bad interaction between X86 Call Frame Optimization on i386 and libunwind, by disallowing the optimization for i386-freebsd12.
This should fix some instances of broken exception handling when frame pointers are omitted, in particular some unittests run during the build of editors/libreoffice.
This hack will be removed as soon as upstream has implemented a more permanent fix for this problem.
And indeed, after r345018 and r345019, which updated LLVM libunwind to the most recent version, the above workaround is no longer needed. The upstream commit which fixed this is:
https://llvm.org/viewvc/llvm-project?view=revision&revision=292723
Specifically, 32 bit (i386-freebsd) executables optimized with omitted frame pointers and Call Frame Optimization should now behave correctly when a C++ exception is thrown, and the stack is unwound.
Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=30879 PR: 236062
MFC r345152:
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, and lldb release_80 branch r356034 (effectively, 8.0.0 rc5), resolve conflicts, and bump version numbers.
PR: 236062
MFC r345231:
Add LLVM openmp trunk r351319 (just before the release_80 branch point) to contrib/llvm. This is not yet connected to the build, the glue for that will come in a follow-up commit.
PR: 236062
MFC r345232:
Bootstrap svn:mergeinfo on contrib/openmp.
PR: 236062
MFC r345233:
Merge openmp release_80 branch r356034 (effectively, 8.0.0 rc5).
PR: 236062
MFC r345234:
Add openmp __kmp_gettid() wrapper, using pthread_getthreadid_np(3). This has also been submitted upstream.
PR: 236062
MFC r345283:
Enable building libomp.so for 32-bit x86. This is done by selectively enabling the functions that save and restore MXCSR, since access to this register requires SSE support.
Note that you may run into other issues with OpenMP on i386, since this *not* yet supported upstream, and certainly not extensively tested.
PR: 236062, 236582
MFC r345345:
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 8.0.0 final release r356365. There were no functional changes since the most recent merge, of 8.0.0 rc5.
Release notes for llvm, clang, lld and libc++ 8.0.0 are now available:
https://llvm.org/releases/8.0.0/docs/ReleaseNotes.html https://llvm.org/releases/8.0.0/tools/clang/docs/ReleaseNotes.html https://llvm.org/releases/8.0.0/tools/lld/docs/ReleaseNotes.html https://llvm.org/releases/8.0.0/projects/libcxx/docs/ReleaseNotes.html
PR: 236062
MFC r345349:
Pull in r352826 from upstream lld trunk (by Fangrui Song):
[ELF] Support --{,no-}allow-shlib-undefined
Summary: In ld.bfd/gold, --no-allow-shlib-undefined is the default when linking an executable. This patch implements a check to error on undefined symbols in a shared object, if all of its DT_NEEDED entries are seen.
Our approach resembles the one used in gold, achieves a good balance to be useful but not too smart (ld.bfd traces all DSOs and emulates the behavior of a dynamic linker to catch more cases).
The error is issued based on the symbol table, different from undefined reference errors issued for relocations. It is most effective when there are DSOs that were not linked with -z defs (e.g. when static sanitizers runtime is used).
gold has a comment that some system libraries on GNU/Linux may have spurious undefined references and thus system libraries should be excluded (https://sourceware.org/bugzilla/show_bug.cgi?id=6811). The story may have changed now but we make --allow-shlib-undefined the default for now. Its interaction with -shared can be discussed in the future.
Reviewers: ruiu, grimar, pcc, espindola
Reviewed By: ruiu
Subscribers: joerg, emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D57385
Pull in r352943 from upstream lld trunk (by Fangrui Song):
[ELF] Default to --no-allow-shlib-undefined for executables
Summary: This follows the ld.bfd/gold behavior.
The error check is useful as it captures a common type of ld.so undefined symbol errors as link-time errors:
// a.cc => a.so (not linked with -z defs) void f(); // f is undefined void g() { f(); }
// b.cc => executable with a DT_NEEDED entry on a.so void g(); int main() { g(); }
// ld.so errors when g() is executed (lazy binding) or when the program is started (-z now) // symbol lookup error: ... undefined symbol: f
Reviewers: ruiu, grimar, pcc, espindola
Reviewed By: ruiu
Subscribers: llvm-commits, emaste, arichardson
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57569
Together, these add support for --no-allow-shlib-undefined, and make it the default for executables, so they will fail to link if any symbols from needed shared libraries are undefined.
Reported by: jbeich PR: 236062, 236141
MFC r345449:
Pull in r356809 from upstream llvm trunk (by Eli Friedman):
[ARM] Don't form "ands" when it isn't scheduled correctly.
In r322972/r323136, the iteration here was changed to catch cases at the beginning of a basic block... but we accidentally deleted an important safety check. Restore that check to the way it was.
Fixes https://bugs.llvm.org/show_bug.cgi?id=41116
Differential Revision: https://reviews.llvm.org/D59680
This should fix "Assertion failed: (LiveCPSR && "CPSR liveness tracking is wrong!"), function UpdateCPSRUse" errors when building the devel/xwpe port for armv7.
PR: 236062, 236568 |
345665 |
29-Mar-2019 |
jhb |
MFC 318562: Exclude ccr(4) from arm LINT since it excludes cxgbe(4). |
344905 |
08-Mar-2019 |
jhb |
MFC 340020: Don't enter DDB for fatal traps before panic by default.
Add a new 'debugger_on_trap' knob separate from 'debugger_on_panic' and make the calls to kdb_trap() in MD fatal trap handlers prior to calling panic() conditional on this new knob instead of 'debugger_on_panic'. Disable the new knob by default. Developers who wish to recover from a fatal fault by adjusting saved register state and retrying the faulting instruction can still do so by enabling the new knob. However, for the more common case this makes the user experience for panics due to a fatal fault match the user experience for other panics, e.g. 'c' in DDB will generate a crash dump and reboot the system rather than being stuck in an infinite loop of fatal fault messages and DDB prompts. |
344619 |
27-Feb-2019 |
kevans |
MFC r336262: Fix machdep_boot.c
A last minute change made this no longer compile. Pass the right arg and eliminate now-unused variables from the code. |
344383 |
20-Feb-2019 |
kevans |
MFC r336283: Fix build after r344378
Eliminate an unused var warning-error; the var is used only when parsing linux-style boot args, so wrap it in the appropriate ifdef. |
344378 |
20-Feb-2019 |
kevans |
MFC r336244, r336246-r336247: Standardize boot arg parsing
r336244: Create helper functions for parsing boot args.
boot_parse_arg to parse a single arg boot_parse_cmdline to parse a command line string boot_parse_args to parse all the args in a vector boot_howto_to_env Convert howto bits to env vars boot_env_to_howto Return howto mask mased on what's set in the environment.
All these routines return an int that's the bitmask of the args translated to RB_* flags. As a special case, the 'S' flag sets the comconsole_speed env var. Any arg that looks like a=b will set the env key 'a' to value 'b'. If =b is omitted, 'a' is set to '1'. This should help us reduce the number of redundant copies of these routines in the tree. It should also give a more uniform experience between platforms.
Also, invent a new flag RB_PROBE that's set when 'P' is parsed. On x86 + BIOS, this means 'probe for the keyboard, and if it's not there set both RB_MULTIPLE and RB_SERIAL (which means show the output on both video and serial consoles, but make serial primary). Others it may be some similar concept of probing, but it's loader dependent what, exactly, it means.
These routines are suitable for /boot/loader and/or the kernel, though they may not be suitable for the tightly hand-rolled-for-space environments like boot2.
r336246: Eliminate boot loader copies of boot arg parsing.
Eliminate 4 of the copies of the arg parsing in /boot/laoder by using boot_parse_cmdline.
r336247: Transition to boot_env_to_howto and boot_howto_to_env in the boot loader. |
343504 |
27-Jan-2019 |
marius |
MFC: r342634 (partial)
o Don't allocate resources for SDMA in sdhci(4) if the controller or the front-end doesn't support SDMA or the latter implements a platform- specific transfer method instead. While at it, factor out allocation and freeing of SDMA resources to sdhci_dma_{alloc,free}() in order to keep the code more readable when adding support for ADMA variants.
o Base the size of the SDMA bounce buffer on MAXPHYS up to the maximum of 512 KiB instead of using a fixed 4-KiB-buffer. With the default MAXPHYS of 128 KiB and depending on the controller and medium, this reduces the number of SDHCI interrupts by a factor of ~16 to ~32 on sequential reads while an increase of throughput of up to ~84 % was seen.
Front-ends for broken controllers that only support an SDMA buffer boundary of a specific size may set SDHCI_QUIRK_BROKEN_SDMA_BOUNDARY and supply a size via struct sdhci_slot. According to Linux, only - unsupported in stable/11 anyway - Qualcomm MSM-type SDHCI controllers are affected by this, though.
Requested by: Shreyank Amartya (unconditional bump to 512 KiB)
o Introduce a SDHCI_DEPEND macro for specifying the dependency of the front-end modules on the sdhci(4) one and bump the module version of sdhci(4) to 2 via an also newly introduced SDHCI_VERSION in order to ensure that all components are in sync WRT struct sdhci_slot.
o In sdhci(4): - Make pointers const were applicable, and - replace a few device_printf(9) calls with slot_printf() for consistency. |
342078 |
14-Dec-2018 |
mmel |
MFC r341679:
Fix cut&paste typo in atomic_fetchadd_64(). |
341717 |
08-Dec-2018 |
kib |
MFC r341374: Correct the tunable name in the message.
PR: 231577 |
341491 |
04-Dec-2018 |
markj |
MFC r341442, r341443: Plug memory disclosures via ptrace(2). |
341166 |
28-Nov-2018 |
vangyzen |
MFC r340995
Prevent kernel stack disclosure in signal delivery
On arm64 and riscv platforms, sendsig() failed to zero the signal frame before copying it out to userspace. Zero it.
On arm, I believe all the contents of the frame were initialized, so there was no disclosure. However, explicitly zero the whole frame because that fact could inadvertently change in the future, it's more clear to the reader, and I could be wrong in the first place.
Security: similar to FreeBSD-EN-18:12.mem and CVE-2018-17155 Sponsored by: Dell EMC Isilon |
340556 |
18-Nov-2018 |
kib |
MFC r340136: Move the fixed base for PIE loading on arm. |
340270 |
08-Nov-2018 |
jhb |
MFC 340164,340168,340170: Add custom cpu_lock_delay() for x86.
340164: Add a KPI for the delay while spinning on a spin lock.
Replace a call to DELAY(1) with a new cpu_lock_delay() KPI. Currently cpu_lock_delay() is defined to DELAY(1) on all platforms. However, platforms with a DELAY() implementation that uses spin locks should implement a custom cpu_lock_delay() doesn't use locks.
340168: Add a delay_tsc() static function for when DELAY() uses the TSC.
This uses slightly simpler logic than the existing code by using the full 64-bit counter and thus not having to worry about counter overflow.
340170: Add a custom implementation of cpu_lock_delay() for x86.
Avoid using DELAY() since it can try to use spin locks on CPUs without a P-state invariant TSC. For cpu_lock_delay(), always use the TSC if it exists (even if it is not P-state invariant) to delay for a microsecond. If the TSC does not exist, read from I/O port 0x84 to delay instead.
PR: 228768 |
340145 |
04-Nov-2018 |
mmacy |
Backport of r338074 - generalize uart_bus_probe and add SNPS support to x86
Submitted by: Rajesh Kumar Differential Revision: https://reviews.freebsd.org/D17381 |
338867 |
21-Sep-2018 |
markj |
MFC r338211: Prepare the kernel linker to handle PC-relative ifunc relocations. |
338694 |
15-Sep-2018 |
markj |
MFC r338537, r338539: Bump MAX_HWCNT and MAX_EXCNT. |
338514 |
06-Sep-2018 |
jhb |
MFC 332906,332907,332976,333679,336053: Expand testing of breakpoints.
332906: Extend support for ptrace() tests using breakpoints.
- Use a single list of platforms to define HAVE_BREAKPOINT for platforms that expose a functional breakpoint() inline to userland. Replace existing lists of platform tests with HAVE_BREAKPOINT instead. - Add support for advancing PC past a breakpoint inserted via breakpoint() to support the existing ptrace__PT_CONTINUE_different_thread test on non-x86 platforms (x86 advances the PC past the breakpoint instruction, but other platforms do not). This is implemented by defining a new SKIP_BREAK macro which accepts a pointer to a 'struct reg' as its sole argument and modifies the contents to advance the PC. The intention is to use it in between PT_GETREGS and PT_SETREGS.
332907: Expose breakpoint() to userland from <machine/cpufunc.h> on MIPS.
Enable ptrace() tests using breakpoint on MIPS as well.
332976: Shorten some recently-added lines that are an extra indent over 80 columns.
333679: Export a breakpoint() function to userland for riscv.
As a result, enable tests using breakpoint() on riscv.
336053: Export a breakpoint() function to userland for arm and arm64.
Enable ptrace() tests using breakpoint() on these architectures. |
338484 |
05-Sep-2018 |
kib |
MFC r338370: Remove {max/min}_offset() macros, use vm_map_{max/min}() inlines. |
335991 |
05-Jul-2018 |
ian |
MFC r333255, r333260
r333255: Make reading imx6 gpio pins work correctly whether the pin is in open-drain mode or not. An earlier attempt to make this work was done in r320456, by always reading the pad status register (PSR) instead of the data register. But it turns out the values in PSR only reflect the electrical level of an output pin if the pad is configured with the SION (Set Input On) bit in the pinmux config, and most output gpio pads are not configured that way.
So now a gpio read is done by returning the value from the data register, which works right whether the pin is configured for input or output, unless the pin has been set for OPENDRAIN mode, in which case the PSR is read instead. For this to work, the pin must also be configured with SION turned on in the fdt pinmux data, which is a reasonable thing to require for the unusual case of reading an open-drain output pin.
r333260: Properly support the GPIO_PIN_PRESET_{LOW,HIGH} options when configuring a gpio pin. If neither of the options is specified, pre-set the pin's output value to the pin's current input value, to achieve glitch-free transitions to output mode on pins that are pulled up or down at reset or via fdt pinctrl data. |
335556 |
22-Jun-2018 |
avg |
MFC r333667: followup to r332730/r332752: set kdb_why to "trap" for fatal traps
This change updates arm, arm64 and mips achitectures. Additionally, it removes redundant checks for kdb_active where it already results in kdb_reenter() and adds kdb_reenter() calls where they were missing.
Some architectures check the return value of kdb_trap(), but some don't. I haven't changed any of that.
Some trap handling routines have a return code. I am not sure if I provided correct ones for returns after kdb_reenter(). kdb_reenter should never return unless kdb_jmpbufp is NULL for some reason. |
333687 |
16-May-2018 |
jhb |
MFC 332891,332892: Fixes for atomic_*cmpset() on arm.
332891: Fix some harmless type mismatches in the ARM atomic_cmpset implementations.
The return value of atomic_cmpset() and atomic_fcmpset() is an int (which is really a bool) that has the values 0 or 1. Some of the inlines were using the type being operated on (e.g. uint32_t) as either the return type of the function, or the type of a local 'ret' variable used to hold the return value. Fix all of these to just use plain 'int'. Due to C promotion rules and the fact that the value can only be 0 or 1, these should all be harmless.
332892: Implement 32-bit atomic_fcmpset() in userland for armv4/v5.
- Add an implementation of atomic_fcmpset_32() using RAS for armv4/v5. This fixes recent world breakage due to use of atomic_fcmpset() in userland. - While here, be more careful to not expose wrapper macros for 64-bit atomic_*cmpset to userland for armv4/v5 as only 32-bit cmpset is implemented.
This has been reviewed, but not runtime-tested, but should fix the arm.arm and arm.armeb worlds that have been broken for a while.
Approved by: re (kib) |
333619 |
15-May-2018 |
gonzo |
MFC r331906:
Approved by: re (gjb)
Fix accidental USB port resets by GPIO on Zynq/Zedboard boards
The Zynq/Zedboard GPIO driver attempts to tri-state all GPIO pins on boot up but the order in which I reset the hardware can cause the pins to be briefly held low before being tri-stated. This is a problem on boards that use GPIO pins to reset devices.
In particular, the Zybo and ZC-706 boards use a GPIO pin as a USB PHY reset. If U-boot enables the USB port before booting the kernel, the GPIO driver attach causes a glitch on the USB PHY reset and the USB port loses power. My fix is to have the GPIO driver leave the pins in whatever configuration U-boot placed them.
PR: 225713 Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com> |
332614 |
16-Apr-2018 |
trasz |
MFC r328195:
Add usb_template(4) to RPI-B kernel config. This is to support the USB OTG functionality on Raspberry Pi 0. |
332135 |
06-Apr-2018 |
kevans |
MFC r329859,r329860: Float protection in stand
r329859: Do not include float interfaces when using libsa.
We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more accidental seepage.
r329860: Floaty McFloatface is funnier... |
332025 |
04-Apr-2018 |
mmel |
MFC r328201:
Convert extres/phy to kobj model. Similarly as other extres pseudo-drivers, implement phy by using kobj model. This detaches it from provider device, so single device driver can export multiple different phys. Additionally, this allows phy to be subclassed to more specialized drivers, like is USB OTG phy, or PCIe phy with hot-plug capability. |
332010 |
04-Apr-2018 |
mmel |
MFC (cherry pick)r306197,r306327,r306328,r308390,r308391,r310600,r314703:
cherry pick from r306197: Nvidia Tegra 124 and Jetson TK1 related DTS. r306327: Update AHCI driver to match new dts tree r306328: Update PCI driver to match new dts tree r308390: Rework NVIDIA Tegra124 XUSBPAD driver. - Adapt it for new, incompatible, DT bindings introduced by r306197. - Add support for USB super speed pads/ports. r308391: Add NVIDIA Tegra XHCI driver and coresponding firmware blob. r310600: Implement drivers for NVIDIA tegra124 display controller, HDMI source and host1x module. Unfortunately, tegra124 SoC doesn't have 2D acceleration engine and 3D requires not yet started nouveau driver. r314703: Add support for card detect and write protect gpio pins to Tegra SDHCI. |
331988 |
04-Apr-2018 |
mmel |
MFC r328467:
Implement mitigation for Spectre version 2 attacks on ARMv7. |
331971 |
04-Apr-2018 |
mmel |
MFC r309531,r309553,r309604:
r309531: Implement fake pmap_mapdev_attr() for ARMv6. This function is referenced, but never called from DRM2 code. Also, real behavior of pmap_mapdev_attr() in ARM world is unclear as we don't have any additional attribute for a device memory type. r309553: Fix build breakage caused by r309531. r309604: Fix the armv6 build after r309553. |
331968 |
04-Apr-2018 |
mmel |
MFC r319896,r320054:
r319896: Implement tunable CPU quirks. These quirks are intended for optimizing CPU performance, not for applying errata workarounds. Nobody can expect that CPU with unfixed errata is stable enough to execute the kernel until quirks are applied. r320054: Manually load tunable CPU quirks. These are needed too early, far before SYSINIT is processed. |
331907 |
03-Apr-2018 |
gonzo |
MFC r307943-r307944, r308698
r307943 by andrew: Remove the need for the delay to be zero when MULTIDELAY is undefined, it may be useful to only enable this in some configs.
Sponsored by: ABT Systems Ltd
r307944 by andrew: Add MULTIDELAY support to the am335x dmtimer. This will be useful for testing Cortex-A8 support in GENERIC.
Sponsored by: ABT Systems Ltd
r308698 by loos: After r308533, the platform compatible string must be an exact match.
Use "ti,am33xx" instead of "ti,am335x", which gives an exact match in every DTS we support.
This fixes the boot on TI SoCs after r308533.
Suggested by: gonzo Sponsored by: Rubicon Communications, LLC (Netgate) |
331905 |
03-Apr-2018 |
gonzo |
MFC r330727 (without optional dts part):
[rpi] remove IRQ support for BCM233x RNG
Upstream DTBs don't provide IRQ lines for the RNG. Moreover, harvesting bytes as often as the RNG interrupt is triggered (87 times per sec) is an overkill.
For these reasons, get rid of the interrupt mode and make callout mode the default, with random bits harvested every 4 seconds.
Submitted by: Sylvain Garrigues <sylgar@gmail.com> Reviewed by: ian, imp, manu, mmel Approved by: emaste Differential Revision: https://reviews.freebsd.org/D14541 |
331897 |
02-Apr-2018 |
gonzo |
MFC r314672, r315967, r324184, r325768
r314672: [rpi] rpi3 should use the same cpufreq logic as rpi2, not rpi-b
RPi3 cpufreq is more like that on RPi2. Setting arm frequency above min (say, "sysctl hw.cpufreq.arm_freq=600000001") turns on turbo mode, and the firmware automatically raises voltage, sets frequency to max 1200MHz, and throttle when overheat, etc.
Swap if/else parts and use SOC_BCM2835 def so RPi3 can share the same cpufreq logic as RPi2, instead of falling to that for RPi.
Submitted by: Jia-Shiun Li <jiashiun@gmail.com> Differential Revision: https://reviews.freebsd.org/D9640
r315967: [rpi] Use compatibility string from upstream DTB for I2C controller
FreeBSD uses upstream DTB for RPi3 build and compatibility string for i2c device is different there. Add this new string to compatibility data.
Reported by: Karl Denninger
r324184 by ian: Allow Raspberry Pi platform and drivers to be configured with upstream DTBs.
- Added more compatibility strings to drivers not yet converted - Added new RPI platform code compatibility string to match the ones used upstream - Adapted RPI and RPI2 DTS to match the new platform code compatibility string
The goal is to use the upstream DTBs as a replacement for our custom one. This is now possible with these changes.
Additionally, as the RPI firmware automatically chooses the right DTB for us, this would allow to have one common armv6 kernel for RPI0 and RPI1 (BCM2835-based), and one common armv7 kernel for RPI2 v1.1 (BCM2836-based), and RPI2 v1.2 / RPI3 (BCM2837-based).
Submitted by: Sylvain Garrigues <sylgar@gmail.com> Differential Revision: https://reviews.freebsd.org/D12360
r325768 by manu: arm: rpi2: Fix cpufreq(4)
Since r324184 the root node compatible for rpi2 is "brcm,bcm2836", add it to the compatible list of bcm2835_cpufreq.
Tested On: RPI2 v1.1 RPI2 v1.2
Reported by: many on freebsd-arm@ |
331894 |
02-Apr-2018 |
gonzo |
MFC r306436-r306437, r306489, r306491
r306436 by manu: RPI-B: Add support for MULTIDELAY
100 cycles per us seems accurate enough, at least it's better than the 200 value that was used before.
Reviewed by: andrew, imp Differential Revision: https://reviews.freebsd.org/D8062
r306437 by manu: RPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC.
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D8063
r306489 by manu: bcm2835_cpufreq: Only attach driver if we correcly match on the machine compatible string.
r306491 by manu: RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC. |
331893 |
02-Apr-2018 |
gonzo |
MFC r306263, r306268
r306263 by andrew: Move cpu_reset to be a platform method to allow multiple implementations.
Reviewed by: mmel Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8010
r306268 by andrew: Also implement platform_cpu_reset on bcm2836 |
331891 |
02-Apr-2018 |
gonzo |
MFC r304488, r304623
r304488 by manu: Keep boot parameters in ARM trampoline code
Currently boot parameters (r0 - r3) are forgotten in ARM trampoline code. This patch save them at startup and restore them before jumping into kernel _start() routine. This is usefull when booting with Linux ABI and/or custom bootloader.
Submitted by: Grégory Soutadé <soutade@gmail.com> Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D7395
r304623 by manu: Fix building for ARM kernel that have FLASHADDR, PHYSADDR and LOADERRAMADDR defined.
Pointy Hat: myself
Reported by: bz |
331890 |
02-Apr-2018 |
gonzo |
MFC r305094, r305096-r305097
r305094 by cognet: Garbage collect bits forgotten in r295267.
r305096 by cognet: Some old arm ports don't load the kernel at the beginning of the memory, because the bootloader, ie redboot, won't let them do so, and so used the memory before the kernel for early memory allocation, such as pagetables, stacks, etc... Make a bit of an effort to try to get that memory mapped.
r305097 by cognet: Nuke obio_bs_tag, it was used before it was initialized, and arm_base_bs_tag is the same, anyway. |
331889 |
02-Apr-2018 |
gonzo |
MFC r303035 by markm:
Random bit generator (RBG) driver for RPi and RPi2.
Summary: This driver supports the following methods to trigger gathering random bits from the hardware: 1. interrupt when the FIFO is full (default) fed into the harvest queue 2. callout (when BCM2835_RNG_USE_CALLOUT is defined) every second if hz is less than 100, otherwise hz / 100, feeding the random bits into the harvest queue
If the kernel is booted with verbose enabled, the contents of the registers will be dumped after the RBG is started during the attach routine.
Author: hackagadget_gmail.com (Stephen J. Kiernan)
Test Plan: Built RPI2 kernel and booted on board. Tested the different methods to feed the harvest queue (callout, interrupt) and the interrupt driven approach seems best. However, keeping the other method for people to be able to experiment with.
Reviewed By: adrian, delphij, markm
Differential Revision: https://reviews.freebsd.org/D6888 |
331888 |
02-Apr-2018 |
gonzo |
MFC r302498 by andrew:
Remove an unneeded call to fdt_get_unit, the return value is unused.
Sponsored by: ABT Systems Ltd |
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) |
331643 |
27-Mar-2018 |
dim |
MFC r314568 (by emaste):
kern_sig.c: ANSIfy and remove archaic register keyword
Sponsored by: The FreeBSD Foundation
MFC r318389 (by emaste):
Remove register keyword from sys/ and ANSIfy prototypes
A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today.
ANSIfy related prototypes while here.
Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10193 |
331524 |
25-Mar-2018 |
ian |
MFC r329989, r330044
r329989: Add support for booting into kdb on arm platforms when the RB_KDB is set (using "boot -d" at the loader propmt or setting boot_ddb in loader.conf).
Submitted by: Thomas Skibo <thomasskibo@yahoo.com> Differential Revision: https://reviews.freebsd.org/D14428
r330044: Add a hw.model sysctl oid for armv6/7 which reports the CPU model, similar to what other arches (all except riscv and armv4/5) do.
Submitted by: Hyun Hwang <hyun@caffeinated.codes> Differential Revision: https://reviews.freebsd.org/D14465 |
331520 |
25-Mar-2018 |
ian |
MFC r330050:
Initialize all members of vm_page::md_page for armv4/5 systems. This fixes a hang in SI_SUB_KMEM sysinit, and is apparently required after r323290. Inspired by the commit message for r323676.
Reported by: andreast@ |
331519 |
25-Mar-2018 |
ian |
MFC r330437-r330438, r330440, r331045
r330437: Do not stop the loop that configures gpio chipselect pins on the first error, just ignore pins that don't configure and keep setting up the ones that do. (But when bootverbose is on, whine about the errors.)
r330438: Defer attaching the spibus until timers and interrupts are working. The driver requires interrupts to do transfers, and the drivers for the SPI devices on the bus quite reasonably expect to be able to do IO while probing and attaching.
r330440: Switch imx_gpio to attach at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE. Pretty much any other device might need to manipulate a gpio pin during its probe or attach routines, so these devices must be available as early as possible.
The gpio device is an interrupt controller, but I didn't choose the INTERRUPT pass for that reason (it works fine as an interrupt controller as long as it attaches any time before interrupts are enabled). That just looked like the right place in the passes to ensure that it attaches before any type of device that might need gpio pin manipulations.
r331045: Add required interface header.
Reported by: andreast@ |
331506 |
24-Mar-2018 |
ian |
MFC r310017, r310229, r312289, r327260, r329539, r329544-r329546, r329620, r329729, r329911, r329999
r310017: [spi] reformat message
This commit corrects print of nomatch (newline was too early)
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp> Reviewed by: ray, loos, mizhka Differential Revision: https://reviews.freebsd.org/D8749
r310229: ofw_spi: Parse property for the SPI mode and CS polarity. As cs is stored in a uint32_t, use the last bit to store the active high flag as it's unlikely that we will have that much CS.
Reviewed by: loos Differential Revision: https://reviews.freebsd.org/D8614
r312289: [spibus] small code refactoring
Merge 3 sequential printf calls into one.
Reported by: rpokala Reviewed by: rpokala, adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8795
r327260: SPDX: fix wrong license ID tag in dev/spibus.
r329539: Provide public declarations for ofw_spibus_driver and ofw_spibus_devclass so other drivers can refer to them in DRIVER_MODULE() decls.
r329544: Add modules/spi as a gathering point for SPI-related modules, analagous to modules/i2c for i2c/iicbus modules. Build spibus as a module.
r329545: Add ofw_bus_if.h to SRCS.
r329546: Build at45d and mx25l SPI flash drivers as modules.
r329620: Add missing MODULE_DEPENDS().
r329729: Remove some files that snuck in via cut and paste.
Having these compiled into the module causes the kobj method descriptors to be resolved incorrectly (by the compile-time linker instead of the kernel linker), which then leads to hours of frustrating debugging.
r329911: Add a functional detach() routine, to make things kldunload-friendly.
r329999: Add a SPI driver for imx5 and imx6.
It can be compiled into the kernel with "device imx_spi" or loaded as a module, which is also named "imx_spi". |
331505 |
24-Mar-2018 |
ian |
MFC r329642:
Adjust whitespace of things added in the past couple years to match the original style of the file. No functional changes. |
331501 |
24-Mar-2018 |
ian |
MFC r329479-r329480, r329483, r329506-r329507, r329526, r329529, r329536, r329541, r329730, r329841, r329988, r330397
r329479: Do not try to deallocate memory that wasn't allocated (you'd think that would be safe, but the function also tries to destroy mutexes that never got created).
I guess this can only happen when imx_ehci_detach() is called on the error-exit path from imx_ehci_attach(), and that path never got exercised before today.
r329480: Don't call sdhci_cleanup_slot() if sdhci_init_slot() never got called. Also, do callout_init() very early in attach, so that callout_drain() can be called in detach without worrying about whether it ever got init'd.
r329483: Fix fallout from the import of fresh dts source files from linux 4.15. It appears that node names no longer include leading zeroes in the @address qualifiers, so we have to search for the nodes involved in interrupt fixup using both flavors of name to be compatible with old and new .dtb files.
(You know you're in a bad place when you're applying a workaround to code that exists only as a workaround for another problem.)
r329506: Add a detach method so that this can be a kldunload-friendly module.
r329507: Build modules specific to imx5/imx6 only when building those kernels.
This adds sys/modules/imx with a SUBDIR makefile to make the whole collection of modules that are specific to these SoCs. Initially, that "whole collection" consists of the if_ffec and imx_i2c drivers.
The if_ffec driver is referenced in its existing home in ../ffec rather than moving it into the imx directory, because it's used by powerpc too, but it is no longer built for all armv6/7 systems.
The imx_i2c driver is newly added as a module.
r329526: Allow i2c hardware drivers to declare their own relationships to ofw_iicbus rather than relying on a set of canned EARLY_DRIVER_MODULE() statements in the ofw_iicbus source. This means hw drivers will no longer be required to use one of a few predefined driver names. They will also now be able to decide themselves if they want to use DRIVER_MODULE or EARLY_DRIVER_MODULE and to set which pass to attach on for early modules.
Mainly, this adds extern declarations for the driver and devclass variables. It also renames ofwiicbus_devclass to ofw_iicbus_devclass to be consistant with the way we use ofw_ prefixes on this stuff.
r329529: Give the imx_i2c driver its own name, set up its relationship to ofw_iicbus. Previously it called itself 'iichb' to link up with the EARLY_DRIVER_MODULE declaration in ofw_iicbus.c.
r329536: Add the MODULE_DEPEND()s needed so that the kernel linker can resolve all the symbols at load time when iicbus is not compiled into the kernel.
r329541: Build ofw_iicbus as a module if OPT_FDT is defined.
r329730: Add required header files.
Reported by: andreast@
r329841: Add a missing line continuation.
How many commits does it take to get a simple module makefile working? Apparently at least three.
Pointy hat to: ian
r329988: Instead of building ofw_iicbus as a separate module, just compile it in to the iicbus module for FDT-based systems.
The primary motivation for this is that host controller drivers which declare DRIVER_MODULE(ofw_iicbus, thisdriver, etc, etc) now only need a single MODULE_DEPEND(thisdriver, ofw_iicbus) for runtime linking to resolve all the symbols. With ofw_iicbus and iicbus in separate modules, drivers would need to declare a MODULE_DEPEND() on both, because symbol lookup is non-recursive through the dependency chain. Requiring a driver to have MODULE_DEPENDS() on both amounts to requiring the drivers to understand the kobj inheritence details of how ofw_iicbus is implemented, which seems like something they shouldn't have to know (and could even change some day).
Also, this is somewhat analogous to how the drivers get built when compiled into the kernel. You don't have to ask for ofw_iicbus separately, it just gets built in along with iicbus when option FDT is in effect.
r330397: Fix a paste-o: use the IICBUS version constants, not IICBB bitbang driver's. |
331498 |
24-Mar-2018 |
ian |
MFC r328345, r328349, r328405, r328407, r328442
r328345: Reformat indentation to match other imx5/6 register definition headers, and tweak some comments. No functional changes.
r328349: Make the trivial imx_soc_family() function an inline in imx_machdep.h.
The imx_machdep.c file is on the fast path to non-existance and this would be the only thing left in it after some watchdog changes are completed.
r328405: Minor cleanups... Move DRIVER_MODULE() and other boilerplate stuff to the bottom of the file, where it is in most imx5/6 drivers. Switch from an RD2 macro using bus_space_read_2() to an inline function using bus_read_2(); likewise for WR2. Use RESOURCE_SPEC_END to end the resource_spec list.
Net effect should be no functional changes.
r328407: Fix return style in RD2. Remove bogus return value from a void function in WR2 (I have no idea why that didn't result in a compile error).
r328442: Add support to the imx5/6 watchdog for the external reset signal. Also, if the "power down" watchdog used by the ROM boot code is still active when the regular watchdog is activated, turn off the power-down watchdog.
This adds support for the "fsl,ext-reset-output" FDT property. When present, that property indicates that a chip reset is accomplished by asserting the WDOG1_B external signal, which is supposed to trigger some external component such as a PMIC to ready the hardware for reset (for example, adjusting voltages from idle to full-power levels), and assert the POR signal to SoC when ready. To guard against misconfiguation leading to a non-rebootable system, the external reset signal is backstopped by code that asserts a normal internal chip reset if nothing responds to the external reset signal within one second. |
331493 |
24-Mar-2018 |
ian |
MFC r324186:
Define a single instance of ahci_devclass and reference it from all the attachment code for various SOCs and busses. Remove all the static and should-have-been-static and named-differently instances of it.
This should eliminate the recently-grown build warnings about multiple definitions when building arm kernels. |
331402 |
23-Mar-2018 |
gonzo |
MFC r316370-r316371
r316370: [versatilepb] Convert VERSATILEPB kernel to INTRNG and switch to upstream DTB
Scope of this change is somewhat larger than just converting to INTRNG. The reason for this is that INTRNG support required switching from custom to upstream DTS because custom DTS didn't have interrup routing information. This switch caused rewrite of PCI and CLCD drivers and adding SCM module. List of changes in this commit:
- Enable INTRNG and switch to versatile-pb.dts
- Add SCM driver that controls various peripheral devices like LCD or PCI controller. Previously registers required for power-up and configuring peripherals were part of their respective nodes. Upstream DTS has dedicated node for SCM
- Convert PL190 driver to INTRNG
- Convert Versatile SIC (secondary interrupt controller) to INTRNG
- Refactor CLCD driver to use SCM API to power up and configuration
- Refactor PCI driver to use SCM API to enable controller
- Refactor PCI driver to use interrupt map provided in DTS for interrupt routing. As a result it fixes broken IRQ routing and it's no longer required to run QEMU with "-global versatile_pci.broken-irq-mapping=1" command-line arguments
r316371: [versatilepb] Fix keyboard driver after switching to upstream DTS
FreeBSD's DTS contained only one PL050 node and driver considered it to be PS/2 keyboard. In reality PL050 is a PS/2 port that pushes bytes to/from the periphers connected to it. New DTS contains two nodes and QEMU emulates keyboard connected to port #0 and mouse connected to port #1. Since there is no way to say what's connected to port by checking DTS we hardcode this knowledge in the driver: it assumes keyboard on port #0 and ignores port #1 altogether.
Also QEMU defaults emulated keyboard to scan code set 2 while driver used to work with scan code set 1 so when initializing driver make sure keyboard is switched to scan code set 1 |
331182 |
19-Mar-2018 |
eadler |
MFC r327184:
Change the remaining files using my personnal email address to my freebsd one |
331017 |
15-Mar-2018 |
kevans |
MFC r317055,r317056 (glebius): Include sys/vmmeter.h as included
r317055: All these files need sys/vmmeter.h, but now they got it implicitly included via sys/pcpu.h.
r317056: Typo! |
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 |
329648 |
20-Feb-2018 |
gonzo |
MFC r325410:
Increase TX_MAX_SEGS from 10 to 20 for the if_awg.c driver
Under certain traffic pattern awg driver does not recover from TX queue full condition. The actual source of the problem is not identified yet but jmcneill@ agreed that bumping TX_MAX_SEGS to 20 is OK as a workaround for the problem (NetBSD has it set to 128).
Also add some diagnostic printfs to prevent silent failure of bus_dma functions in the future
PR will be kept open until root cause of the issue is identified and fixed
PR: 219927 Submitted by: Tom Vijlbrief <tvijlbrief@gmail.com> Approved by: jmcneill |
329280 |
14-Feb-2018 |
gonzo |
MFC r320387:
[arm] Use correct index value when checking range validity
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D9145 |
329263 |
14-Feb-2018 |
skra |
MFC r325321:
Take into account race conditions in case of accessed or modified bit emulation in fast path of data/prefetch abort common routine. Process these bits only if related page table entries are consistent with provided abort info. In case of inconsistency, do nothing and let processor to signal new abort if still needed. |
329140 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654, r324700,r324702,r324709,r324717,r324719,r324841,r324842,r324843,r324845, r324850,r324876,r324877,r324878,r324879,r324880,r324881,r324883,r324980, r324981,r324982,r324995,r325014,r325093,r325094,r325114,r325170,r325171, r325172,r325173,r325174,r325175,r325176,r325248,r325286,r325310,r325332, r325338,r325339,r325376,r325377,r325379,r325380,r325382,r325478,r325479, r325480,r325482,r325483,r325484,r325485,r325556,r325641,r325681,r325685, r325686,r325687,r325688,r325689,r325690,r325691,r325692,r325693,r325694, r325743,r325744,r325748,r325775,r325779,r325780
r324649: Move common/Makefile.inc to sys/boot/loader.mk.
r324650: tweak style
r324651: create defs.mk for common definitions
r324652: Move all the ficl common code into ficl.mk
r324653: LOADER_foo_SUPPORTED
r324654: Explicitly inlcude SYSDIR in the include path
r324700: loader: initialize dv_cleanup in md.c to eliminate clang warning
r324702: We need to include disk.o in libuboot.a when we're building with support for disk access.
r324709: Revert "Unify boot1 with loader" change r324646
r324717: libsa/ip.c: misplaced comment, ip_v is half char, not ip_p
r324719: libsa/ip: stop read loop on bad fragments
r324841: Use BOOTDIR more consistently in defs.mk rather than repeat sys/boot.
r324842: Introduce BOOTOBJ: The top level object directory for the boot tree
r324843: Stopgap fix to the mistmatch between LOADER_GELI_SUPPORT and LOADER_NO_GELI_SUPPORT.
r324845: Use BOOTOBJ and BOOTDIR to find geli includes and libraries.
r324850: Define LIBSA32 to LIBSA on i386 to fix build.
r324876: Move fdt and uboot defines into common uboot.mk.
r324877: End source directories with SRC rather than a hodgepodge of names
r324878: Make at91 boot loader compile again.
r324879: Prefer SRCTOP paths for bits we're grabbing from libc.
r324880: Use BOOTSRC here.
r324881: Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
r324883: Use preferred defined paths, rather than relative paths in fdt.
r324980: Use BOOTDIR consistently.
r324981: Move BINDIR definition to defs.mk, and override where it isn't /boot
r324982: Remove sys/boot/arm/at91 and ixp425
r324995: loader.efi: Make framebuffer commands available for arm64
r325014: Add a 'place holder' arm struct efi_fb until a real one comes
r325093: Define new EFI variables
r325094: Cleanup non-arch Makefiles
r325114: Use defs.mk defins in most MD code
r325170: Use defs.mk values for userboot
r325171: Use defs.mk name and prefer bsd.init.mk
r325172: Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honored correctly with the new Makefile.inc include order.
r325173: We don't need to build a special ficl for userboot.
r325174: Minor cleanup
r325175: For amd64, compile both zfs and zfs32 libraries.
r325176: Actually add zfs32/Makefile
r325248: loader ptblread() is broken with >512B sectors
r325286: efipart_strategy is using wrong offset with >512B sectors
r325310: zfs.c:vdev_read() needs to be careful about large sectors
r325332: loader: re-enable gzip support for x86
r325338: loader: fix BOOTSRC -> BOOTOBJ in a library path
r325339: This used to have bzip2 support too.
r325376: WIP: centralize machine links
r325377: mostly libsa
r325379: Revert "mostly libsa"
r325380: Revert "WIP: centralize machine links"
r325382: Cleanup stray libstand names to be libsa names.
r325478: Powerpc is a 32-bit boot loader.
r325479: Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.
r325480: Use DO32 for all the places that we need to flag we're building a 32-bit version of a library.
r325482: Move machine and other link creation to defs.mk
r325483: MACHINE can never be powerpc64, so cleanup code that thinks it can.
r325484: Prefer bsd.init.mk to src.opts.mk
r325485: Centralize all 32-bit builds on 64-bit platform stuff.
r325556: loader: set options before including bsd.init.mk
r325641: loader.efi: efi_devpath_is_prefix should return bool
r325681: boot1: avoid using NULL device path
r325685: libsa32 isn't needed for i386. It's already a 32-bit platform.
r325686: Simplify this if to a direct assignment.
r325687: Remove all the empty help files from the powerpc build.
r325688: FDT support doesn't make sense for ps3, remove it.
r325689: Remove LOADER_FDT_SUPPORT as a Makefile variable.
r325690: Remove LOADER_ZFS_SUPPORT as a Makefile variable
r325691: Remove useless PNP define here.
r325692: Replace LOADER_FIREWIRE_SUPPORT variable
r325693: Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
r325694: Install the 4th files in sys/boot/forth instead of each loader
r325743: Make sure the proper loader.rc gets installed.
r325744: boot1: also check for NULL device
r325748: Use proper include file.
r325775: Add loader.conf to the list of files that are MD.
r325779: Add /boot/dts to the list of default modules.
r325780: Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. |
328967 |
07-Feb-2018 |
mmel |
MFC r324821:
Fix spelling. |
328966 |
07-Feb-2018 |
mmel |
MFC r325438:
All CP15 registers are bit fields or counters, don't use signed type when accessing them. |
328386 |
25-Jan-2018 |
pkelsey |
MFC r316648:
Corrected misspelled versions of rendezvous.
The MFC maintains smp_no_rendevous_barrier() as a symbol alias of smp_no_rendezvous_barrier().
__FreeBSD_version bumped to indicate presence of the new name smp_no_rendezvous_barrier().
Reviewed by: gnn, jhb (email), kib Differential Revision: https://reviews.freebsd.org/D10313 |
327667 |
07-Jan-2018 |
ian |
MFC r327222:
Add a new ARM kernel option, LOCORE_MAP_MB, to control the size of the kernel VA mapping in the temporary page tables set up by locore-v6.S.
The number used to be hard-coded to 64MB, which is still the default if the kernel option is not specified. However, 64MB is insufficient for using a large mdroot filesystem. The hard-coded number can't be safely increased because too large a number may run into memory-mapped IO space on some SoCs that must not be mapped as ordinary memory. |
327658 |
07-Jan-2018 |
ian |
MFC r327367:
Make kernel option KERNVIRTADDR optional, remove it from std.<platform> files that can use the default value.
It used to be required that the low-order bits of KERNVIRTADDR matched the low-order bits of the physical load address for all arm platforms. That hasn't been a requirement for armv6 platforms since FreeBSD 10. There is no longer any relationship between load addr and KERNVIRTADDR except that both must be aligned to a 2 MiB boundary.
This change makes the default KERNVIRTADDR value 0xc0000000, and removes the options from all the platforms that can use the default value. The default is now defined in vmparam.h, and that file is now included in a few new places that reference KERNVIRTADDR, since it may not come in via the forced-include of opt_global.h on the compile command line. |
327656 |
06-Jan-2018 |
ian |
MFC r327048-r327050
r327048: Restore the ability to use EARLY_PRINTF support during most of initarm().
The real kernel page tables are set up much earlier in initarm() now than they were when early printf support was first added, and they end up undoing the mapping made in locore.S for early printf support. This re-adds the mapping after switching to the new/real kernel page tables, making early printf work again right after switching to them.
r327049: Allow pmap_kremove() to remove 1MB section mappings as well as 4K pages. This will allow it to undo temporary device mappings such as those made with pmap_preboot_map_attr().
Reviewed by: cognet
r327050: If a temporary mapping is made to support EARLY_PRINTF, undo that mapping after cninit() runs, otherwise we leave a bogus device-memory mapping in userspace VA in the kernel pmap forever.
Pointed out by: cognet |
327654 |
06-Jan-2018 |
ian |
MFC r326924-r326925
r326924: Fix debugging output, fallout from something like s/read/readctl/g while renaming variables in a previous change.
r326925: Do not attempt to refill the TX fifo if there is no data left to transfer.
A comment in bcm_bsc_fill_tx_fifo() even lists sc_totlen > 0 as a precondition for calling the routine. I apparently forgot to make the code do what my comment said. |
327633 |
06-Jan-2018 |
ian |
Fix imx6 hdmi init after r323553.
This is a direct commit to 11-stable because major architectural changes in 12 prevent a direct MFC of the affected code. Conceptually, this is...
MFC r324416:
Fix imx6 hdmi init after r323553, which used a config_intrhook to defer the attachment of i2c devices needed by hdmi.
The hdmi init also uses an intrhook callback to defer initialization, and if the hdmi callback runs first, the i2c devices will not yet have registered their device_t in association with their FDT phandle, which allows cross- device references on FDT systems.
Now the hdmi deferred init checks for the i2c device registration, and if it's not complete yet, it registers as an eventhandler watching for newbus attach events. When the i2c device eventually attaches, the hdmi driver unregisters from watching further events, and continues with the hdmi init. Because the function signatures for an intrhook callback and an event handler callback are the same, a single function is used for both callbacks.
Reported by: Russell Haley <russ.haley@gmail.com> |
327595 |
05-Jan-2018 |
ian |
MFC r324185:
Enhance the interrupt capabilities of ti_pruss driver.
The existing ti_pruss driver for the PRUSS Hardware provided by the AM335x ARM CPU has basic interrupt capabilities. This updated driver provides some more options:
- Sysctl based configuration for the interrupts (for some examples, see the test plan in the phabricator review cited below).
- A device file (/dev/pruss0.irqN) for each enabled interrupt. This file can be read and the device blocks if no irq has happened or returns an uint64_t timestamp based on nanouptime().
- Each interrupt device file provides kqueue-based event notification, blocking read(), or select().
Submitted by: Manuel Stuhn <freebsdnewbie@freenet.de> Differential Revision: https://reviews.freebsd.org/D11959 |
327594 |
05-Jan-2018 |
ian |
MFC r324169:
Work around bcm283x silicon bugs to make i2c repeat-start work for the most common case where it's needed -- a write followed by a read to the same slave.
The i2c controller in this chip only performs complete transfers, it does not provide control over start/repeat-start/stop operations on the bus. Thus, we have gotten a full stop/start sequence rather than a repeat-start when doing a typical i2c slave access of "write address, read data". Some i2c slave devices require a repeat-start to work correctly.
These changes cause the controller to do a repeat-start by pre-staging the read parameters in the controller registers immediate after the controller has latched the values for the initial write operation, but before any bytes are actually written. With the values pre-staged, when the write portion of the transfer completes, the state machine in the silicon sees a new start operation already staged and that causes it to perform a repeat-start. The key to tricking the buggy hardware into doing this is to avoid prefilling any output data in the transmit FIFO so that it is possible to catch the silicon in the state where transmit values are latched but the transmit isn't completed yet. |
327195 |
26-Dec-2017 |
kib |
MFC r326971, r327047 (by ian), r327053 (by marius), r327074, r327097: Add atomic_load(9) and atomic_store(9) operations. |
326743 |
10-Dec-2017 |
ed |
MFC r326228 and r326229:
Use TO_PTR() to convert integers to pointers.
For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() in this place. Also use it for all of the other source files, so that the difference remains as minimal as possible. |
326313 |
28-Nov-2017 |
andrew |
MFC r326137:
Ensure we check the program state set in the trap frame on arm and arm64. This value may be set by userspace so we need to check it before using it. If this is not done correctly on exception return the kernel may continue in kernel mode with all registers set to a userspace controlled value. Fix this by moving the check into set_mcontext, and also add the missing sanitisation from the arm64 set_regs.
Discussed with: security-officer@ Sponsored by: DARPA, AFRL |
325837 |
15-Nov-2017 |
jhb |
MFC 323584: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread.
The core note matches the format and layout of NT_ARM_VFP on Linux. Debuggers use the AT_HWCAP flags to determine how many VFP registers are actually used and their format. |
325831 |
14-Nov-2017 |
jhb |
MFC 323581,323582,323583: Add ptrace operations for VFP registers.
323581: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext.
Future changes will use these functions to fetch and store VFP state for threads other than curthread.
323582: Add ptrace operations to fetch and store VFP registers.
323583: Export get/set_vfpcontext from machdep.c.
Should have been part of the previous commit to add ptrace operations for VFP registers. |
325810 |
14-Nov-2017 |
jhb |
MFC 323580,323933,323934,324814,324817: Enable AT_HWCAP on arm.
I reused the SV_HWCAP stub to cover the sv_hwcap2 field as well.
323580: Add AT_HWCAP flags for VFP settings for FreeBSD/arm.
These flags match the meaning and value of flags in Linux, though Linux has many more flags.
323933: Correct HWCAP_VFP3* values to match Linux.
323934: Detect NEON and set HWCAP_NEON if present.
324814: Add AT_HWCAP2 ELF auxiliary vector. - allocate value for new AT_HWCAP2 auxiliary vector on all platforms. - expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly same way as for AT_HWCAP.
324817: Fullify implementation of AT_HWCAP and AT_HWCAP2 for ARMv6,7. This makes elf_aux_info(3) useable for ARM ports.
Tested by: mmel |
325307 |
02-Nov-2017 |
mmel |
MFC r324660:
Save VFP state in getcontext(3) on ARM. This is a last followup of r315974, which fixes userland part of VFP save/restore problems described in PR 217611. |
325238 |
31-Oct-2017 |
markj |
MFC r324920: Fix the VM_NRESERVLEVEL == 0 build. |
324755 |
19-Oct-2017 |
ian |
MFC r323392:
Add gpio methods to read/write/configure up to 32 pins simultaneously.
Sometimes it is necessary to combine several gpio pins into an ad-hoc bus and manipulate the pins as a group. In such cases manipulating the pins individualy is not an option, because the value on the "bus" assumes potentially-invalid intermediate values as each pin is changed in turn. Note that the "bus" may be something as simple as a bi-color LED where changing colors requires changing both gpio pins at once, or something as complex as a bitbanged multiplexed address/data bus connected to a microcontroller.
In addition to the absolute requirement of simultaneously changing the output values of driven pins, a desirable feature of these new methods is to provide a higher-performance mechanism for reading and writing multiple pins, especially from userland where pin-at-a-time access incurs a noticible syscall time penalty.
These new interfaces are NOT intended to abstract away all the ugly details of how gpio is implemented on any given platform. In fact, to use these properly you absolutely must know something about how the gpio hardware is organized. Typically there are "banks" of gpio pins controlled by registers which group several pins together. A bank may be as small as 2 pins or as big as "all the pins on the device, hundreds of them." In the latter case, a driver might support this interface by allowing access to any 32 adjacent pins within the overall collection. Or, more likely, any 32 adjacent pins starting at any multiple of 32. Whatever the hardware restrictions may be, you would need to understand them to use this interface.
In additional to defining the interfaces, two example implementations are included here, for imx5/6, and allwinner. These represent the two primary types of gpio hardware drivers. imx6 has multiple gpio devices, each implementing a single bank of 32 pins. Allwinner implements a single large gpio number space from 1-n pins, and the driver internally translates that linear number space to a bank+pin scheme based on how the pins are grouped into control registers. The allwinner implementation imposes the restriction that the first_pin argument to the new functions must always be pin 0 of a bank.
Differential Revision: https://reviews.freebsd.org/D11810 |
324687 |
17-Oct-2017 |
jhb |
MFC 323579,323585: Add AT_HWCAP and AT_EHDRFLAGS on all platforms.
To preserve KBI on stable/11, a new SV_HWCAP flag is added which indicates if the sv_hwcap field is present and valid to avoid examining the field in old modules. Only sysentvec's which wish to use sv_hwcap need to set the flag in stable/11.
323579: Add AT_HWCAP and AT_EHDRFLAGS on all platforms.
A new 'u_long *sv_hwcap' field is added to 'struct sysentvec'. A process ABI can set this field to point to a value holding a mask of architecture-specific CPU feature flags. If an ABI does not wish to supply AT_HWCAP to processes the field can be left as NULL.
The support code for AT_EHDRFLAGS was already present on all systems, just the #define was not present. This is a step towards unifying the AT_* constants across platforms.
323585: Add AT_EHDRFLAGS and AT_HWCAP on amd64.
x86 has two separate (but identical) list of AT_* constants and the earlier commit to add AT_HWCAP only updated the i386 list. |
324400 |
07-Oct-2017 |
alc |
MFC r305685 Various changes to pmap_ts_referenced()
Move PMAP_TS_REFERENCED_MAX out of the various pmap implementations and into vm/pmap.h, and describe what its purpose is. Eliminate the archaic "XXX" comment about its value. I don't believe that its exact value, e.g., 5 versus 6, matters.
Update the arm64 and riscv pmap implementations of pmap_ts_referenced() to opportunistically update the page's dirty field.
On amd64, use the PDE value already cached in a local variable rather than dereferencing a pointer again and again. |
323931 |
22-Sep-2017 |
ian |
MFC r323474, r323553, r323691
r323474: Add a default implementation that returns ENODEV for start, repeat_start, stop, read, and write methods. Some controllers don't implement these individual operations and have only a transfer method. In that case, we should return an indication that the device is present but doesn't support the method, as opposed to the kobj default error ENXIO which makes it look like the whole device is missing. Userland tools such as i2c(8) can use the differing return values to switch between the two different i2c IO mechanisms.
r323553: Defer attaching and probing iicbus and its children until interrupts are available, in i2c controller drivers that require interrupts for transfers.
This is the result of auditing all 22 existing drivers that attach iicbus. These drivers were the only ones remaining that require interrupts and were not using config_intrhook to defer attachment. That has led, over the years, to various i2c slave device drivers needing to use config_intrhook themselves rather than performing bus transactions in their probe() and attach() methods, just in case they were attached too early.
r323691: Give icee(4) a detach() method so it can be used as a module. Add a module makefile for it. |
323471 |
11-Sep-2017 |
ian |
MFC r323132-r323133
r323132: The latest RPi firmware leaves secondary cores in a wait-for-event (WFE) state to save power, so after writing the entry point address for a core to the mailbox, use a dsb() to synchronize the execution pipeline to the data written, then use an sev() to wake up the core.
Submitted by: Sylvain Garrigues <sylgar@gmail.com>
r323133: Change leading spaces to tabs, no functional change. |
323470 |
11-Sep-2017 |
ian |
MFC r322373:
Ensure the clocks driver is attached before any drivers that need to enable clocks in their attach(). |
323468 |
11-Sep-2017 |
ian |
MFC r321938, r322015
r321938: Fix the interface to imx_iomux_gpr_get/set(). The functions were defined as taking a register number, and that would get multiplied by 4 to make a register address. But the header file that consumers have to reference this stuff publishes register addresses, not numbers. So now everything works in terms of register addresses.
Note that the HDMI init code was writing into the wrong register before this change. Apparently whatever it wrote to was harmless, and apparently HDMI was working because uboot had set up the right bits.
r322015: Add an ahci driver for imx6.
This was submitted by Rogiel Sulzbach (thank you!) but has a few last-minute changes by me, mostly where the code interfaces to my still-utterly-deficient imx6_ccm clocks implementation. So blame me for any mistakes.
Submitted by: Rogiel Sulzbach <rogiel@rogiel.com> Differential Revision: https://reviews.freebsd.org/D11177 |
323467 |
11-Sep-2017 |
ian |
MFC r321708-r321712, r321721, r321726-r321727, r321746, r321751, r321791-r321792, r321795, r321798, r321821, r321823, r321826, r321828, r321841, r321934, r322025-r322026, r322282, r322431, r322473, r322475-r322479
Lots of i2c RTC driver stuff...
r321708: Replace the pcf8563 i2c RTC driver with a new nxprtc driver which handles all the chips in the NXP PCA212x and PCA/PCF85xx series. In addition to supporting more chips, this driver uses the countdown timer on the chips as a fractional seconds counter, giving it a resolution of about 15 milliseconds.
r321709: Fix building this driver on non-FDT platforms.
r321710: Add a few missing i2c devices that build fine on all arches.
r321711: Move the device descriptions onto the device lines, so they cut and paste nicely into other config files.
r321712: Add the i2c RTC drivers found on various arm systems.
r321721: Switch from using iic_transfer() to iicdev_readfrom/writeto(), mostly so that transfers will be done with proper ownership of the bus. No behavioral changes.
r321726: Bugfixes and enhancements...
Don't enable the oscillator when it is found to be stopped at init time, just let the first setting of valid time start it. But still report a dead battery if it's stopped at init time.
Don't force the chip into 24hr mode, just cope with whatever mode it is already in.
Align the RTC clock to top of second when setting it.
r321727: Fix AM/PM mode handling. The bits to mask off in the hours register changes between 12/24 hour mode. Also fix conversion between 12 and 24 hour mode. It's not as easy as adding/subtracting 12, because the clock doesn't roll over 11->0, it rolls over 12->1; 0 isn't a valid hour in AM/PM mode.
r321746: Use the new clock_schedule() to arrange for clock_settime() to be called at the right time to keep the RTC hardware time in sync, instead of using pause_sbt() to sleep until the right time.
r321751: Remove now-unused variable.
r321791: Switch from using iic_transfer() to iicdev_readfrom/writeto(), mostly so that transfers will be done with proper ownership of the bus. No behavioral changes. Also add a detach() method.
r321792: Add a detach() method.
r321795: Check the clock-halted flag every time the clock is read, not just once at startup. The flag stays set until the clock is loaded with good time, so we need to keep saying the time is invalid until that happens.
r321798: Restore a few rather important lines of code that got fumbled in r321746.
r321821: No need to call getnanotime() now that the waiting is done by the central subr_rtc code, switch from CLOCKF_SETTIME_NO_TS to CLOCKF_SETTIME_NO_ADJ so that we get fed a timestamp, but it's not adjusted to compensate for inaccuracy in setting time.
r321823: Bugfixes and enhancements...
Don't enable the oscillator when it is found to be stopped at init time, just let the first setting of valid time start it. But still report a dead battery if it's stopped at init time.
Don't force the chip into 24hr mode, just cope with whatever mode it is already in.
Schedule the clock_settime() callbacks to align the RTC clock to top of second when setting it.
r321826: Restructure the SUBDIR list as 1-per-line and alphabetize, so it will be easier to add new things (and see what changed) in the future.
r321828: Build iicbus/{ds1307,ds3231,nxprtc} as modules.
r321841: Add a driver for the Intersil ISL12xx family of i2c RTC chips.
Supports ISL1209, ISL1218, ISL1219, ISL1220, ISL1221 (just basic RTC functionality, not all the other fancy stuff the chips can do).
r321934: Add missing ofw_bus_if.h src file.
r322025: Switch to iicdev_readfrom/writeto() to do xfers with proper bus ownership.
Tested by: manu@
r322026: Add missing header file to SRCS.
Reported by: manu@
r322282: Remove the ds133x and s35390a i2c RTC drivers for now. They both do i2c transfers in their probe() or attach() routines, and that doesn't work when the low-level controller requires interrupts to be functional.
The DS133x family of chips is nearly identical to the DS1307 and support for them should be added to that driver, then the ds133x driver can be deleted. The s35390a driver just needs a non-trivial workover. In both cases that work will be done and committed separately.
r322431: Bid for the device with BUS_PROBE_GENERIC, because this is very much a generic driver with minimal feature support for a large number of chips. More featureful per-chip drivers might exist (especially out-of-tree) and those should win the bidding even if they use BUS_PROBE_DEFAULT.
r322473: Add a new driver, ds13rtc, that handles all DS13xx series i2c RTC chips.
This driver supports only basic timekeeping functionality. It completely replaces the ds133x driver. It can also replace the ds1374 driver, but that will take a few other changes in MIPS code and config, and will be committed separately. It does NOT replace the existing ds1307 driver, which provides access to some of the extended features on the 1307 chip, such as controlling the square wave output signal. If both ds1307 and ds13rtc drivers are present, the ds1307 driver will outbid and win control of the device.
This driver can be configured with FDT data, or by using hints on non-FDT systems. In addition to the standard hints for i2c devices, it requires a "chiptype" string of the form "dallas,ds13xx" where 'xx' is the chip id (i.e., the same format as FDT compat strings).
r322475: Change "chiptype" to "compatible". Making the hint name the same as the FDT property name should make it easier to document the list of names accepted by both configuration mechanisms.
r322476: Remove the old ds1374 driver and use the ds13rtc driver instead. Adjust several mips config files accordingly.
r322477: Minor fixes and enhancements for the s35390a i2c RTC driver...
- Add FDT probe code. - Do i2c transfers with exclusive bus ownership. - Use config_intrhook_oneshot() to defer chip setup because some i2c busses can't do transfers without interrupts. - Add a detach() routine. - Add to module build.
r322478: Add back the drivers for Dallas/Maxim ds13xx and Seiko S35390x now that they've been rewritten/fixed to not cause panics by doing i2c transfers before interrupts are available.
PR: 221227
r322479: Add hinted attachment for non-FDT systems. Also, print a message if setting up the timer fails, because on some types of chips that's the first attempt to access the device. If the chip is missing/non-responsive then you'd get a driver that attached and didn't register the rtc, with no clue about why. On other chip types there are inits that come before timer setup, and they already print messages about errors. |
323440 |
11-Sep-2017 |
ian |
MFC r321586:
Add a debug sysctl that lets you see i2c bus traffic through this device. |
323424 |
11-Sep-2017 |
ian |
MFC r321686:
Add inline functions to convert between sbintime_t and decimal time units. Use them in some existing code that is vulnerable to roundoff errors. |
323423 |
11-Sep-2017 |
ian |
MFC r321489:
Use the MD __size_t to avoid a dependency on/include of non-MD header files. This should fix the compilation of the lua 5.3.4 port, among others. |
323422 |
11-Sep-2017 |
ian |
MFC r320928, r320929:
Support the "disable-over-current" property for imx ehci controllers. It turns out that this is more than a power optization. The OTG port won't work on boards that have this property unless this setting is honored. Also ensure that the usb phy device attaches before ehci.
Put an #ifdef notyet wrapper around a function that's not being used yet, to avoid compile warnings. |
323420 |
11-Sep-2017 |
ian |
MFC r320655, r321933:
Add a driver for the imx6 on-chip realtime clock (snvs).
The imx6_snvs driver is not strictly required for the system to run, so change it from standard to optional and add a device statement for it so that it's included unless someone uses nodevice to eliminate it. |
323419 |
11-Sep-2017 |
ian |
MFC r320460, r320461, r320462, r320463:
If an i2c transfer ends due to error, issue a stop on the bus even if the nostop option is set, if a start was issued.
Add iic_recover_bus(), a helper function that can be used by any i2c driver which is able to manipulate the clock and data lines directly. When an i2c bus is hung by a slave device stuck in the middle of a transaction that didn't complete properly, this function manipulates the clock and data lines in a sequence known to reliably reset slave devices. The most common cause of a hung i2c bus is a system reboot in the middle of an i2c transfer (so it doesnt' happen often, but now there is a way other than power cycling to recover from it).
Add bus recovery handling to the imx5/imx6 i2c driver. |
323418 |
11-Sep-2017 |
ian |
MFC r320076:
Add a driver for the imx6 EPIT timer that can be used as the system timecounter instead of the GPT timer, freeing up the more flexible GPT hardware for other uses. The EPIT driver is a standard (always in the kernel) driver, and the existing GPT driver is now optional and included only if you ask for device imx_gpt. |
323417 |
11-Sep-2017 |
ian |
MFC r320456:
Implement gpio input by reading the pad state register, not the data register. |
323410 |
11-Sep-2017 |
ian |
MFC r316664, r316670, r316972, r316996, r317033:
Add imx6ul support (applies to all files).
Add code/constants for detecting imx6ul (ultralite) chips, a species of imx6 based on a single cortex-a7 core. Other changes to imx6 drivers and support code are needed to fully support the imx6ul.
if_ffec: Add imx6ul SoC support, and get the PHY number from the FDT data. If there is no phy-handle property, fall back to using MII_PHY_ANY. This still doesn't support an mdio bus with multiple PHYs on it, or the possibility that the PHY being used by this instance of ffec is on the mdio bus of some other instance (which is now a possibility with imx6ul). Adding that support will require changes in fdt_get_phyaddr(), which is currently making some assumptions that don't work with modern fdt data. |
323404 |
10-Sep-2017 |
ian |
MFC r315589, r315591, r316659, r316661:
Eliminate unnecessary read/modify/write sequences during eventtimer setup.
Replace the hard-coded way-too-small minimum event timer period with a value calculated at runtime based on how long it takes to set up an event in hardware. This fixes the intermittant 1-minute hang at boot on imx5 systems, and also the occasional oversleeping while running. It doesn't affect imx6 systems, which use different hardware for eventtimers.
Remove some old interrupt handling workaround code from the pre-INTRNG days. At this point, INTRNG is not going away (the option may go away, but the code is not), so we no longer need code to support workarounds that handled the lack of INTRNG functionality.
Update the code that compensates for the lack of a GPC interrupt controller driver for imx6. Some newer dts source puts the GIC node at the root instead of under /soc, so look in both places. Also, sometimes the GIC node doesn't list itself as its own interrupt-parent, allow that too. |
323403 |
10-Sep-2017 |
ian |
MFC r315574, r315576, r315577:
Convert the imx5 interrupt controller driver to INTRNG.
Add INTRNG option to EFIKA_MX config, it is an imx5-based platform.
Delete our local imx53-qsb.dts file; the code now runs fine using the standard vendor-supplied file in sys/gnu/dts/arm. |
323402 |
10-Sep-2017 |
ian |
MFC r315572, r315573, r315575, r315578:
Add a module to build imx5 dtb files.
Add dtb/imx5 module build to the IMX53 kernel config.
Remove configs for IMX53-QSB and DIGI-CCWMX53. They were just standard IMX53 with static dtb added, and now that imx53 can use vendor- supplied dts files and ubldr, there is no need for a static-dtb variant. |
323401 |
10-Sep-2017 |
ian |
MFC r315530:
Remove unreferenced global function imx_gpt_get_timerfreq() and do some cleanups enabled by that. |
323400 |
10-Sep-2017 |
ian |
MFC r315490, r315508:
Make the imx5 clocks driver work with vendor-supplied dts (which does not supply the addresses for the DPLL register blocks) by hard-coding the addresses in the driver source code. Yes, this is just as bad an idea as it sounds, but we have no choice.
Remove hardcoded bootverbose=1; imx53 systems boot using loader(8) and users can set verbose if they want to. |
321343 |
21-Jul-2017 |
kib |
MFC r319873: Move struct syscall_args syscall arguments parameters container into struct thread. |
321049 |
16-Jul-2017 |
emaste |
MFC r320056: arm: set appropriate section flags for .init_pagetable
The arm kernel linker scripts place the .init_pagetable section in .bss, but .init_pagetable had no section flags set, and so did not match the expected flags for .bss.
GNU ld silently ignores this case, but lld reports an error:
ld: error: incompatible section flags for .bss >>> locore.o:(.init_pagetable): 0x0 >>> output section .bss: 0x3
PR: 220055 Sponsored by: The FreeBSD Foundation |
321039 |
16-Jul-2017 |
markj |
MFC r311204: Add some missing atomic_*_ptr #defines for arm. |
319915 |
13-Jun-2017 |
emaste |
MFC r317428 (cognet): fix arm64 MSI
In arm_gicv2m_alloc_msi(), if we found a suitable irq range, leave the loop before we increase irq again, or we'd end up choosing an irq, and then really using the next one, even if it's not available. Also in the inner loop, correct the end check so that we check every irq, even the last one. This makes the msk(4) adapter able to use MSI on Softiron Overdrive 1000.
PR: 219956 Approved by: re (gjb) |
318976 |
27-May-2017 |
hselasky |
MFC r318353: Avoid use of contiguous memory allocations in busdma when possible.
This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes.
This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes.
Updated some comments describing the code in question.
Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl Sponsored by: Mellanox Technologies |
318742 |
23-May-2017 |
mmel |
MFC r318021,r318251:
r318021: Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to another. r318251: Clarify usage rules for pmap_remap_vm_attr(). Not a functional change. |
318637 |
22-May-2017 |
mmel |
MFC r318530:
Increase maximum text segment size. LLVM binaries are huge... |
318576 |
20-May-2017 |
kib |
MFC efivar(8) (by imp):
List of revisions merged: r307070 r307071 r307072 r307074 r307189 r307224 r307339 r307390 r307391 r309776 r314231 r314232 r314615 r314616 r314617 r314618 r314619 r314620 r314621 r314623 r314890 r314925 r314926 r314927 r314928 r315770 r315771
Discussed with: gjb (re), imp Sponsored by: The FreeBSD Foundation |
318197 |
11-May-2017 |
marius |
MFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760, r315845, 315430, r317981, r315466
o Fix some overly long lines, whitespace and other bugs according to style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4).
o In the mmc(4) bridges and sdhci(4) (bus) front-ends: - Remove redundant assignments of the default bus_generic_print_child device method, - use DEVMETHOD_END, - use NULL instead of 0 for pointers.
o Trim/adjust includes.
o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges as kernel drivers and their dependency onto mmc(4).
o Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute)
Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions.
CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation.
o Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications.
o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter have been added to ports as sysutils/mmc-utils. Among others, the `mmc` tool of mmc-utils allows for partitioning eMMC devices (tested working).
o For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly.
o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required.
o In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC controllers as such in order to match the PCI one. Additionally, in the entry for the 80860F14 SDXC controller remove the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET. |
318118 |
09-May-2017 |
gonzo |
MFC r310343-r310344
r310343: [iMX6] Fix build for SSI driver and add dependency for SDMA driver
- Pass correct pointer to OF_getencprop - Check the size of "dmas" property - Add dependency on sdma driver
Reviewed by: br Differential Revision: https://reviews.freebsd.org/D8873
r310344: [iMX6] Fix SDMA driver build
- Place const modifiers where required - Make sure sdma device is attahched before consumers like SSI
Reviewed by: br Differential Revision: https://reviews.freebsd.org/D8874 |
317976 |
08-May-2017 |
gonzo |
MFC r310791:
[qemu] Fix VERSATILEPB kernel boot in QEMU broken by r300968
QEMU does not implement hardware debug registers so when dbg_monitor_is_enabled is called kernel receives "invalid instruction" exception. QEMU implements only DIDR register and on read returns all zeroes to indicate that it doesn't support other registers. Real hardware has Version bits set. |
317974 |
08-May-2017 |
gonzo |
MFC r308424, r310636
r308424: Fix locking in bcm2835_audio driver
- Move all VCHI activity to worker thread: channel methods are called with non-sleepable lock held and VCHI uses sleepable lock.
- In worker thread use sx(9) lock instead of mutex(9) for the same reason.
PR: 213801, 205979
r310636: [rpi] Fix bcm2835_audio locking and samples starvation
Rework general approach to locking and working with audio worker thread:
- Use flags to signal requested worker action - Fix submitted buffer calculations to avoid samples starvation - Protect buffer pointers with locks to fix race condition between callback and audio worker thread - Remove unnecessary vchi_service_use - Do not use lock to serialize VCHI requests since only one thread issues them now - Fix unloading signaling per hselasky@ suggestion - Add output to detect inconsistent callback data caused by possible firmware bug https://github.com/raspberrypi/firmware/issues/696 - Add stats/debug sysctls to troubleshoot possible bugs
PR: 213687, 205979, 215194 |
317188 |
20-Apr-2017 |
skra |
MFC r308569,r308570:
r308569: Always call PHYS_TO_VM_PAGE() in is_managed(). Fast road for addresses under first_page cannot be taken as this variable is connected only to vm_page_array segment. There could be more segments in system like the ones for various fictitious page ranges. These can be situated under vm_page_array segment and so, they could be skipped before this fix. However, as far as I know, there is no report associated with it. r308570: The return type of is_managed() was changed from boolean_t to bool type in r308569. Now, propagate this change further for consistency sake. |
317013 |
16-Apr-2017 |
mmel |
MFC r309538:
Fixes for NVIDIA Tegra124 clocks: - EMC clock have standard peripheral clock block. Use it. - Implement full frequency set method for PLLD2. This PLL is used as HDMI pixel clock so we must be able to set it to wide range of frequencies, within 5% tolerance allowed by HDMI specification. Due to this, full state space search (over m, n, p fields) is necessary. |
317012 |
16-Apr-2017 |
mmel |
MFC r308286,r308287:
r308286: TEGRA: Add basic driver for memory controller. For now, it only reports memory and SMMU access errors. r308287: TEGRA: Fix numerous issues in clock code. Define and export clocks related to XUSB driver. |
317006 |
16-Apr-2017 |
mmel |
MFC r306442,r306444,r306445,r306550:
r306442: TEGRA: Add support for MULTIDELAY option. r306444: TEGRA: Don't include files already included by system or arch configs. r306445: TEGRA: Return back kern_clocksource.c into tegra config file. It was removed in r306444 by mistake. r306550: TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA has been very near to old limit. |
317005 |
16-Apr-2017 |
mmel |
MFC r315900,r315973,r315974:
r315900: Cleanup structures related to VFP and/or mcontext_t. - in mcontext_t, rename newer used 'union __vfp' to equaly sized 'mc_spare'. Space allocated by 'union __vfp' is too small and cannot hold full VFP context. - move structures defined in fp.h to more appropriate headers. - remove all unused VFP structures. r315973: Save VFP state on fork(). Update the copy of VFP state in PCB before it is cloned for new process. r315974: Preserve VFP state across signal delivery. |
317004 |
16-Apr-2017 |
mmel |
MFC r303261,r315059:
r303261: Add more UEFI/e820 memory types from latest specifications. r315059: Split overbloated machep.c to multiple files and do basic cleanup of these fragments. |
317003 |
16-Apr-2017 |
mmel |
MFC r306704,r308406:
r306704: ARM: Remove next bunch of unused cpu_functions from ARMv6. r308406: Only include sys/boot.h if LINUX_BOOT_ABI is defined |
317002 |
16-Apr-2017 |
mmel |
MFC r306631,r306640,r306641,r306650,r306656:
r306631: Use C99 designated initializers to create the armv6 cpu_functions structs. This will help with a later cleanup of what functions we implement. r306640: Only define the CF_* macros on ARMv4/v5. They are unused on armv6. r306641: Remove the parts of cpu_functions from armv6 that are unused on that architecture. r306650: Add the Cortex-A{53,57,72} ID register values. These can all run 32-bit code so could run a 32-bit kernel. r306656: Use the cortex functions when booting on one of the Cortex-A ARMv8 CPUs. This list is incomplete, however we don't have the ID values for the missing Cortex-A32 or A35. |
316576 |
06-Apr-2017 |
kib |
Improvements for the brand detection and prioritization.
MFC r315701 (by ed): Set the interpreter path to /nonexistent.
MFC r315749: Adjust r314851 to not require every brand to specify interpreter path.
MFC r315753: Add a flag BI_BRAND_ONLY_STATIC to specify that the brand only matches static binaries.
MFC r315754: Update r315753 with the proper flag name.
MFC r316211: A followup to r315749, two more places where brand->interp_path was accessed unconditionally. |
316574 |
06-Apr-2017 |
ed |
Bring kernel space CloudABI code in sync with HEAD.
MFC r312353, r312354 and r312355:
Sync in the latest CloudABI generated source files.
Languages like C++17 and Go provide direct support for slice types: pointer/length pairs. The CloudABI generator now has more complete for this, meaning that for the C binding, pointer/length pairs now use an automatic naming scheme of ${name} and ${name}_len.
Apart from this change and some reformatting, the ABI definitions are identical. Binary compatibility is preserved entirely.
MFC r315700:
Make file descriptor passing work for CloudABI's sendmsg().
Reduce the potential amount of code duplication between cloudabi32 and cloudabi64 by creating a cloudabi_sock_recv() utility function. The cloudabi32 and cloudabi64 modules will then only contain code to convert the iovecs to the native pointer size.
In cloudabi_sock_recv(), we can now construct an SCM_RIGHTS cmsghdr in an mbuf and pass that on to kern_sendit().
MFC r315736:
Make file descriptor passing for CloudABI's recvmsg() work.
Similar to the change for sendmsg(), create a pointer size independent implementation of recvmsg() and let cloudabi32 and cloudabi64 call into it. In case userspace requests one or more file descriptors, call kern_recvit() in such a way that we get the control message headers in an mbuf. Iterate over all of the headers and copy the file descriptors to userspace. |
316570 |
06-Apr-2017 |
ed |
MFC r315861:
Stop providing the compat_3_brand.
As of r315860, the ELF image activator works fine for CloudABI without it. |
315874 |
23-Mar-2017 |
mjg |
MFC r312932,r312933,r312949,r313141
(by cognet)
Use strexeq instead of needlessly branch.
==
(by cognet)
Remove useless labels.
==
(by cognet)
Correct the IT instruction in atomic_fcmpset_64().
==
(by andrew)
Only define atomic_fcmpset_long in the kernel. We may include machine/atomic.h in userspace, however atomic_fcmpset_32 is unimplemented there. |
315371 |
16-Mar-2017 |
mjg |
MFC r311169,r311898,r312925,r312973,r312975,r313007,r313040,r313080, r313254,r313341
amd64: add atomic_fcmpset
==
sparc64: add atomic_fcmpset
==
Implement atomic_fcmpset_* for arm and arm64.
==
Add atomic_fcmpset_*() inlines for powerpc
Summary: atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the read value from the target memory location into the 'old' pointer in the case of failure.
==
i386: add atomic_fcmpset
==
Don't retry a lost reservation in atomic_fcmpset()
The desired behavior of atomic_fcmpset_() is to always exit on error. Instead of retrying on lost reservation, leave the retry to the caller, and return
==
Add atomic_fcmpset_*() inlines for MIPS
atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the read value from the target memory location into the 'old' pointer.
==
i386: fixup fcmpset
An incorrect output specifier was used which worked with clang by accident, but breaks with the in-tree gcc version.
While here plug a whitespace nit.
==
Implement atomic_fcmpset_*() for RISC-V.
==
Use 64bit store instruction in atomic_fcmpset_64. |
315366 |
16-Mar-2017 |
ian |
MFC r310189:
Fix sscanf() format string to match an argument. This also fixes kernel build after r310171. |
314540 |
02-Mar-2017 |
ian |
MFC r312679:
Handle imx6 erratum ERR004346... to reboot, clear the SRS bit twice within the same cycle of the 32khz clock.
I've never actually noticed this error happening, but it's an easy fix. |
314530 |
02-Mar-2017 |
ian |
MFC r312292, r313573:
Stop including sys/types.h from arm's machine/atomic.h, fix the places where atomic.h was being included without ensuring that types.h (via param.h) was included first, as required by atomic(9).
Remove arm's cpuconf.h, and references to it, after moving a few lines from it into pmap-v4.h where they are used. Other than those few lines of support for different MMU types, nothing in cpuconf.h has been used in our code for quite a while. The file existed to set up a variety of symbols to describe the architecture. Over the past few years we have converted all of our source to use the new architecture symbols standardized by ARM Inc, and predefined by both clang and gcc. |
314526 |
01-Mar-2017 |
ian |
MFC r312251:
Remove a bit of armv6 support that didn't get deleted when this file was split from trap.c into trap-v4.c and trap-v6.c. |
314525 |
01-Mar-2017 |
ian |
MFC r306901:
ARM: Split identify_arm_cpu() into ARMv4 and ARMv6 variant. On ARMv6, be more verbose about supported CPU features and/or optional instructions. |
314521 |
01-Mar-2017 |
ian |
MFC r302506:
Remove HZ=<various> from all armv6 configs, put HZ=1000 in std.armv6. |
314515 |
01-Mar-2017 |
ian |
MFC r313917:
Change the naming of imx{5,6} gpio pins to exactly match the names used in the reference manual. |
314514 |
01-Mar-2017 |
ian |
MFC r314064, r314060:
Fix typos in bootverbose printfs... display the write-protect pin info, not the card-detect pin info.
Remove a variable that has been unused since r311735 (it should have been removed as part of those changes). |
314513 |
01-Mar-2017 |
ian |
MFC r313674:
Enable usb low and full speed devices connected to the imx6 root hubs. |
314512 |
01-Mar-2017 |
ian |
MFC r312859:
Configure the timer capture pin to input mode in the timer control register, in addition to configuring it as input with the pinmux driver.
There was a control register bit commented as "no desc in datasheet". A later revision of the manual reveals the bit to be an input/output control for the timer pin. In addition to configuring capture or pulse mode, you apparently have to separately configure the pin direction in the timer control register.
Before this change, the timer block was apparently driving a signal onto a pad configured by pinmux as input. Capture mode still accidentally worked for me during testing because I was using a very strong signal source that just out-muscled the weaker drive from the misconfigured pin. |
314510 |
01-Mar-2017 |
ian |
MFC r308186, r308188, r308231, r308232:
Move imx_sdhci driver over to a dev/sdhci in preparation for QorIQ support. Freescale uses eSDHC in both i.MX (ARM) and QorIQ (PowerPC), with slight differences. This is part one in unifying the drivers.
Merge i.MX and PowerPC SDHCI drivers Summary: i.MX5 and PowerPC use a very similar eSDHC controller, which is also similar to the uSDHC controller used by i.MX6. The imx_sdhci driver works almost completely with PowerPC, with some minor tweaks.
Fix the build. protctl is only used on powerpc. While here, remove the need to check the SVR SPR, as others may be compatible with the p1022-esdhc type.
Since it's no longer accessing a powerpc-specific register, drop the #ifdef. |
314508 |
01-Mar-2017 |
ian |
MFC r311734, r311735, r311951, r314071:
Add new helper routines for sdhci bridge drivers that use gpio pins for card presence and write protect switch detection.
Use the new sdhci_fdt_gpio helper functions to add full support for FDT gpio pins for detecting card insert/remove and write protect for ti_sdhci.
Include sys/systm.h for use of bootverbose.
Revert to ti_sdhci driver's historic behavior: assume an sd card is writable if the fdt data doesn't provide a gpio pin for reading the write protect switch and also doesn't contain a "wp-disable" property. |
314506 |
01-Mar-2017 |
ian |
MFC r306262, r306267, r310021: (needed to avoid conflicts on later merges)
Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only need this on a few earlier arm SoCs.
Restrict where we need to define fdt_fixup_table to just PowerPC and Marvell.
Add the missing void to function signatures in much of the arm code. |
314503 |
01-Mar-2017 |
ian |
MFC r308640:
Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read integer data from the device tree. |
314296 |
26-Feb-2017 |
kib |
MFC r313933, r313939, r313966: Microoptimize pmap_protect_pde() on amd64, i386 and pmap_protect_pte1() on armv6. |
313989 |
20-Feb-2017 |
kib |
MFC r313345: Update arm and arm64 counters MD bits.
MFC r313394 (by manu): subr_sfbus.c need sys/proc.h for struct thread definition. |
313766 |
15-Feb-2017 |
jah |
MFC r312610, r312792
r312610: Like r310481 for i386, move the objects used to create temporary mappings for armv6 pmap zero and copy operations to the MD PCPU region. Change sysmap initialization to only allocate KVA pages for CPUs that are actually present.
While here, collapse CMAP3 into CMAP2 (their use was mutually exclusive anyway) and "recover" some space in PCPU padding that has always been available due to 64-byte cacheline padding.
r312792: Further cleanup of per-CPU armv6 pmap data:
- Replace pcpu_find(curcpu) with get_pcpu(), which is much more direct.
- Remove armv4 pcpu fields which I added in r286296 but never needed to use.
- armv6 pc_qmap_addr was leftover from the old armv6 pmap implementation. Rename it and put it to use in the new one. |
313574 |
11-Feb-2017 |
kib |
MFC r313194: Define the vm_ooffset_t and vm_pindex_t types as machine-independend. |
312762 |
25-Jan-2017 |
loos |
MFC r312604 and r312605:
Simplify the handling of small packets padding in cpsw: - Pad small packets to 60 bytes and not 64 (exclude the CRC bytes); - Pad the packet using m_append(9), if the packet has enough space for padding, which is usually true, it will not be necessary append a newly allocated mbuf to the chain.
Suggested by: yongari
MFC r312608:
Handle the rx queue stall while reading the packets from NIC (when the descriptor state will not change anymore). This seems to eliminate the race where we can miss a stalled queue under high load.
While here remove the unnecessary curly brackets.
Reported by: Konstantin Kormashev <konstantin@netgate.com>
MFC r312636:
Properly assemble an mbuf chain out of received fragments.
Remove the rx_batch hack, it makes no difference now that most of bugs have been sorted out.
MFC r312637:
Be a little more pedantic here, the TRM says the hardware is supposed to only clean the OWNER bit on SOP descriptors.
Sponsored by: Rubicon Communications, LLC (Netgate) |
312761 |
25-Jan-2017 |
loos |
MFC r312411:
Handle the set capabilities ioctl, letting the hardware checksum be disabled (Hi netmap!).
Only remove the CRC bytes from packets when the hardware tell us to do so.
Fixes the 'discard frame w/o leading ethernet header' issues.
Sponsored by: Rubicon Communications, LLC (Netgate) |
312757 |
25-Jan-2017 |
loos |
MFC r312408:
The port number and the to_port_en flag are valid only on SOP descriptor.
Sponsored by: Rubicon Communications, LLC (Netgate) |
312394 |
18-Jan-2017 |
jhb |
MFC 307332,312086: Drop support for using mmap() with /dev/kmem.
307332: Drop support for using mmap() with /dev/kmem.
Using the device pager with /dev/kmem is not stable since KVA mappings are transient, but the device pager caches the PA associated with a given offset forever. Interestingly, mips' implementation of memmap() already refused requests for /dev/kmem.
Note that kvm_read/kvm_write do not use mmap, but use read and write on /dev/kmem, so this should not affect libkvm users.
312086: Trim a few comments on platforms that did not implement mmap of /dev/kmem.
After r307332, no platforms implement mmap for /dev/kmem, so the lack of it for these platforms is no longer unique. |
311564 |
06-Jan-2017 |
gonzo |
MFC r309999, r310012
r309999: [iMX6] Fix platform compatibility string for i.MX6 Dual
i.MX6 Dual boot was broken since r308533 because ofw_bus_node_is_compatible is more strict than fdt_is_compatible and does not accept partial matches
r310012: [iMX6] Add compatibility string for GPT timer on i.MX6 Dual
Up until r295436 GPT timer in i.MX6 Dual dts used the same compatiblity string as i.MX6 Quad. After the sync up with Linux in r295436, GPT timer stopped getting attached on the i.MX6 Dual |
311203 |
04-Jan-2017 |
loos |
Fixes the sensor initialization, always reset the digital outputs on start.
Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) |
310882 |
31-Dec-2016 |
loos |
MFC r309345:
The RX_FREEBUFFER registers are a write to increment field. Writing the full queue size to it every time was makeing it overflow with a lot of bogus values.
This fixes the interrupt storms on irq 40.
MFC r309347:
MDIO_PHYACCESS_ACK is only valid for read access, remove it from miibus_writereg.
Reduce the DELAY() between reads while waiting for MII access.
Spotted by: yongari
Sponsored by: Rubicon Communications, LLC (Netgate) |
310881 |
31-Dec-2016 |
loos |
MFC r309113:
Add the etherswitch(4) support for TI CPSW. Adds VLAN and port management abilities for etherswitchcfg(8).
The code is conditionally enabled for now, because it is not necessary on single ethernet use cases.
Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) |
310862 |
30-Dec-2016 |
loos |
MFC r308692:
Fix ti_gpio_detach() to avoid crashing if something goes wrong.
Sponsored by: Rubicon Communication, LLC (Netgate) |
310860 |
30-Dec-2016 |
loos |
MFC r306717:
if_cpsw overhaul: - Fix RX and TX teardown: . TX teardown would not reclaim the abandoned descriptors; . Interrupt storms in RX teardown; . Fixed the acknowledge of the teardown completion interrupt.
- Remove temporary lists for the descriptors;
- Simplified the descriptor handling (less writes and reads from descriptors where possible);
- Better debug;
- Add support for the RX threshold interrupts: With interrupt moderation only, an RX overrun is likely to happen. The RX threshold is set to trigger a non paced interrupt everytime your RX free buffers are under the minimum threshold, helping to prevent the rx overrun.
The NIC now survive when pushed over its limits (where previously it would lock up in a few seconds).
uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap pkt-gen as source and sink). TCP forwarding rate is over 350Mb/s.
No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC) for his fast ethernet.
Tested on: uFW, BBB Sponsored by: Rubicon Communications, LLC (Netgate) |
310859 |
30-Dec-2016 |
loos |
MFC r306654:
Enable the TX completion interrupt for the cpsw NIC to assure the free tx descriptors are reclaimed as soon as possible.
Without this the free buffers are reclaimed only on watchdog runs or after trying to enqueue more packets.
Sponsored by: Rubicon Communications, LLC (Netgte) |
310858 |
30-Dec-2016 |
loos |
MFC of r306388, r306510, r306511 and r306513:
Fix a typo.
Sort and remove unnecessary includes.
Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls with CPSW_DEBUG().
Remove the GLOBAL queue lock which just adds unnecessary complexity to code (when used together with the individual tx and rx locks).
Sponsored by: Rubicon Communications, LLC (Netgate) |
310857 |
30-Dec-2016 |
loos |
MFC r306376:
Add a sysctl to control the interrupt pacing on AM335x integrated switch. The hardware can be set to limit the number of interrupts from 2 to 63 interrupts per ms.
To keep the compatibility with the TI documentation the sysctl take the interval between the interrupts pulses: 16~500 us.
Sponsored by: Rubicon Communications, LLC (Netgate) |
310856 |
30-Dec-2016 |
loos |
MFC of r305114, r305115 and r305149:
Allow the use of control module extensions to cope with specific platform features.
Add a driver for the AM335x bandgap sensor, an on-die temperature sensor as part of the AM335x control module extension.
TI says that the bandgap sensor is not very accurate on AM335x, but in our tests it seems to be a good reference for the SoC temperature.
TI details: http://processors.wiki.ti.com/index.php/AM335x_Thermal_Considerations#Measuring_Case_Temperature
Sponsored by: Rubicon Communications, LLC (Netgate) |
310855 |
30-Dec-2016 |
loos |
MFC of r305112, r305113, r305119, r305141 and r305432:
Replace magic numbers with the proper register names.
Fix the build, revert r305119, move the control module register data to am335x_scm.h and fix if_cpsw.c to include the correct header.
Sponsored by: Rubicon Communications, LLC (Netgate) |
310852 |
30-Dec-2016 |
loos |
MFC of r303230, r303253 and r303420:
Add support for the Microchip/Micrel KSZ9031 Gigabit Ethernet PHY.
Enable the build of micphy as part of generic miibus build, but only for FDT enabled systems.
The Micrel PHYs reads the optional external delays from DTB.
Tested on uBMC and uFW.
Sponsored by: Rubicon Communications (Netgate) |
310851 |
30-Dec-2016 |
loos |
MFC r303227
Remove unused USB ethernet driver from BEAGLEBONE/AM335x kernel. |
310158 |
16-Dec-2016 |
manu |
MFC r309935:
Use the spibus accessor when applicable. |
310157 |
16-Dec-2016 |
manu |
MFC r309063:
Test that the emac device is enabled in probe function |
310156 |
16-Dec-2016 |
manu |
MFC r309912:
CS ivar is uint32_t, not int. |
309771 |
09-Dec-2016 |
manu |
MFC r302785, r308300, r308441
r302785 (jmcneill): H3/A83T: Use PLL_PERIPH/2 for AHB2 parent clock.
Reviewed by: manu
r308300: For AHB clock we need to set the assigned parents for cpufreq(4) to work.
r308441: Do not fail to attach the clock if we cannot set the assigned parents as this property isn't mandatory. |
309767 |
09-Dec-2016 |
manu |
MFC r304796, r308233 (jmcneill)
r304796: Switch parent clock when setting frequency if a new parent is a better candidate for the target rate.
Reviewed by: andrew, manu
r308233: The DTS may report fewer than 4 parents for a module clock. Avoid setting the module clock parent to an out-of-range index in these cases. |
309765 |
09-Dec-2016 |
manu |
MFC r302587 (jmcneill):
Include sys/rman.h to fix build on arm64. |
309764 |
09-Dec-2016 |
manu |
MFC r302584 (jmcneill):
Remove unused bus_space prototypes. |
309763 |
09-Dec-2016 |
manu |
MFC r302586 (jmcneill):
Attach RSB early. Children of RSB may provide resources necessary for other devices such as interrupts, GPIOs, and regulators. |
309762 |
09-Dec-2016 |
manu |
MFC r304795, r307366 (jmcneill):
r304795: Add support for Allwinner multi-parent bus gates.
Reviewed by: andrew, manu
r307366: Match "allwinner,sun8i-h3-apb0-gates-clk" compatible string. |
309761 |
09-Dec-2016 |
manu |
MFC r305058 (jmcneill):
Add support for Allwinner A64 watchdog timer. |
309760 |
09-Dec-2016 |
manu |
MFC r302585 (jmcneill):
Build fix for arm64. The phy interface uses intptr_t for the "phy" parameter, not int. |
309759 |
09-Dec-2016 |
manu |
MFC r308235 (jmcneill):
Register the device's xref handle at attach time. |
309758 |
09-Dec-2016 |
manu |
MFC r308309:
Add support for AXP221 Power Management Unit.
AXP221 is used on board with A31/A31S and is mostly compatible with AXP209. Regulators, GPIO and Sensors are supported. |
309757 |
09-Dec-2016 |
manu |
MFC r305349 (jmcneill):
Add support for reading root key on A83T/A64. |
309756 |
09-Dec-2016 |
manu |
MFC r308704-r308705 (jmcneill)
r308704: Allow the MMC frequency to be set up to 52MHz for MMC high speed timings.
r308705: On command error, reset only DMA and FIFO engines instead of the entire controller. Fixes eMMC device detection on OrangePi Plus 2e (and likely others). |
309755 |
09-Dec-2016 |
manu |
MFC r309029:
Do not attempt to disable/release clock if it had not been enabled. While here fix a style(9) issue. |
309754 |
09-Dec-2016 |
manu |
MFC r304793 (jmcneill):
Remove dependency on allwinner_soc_family() as it is not available on arm64. |
309753 |
09-Dec-2016 |
manu |
MFC r306479 (mmel):
ALLWINNER: ahci_devclass is local variable, don't export it. |
308401 |
07-Nov-2016 |
hselasky |
MFC r307518: Fix device delete child function.
When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic().
Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning.
While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers.
Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070 |
308382 |
06-Nov-2016 |
gonzo |
MFC r306899, r307059, r307151
r306899: Fix release MSI method for ARM GIC
r307059: INTRNG - fix MSI/MSIX release path
Use isrc in attached MSI data structure instead of using map's isrc directly. map's isrc is set to NULL on IRQ deactivation which happens prior to pci_release_msi so MSI_RELEASE_MSI receives array of NULLs
Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D8206
r307151: INTRNG: Propagate IRQ activation error to API consumer
Keep resource state consistent with INTRNG state - if intr_activate_irq fails - deactivate resource and propagate error to calling function
Reviewed by: mmel |
308374 |
06-Nov-2016 |
mmel |
MFC r306551,r307557:
r306551: TEGRA: Fix bindings for cpufreq and coretemp drivers, it was broken in r306477. Correct a description for coretemp driver. r307557: TEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC. It's needed by GENERIC kernel. |
308341 |
05-Nov-2016 |
manu |
Remove A10 kernel config file, this should have been done in rr308273 |
308337 |
05-Nov-2016 |
mmel |
MFC r306897,r306898:
r306897: Fix MSI allocation for NVidia Tegra r306898: Fix release MSI method for NVidia Tegra PCI controller |
308336 |
05-Nov-2016 |
mmel |
MFC r307556,r307637:
r307556: TEGRA: Really implement early printf. The original version was cut&pasted from another SoC. r307637: TEGRA: Raise minimum voltage for CPU, original 0.9 V was too optimistic. While I'm in, remove duplicated line from CPU frequency table. |
308335 |
05-Nov-2016 |
mmel |
MFC r306447,r306477:
r306447: TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static. r306477: TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel. - use DEFINE_CLASS_0() for driver classes - unify driver names - cleanup driver definitions and bindings |
308334 |
05-Nov-2016 |
mmel |
MFC r302961,r304460,r304461:
r302961: TEGRA: Subclass Tegra PCIE driver from ofw_pci base driver. Remove now redundant code. r304460: TEGRA: Implement MSI/MSIX interrupts for pcie controller. r304461: TEGRA: Remove forgotten debug printf. |
308333 |
05-Nov-2016 |
mmel |
MFC r304459,r305527:
r304459: INTRNG: Rework handling with resources. Partially revert r301453. - Read interrupt properties at bus enumeration time and store it into global mapping table. - At bus_activate_resource() time, given mapping entry is resolved and connected to real interrupt source. A copy of mapping entry is attached to given resource. - At bus_setup_intr() time, mapping entry stored in resource is used for delivery of requested interrupt configuration. - For MSI/MSIX interrupts, mapping entry is created within pci_alloc_msi()/pci_alloc_msix() call. - For legacy PCI interrupts, mapping entry must be created within pcib_route_interrupt() by pcib driver itself. r305527: Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459 |
308328 |
05-Nov-2016 |
mmel |
MFC r307558:
REGULATOR: Move functions for handling with regulator ranges to common file. They can be useful for other PMICs. |
308327 |
05-Nov-2016 |
mmel |
MFC r306667,r306668:
r306667: ARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7. r306668: ARM: Add mising early clobber modifier in atomic_swap_32(). |
308326 |
05-Nov-2016 |
mmel |
MFC r306666:
TEGRA: Fix PCIe link timeout. |
308325 |
05-Nov-2016 |
mmel |
MFC r306902:
ARM: Remove unused includes. |
308324 |
05-Nov-2016 |
mmel |
MFC r302523,r302528:
r302523: Add clk_get_by_ofw_node_index, which is like clk_get_by_ofw_index but operates on a specific OF node instead of the pass in device's OF node. r302528: EXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions. In some cases, the driver must handle given properties located in specific OF subnode. Instead of creating duplicate set of function, add 'node' as argument to existing functions, defaulting it to device OF node. |
308280 |
04-Nov-2016 |
manu |
MFC r305689:
a10_mmc: Remove completly the PIO code now all access is done by DMA. Rename registers as in the manual. Do a hard reset of the controller before a soft one. Since DMA is always used remove dependancy on allwinner_soc_family, it was used to differentiate SoC as the fdt compatible string were the same.
Tested on A10, A20, H3 and A64.
Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D6868 |
308279 |
04-Nov-2016 |
manu |
MFC r302522, r302591-r302592 (by jmcneill)
r302522: Align descriptors and data buffers to 32 bits. This restriction is described in the A20 (and later) user manuals.
r302591: Add support for arm64. The allwinner_soc_family() function is not available on arm64 and all SoCs using the old FIFO register location are 32-bit only, so unconditionally use the new location for arm64.
Reviewed by: andrew, manu
r302592: Return early from bus_dmamap_load callback if the error indicator is set.
Reviewed by: andrew, manu |
308277 |
04-Nov-2016 |
manu |
MFC r305739-r305740
r305739: Use "generic" ALLWINNER_UP kernel config for Cubieboard release.
Reviewed by: gjb MFC after: 2 week
r305740: Remove CUBIEBOARD kernel config file. Every Allwinner board should either use ALLWINNER (SMP) or ALLWINER_UP kernel config files.
MFC after: 2 week |
308276 |
04-Nov-2016 |
manu |
MFC r304710:
Allwinner: Add thermal sensor driver for A10/A20 The thermal sensor lives in the touch screen controller. Touch screen part isn't done for now. Temperature is read every ~2 seconds and exposed via sysctl. |
308275 |
04-Nov-2016 |
manu |
MFC r304566:
allwinner: Remove a20/a20_cpu_cfg.c from the build. This was needed when we used the SoC specific timer and not the generic-timer. |
308274 |
04-Nov-2016 |
manu |
MFC r304318, r304464
r304318: Rename allwinner_machdep.{c.h} to aw_machdep.{c.h} as all allwinner source files are name aw_*
r304464: Allwinner: Move a10_padconf.c into a10 subdirectory. |
308273 |
04-Nov-2016 |
manu |
MFC r304316:
Rename kernel config A10 into ALLWINNER_UP as it is intend to work with all Allwinner Uniprocessor SoC. As of now it works with A10 and A13 (and possibly R8 as it is the same as the A13). Move files.a10 into a1o subdirectory as it should be. Rename std.a10 into std.allwinner_up |
307885 |
24-Oct-2016 |
manu |
MFC r307379:
axp209: Add support for regulators
Except for LDO4, all regulators are supported. |
307778 |
22-Oct-2016 |
gonzo |
MFC r306860:
Add multitouch support for RPi's FT5406
- Add multitouch support (protocol B) - Report physical size of the screen - Switch from using busy loop to callbacks - Enable callbacks only when there is active listener on /dev/input/eventX
Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> |
307776 |
22-Oct-2016 |
gonzo |
MFC r306618, r306619
r306618: Fix attach/detach methods
- Initialize lock before starting worker process - Do not hold lock when destroying evdev. By that time ther should be no other active code pathes that can access softc
r306619: Add rpi_ft5406 module and add it to extra modules in Raspberry Pi configs |
307775 |
22-Oct-2016 |
gonzo |
MFC r306530, r306531, r306532, r306579:
r306530: Declare a module for evdev and add dependency to ukbd(4) and ums(4)
Prepare for making evdev a module. "Pure" evdev device drivers (like touchscreen) and evdev itself can be built as a modules regardless of "options EVDEV" in kernel config. So if people does not require evdev functionality in hybrid drivers like ums and ukbd they can, for instance, kldload evdev and utouchscreen to run FreeBSD in kiosk mode.
r306531: Add dependency to evdev module (if required)
r306532: Add dependency to evdev module
r306579: Modularize evdev
- Convert "options EVDEV" to "device evdev" and "device uinput", add modules for both new devices. They are isolated subsystems and do not require any compile-time changes to general kernel subsytems - For hybrid drivers that have evdev as an optional way to deliver input events add option EVDEV_SUPPORT. Update all existing hybrid drivers to use it instead of EVDEV - Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION is enough - Add evdev module dependency to uinput
Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> |
307767 |
22-Oct-2016 |
gonzo |
MFC r306430
Add touchscreen support for the official 7" RPi touch display
Technically touchscreen chip is FT5406 but all hardware communication is performed by VideCore and only final results are presented to ARM part through memory region shared between VC and ARM.
evdev is used as userland interface. FT5406 supports up to 10 touchpoints, but for now driver emulates single touch device because I do not have GUI bits to test this functionality.
Driver is not enabled in default config for RPI and RPI2
Tested with: evdev-dump, tslib |
307762 |
22-Oct-2016 |
gonzo |
MFC r305708, r305719
r305708: Add evdev support to TI ADC/touchscreen driver
Add generic evdev support to touchscreen part of ti_adc: two absolute coordinates + button touch to indicate pen position. Pressure value reporting is not implemented yet.
Tested on: Beaglebone Black + 4DCAPE-43T + tslib
r305719: Cleanup evdev support for TI ADC/TS
- evdev_set_methods call is not required if actual methods are no-ops - evdev_set_serial is also optional if there is no meaningful input device identifier - evdev_set_id on the other hand is mandatory, so set virtual bus with dummy vendor/product/version
Suggested by: Vladimir Kondratiev |
307601 |
19-Oct-2016 |
gonzo |
MFC r307239:
Fix BCM283x(Raspberry Pi) SDHCI driver for ARM64 build
- Revert BUS_SPACE_PHYSADDR back to rman_get_start. BUS_SPACE_PHYSADDR was introduced in 2013 as temporary wrapper until proper solution appears. It's ARM only and since we need this file for ARM64 build and no proper API has been introduced - just revert the change and make sure it's going to appear when people grep for BUS_SPACE_PHYSADDR in sources.
- Fix printf format for size_t variables |
307596 |
19-Oct-2016 |
gonzo |
MFC r306557, r307240, r307241:
r306557: Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer
VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer memory that prevents pixel data from being stuck in cache until evicition happens
r307240: Fix BCM238x framebuffer driver build for ARM64
VM_MEMATTR_WRITE_COMBINING can be undefined for some platforms, use it only if it's defined
r307241: Do not set FB_FLAG_MEMATTR if VM_MEMATTR_WRITE_COMBINING is not available
Pintyhat to: gonzo Spotted by: jmallett |
307575 |
18-Oct-2016 |
gonzo |
MFC r307067, r307068, r307087, r307088, r307089, r307091, r307092, r307093, r307095, r307098, r307115:
r307067: Make intc driver compatible with upstream DTS
- Fix compatibility strings - Properly decode upstream's two-cell interrupt specs. Our home-made dts does not have two-cell interrupts so no need to preserve backward compatibility
r307068: Make Rapsberry Pi watchdog driver compatible with upstream DTS
- Fix compatibility strings - Compensate the difference in base address for our custom DTS and upstream one (for backward compatibility)
r307087: Make sure intc is attached before interrupt consumers
If pass order is not specified devices are attached in the order they are defined in dts. Some interrupt consumers may be defined before intc. Also make sure intc interrupt-parent local_intc is attached before intc itself.
r307088: Add compatible strings used in upstream dts files
r307089: Make framebuffer driver compatible with upstream DT
- Add compatibility string - Add simplebus as possible parent bus
r307091: Add compatibility string from upstream DT
r307092: Make BCM2835 GPIO driver compatible with upstream DT
- Add compatibility string - Make reserverd and read-only properties optional
r307093: Make BCM283x USB driver compatible with upstream DT
- Make resource allocation logic depend on compatibility string to check what format of DTS node should be used - FreeBSD's or upstream
r307095: Make VCHI driver compatible with upstream DT
- Add compatibility string - Compensate difference in base address between our custom DTB and upstream one
r307098: Make BCM28x USB driver compatible with upstream device tree
This should have been committed in r307093: resource allocation depends on source of the device tree. upstream dts has extra interrupt that we can ignore
r307115: Fix typo in comment
Spotted by: loos |
307345 |
15-Oct-2016 |
mmel |
MFC r306759:
ARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6 specific file. Consistently use BUSDMA_DCACHE_ALIGN for cache line alignment. |
307344 |
15-Oct-2016 |
mmel |
MFC r306756:
ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it directly. |
307342 |
15-Oct-2016 |
mmel |
MFC r306755:
ARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores. Not a functional change. |
307341 |
15-Oct-2016 |
mmel |
MFC r306754:
ARM: Remove unused variable. Not a functional change. |
307144 |
12-Oct-2016 |
ed |
MFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554, r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564, r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886, r304991, r305928, r305938, r305987, r306185:
Bring CloudABI support back in sync with HEAD.
- Add support for running 32-bit executables on amd64, armv6 and i386.
- As these new architectures require the use of the vDSO, merge back vDSO support for 64-bit executables running on amd64 and arm64 as well. This has the advantage that support for vDSO-less execution can be phased out when 11.0 becomes unsupported, as opposed to 11.x.
This change has been tested by running the cloudlibc unit tests on all supported architectures, which seems to work fine. |
307136 |
12-Oct-2016 |
ed |
MFC r306162:
Make it possible to safely use TPIDRURW from userspace.
On amd64, arm64 and i386, we have the possibility to switch between TLS areas in userspace. The nice thing about this is that it makes it easier to do light-weight threading, if we ever feel like doing that. On armv6, let's go into the same direction by making it possible to safely use the TPIDRURW register, which is intended for this purpose.
Clean up the ARMv6 code to remove md_tp entirely. Simply add a dedicated field to the PCB to hold the value of TPIDRURW across context switches, like we do for any other register. As userspace currently uses the read-only TPIDRURO register, simply ensure that we keep both values in sync where possible. The system calls for modifying the read-only register will simply write the intended value into both registers, so that it lazily ends up in the PCB during the next context switch.
Approved by: andrew Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D7951 |
306907 |
09-Oct-2016 |
jmcneill |
MFC r306658: Clear GT_CTRL_ENABLE to stop the timer. |
306664 |
04-Oct-2016 |
jhb |
MFC 303522,303647,303860,303880,304168,304169,304170,304479,304485,305549: Chelsio T4/T5 VF driver.
303522: Various fixes to the t4/5nex character device.
- Remove null open/close methods. - Don't set d_flags to 0 explicitly. - Remove t5_cdevsw as the .d_name member isn't really used and doesn't warrant a separate cdevsw just for the name. - Use ENOTTY as the error value for an unknown ioctl request. - Use make_dev_s() to close race with setting si_drv1.
303647: Store the offset of the KDOORBELL and GTS registers in the softc.
VF devices use a different register layout than PF devices. Storing the offset in a value in the softc allows code to be shared between the PF and VF drivers.
303860: Reserve an adapter flag IS_VF to mark VF devices vs PF devices.
303880: Track the base absolute ID of ingress and egress queues.
Use this to map an absolute queue ID to a logical queue ID in interrupt handlers. For the regular cxgbe/cxl drivers this should be a no-op as the base absolute ID should be zero. VF devices have a non-zero base absolute ID and require this change. While here, export the absolute ID of egress queues via a sysctl.
304168: Make SGE parameter handling more VF-friendly.
Add fields to hold the SGE control register and free list buffer sizes to the sge_params structure. Populate these new fields in t4_init_sge_params() for PF devices and change t4_read_chip_settings() to pull these values out of the params structure instead of reading registers directly. This will permit t4_read_chip_settings() to be reused for VF devices which cannot read SGE registers directly.
While here, move the call to t4_init_sge_params() to get_params__post_init(). The VF driver will populate the SGE parameters structure via a different method before calling t4_read_chip_settings().
304169: Update mailbox writes to work with VF devices.
- Use alternate register locations for the data and control registers for VFs. - Do a dummy read to force the writes to the mailbox data registers to post before the write to the control register on VFs. - Do not check the PCI-e firmware register for errors on VFs.
304170: Add support for register dumps on VF devices.
- Add handling of VF register sets to t4_get_regs_len() and t4_get_regs(). - While here, use t4_get_regs_len() in the ioctl handler for regdump instead of inlining it.
304479: Add structures for VF-specific adapter parameters.
While here, mark which parameters are PF-specific and which are VF-specific.
304485: Reorder sysctls so that nodes shared with the VF driver are added first.
This permits a single early return for VF devices in the routines that add sysctl nodes.
305549: Chelsio T4/T5 VF driver.
The cxgbev/cxlv driver supports Virtual Function devices for Chelsio T4 and T4 adapters. The VF devices share most of their code with the existing PF4 driver (cxgbe/cxl) and as such the VF device driver currently depends on the PF4 driver.
Similar to the cxgbe/cxl drivers, the VF driver includes a t4vf/t5vf PCI device driver that attaches to the VF device. It then creates child cxgbev/cxlv devices representing ports assigned to the VF. By default, the PF driver assigns a single port to each VF.
t4vf_hw.c contains VF-specific routines from the shared code used to fetch VF-specific parameters from the firmware.
t4_vf.c contains the VF-specific PCI device driver and includes its own attach routine.
VF devices are required to use a different firmware request when transmitting packets (which in turn requires a different CPL message to encapsulate messages). This alternate firmware request does not permit chaining multiple packets in a single message, so each packet results in a firmware request. In addition, the different CPL message requires more detailed information when enabling hardware checksums, so parse_pkt() on VF devices must examine L2 and L3 headers for all packets (not just TSO packets) for VF devices. Finally, L2 checksums on non-UDP/non-TCP packets do not work reliably (the firmware trashes the IPv4 fragment field), so IPv4 checksums for such packets are calculated in software.
Most of the other changes in the non-VF-specific code are to expose various variables and functions private to the PF driver so that they can be used by the VF driver.
Note that a limited subset of cxgbetool functions are supported on VF devices including register dumps, scheduler classes, and clearing of statistics. In addition, TOE is not supported on VF devices, only for the PF interfaces.
Sponsored by: Chelsio Communications |
306558 |
01-Oct-2016 |
alc |
MFC r305213,305319,305398 As an optimization to the machine-independent layer, change the machine- dependent pmap_ts_referenced() so that it updates the page's dirty field if a modified bit is found while counting reference bits. This opportunistic update can be performed at low cost and can eliminate the need for some future calls to pmap_is_modified() by the machine- independent layer.
Replace the number 4 in sparc64's pmap_ts_referenced() by PMAP_TS_REFERENCED_MAX, like we've done elsewhere, e.g., amd64. |
306404 |
28-Sep-2016 |
kib |
MFC r306091: Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS. |
306368 |
27-Sep-2016 |
loos |
MFC r306050:
If present, honor the USB port mode (host or peripheral) set on DTS, if not, keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host.
This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment.
Sponsored by: Rubicon Communications, LLC (Netgate) |
306316 |
25-Sep-2016 |
kib |
MFC r305942: Consolidate four efi_next_descriptor() definitions. |
305866 |
16-Sep-2016 |
kib |
MFC r304285: Implement userspace gettimeofday(2) with HPET timecounter. |
305848 |
15-Sep-2016 |
emaste |
MFC r303677: Move/add ARM ELF PHDR types to elf_common.h |
305780 |
13-Sep-2016 |
markj |
MFC r305425: Remove an unreachable return statement from ARM's minidumpsys(). |
305614 |
08-Sep-2016 |
pfg |
MFC r303891, r303892: sys: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone. |
305572 |
07-Sep-2016 |
gonzo |
MFC r305492: Let knlist_add do the locking part
Remove explicit mtx_lock/mtx_unlock around knlist_add and pass 0 as locked parameter so knlist_add does the locking itself
Suggested by: kib@ |
305441 |
05-Sep-2016 |
manu |
MFC r304509
if_emac: Before generating a random MAC address, try using the SID rootkey to generate one. This is was U-Boot does to generate a random MAC so we end up with the same MAC address as if U-Boot did generate it. |
305440 |
05-Sep-2016 |
manu |
MFC r303087
Add support for the SID (Security ID Module) on Allwinner A10 and A20. The rootkey is burnt at production and can't be changed, thus is can be used as a device unique ID or to generate a MAC address (This is was u-boot does). The rootkey is exposed as a sysctl (dev.aw_sid.<unit>.rootkey).
Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D6383 |
305439 |
05-Sep-2016 |
manu |
MFC r304290,r304649
r304290: Only set pud settings if this is a pullup or pulldown configuration. This removes the need to set the MMC pins with pullups in our DTS. Thanks to jmcneill@ for spotting this.
r304649: Do not include file from dt-bindings and simply use the already present defines. |
305438 |
05-Sep-2016 |
manu |
MFC r304289
a10_gpio_get_function now returns the whole function not only GPIO_INPUT/GPIO_OUTPUT. a10_gpio_get_pud now returns the whole pud not only PULLDOWN/PULLUP. Add a10_gpio_get_drv to get the current drive strenght. During fdt pin configure, avoid setting function/drive/pud if it's already in the correct value.
Tested on Allwinner H3 and A20 |
305437 |
05-Sep-2016 |
manu |
MFC r303186 PC5 doesn't have mmc2 function. |
305436 |
05-Sep-2016 |
manu |
MFC r302472 Add support for Allwinner A13.
Reviewed by: jmcneill Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6809 |
305435 |
05-Sep-2016 |
manu |
MFC r302470 Check that the pin function exists before setting it. This is needed for Allwinner A13 which has gpio pins with only "out" function. |
305308 |
02-Sep-2016 |
gonzo |
MFC r305039:
Fix TI PRUSS driver panic with INVARIANTS enabled
Value passed as islocked argument to knlist_add should be consistent with actual lock state so add lock/unlock calls around knlist_add
PR: 212120 Submitted by: Manuel Stuhn |
304562 |
21-Aug-2016 |
manu |
MFC r304077:
Correct the size of the softc in a10_ehci
Reported by: andrew |
304214 |
16-Aug-2016 |
manu |
MFC r303728: We need aw_nmi to be attached which needs GIC so attach a bit later. Also the GPIOC doesn't need to be attach early
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D7082 |
304213 |
16-Aug-2016 |
manu |
MFC r303145: axp209 needs aw_nmi so attach a bit earlier
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D7081 |
304212 |
16-Aug-2016 |
manu |
MFC r303144: We need the GIC to be attached so attach later at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D7080 |
303772 |
05-Aug-2016 |
loos |
MFC r302988:
Fix a random memory overwrite at boot time, simplebus_init() and simplebus_add_device() expect a simplebus_softc structure associated with the device.
Add the simplebus_softc as first member in am335x_pwmss_softc structure.
Sponsored by: Rubicon Communications (Netgate) Approved by: re (gjb) |
303163 |
21-Jul-2016 |
ian |
Disable debugging options in arm configurations.
Approved by: re (gjb) |
302915 |
15-Jul-2016 |
ian |
MFC r302502, r302505:
Consolidate debugging options from all arm kernel configs to std.arm[v6].
Correct syntax errors that only show up when compiled with INVARIANTS.
Approved by: re (gjb) |
302408 |
08-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 |
302394 |
07-Jul-2016 |
loos |
Fix a lockup in tx path for cspw.
Sometimes the software loses the race when appending more descriptors to the tx ring and the tx queue stops.
This commit detects this condition and restart the tx queue whenever it stall.
Tested by: sobomax@, Keith White <kwhite@site.uottawa.ca>, Paul Mather <paul@gromit.dlib.vt.edu> Sponsored by: Rubicon Communications (Netgate) Approved by: re (kib)
|
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)
|
301961 |
16-Jun-2016 |
kib |
Update comments for the MD functions managing contexts for new threads, to make it less confusing and using modern kernel terms.
Rename the functions to reflect current use of the functions, instead of the historic KSE conventions: cpu_set_fork_handler -> cpu_fork_kthread_handler (for kthreads) cpu_set_upcall -> cpu_copy_thread (for forks) cpu_set_upcall_kse -> cpu_set_upcall (for new threads creation)
Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Differential revision: https://reviews.freebsd.org/D6731
|
301890 |
14-Jun-2016 |
andrew |
Move the arm call to intr_pic_init_secondary earlier in the secondary CPU initialisation. This ensures it will complete before signalling to the boot CPU it has booted. This fixes a race with the GIC where the arm_gic_map may not be populated before it is used to bind interrupts leading to some interrupts becoming bound to no CPUs.
Approved by: re (kib) Sponsored by: ABT Systems Ltd
|
301872 |
13-Jun-2016 |
ian |
Do not define __NO_STRICT_ALIGNMENT for armv6. While the requirements are no longer natural-alignment strict, there are still some restrictions.
FreeBSD network code assumes data is naturally-aligned or is running on a platform with no restrictions; pointers are not annotated to indicate the data pointed to may be packed or unaligned. The clang optimizer can sometimes combine the load or store of a pair of adjacent 32-bit values into a single doubleword load/store, and that operation requires at least 4-byte alignment. __NO_STRICT_ALIGNMENT can lead to tcp headers being only 2-byte aligned.
Note that alignment faults remain disabled on armv6, this change reverts only the defining of the symbol which leads to some overly-agressive code shortcuts when building common/shared drivers and network code for arm.
Approved by: re(kib)
|
301700 |
08-Jun-2016 |
andrew |
Remove the ARMv4/ARMv5 userland atomic support from struct proc on armv6. Nothing should use this on armv6 as we use the atomic instructions added in ARMv6k.
Sponsored by: ABT Systems Ltd
|
301561 |
07-Jun-2016 |
andrew |
Start to clean MIDR values using the CPUID scheme. We don't need to know the exact CPU we are running on to set the cpu functions. Relax the check to ignore the CPU revision. Even so this may still be too specific.
Reviewed by: mmel Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D6504
|
301453 |
05-Jun-2016 |
skra |
INTRNG - change the way how an interrupt mapping data are provided to the framework in OFW (FDT) case.
This is a follow-up to r301451.
Differential Revision: https://reviews.freebsd.org/D6634
|
301288 |
03-Jun-2016 |
pfg |
tegra124: use roundup/rounddown macros from <sys/param.h>.
|
301281 |
03-Jun-2016 |
zbb |
Use nitems() macro instead of re-inventing it
Fixed after r301221.
Pointed out by: oshogbo Submitted by: Michal Stanek <mst@semihalf.com> Obtained from: Semihalf
|
301267 |
03-Jun-2016 |
skra |
Define irq variable only in the block where used.
|
301266 |
03-Jun-2016 |
skra |
Postpone allocation of IRQ resource to the time when interrupt controller devices are attached. This has already been done for bus_setup_intr().
There was no doubt that if someone wants to setup an interrupt, corresponding interrupt controller device must already be attached. However, the same must be valid for allocation of an interrupt resource unless the allocation is done blindly, without any information that such interrupt even exists. While it was done this blind way before, it won't be possible after next INTRNG change.
|
301225 |
02-Jun-2016 |
zbb |
Add support for CESA on Armada38x
Changes: - added new SoC ID in CESA attach - allowed crypto driver IDs other than 0 - added CESA nodes to Armada38x .dts files - enabled required devices in kernconf
Submitted by: Michal Stanek <mst@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D6220
|
301221 |
02-Jun-2016 |
zbb |
Configure CPU window to second CESA SRAM
Check if there is a second CESA SRAM node in FDT and add a CPU window for it. Define A38X specific macro for setting device attribute for each node.
Submitted by: Michal Stanek <mst@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D6216
|
301220 |
02-Jun-2016 |
zbb |
Map CESA SRAM memory in driver attach for Armada38x
On other platforms with CESA accelerator the SRAM memory is mapped in early init before driver is attached. This method only works correctly with mappings no smaller than L1 section size (1MB). There may be more SRAM blocks and they may have smaller sizes than 1MB as is the case for Armada38x. Instead, map SRAM memory with bus_space_map() in CESA driver attach. Note that we can no longer assume that VA == PA for the SRAM.
Submitted by: Michal Stanek <mst@semihalf.com Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D6215
|
301082 |
31-May-2016 |
jmcneill |
Fix a crash while iterating compat strings when no match is found.
Spotted by: ian
|
301062 |
31-May-2016 |
andrew |
arm_gic_map is a mask not the CPUs ID, there is no need to shift it.
Pointy-hat to: andrew Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
301060 |
31-May-2016 |
andrew |
Bin interrupts to the correct CPU when we boot on a non-zero CPU.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
300969 |
29-May-2016 |
zbb |
Improve ARM debug_monitor for SMP machines
- Reset debug architecture and enable monitor for secondary CPUs in init_secondary() rather than when configuring watchpoint, etc. - Disable HW debugging capabilities when one of the CPU cores fails to set up. - Use dbg_capable() in a more atomic manner to avoid any mismatch between CPUs.
Differential Revision: https://reviews.freebsd.org/D6009
|
300968 |
29-May-2016 |
zbb |
Fix debug_monitor code for older ARMs (ARM11)
- Enable monitor mode prior to accessing watchpoint registers for v6, v6.1 architectures. - Fix configuration scheme for v6, v6.1 and v7 Debug Archs - Enable monitor unconditionally and for good instead of enabling and disabling it (needed for single stepping on on v6/v6.1)
Tested on RPI-B and Arndale
Differential Revision: https://reviews.freebsd.org/D6008
|
300951 |
29-May-2016 |
mmel |
ARM GIC: Allow to setup interrupt without configuration data. In some cases, like for PCI devices, only interrupt numbers are enumerated from HW. In this case, use INTR_foo_CONFORM as level and trigger values.
|
300786 |
26-May-2016 |
ian |
Add support for triggering interrupts on both rising and falling edges. Also, EOI a gpio interrupt in the post_ithread routine before re-enabling.
|
300777 |
26-May-2016 |
manu |
Add support for interrupts, sensors and GPIO for AXP209 PMIC. Pressing the PEK (power enable key) will shutdown the board. Some events are reported to devd via system "PMU" and subsystem "Battery", "AC" and "USB" such as connected/disconnected. Some sensors values (power source voltage/current) are reported via sysctl (dev.axp209_pmu.X.) It also expose a gpioc node usable in kernel and userland. Only 3 of the 4 GPIO are exposed (The GPIO3 is different and mostly unused on boards). Most popular boards uses GPIO1 as a sense pin for OTG power. Add a dtsi file that adds gpio-controller capability to the device as upstream doesn't defined it and include it in our custom DTS.
Reviewed by: jmcneill Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D6135
|
300769 |
26-May-2016 |
loos |
Only do the touch screen setup when the 'ti,wires' property is present.
While here fix a typo in a debug message.
|
300728 |
26-May-2016 |
jmcneill |
Enable USB PHY regulators when requested by the host controller driver.
Previously the USB PHY driver would enable all regulators at attach time. This prevented boards from booting when powered by the USB OTG port, as it didn't take VBUS presence into consideration.
|
300709 |
26-May-2016 |
ian |
Another round of changes to add compatibility with the older ESHDC variety of hardware. Mostly this focuses on the big changes needed for setting the bus clock, because ESDHC is SDHCI v2.0 and USDHC is 3.0, and the number, location, and interpretation of clock divisor bits is vastly different between the two. This doesn't get the device all the way to functioning on ESDHC hardware yet, but it's much closer, now getting through all the card detection and negotiation of capabilties and speed (but it eventually hangs on what appears to be a missing interrupt).
Another missing chunk of code for handling ESDHC's 32 bit command-and-mode register using sdhci's pair of 16 bit writes is added.
This also does some leading whitespace cleanups and sorts some softc struct members by size, and adds some comments (because when do I ever touch code without adding comments?).
|
300701 |
26-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
|
300674 |
25-May-2016 |
skra |
Add more info about the issue fixed in r298460. Rephrase some sentences and fix grammar.
No functional change.
Suggested by: alc Reviewed by: alc
|
300535 |
23-May-2016 |
ian |
Spaces->tab in comment.
|
300534 |
23-May-2016 |
ian |
Oops, fix a paste-o commited in r300533.
|
300533 |
23-May-2016 |
ian |
Use the new(-ish) CP15_SCTLR macro to generate system control reg accesses where possible. In the places that doesn't work (multi-line inline asm, and places where the old armv4 cpufuncs mechanism is used), annotate the accesses with a comment that includes SCTLR. Now a grep -i sctlr can find all the system control register manipulations.
No functional changes.
|
300529 |
23-May-2016 |
skra |
INTRNG - support new interrupt mapping type INTR_MAP_DATA_GPIO introduced in r298738.
Reviewed by: ian
|
300528 |
23-May-2016 |
skra |
INTRNG - use gpio generic interrupt modes definitions added in r298738.
Reviewed by: ian
|
300421 |
22-May-2016 |
loos |
Fix the deciKelvin to Celsius conversion in kernel.
After r285994, sysctl(8) was fixed to use 273.15 instead of 273.20 as 0C reference and as result, the temperature read in sysctl(8) now exibits a +0.1C difference.
This commit fix the kernel references to match the reference value used in sysctl(8) after r285994.
Sponsored by: Rubicon Communications (Netgate)
|
300410 |
22-May-2016 |
skra |
INTRNG - implement pic_post_filter method. This method is fundamental one and must always be implemented for a PIC. There is no default for it intentionally.
|
300409 |
22-May-2016 |
skra |
Fix some format strings to make them either correct or uniform. No functional change.
|
300375 |
21-May-2016 |
ian |
Adjust _ALIGNBYTES to the proper value for arm and armv6 arches. Modern compilers can emit arm instructions that require 8-byte alignment. The alignment-sensitive instructions were added in armv5, which has to be supported by our combined v4/v5 kernels, so the value is set uncoditionally for all arm architecture versions.
Also adjust the comment to explain in more detail why the macros have the form and values they do.
Per advice from bde@, maintain the unsignedness of the value of _ALIGNBYTES (but do so using his second choice of allowing sizeof() to supply the unsignedness, rather than just hardcoding '8U', which in my mind would require an even more verbose comment to explain why it's right). Also explain in the comment that the resulting type of _ALIGN() is equivelent to uinptr_t on arm (32-bit unsigned int), but it's purposely spelled as "unsigned" to avoid problems with including other header files. Even including machine/_types.h to allow use of __uintptr_t causes compilation failures because of this header being included (indirectly) in asm code.
The discussion that led to this change (albeit at a glacial pace) is at https://lists.freebsd.org/pipermail/svn-src-head/2014-November/064593.html
|
300324 |
20-May-2016 |
imp |
Remove hf appending code from param.h for machine arch name.
Submitted by: ian@ andyt@
|
300175 |
18-May-2016 |
gonzo |
Use OF_prop_free instead of direct call to free(9)
Reviewed by: ganbold
|
300149 |
18-May-2016 |
andrew |
Return the struct intr_pic pointer from intr_pic_register. This will be needed in later changes where we may not be able to lock the pic list lock to perform a lookup, e.g. from within interrupt context.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
300144 |
18-May-2016 |
andrew |
Implement atomic_cmpset_acq_64 and atomic_cmpset_rel_64 on arm and armeb. This should allow r300113 to build there.
Sponsored by: ABT Systems Ltd
|
300068 |
17-May-2016 |
manu |
Add driver for "generic-ohci" as defined by FDT. If platform support EXT_RESOURCES, clocks and resets are handled out of the box. If not driver can be subclassed using the generic_usb interface. generic_usb name was choosed because at one point I'll add generic-ehci FDT driver.
Reviewed by: jmcneill, hselasky Approved by: andrew (mentor) Differential Revision: https://reviews.freebsd.org/D5481
|
300051 |
17-May-2016 |
bz |
The GIC (v2 at least) has a bit in the TYPER register to indicate whether the GIC supports the Security Extensions or not. This bit is not the same as the CPU one. Currently we are not checking for either before trying to write to the special registers. This can lead to problems on hardware or simulators that do not provide the security extensions. Add the missing checks. Their interactions with the CPU flag is not entirely clear to me but using a macro will make it easier to quickly adjust the condition once the CPU bits are sorted as well.
Reviewed by: br Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D6397
|
300050 |
17-May-2016 |
eadler |
Don't repeat the the word 'the'
(one manual change to fix grammar)
Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
|
299963 |
16-May-2016 |
bz |
Add HWPMC_HOOKS to std.armv6 to make them available so the module could be loaded.
Discussed with: andrew Reviewed by: andrew Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D6359
|
299928 |
16-May-2016 |
andrew |
Introduce MSI and MSI-X support to intrng. This adds a new msi device interface with 5 methods to mirror the 5 MSI/MSI-X methods in the pcib interface. The pcib driver will need to perform a device specific lookup to find the MSI controller and pass this to intrng as the xref. Intrng will finally find the controller and have it handle the requested operation.
Obtained from: ABT Systems Ltd MFH: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5985
|
299871 |
15-May-2016 |
jmcneill |
Add Allwinner A83T thermal sensor controller support.
The A83T thermal sensor controller has three sensors. Sensor 0 corresponds to CPU cluster 0, sensor 1 to CPU cluster 1, and sensor 2 to the GPU. This driver exports the temperature sensor readings via sysctl.
Calibration data is obtained from SRAM found in the Secure ID module.
Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D6378
|
299862 |
15-May-2016 |
jmcneill |
Reduce complexity of RSB by always using polling mode. Unfortunately gpiobus methods can be called with non-sleepable locks held.
Reviewed by: mmel
|
299860 |
15-May-2016 |
jmcneill |
Add support for the AXP813/AXP818 power key and GPIO pins.
|
299859 |
15-May-2016 |
jmcneill |
Allow RSB to be used from interrupt handlers.
The driver uses polling mode if cold or !THREAD_CAN_SLEEP() and now implements the bus_* interface.
|
299858 |
15-May-2016 |
mmel |
TEGRA: Also attach gpioc to tegra_gpio driver. Forgotten in r299854.
|
299856 |
15-May-2016 |
mmel |
TEGRA: Don't use common name 'iicb' for tegra specific IIC driver. Using commn name for different drivers breaks generic kernel creation.
|
299854 |
15-May-2016 |
mmel |
TEGRA: Don't use common name 'gpio' for tegra specific GPIO driver. Using commn name for different drivers breaks generic kernel creation.
|
299851 |
15-May-2016 |
manu |
Allow arm generic_timer code to be included even if not present in the SoC.
Reviewed by: andrew Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D6372
|
299787 |
14-May-2016 |
jmcneill |
Add and enable Allwinner RSB and AXP81x power management IC drivers.
|
299786 |
14-May-2016 |
jmcneill |
Add a basic driver for X-Powers AXP813 and AXP818 power management ICs.
This driver simply installs a shutdown event handler for handling RB_POWEROFF at shutdown. Tested on a Sinovoip BananaPi BPI-M3.
|
299781 |
14-May-2016 |
jmcneill |
Add a driver for the Allwinner Reduced Serial Bus (RSB).
The RSB controller speaks a simplified two wire protocol at speeds up to 20MHz. It is used on sun8i and sun9i family SoCs to communicate with power management ICs.
RSB isn't really I2C or SMBus, but the driver exposes an iicbus interface to simplify power management IC drivers (which may need to support both RSB and I2C connectivity).
|
299743 |
14-May-2016 |
jmcneill |
Update comment at top of file to mention all currently supported Allwinner SoCs. Previously mentioned A20 and A31, added A31S, A83T, and H3.
|
299715 |
14-May-2016 |
gonzo |
Use OF_prop_free instead of direct call to free(9)
Reviewed by: mmel@
|
299703 |
13-May-2016 |
gonzo |
Use OF_prop_free instead of direct call to free(9)
Approved by: jmcneill
|
299702 |
13-May-2016 |
gonzo |
Use OF_prop_free instead of direct call to free(9)
|
299688 |
13-May-2016 |
manu |
Add support for Allwinner H3 SoC. For now clocks, GPIO, Pinmux, UART, MMC, EHCI is supported. Tested on OrangePi-One
Reviewed by: jmcneill Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D6311
|
299477 |
11-May-2016 |
gonzo |
Add OF_prop_free function as a counterpart for OF_*prop_alloc
- Introduce new OF API function OF_prop_free to free memory allocated by OF_getprop_alloc and OF_getencprop_alloc. Current code just calls free(9) with M_OFWPROP memory class which assumes knowledge about OF_*prop_alloc functions' internals and leads to unneccessary code coupling
- Convert some of the free(..., M_OFWPROP) instances to OF_prop_free
Files affected by this commit are the ones I was able to test on real hardware. The rest of free(..., M_OFWPROP) instances will be handled with idividual maintainers
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D6315
|
299384 |
10-May-2016 |
gonzo |
Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API
Current API assumes that "gpios" property belongs to the device's node but for some binding it's not true: gpiokeys has set of child nodes with this property.
Patch adds new argument instead of replacing device_t because device_t will be used to track ownership for allocated pins
Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D6277
|
299383 |
10-May-2016 |
manu |
When PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid (>= 1 and <= real ncores) and set mp_ncpus to it.
Approved by: andrew (mentor) Differential Revision: https://reviews.freebsd.org/D6151
|
299380 |
10-May-2016 |
manu |
Merge a20_mp_start_ap and a31_mp_start_ap into one function. This function works with all smp non-multicluster allwinner SoC (A20, A31, A31S and H3).
Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D6269
|
299229 |
08-May-2016 |
skra |
INTRNG - update gpio pin capabilities according to r299198.
|
299228 |
08-May-2016 |
skra |
INTRNG - update gpio pin capabilities according to r299166.
Note that the updated comment is valid only for INTRNG. This should not be a problem as not INTRNG code is left in place for debugging reasons only and should not be used anymore. It's anticipated that this old code will be removed soon.
|
299198 |
06-May-2016 |
skra |
INTRNG - support new interrupt mapping type INTR_MAP_DATA_GPIO introduced in r298738.
|
299197 |
06-May-2016 |
skra |
INTRNG - use gpio interrupt modes definitions added in r298738 and implement also GPIO_INTR_EDGE_BOTH mode. All reasonable interrupt modes are supported now.
|
299166 |
06-May-2016 |
skra |
INTRNG - support new interrupt mapping type INTR_MAP_DATA_GPIO introduced in r298738.
|
299165 |
06-May-2016 |
skra |
INTRNG - use gpio interrupt modes definitions added in r298738 and implement also GPIO_INTR_EDGE_BOTH mode. All reasonable interrupt modes are supported now.
|
299122 |
05-May-2016 |
jhb |
Fix <sys/_bitset.h> and <sys/_cpuset.h> to not require <sys/param.h>.
- Hardcode '8' instead of NBBY in _BITSET_BITS. - Define a private version of 'howmany' for use in __bitset_words(). - While here, move a few more things out of _bitset.h and _cpuset.h to bitset.h and cpuset.h, respectively. The only things left in _bitset.h and _cpuset.h are the bits needed to define a bitset structure.
Reviewed by: bde, kib (ish)
|
299117 |
05-May-2016 |
skra |
INTRNG - redefine struct intr_map_data to avoid headers pollution. Each struct associated with some type defined in enum intr_map_data_type must have struct intr_map_data on the top of its own definition now. When such structs are used, correct type and size must be filled in.
There are three such structs defined in sys/intr.h now. Their definitions should be moved to corresponding headers by follow-up commits.
While this change was propagated to all INTRNG like PICs, pic_map_intr() method implementations were corrected on some places. For this specific method, it's ensured by a caller that the 'data' argument passed to this method is never NULL. Also, the return error values were standardized there.
|
299113 |
05-May-2016 |
jmcneill |
Add support for the Allwinner A83T (sun8iw6p1) SoC.
Clocks, GPIO, UART, SD card / eMMC, USB, watchdog, and ethernet are supported. Note that the A83T contains two clusters of four Cortex-A7 CPUs, and only CPUs in first cluster are started for now.
Tested on a Sinovoip Banana Pi BPI-M3.
|
299084 |
04-May-2016 |
jmcneill |
Add driver for Allwinner A83T/H3/A64 Gigabit Ethernet.
The datasheets refer to this controller as EMAC, not to be confused with the fast ethernet controller (also named EMAC) found in A10/A20 SoCs.
Tested on a BananaPi M3 (A83T), which uses an external RGMII PHY (RTL8211E).
Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D6169
|
299073 |
04-May-2016 |
bz |
While gem5 is not qemu, we treat it as "simulators" or "virtual environments". Add the needed hardcoded gem5 attachments for the UART there, re-using all the other bits.
In collaboration with: andrew Sponsored by: DARPA/AFRL Reviewed by: andrew MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6204
|
299072 |
04-May-2016 |
bz |
The virtual timer is optional on ARM64. Properly handle that condition. [1] In case we do not have an interrupt assignment for the virtual timer, force the physical timer. Also skip resource allocation for any timer we do not have an interrupt assignment for.
In collaboration with: andrew Submitted by: br ([1] from his gem5 arm64 work) Sponsored by: DARPA/AFRL Reviewed by: andrew MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6203
|
299071 |
04-May-2016 |
bz |
The ARM generic timer keeps ticking even if disabled or it expired. In case of updating it with a very low value it might expire again after writing the tval but before updating ctrl. In that case we do lose the status bit saying that the timer expired and we will consequently not get an interrupt for it, leaving the timer in a "dead" state.
In order to solve this increase the minimum period with what the timer can be loaded to something higher.
Found & analysed with: gem5 Debugged with: andrew Sponsored by: DARPA/AFRL Reviewed by: andrew MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6202
|
299069 |
04-May-2016 |
pfg |
sys/arm: Minor spelling fixes.
Only affects comments: no functional change.
|
298855 |
30-Apr-2016 |
manu |
ACK the interrupt after disabling it, this avoid an interrupt storm.
Approved by: andrew (mentor)
|
298854 |
30-Apr-2016 |
andrew |
Add a MULTIDELAY option to allow the ARM kernel to have multiple DELAY implementations. Early in the boot the kernel will use an approximate, however after the timer has been probed it will switch to a more accurate implementation.
Reviewed by: manu Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5762
|
298848 |
30-Apr-2016 |
pfg |
sys: Make use of our rounddown() macro when sys/param.h is available.
No functional change.
|
298824 |
30-Apr-2016 |
jhb |
Move 'device pci' for the PCI bus driver to the MI NOTES file.
The PCI bus was already listed in all of the MD NOTES files and the driver should at least compile on all platforms.
|
298820 |
29-Apr-2016 |
jhb |
Remove vestiges of IEEE-488/GPIB drivers removed in r276214.
|
298802 |
29-Apr-2016 |
gonzo |
Add driver for AM33xx SoC touchscreen
Split ADC driver in two halves: ADC(analog ot digital) and TSC(touchscreen). Touchscreen driver is fully functional up to the point of reporting samples. This part will be added once FreeBSD has API for touchscreen.
Tested on: Beaglebone Black + 4DCAPE-43T Reviewed by: loos Differential Revision: https://reviews.freebsd.org/D5847
|
298742 |
28-Apr-2016 |
mmel |
TEGRA: Add interrupt support for Tegra GPIO controller.
|
298740 |
28-Apr-2016 |
mmel |
ARM: Use kernel pmap as intermediate mapping in context switch. On ARM, we can directly switch between translation tables only when the size of the mapping for any given virtual address is the same in the old and new translation tables. The load of new TTB and subsequent TLB flush is not atomic operation. So speculative page table walk can load TLB entry from new mapping while rest of TLB entries are still the old ones. In worst case, this can lead to situation when TLB cache can contain multiple matching TLB entries. One (from old mapping) L2 entry for VA + 4k and one (from new mapping) L1 entry for VA.
Thus, we must switch to kernel pmap translation table as intermediate mapping because all sizes of these (old pmap and kernel pmap) mappings are same (or unmapped). The same is true for switch from kernel pmap translation table to new pmap one.
|
298721 |
27-Apr-2016 |
manu |
Add support for the Non-maskable interrupt driver found in the Allwinner A20 and A31 SoCs. This is normally used for the PMU.
Reviewed by: andrew Approved by: andrew (mentor) Differential Revision: https://reviews.freebsd.org/D5663
|
298667 |
26-Apr-2016 |
gonzo |
Add dtb/zynq to the list of extra modules required by Zedboard
|
298648 |
26-Apr-2016 |
bz |
Mark the unused period argument __unused.
Reviewed by: andrew MFC after: 2 weeks Sponsored by: DARPA/AFRL
|
298643 |
26-Apr-2016 |
pfg |
sys/arm: make use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
|
298634 |
26-Apr-2016 |
jmcneill |
Fix calculation of LCD CH1 SCLK1 output frequency when SCLK2 /2 is used as source.
PR: 208680 Reported by: David Binderman <dcb314@hotmail.com>
|
298630 |
26-Apr-2016 |
jmcneill |
Add support for 8-bit eMMC.
Set MMC_CAP_4_BIT_DATA and MMC_CAP_8_BIT_DATA based on the "bus-width" DT property and reduce maximum bus frequency from 52MHz to 50MHz to match the capabilities of the clock provider.
Tested on a BananaPi BPI-M3 (A83T).
|
298627 |
26-Apr-2016 |
br |
Move arm's devmap to some generic place, so it can be used by other architectures.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D6091 Sponsored by: DARPA, AFRL Sponsored by: HEIF5
|
298625 |
26-Apr-2016 |
manu |
Convert A10 interrupt controller to INTRNG
Reviewed by: skra Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D5573
|
298513 |
23-Apr-2016 |
jmcneill |
Add support for Allwinner A31/A31S R-GPIO (CPUs-PORT) controller.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D5930
|
298460 |
22-Apr-2016 |
skra |
Fix duplicate TLB entries issue during section promotion/demotion. Such situation is defined as UNPREDICTABLE by arm arm manual.
This patch fixes all explicit TLB fetches which could cause this issue and speculative TLB fetches for sections mapped in user address space. Speculative TLB fetches for sections mapped in kernel address space are not fixed yet as the break-before-make approach must be implemented for kernel mappings too. This means that promoted/demoted section will be unmapped for a while. Either kernel stack the promotion/demotion is being done on or L1 page table(s) which must be modified may be mapped by this section. Thus the fix will not be so simple like for userland mappings.
The issue was detectable only on Cortex-A8 platforms and only very rarely. It was reported few times. First, it was by Mikael Urankar in June 2015. He helped to identify the mechanism of this issue, but we were not sure how to fix it correctly until now.
PR: 208381 Reported by: Mikael Urankar (mikael.urankar at gmail.com) Reviewed by: kib
|
298457 |
22-Apr-2016 |
skra |
Don't use atomic operations for page table entries and handle access and R/W emulation aborts under pmap lock.
There were two reasons for using of atomic operations: (1) the pmap code is based on i386 one where they are used, (2) there was an idea that access and R/W emulation aborts should be handled as quick as possible, without pmap locking.
However, the atomic operations in i386 pmap code are used only because page table entries may be modified by hardware. At the beginning, we were not sure that it's the only reason. So even if arm hardware does not modify them, we did not risk to not use them at that time. Further, it turns out after some testing that using of pmap lock for access and R/W emulation aborts does not bring any extra cost and there was no measurable difference. Thus, we have decided finally to use pmap lock for all operations on page table entries and so, there is no reason for atomic operations on them. This makes the code cleaner and safer.
This decision introduce a question if it's safe to use pmap lock for access and R/W emulation aborts. Anyhow, there may happen two cases in general: (A) Aborts while the pmap lock is locked already - this should not happen as pmap lock is not recursive. However, under pmap lock only internal kernel data should be accessed and such data should be mapped with A bit set and NM bit cleared. If double abort happens, then a mapping of data which has caused it must be fixed. (B) Aborts while another lock(s) is/are locked - this already can happen. There is no difference here if it's either access or R/W emulation abort, or if it's some other abort.
Reviewed by: kib
|
298455 |
22-Apr-2016 |
skra |
Add four functions which check a virtual address for stage 1 privileged (PL1) and unprivileged (PL0) read/write access. As cp15 virtual to physical address translation operations are used, interrupts must be disabled to get consistent result when they are called.
These functions should be used only in very specific occasions like during abort handling or kernel debugging. One of them is going to be used in pmap_fault(). However, complete function set is added. It cost nothing, as they are inlined.
While here, fix comment of #endif.
Reviewed by: kib
|
298433 |
21-Apr-2016 |
pfg |
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement.
This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
|
298428 |
21-Apr-2016 |
gonzo |
Use proper type of tag in bcm2835_mbox_fb_init
bcm2835_mbox_fb_init sets configuration so SET_VIRTUAL_OFFSET should be used instead of GET_VIRTUAL_OFFSET
Submitted by: Sylvain Garrigues <sylvain@sylvaingarrigues.com>
|
298422 |
21-Apr-2016 |
jmcneill |
Replace the A20 kernel config with a generic ALLWINNER kernel config that supports A20, A31, and A31S. Adds support for the BananaPi M2 (A31S) board.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D5580
|
298403 |
21-Apr-2016 |
andrew |
Make the GIC SGI global variables static, they are only ever used within within this file.
Approved by: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
298383 |
20-Apr-2016 |
gonzo |
Force framebuffer virtual viewport to be the same as physical
VideoCore reports garbage in viewport geometry fields unless viewport was set previously by earlier stage boot loader. So when booting FreeBSD kernel directly from VideoCore's start.elf framebuffer intialization fails due to invalid vxres, vyres values. Make sure we request viewport to be equal to physical resolution
Submitted by: Sylvain Garrigues <sylvain@sylvaingarrigues.com>
|
298352 |
20-Apr-2016 |
pfg |
Use our nitems() macro when param.h is available.
Replacements specific to arm, mips, pc98, powerpc and sparc64.
Discussed in: freebsd-current
|
298305 |
19-Apr-2016 |
gonzo |
Fix build for Pi kernels with syscons enabled
|
298068 |
15-Apr-2016 |
andrew |
Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine independent code that needs to know about INTRNG such as PCI drivers.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
298055 |
15-Apr-2016 |
pfg |
arm: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.
Found with devel/coccinelle.
|
298054 |
15-Apr-2016 |
andrew |
Add a flag field to struct gic_irqsrc and use it to mark when we should write to the End of Interrupt (EOI) register before handling the interrupt. This should be a noop as it will be set for all edge triggered interrupts, however this will not be the case for MSI interrupts. These are also edge triggered, however we should not write to the EOI register until later in arm_gic_pre_ithread.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
298051 |
15-Apr-2016 |
andrew |
Add initial GICv2m support to the arm GIC driver. This will be used to support MSI and MSI-X interrupts, however intrng needs updates before this can happen.
For now we just attach the driver until the MSI API is ready.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5950
|
297943 |
13-Apr-2016 |
gonzo |
Fix UART3 and UART4 clock offsets.
Original values were copy-pasted from UART1 and UART2
PR: 197037 Submitted by: Scott Ellis <scott@jumpnowtek.com>
|
297911 |
13-Apr-2016 |
gonzo |
Multiple fixes in VCHI audio driver:
- Pre-buffer audio data to VideoCore so there are no audible glitches when driver is too late to provide samples - Start actual playback when there is some prebuffered audio, it fixes audible noisy click in the beginning of playback - Use #defines instead of hardcoded values where appropriate - Fix copy-pasted comment
PR: 208678
|
297793 |
10-Apr-2016 |
pfg |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
297739 |
09-Apr-2016 |
jmcneill |
Enable PHY regulator when the optional "phy-supply" property is present.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
|
297726 |
08-Apr-2016 |
jmcneill |
Fix incorrect pin definitions for Allwinner A31.
|
297725 |
08-Apr-2016 |
jmcneill |
Attach hwreset resources at the same time as clock resources.
|
297703 |
08-Apr-2016 |
jmcneill |
Add function for mapping SRAM-D area to USB0 (OTG) controller. Use a lower pass number to ensure that this driver is loaded before EMAC or OTG, regardless of the order of nodes in the DT.
|
297689 |
08-Apr-2016 |
jmcneill |
Match on compatible string "allwinner,sun4i-a10-sram-controller" instead of "allwinner,sun4i-sramc", to match upstream DTS.
|
297684 |
07-Apr-2016 |
ian |
Remove unecessary locking, mostly from places where a read is done of a value that can't ever be in an inconsistant intermediate state even when some other thread is in the middle of writing the value/register.
Locking of the hardware remains in the few places that do r-m-w operations. Locking of metadata access is restricted to places using memcpy or sprintf to modify the metadata.
|
297683 |
07-Apr-2016 |
ian |
Code cleanup: stop searching for a pin in the array and just use the pin number directly as an index. We create the array ourselves and nothing can change the order of items in it, it's a simple 1:1 mapping.
|
297682 |
07-Apr-2016 |
ian |
Fix a copyright glitch before it gets copy-pasted again. I think this must have started as collateral damage in a global search-replace, then it got copied around when I cloned a file to begin creating a new file.
|
297680 |
07-Apr-2016 |
ian |
Comestic changes; when INTRNG support was added, some functions became oddly separated from related functionality. This just moves some blocks of code around so that setup_intr and teardown_intr are near each other again, and likewise for enable/disable_intr. No functional changes.
|
297677 |
07-Apr-2016 |
skra |
Properly initialize isrc_cpu field of ISRC which is setup for an IPI.
|
297674 |
07-Apr-2016 |
skra |
Implement intr_isrc_init_on_cpu() and use it to replace very same code implemented in every interrupt controller driver running SMP. This function returns true, if provided ISRC should be enabled on given cpu.
|
297627 |
06-Apr-2016 |
jmcneill |
Convert Allwinner port to extres clk/hwreset/regulator APIs.
Reviewed by: andrew, gonzo, Emmanuel Vadot <manu@bidouilliste.com> Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D5752
|
297584 |
05-Apr-2016 |
skra |
Fix typo. No functional change.
|
297582 |
05-Apr-2016 |
skra |
Rework BCM283x gpio interrupt controller for INTRNG. It's used on RPI-B and RPI2 where INTRNG is already enabled by default.
Differential Revision: https://reviews.freebsd.org/D5810
|
297581 |
05-Apr-2016 |
skra |
Implement bcm2836 interrupt controller for INTRNG and enable it on RPI2 by default.
Differential Revision: https://reviews.freebsd.org/D5822
|
297580 |
05-Apr-2016 |
skra |
Rework bcm283x interrupt controller for INTRNG and enable it on RPI-B by default.
Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D5809
|
297579 |
05-Apr-2016 |
mmel |
ehci_interrupt is MPSAFE code. Most drivers in tree calls bus_setup_intr with MPSAFE, some are not. Fix those.
Submitted by: Howard Su <howard0su@gmail.com> Differential Revision: https://reviews.freebsd.org/D5755
|
297576 |
05-Apr-2016 |
mmel |
TEGRA: Fix CPU frequency switching. The PLL_X, base CPU frequency source, doesn't have a bypass switch and thus we must use another frequency source for CPU while changing its frequency. PLL_P is ideal for this, it runs at 480MHz and CPU can be clocked at this frequency at any CPU voltage.
|
297561 |
04-Apr-2016 |
andrew |
Add a table to map from the FreeBSD CPUID space to the GIC CPUID space. On many SoCs these two are the same, however there is no requirement for this to be the case, e.g. on the ARM Juno we boot on what the GIC thinks of as CPU 2, but FreeBSD numbers it CPU 0.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
297545 |
04-Apr-2016 |
skra |
Define local-intc for BCM2836 platform (RPI2) and make BCM2835 intc a child of it. This is done in conformity with Linux dts files and as preparation for rework of BCM2836 interrupt controller for INTRNG.
Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D5807
|
297541 |
04-Apr-2016 |
skra |
Rework TI gpio interrupt controller for INTRNG. It's used on PANDABOARD and BEAGLEBONE where INTRNG is already enabled by default.
Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D5806
|
297540 |
04-Apr-2016 |
skra |
Rework am33xx interrupt controller for INTRNG and enable it on BEAGLEBONE by default.
Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D5805
|
297539 |
04-Apr-2016 |
skra |
Remove FDT specific parts from INTRNG. Change its interface to make it universal.
(1) New struct intr_map_data is defined as a container for arbitrary description of an interrupt used by a device. Typically, an interrupt number and configuration relevant to an interrupt controller is encoded in such description. However, any additional information may be encoded too like a set of cpus on which an interrupt should be enabled or vendor specific data needed for setup of an interrupt in controller. The struct intr_map_data itself is meant to be opaque for INTRNG.
(2) An intr_map_irq() function is created which takes an interrupt controller identification and struct intr_map_data as arguments and returns global interrupt number which identifies an interrupt.
(3) A set of functions to be used by bus drivers is created as well as a corresponding set of methods for interrupt controller drivers. These sets take both struct resource and struct intr_map_data as one of the arguments. There is a goal to keep struct intr_map_data in struct resource, however, this way a final solution is not limited to that.
(4) Other small changes are done to reflect new situation.
This is only first step aiming to create stable interface for interrupt controller drivers. Thus, some temporary solution is taken. Interrupt descriptions for devices are stored in INTRNG and two specific mapping function are created to be temporary used by bus drivers. That's why the struct intr_map_data is not opaque for INTRNG now. This temporary solution will be replaced by final one in next step.
Differential Revision: https://reviews.freebsd.org/D5730
|
297514 |
02-Apr-2016 |
jmcneill |
Improve HDMI display detection by searching the CEA-861 extension block for an HDMI vendor-specific data block (VSDB) containing the HDMI 24-bit IEEE registration ID (0x000C03).
Approved by: gonzo (mentor)
|
297496 |
01-Apr-2016 |
jmcneill |
Move support for Synopsys Designware APB UART out of ns8250 and into a separate driver. Add support for activating clock and hwreset resources for these devices when the EXT_RESOURCES option is present.
Reviewed by: andrew, mmel, Emmanuel Vadot <manu@bidouilliste.com> Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5749
|
297426 |
30-Mar-2016 |
loos |
Enable SPI1 on Beaglebone Black.
SPI1 was chosen because SPI0 shares the gpio pins with I2C1.
Sponsored by: Rubicon Communications (Netgate)
|
297419 |
30-Mar-2016 |
loos |
Bump up the read and write timeouts. The old value was too small for low speed transfers.
Sponsored by: Rubicon Communications (Netgate)
|
297395 |
29-Mar-2016 |
loos |
Add the SPI driver for am335x.
This driver works in PIO mode for now, interrupts are available only when FIFO is enabled. The FIFO cannot be used with arbitrary sizes which defeat its general use.
At some point we can add DMA transfers where the FIFO can be more useful.
Tested on uBMC (microBMC) and BBB.
Sponsored by: Rubicon Communications (Netgate)
|
297390 |
29-Mar-2016 |
andrew |
Read the CPU ID for the current CPU from the GIC. The GIC may have a different ID space than the kernel. Because of this we need to read the ID from the hardware. The hardware will provide this value to the CPU by reading any of the first 8 Interrupt Processor Targets Registers.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5706
|
297295 |
26-Mar-2016 |
andrew |
Only define the platform methods for the Allwinner platforms we are building for.
Sponsored by: ABT Systems Ltd
|
297292 |
26-Mar-2016 |
mmel |
ARM: Fix bug introduced in r297286. - don't put command line without guard to kernel environment. - kernel environment delivered from ubldr must have absolute precedence.
|
297288 |
26-Mar-2016 |
mmel |
TEGRA: Fixes for UART driver: - add mising 'or' in tegra_uart_attach() Pointed by: kan - fix indentation of tegra_softc - remove forgoten debug printf
|
297286 |
26-Mar-2016 |
mmel |
ARM: Parse command line delivered by U-Boot: - in atags - in DT blob (by using 'fdt chosen' U-Boot command)
The command line must start with guard's string 'FreeBSD:' and can contain list of comma separated kenv strings. Also, boot modifier strings from boot.h are recognised and parsed into boothowto.
The command line must be passed from U-Boot by setting of bootargs variable: 'setenv bootargs FreeBSD:boot_single=1,vfs.root.mountfrom=ufs:/dev/ada0s1a' followed by 'fdt chosen' (only for DT based boot)
|
297285 |
26-Mar-2016 |
mmel |
ARM: Fix ATAG handling in LINUX_BOOT_API: - Don't convert atags address passed from U-Boot. It's real physical address (and we have 1:1 mapping). - Size of tags is encoded in words, not in bytes
|
297284 |
26-Mar-2016 |
mmel |
ARM: Teach LINUX_BOOT_ABI to recognize DT blob. This allow us to boot FreeBSD kernel (using uImage encapsulation) directly from U-boot using 'bootm' command or by Android fastboot loader. For now, kernel uImage must be marked as Linux, but we can add support for FreeBSD into U-Boot later.
|
297230 |
24-Mar-2016 |
skra |
Generalize IPI support for ARM intrng and use it for interrupt controller IPI provider.
New struct intr_ipi is defined which keeps all info about an IPI: its name, counter, send and dispatch methods. Generic intr_ipi_setup(), intr_ipi_send() and intr_ipi_dispatch() functions are implemented.
An IPI provider must implement two functions: (1) an intr_ipi_send_t function which is able to send an IPI, (2) a setup function which initializes itself for an IPI and calls intr_ipi_setup() with appropriate arguments.
Differential Revision: https://reviews.freebsd.org/D5700
|
297199 |
22-Mar-2016 |
jhibbits |
Fix the resource_list_print_type() calls to use uintmax_t.
Missed a bunch from r297000.
|
297134 |
21-Mar-2016 |
loos |
Use the internal references for ADC, this fixes the ADC readings on uBMC.
Tested on BBB and uBMC.
Sponsored by: Rubicon Communications (Netgate)
|
297132 |
21-Mar-2016 |
loos |
Enable multicast addresses on vlan ports. Fixes the reception of broadcast packets on vlan aware mode.
Sponsored by: Rubicon Communications (Netgate)
|
297131 |
21-Mar-2016 |
adrian |
Remove urtwn/urtwnfw; it's built as a module now.
|
297127 |
21-Mar-2016 |
ian |
Fix fallout from r292180 (Dec 2015)... ensure that every driver which has a DRIVER_MODULE() referencing mmc_driver has a MODULE_DEPEND() on mmc. This is because the kernel linker only searches for symbols in dependent modules, so loading sdhci_pci (and other bus-flavors of sdhci) would fail when mmc was not compiled into the kernel (even if you hand-loaded mmc first).
(Thanks to jilles@ for providing the vital clue about the kernel linker.)
|
297068 |
20-Mar-2016 |
ian |
Remove FREEBSD_BOOT_LOADER that already exists in std.armv6 config file.
PR: 207728 Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
|
297043 |
18-Mar-2016 |
loos |
Count the input and output packets.
Sponsored by: Rubicon Communications (Netgate)
|
297042 |
18-Mar-2016 |
loos |
Increase the arbitrary limit of TX segments.
Sponsored by: Rubicon Communications (Netgate)
|
297041 |
18-Mar-2016 |
loos |
Set the destination port in all TX segments.
Sponsored by: Rubicon Communications (Netgate)
|
297026 |
18-Mar-2016 |
mmel |
TEGRA: Connect TEGRA124 to universe build.
|
297011 |
18-Mar-2016 |
mmel |
TEGRA: Fix tegra_pcie driver after rman_res_t size change.
|
297000 |
18-Mar-2016 |
jhibbits |
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver).
Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t.
Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile)
Tested PAE and devinfo on virtualbox (live CD)
Special thanks to bz for his testing on ARM.
Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544
|
296993 |
17-Mar-2016 |
loos |
Add support for dual emac mode.
In dual emac mode, the CPSW subsystem provides two independent ethernets.
This is implemented (as recommended by TI's TRM) with a mixture of switch settings (vlans) and specific features of CPSW subsystem.
The driver was splitted to accommodate the shared parts (RX and TX rings for example) while it still provides two independent ethernets.
Each of the ethernet ports driver has it's own set of MDIO registers among the other private settings.
Previously this driver always operate in promisc mode, now the Switch ALE (address table entry) is properly initialized and enabled.
The driver is also tested (and known to work) with both ports operating in single port mode (active_slave 0 or 1).
Tested on uBMC (dual emac mode, both ports in single mode, giga and fast ethernet) and BBB (single port, fast ethernet).
Sponsored by: Rubicon Communications (Netgate)
|
296982 |
17-Mar-2016 |
mmel |
A20: Gpiobus can be attached only after full gpio driver initialization. While i'm in, remove now unused global variable.
Submited by: Emmanuel Vadot <manu@bidouilliste.com>
|
296981 |
17-Mar-2016 |
andrew |
Make it an error to build an ARM kernel with COMPAT_FREEBSDn where n < 10. We changed the ABI for ARM in 10, an removed support for the old ABI in 11, as such binaries from these releases are unable to be run on a head kernel.
Reviewed by: bz, emast Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5652
|
296980 |
17-Mar-2016 |
loos |
Fixes a few style(9) issues, remove extra blank lines.
No functional changes.
Sponsored by: Rubicon Comunications (Netgate)
|
296948 |
16-Mar-2016 |
emaste |
Remove armeb FreeBSD 6 compat shim
r296861 addressed a build failure due to undefined SYS_freebsd6_lseek by adding a COMPAT_FREEBSD6 conditional, but we do not support FreeBSD 6 compatibility on armeb anyway so remove it completely.
Reviewed by: andrew, bz Differential Revision: https://reviews.freebsd.org/D5643
|
296938 |
16-Mar-2016 |
andrew |
Remove old COMPAT_FREEBSD options from the ARM kernel configs. We replaced the ABI in 10.0, and have removed support for the old ABI in 11. As such any of these options to provide compatibility prior to 10 are unneeded.
Sponsored by: ABT Systems Ltd
|
296936 |
16-Mar-2016 |
mmel |
Import basic support for Nvidia Jetson TK1 board and tegra124 SoC. The following pheripherals are supported: UART, MMC, AHCI, EHCI, PCIe, I2C, PMIC, GPIO, CPU temperature and clock.
Note: The PCIe driver is pure mash at this moment. It will be reworked immediately when both D5237 and D2579 enter the current tree.
|
296893 |
15-Mar-2016 |
wma |
Remove redefinitions in ARMADA code
* Rename IRQ_MASK to MPIC_IRQ_MASK not to overlap with register name from mvreg.h * Remove ARM_INTRNG from ARMADA38X, apparently was already included.
|
296861 |
14-Mar-2016 |
bz |
Only check for SYS_freebsd6_lseek if the syscall code is defined. Whether this is the right or best solution is unclear but it fixes the build for now.
|
296826 |
14-Mar-2016 |
wma |
Add support for USB3.0 on Armada38x
This commit provides attachment of xhci-platform for A38X boards, making it possible to mount FreeBSD world from USB3.0 flash. 'xhci' device was added to files.mv (as optional) and kernconf of Armada38x was enhanced.
It was also necessary to open programmable memory windows of USB3.0. fdt_win_setup needed improvement so it's able to traverse through children of internal-regs node.
Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: hselasky Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D5031
|
296825 |
14-Mar-2016 |
wma |
Make MPIC compatible with ARM_INTRNG
After ARM_INTRNG introduction, MPIC code needed several modifications: - IRQ resource and its handler added - several DEVMETHODs of INTRNG interface implemented - defines enhanced to ensure code compiles as well for AXP as for A38X - added dummy MSI_IRQ, ERR_IRQ defines for Armada38x - MPIC driver was added to files.armada38x, ARM_INTRNG option enabled in kernconf file and regs of MPIC corrected in dts file.
Instead of modifying Armada38X DTS, offsets to CPU registers defined in driver were changed. That required restoring 'reg' property of mpic node in ArmadaXP to state compliant with Linux DTS.
Additionally, required ARM_INTRNG definitions were added to mv_common.c.
Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: adrian, andrew, ian, skra Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D5030
|
296824 |
14-Mar-2016 |
wma |
Fix GIC interrupt decoding in INTRNG code
Bug was already fixed in not-INTRNG code, it needs to be corrected here as well. Source: https://reviews.freebsd.org/rS294422
Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: cognet, wma Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D5029
|
296789 |
13-Mar-2016 |
jmcneill |
Fix display output for non-HDMI display devices.
Only set the display to HDMI mode if a CEA-861 extension block was found on the connected display.
PR: 207912 Approved by: gonzo (mentor)
|
296426 |
06-Mar-2016 |
andrew |
Add SMP support for the Allwinner A31 and A31s. This updated the existing code for the A20 to use the new PLATFORM_SMP interface, and extends it to add support for the new SoCs allowing for both to coexist within the same kernel.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D5342
|
296408 |
05-Mar-2016 |
andrew |
Add support to enable/disable both the EHCI and OHCI Allwinner clocks. This adds a lock to ensure only a single device is accessing the hardware. A reference count is added to only enable when we start to use the clock, and to disable after we have finished needing the clock.
This was extracted from a larger review to add OHCI support to the Allwinner SoCs.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Reviewed by: jmcneill X-Differential Revision: https://reviews.freebsd.org/D5481
|
296357 |
03-Mar-2016 |
jmcneill |
Add support for Allwinner A31 RTC controller.
Very similar to the A10 RTC controller with a few register offsets changed and a different location for the LOSC switch status.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Reviewed by: jmcneill Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5500
|
296313 |
02-Mar-2016 |
andrew |
The cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S, only define it when building for ARMv5 or prior.
Sponsored by: ABT Systems Ltd
|
296284 |
01-Mar-2016 |
jmcneill |
Add support for Allwinner A31/A31s EHCI controller and USB PHY.
Reviewed by: andrew, Emmanuel Vadot <manu@bidouilliste.com> Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D5467
|
296272 |
01-Mar-2016 |
jhb |
Remove taskqueue_enqueue_fast().
taskqueue_enqueue() was changed to support both fast and non-fast taskqueues 10 years ago in r154167. It has been a compat shim ever since. It's time for the compat shim to go.
Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: sephe Differential Revision: https://reviews.freebsd.org/D5131
|
296265 |
01-Mar-2016 |
andrew |
Make the memory size returned from fdt_get_mem_regions a 64-bit type. This is the physical memory size so may be larger than a u_long can hold, e.g. on ARM with LPAE we could see an address space of up to 40 bits. On ARM u_long is only 32 bits so the memory size will be truncated, possibly to zero.
Reported by: bz Sponsored by: ABT Systems Ltd
|
296258 |
01-Mar-2016 |
andrew |
Stop setting the memory size in the arm EFI and FDT code, we don't use it.
Sponsored by: ABT Systems Ltd
|
296257 |
01-Mar-2016 |
andrew |
Make the fdt_get_mem_regions memsize argument optional. It's only used in by a few callers.
Sponsored by: ABT Systems Ltd
|
296250 |
01-Mar-2016 |
jhibbits |
Correct the memory rman ranges to be to BUS_SPACE_MAXADDR
Summary: As part of the migration of rman_res_t to be typed to uintmax_t, memory ranges must be clamped appropriately for the bus, to prevent completely bogus addresses from being used.
This is extracted from D4544.
Reviewed By: cem Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5134
|
296189 |
29-Feb-2016 |
wma |
Fix fdt_get_mem_regions() to work with 64-bit addresses
Use u_long instead of uint32_t variables to avoid overflow in case of PA space bigger than 32-bit.
Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Approved by: cognet (mentor) Reviewed by: andrew, br, wma Differential revision: https://reviews.freebsd.org/D5393
|
296163 |
28-Feb-2016 |
gonzo |
Fix typo in device description
Spotted by: jmcneill
|
296161 |
28-Feb-2016 |
jmcneill |
Add Allwinner A10/A20 RTC driver.
Submitted by: Vladimir Belian <fate10@gmail.com> Reviewed by: andrew, imp, jmcneill Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D5414
|
296158 |
28-Feb-2016 |
andrew |
Add SMP support to the ARM PLATFORM code. This will allow us to have different methods to start the secondary cores in a kernel built for multiple SoCs, e.g. with the Allwinner A20 and A31.
Sponsored by: ABT systems Ltd Differential Revision: https://reviews.freebsd.org/D5466
|
296155 |
28-Feb-2016 |
andrew |
Build ofw_cpu.c on all ARM configs using FDT. As we mve towards using the Linux dts files these are more likely to have cpu nodes we can attach to.
Sponsored by: ABT Systems Ltd
|
296149 |
27-Feb-2016 |
jmcneill |
Fix PIO mode on A31 and later SoCs.
Newer Allwinner MMC implementations use a different FIFO register offset (0x200 instead of 0x100). Since the FDT uses the same compat string for both cases, base the decision on which FIFO offset to use on the Allwinner SoC family.
Reviewed by: Emmanuel Vadot <manu@bidouilliste.com> Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D5468
|
296138 |
27-Feb-2016 |
skra |
Move IPI related parts back to (ARM) machine specific file now, when the interrupt framework is also going to be used by another (MIPS) architecture. IPI implementations may vary much across different architectures.
An IPI implementation should still define INTR_IPI_COUNT and use intr_ipi_setup_counters() to setup IPI counters which are inside of intrcnt[] and intrnames[] arrays. Those are used for sysctl and ddb. Then, intr_ipi_increment_count() should be used to increment obtained counter.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D5459
|
296137 |
27-Feb-2016 |
jhibbits |
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370
|
296112 |
26-Feb-2016 |
jmcneill |
Fix inverted test for lock status while waiting for PLL to become stable.
Reviewed by: andrew Approved by: adrian (mentor)
|
296105 |
26-Feb-2016 |
andrew |
Make the CUBIEBOARD config include the A10 config with a few needed additions. This is used by the release scripts so we need to keep it around for now.
Sponsored by: ABT Systems Ltd
|
296100 |
26-Feb-2016 |
andrew |
Almost all copies of platform_mp_init_secondary just called intr_pic_init_secondary. Replace them with a direct call. On BCM2836 and ARMADA XP we need to add this function, but it can be empty.
Reviewed by: ian, imp Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5460
|
296098 |
26-Feb-2016 |
andrew |
Remove platform_mp_probe as it's almost identical on most ARM SoCs, and slightly wrong on the others. We should just check if mp_ncpus is set to more than one CPU as we may wish to run on a single core even when SMP is available.
Reviewed by: ian Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5458
|
296093 |
26-Feb-2016 |
andrew |
Add the start of support for the Allwinner A31 clocks. It only adds support for the i2c, mmc, and gmac clocks. Further clocks can be added as needed.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D5339
|
296070 |
25-Feb-2016 |
andrew |
Fix a mistake that crept in when moving between git and svn, pic_ipi_send should not be called from platform_mp_init_secondary.
Sponsored by: ABT Systems Ltd
|
296066 |
25-Feb-2016 |
andrew |
Remove platform_ipi_send, it's an unneeded as all implementations are identical.
Sponsored by: ABT Systems Ltd
|
296064 |
25-Feb-2016 |
jmcneill |
Add Allwinner A20 HDMI support.
The HDMI driver will attach a framebuffer device when a display is connected. If the EDID can be read and contains a preferred mode, it will be used. Otherwise the framebuffer will default to 800x600.
In addition, if the EDID contains a CEA-861 extension block and the "basic audio" flag is set, audio playback at 48kHz 16-bit stereo is enabled on the controller.
Reviewed by: andrew Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D5383
|
296041 |
25-Feb-2016 |
andrew |
Add support for the Allwinner A31 watchdog to the existing A10 watchdog driver. This mostly involves selecting the register offsets to use at runtime based on the hardware we are talking to.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D5327
|
296029 |
25-Feb-2016 |
andrew |
Add the Allwinner A31 and A31s padconf support. It's currently unused, but will be needed when we bring in further support for these SoCs.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D5340
|
296019 |
25-Feb-2016 |
jmcneill |
Fix dedicated DMA transfers.
For sources and destinations marked "noincr", the previous code was incorrectly programming the dedicated DMA channel control register using bit definitions for normal DMA channels. This code path is not currently used, but will be used by the HDMI audio driver in review.
Reviewed by: andrew Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D5382
|
295920 |
23-Feb-2016 |
skra |
Remove redundant __ARM_ARCH >= 6 check in armv6 specific files.
|
295904 |
23-Feb-2016 |
ian |
Make imx6 systems work again after recent import of new dts files.
Linux-driven changes to the way the chip's two interrupt controllers are defined (we only support one of them) led to no interrupt processing, so the system would hang after device instantiation. This workaround just rewrites the FDT data on the fly to get interrupt handling back under the control of the main GIC device.
If/when we ever support deep sleep modes that involve powering down the main GIC, we'll have to undo this change, write a driver for the GPC-PIC, and somehow manage the handoff of responsibilities between the two drivers as the chip transitions in/out of deep sleep mode.
|
295887 |
22-Feb-2016 |
skra |
Remove armv6 specific part from armv4 specific file and update comment. No functional change.
|
295885 |
22-Feb-2016 |
skra |
Move ARM_L2_PIPT option to std.armv6 for all armv6 platforms. Only L2 PIPT cache is supported for __ARM_ARCH >= 6.
In fact, this is just a pure proclamation as this option is used only in armv4 specific files now.
|
295883 |
22-Feb-2016 |
skra |
As <machine/vm.h> is included from <vm/vm.h>, there is no need to include it explicitly when <vm/vm.h> is already included.
Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5380
|
295882 |
22-Feb-2016 |
skra |
As <machine/vmparam.h> is included from <vm/vm_param.h>, there is no need to include it explicitly when <vm/vm_param.h> is already included.
Suggested by: alc Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D5379
|
295881 |
22-Feb-2016 |
skra |
As <machine/param.h> is included from <sys/param.h>, there is no need to include it explicitly when <sys/param.h> is already included.
Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5378
|
295880 |
22-Feb-2016 |
skra |
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to include it explicitly when <vm/pmap.h> is already included.
Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373
|
295834 |
20-Feb-2016 |
skra |
Rename busdma_machdep.c to busdma_machdep-v4.c, pmap.c to pmap-v4.c and trap.c to trap-v4.c to be plain and consistent with other armv4 specific files.
|
295832 |
20-Feb-2016 |
jhibbits |
Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.
This simplifies checking for default resource range for bus_alloc_resource(), and improves readability.
This is part of, and related to, the migration of rman_res_t from u_long to uintmax_t.
Discussed with: jhb Suggested by: marcel
|
295808 |
19-Feb-2016 |
andrew |
Add initial support for the Allwinner A31i and A31s. This just adds the FDT platform code to detect when we are booting on one of these SoCs. The driver changes will be added shortly.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D5338
|
295807 |
19-Feb-2016 |
andrew |
Include ofw_bus_subr.h before ofw_pci.h for the definition of struct ofw_bus_iinfo.
Sponsored by: ABT Systems Ltd
|
295804 |
19-Feb-2016 |
skra |
Remove not used static function pmap_kenter_attr().
|
295803 |
19-Feb-2016 |
skra |
Remove not used definitions and fix some style nits. No functional changes.
|
295802 |
19-Feb-2016 |
skra |
Remove AP_KRW definition not needed after r295801.
|
295801 |
19-Feb-2016 |
skra |
Rename pte.h to pte-v4.h and start including directly either pte-v4.h or pte-v6.h in files which needs it.
There are quite internal definitions in pte-v4.h and pte-v6.h headers specific for corresponding pmap implementation. These headers should be included only in very few files and an intention is to not hide for which implementation such files are.
Further, sys/arm/arm/elf_trampoline.c is an example of file which uses armv4 like pmap implementation for both armv4 and armv6 platforms. This is another reason why pte.h which includes specific header according to __ARM_ARCH is not created.
|
295799 |
19-Feb-2016 |
skra |
Move common definitions from both pmap-v4.h and pmap-v6.h into pmap.h. (1) MI interface needed for vm subsystem. (2) MD interface created for ARM architecture to be used in files shared by armv4 and armv6 platforms.
|
295798 |
19-Feb-2016 |
skra |
Rename pmap.h to pmap-v4.h and remove pmap-v6.h include from it. Create new pmap.h which includes specific header according to __ARM_ARCH.
Note that <machine/pmap.h> is included from <vm/pmap.h> so one common <machine/pmap.h> must exist.
|
295755 |
18-Feb-2016 |
zbb |
Introduce bus_get_bus_tag() method
Provide bus_get_bus_tag() for sparc64, powerpc, arm, arm64 and mips nexus and its children in order to return a platform specific default tag.
This is required to ensure generic correctness of the bus_space tag. It is especially needed for arches where child bus tag does not match the parent bus tag. This solves the problem with ppc architecture where the PCI bus tag differs from parent bus tag which is big-endian.
This commit is a part of the following patch: https://reviews.freebsd.org/D4879
Submitted by: Marcin Mazurek <mma@semihalf.com> Obtained from: Semihalf Sponsored by: Annapurna Labs Reviewed by: jhibbits, mmel Differential Revision: https://reviews.freebsd.org/D4879
|
295752 |
18-Feb-2016 |
skra |
Remove redundant ARM_L2_ADDR_BITS and L2_ADDR_BITS definitions and replace them by primary ones where needed.
|
295751 |
18-Feb-2016 |
skra |
Remove redundant L2_ADDR_MASK definition and replace it by primary one.
|
295750 |
18-Feb-2016 |
skra |
Remove unneeded definitions after r291406. Also remove redundant and not used L1_ADDR_BITS definition.
|
295711 |
17-Feb-2016 |
andrew |
Move the Allwinner kernels to use fdt_pinctrl. This will read the pin configuration from the FDT data, then set the pins into the requested state. As part of this the gpio controller now reports the correct number of pins instead of returning the number of bank * 32.
To allow for a future consolidated kernel we add the SOC_ALLWINNER_A10 and SOC_ALLWINNER_A20 kernel options. These need to be set as appropriate for the SoC the kernel will boot on.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D5177
|
295703 |
17-Feb-2016 |
skra |
Do not use PMAP_DOMAIN_KERNEL definition for __ARM_ARCH >= 6 as domains are not utilized there. Only domain #0 is used and there is no reference to it in the whole pmap-v6.c. Thus initialize domain access register in locore-v6.c without reference too.
|
295696 |
17-Feb-2016 |
skra |
Remove unneeded vector_page_setprot() for __ARM_ARCH >= 6. A vector page is always mapped in KVA space and so it's always writeable.
|
295695 |
17-Feb-2016 |
skra |
Include pte-v6.h only where needed.
|
295694 |
17-Feb-2016 |
skra |
Remove pd_prot and pd_cache members from struct arm_devmap_entry. The struct is used for definition of static device mappings which should always have same protection and attributes.
|
295693 |
17-Feb-2016 |
skra |
Evaluate also VM_PROT_EXECUTE protection in pmap_preboot_map_attr(). Before this change all mappings done by this function were executable as pte entries have NOT EXECUTABLE bit.
The function is used only for static device mappings at present. Thus this is also a fix as DEVICE memory should not be mapped as executable.
|
295662 |
16-Feb-2016 |
andrew |
Allow callers of OF_decode_addr to get the size of the found mapping. This will allow for code that uses the old fdt_get_range and fdt_regsize functions to find a range, map it, access, then unmap to replace this, up to and including the map, with a call to OF_decode_addr.
As this function should only be used in the early boot code the unmap is mostly do document we no longer need the mapping as it's a no-op, at least on arm.
Reviewed by: jhibbits Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5258
|
295660 |
16-Feb-2016 |
skra |
Use EARLY_DRIVER_MODULE() for ti_scm driver to be attached before am335x_prcm driver which uses it. Used BUS_PASS_BUS is a quick pick for now and may be revised when other drivers start using multipass feature.
This is needed after an update of Linux dts files done in r295436.
|
295659 |
16-Feb-2016 |
skra |
Do not use DMA channels used by GPU.
(1) The channel mask is get from "brcm,dma-channel-mask" property of dma node, and if not provided, from "broadcom,channels" property. (2) Consequently, sdhci driver does not allocate any specific channel. (3) Use CS_RESET bit for initial channel reset.
Differential Revision: https://reviews.freebsd.org/D4303
|
295658 |
16-Feb-2016 |
andrew |
Add a sysctl to read the internal temperature of the AXP209 Power Management IC.
Submitted by: Jared McNeill <jmcneill@invisible.ca> Differential Revision: https://reviews.freebsd.org/D5298
|
295657 |
16-Feb-2016 |
andrew |
Add an analog audio driver for the audio codec found on the Allwinner A10/A20 SoC. Based loosely on the submitters NetBSD driver, tested on Cubieboard 2. Playback and capture are supported.
Submitted by: Jared McNeill <jmcneill@invisible.ca> Differential Revision: https://reviews.freebsd.org/D5202
|
295654 |
16-Feb-2016 |
andrew |
Only read the power state register when we will be using its value. While here remove magic shifts, and cleanup pwr_name.
Sponsored by: ABT Systems Ltd
|
295635 |
15-Feb-2016 |
andrew |
Add support for the Allwinner DMA controller. This will be used by the at least the audio codec driver currently in review.
Submitted by: Jared McNeill <jmcneill@invisible.ca> Differential Revision: https://reviews.freebsd.org/D5050
|
295634 |
15-Feb-2016 |
andrew |
Add support for the AXP209 Power System Management IC. This allows boards with this and an Allwinner SoC to power off.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D4954
|
295633 |
15-Feb-2016 |
andrew |
Set sc->clkfreq removed in r295470
Reported by: Jared McNeill <jmcneill@invisible.ca> Pointy-hat to: andrew
|
295628 |
15-Feb-2016 |
andrew |
Remove an unused static inline function.
Sponsored by: ABT Systems Ltd
|
295627 |
15-Feb-2016 |
skra |
Initial OMAP4 WUGEN pass-through driver. SPI interrupts are passed through WUGEN to GIC. Hardware initialization is left in state after reset as well as before.
This is needed after an update of Linux dts files.
|
295626 |
15-Feb-2016 |
andrew |
Add support for the Allwinner i2c device. This is similar to the existing Marvell twsi part, however uses different register locations, as such split the existing driver into Marvell and Allwinner attachments.
While here clean a few style issues.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D4846
|
295622 |
14-Feb-2016 |
andrew |
Move the twsi driver source to be under iicbus. It is in a separate directory as it is expected multiple attachments will be added for the SoC families that use this hardware.
Sponsored by: ABT Systems Ltd
|
295621 |
14-Feb-2016 |
andrew |
Create the twsi device option in preparation to move the driver to a common location. The device is also found in Allwinner SoCs.
Sponsored by: ABT Systems Ltd
|
295612 |
14-Feb-2016 |
andrew |
Remove an unused include.
|
295567 |
12-Feb-2016 |
andrew |
Stop adding an extra null terminator to strings, OF_getprop already returns a null terminated string.
|
295540 |
11-Feb-2016 |
andrew |
Enable ARM_INTRNG on all kernel configs where we use the Generic Interrupt Controller.
Sponsored by: ABT Systems Ltd
|
295509 |
11-Feb-2016 |
andrew |
Stop defining fdt_pic_table when building for ARM_INTRNG.
|
295507 |
11-Feb-2016 |
andrew |
Remove unused Zedboard config files. files.zedboard was empty other than comments, and std.zedboard just pointed to files.zedboard and std.xilinx.
|
295473 |
10-Feb-2016 |
andrew |
Fix a logic inversion when checking for ARM_INTRNG
Pointy hat to: andrew
|
295472 |
10-Feb-2016 |
andrew |
Only use fdt_pic_table when not using ARM_INTRNG
|
295470 |
10-Feb-2016 |
andrew |
Use OF_getencprop to read a property, it already handles the endian conversion so we don't need to pass the data through fdt32_to_cpu.
|
295464 |
10-Feb-2016 |
andrew |
Update of the Allwinner drivers to: * Use the Linux compat string * Use EARLY_DRIVER_MODULE to attach at the right time * Add a generic A10 kernel config file * A20 now use generic_timer * Add two new dts files for Olimex boards * Update our custom DTS file for A10 and A20 to use the same compatible property names as the vendor ones.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D4792
|
295459 |
10-Feb-2016 |
adrian |
Break out the shared bits of the arm intrng definitions into sys/intr.h; leave the machine dependent bits in sys/arm/.
This is in preparation for MIPS INTRNG work.
Submitted by: Stanislav Galabov <sgalabov@gmail.com>
|
295451 |
09-Feb-2016 |
glebius |
Include sys/_task.h into uma_int.h, so that taskqueue.h isn't a requirement for uma_int.h.
Suggested by: jhb
|
295444 |
09-Feb-2016 |
andrew |
Remove unneeded whitespace, and fix a license for a new file. Extracted from a larger patch.
Submitted by: Emmanuel Vadot <manu@bidouilliste.com> X-Differential Revision: https://reviews.freebsd.org/D4792
|
295319 |
05-Feb-2016 |
mmel |
ARM: Use new ARMv6 naming conventions for cache and TLB functions in all but ARMv4 specific files. Expand ARMv6 compatibility stubs in cpu-v4.h. Use physical address in L2 cache functions if ARM_L2_PIPT is defined.
|
295317 |
05-Feb-2016 |
skra |
Follow up r295257 and replace bad reference to TEX in defines, variables and functions. This stuff is named properly now.
Thus, the VM_MEMATTR_xxx is an index to PTE2 attribute table.
Pointy hat to: skra
|
295316 |
05-Feb-2016 |
skra |
Follow up r295257 and convert also pt_memattr. This did not break anything as both VM_MEMATTR_WB_WA and PTE2_ATTR_WB_WA are zero. Correct also type of pmap_dcache_wb_pou() last argument.
|
295315 |
05-Feb-2016 |
mmel |
ARM: Introduce new cpu-v4.h header and move all ARMv4 specific code from cpu-v6.h to it. Remove unneeded cpu-v6.h includes.
|
295267 |
04-Feb-2016 |
mmel |
Replace broken implementation of fuswintr() and suswintr() by functions which return -1 as well as on tier 1 archs. Remove block_userspace_access used only in these implementations.
(1) These functions may be called in interrupt context and pcb_onfault can be already set in this time. Thus, prior pcb_onfault must be saved and restored afterwards.
(2) The check that an abort came either from nested interrupt or while in critical section or holding not sleepable lock must be avoided for this case.
These functions are called only for profiling reason, so there will be only small gain by making the code more complex.
|
295259 |
04-Feb-2016 |
mmel |
ARM: For ARMv6/v7, code in locore.S initializes SCTLR and ACTRL registers. Don't duplicate this initialization in cpu_setup().
|
295257 |
04-Feb-2016 |
skra |
Make VM_MEMATTR_xxx definitions independent on pmap internals for __ARM_ARCH >= 6.
It's TEX class number now, so it still has some meaning.
|
295256 |
04-Feb-2016 |
mmel |
ARM: Set UNAL_ENABLE bit in SCTLR CP15 register. This bit is RAO/SBOP for ARMv7. For ARMv6, it controls ARMv5 compatible alignment support. This bit have no effect until unaligned access is enabled.
|
295255 |
04-Feb-2016 |
skra |
Small rearrangement of abort_handler().
(1) Move cnt.v_trap increment to the beginning. There is cnt.v_vm_faults counter in vm_fault(), so a number of hardware emulation aborts may be get roughly as difference. (2) Move kdb_reenter() up to not be ignored if pmap_fault() has failed. (3) Update comments.
|
295254 |
04-Feb-2016 |
mmel |
ARM: RPI-B kernel was broken by r294740. Make it functional again.
|
295252 |
04-Feb-2016 |
mmel |
ARM: Don't use ugly (and hidden) global variable, control register is readable at any time.
|
295251 |
04-Feb-2016 |
br |
Fix build.
|
295235 |
04-Feb-2016 |
mmel |
ARM: Remove unused symbols from genassym.c.
|
295213 |
03-Feb-2016 |
mmel |
ARM: Consistently use cpu_setttb() instead of setttb(). Remove unused #define for drain_writebuf.
|
295207 |
03-Feb-2016 |
mmel |
ARM: Replace only once used cpu_icache_sync_all() by ranged equivalent. Remove it from cpu_functions table.
|
295206 |
03-Feb-2016 |
skra |
Partly revert r295168 and define PTE_DEVICE in pmap-v6.h header again. It turned out that devmap.c is not only file in which PTE_DEVICE is used and simultaneously, built for both armv4 and armv6 platforms.
When I tried to build all arm kernels before r295168 commit, it was hid by some other local changes in my tree. I hope that this is just temporary workaround before VM_MEMATTR_DEVICE could be used instead of PTE_DEVICE outside of pmap code for __ARM_ARCH < 6.
|
295201 |
03-Feb-2016 |
mmel |
ARM: Remove C++ comments erroneously committed in r295200.
|
295200 |
03-Feb-2016 |
mmel |
ARM: Remove support for xscale i80219 and i80321 CPUs. We haven't single supported config/board with these CPUs.
|
295199 |
03-Feb-2016 |
mmel |
ARM: The arm/xscale/i80321 directory is now orphaned, but two drivers are shared with i8134x. In preparation for removal of i80321, copy these drivers to i8134x.
|
295198 |
03-Feb-2016 |
mmel |
ARM: acle-compat.h is arm specific header, don't include it for aarch64. This fixes aarch64 buildkernel.
|
295168 |
02-Feb-2016 |
skra |
Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap() instead of hiding behind pmap_map_chunk(). It's not longer needed after old pmap-v6 code was removed.
For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used even for __ARM_ARCH < 6.
|
295166 |
02-Feb-2016 |
skra |
Make pmap_preboot_map_attr() vm subsystem compliant, so its arguments do not depend on pmap internals. This is a preparation for hiding internal pmap definitions as much as possible from the rest of system.
Simultaneously, the protection argument evaluation is fixed. Happily, it did not effect the mappings. And it's the reason why it was not fixed earlier.
|
295149 |
02-Feb-2016 |
mmel |
ARM: All remaining functions in cpufunc_asm_arm10.S are identical with functions in cpufunc_asm_arm9.S. Use arm9 variants and remove cpufunc_asm_arm10.S completly.
|
295145 |
02-Feb-2016 |
mmel |
ARM: Remove last unused function, cpu_flush_prefetchbuf(), from cpu_functions table.
|
295143 |
02-Feb-2016 |
skra |
Remove all remaining references to old and not more used struct pmap_devmap, pmap_devmap_bootstrap() and pmap_devmap[]. It was replaced in r257660.
|
295141 |
02-Feb-2016 |
skra |
Fix setting of protection bits for page table entries in pmap_map(). This function is only called from vm_page_startup() and vm_reserv_startup(). I.e. during vm subsystem initialization. As VM_PROT_WRITE is always used in these calls, the typo did not have any effect. Likely, it's the reason why it wasn't discovered so long.
|
295129 |
01-Feb-2016 |
skra |
Remove all stuff related to __ARM_ARCH >= 6 from pmap.h header except for <machine/pmap-v6.h> include. It was used by old pmap-v6 code.
|
295128 |
01-Feb-2016 |
skra |
Remove not needed <machine/pte.h> includes.
|
295123 |
01-Feb-2016 |
mmel |
ARM: Rename remaining instances of cpufunc_id() to cpu_ident(), forgotten in r295096. Remove tlb_flushI/tlb_flushI_SE functions forgotten in r295122.
|
295122 |
01-Feb-2016 |
mmel |
ARM: Remove never used cpu_tlb_flushI and cpu_tlb_flushI_SE() functions and their implementations.
|
295097 |
31-Jan-2016 |
mmel |
ARM: Fix END() symbol for cpu_ident function. I forgot to rename it in r295096.
|
295096 |
31-Jan-2016 |
mmel |
ARM: cpufunc_domains, cpufunc_faultstatus and cpufunc_faultaddress functions are equal for all ARM variants. Remove them from cpu_functions table.
|
295095 |
31-Jan-2016 |
mmel |
ARM: Next round of cpufunc.* cleaning. Nobody uses flush_brnchtgt* functions, delete them.
|
295092 |
31-Jan-2016 |
mmel |
ARM: First round of cpufunc.* cleaning. All abort_fixup functions are not currently used or defined. Delete them.
|
295091 |
31-Jan-2016 |
mmel |
ARM: Rename ARM specific VM_MEMATTR_WT memory attribute to standard one.
|
295090 |
31-Jan-2016 |
mmel |
ARM: Convert spaces to tabs, fix formatting. Not a functional change.
|
295089 |
31-Jan-2016 |
mmel |
ARM: Next round of cleanup in swtch-v*.S. - remove now useless #if __ARM_ARCH conditional - use macro for accessing CP15 registers - remove unused PCPU_SIZE
Pointed by: kib
|
295073 |
30-Jan-2016 |
mmel |
ARM: Remove TLB IPI. We don't support SMP on ARMv6. All ARMv7 multicore cpus already uses hardware broadcast for TLB and cache operations.
|
295071 |
30-Jan-2016 |
mmel |
ARM: Cleanup mp_machdep.c. SMP is supported only on ARMv6 and later.
|
295068 |
30-Jan-2016 |
mmel |
ARM: Don't misuse ARM_TP_ADDRESS as ARMv4 / ARMv6 selector.
|
295066 |
30-Jan-2016 |
mmel |
ARM: Split swtch.S into common, ARMv4 and ARMv6 parts. Cleanup them.
|
295049 |
29-Jan-2016 |
skra |
Retire pmap_pte_init_mmu_v6() which was used by old pmap-v6.
|
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.
|
295042 |
29-Jan-2016 |
skra |
Use kernel_pmap directly instead of pmap_kernel(). The kernel_pmap is already used for __ARM_ARCH >= 6 and so even for __ARM_ARCH < 6 on some common places.
|
295037 |
29-Jan-2016 |
mmel |
ARM: After removal of old pmap-v6 code, rename pmap-v6-new.c to pmap-v6.c.
|
295036 |
29-Jan-2016 |
mmel |
ARM: remove old pmap-v6 code. The new pmap-v6 is mature enough, and dual implementation is showstopper for major cleanup.
This patch only removes old code from tree. Cleanups will follow asap.
|
294989 |
28-Jan-2016 |
mmel |
EHCI: Make core reset and port speed reading more generic.
Use driver settable callbacks for handling of: - core post reset - reading actual port speed
Typically, OTG enabled EHCI cores wants setting of USBMODE register, but this register is not defined in EHCI specification and different cores can have it on different offset.
Also, for cores with TT extension, actual port speed must be determinable. But again, EHCI specification not covers this so this patch provides function for two most common variant of speed bits layout.
Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D5088
|
294987 |
28-Jan-2016 |
zbb |
SMP support for ARMv6/v7 HW watchpoints
Use per-CPU structure to store HW watchpoints registers state for each CPU present in the system. Those registers will be restored upon wake up from the STOP state if requested by the debug_monitor code. The method is similar to the one introduced to AMD64.
We store all possible 16 registers for HW watchpoints (maximum allowed by the architecture). HW breakpoints are not maintained since they are used for single stepping only.
Pointed out by: kib Reviewed by: wma No strong objections from: kib Submitted by: Zbigniew Bodek <zbb@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4338
|
294930 |
27-Jan-2016 |
jhb |
Convert ss_sp in stack_t and sigstack to void *.
POSIX requires these members to be of type void * rather than the char * inherited from 4BSD. NetBSD and OpenBSD both changed their fields to void * back in 1998. No new build failures were reported via an exp-run.
PR: 206503 (exp-run) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5092
|
294883 |
27-Jan-2016 |
jhibbits |
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of u_long.
Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI.
Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
|
294822 |
26-Jan-2016 |
skra |
Make pmap_fault() return values vm subsystem compliant to simplify their handling in abort_handler(). While here, remove one extra initialization of pcb variable.
|
294791 |
26-Jan-2016 |
skra |
Don't do icache sync on kernel memory and keep in line with comment in elf_cpu_load_file(). The only time when the sync is needed is after kernel module is loaded and the relocation info is processed. And it's done in elf_cpu_load_file().
|
294789 |
26-Jan-2016 |
skra |
Make code more compact and readable better in pmap_extract() like functions. No functional change.
This is a follow up to r294722.
Suggested by: kib
|
294754 |
25-Jan-2016 |
andrew |
Allow us to be told about memory past the first 4GB point, but ignore it. This allows, for example, UEFI pass a memory map with some ram in this region, but for us to ignore it. This is the case when running under the qemu virt machine type.
Sponsored by: ABT Systems Ltd
|
294740 |
25-Jan-2016 |
zbb |
Introduce support for HW watchpoints and single stepping for ARMv6/v7
Allows for using hardware watchpoints for 1, 2, 4, 8 byte long addresses. The default configuration of watchpoint is RW but code allows to select RO or WO and X. Since debugging registers are per-CPU (CP14) the watchpoint is set on the CPU that was lucky (or not) to enter DDB.
HW breakpoints are used to perform single step in KDB. When HW breakpoint is enabled all watchpoints are temporary disabled to avoid recursive abort on both watchpoint and breakpoint. In case of branch, the breakpoint is set to both - next instruction and possible branch address. This requires at least 2 breakpoints supported in the CPU however this is a must for ARMv6/v7 CPUs.
Reviewed by: imp Submitted by: Zbigniew Bodek <zbb@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4037
|
294727 |
25-Jan-2016 |
skra |
Fix an occasional undefined instruction abort during module loading.
Even if data cache maintenance was done by IO code, the relocation fixup process creates dirty cache entries that we must write back before doing icache sync.
Reported by: Thiagarajan Venkatasubramanian <tvenkata at juniper.net> Reviewed by: ian
|
294724 |
25-Jan-2016 |
skra |
Do not use blk_write_cont() and remove it. There si no need to call blk_flush() between two writes by physical address when these are PAGE_SIZE aligned.
Fix some style nits.
|
294723 |
25-Jan-2016 |
skra |
Make minidump more like its i386 original back as with new pmap dump interface all used physical addresses are PAGE_SIZE aligned. Add missing copyright.
This is a follow up to r294722.
|
294722 |
25-Jan-2016 |
skra |
Create new pmap dump interface for minidump and use it for existing pmap implementations on ARM. This way minidump code can be used without any platform specific modification.
Also, this is the last piece missing for ARM_NEW_PMAP.
Differential Revision: https://reviews.freebsd.org/D5023
|
294707 |
25-Jan-2016 |
andrew |
Add allwinner_machdep.h, it was missed in r294698.
|
294698 |
25-Jan-2016 |
andrew |
Update the Allwinner kernels: * Use the ARM PLATFORM framework * Use ARM_INTRNG on teh A20 as it has a GICv2 * Add a method to find which Allwinner SoC we are running on
Differential Revision: https://reviews.freebsd.org/D5059
|
294676 |
24-Jan-2016 |
andrew |
Remove an extra newline that crept in.
|
294675 |
24-Jan-2016 |
andrew |
Add support for controlling the clocks for the audio codec and DMA engines.
Submitted by: Jared McNeill <jmcneill@invisible.ca> Differential Revision: https://reviews.freebsd.org/D5052
|
294561 |
22-Jan-2016 |
andrew |
Stop defining fdt_pic_table with ARM_INTRNG, it's unused.
|
294510 |
21-Jan-2016 |
andrew |
Remove an extra '!' found by clang 3.8.
|
294441 |
20-Jan-2016 |
zbb |
Introduce initial driver for PMSU on Armada38x
This is a stub for PMSU driver. Note that it cannot be used to set the secondary core boot address during attach because drivers are attached later than SI_SUB_CPU sysinit where cores are started. Setting the boot address should be done manually in platform_mp_start_ap().
SMP is working fine with this commit and was enabled in Armada38x kernel configuration file.
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4427
|
294439 |
20-Jan-2016 |
zbb |
Add initial support for SMP on Armada38x
- Add file sys/arm/mv/armada38x/armada38x_mp.c - Set mp_maxid and mp_ncpus based on FDT unless SCU register indicates only one core - Boot CPU1 in platform_mp_start_ap() - IPI range defined
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4426
|
294438 |
20-Jan-2016 |
zbb |
Open window to bootROM memory on Armada38x to allow CPU1 to boot
CPU1 is halted in bootROM code while it is waiting to be released. Memory window to bootROM must be opened before booting the core.
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4425
|
294437 |
20-Jan-2016 |
zbb |
Support watchdog depending on "mrvl,has-wdt" property
With this commit, watchdog is supported only in case of having "mrvl,has-wdt" property or dedicated for watchdog compatibility field ("marvell,armada-380-wdt"). There is no need to modify dts files, as "has-wdt" property already exists.
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4424
|
294436 |
20-Jan-2016 |
zbb |
Add support for watchdog on Armada38x
A38X watchdog support was implemented in sys/arm/mv/timer.c driver. It required following modifications: - add "marvell,armada-380-wdt" compatibility, which supports only watchdog - correct and enhance definitions related to timer control register - unmask reset capability in RSTOUTn_MASK register - use dedicated watchdog timer on A38X instead of second timer
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4423
|
294435 |
20-Jan-2016 |
zbb |
Add support for I2C on Armada38x
Extend driver's compatible strings' table and enable I2C compilation in kernconf.
Reviewed by: andrew, ian Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Jan Dabros <jsd@semihalf.com> Differential revision: https://reviews.freebsd.org/D4422
|
294434 |
20-Jan-2016 |
zbb |
Add a new RTC driver for Armada38x
New driver registers RTC as system clock. New RTC resolution is 1 sec. Settime and gettime functions were implemented.
Reviewed by: andrew, ian Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Jan Dabros <jsd@semihalf.com> Differential revision: https://reviews.freebsd.org/D4421
|
294433 |
20-Jan-2016 |
zbb |
Correct MV_DDR_CADR_BASE definiton in mvwin.h
SOC_MV_ARMADAXP ifdef was enhanced with SOC_MV_ARMADA38X, correcting MV_DDR_CADR_BASE definition. It fixes PCIe hangs issue.
Reviewed by: andrew Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4380
|
294432 |
20-Jan-2016 |
zbb |
Change DTS entry of PCIe controller for Armada38x
Invalid (in FreeBSD) definition of PCI controller was replaced with another one, working in FreeBSD environment.
PCI controller's entry had to move from its parent node so as to be recognized properly by FBSD.
PCI was enabled in kernel configuration file.
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4379
|
294431 |
20-Jan-2016 |
zbb |
Improve definitions of CPU/PCIe windows for Armada38x
Enhance existing ARMADAXP defines and introduce new MV_WIN_PCIE_ definitions.
Reviewed by: andrew Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4378
|
294430 |
20-Jan-2016 |
zbb |
Fix invalid root link detection in mv_pci driver
mv_pci driver omitted slot 0, which can be valid device on Armada38x. New mechanism detects if device is root link, basing on vendor's and device's IDs. It is restricted to Armada38x; on other machines, behaviour remains the same.
Reviewed by: andrew Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4377
|
294429 |
20-Jan-2016 |
zbb |
Enhance remap capabilities for Armada38x
Add conditions corresponding to Armada38x-based SoCs, enhancing their remap capabilities. This is required for PCIe to work properly.
Reviewed by: andrew Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4376
|
294428 |
20-Jan-2016 |
zbb |
Enable USB in kernconf of Armada38x
With this commit, USB 2.0 works fine on Armada38x platforms.
Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4375
|
294426 |
20-Jan-2016 |
zbb |
Enable SCU unit for Armada38x
Valid SCU operation is necessary for SMP interoperability. Initialization function armada38x_enable_scu() was added.
Reviewed by: andrew, ian Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4220
|
294425 |
20-Jan-2016 |
zbb |
Set IO Sync Barrier flags for all Mbus devices on Armada38x
IO Sync Barrier setting is required for I/O coherency.
Reviewed by: andrew, ian, imp Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4219
|
294422 |
20-Jan-2016 |
zbb |
Fix GIC FDT interrupts decoding
Interrupt type in FDT was interpreted incorrectly. Patch taken from freebsd-arm thread 'GIC - interrupts interpretation in DTS/FDT': https://lists.freebsd.org/pipermail/freebsd-arm/2015-August/012145.html
Reviewed by: ian, imp Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4215
|
294421 |
20-Jan-2016 |
zbb |
Use GIC-specific decoding function in mv_common.c
Add gic_decode_fdt function to fdt_pic_table, allowing to recognize GIC interrupts on Armada38x. SOC_MV_ARMADA38X ifdef is required because A38X is the only Marvell's platform in FreeBSD using GIC; lack of ifdef would lead to linking errors on other platforms.
Reviewed by: andrew, ian, imp Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4214
|
294419 |
20-Jan-2016 |
zbb |
Do not require strict compatibility on simplebus
Strict compatibility requirement is a root of problems when simplebus' node has two compatibility strings (i.e. on Armada38x). Removing this requirement should not interfere with other platforms.
fdt_is_compatible_strict() and fdt_find_compatible() calls were changed in fdt_common.c and mv_common.c.
Reviewed by: ian, imp Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4602
|
294416 |
20-Jan-2016 |
zbb |
Introduce initial support for Marvell Armada38x
This commit introduces initial support for Marvell Armada38x platform. Changes: - Add common DTS files for Armada38x SoCs and DTS file for A388-GP - Add ARMADA38X kernel configuration - Add option SOC_MV_ARMADA38X and set MV_PCI_PORTS - Add list of files to compile - Implement get_tclk(), get_sar_value(), cpu_reset() functions - Add CPU ID and SoC numbers - Correct ifdefs in arm/mv/timer.c
Reviewed by: ian, imp Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Michal Stanek <mst@semihalf.com> Differential revision: https://reviews.freebsd.org/D4210
|
294413 |
20-Jan-2016 |
zbb |
Mark gpio as "optional" in files.mv and edit Marvell's kernconfs
Including arm/mv/gpio.c now depends on 'gpio' device. 'device gpio' was added to all kernconf files of Marvell boards, except ARMADAXP (dummy mv_gpio_res definition was removed) and ARMADA38X (not supported yet).
This commit allows to use generic files.mv on A38X.
Reviewed by: andrew Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D4372
|
294238 |
18-Jan-2016 |
andrew |
Add extra checks to make sure the size is valid. We may get an integer underflow when we have small blocks of memory at the start and end of the 32-bit address range.
While here, only insert mappings pointing at a non-zero amount of memory.
Sponsored by: ABT Systems Ltd
|
294237 |
17-Jan-2016 |
jhibbits |
Quick exit after setting the clock control register.
Discussed with: ian
|
294138 |
16-Jan-2016 |
andrew |
Use __ARM_ARCH to decide when ARM_TP_ADDRESS needs to be set. This fixes an issue with clang 3.8.0 where none of the __ARM_ARCH_*__ macros were defined on some ARMv6 kernel configs.
Sponsored by: ABT Systems Ltd
|
294133 |
16-Jan-2016 |
imp |
We don't need at91_bs_tag. arm_base_bs_tag works now that we have better dynamic device mapping that didn't exit when we started this port. Remove it, since everything works w/o it.
|
294131 |
16-Jan-2016 |
imp |
Move ohci files to their proper place in the tree for atmel. Fix when it is included (we don't have a at91rm9200 device). From a similar patch in the PR, with tweaked names.
PR: 206229
|
294098 |
15-Jan-2016 |
skra |
Add mmu format info into ARM vmcore. Fix kvatop translation for 64K pages.
Reviewed by: jhb Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D4942
|
294097 |
15-Jan-2016 |
ian |
Reduce diffs to upstream by adding a couple comment blocks and moving the parse_boot_param() function to the end of the file.
|
294087 |
15-Jan-2016 |
andrew |
Remove the commented out sc device from the i.MX kernels, they both use vt(4).
|
294032 |
14-Jan-2016 |
ian |
Fix the handling of the "PDC write transfer length" erratum for at91. The problem affects revision 1xx hardware as well as later versions. Also, the recommended workaround is to set the PDC count register for a 12-byte transfer when the actual size is less than that, but there is no need to extend or zero-out the data buffer, because the blklen register contains the real transfer size and only that many bytes will be transferred.
Also add a sysctl to turn debugging printfs on or off on the fly.
|
293830 |
13-Jan-2016 |
ian |
Fix the spelling of fueword* to eliminate compile warnings about mismatched begin/end symbols when the warning level is turned up.
Submitted by: Steve Kiernan <stevek@juniper.net>
|
293771 |
12-Jan-2016 |
skra |
Fix local macro for early KVA allocation.
Only crashdumpmap allocation was affected which is used for temporary mappings during panic dump.
Approved by: kib (mentor)
|
293613 |
09-Jan-2016 |
dchagin |
Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall instead of vdso. An upcoming linux_base-c6 needs it.
Differential Revision: https://reviews.freebsd.org/D1090
Reviewed by: kib, trasz MFC after: 1 week
|
293316 |
07-Jan-2016 |
skra |
Print curpmap in "show pcpu" command.
Approved by: kib (mentor)
|
293104 |
03-Jan-2016 |
ian |
Store the pointer to the bootloader-provided env data in a static var for use in debug printing.
|
293065 |
02-Jan-2016 |
ian |
Reword the comment to better describe what I found while researching the problem that led to this temporary workaround (and also so I can properly cite the PR in the commit this time).
In general this is intended to be a temporary workaround until we can figure out why including any ram from the last megabyte of the physical address space leads to a NULL pointer deref. Debugging that is made trickier by the fact that I couldn't even get a backtrace in ddb.
PR: 201614
|
293063 |
02-Jan-2016 |
ian |
Work around problems that happen when there is ram at the end of the physical address space.
|
293061 |
02-Jan-2016 |
ian |
Use 64-bit math when processing the lists of physical and excluded memory to generate the phys_avail and dump_avail arrays.
This is a partial fix for the kernel side of the problem mentioned in the PR. This part handles the cases where comparing start and end addresses of a block would fail because 32-bit wrap caused the end address to come out zero if the end of the region is the end of the address space (0xffffffff with 32-bit vm_paddr_t, but now the code should also work right if we ever support LPAE with 36-bit addresses).
More work is necessary to make systems with ram at the end of the physical address space usable, but at least initially it's going to be more like a workaround than a fix, so this non-hacky part is being committed first.
PR: 201614
|
293045 |
02-Jan-2016 |
ian |
Make the 'env' directive described in config(5) work on all architectures, providing compiled-in static environment data that is used instead of any data passed in from a boot loader.
Previously 'env' worked only on i386 and arm xscale systems, because it required the MD startup code to examine the global envmode variable and decide whether to use static_env or an environment obtained from the boot loader, and set the global kern_envp accordingly. Most startup code wasn't doing so. Making things even more complex, some mips startup code uses an alternate scheme that involves calling init_static_kenv() to pass an empty buffer and its size, then uses a series of kern_setenv() calls to populate that buffer.
Now all MD startup code calls init_static_kenv(), and that routine provides a single point where envmode is checked and the decision is made whether to use the compiled-in static_kenv or the values provided by the MD code.
The routine also continues to serve its original purpose for mips; if a non-zero buffer size is passed the routine installs the empty buffer ready to accept kern_setenv() values. Now if the size is zero, the provided buffer full of existing env data is installed. A NULL pointer can be passed if the boot loader provides no env data; this allows the static env to be installed if envmode is set to do so.
Most of the work here is a near-mechanical change to call the init function instead of directly setting kern_envp. A notable exception is in xen/pv.c; that code was originally installing a buffer full of preformatted env data along with its non-zero size (like mips code does), which would have allowed kern_setenv() calls to wipe out the preformatted data. Now it passes a zero for the size so that the buffer of data it installs is treated as non-writeable.
|
292891 |
29-Dec-2015 |
ian |
Bring some of the recent locore-v4.S improvements into locore-V6...
- Map all 4GB as VA=PA so that args passed in from a bootloader can be accessed regardless of where they are. - Figure out the kernel load address by directly masking the PC rather then by doing pc-relative math on the _start symbol. - For EARLY_PRINTF support, map device memory as uncacheable (no-op for ARM_NEW_PMAP because all TEX types resolve to uncacheable).
|
292730 |
25-Dec-2015 |
kevlo |
Fix typo (s/harware/hardware/)
|
292591 |
22-Dec-2015 |
andrew |
Remove the arm KERNPHYSADDR option as it is no longer used. The make option is still in existance as it is used to build the trampoline code.
|
292574 |
21-Dec-2015 |
gonzo |
Add i.MX 6 IPU driver and enable it in IMX6 config
Current functionality is somewhat limited: driver assumes that there is only one active IPU unit (IPU1) and that video output is DI0 and video mode is 1024x768. For more advanced functionality driver requires proper clock management which is work in progress. At the moment driver assumes that pixel clock is configured by u-boot for 1026x768 mode.
Reviewed by: andrew, ian, mmel Differential Revision: https://reviews.freebsd.org/D4168
|
292571 |
21-Dec-2015 |
gonzo |
- Add driver for i.MX 6 HDMI framer - Enable HDMI driver in IMX6 config
Reviewed by: andrew, ian, mmel Differential Revision: https://reviews.freebsd.org/D4174
|
292565 |
21-Dec-2015 |
gonzo |
Add CCM functions to enable HDMI framer and IPU units (video controller)
Reviewed by: andrew, ian Differential Revision: https://reviews.freebsd.org/D4168
|
292557 |
21-Dec-2015 |
imp |
Configure the Atmel eval boards to boot the same way. This gives them the same layout as other embedded systems.
|
292555 |
21-Dec-2015 |
ian |
Implement OF_decode_addr() for arm. Move most of powerpc's implementation into a new function that other platforms can share.
This creates a new ofw_reg_to_paddr() function (in a new ofw_subr.c file) that contains most of the existing ppc implementation, mostly unchanged. The ppc code now calls the new MI code from the MD code, then creates a ppc-specific bus_space mapping from the results. The new arm implementation does the same in an arm-specific way.
This also moves the declaration of OF_decode_addr() from ofw_machdep.h to openfirm.h, except on sparc64 which uses a different function signature.
This will help all FDT platforms to set up early console access using OF_decode_addr().
|
292525 |
21-Dec-2015 |
ian |
Replace some references to KERNPHYSADDR with the equivelent value passed in from the bootloader.
|
292524 |
20-Dec-2015 |
ian |
Change KERNVIRTADDR to 0xc0000000 since the low-order bits no longer need to match the physical load address. Remove the *PHYSADDR symbols which are no longer necessary.
Also remove a bunch of comments, most of which which have been wrong for quite some time now, and the rest of which are mooted by these changes. All that's left in this file is assigning a single symbol to its cannonical value, not much to comment on anymore.
|
292523 |
20-Dec-2015 |
ian |
Allow armv4/5 kernels to be loaded on any 2MB boundary, like armv6/7.
This eliminates the reliance on PHYSADDR and KERNPHYSADDR compile-time symbols (except when the rom-copy code is enabled) by using the current PC and the assumption that the entry-point routine is in the first 1MB section of the text segment.
Other cleanups done:
- Reduce the initarm() stack size back to 2K. It got increased to 4 * 2K when this file was supporting multicore armv6, but that support is now in locore-v6.S.
- When building the temporary startup page tables, map the entire 4GB address space as VA=PA before mapping the kernel at its loaded location. This allows access to boot parameters stored somewhere in ram by the bootloader, regardless of where that may be.
- When building the page table entry for supporting EARLY_PRINTF, map the section as uncached unbuffered, since it is presumably device registers.
Note that this restores the ability to use loader(8)/ubldr on armv4/5 kernels. That was broken in r283035, the point at which ubldr started loading an arm kernel at any 2MB boundary.
Also note that after this, there is no reason to set KERNVIRTADDR to anything other than 0xc0000000, and no need for PHYSADDR or KERNPHYSADDR symbols at all.
|
292483 |
20-Dec-2015 |
gonzo |
Add dev.fb.X.resync sysctl to resync ARM framebuffer with VideoCore
Some applications (e.g. Kodi) use tvservice APIs to manage HDMI modes, power state, EDID etc. directly through VideoCore. After these manipulations VideoCore may loose its state and needs to be resynced with ARM. Under Linux this problem is worked around using fbset utility that recreates framebuffer. Since there is no fbset utility in FreeBSD we provide sysctl for userland apps to get system back into normal mode.
|
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.
|
292424 |
18-Dec-2015 |
imp |
Create a simplebus PNP info wrapper.
Differential Review: https://reviews.freebsd.org/D4517
|
292419 |
18-Dec-2015 |
ian |
Fix the clock divisor calc for imx6 sdcard bus speed.
I don't know what alternate universe I was inhabiting when I wrote it originally, but apparently the basic workings of mathematics were different than in this universe. I also can't explain how it ever worked, except "by accident", because completely bogus values were being written into the divisor register.
|
292334 |
16-Dec-2015 |
skra |
Adopt assert from amd64 in pmap_remove_pages().
Suggested by: kib Approved by: kib (mentor)
|
292276 |
15-Dec-2015 |
skra |
Local TLB flush is sufficient in pmap_remove_pages().
(1) The pmap argument passed to the function must be current pmap only. (2) The process must be single threaded as the function is called either when a process is exiting or from exec_new_vmspace().
Remove pmap_tlb_flush_ng() which is not used anywhere now.
Approved by: kib (mentor)
|
292269 |
15-Dec-2015 |
skra |
Replace all postponed TLB flushes by immediate ones except the one in pmap_remove_pages().
Some points were considered: (1) There is no range TLB flush cp15 function. (2) There is no target selection for hardware TLB flush broadcasting. (3) Some memory ranges could be mapped sparsely. (4) Some memory ranges could be quite large.
Tested by buildworld on RPi2 and Jetson TK1, i.e. 4 core platforms. It turned out that the buildworld time is faster. On the other hand, when the postponed TLB flush was also removed from pmap_remove_pages(), the result was worse. But pmap_remove_pages() is called for removing all user mapping from a process, thus it's quite expected.
Note that the postponed TLB flushes came here from i386 pmap where hardware TLB flush broadcasting is not available.
Approved by: kib (mentor)
|
292264 |
15-Dec-2015 |
skra |
Flush intermediate TLB cache when L2 page table is unlinked.
This fixes an issue observed on Cortex A7 (RPi2) and on Cortex A15 (Jetson TK1) causing various memory corruptions. It turned out that even L2 page table with no valid mapping might be a subject of such caching.
Note that not all platforms have intermediate TLB caching implemented. An open question is if this fix is sufficient for all platforms with this feature.
Approved by: kib (mentor)
|
292260 |
15-Dec-2015 |
mmel |
ARM: Remove outdated katelib.h.
Approved by: kib (mentor)
|
292259 |
15-Dec-2015 |
mmel |
ARM: option PPC_PROBE_CHIPSET is applicable only for x86. Don't enable it for ARM LINT config.
Approved by: kib (mentor)
|
292180 |
14-Dec-2015 |
ian |
Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of the various bridge drivers out of dev/mmc.c and into the bridge drivers.
Requested by: jhb (almost two years ago; better late than never)
|
291961 |
07-Dec-2015 |
markj |
Add helper functions proc_readmem() and proc_writemem().
These helper functions can be used to read in or write a buffer from or to an arbitrary process' address space. Without them, this can only be done using proc_rwmem(), which requires the caller to fill out a uio. This is onerous and results in code duplication; the new functions provide a simpler interface which is sufficient for most existing callers of proc_rwmem().
This change also adds a manual page for proc_rwmem() and the new functions.
Reviewed by: jhb, kib Differential Revision: https://reviews.freebsd.org/D4245
|
291937 |
07-Dec-2015 |
kib |
Add support for usermode (vdso-like) gettimeofday(2) and clock_gettime(2) on ARMv7 and ARMv8 systems which have architectural generic timer hardware. It is similar how the RDTSC timer is used in userspace on x86.
Fix a permission problem where generic timer access from EL0 (or userspace on v7) was not properly initialized on APs.
For ARMv7, mark the stack non-executable. The shared page is added for all arms (including ARMv8 64bit), and the signal trampoline code is moved to the page.
Reviewed by: andrew Discussed with: emaste, mmel Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D4209
|
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
|
291683 |
03-Dec-2015 |
ganbold |
Add glue driver for Amlogic Meson Gigabit Ethernet Controller and enable it for Odroid C1 board. Together with r291676 change, dwc(4) can receive packets now.
|
291650 |
02-Dec-2015 |
mmel |
ARM: Define PCI_RES_BUS resource for platforms having NEW_PCIB enabled.
Approved by: kib (mentor)
|
291649 |
02-Dec-2015 |
mmel |
ARM: Fix of detection of root interrupt controller. This fixes detection of root interrupt controller for cases, when interrupt parent is not defined at all or it's not defined directly in controller node.
Approved by: kib (mentor)
|
291492 |
30-Nov-2015 |
mmel |
ARM: create new memory attribute for writethrough cacheable memory. - add new TEX class for WT cacheable memory - export new TEX class to kernel as VM_MEMATTR_WT attribute - add new aliases VM_MEMATTR_WRITE_COMBINING and VM_MEMATTR_WRITE_BACK, it's used in DRM code
Note: Only Cortex A8 supports WT caching in HW. On rest of Cortex CPUs, WT requests is treated as uncacheable.
Approved by: kib (mentor)
|
291426 |
28-Nov-2015 |
mmel |
ARM: Implement atomic_swap_int(9). It's used in DRM2 code.
Approved by: kib (mentor)
|
291425 |
28-Nov-2015 |
mmel |
ARM: Add support for new KRAIT 300 CPU revision.
Approved by: kib (mentor)
|
291424 |
28-Nov-2015 |
mmel |
ARM: Cumulative fixes for GIC - fix detection of interrupt root controller - allow (but warn) unsupported configuration bits - dont send EOI for spurious interrupts - print more informations for spurious interrupts - use device_printf() where appropriate
Reviewed by: ian (earlier version) Approved by: kib (mentor)
|
291420 |
28-Nov-2015 |
kib |
Remove sv_prepsyscall, sv_sigsize and sv_sigtbl members of the struct sysent.
sv_prepsyscall is unused.
sv_sigsize and sv_sigtbl translate signal number from the FreeBSD namespace into the ABI domain. It is only utilized on i386 for iBCS2 binaries. The issue with this approach is that signals for iBCS2 were delivered with the FreeBSD signal frame layout, which does not follow iBCS2. The same note is true for any other potential user if sv_sigtbl. In other words, if ABI needs signal number translation, it really needs custom sv_sendsig method instead.
Sponsored by: The FreeBSD Foundation
|
291405 |
27-Nov-2015 |
zbb |
Add support for exynos5_ehci in loader
Create new driver which initializes Arndale PHY and calls ehci_init
Reviewed by: hselasky Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4192
|
291367 |
26-Nov-2015 |
ian |
Rename sysctl node hw.imx6 to hw.imx. Move its definition to imx_machdep.c so that code shared between imx5 and imx6 can work with OIDs under that node.
Add last_reset_status (integer) and last_reset_reason (string) OIDs that provide info about the last chip reset (power-on, software reset, watchdog timeout).
|
291258 |
24-Nov-2015 |
skra |
Flush all kernel mappings from TLB(s) in time when they are cleared. Replace tlb_flush_local() by tlb_flush() as even not global mappings could be fetched to TLB(s) on other cores by speculative table walk.
From OS point of view, it was not a problem as either such mappings were not used anymore or they were flushed from TLB(s) when reused. However, from hardware point of view, it was a problem. Not flushed mappings could be a target for speculative reads or prefetches (which might be quite aggresive on ARM cores). As speculative read can fill cacheline, it can cause a real problem, when physical page is reused, but mapped with different memory attributes.
Anyhow, it's good to have only valid mappings in TLB(s).
Approved by: kib (mentor)
|
291216 |
23-Nov-2015 |
andrew |
Use #ifdef to get the file compiling without errors
|
291210 |
23-Nov-2015 |
andrew |
Only enable the first interrupt for now, we don't correctly configure or route interrupts to the needed cpu.
Sponsored by: ABT Systems Ltd
|
291193 |
23-Nov-2015 |
skra |
Revert r291142.
The not quite consistent logic for bounce pages allocation is utilizited by re(4) interface which can hang now.
Approved by: kib (mentor)
|
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.
|
291149 |
21-Nov-2015 |
ian |
Update the imx5/imx6 cpu_reset() implementation based on a new understanding of the SRS (software reset) bit in the watchdog control register. Despite what the manual seems to imply, this bit DOES trigger an immediate reset, as opposed to simply flagging the type of reset as software-triggered.
|
291142 |
21-Nov-2015 |
skra |
Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being created for bus_dma_tag_t tag, bounce pages should be allocated only if needed.
Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed, it could cause memory exhaustion when a lot of such tags together with their maps were created.
Note that there could be more maps in one tag by current design. However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after bounce pages are allocated. Thus, they are allocated only for first tag's map which needs them.
Approved by: kib (mentor)
|
291136 |
21-Nov-2015 |
andrew |
Move hdmi_if.m to files.arm so other kernel configs can use it.
|
291135 |
21-Nov-2015 |
andrew |
Create device options for the two common ARM timers.
Sponsored by: ABT Systems Ltd
|
291133 |
21-Nov-2015 |
andrew |
Move more bus_space_* files to be built by files.arm. This leaves the definition in a file.* file under sys/arm/arm in the few cases we need it for non-fdt platforms.
Sponsored by: ABT Systems Ltd
|
291131 |
21-Nov-2015 |
andrew |
Limit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in armv6 and that can use fdtbus_bs_tag.
|
291110 |
20-Nov-2015 |
imp |
Makeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't consistently used. It was a carry over from NetBSD that FreeBSD doesn't use.
|
291108 |
20-Nov-2015 |
andrew |
Remove bus_space_asm_generic.S from the per-SoC files.* files, it's already in files.arm.
Sponsored by: ABT Systems Ltd
|
291104 |
20-Nov-2015 |
andrew |
Remove pl310.c from the SoC std.* files, it's in files.arm
Sponsored by: ABT Systems Ltd
|
291102 |
20-Nov-2015 |
andrew |
Stop setting {KERN,}PHYSADDR on armv6, it's unneeded.
Sponsored by: ABT Systems Ltd
|
291094 |
20-Nov-2015 |
skra |
Add usermode variable to KTR output. Fix style.
Approved by: kib (mentor)
|
291093 |
20-Nov-2015 |
skra |
Fix style and argument count for KTR.
Approved by: kib (mentor)
|
291018 |
18-Nov-2015 |
mmel |
ARM: Fix dma_dcache_sync() for early allocated memory. Drivers can request DMA to buffers that are not in memory represented in the vm page arrays. Because of this, store KVA of already mapped buffer to synclist and use it in dma_dcache_sync().
Reviewed by: jah Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D4120
|
290979 |
17-Nov-2015 |
zbb |
Make PCB structure binary compatible for old and new PMAP on ARM
This structure must be binary compatible regardless of PMAP version being used. Create reserved section for NEW_PMAP to make other variables be placed exactly in the same memory addresses. This fixes kgdb/gdb behavoiur, which uses pcb.h stuctures. The NEW_PMAP is kernel flag, so it does not propagate to the buildworld, what makes the tools using pcb.h unable to parse PCB data.
Reviewed by: mmel, kib Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4011
|
290977 |
17-Nov-2015 |
zbb |
Fix buffer overflow in exynos5_ehci
Use proper size of exynos_ehci_softc, not the generic one.
Reviewed by: andrew Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4189
|
290974 |
17-Nov-2015 |
andrew |
Make pl310_print_config static, it's not called out of pl310.c
Sponsored by: ABT Systems Ltd
|
290834 |
14-Nov-2015 |
gonzo |
Replace magic numbers for CCGRx registers with more descriptive names
|
290831 |
14-Nov-2015 |
gonzo |
Somewhat improve HDMI event API
- Pass device_t for HDMI framer as an argument for event hook - Use #define for event values, instead of opaque (and unused) 0
|
290815 |
14-Nov-2015 |
gonzo |
hdmi_if.m will be reused by iMX6 IPU code so move it to arm/arm
|
290814 |
14-Nov-2015 |
gonzo |
Move all HDMI-related stuff to hdmi_if.m, hdmi.h is not required
|
290807 |
13-Nov-2015 |
gonzo |
- Add driver for System-Reset-Controler i.MX6 module - Add API function to reset IPU1
|
290769 |
13-Nov-2015 |
imp |
Add support for the Zybo and similar boards to ZEDBOARD kernel. Zybo needs its own DTB and has a different PHY, so add it to the base kernel. Details on building bootable SD images at http://www.thomasskibo.com/zedbsd/
Submitted By: Thomas Skibo
|
290727 |
12-Nov-2015 |
gonzo |
Enable cloks for all USDHC interfaces, previous value was USDHC 1-3 + USBOH3
|
290726 |
12-Nov-2015 |
gavin |
Consistently capitalize "TI" as an abbreviation for Texas Instruments.
|
290722 |
12-Nov-2015 |
imp |
Move the root to s3a given this kernel will be used with a nanobsd build that defaults there.
|
290692 |
12-Nov-2015 |
imp |
Revisit this old board with 64MB of RAM. Comment out usb entirely, since it isn't used for my application. Add back the md device since it's needed for NanoBSD support. Add in many of the small memory footprint options from the access points.
With these changes we go from having ~8MB to having ~20MB free, though free + inactive only goes from ~35MB to ~42MB. We can also boot a nanobsd image mostly (I had to hand tweak what was built to represent the final goal).
Move the FDT stuff to the top. We're almost ready to pull the trigger to moving over to FDT, but something in the MCI driver is freaking out when we do and that needs fixing first.
|
290667 |
11-Nov-2015 |
gonzo |
Refactor bcm2835_cpufreq to use bcm2835_mbox_property API
|
290666 |
11-Nov-2015 |
gonzo |
- Set have_message in interrupt to handle "response before READ" case - Serialize access to property channel when using bcm2835_mbox_property
|
290661 |
10-Nov-2015 |
mmel |
ARM: Refactor interrupt_enable/disable/restore. Allow manipulation with PSR_A bit on ARMv6+. Remove declaration of unused functions.
This effectively enables asynchronous aborts on early bootstrap stage, which previously was not enabled due to an error in enable_interrupts().
PR: 201434 Reported by: Gregory Soutade <soutade at gmail.com> Approved by: kib (mentor)
|
290656 |
10-Nov-2015 |
skra |
Fix cp15 PAR definition and function. While here, add cp15 ATS1CPW function which checks an address for privileged (PL1) write access. The function is inlined so it does not bring any cost, but makes function set for checking privileged access complete.
Approved by: kib (mentor)
|
290655 |
10-Nov-2015 |
skra |
Fix pmap_fault(). It turned out that alignment abort may have higher priority than both translation and permission ones.
Approved by: kib (mentor)
|
290649 |
10-Nov-2015 |
kib |
Implement atomic_testandset_{32,int,long,64} for ARMv6. Only little-endian configuration for 64-bit variant is supported.
Reviewed by: mmel Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4113
|
290648 |
10-Nov-2015 |
mmel |
ARM: Remove trailing whitespace from sys/arm/include No functional changes.
Approved by: kib (mentor)
|
290647 |
10-Nov-2015 |
mmel |
ARM: Improve robustness of locore_v6.S and fix errors. - boot page table is not allocated in data section, so must be cleared before use - map only one section (1 MB) for SOCDEV mapping (*) - DSB must be used for ensuring of finishing TLB operations - Invalidate BTB when appropriate
PR: 198360 Reported by: Daisuke Aoyama <aoyama at peach.ne.jp> (*) Approved by: kib (mentor)
|
290621 |
09-Nov-2015 |
tijl |
Fix typo (s/ncpus/mp_ncpus/)
Reported by: bz
|
290614 |
09-Nov-2015 |
bz |
Now that the PMU implementation is independent of HWPMC as of r288992 use it to manage the CCNT.
Use the CNNT for get_cyclecount() instead of binuptime() when device pmu is compiled in; if it fails to attach, fall back to the former method.
Enable by default for the BeagleBoneBlack configuration.
Optained from: Cambridge/L41 Sponsored by: DARPA/AFRL Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D3837
|
290547 |
08-Nov-2015 |
tijl |
Since r289279 bufinit() uses mp_ncpus, but some architectures set this variable during mp_start() which is too late. Move this to mp_setmaxid() where other architectures set it and move x86 assertions to MI code.
Reviewed by: kib (x86 part)
|
290541 |
08-Nov-2015 |
skra |
Make usermode variable the bool type. It's already used that way.
Suggested by: kib Approved by: kib (mentor)
|
290536 |
08-Nov-2015 |
gonzo |
Fix some of WITNESS complaints and bootup lock by removing msg_avail condvar/mutex. They're basically no-op because error is not propagated up the call chain. We still report message failures in VC service callback
|
290533 |
08-Nov-2015 |
gonzo |
- Replace semaphore-base locking with sleep/wait synchronization: sema_trywait/sema_timedwait can't be used while holding non-sleepable mutex
- Fix infinite loop if response from VideoCore never received
|
290518 |
07-Nov-2015 |
imp |
Correct !FDT case with proper name.
|
290516 |
07-Nov-2015 |
imp |
Implement the phy-mode property for ate and macb. If it is set to "rmii", use rmii mode for the MAC, otherwise use MII mode. The code is somewhat duplicated between these drivers for this.
Also, add AT91RM9200 compatibility strings to the ate driver. In the future, there's a good chance that ate will lose the MACB support and only attach to the AT91RM9200 EMAC device since the macb works now that RMII support has been added to it.
|
290509 |
07-Nov-2015 |
imp |
Add support for RMII in macb, cribbed slightly from the ate driver. This is taken from the MAC at boot, but can be overridden with 'options AT91_MACB_USE_RMII'.
Switch to macb for HL201 and SAM9G20EK boards. It now works both places. Also start to sneak up on FDT for the SAM9G20EK board, but leave disabled due to issues with MMC that haven't been resolved. Add early debug support for the SAM9G20EK since that is required for FDT to work presently on these SoC.
|
290472 |
06-Nov-2015 |
skra |
Set correct code for signal in abort_align() routine. Remove superfluous printf() and both unnecessary and obsolete comments.
Approved by: kib (mentor)
|
290465 |
06-Nov-2015 |
cognet |
Include opt_platform.h to get FDT defined.
|
290457 |
06-Nov-2015 |
skra |
Make interrupt dispatching MP safe. Use GPU interrupt bit in per-core interrupt status register to process shared interrupts only if the bit is active and only on core to which they are routed.
Reviewed by: imp, loos Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D3723
|
290422 |
05-Nov-2015 |
cognet |
Make if_macb work with FDT.
|
290420 |
05-Nov-2015 |
cognet |
Make at91_pmc probe any at91 pmc device we support, not just at91rm9200.
MFC after: 1 week
|
290382 |
05-Nov-2015 |
gonzo |
Add /dev/vcio, userland access point to VideoCore mailbox property channel It's required by some applications in raspberrypi-userland package
|
290381 |
05-Nov-2015 |
gonzo |
Refactor mailbox property API to make it usable for /dev/vcio driver:
- Add bcm2835_mbox_property for generic property request, it accepts pointer to prepared property chan message and its size, forwards it to MBOX and copies result back - Make all bcm2835_mbox_XXX functions that use property channel go through bcm2835_mbox_property path. Do not accept device_t as an argument, it's not required: all DMA operatiosn should go through mbox device, and all API consumers should report errors on their side.
|
290369 |
04-Nov-2015 |
skra |
Fix comment about unpriviledged instructions. Now, it matches with current state after r289372.
While here, do some style and comment cleanups. No functional changes.
Approved by: kib (mentor)
|
290349 |
04-Nov-2015 |
gonzo |
Revert r290243, it's vaid "illegal instruction" case
DEX bit is set to 1 and exception raised whenever vectorized operation is attempted on the VFP implementation that does not support it (i.e. on Cortex A7)
|
290309 |
02-Nov-2015 |
ian |
Eliminate the last dregs of the old global arm_root_dma_tag.
In the old days, device drivers passed NULL for the parent tag when creating a new tag, and on arm platforms that resulted in a global tag representing overall platform constraints being substituted in the busdma code. Now all drivers use bus_get_dma_tag() and if there is a need to represent overall platform constraints they will be inherited from a tag supplied by nexus or some bus driver in the hierarchy.
The only arm platforms still relying on the old global-tag scheme were some xscale boards with special PCI-bus constraints. This change provides those constraints through a tag supplied by the xscale PCI bus driver, and eliminates the few remaining references to the old global var.
Reviewed by: cognet
|
290273 |
02-Nov-2015 |
zbb |
Add support for branch instruction on armv7 with ptrace single step
Previous code supported only "continuous" code without any kind of branch instructions. To change that, new function was implemented which parses current instruction and returns an addres where the jump might happen (alternative addr). mdthread structure was extended to support two breakpoints (one directly below current instruction and the second placed at the alternative location). One of them must trigger regardless the instruction has or has not been executed due to condition field. Upon cleanup, both software breakpoints are removed.
This implementation parses only the most common instructions that are present in the code (like 99.99% of all), but there is a chance there are some left, not covered by the parsing routine. Parsing is done only for 32-bit instruction, no Thumb nor Thumb-2 support is provided.
Reviewed by: kib Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4021
|
290249 |
02-Nov-2015 |
gonzo |
Add mailbox tag/structure for touchscreen buffer address property
|
290243 |
01-Nov-2015 |
gonzo |
Treat synchronous VFP exception just like aynchronous: as an FP exception, not as illegal instruction
|
290171 |
30-Oct-2015 |
gonzo |
Fix framebuffer compatibility with new RPi firmware. Framebuffer driver receives video memory address from VideoCore through property mailbox channel. Older versions of firmware (and the one that is currently part of sysutils/u-boot-rpi and sysutils/u-boot-rpi2) returned real physical address, newer one returns VideoCore bus address, so we need to convert it to actual physical address. this version works with both older and newer interface.
|
290167 |
29-Oct-2015 |
gonzo |
Fix LEAVE_HYP macro: spsr is not guaranteed to contain valid value at this point, e.g. on RaspberryPi 2 when control is passed from loader to kernel it contains garbage. So we use cpsr as a base for new cpsr value: if we have reached this point it means current value is OK
Reviewed by: andrew
|
290120 |
28-Oct-2015 |
jah |
Retire pmap_dmap_iscurrent(). It is only a wrapper around pmap_is_current(), and is no longer called.
|
290106 |
28-Oct-2015 |
andrew |
Remove the s3c2xx0 code, it's no longer used. As far as I know I as the main user of this code, however I haven't used it in over two years, and don't expect to in the future.
|
290105 |
28-Oct-2015 |
andrew |
Start to remove support for the XScale i80321. As far as I can tell nobody uses this which makes it difficult to support.
|
290085 |
27-Oct-2015 |
andrew |
Start to remove support for the Samsung s3c24x0 SoCs by removing the kernel config, and support from NOTES.
|
289945 |
25-Oct-2015 |
zbb |
Add etherswitch support to mge
This commit introduces support for etherswitch devices that utilize SMI as a way of accessing its registers. SMI register is located in address space of mge -- access to it was exported through MDIO interface.
Attachment functions were enhanced so as to ensure proper initialisation in both cases: 1) PHYs attached directly to mge, 2) PHYs attached to switch device and switch attached to mge. Attachment of etherswitch device depends on dts entry with compatible="mrvl,sw" property. If none is found, typical PHY attachment procedure follows.
In case of switch attached, PHYs' status and configuration is accessible via etherswitchcfg, and ifconfig shows always-up, non-configurable mge interfaces.
Due to the fact that there may be simultaneous accessess to SMI registers (e.g. from PHY attached to one of mge instances and switch to the other), SMI access interlock was added. It is SX lock, because sleep ability is necessary -- busy-waiting would result in poor performance due to long delays required by hardware. Underlying switch driver is obliged to use sleepable locks as well.
Reviewed by: adrian Obtained from: Semihalf Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D3900
|
289893 |
24-Oct-2015 |
ian |
Define a couple macros to access cacheline size/mask in an arch-dependent way. This code should now work for all arm versions v4 thru v7.
|
289892 |
24-Oct-2015 |
ian |
Provide armv4/v5 implementations of several of the armv6 cache maintenance functions. This will make it possible to use the same busdma code for all arm platforms v4 thru v7.
|
289887 |
24-Oct-2015 |
ian |
Rename dcache_dma_preread() to dcache_inv_poc_dma() to make it clear that it is a dcache invalidate to point of coherency just like dcache_inv_poc(), but a slightly different version specific to dma operations. Elaborate the comment about how and why it's different.
|
289865 |
24-Oct-2015 |
ian |
A few more whitespace, style, and comment cleanups. No functional changes.
|
289864 |
24-Oct-2015 |
ian |
Bring in all the new(-ish) statistics code from armv6.
|
289862 |
24-Oct-2015 |
ian |
Change the preallocation of a busdma segment mapping array from per-tag to per-map. The per-tag scheme is not safe, and a mutex can't be used to protect it because the mapping routines can't sleep. Code brought in from armv6 implementation.
|
289858 |
23-Oct-2015 |
ian |
Instead of all memory allocations using M_DEVBUF, use new categories M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists), and M_BOUNCE for bounce pages.
|
289857 |
23-Oct-2015 |
ian |
Instead of all memory allocations using M_DEVBUF, use new categories M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists), and M_BOUNCE for bounce pages.
|
289854 |
23-Oct-2015 |
ian |
Catch up to r232356: change the boundary constraint type to bus_addr_t. This code lived in the projects/armv6 branch when that change got applied to all the other arches.
|
289851 |
23-Oct-2015 |
ian |
Whitespace and style nits, no functional changes.
The goal is to make these two files cosmetically alike so that the actual implementation differences are visible. The only changes which aren't spaces<->tabs and rewrapping and reindenting lines are a couple fields shuffled around in the tag and map structs so that everything is in the same order in both versions (which should amount to no functional change).
|
289825 |
23-Oct-2015 |
jah |
Remove unclear comment about address truncation in busdma. Add (hopefully much clearer) comment at declaration of PHYS_TO_VM_PAGE().
Noted by: avg
|
289759 |
22-Oct-2015 |
jah |
Use pmap_quick* functions in armv6 busdma, for bounce buffers and cache maintenance. This makes it safe to sync buffers that have no VA mapping associated with the busdma map, but may have other mappings, possibly on different CPUs. This also makes it safe to sync unmapped bounce buffers in non-sleepable thread contexts.
Similar to r286787 for x86, this treats userspace buffers the same as unmapped buffers and no longer borrows the UVA for sync operations.
Submitted by: Svatopluk Kraus <onwahe@gmail.com> (earlier revision) Tested by: Svatopluk Kraus Differential Revision: https://reviews.freebsd.org/D3869
|
289704 |
21-Oct-2015 |
ian |
Fix parsing of I2C addresses properties in fdt data. I2C address is represented in 7-bits format in DT files, but system expect it in 8-bit format. Also, fix two drivers that locally hack around this bug.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
289698 |
21-Oct-2015 |
ian |
Move arm_gic_bind() out of the #ifdef SMP block to fix compile errors in the not-SMP case. This is safe because arm_irq_next_cpu() will return the cpuid of the current/only core in the not-SMP case.
Submitted by: Bartosz Szczepanek @ semihalf
|
289675 |
21-Oct-2015 |
jah |
Use pmap_quick* for out-of-context bounce buffers and (limited) cache maintenance of unmapped buffers in armv5 busdma.
Tested by: Mattia Rossi <mattia.rossi.mailinglists@gmail.com> Differential Revision: https://reviews.freebsd.org/D3522
|
289631 |
20-Oct-2015 |
ian |
Uncomment some rather important code that was commented out for benchmarking. Normally this routine is supposed to loop until the PIC returns a "no more interrupts pending" indication. I had commented that out to do just one interrupt per invokation to do some timing tests.
Spotted by: Svata Kraus Pointy Hat: ian
|
289630 |
20-Oct-2015 |
ganbold |
Include "opt_platform.h" to fix kernel build for amlogic devices.
|
289619 |
20-Oct-2015 |
ian |
Follow the advice of the misplaced comment and don't access the map struct after freeing it. Remove the comment whose uselessness has been revealed.
|
289602 |
19-Oct-2015 |
ian |
Set the correct values in the arm aux control register, based on chip type.
The bits in the aux control register vary based on the processor type. In the past we've always just set the 'smp' and "broadcast tlb/cache ops' bits, which worked fine for the first few SoCs we supported. Now that we support most of the cortex-a series processors, it's important to get the right bits set based on the processor type.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
289554 |
19-Oct-2015 |
gonzo |
Enable gpiobacklight in BEAGLEBONE config to support LCD capes by 4DSYSTEMS out of box
|
289548 |
18-Oct-2015 |
ian |
Only decode fdt data which belongs to the GIC controller.
The interrupts-extended property is a list of controller-specific interrupt tuples for more than one controller. The decode routine of every PIC gets called in the pre-INTRNG code (nexus doesn't know which device instance belongs to which fdt node), so the GIC code has to check each FDT node it is asked to decode to ensure it is the owner.
Because in the pre-INTRNG world there can only be one instance of a GIC, it's safe to cache the results of a positive lookup in a static variable to avoid the expensive lookups on subsequent calls.
Submitted by: Svatopluk Kraus <onwahe@gmail.com> Differential Revision: https://reviews.freebsd.org/D2345
|
289547 |
18-Oct-2015 |
ian |
Include "opt_platform.h" early so that the FDT option is visible as needed.
|
289537 |
18-Oct-2015 |
ian |
Enable ARM_INTRNG on IMX6 platforms, and make the imx_gpio driver an interrupt controller.
The latter is required for INTRNG, because of the hardware erratum workaround installed by the linux folks into the imx6 FDT data, which remaps an ethernet interrupt to the gpio device. In the non-INTRNG world we intercept the call to map the interrupt and map it back to the ethernet hardware (because we don't need linux's workaround), but in the INTRNG world we lose the hookpoint where that remapping was happening, but we gain the ability to work the way linux does by having the gpio driver dispatch the interrupt.
|
289532 |
18-Oct-2015 |
ian |
Enable ARM_INTRNG on the pandaboard platform.
Differential Revision: https://reviews.freebsd.org/D2048
|
289529 |
18-Oct-2015 |
ian |
Import ARM_INTRNG, the "next generation" interrupt architecture for arm and armv6 architecures. The primary enhancement over the old design is support for hierarchical interrupt controllers (such as a gpio driver which can receive interrupts from a root PIC and act as a PIC itself for clients interested in handling a change of gpio pin state as an interrupt). The new code also provides an infrastructure for mapping interrupts described in metadata in the form of a "controller reference plus interrupt number" tuple into the simple "0-n" flat numeric space understood by rman and the bus resource mechanisms.
Use of the new code is enabled by setting the ARM_INTRNG option, and by making a few simple changes to the platform's support code. In addition each existing PIC driver needs changes to be ready for INTRNG; this commit contains the changes for the arm/gic driver, which most armv6 SoCs use, but it does not enable the new code yet on any platform.
This project has been many years in the making, starting as a GSoC project by Jakub Klama (jceel@) in 2012. That didn't get committed right away and the source base evolved out from under it to some degree. In 2014 I rebased the diffs to then -current and did some enhancements in the area of mapping interrupt numbers and storing associated fdt data, then the project went cold again for a while. Eventually Svata Kraus took that work in progress and did another big round of work on it, removing most of the remaining rough edges. Finally I took that and made one more pass through it, mostly disabling the "INTR_SOLO" feature for now, pending further design discussions on how to most efficiently dispatch a pending interrupt through more than one layer of PIC. The current code with the INTR_SOLO feature disabled uses approximate 100 extra cpu cycles for each cascaded PIC the interrupt has to be passed to, so what's left to do is about efficiency, not correct operation.
Differential Revision: https://reviews.freebsd.org/D2047
|
289522 |
18-Oct-2015 |
ian |
Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is the name the function will have when the new ARM_INTRNG code is integrated, and doing this rename first will make it easier to toggle the new interrupt handling code on/off with a config option for debugging.
|
289477 |
18-Oct-2015 |
ian |
Fix a strange macro re-definition compile error. If the VM_MAXUSER_ADDRESS value is defined as a config option the definition is emitted into opt_global.h which is force-included into everything. In addition, the symbol is emitted by the genassym mechanism, but that by its nature reduces the value to a 0xnnnnnnnn number. When compiling a .S file you end up with two different definitions of the macro (they evaluate to the same number, but the text is different, upsetting the compiler).
Nothing has changed about this code for a while but the compile error is new, so this must be fallout from the clang 3.7 update or something.
|
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
|
289137 |
11-Oct-2015 |
mav |
Remove compatibility shims for legacy ATA device names.
We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims.
|
289093 |
09-Oct-2015 |
ian |
Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. Make it clearer what each one means in the comments that define them.
IIC_BUSBSY was used in many places to mean two different things, either "someone else has reserved the bus so you have to wait until they're done" or "the signal level on the bus was not in the state I expected before/after issuing some command".
Now IIC_BUSERR is used consistantly to refer to protocol/signaling errors, and IIC_BUSBSY refers to ownership/reservation of the bus.
|
289091 |
09-Oct-2015 |
ian |
Mostly rewrite the imx i2c driver. This started out as an attempt to fix one specific problem: the driver didn't check for ACK/NAK after writing a slave address byte to the bus, and some slaves signal that they are busy (such as when completing an internal write to flash memory) by sending a NAK in response to being addressed.
While working on that problem I discovered that the driver's handling of error conditions in general didn't match the state transition diagram in the reference manual, and making that right resulted in a lot of code reorganization.
Along the way various other changes also happened...
- Remove a mutex that wasn't protecting anything. - Remove some mystery DELAY()s, document the few that remain. - Use pause_sbt(9) to yield the processor for the bulk of the time it takes to transfer each byte rather than busy-polling the whole time. - Disable the controller when no transfers are in progress; since we don't operate in slave mode, there's no reason to run the hardware. - Remove a bunch of unecessary code from probe().
|
288992 |
07-Oct-2015 |
andrew |
Move pmu.c to files.arm and rename the option to pmu. This is not hwpmc specific as we may use the pmu registers for other uses. No configs seem to currently build this.
This will allow for more use of this device.
Discussed with: bz Sponsored by: ABT Systems Ltd
|
288983 |
07-Oct-2015 |
kib |
A follow-up to r288492. In fact, revert the mentioned commit for pre-VFPv3 processors, since they do require software support code to handle denormals. For VFPv3 and later, enable flush-to-zero if hardware does not claim full denormals arithmetic support by VMVFR1_FZ field in mvfr1 register.
The end result is that we do use correct fpu environment on Cortexes with VFPv3, while ARM11 (e.g. rpi) is in non-compliant flush-to-zero mode. At least CPUs without complete hardware implementation of IEEE 754 do not cause unhandled floating point exception on underflow, as it was before r288492.
Noted by: ian Tested by: gjb Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
288824 |
05-Oct-2015 |
br |
Attach interrupt controller device before other devices.
Sponsored by: University of Cambridge
|
288662 |
04-Oct-2015 |
rwatson |
Add missing stack unwind information to several assembly functions on ARMv6/7:
- Define _SAVE() macro to allow unwind data to be conditionally defined for ARM assembly code in the kernel.
- Use _SAVE() to provide unwind information for bcopy_page(), and two (of many) instances of copyin() and copyout().
Reviewed by: andrew, imp MFC after: 3 days Sponsored by: University of Cambridge
|
288492 |
02-Oct-2015 |
kib |
Do not set 'flush to zero' VFPSCR_FZ bit by default. The correct implementation of IEEE 754 arithmetic depends on denormals operating correctly. Both perl test suite and paranoia tripped over the setting.
Reported by: Stefan Parvu <sparvu@kronometrix.org> Discussed with: andrew Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
288491 |
02-Oct-2015 |
kib |
FreeBSD does not support SMP on ARMv5. Since processor is always self-consistent, there is no need in anything but compiler barrier in the implementation of atomic_thread_fence_*() on ARMv5. Split implementation of fences for ARMv4/5 and ARMv6; the former use compiler barriers, the later also perform hardware barriers.
An issue which is fixed by the change is the faults from the CP15 coprocessor accesses in the user mode. This was uncovered by the pthread_once() changes in r287556.
Reported by: Mattia Rossi <mattia.rossi.mailinglists@gmail.com> Discussed with: alc, cognet, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
288447 |
01-Oct-2015 |
andrew |
An IPI must be cleared before it is handled otherwise next IPI could be missed. In other words, if a new request for an IPI is sent while the previous request is being handled but the IPI is not cleared yet, the clearing of the previous IPI request also clears the new one and the handling is missed.
There are only three MP interrupt controllers in ARM now. Two of them are fixed by this change, the third one is correct, probably only just by accident. The fix is minimalistic as new interrupt framework is awaited.
It was debugged on RPi2 where missing IPI handling together with SCHED_ULE led to situation in which tdq_ipipending was not cleared and so IPI_PREEMPT was stopped to be sent. Various odditys were found related to slow system response time like various events timed out, and slow console response.
Submitted by: Svatopluk Kraus <onwahe@gmail.com> Reviewed by: loos, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3722
|
288256 |
26-Sep-2015 |
alc |
Exploit r288122 to address a cosmetic issue. Since PV chunk pages don't belong to a vm object, they can't be paged out. Since they can't be paged out, they are never enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages are being enqueued in the inactive queue. As of r288122, we can avoid this false impression by passing PQ_NONE.
Submitted by: kmacy (an earlier version) Differential Revision: https://reviews.freebsd.org/D1674
|
288125 |
22-Sep-2015 |
andrew |
Add support for __atomic_FOO_fetch on arm prior to armv6. These return the new value where the existing functions return the old value.
MFC after: 1 Week
|
288056 |
21-Sep-2015 |
loos |
Enable if_dwc for Allwinner A20 based boards.
This enables the gigabit ethernet on cubieboard2 and banana pi.
A special thanks to Netgate who gently provided me with a banana pi almost a year ago.
|
288050 |
21-Sep-2015 |
loos |
Add the A20 glue code for if_dwc.
This code initializes the GMAC clock and sets the pin mux to rgmii.
It also override the if_dwc defaults to set the alternate descriptor type and MII clock used on A20.
Tested on cubieboard2 and banana pi.
|
288023 |
20-Sep-2015 |
loos |
Add alternate descriptors support for if_dwc.
This also adds a newbus interface that allows a SoC to override the following settings:
- if_dwc specific SoC initialization; - if_dwc descriptor type; - if_dwc MII clock.
This seems to be an old version of the hardware descriptors but it is still in use in a few SoCs (namely Allwinner A20 and Amlogic at least).
Tested on Cubieboard2 and Banana pi.
Tested for regressions on Altera Cyclone by br@ (old version).
Obtained from: NetBSD
|
288000 |
20-Sep-2015 |
kib |
Add support for weak symbols to the kernel linkers. It means that linkers no longer raise an error when undefined weak symbols are found, but relocate as if the symbol value was 0. Note that we do not repeat the mistake of userspace dynamic linker of making the symbol lookup prefer non-weak symbol definition over the weak one, if both are available. In fact, kernel linker uses the first definition found, and ignores duplicates.
Signature of the elf_lookup() and elf_obj_lookup() functions changed to split result/error code and the symbol address returned. Otherwise, it is impossible to return zero address as the symbol value, to MD relocation code. This explains the mechanical changes in elf_machdep.c sources.
The powerpc64 R_PPC_JMP_SLOT handler did not checked error from the lookup() call, the patch leaves the code as is (untested).
Reported by: glebius Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
287882 |
16-Sep-2015 |
zbb |
Add domain support to PCI bus allocation
When the system has more than a single PCI domain, the bus numbers are not unique, thus they cannot be used for "pci" device numbering. Change bus numbers to -1 (i.e. to-be-determined automatically) wherever the code did not care about domains.
Reviewed by: jhb Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3406
|
287645 |
11-Sep-2015 |
markj |
Add stack_save_td_running(), a function to trace the kernel stack of a running thread.
It is currently implemented only on amd64 and i386; on these architectures, it is implemented by raising an NMI on the CPU on which the target thread is currently running. Unlike stack_save_td(), it may fail, for example if the thread is running in user mode.
This change also modifies the kern.proc.kstack sysctl to use this function, so that stacks of running threads are shown in the output of "procstat -kk". This is handy for debugging threads that are stuck in a busy loop.
Reviewed by: bdrewery, jhb, kib Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3256
|
287625 |
10-Sep-2015 |
kib |
Do not hold the process around the vm_fault() call from the trap()s. The only operation which is prevented by the hold is the kernel stack swapout for the faulted thread, which should be fine to allow.
Remove useless checks for NULL curproc or curproc->p_vmspace from the trap_pfault() wrappers on x86 and powerpc.
Reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
|
287322 |
31-Aug-2015 |
andrew |
Clean up the style of the LEAVE_HYP macro.
|
287316 |
30-Aug-2015 |
loos |
Add the LED definitions from vendor's DTS.
Add gpioled support to A20 kernel.
While here rename the gpio phandle to match the one used in the vendor's DTS.
|
287315 |
30-Aug-2015 |
loos |
The vendor's DTS for Allwinner A20 uses a different way to map the gpio pins, they specify the bank and the pin in two separated cells.
This allow the use of vendor's DTS definitions by adding a gpio map routine that copes with that.
|
287306 |
30-Aug-2015 |
loos |
In preparation to support other A20 based boards, rename the CUBIEBOARD2 kernel configuration to A20.
There are other boards (namely the banana pi) that use exactly the same devices.
Additionally, we are moving from static FDT support (DTB compiled in-kernel) to DTB passed to kernel by the boot loader (ubldr). The u-boot for these boards are already available on ports and as the crochet support for these boards isn't committed yet, this should not bring any issues.
Discussed with: ian
|
287127 |
25-Aug-2015 |
zbb |
Leave hypervisor mode upon startup on ARMv7
If ARMv7 boots in HYP mode, switch to SVC32.
Reviewed by: ian Submitted by: Wojciech Macek <wma@semihalf.com> Jakub Palider <jpa@semihalf.com> Obtained from: Semihalf Sponsored by: Annapurna Labs Differential Revision: https://reviews.freebsd.org/D1810
|
287083 |
23-Aug-2015 |
andrew |
Enable KDTRACE_HOOKS by default on all armv6 kernels to get more testing.
|
287000 |
21-Aug-2015 |
royger |
preload_search_info: make sure mod is set
Add a check to preload_search_info to make sure mod is set. Most of the callers of preload_search_info don't check that the mod parameter is set, which can cause page faults. While at it, remove some now unnecessary checks before calling preload_search_info.
Sponsored by: Citrix Systems R&D Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3440
|
286969 |
20-Aug-2015 |
ian |
Remove code left over from the armv4 days. On armv4, cache maintenance operations always had to be aligned and sized to cache lines. On armv6 and later, cache maintenance operates on a cache line if any part of the line is referenced in the operation, so we don't need extra code to align the edges of the sync range.
|
286968 |
20-Aug-2015 |
ian |
Minor comment and style fixes, no functional change.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
286960 |
20-Aug-2015 |
kib |
Typo.
|
286944 |
19-Aug-2015 |
ian |
Enable the watchdog driver on imx6, now that it works.
|
286943 |
19-Aug-2015 |
ian |
Make the imx watchdog actually work, by setting WDOG_CR_WDE (enable bit). Also, follow the rules from watchdog(9) about what values to return in various situations (especially, don't touch *error when asked to set a non-zero timeout that isn't achievable on the hardware).
|
286942 |
19-Aug-2015 |
ian |
Add compatible strings for all the hardware this driver works with.
Also, move the READ/WRITE bus space access macros from the header into the source file, and rename them to RD2/WR2 to make it clear they're 16-bit accessors. (READ/WRITE just don't seem like good names to be in a public header file.)
|
286851 |
17-Aug-2015 |
jah |
Some cleanups to make the style of pmap_quick_enter_page() and pmap_quick_remove_page() in arm/pmap-v6-new.c more consistent with the rest of the file.
Submitted by: Svatopluk Kraus <onwahe@gmail.com> Approved by: kib (mentor)
|
286783 |
14-Aug-2015 |
ian |
Use simple fixed name strings for these timecounters and eventimers which are tied to fixed pieces of hardware; dynamic string formatting isn't needed.
|
286728 |
13-Aug-2015 |
ian |
Add a new PPS driver for AM335x (beaglebone) timer hardware. This can be used as a module or compiled-in.
|
286726 |
13-Aug-2015 |
marcel |
Instead of having separate do_sync functions for ARM_ARCH 6 vs. ARM_ARCH >= 7, use the dmb() macro defined in machine/atomic.h
Submitted by: Steve Kiernan <stevek@juniper.net> Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D3355
|
286725 |
13-Aug-2015 |
marcel |
The Broadcom BCM56060 chip has a Cortex-A9R4 core.
Submitted by: Steve Kiernan <stevek@juniper.net> Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D3357
|
286696 |
12-Aug-2015 |
ian |
Remove all dregs of the old PPS driver from this code, in preparation for redoing it as a separate driver. Now that each hardware timer is handled by a separate instance of the timer driver, it no longer makes sense to bundle the pps driver with the regular timecounter code. (When all 8 timers were handled by one driver there was no choice about this.)
Split the hardware register definitions out to their own file, so that the new pps driver (coming in a separate commit later) can share them.
With the PPS driver gone, the question of which hardware timer to use for what purpose becomes much easier (some instances can't do the PPS capture). Now we can just hardcore timer2 for eventtimer and timer3 for timecounter.
This also now only instantiates devices for the 2 hardware timers actually used to implement eventtimer and timecounter. This is required so that other drivers can come along and attach to other hardware timers to provide other functionality. (In addition to PPS, this hardware can also do PWM stuff, general pulse width and frequency measurements, etc. Maybe some day we'll have drivers for those things.)
|
286693 |
12-Aug-2015 |
ian |
Remove a bogus printf that whines every time loading a driver module triggers a fresh round of probing.
|
286692 |
12-Aug-2015 |
ian |
Add a MODULE_VERSION(), because other things MODULE_DEPEND() on this.
|
286678 |
12-Aug-2015 |
ian |
Add a routine to return the hardware instance/unit number from ti,hwmods, given the hardware name.
The ti,hwmods property is used (among other things) to associate an fdt node with a specific instance of some hardware. For example given a device node that contains the property ti,hwmods = "timer3", if you call this passing "timer" as the hwmod string to look for it would return 3.
|
286648 |
11-Aug-2015 |
ian |
Make this compile again when PPS_SYNC is defined. Also remove a couple comment blocks and constants that no longer apply.
|
286615 |
11-Aug-2015 |
pfg |
Clean out some externally visible "more then" grammar
MFC after: 3 days
|
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
|
286327 |
05-Aug-2015 |
emaste |
Rationalize BSD license on sys/*/include/float.h
Remove the advertising clause from the Regents of the University of California's license, per the letter dated July 22, 1999.
Update clause numbering.
|
286296 |
04-Aug-2015 |
jah |
Add two new pmap functions: vm_offset_t pmap_quick_enter_page(vm_page_t m) void pmap_quick_remove_page(vm_offset_t kva)
These will create and destroy a temporary, CPU-local KVA mapping of a specified page.
Guarantees: --Will not sleep and will not fail. --Safe to call under a non-sleepable lock or from an ithread
Restrictions: --Not guaranteed to be safe to call from an interrupt filter or under a spin mutex on all platforms --Current implementation does not guarantee more than one page of mapping space across all platforms. MI code should not make nested calls to pmap_quick_enter_page. --MI code should not perform locking while holding onto a mapping created by pmap_quick_enter_page
The idea is to use this in busdma, for bounce buffer copies as well as virtually-indexed cache maintenance on mips and arm.
NOTE: the non-i386, non-amd64 implementations of these functions still need review and testing.
Reviewed by: kib Approved by: kib (mentor) Differential Revision: http://reviews.freebsd.org/D3013
|
286294 |
04-Aug-2015 |
rpaulo |
BEAGLEBONE: remove dtrace from MODULES_EXTRA.
This config is already building all modules, so we don't need the MODULES_EXTRA definition. It was also causing problems to users who rely on MODULES_OVERRIDE to do the right thing.
Discussed with: ian
|
286214 |
03-Aug-2015 |
gonzo |
Pass correct type of argument to ti_gpio_unmask_irq in ti_gpio_activate_resource
|
286165 |
01-Aug-2015 |
gonzo |
Set output pin initial value based on pin's pinmux pullup/pulldown setup
Some of FDT blobs for AM335x-based devices use pinmux pullup/pulldown flag to setup initial GPIO ouputp value, e.g. 4DCAPE-43 sets LCD DATAEN signal this way. It works for Linux because Linux driver does not enforce pin direction until after it's requested by consumer. So input with pullup flag set acts as output with GPIO_HIGH value
Reviewed by: loos
|
286071 |
30-Jul-2015 |
zbb |
Remove obsolete vendor code from Alpine platform support
This is a clean-up patch from a serie delivering support for Annapurna Labs Alpine PoC. The HAL files have already been added to sys/contrib/alpine-hal so there is no need for them in the platform directory. This patch removes obsolete files.
Reviewed by: andrew Obtained from: Semihalf Sponsored by: Annapurna Labs Differential Revision: https://reviews.freebsd.org/D3248
|
286040 |
29-Jul-2015 |
sbruno |
Remove dead functions pmap_pvdump and pads.
Differential Revision: D3206 Submitted by: kevin.bowling@kev009.com Reviewed by: alc
|
285868 |
25-Jul-2015 |
gonzo |
Fix color mapping for TDA19988. Values for VIP_CNTRL_1 and VIP_CNTRL_2 registers were mixed up
|
285867 |
25-Jul-2015 |
gonzo |
Synchronize PIN input/output modes with gnu/dts/include/dt-bindings/pinctrl/am33xx.h gpio driver requires exact value to match SoC pin mode with GPIO pin direction
|
285866 |
25-Jul-2015 |
gonzo |
If there is panel info in DTB do not wait for HDMI event and setup framebuffer immediately
|
285703 |
19-Jul-2015 |
markj |
Implement the lockstat provider using SDT(9) instead of the custom provider in lockstat.ko. This means that lockstat probes now have typed arguments and will utilize SDT probe hot-patching support when it arrives.
Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D2993
|
285694 |
19-Jul-2015 |
andrew |
Fix atomic_store_64, it should write the value passed in, not the value read by the load.
Pointy Hat: andrew
|
285689 |
19-Jul-2015 |
andrew |
Clean up the style of the armv6 atomic code.
Sponsored by: ABT Systems Ltd
|
285687 |
19-Jul-2015 |
andrew |
Sort the ARM atomic functions to be in alphabetical order.
Sponsored by: ABT Systems Ltd
|
285631 |
16-Jul-2015 |
andrew |
Split out the arm and armv6 parts of atomic.h to new files. While here use __ARM_ARCH to determine which revision of the architecture is applicable.
Sponsored by: ABT Systems Ltd
|
285627 |
16-Jul-2015 |
zbb |
Fix KSTACK_PAGES issue when the default value was changed in KERNCONF
If KSTACK_PAGES was changed to anything alse than the default, the value from param.h was taken instead in some places and the value from KENRCONF in some others. This resulted in inconsistency which caused corruption in SMP envorinment.
Ensure all places where KSTACK_PAGES are used the opt_kstack_pages.h is included.
The file opt_kstack_pages.h could not be included in param.h because was breaking the toolchain compilation.
Reviewed by: kib Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3094
|
285484 |
13-Jul-2015 |
loos |
Bring a few simplifications to a10_gpio:
o Return the real hardware state in gpio_pin_getflags() instead of keep the last state in an internal table. Now the driver returns the real state of pins (input/output and pull-up/pull-down) at all times. o Use a spin mutex. This is required by interrupts and the 1-wire code. o Use better variable names and place parentheses around them in MACROS. o Do not lock the driver when returning static data.
Tested with gpioled(4) and DS1820 (1-wire) sensors on banana pi.
|
285429 |
12-Jul-2015 |
ian |
Add PRINTF_BUFR_SIZE=128 to avoid interleaved output.
|
285407 |
11-Jul-2015 |
loos |
Return the FDT node of the GPIO controller to gpiobus. It is used by the children of gpiobus.
|
285389 |
11-Jul-2015 |
andrew |
Always send a SIGSEGV on a map failure. Use the code to tell the reason for the signal.
Sponsored by: ABT Systems Ltd
|
285283 |
08-Jul-2015 |
kib |
Add the atomic_thread_fence() family of functions with intent to provide a semantic defined by the C11 fences with corresponding memory_order.
atomic_thread_fence_acq() gives r | r, w, where r and w are read and write accesses, and | denotes the fence itself.
atomic_thread_fence_rel() is r, w | w.
atomic_thread_fence_acq_rel() is the combination of the acquire and release in single operation. Note that reads after the acq+rel fence could be made visible before writes preceeding the fence.
atomic_thread_fence_seq_cst() orders all accesses before/after the fence, and the fence itself is globally ordered against other sequentially consistent atomic operations.
Reviewed by: alc Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
|
285161 |
05-Jul-2015 |
ian |
Enable ipsec by default on all armv6 platforms.
|
285106 |
03-Jul-2015 |
loos |
Add the routines to activate the GMAC clock and setup the GMAC mode.
Tested on Cubieboard 2 and Banana pi.
|
285105 |
03-Jul-2015 |
loos |
Rename a10_emac_gpio_config() to a10_gpio_ethernet_activate() to make the change to GMAC easier on A20 SoCs.
On A10 only the EMAC controller is available (fast ethernet), but on A20 there is also GMAC a high (or better) performant controller (gigabit ethernet).
On A20 the both controllers uses the same pins to talk to the ethernet PHY (MII or RGMII) and they can be selected by the GPIO pin mux.
There is work in progress to bring in GMAC support.
|
285103 |
03-Jul-2015 |
loos |
Remove duplicate and unnecessary includes.
While here remove an unused and wrong define.
|
285090 |
03-Jul-2015 |
loos |
Add AHCI attachment code for Allwinner A10/A20 SoCs.
The Allwinner SoC has an AHCI device on its internal main bus rather than the PCI bus. This SoC is somewhat underdocumented, and its SATA controller is no exception. The methods to support this chip were harvested from the Linux Allwinner SDK, and then constants invented to describe what's going on based on low-level constants contained in the SATA standard and guess work.
This SoC requires a specific AHCI channel setup in order to start the operations on the channel properly.
Clock setup and AHCI channel setup idea came from NetBSD.
Tested on Cubieboard 2 and Banana pi (and attachment on Cubieboard by Pratik Singhal).
Differential Revision: https://reviews.freebsd.org/D737 Submitted by: imp Reviewed by: imp, ganbold, mav, andrew
|
285017 |
01-Jul-2015 |
loos |
Add DMA support for Allwinner MMC controller.
DMA handles all data transfers up to 128K or 16 segments and fallback to pio mode when DMA requirements are not met.
The read performance has improved greatly while the write performance also showed some improvement but seems limited by the card type and quality.
Submitted by: Pratik Singhal <pratiksinghal@freebsd.org> Sponsored by: Google Summer of Code 2015 Tested on: A10 (cubieboard) and A20 (cubieboard 2 and banana pi)
|
284871 |
26-Jun-2015 |
andrew |
pc_curpmap is only in the armv6 pcpu data.
|
284771 |
24-Jun-2015 |
ian |
Fix a misplaced #endif (maybe a mismerge?). Emitting the symbol for CURPMAP is not dependent on whether VFP (hardware floating point) is enabled.
|
284562 |
18-Jun-2015 |
gonzo |
Add missing driver for TDA19988 HDMI framer
|
284534 |
18-Jun-2015 |
gonzo |
Add HDMI support to Beaglebone Black:
- Add driver for TDA19988 HDMI framer - Add simple interface to communicate with HDMI sink: read EDID and set videomode - Add event-based API to notify LCD controller when HDMI sink is available - Add HDMI framer node and add refernce to it to lcdc node. This part of DTS tree is custom and does not match Linux DTS because Linux uses combination of pseudo-node in DTS and hardcoded driver information that does not map to our model.
|
284532 |
17-Jun-2015 |
gonzo |
- Add clk_set_source_freq field to struct ti_clock_dev so clock device consumers can configure clock frequency - Add ti_prcm_clk_set_source_freq wrapper for clk_set_source_freq - Add am335x_clk_set_arm_disp_freq function to control pixel clock frequency for LCD and HDMI output. Both of them are sensitive to frequency skews and we need to get pixel clock matching requested frequency as close to possible
|
284452 |
16-Jun-2015 |
andrew |
Write to the PRRR (Primary Region Remap Register) rather than reading from it during the early boot.
Found By: Patrick Wildt <patrick@bitrig.org> Sponsored by: ABT Systems Ltd
|
284449 |
16-Jun-2015 |
bz |
Trying to unbreak arm.LINT by properly putting the conditional include for dtrace further down in the include list where it belongs.
Reviewed by: andrew
|
284273 |
11-Jun-2015 |
andrew |
Add basic support for ACPI. It splits out the nexus driver to two new drivers, one for fdt, one for acpi. It then uses this to decide if it will use fdt or acpi.
The GICv2 (interrupt controller) and Generic Timer drivers have been updated to handle both cases.
As this is early code we still need FDT to find the kernel console, and some parts are still missing, including PCI support.
Differential Revision: https://reviews.freebsd.org/D2463 Reviewed by: jhb, jkim, emaste Obtained from: ABT Systems Ltd Relnotes: Yes Sponsored by: The FreeBSD Foundation
|
284265 |
11-Jun-2015 |
andrew |
Stop using VFP in pcpu.h when we mean ARMv6 and later.
|
284264 |
11-Jun-2015 |
andrew |
Fix the spelling of __ARM_ARCH >= 6 in sys/arm/arm.
|
284227 |
10-Jun-2015 |
br |
Allow DTrace to be compiled-in to the kernel. This will require for AArch64 as we dont have modules yet.
Sponsored by: HEIF5 Sponsored by: ARM Ltd. Differential Revision: https://reviews.freebsd.org/D1997
|
284214 |
10-Jun-2015 |
mjg |
Generalised support for copy-on-write structures shared by threads.
Thread credentials are maintained as follows: each thread has a pointer to creds and a reference on them. The pointer is compared with proc's creds on userspace<->kernel boundary and updated if needed.
This patch introduces a counter which can be compared instead, so that more structures can use this scheme without adding more comparisons on the boundary.
|
284190 |
09-Jun-2015 |
sobomax |
"status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".
|
284189 |
09-Jun-2015 |
sobomax |
Fix a typo in a comment that has been carried over from am335x_pmic.c.
|
284183 |
09-Jun-2015 |
sobomax |
Use tab to do identation consistently.
|
284182 |
09-Jun-2015 |
sobomax |
Extend TPS65217 support to be able to pull and decode battery charger configuration and provide some basic control knobs to set charger voltage and dump config on boot. Two loader tunables have been added:
o hw.am335x_pmic.bootverbose set to 1 to get more info on the boot;
o hw.am335x_pmic.vo: set to charger voltage to be applied on kernel initialization time, supported values are "4.10V", "4.15V", "4.20V" and "4.25V".
Cleanup code a bit in general, move TPS65217 register definitions into a separate header, convert bit-banging defines into bitmap structures.
Also threat the case when power source is neither "AC" nor "USB" as "Battery", not "Unknown".
|
284181 |
09-Jun-2015 |
alc |
Account for superpage mappings that are created by pmap_copy().
|
284147 |
08-Jun-2015 |
alc |
Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.
Differential Revision: https://reviews.freebsd.org/D2712 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
|
284115 |
07-Jun-2015 |
andrew |
Stop checking for ARM_TP_ADDRESS when we mean to check if building for ARMv6 or later.
|
284109 |
07-Jun-2015 |
andrew |
Remove pc_cpu, it was duplicating pc_cpuid so was unneeded.
|
284077 |
06-Jun-2015 |
br |
Include a header required for vtophys().
|
283947 |
03-Jun-2015 |
ian |
Better handling of userland sysarch() requests to flush icache.
On armv6, cache maintenance can trigger page faults. Add handling so that these turn into SIGSEGV that kills the process rather than panics that kill the kernel.
Differential Revision: https://reviews.freebsd.org/D2035 Submitted by: Michal Meloun <meloun@miracle.cz>
|
283918 |
02-Jun-2015 |
ian |
Add a missing wakeup when releasing ownership of the SPI hardware.
Also, validate the chipselect parameter before grabbing ownership of the hardware, and report timeout errors after releasing it.
PR: 200584
|
283888 |
01-Jun-2015 |
andrew |
Remove __ARM_EABI__ from sys/arm/arm, building for oabi is unsupported.
|
283887 |
01-Jun-2015 |
andrew |
Clear the C bit of the saved program state register when also clearing the return value. We use this bit to signal when a syscall has failed, and without this getcontext/setcontext may fail.
MFC after: 1 week
|
283839 |
31-May-2015 |
andrew |
Set the return value correctly on copy failure in copystr.
MFC after: 1 week
|
283812 |
31-May-2015 |
andrew |
We only support the ARM EABI in head, remove the check on __ARM_EABI__.
|
283550 |
26-May-2015 |
loos |
Remove unused mutex and softc variables.
|
283547 |
25-May-2015 |
ian |
Ensure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not BREAK_TO_DEBUGGER if they have a serial console (most do). A burst of serial line noise (such as unplugging a usb serial adapter) can look like a break and drop a working system into the debugger. The alt break sequence (<CR>~^B) works fine on both serial and non-serial consoles.
|
283503 |
25-May-2015 |
gonzo |
Rename fdt_find_child to ofw_bus_find_child. There is nothing FDT-specific in this function.
Suggested by: andrew@
|
283479 |
24-May-2015 |
dchagin |
The kernel sends signals to the processes via ABI specific sv_sendsig method. Native ABI do not need signal conversion, only emulators may want this. Usually emulators implements its own sv_sendsig method. For now only ibcs2 emulator does not have own sv_sendsig implementation and depends on native sendsig() method. So, remove any extra attempts to convert signal numbers from native sendsig() methods except from i386 where ibsc2 is living.
|
283426 |
24-May-2015 |
andrew |
Add support for getting the memory map from EFI if it has been pased in by loader.efi.
|
283382 |
24-May-2015 |
dchagin |
In preparation for switching linuxulator to the use the native 1:1 threads add a hook for cleaning thread resources before the thread die.
Differential Revision: https://reviews.freebsd.org/D1038
|
283367 |
24-May-2015 |
andrew |
Enable SMP on the qemu virt platform. We use the device tree to find which cpus to enable, and PSCI to start them.
|
283366 |
24-May-2015 |
andrew |
Remove trailing whitespace from sys/arm/arm
|
283365 |
24-May-2015 |
andrew |
Add more cp15_ functions, and use them in cpufunc.c where possible.
|
283362 |
24-May-2015 |
andrew |
Include the ofw cpu driver. This allows us to get a list of cpus enabled by qemu, however we may not be running on them.
|
283361 |
24-May-2015 |
ganbold |
Add kernel config and dts files for an aml8726-m3 based device. Following u-boot commands allow FreeBSD boot on Yiyate Android TV Box (aml8726-m3):
tv open 480p mmc rescan 0 fatload mmc 0 0x80100000 kernel.bin go 0x80100000
The current FreeBSD driver doesn't program the video clocks so the u-boot tv command is necessary in order for the frame buffer to be useful (otherwise it can be skipped).
The SD card for the Yiyate Android TV Box doesn't need anything special beyond creating a FAT16 and a UFS filesystem.
Differential Revision: https://reviews.freebsd.org/D2636 Submitted by: John Wehle
|
283337 |
23-May-2015 |
andrew |
Fix a lock up where we enter swapper() with interrupts disabled.
In smp_rendezvous_cpus we expect to wait for all cpus to enter smp_rendezvous_action. If we call this holding a proc lock swapper may attempt to also lock it, however as interrupts are disabled the cpu never handles the ipi. Because smp_rendezvous_action waits for all signaled cpus before contining it may get caught waiting for the cpu running swapper as the proc mutex will be unlocked after smp_rendezvous_cpus finishes.
The fix is to enable interrupts in the configure stage as we should be doing.
MFC after: 1 week
|
283331 |
23-May-2015 |
andrew |
Use the wait-for-event instruction to put the core we have just enabled to sleep while it waits to start scheduling. The boot core can then use the send-event instruction to wake the cores when they should enter the scheduler.
MFC after: 1 week
|
283314 |
23-May-2015 |
andrew |
Remove an unused header.
|
283297 |
22-May-2015 |
imp |
Export the eflags field from the elf header. This allows better discrimination between different subarch binaries, at least for mips and arm. Arm is implemented, mips is still tbd, so not currently exported. aarch64 does not export this because aarch64 binaries use different tags and flags than arm.
Differential Revision: https://reviews.freebsd.org/D2611
|
283291 |
22-May-2015 |
jkim |
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent.
Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
|
283287 |
22-May-2015 |
andrew |
Add a miibus_statchg and use it to enable Gigabit mode when appropriate.
MFC after: 1 week
|
283277 |
22-May-2015 |
imp |
Need to handle the !FDT case still too... I thought in r270025 we wouldn't need it, but it appears that we still do for the moment...
|
283276 |
22-May-2015 |
gonzo |
Switch TI platform support code from using FreeBSD's custom-baked DTS files to vendor-provided ones. It should make easier to adopt platform code to new revisions of hardware and to use DTS overlays for various Beaglebone extensions (shields/capes).
Original dts filenames were not changed, they're now wrappers over dts files provided by TI. So make sure you update .dtb files on your devices as part of kernel update
GPIO addressing was changed: instead of one global /dev/gpioc0 there are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25 on /dev/gpioc3
On Pandaboard serial console devices was changed from /dev/ttyu0 to /dev/ttyu2 so you'll have to update /etc/ttys to get login prompt on serial port in multiuser mode. Single user mode serial console should work as-is
Differential Revision: https://reviews.freebsd.org/D2146 Reviewed by: rpaulo, ian, Michal Meloun, Svatopluk Kraus
|
283253 |
21-May-2015 |
loos |
Add the MMC/SD driver for Allwinner SoCs.
This is based on the patch sent by Alexander Fedorov with the following fixes/improvements:
- Better error handling; - Clock is derived from PLL6 (obtained from netbsd); - No more unnecessary busy loops on interrupt handler; - style(9) fixes and code cleanup.
I also want to thanks Martin Galvan who has sent an alternative implementation with some interesting fixes.
Tested on CubieBoard2, Banana-Pi (thanks to netgate!) and Cubieboard1 (Pratik Singhal).
This is intended to pave the way for the upcoming GSoC work (and make easier the build of images for the supported boards).
PR: 196081 Submitted by: Alexander Fedorov <alexander.fedorov@rtlservice.com>
|
283248 |
21-May-2015 |
pfg |
ddb: finish converting boolean values.
The replacement started at r283088 was necessarily incomplete without replacing boolean_t with bool. This also involved cleaning some type mismatches and ansifying old C function declarations.
Pointed out by: bde Discussed with: bde, ian, jhb
|
283188 |
21-May-2015 |
ganbold |
Add missing break statement.
Submitted by: John Wehle
|
283186 |
21-May-2015 |
ganbold |
Add driver for usbclock generator for earlier amlogic chip.
Differential Revision: https://reviews.freebsd.org/D2590 Submitted by: John Wehle
|
283183 |
21-May-2015 |
ganbold |
Remove unnecessary break statements.
Submitted by: John Wehle
|
283181 |
21-May-2015 |
ganbold |
The RTC initialization values are based on the SoC which can be determined at runtime so there's no need to set the values in each DTS. Tested on YYHD18 (aml8726-m3), VSATV102 (aml8726-m6), and ODROIDC1 (aml8726-m8b).
Differential Revision: https://reviews.freebsd.org/D2588 Submitted by: John Wehle
|
283138 |
20-May-2015 |
rpaulo |
ti_pruss: pass the correct IRQ to userland.
Also, fix several problems with the kqueue notification.
Submitted by: Manuel Stühn freebsdnewbie at freenet.de
|
283137 |
20-May-2015 |
ganbold |
D2432 (Patch for Amlogic single core PIC) moved the SMP option out of AML8726 and into board specific config files since some boards (e.g. YYHD18) use the aml8726-m3 which only have a single core.
r283057 applied most of D2432, however while it removed SMP from AML8726, it missed adding the SMP option to the board specific config files.
Differential Revision: https://reviews.freebsd.org/D2589 Submitted by: John Wehle
|
283127 |
19-May-2015 |
imp |
Add NFS server to mix (for easier, in-place updates). Move to partition 2 for root (since partition 1 is reserved for FAT files the Atmel ROMs can load).
|
283126 |
19-May-2015 |
imp |
Improve comment about unmapped I/O and fix typos.
Submitted by: Matteo Riondato MFC After: 2 days
|
283112 |
19-May-2015 |
br |
Add Performance Monitoring Counters support for AArch64. Family-common and CPU-specific counters implemented.
Supported CPUs: ARM Cortex A53/57/72.
Reviewed by: andrew, bz, emaste, gnn, jhb Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2555
|
283072 |
18-May-2015 |
loos |
Remove unnecessary devices from allwinner kernels.
|
283057 |
18-May-2015 |
andrew |
Clean up the Amlogic interrupt controller driver to handle the case where we have both the Amlogic pic and a GIC. This may be the case in some configurations.
Differential Revision: https://reviews.freebsd.org/D2432 Submitted by: John Wehle <john@feith.com>
|
283052 |
18-May-2015 |
andrew |
Clean up the style to be "include<space><tab>" and remove options already in std.armv6.
|
283034 |
17-May-2015 |
andrew |
Clean up struct syscall_args: 1. Align to a 64-bit address so 64-bit data will be correctly aligned. 2. Add a comment explaining why. 3. Remove an unneeded value from the struct.
This fixes an issue where the struct may not be correctly aligned on the stack in the syscall function. This may lead to accesing a 64-bit value at a non 64-bit. This will raise an exception and panic the kernel.
We have been lucky where on arm and armv6 both clang and gcc correctly align the data, even without us asking to, however, on armeb with clang to not be the case. This tells the compiler we really do need this to be aligned.
Reported and tested by: jmg (on armeb with clang) MFC after: 1 Week [1, 2]
|
283033 |
17-May-2015 |
ian |
Do not set preload_addr_relocate for ARM. Apparently there was a time when loader(8) passed physical addresses in loader metadata for arm, but that is no longer true; all metadata has already been adjusted to vitual addresses by loader.
I can't track down the exact revision in loader where a change from physical to virtual metadata addresses happened. The code involved is very twisty and complicated. I suspect the change was an unintended consequence of the r247301, r247413, r248118 series of changes I made a couple years ago.
|
283014 |
16-May-2015 |
imp |
Don't allow unmapped I/O. The pmap isn't quite up to the task. Add a comment to this effect and switch the default. My old AT91SAM9G20 now boots, fsck's the SD card and runs w/o an issue for the first time since a 9.1-ish stable build I did a few years ago.
Problems with unmapped I/O: o un-page-aligned I/O requests to devices fail (notably fsck and newfs). o write-back caching was totally broken. write-through caching needed to be enabled. o Even page-aligned I/O requests sometimes failed for reasons not thoroughly investigated.
Suggested by: ian@ MFC after: 2 days
|
283011 |
16-May-2015 |
bz |
More tr -d '\r' t make config happy and some re-alignment whitespace changes.
|
283005 |
16-May-2015 |
bz |
tr -d '\r' makes config a lot more happy.
|
282985 |
15-May-2015 |
zbb |
Introduce support for the Alpine PoC from Annapurna Labs
The Alpine Platform-On-Chip offers multicore processing (quad ARM Cortex-A15), 1/10Gb Ethernet, SATA 3, PCI-E 3, DMA engines, Virtualization, Advanced Power Management and other.
This code drop involves basic platform support including: SMP, IRQs, SerDes, SATA. As of now it is missing the PCIe support. Part of the functionality is provided by the low-level code (HAL) delivered by the chip vendor (Annapurna Labs) and is a subject to change in the future (is planned to be moved to sys/contrib directory).
The review log for this commit is available here: https://reviews.freebsd.org/D2340
Reviewed by: andrew, ian, imp Obtained from: Semihalf Sponsored by: Annapurna Labs
|
282984 |
15-May-2015 |
ian |
Add assertions that the addresses passed to tlb maintenance are page-aligned.
Perform cache writebacks and invalidations in the correct (inner to outer or vice versa) order, and add comments that explain that.
Consistantly use 'va' as the variable name for virtual addresses.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
282983 |
15-May-2015 |
ian |
Retrieve the cache parms in the proper arch-specific way.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
282934 |
15-May-2015 |
ganbold |
It appears to be armv7_sleep is a duplication of armv7_cpu_sleep. For consistency with the naming conventions used by the other implementations kill armv7_sleep and keep armv7_cpu_sleep.
Differential Revision: https://reviews.freebsd.org/D2537 Submitted by: John Wehle Reviewed by: ian@, andrew@
|
282830 |
13-May-2015 |
ganbold |
Delete cpu_do_powersave which is set but never used/tested serving no useful purpose.
Differential Revision: https://reviews.freebsd.org/D2516 Submitted by: John Wehle Reviewed by: ian@
|
282829 |
13-May-2015 |
loos |
Fix the vmstat -i output on ARM.
The consumers of hw.intrnames expect a NULL byte at end of the string containing the interrupt names.
On ARM all the interrupt name slots are initialized and this leave no room for the terminating NULL byte, which makes vmstat read beyond the end of intrnames.
PR: 199891 Tested on: RPi 2 and BeagleBone Black
|
282828 |
13-May-2015 |
loos |
Fix the SMP initialization on RPi 2 (BCM2836).
Invalidate the CPU cache before start the others CPUs.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
282827 |
13-May-2015 |
loos |
Add support for the power button on BeagleBone Black.
Shutdown and turn off the board when the power button is pressed.
Submitted by: Michal Meloun <meloun@miracle.cz> Relnotes: yes
|
282812 |
12-May-2015 |
ganbold |
Disable WPI in case of aml8726-m3. The aml8726-m3 SoC is identified as a Cortex A9-r2 rev 4 CPU and it hangs sometimes during the boot when WFI is used by the kernel.
Differential Revision: https://reviews.freebsd.org/D2473 Submitted by: John Wehle Suggested by: ian@
|
282780 |
11-May-2015 |
alc |
Retire pmap_lazyfix(). This function only existed in the new armv6 pmap because the i386 pmap on which the new armv6 pmap is based had it, and in r281707 pmap_lazyfix() was removed from the i386 pmap.
Discussed with: kib Submitted by: Michal Meloun (via Svatopluk Kraus)
|
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
|
282778 |
11-May-2015 |
andrew |
Mark thumb entry points as such when building for thumb, otherwise mark them as arm.
|
282777 |
11-May-2015 |
andrew |
Use the Thumb compliant version of the add instruction. We can only use "add Rd, Rn, Rm" from within an IT (if-then) block.
|
282776 |
11-May-2015 |
andrew |
List both registers to use in the 64-bit atomic instructions. We will need these to build for Thumb-2.
|
282767 |
11-May-2015 |
andrew |
cpu-v6.h should only be used in the kernel, add an error to enforce this.
|
282763 |
11-May-2015 |
andrew |
Move to use __ARM_ARCH in more places in the kernel.
|
282762 |
11-May-2015 |
andrew |
Use the ACLE spelling of _ARM_ARCH_6: "__ARM_ARCH >= 6"
|
282723 |
10-May-2015 |
andrew |
Use the new gic option on all configs that need it.
|
282717 |
10-May-2015 |
andrew |
Use the new gic option. While here remove extra whitespace from the ned of a few lines.
|
282715 |
10-May-2015 |
andrew |
Add the gic to files.arm under "device gic" and use it with the CUBIEBOARD2 config. This is common across a few SoCs so should be a common option.
|
282714 |
10-May-2015 |
andrew |
First pass clenup over the Marvell db-88f6xxx kernel configs.
|
282707 |
10-May-2015 |
andrew |
Clean up the style to use "options<space><tab>".
|
282694 |
09-May-2015 |
andrew |
Pass over the at91 kernels to reduce the diff between them.
|
282693 |
09-May-2015 |
gjb |
Merge ^/projects/release-arm-redux into ^/head.
Of note:
- This commit adds native FreeBSD/arm release build support without requiring out-of-tree utilities.
- Part of this merge removes the WANDBOARD-{SOLO,DUAL,QUAD} kernel configuration files, for which the IMX6 kernel configuration file should be used instead.
- The resulting images have a 'freebsd' user (password 'freebsd'), to allow ssh(1) access when console access is not available (VGA or serial). The default 'root' user password is set to 'root'.
- The /etc/ttys file for arm images now enable both ttyv0 and ttyu0 by default.
Help from: many (boot testing, feedback, etc.) Sponsored by: The FreeBSD Foundation
|
282675 |
09-May-2015 |
loos |
Pass the resources requests to the upper bus.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
282620 |
08-May-2015 |
ganbold |
This follows the gic and ti/aintc code by adding additional barriers to the Amlogic pic driver.
Differential Revision: https://reviews.freebsd.org/D2472 Submitted by: John Wehle
|
282610 |
07-May-2015 |
loos |
Add the SMP support for Raspberry Pi 2 (BCM2836).
Tested with the build of some ports and a buildworld.
Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>
|
282586 |
07-May-2015 |
emaste |
Correct PL310_POWER_CTRL offset
Offet for the power control register was specified incorrectly (it had the same value as the prefetch control register.) This change corrects the offset value to 0xF80, per the ARM PL310 documentation.
Submitted by: Steve Kiernan <stevek@juniper.net> Obtained from: Juniper Networks, Inc.
|
282576 |
07-May-2015 |
andrew |
Clean up the ARM kernel configs to use 'include<space><tab>"file"'.
|
282547 |
06-May-2015 |
zbb |
Add new CP15 operations and DB_SHOW_COMMAND to print CP15 registers
Submitted by: Wojciech Macek <wma@semihalf.com> Reviewed by: imp, Michal Meloun <meloun@miracle.cz> Obtained from: Semihalf
|
282517 |
06-May-2015 |
ganbold |
This patch adds support for the extended baud rate register available on the aml8726-m6 (and later) SoC which allows for lower speeds.
Differential Revision: https://reviews.freebsd.org/D2433 Submitted by: John Wehle
|
282516 |
05-May-2015 |
ian |
Add the code necessary to run the imx6 chip at its lowest clock/power operating point (396MHz/950mV).
|
282504 |
05-May-2015 |
andrew |
Start to reduce the diff between the Atmel kernel configs.
|
282503 |
05-May-2015 |
andrew |
The VIRT kernel config targets armv6.
|
282502 |
05-May-2015 |
andrew |
Move the first batch of common armv6 options to std.armv6.
|
282499 |
05-May-2015 |
ian |
Create std.arm and std.armv6 config files and include the right one from each of the existing kernel configs. This gives a place to put config that applies to the entire arch.
Add the ARM_NEW_PMAP option to std.armv6. This is working well in early testing and it's time for wide exposure, but it's still nice to be able to fall back to the old implementation for testing when a problem comes along. Eventually the option and the old implementation will go away.
The opportunity now exists to move a whole lot of boilerplate from all the arm kernel config files into std.arm*, but that's a commit for another day.
|
282483 |
05-May-2015 |
andrew |
Update the comment on what CPUs this driver supports.
|
282442 |
05-May-2015 |
loos |
Now that DMA works, enable the audio driver on RPi 2.
|
282441 |
05-May-2015 |
loos |
Enable DMA for sdhci on RPi 2 (BCM2836).
|
282440 |
05-May-2015 |
loos |
Fix DMA on RPi 2.
BCM2836 has a different base address for peripherals.
Obtained from: netbsd
|
282433 |
04-May-2015 |
loos |
In preparation for the next cycle of official ARM images, add ARM_NEW_PMAP to supported kernels.
This is a temporary solution and should be reverted when ARM_NEW_PMAP is enabled by default.
|
282418 |
04-May-2015 |
ian |
On an icache sync by address/len, round the length up if the operation spans a cacheline boundary.
PR: 199740 Submitted by: Juergen Weiss <weiss@uni-mainz.de>
|
282403 |
04-May-2015 |
loos |
Fix the voltage and clock levels for cpufreq on RPi 2.
Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>
|
282359 |
02-May-2015 |
loos |
Fix the vt(4) framebuffer driver on RPi 2.
Use the BCM2835_MBOX_CHAN_PROP mbox channel to setup the framebuffer, remove DMA code (its now done in bcm2835_mbox.c).
Also adjust the color palette when bcm2708_fb.fbswap is set. The firmware used on RPi 2 uses this mode.
Tested on: RPi-B and RPi 2 with 16, 24 and 32bpp Note: The 32bpp mode on RPi-B has the red and blue swapped, this is a know problem (not a driver problem).
|
282358 |
02-May-2015 |
loos |
Fix the sc(4) framebuffer driver on RPi 2.
Use the BCM2835_MBOX_CHAN_PROP mbox channel to setup the framebuffer, remove unused code and unnecessary includes.
Adjust the color palette when bcm2708_fb.fbswap is set on /chosen/bootargs node of DTB. The firmware used on RPi 2 uses this mode.
Tested on: RPi-B and RPi 2 with 16, 24 and 32bpp
|
282357 |
02-May-2015 |
loos |
Add the routines to query and setup the framebuffer state using the BCM2835_MBOX_CHAN_PROP channel. The old channel (BCM2835_MBOX_CHAN_FB) seems deprecated on recent firmware versions and is causing a freeze on RPi 2.
The actual changes in the framebuffer drivers will follow in subsequent commits.
|
282356 |
02-May-2015 |
loos |
Fix the kernel ident for RPI2.
|
282352 |
02-May-2015 |
loos |
Remove an unused variable.
|
282334 |
02-May-2015 |
imp |
Remove support for being compiled under OABI. We don't support that any more, so this is just dead code.
Differential Revision: https://reviews.freebsd.org/D2419
|
282151 |
28-Apr-2015 |
andrew |
Fix pmap_dcache_wb_pou in the new armv6 pmap to correctly achieve icache consistency from ptrace.
PR: 199739 Submitted by: Jurgen Weiss <weiss at uni-mainz.de> (original version) Submitted by: Svatopluk Kraus <onwahe at gmail.com>
|
282129 |
28-Apr-2015 |
ganbold |
Update Amlogic MMC driver:
1) Advertise the actual min / max speeds the hardware is capable of supporting given the reference clock used by the board.
2) Rather than attempting to extend the hardware's timeout register in software (the hardware doesn't have sufficient bits to directly support long timeouts), simply implement the same timeout approach used in the SDXC driver.
3) Set the timeout for a linked command (e.g. STOP TRANSMISSION) based on the previous multiblock read / write.
The changes have been smoke tested on both the ODROID-C1 and the VSATV102-M6 using the following cards:
* PQI 2GB microSD * SanDisk 2GB microSD * PQI 8GB SDHC (not a microSD so only tested on the ATV-102) * PNY 8GB microSDHC * SanDisk Ultra 32GB microSDHC
Submitted by: John Wehle
|
282120 |
28-Apr-2015 |
hselasky |
The add_bounce_page() function can be called when loading physical pages which pass a NULL virtual address. If the BUS_DMA_KEEP_PG_OFFSET flag is set, use the physical address to compute the page offset instead. The physical address should always be valid when adding bounce pages and should contain the same page offset like the virtual address.
Submitted by: Svatopluk Kraus <onwahe@gmail.com> MFC after: 1 week Reviewed by: jhb@
|
282049 |
27-Apr-2015 |
loos |
Pass the supplied buffer length instead of a fixed size.
|
282045 |
27-Apr-2015 |
ganbold |
Enable root mounting from mmc/sd card.
|
282025 |
26-Apr-2015 |
andrew |
Cleanup a little more: - Remove whitespace at the end of lines - Use a tab after instructions, not spaces
|
282024 |
26-Apr-2015 |
andrew |
Fix the style of locore-v4.S and locore-v6.S to help find any common code.
|
282023 |
26-Apr-2015 |
andrew |
Remove the armv6 code from locore-v4.S, it's not needed there.
|
282019 |
26-Apr-2015 |
andrew |
Use ARMv7 style unaligned access on ARMv6. We set this bit in locore, but it was missing from here.
|
281991 |
25-Apr-2015 |
loos |
Set ARM_L2_PIPT for A10 and RPI2, they are probably missing by accident.
Noted by: Michal Meloun <meloun@miracle.cz>
|
281909 |
23-Apr-2015 |
andrew |
Add the SOC_IMX51, SOC_IMX53, and SOC_IMX6 options. These are used to select which SoCs the kernel config will support.
Use these options to merge files.imx51 and files.imx53.
|
281907 |
23-Apr-2015 |
andrew |
Reduce the diff between files.imx51 and files.imx53
|
281906 |
23-Apr-2015 |
andrew |
Pull out the common parts of the ODROIDC1 and VSATV102 kernels to a new kernel config. This also removes the per-board config files from universe.
|
281905 |
23-Apr-2015 |
andrew |
Remove the need for board specific std files on aml8726 by moving the options they set to the main kernel config.
|
281904 |
23-Apr-2015 |
andrew |
Move KERNVIRTADDR to the common std.aml8726.
|
281903 |
23-Apr-2015 |
andrew |
- Move files selected in files.smp to files.aml8726 and remove it. - Remove a redundant file from files.aml8726
|
281902 |
23-Apr-2015 |
andrew |
Update the ODROIDC1 and VSATV102 to reduce the diff to the other armv6 kernel config files.
|
281900 |
23-Apr-2015 |
loos |
Now that we have an U-Boot for RPI2, do not use the static DTB compiled into the kernel, which is used mostly on early development stages.
On RPI(2) the DTB is loaded and modified by firmware and then handed to kernel via U-Boot and ubldr.
The RPI firmware adds (or modify) a few valuable data to the in memory DTB, like:
- System memory; - Ethernet MAC address; - framebuffer settings; - Board serial and revision; - clock-frequency for most of devices.
|
281863 |
22-Apr-2015 |
loos |
Fetch the SDHCI frequency from videocore (our prefered source) and only if it fails, fetch the clock-frequency from DTB.
If both methods fail, use the hardcoded default.
|
281799 |
20-Apr-2015 |
loos |
Build and install the DTB for all the supported AllWinner SoCs.
We will need them when we start booting using ubldr.
|
281752 |
19-Apr-2015 |
marius |
Make a comment reflect reality.
|
281679 |
18-Apr-2015 |
loos |
Move the items common to all SoCs to a single file.
|
281678 |
18-Apr-2015 |
loos |
Fix the style(9) and adds two missing parentheses on the licence.
Reduce the differences to bring in the MMC/SD driver.
Approved by: ganbold (licence change)
|
281675 |
18-Apr-2015 |
loos |
Simplify the receiver code a bit.
Drain the RX FIFO and continue on failure.
|
281673 |
17-Apr-2015 |
loos |
Add the necessary support to use both TX queues available on if_emac.
Each TX queue can hold one packet (yes, if_emac can send only two(!) packets at a time).
Even with this change the very limited FIFO buffer (3 KiB for TX and 13 KiB for RX) fill up too quick to sustain higher throughput.
For the TCP case it turns out that TX isn't the limiting factor, but the RX side is (the FIFO fill up and starts to discard packets, so the sender has to slow down).
|
281669 |
17-Apr-2015 |
loos |
Remove unnecessary checks and fix an issue where the interrupt handler could return with lock held.
|
281648 |
17-Apr-2015 |
andrew |
Remove support for reading the syscall code in OABI. This is unneeded now we can only build for EABI.
|
281647 |
17-Apr-2015 |
andrew |
Use cp15_ifar_get to get the instruction fault address. When using Thumb-2 the instruction may be over two pages so the program counter could point to the wrong page.
|
281639 |
17-Apr-2015 |
loos |
Fix the 'wrong packet header' errors for if_emac.
Do not strip the ethernet CRC until we read all data from FIFO, otherwise the CRC bytes would be left in FIFO causing the failure of next packet (wrong packet header).
When this error happens the receiver has to be disabled and the RX FIFO flushed, discarding valid packets.
With this fix if_emac behaves a lot better.
|
281493 |
13-Apr-2015 |
andrew |
Update the arm devmap code to also work with arm64.
There are a few differences between the two. On arm we need to provide a list of addresses we may be mapping before we have initialised the virtual memory subsystem, however on arm64 we allocate a small (2MiB for a 4k granule) range to be used for such purposes.
Differential Revision: https://reviews.freebsd.org/D2249 Sponsored by: The FreeBSD Foundation
|
281466 |
12-Apr-2015 |
andrew |
Add a driver for the ARM Power State Coordination Interface (PSCI). This handles versions 0.1 and 0.2 of the standard on 32-bit ARM.
With this driver we can shutdown in QEMU. Further work is needed to turn secondary cores on on boot and to support later revisions of the specification.
Submitted by: Robin Randhawa <Robin.Randhawa at ARM.com> Sponsored by: The FreeBSD Foundation
|
281459 |
12-Apr-2015 |
andrew |
Switch to the new v6 pmap code to increase its testing. It will now be built as part of universe.
|
281443 |
11-Apr-2015 |
andrew |
Change the virtual address used to not be 0xc0000000, the arm loader doesn't handle this address.
|
281439 |
11-Apr-2015 |
andrew |
Add support for the QEMU virt SoC. This is a SoC built depending on the command line arguments passed in. It will then generate a dtb on the fly, as such no dts will be added as it may be incorrect.
Relnotes: yes
|
281438 |
11-Apr-2015 |
andrew |
Add support for the uart classes to set their default register shift value. This is needed with the pl011 driver. Before this change it would default to a shift of 0, however the hardware places the registers at 4-byte addresses meaning the value should be 2.
This patch fixes this for the pl011 when configured using the fdt. The other drivers have a default value of 0 to keep this a no-op.
MFC after: 1 week
|
281418 |
11-Apr-2015 |
ganbold |
This modifies several FreeBSD drivers to use the GNU approach to supply clk81 information. It also changes the hardware strings in some of the drivers to match what's present in the GNU files.
Submitted by: John Wehle Reviewed by: imp
|
281416 |
11-Apr-2015 |
ganbold |
This modifies several FreeBSD drivers to use the hardware strings present in the GNU dts files.
Submitted by: John Wehle Reviewed by: imp
|
281369 |
10-Apr-2015 |
ian |
Add a pmap_kremove_device() to undo mappings made with pmap_kenter_device().
Previously we used pmap_kremove(), but with ARM_NEW_PMAP it does the remove in a way that isn't SMP-coherent (which is appropriate in some circumstances such as mapping/unmapping sf buffers). With matching enter/remove routines for device mappings, each low-level implementation can do the right thing.
Reviewed by: Svatopluk Kraus <onwahe@gmail.com>
|
281156 |
06-Apr-2015 |
andrew |
Add support to the efi boot1 and loader for 32-bit ARM. This will be used by the future qemu virt support.
Differential Revision: https://reviews.freebsd.org/D2238 Reviewed by: emaste
|
281106 |
05-Apr-2015 |
andrew |
dev/ofw/openfirm.h is not needed in the arm machine/fdt.h
|
281093 |
04-Apr-2015 |
andrew |
Re-add machine/bus.h to machine/fdt.h on arm, it's still needed.
|
281092 |
04-Apr-2015 |
andrew |
Include vm/pmap.h for pmap_kextract.
|
281091 |
04-Apr-2015 |
andrew |
Include machine/intr.h for arm_post_filter.
|
281089 |
04-Apr-2015 |
andrew |
Don't include unneeded files in the arm machine/fdt.h. While here, remove it from more files.
|
281087 |
04-Apr-2015 |
andrew |
Move the definition of fdt_localbus_devmap to a Marvell specific file as it's only used there.
|
281085 |
04-Apr-2015 |
andrew |
Stop using machine/fdt.h in the arm kernel code when we don't need it.
|
281072 |
04-Apr-2015 |
andrew |
Add support for arm64 to the existing arm generic timer driver: - Add macros to handle the differences in accessing these registers on arm and arm64. - Use the fdt data to detect if we are on an ARMv7 or ARMv8. - Use the virtual timer by default on arm64, we may not have access to the physical timer.
Differential Revision: https://reviews.freebsd.org/D2208 Reviewed by: emaste Sponsored by: The FreeBSD Foundation
|
281018 |
03-Apr-2015 |
andrew |
Merge the common parts of the SOCKIT and SOCKIT-BERI kerenel, and mark the former as NO_UNIVERSE.
|
280987 |
02-Apr-2015 |
andrew |
Stop including machine/fdt.h, it's not needed.
Sponsored by: The FreeBSD Foundation
|
280986 |
02-Apr-2015 |
andrew |
We may not be using gcc to compile this.
Sponsored by: The FreeBSD Foundation
|
280985 |
02-Apr-2015 |
andrew |
Add the generic timer registers to sysreg.h and cpu-v6.h, and use the access functions in the generic timer driver.
Differential Revision: https://reviews.freebsd.org/D2198 Sponsored by: The FreeBSD Foundation
|
280979 |
02-Apr-2015 |
gonzo |
- Make interrupt resource optional: some upstream FDT blobs (e.g. TI's) do not have interupt property in pl310 node. Interrupt is used only to detect cache activity when L2 cache is disabled, it's not vital for normal operations. - Fix intrhook allocation/initialization
|
280907 |
31-Mar-2015 |
ganbold |
Add kernel config files for Hardkernel Odroid-C1 and Visson ATV-102 devices.
Submitted by: John Wehle Approved by: stas (mentor)
|
280905 |
31-Mar-2015 |
ganbold |
Add necessary changes to support various Amlogic SoC devices specially aml8726-m6 and aml8726-m8b SoC based devices. aml8726-m6 SoC exist in devices such as Visson ATV-102. Hardkernel ODROID-C1 board has aml8726-m8b SoC.
The following support is included: Basic machdep code SMP Interrupt controller Clock control driver (aka gate) Pinctrl Timer Real time clock UART GPIO I2C SD controller SDXC controller USB Watchdog Random number generator PLL / Clock frequency measurement Frame buffer
Submitted by: John Wehle Approved by: stas (mentor)
|
280868 |
30-Mar-2015 |
andrew |
Restore setting cpufuncs on arm1176, it was removed by accident with the arm1136 code.
Reviewed by: ian
|
280847 |
30-Mar-2015 |
andrew |
Remove support for CPU_XSCALE_80200. None of our configs support it, and there wasn;t an option to enable it.
While here remove a check for CPU_ARM10 being defined as it has also been removed.
|
280842 |
30-Mar-2015 |
andrew |
Remove support for CPU_FA626TE. It's unused by any of our kernel configs.
|
280833 |
29-Mar-2015 |
andrew |
arm11_sleep is no longer needed, remove it.
|
280832 |
29-Mar-2015 |
andrew |
pj4b_config and pj4bv7_setup are only used when CPU_MV_PJ4B is defined.
|
280831 |
29-Mar-2015 |
andrew |
Build the cpufunc_asm_* files based on the cpu type, not which config file we happen to be building.
|
280826 |
29-Mar-2015 |
andrew |
Remove cpufunc_asm_arm11.S from the ARMv7 configs, it's not used.
|
280824 |
29-Mar-2015 |
andrew |
Remove arm1136 support. We don't have any configs that use it, and I don't expect us to add support for any more arm11 SoCs.
|
280823 |
29-Mar-2015 |
andrew |
Remove the bootconfig parsing. We never used it and always passed either an empty string or NULL to the setup functions that called into it.
|
280821 |
29-Mar-2015 |
andrew |
We only need cpufunc_asm_arm11.S on bcm2835, not bcm2836
|
280817 |
29-Mar-2015 |
andrew |
Remove ARM9_CACHE_WRITE_THROUGH, none of our configs define it.
|
280815 |
29-Mar-2015 |
andrew |
Remove the unused armv5 cpufunc code.
|
280813 |
29-Mar-2015 |
andrew |
Remove unused cpufunc arm11 and armv6 code. While here only define the remaining functions in the context we use them in.
|
280812 |
29-Mar-2015 |
andrew |
We don't use cpufunc_asm_armv5.S in any of these configs, remove it.
|
280811 |
29-Mar-2015 |
andrew |
Remove unused arm10_* functions. The remaining functions are only used in mv configs.
|
280810 |
29-Mar-2015 |
andrew |
Stop building unused cpuvunc_* files, we don't need anything from these.
|
280809 |
29-Mar-2015 |
andrew |
Remove support for CPU_ARM10. No kernel configs could possibly use this as it's not an available option. Along with this we will never support this cpu type as very few arm10 chips were made.
|
280737 |
27-Mar-2015 |
bz |
Rather than defining our own magic checks here use INKERNEL() for the PMC_IN_KERNEL() macro definition.
Add missing macros to extract the return address (LR) from the trapframe.
Discussed with: andrew Obtained from: Cambridge/L41 Sponsored by: DARPA, AFRL MFC after: 2 weeks
|
280712 |
26-Mar-2015 |
ian |
New pmap code for armv6. Disabled by default, option ARM_NEW_PMAP enables it.
This is pretty much a complete rewrite based on the existing i386 code. The patches have been circulating for a couple years and have been looked at by plenty of people, but I'm not putting anybody on the hook as having reviewed this in any formal sense except myself.
After this has gotten wider testing from the user community, ARM_NEW_PMAP will become the default and various dregs of the old pmap code will be removed.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz>
|
280709 |
26-Mar-2015 |
ian |
Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying the startup trampoline code. The old code allocated a kva page, mapped it using using pmap_kenter_nocache(), then freed the kva without destroying the mapping. This is the only use of pmap_kenter_nocache() in the system, so redoing this one use of allows it to be garbage collected in the near future.
|
280571 |
25-Mar-2015 |
andrew |
Remove a debug #error from the bcm2835 sdhci driver.
|
280558 |
25-Mar-2015 |
andrew |
Add support for the Raspberry Pi 2. As the chip is based on the bcm2835 in the Raspberry Pi B we support most of the devices are already supported, however the base address has changed.
A few items are not working, or missing. The main ones are: * DMA doesn't work in the sdhci driver. * Enabling vchiq halts the boot, may be interrupt related. * There is no U-Boot port yet so the DTB is embedded in the kernel.
The last point will make it difficult to boot FreeBSD, however there is support for the Raspberry Pi 2 in the U-Boot git repo. As I have not tested this it is left as an open task to create a port to build.
X-MFC: When the above issues are fixed Sponsored by: ABT Systems Ltd
|
280453 |
24-Mar-2015 |
andrew |
Move including std.bcm2835 to the RPI-B kernel config. The std.rpi file will be shared between the existing Raspberry Pi config, and the new Raspberry Pi 2 config.
MFC after: 1 week
|
280452 |
24-Mar-2015 |
andrew |
Add the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the former to std.bcm2835. These will be used to enable support for the Raspberry Pi 2.
MFC after: 1 week
|
280451 |
24-Mar-2015 |
mav |
Remove from legacy ata(4) driver support for hardware, supported by newer and more functional drivers ahci(4), siis(4) and mvs(4).
This removes about 3400 lines of code, unused since FreeBSD 9.0 release.
|
280402 |
23-Mar-2015 |
ian |
Do not save/restore the TLS pointer on context switch for armv6. The pointer cannot be changed directly by userland code on armv6 (it can be on armv4), so there's no need to save/restore.
Submitted by: Michal Meloun
|
280324 |
21-Mar-2015 |
cognet |
When waiting on PTE allocation, another thread could free the l2_dtable while we're not looking at it. Fix this by increasing l2->l2_occupancy before we try to alloc (and decrease it if the allocation failed, or if another thread did a similar allocation).
Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com> MFC after: 1 week
|
280294 |
20-Mar-2015 |
andrew |
Add a helper function to read clock frequencies from videocore and use this to get the default frequency of the sdhci device.
While here use a u_int to hold the frequency as it may be too large to fit in a 32-bit signed integer. This is the case when we have a 250MHz clock.
|
280285 |
20-Mar-2015 |
andrew |
Split out the common bcm283x fixes from the bcm2835 specific files.
|
280284 |
20-Mar-2015 |
andrew |
Remove now unneeded headers from the Broadcom DWC driver
|
280283 |
20-Mar-2015 |
andrew |
Move the code to set the device power to the bcm2835 mailbox driver so it can be reused by other drivers.
|
280278 |
20-Mar-2015 |
zbb |
Allow to override default kernel virtual address assignment on ARM
Each plaform performs virtual memory split between kernel and user space and assigns kernel certain amount of memory space. However, is is sometimes reasonable to change the default values. Such situation may happen on systems where the demand for kernel buffers is high, many devices occupying memory etc. This of course comes with the cost of decreasing user space memory range so shall be used with care. Most embedded systems will not suffer from this limtation but rather take advantage of this potential since default behavior is left unchanged.
Submitted by: Wojciech Macek <wma@semihalf.com> Reviewed by: imp Obtained from: Semihalf
|
279944 |
13-Mar-2015 |
emaste |
Delete stray clause 3 and renumber.
|
279850 |
10-Mar-2015 |
ian |
Remove MODULES_OVERRIDE="" for Marvel-based armv5 systems.
Also add some #NO_UNIVERSE to configs that essentially duplicate DB-88F6XXX.
|
279837 |
10-Mar-2015 |
ian |
Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.
These are left over from long ago when there was no way to load modules on early armv6 platforms, and when there was a build problem with ahc that has long since been fixed, and they just keep getting copy-pasted into new configs.
|
279826 |
09-Mar-2015 |
ian |
Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.
ntpd is hard-coded to use /dev/ppsN, and typically when multiple PPS sources are available the sysadmin will symlink the right one(s) to /dev/ppsN, so it's best to not usurp those names directly.
|
279825 |
09-Mar-2015 |
ian |
Remove the static DTB config and instead build modules/dtb/am335x.
Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around build problems that have long since been fixed correctly.
PR: 198460
|
279816 |
09-Mar-2015 |
ian |
Attach the prcm clock driver early, so it can set the mpcore timer frequency.
Submitted by: Svatopluk Kraus
|
279814 |
09-Mar-2015 |
imp |
Add the DTrace modules to the build, rather than only build the dtrace modules.
|
279811 |
09-Mar-2015 |
ian |
Add minimum cache line sizes to struct cpuinfo, use them in the new cache maintenance routines. Also add a routine to invalidate the branch cache.
Submitted by: Michal Meloun
|
279810 |
09-Mar-2015 |
ian |
Clean data cache before instruction cache in armv7_icache_sync_range(). Also ensure dsb precedes isb in all icache maintenance routines (first do a data sync, then stall the instruction stream until it finishes).
Submitted by: Michal Meloun
|
279780 |
08-Mar-2015 |
andrew |
Call config_intrhook_disestablish on failure of the bcm2835 fb and fbd intr hooks. With this we can get through the boot even if these functions fail.
Sponsored by: ABT Systems Ltd
|
279778 |
08-Mar-2015 |
andrew |
Add support for enabling the USB on the Raspberry Pi boards when it hasn't been done by U-Boot. This allows the USB to work when we load the kernel directly.
No dma sync is performed after these operations as the data we read/write is not used by the cpu after the calls to the maimbox driver.
Differential Revision: https://reviews.freebsd.org/D1940 Reviewed by: imp, Michal Meloun (meloun AT miracle.cz) MFC after: 1 Week Sponsored by: ABT Systems Ltd
|
279766 |
08-Mar-2015 |
ian |
Fix spurious interrupts on arm am335x (beaglebone), by doing the EOI in both the post-filter and post-thread callbacks.
Also eliminate a completely unecessary write to INTC_ISR_CLEAR register, which clears a software-generated interrupt that can only happen with a write to INTC_ISR_SET (which nothing does).
|
279724 |
07-Mar-2015 |
ian |
Move the uart_class definitions and fdt compat data into the individual uart implementations, and export them using the new linker-set mechanism.
Differential Revision: https://reviews.freebsd.org/D1993 Submitted by: Michal Meloun
|
279702 |
06-Mar-2015 |
ian |
Update a comment that had drifted out of date with the last changes.
|
279696 |
06-Mar-2015 |
br |
Fix style.
|
279677 |
05-Mar-2015 |
gonzo |
Add sysctls to control PS-PL level shifters and FCLK settings.
PL (programmable logic) uses FCLK0..FCLK3 as a clock sources. Normally they're configured by first stage boot loader (FSBL) and normal user never has to touch them. These sysctls may come useful for hardware developers
hw.fpga.fclk.N.source: clock source (IO, DDR, ARM) hw.fpga.fclk.N.freq: requested frequency in Hz hw.fpga.fclk.N.actual_freq: actual frequency in Hz (R/O)
hw.fgpa.level_shifters: 0/1 to enable/disable PS-PL level shifters, normally they're enabled either by FSBL or after programming FPGA through devcfg(4)
|
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
|
279551 |
02-Mar-2015 |
ian |
Add a "module" to build the dtb files for all supported imx6 systems.
|
279544 |
02-Mar-2015 |
hselasky |
Add quirk to disable 64-bit XHCI DMA after r276717.
Requested by: Gary Jennejohn <gljennjohn@gmail.com> MFC after: 3 days
|
279543 |
02-Mar-2015 |
ian |
Revert r279338. The casts are apparently bogus, despite the fact that they've been working in i386 (where this change came from).
|
279542 |
02-Mar-2015 |
hselasky |
Update Exynos5 XHCI attach code after r276717.
MFC after: 3 days
|
279357 |
27-Feb-2015 |
andrew |
Remove SMP support from the Wandboard-Solo and have it run as part of universe as a config with sched_ule but without SMP.
Sponsored by: The FreeBSD Foundation
|
279338 |
26-Feb-2015 |
ian |
Add casting to make atomic ops work for pointers. (Apparently nobody has ever done atomic ops on pointers before now on arm).
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
279312 |
26-Feb-2015 |
dim |
Fix a number of -Wcast-qual warnings under sys/arm. No functional change.
Submitted by: andrew MFC after: 3 days
|
279311 |
26-Feb-2015 |
dim |
In sys/arm/ti/am335x/am335x_rtc.c, fix a clang 3.6.0 warning about am33x_rtc_softc::sc_irq_res (which is an array) never being NULL.
Submitted by: andrew MFC after: 3 days
|
279235 |
24-Feb-2015 |
zbb |
Fix endianness on FDT read in ARM GIC
Submitted by: Jakub Palider <jpa@semihalf.com> Reviewed by: ian, nwhitehorn Obtained from: Semihalf
|
279215 |
23-Feb-2015 |
ian |
There is no reason to do i+dcache writeback and invalidate when changing the translation table (this may be left over from armv5 days). It's especially bad to do so using a cache operation that isn't coherent on SMP systems.
Submitted by: Michal Meloun
|
279153 |
22-Feb-2015 |
andrew |
Add support to the bcm2835 mailbox driver to work before interrupts are enabled. This will be needed to enable the power on devices early on in the boot process.
|
279114 |
21-Feb-2015 |
ian |
Correct a comment which was exactly backwards from reality.
|
278996 |
19-Feb-2015 |
andrew |
Allow the ARM unwinder to work through modules. This will be used to add support for unwinding from dtrace.
Tested by: gnn (with dtrace) Sponsored by: ABT Systems Ltd
|
278919 |
17-Feb-2015 |
loos |
Make use of the newly introduced macros.
Update the copyright.
|
278895 |
17-Feb-2015 |
andrew |
Pull the ARM ddb unwind code out to a new file. This will allow it to be used by other places that expect to unwind the stack, e.g. dtrace and stack(9).
As I have written most of this code I'm changing the license to the standard FreeBSD license. I have received approval from the other developers who have changed any of the affected code.
Approved by: ian, imp, rpaulo, eadler (all license change)
|
278861 |
16-Feb-2015 |
loos |
Add a mask to match only the relative base address of BSC controllers.
This should fix the attach of BSC on RPI2 (based on andrew@ dmesg).
|
278797 |
15-Feb-2015 |
andrew |
Add the structures needed to get/set the power state. These can be used when, for example, we boot without U-Boot and wish to enable USB, or to suspend an unneeded device.
MFC after: 1 week
|
278770 |
14-Feb-2015 |
ian |
Add logic for handling new-style ARM cpu ID info.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
278578 |
11-Feb-2015 |
andrew |
Remove the non-EABI code from the DDB stack unwinder, we only support the ARM EABI now.
|
278577 |
11-Feb-2015 |
andrew |
The cpu_id macro was renamed in r278529, catch up with this new name.
|
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
|
278518 |
10-Feb-2015 |
zbb |
Resolve cache line size from CP15
Switch the cache line size during invalidations/flushes to be read from CP15 cache type register.
Submitted by: Wojciech Macek <wma@semihalf.com> Reviewed by: ian, imp Obtained from: Semihalf
|
278369 |
08-Feb-2015 |
gonzo |
Add VideoCore audio driver for Rasperry Pi (BCM2835)
|
278341 |
07-Feb-2015 |
gonzo |
Make VCHI driver optional and add "device vchiq" to default RPI-B config
|
278340 |
07-Feb-2015 |
imp |
Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install rpi.dtb in /boot/dtb by default.
|
278277 |
05-Feb-2015 |
gonzo |
Import VCHI driver for Broadcom's VideoCore IV GPU
Differential Revision: D1753
|
278216 |
04-Feb-2015 |
loos |
Fix a bug where an interrupt could be masked unintentionally when bus_config_intr() is called with the same interrupt type and polarity that is already set.
Pointy hat: loos
|
278215 |
04-Feb-2015 |
loos |
Add GPIO interrupt support for BCM2835 (Raspberry pi).
With this commit any of the GPIO pins can now be programmed to act as an interrupt source for GPIO devices (i.e. limited to devices directly attached to gpiobus - at least for now).
Differential Revision: https://reviews.freebsd.org/D1000
|
278214 |
04-Feb-2015 |
loos |
Sort and remove unnecessary includes.
|
278213 |
04-Feb-2015 |
loos |
Remove stale comments about the issues with HS mode.
Remove a previous workaround to limit the minimum sdhci frequency that isn't needed anymore.
|
278212 |
04-Feb-2015 |
loos |
Remove some duplicate calls to bus_release_resource() and destroy the mutex on error cases.
While here remove unnecessary includes.
|
278061 |
02-Feb-2015 |
rpaulo |
am335x_clk_pruss_activate(): use the L3F clock.
The DISP DPLL clock is slower and was making the PRU programs slower on FreeBSD than on Linux.
Submitted by: Manuel Stuehn <freebsdnewbie at freenet.de> MFC after: 1 week
|
278031 |
01-Feb-2015 |
ian |
Remove a stale comment. The logic that deleted the map before other resources was removed long ago, but the comment stuck somehow.
|
278001 |
31-Jan-2015 |
kib |
Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as const. On x86, even after the machine context is supposedly read into the struct ucontext, lazy FPU state save code might only mark the FPU data as hardware-owned. Later, set_fpcontext() needs to fetch the state from hardware, modifying the *mcp.
The set_mcontext(9) is called from sigreturn(2) and setcontext(2) implementations and old create_thread(2) interface, which throw the *mcp out after the set_mcontext() call.
Reported by: dim Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
277998 |
31-Jan-2015 |
andrew |
Stop using load-multiple with lr and pc. This has been deprecated in ARMv7 and clang 3.6 warns about it. As this is used in libc and we build it with -Werror this warning becomes an error stopping the build.
|
277996 |
31-Jan-2015 |
loos |
Implement GPIO_GET_BUS() method for all GPIO drivers.
Add helper routines to deal with attach and detach of gpiobus and gpioc devices that are common to all drivers.
|
277968 |
31-Jan-2015 |
loos |
Clean up and fix the device detach routine and the failure path on GPIO drivers.
This paves the way for upcoming work.
|
277958 |
31-Jan-2015 |
rpaulo |
ti_pruss: make sure the mmap'ed memory region is uncacheable.
MFC after: 1 week
|
277941 |
30-Jan-2015 |
loos |
The BCM2835 GPIO controller uses has interrupt lines and not only one. Allocate all four, we will use them soon.
Simplificate the allocation of memory and interrupt resources with a single bus_alloc_resources() call instead of doing them separately.
Destroy the mutex in case of errors.
|
277932 |
30-Jan-2015 |
loos |
Allow the retrieving of the reserved pins state.
With this change, it is now possible to verify the pin function and level of reserved pins (but not set them).
The use of reserved pins on Raspberry pi can lead to short circuits and real damage to the SoC.
While here, remove duplicated code, make use of OF_getencprop_alloc() instead of using fixed sized variables and reduce the dmesg spam by printing reserved pin ranges (when possible) instead of printing each pin in the range.
|
277882 |
29-Jan-2015 |
loos |
Rename the avila, cambria and zynq GPIO driver names to match the expected string.
With this change it is not necessary redeclare the driver relations with gpiobus and gpioc.
This also prevents redundant declarations when gpiobusvar.h is included (which is going to happen soon).
|
277871 |
29-Jan-2015 |
gonzo |
Set LCDC clock frequency to 2*148500 KHz
Minimum LCDC is 2 so clock freq shouild be 2*max_pixel_clock. Maximum pixel clock for HDMI is 148500 (1920x1080). But AM335x can not run in this mode due to bandwidth and clock limitations
|
277835 |
28-Jan-2015 |
br |
Add ARMv7 performance monitoring counters.
Differential Revision: https://reviews.freebsd.org/D1687 Reviewed by: rpaulo Sponsored by: DARPA, AFRL
|
277745 |
26-Jan-2015 |
br |
Add a generic way for hooking PMC interrupt.
|
277743 |
26-Jan-2015 |
kib |
Ensure that _tmppt KVA is used exclusively by providing exclusive sx lock around the mapping and uiomove(). Before r277643, it was partially protected by Giant (but potential sleeping in fault from uiomove() would still allow other thread to reuse the mapping).
Noted by: ian Reviewed by: alc, ian Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
|
277720 |
26-Jan-2015 |
gonzo |
- Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes 1 second is not enugh for TDA19988 HDMI framer (e.g. on Beaglebone Black) - Add per-device i2c_timout sysctl (dev.iichb.X.i2c_timeout) to control I2C bus timeout manually - Pass softc instead of device_t to all sysctl handlers
|
277716 |
25-Jan-2015 |
gonzo |
Add vt(4) support to AM335x LCDC driver
|
277644 |
24-Jan-2015 |
br |
Add support for audio transmitting, include drivers for: o Digital Audio Multiplexer (AUDMUX) o Smart Direct Memory Access Controller (SDMA) o Synchronous Serial Interface (SSI)
Disable by default as it depends on SDMA firmware.
Sponsored by: Machdep, Inc.
|
277643 |
24-Jan-2015 |
kib |
Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed for i386, and from the code inspection, nothing in the arm/mips/sparc64 implementations depends on it.
Discussed with: imp, nwhitehorn Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
|
277632 |
24-Jan-2015 |
gonzo |
After interrupt read value from register to make sure it reached hardware. This should fix "Spurious inteerupt" message
Suggested by ian@
|
277568 |
23-Jan-2015 |
ian |
Add pinctrl driver support for the encoded input register config words that the linux guys made up on the fly (but didn't document) last August. This type of encoded config now appears in the imx6 fdt data.
|
277555 |
23-Jan-2015 |
ian |
Enable all the mmc/sd controllers, because there's no telling which ones any given board will be using.
Yes, changing source is an unusually primitive power control implementation.
|
277533 |
22-Jan-2015 |
ian |
Declare Maxmem on arm. This should have been part of r277532.
|
277532 |
22-Jan-2015 |
ian |
Add the Maxmem global and set it to the highest physical page number plus 1.
|
277523 |
22-Jan-2015 |
gonzo |
Add last_fault_code used in pmap-v6.c if kernel is compiled with "option DEBUG"
|
277522 |
22-Jan-2015 |
gonzo |
Write ACK for all kinds of LCDC interrupts
|
277516 |
21-Jan-2015 |
ian |
Move the __aligned() declaration to where it will actually do something.
|
277512 |
21-Jan-2015 |
ian |
Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct. The start-of part isn't so important, it's the grouping-together that's the point: now all the most-accessed data should be in one cache line.
Suggested by: cognet
|
277502 |
21-Jan-2015 |
gonzo |
Remove "#define DEBUG" that conflicts with "option DEBUG" in kernel config
|
277480 |
21-Jan-2015 |
ian |
Remove a couple files that are no longer used (functionality take over by arm/bus_space_base.c).
|
277479 |
21-Jan-2015 |
ian |
Use explicit initializer style, fill in missing functions as unimplemented.
|
277478 |
21-Jan-2015 |
ian |
Use the base arm bus_space instead of an identical local copy.
|
277477 |
21-Jan-2015 |
ian |
Use the base arm bus_space instead of an identical local copy.
|
277476 |
21-Jan-2015 |
ian |
Use the base arm bus_space instead of an identical local copy.
|
277475 |
21-Jan-2015 |
ian |
Use the base arm bus_space instead of an identical local copy.
|
277474 |
21-Jan-2015 |
ian |
Remove a no-longer-used include.
|
277473 |
21-Jan-2015 |
ian |
The versatile platform had two copies of a bus_space that are essentially duplicates of the standard arm base bus_space, so just use it.
|
277472 |
21-Jan-2015 |
ian |
Rename bus_space-v6.c to bus_space_base.c, because it's not v6-specific and now some v5 Marvell systems are using it. Only define fdt_bus_tag if option FDT is defined.
|
277471 |
21-Jan-2015 |
ian |
Use explicit initializer style, fill in missing functions.
|
277470 |
21-Jan-2015 |
ian |
Move bs_unimplemented() to bus_space_generic.c so it can be shared.
|
277469 |
21-Jan-2015 |
ian |
The mv/bus_space.c file is essentially identical to arm/bus_space-v6.c, so just use it.
|
277467 |
21-Jan-2015 |
ian |
For some reason, all the arm bus_space functions that work with uint16 values have armv4 in the name. There's nothing armv4-special about them, so just use the same sort of names as all the other functions.
|
277466 |
21-Jan-2015 |
ian |
Use arm/bus_space-v6.c for all armv6 systems, the essentially identical files for lpc and xilinx aren't needed. Also, fix a couple paste-os.
|
277465 |
21-Jan-2015 |
ian |
Use the explicit member initializer style to init the bus_space struct. Fill in some formerly NULL members where the implementation function exists. Add a dummy function that panics and use it as a placeholder for thigns that are still unimplemented. Remove a few unused includes.
|
277460 |
21-Jan-2015 |
ian |
Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses.
The bus_space struct contains a private data pointer (poorly named bs_cookie, now renamed to bs_privdata) which is used only by a few old armv4 xscale implementations. The bus_space functions were all defined to take this value as the first parameter instead of the bus_space_tag_t, requiring all the inline macro and function expansions to dereference the tag to pass it to another function, which never uses it. Now all the functions take the tag as the first parameter and retrieve the privdata if they need it.
Also fix a couple bus_space_unmap() implementations that were calling kva_free() instead of pmap_unmapdev().
Discussed with: cognet
|
277454 |
20-Jan-2015 |
ian |
Add inline implementations of arm bus_space_read/write_N().
Reviewed by: cognet
|
277416 |
20-Jan-2015 |
andrew |
Remove the SMP code from locore-v4. These will never use the SMP code as there is no multi-core hardware prior to ARMv6.
Sponsored by: The FreeBSD Foundation
|
277415 |
20-Jan-2015 |
andrew |
Add the User and PL1 read only and reqd write thread ID registers.
Sponsored by: The FreeBSD Foundation
|
277413 |
20-Jan-2015 |
ganbold |
Enable Synopsys DesignWare Mobile Storage Host Controller driver on Rockchip boards. It currently supports PIO mode and dma mode needs external dma controller to be used.
Submitted by: jmcneill Approved by: stas (mentor)
|
277405 |
20-Jan-2015 |
gonzo |
Properly clear IRQ status in order to fix "Spurious IRQ" message from AINT.
This register is not documented in TRM but that's what linux driver does
|
277346 |
18-Jan-2015 |
ian |
Save the command-and-flags value into the shadow register when it is written.
This doesn't actually change any behavior, because it just allows a 16-bit read of the command register to return the correct value, and nothing actually does a 16-bit read of that register.
|
277313 |
18-Jan-2015 |
gonzo |
Fix programming timing parameters to LCDC. Actual value used for HBP, HFP, HSW, VSW is register's programmed value + 1.
|
277307 |
17-Jan-2015 |
ian |
Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Apparently some sdhci controllers, such as the one on a Raspberry Pi, mishandle the signal timing in high speed signaling mode, but run just fine in standard mode with the bus running at frequencies between 25-50MHz (which shouldn't work).
This is the solution adopted by U-Boot and other OSes (linux and *BSD) for the timeouts on Raspberry Pi boards with certain SD cards. Some research shows that this quirk is also used on a few other boards, so the fix is a generic quirk instead of being in the RPi-specific driver code.
This change is based on information discovered by Michal Meloun.
|
277305 |
17-Jan-2015 |
ian |
Minor cleanups, comment changes. No need to load 3 values when setting up the stack for secondary cores, the other two values are only used for zeroing bss on the primary core. No need to store the size of the stack at the top of the stack (seems to be a leftover instruction from some cut-n-paste).
|
277265 |
16-Jan-2015 |
ian |
Enable the snoop control unit during MP startup, rather than relying on the bootloader to have done so.
Submitted by: Thomas Skibo <thomasskibo@sbcglobal.net>
|
277227 |
16-Jan-2015 |
np |
Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it on amd64 only.
|
277209 |
15-Jan-2015 |
bz |
Fix cpsw(4) after r277203 which folded 'struct m_hdr' into 'struct mbuf'. While in theory this should have been a transparent change (and was for all other drivers), cpsw(4) never used the proper accessor macros in a few places but spelt the indirect m_hdr.mh_* out itself. Convert those to use m_len and m_data and unbreak the driver build.
|
277207 |
15-Jan-2015 |
loos |
Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl.
Previous code was discarding the last digit.
Remove the unused temperature conversion macros.
|
277206 |
15-Jan-2015 |
loos |
Catch a few cases where we need to release memory resources on errors.
Place parentheses around variables in macros.
MFC after: 3 days
|
277156 |
14-Jan-2015 |
ganbold |
Correct cpu type, it was rather Cortex A12 R0.
Approved by: stas (mentor)
|
277132 |
13-Jan-2015 |
br |
Rename Exynos UART driver. No functional change.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
277116 |
13-Jan-2015 |
ganbold |
Add CPU ID for ARM Cortex A17.
Approved by: stas (mentor)
|
277042 |
12-Jan-2015 |
loos |
Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.
To cut off the power we need to start the shutdown sequence by writing the OFF bit on PMIC.
Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE pin when it is ready for the PMIC to cut off the power. This is done by triggering the ALARM2 interrupt on SoC RTC.
The RTC driver only works in power management mode which means it won't provide any kind of time keeping functionality. It only implements a way to trigger the ALARM2 interrupt when requested.
Differential Revision: https://reviews.freebsd.org/D1489 Reviewed by: rpaulo MFC after: 2 weeks
|
277038 |
12-Jan-2015 |
ian |
Handle dma mappings with more than one segment for rpi sdhci.
The driver inherently does dma in 512 byte chunks, but it's possible that such a buffer can span two physically discontiguous pages (such as when a userland program does IO on the raw /dev/mmcsdN devices). Now the driver can handle a buffer that's split across two pages.
It could in theory handle any number of segments now, but as long as IO is being done in 512 byte blocks it will never need more than two.
|
277037 |
12-Jan-2015 |
ian |
Enable ALT_BREAK_TO_DEBUGGER for rpi.
|
277028 |
11-Jan-2015 |
ian |
Check for and handle failures of bus_dmamap_load(). The driver currently requires that each 512 byte IO be in a single contiguous buffer, but if a buffer crosses a page boundary and the physical pages aren't contiguous you can get an EFBIG failure (too many segments).
The driver really should handle multiple segment IO, but before adding that I wanted to make sure that it's handling failure properly while the failure is easily recreatable.
|
276985 |
11-Jan-2015 |
ian |
Store the shadow command/mode register in the softc, not a local static var.
Submitted by: Michal Meloun
|
276984 |
11-Jan-2015 |
andrew |
Rename gic_init_secondary to arm_init_secondary_ic to help with the merge of the arm_intrng project branch.
|
276963 |
11-Jan-2015 |
andrew |
Rework the GIC driver to ease the import of the arm_intrng branch. The common code has been pulled out to static functions.
|
276846 |
08-Jan-2015 |
imp |
Add infrastructure to build dtb files from dts files.
|
276808 |
08-Jan-2015 |
ian |
Move the inclusion of cpu-v6.h inside the #ifdef _KERNEL block, so that userland programs (which probably don't actually need machine/cpu.h) compile.
|
276803 |
08-Jan-2015 |
ian |
Add accessors for the ARM CP15 performance monitor registers. Also ensure that some #ifdef SMP code is also conditional on __ARM_ARCH >= 7; we don't support SMP on armv6, but some drivers and modules are compiled with it forced on via the compiler command line.
|
276784 |
07-Jan-2015 |
loos |
Fix the handling of pull-up and pull-down for RK3188.
For this to work the driver needs to know the bank it has attached to since the registers for the first 12 pins are at a different location.
Move the lock initialization to simplify the code.
|
276779 |
07-Jan-2015 |
loos |
Reduce the maximum number of pins for the Rockchip RK3188, this driver isn't supposed to manage all the GPIO pins in the system from a single instance, instead it will attach to each one of the four available GPIO controllers and only deal with one bank at time (32 pins per bank).
Rework part of the driver to take advantage of that, this simplify the code a lot.
Also fix a bug in rk30_gpio_get_function() which wouldn't return the correct values.
While here fix a typo in register name.
|
276772 |
07-Jan-2015 |
markj |
Factor out duplicated code from dumpsys() on each architecture into generic code in sys/kern/kern_dump.c. Most dumpsys() implementations are nearly identical and simply redefine a number of constants and helper subroutines; a generic implementation will make it easier to implement features around kernel core dumps. This change does not alter any minidump code and should have no functional impact.
PR: 193873 Differential Revision: https://reviews.freebsd.org/D904 Submitted by: Conrad Meyer <conrad.meyer@isilon.com> Reviewed by: jhibbits (earlier version) Sponsored by: EMC / Isilon Storage Division
|
276755 |
06-Jan-2015 |
jhb |
Remove "New" label from NFSCL/NFSD now that they are the only NFS client/server. While here, remove duplicate NFSCL from sys/conf/NOTES.
Approved by: rmacklem
|
276717 |
05-Jan-2015 |
hselasky |
Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespace while at it.
MFC after: 1 month Submitted by: marius@
|
276644 |
04-Jan-2015 |
ian |
Switch all arm kernels with option SMP to use SCHED_ULE instead of 4BSD.
|
276642 |
03-Jan-2015 |
ian |
Remove commented-out options SMP and APIC_IO from old arm boards that will never be able to support smp.
|
276638 |
03-Jan-2015 |
ian |
Add a new trap-v6.c which has support for all armv7 exceptions. This mostly paves the way for the new pmap code, and shouldn't result in any noticible behavior differences.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz
|
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.
|
276539 |
02-Jan-2015 |
emaste |
Update ELF headers to include additional defines
The elftoolchain project includes these additional defines for various userland programs. Given that arch-specific defines are still interesting in the context of userland programs reading or writing ELF metadata, they should be included in top-level ELF headers.
Remove duplicate defines from ARM and MIPS elf headers.
Submitted by: will (initial version) Reviewed by: imp, will Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D844
|
276533 |
02-Jan-2015 |
br |
Add driver for general-purpose I/O (GPIO).
Sponsored by: DARPA, AFRL
|
276520 |
01-Jan-2015 |
ian |
Remove -Wa,-march=armv7a from arm kernel configs, it makes clang 3.5 sad and apparently isn't needed now that we're using the integrated assembler.
|
276519 |
01-Jan-2015 |
ian |
Define a WFI macro that expands to the right form of wait-for-interrupt depending on the architecture.
|
276518 |
01-Jan-2015 |
ian |
Rework the vpf support code so that it compiles with clang 3.4, 3.5, and gcc. Michal Meloun did most of the hard work in figuring out what would work with which compiler, I just reformated things a bit before committing.
|
276488 |
01-Jan-2015 |
imp |
Fix module builds on arm (and maybe others) by turning off a whole raft of new warnings that appear to be on by default in clang 3.5.0. Fix RPI-B build issues with new clang not liking the ability to pass arbitrary flags to as, since some flags are more arbitrary (and thus verboten) than others.
These warnings should be actually fixed in the code, but this is a band-aide to get things (almost) building again.
|
276470 |
31-Dec-2014 |
ian |
A couple small fixes to make clang 3.5 happy... Move END(sigcode) to the end of the actual instruction sequence for the function but before some misc data in the text segment. This eliminates a strange "size must be constant" error from the integrated assembler. Also, the build_pagetables function was missing an END(), but really the problem is that it shouldn't have an ASENTRY() because it's not a function that needs to be a global symbol with unwind info and all, it's just a little private subroutine used in very early kernel init.
|
276445 |
31-Dec-2014 |
ian |
Change the order of operations for the initial cache setup. Turning off the cache before clean/invalidate ensured that no new lines can come into the cache or migrate between levels during the operation, but may not be safe on some chips. Instead, if the cache was enabled on entry, do the wbinv while it's still enabled, and then disable it and do a separate invalidate pass. After the intitial writeback we know there are no dirty lines left and no new dirty lines can be created as long as we carefully avoid touching memory before turning the cache off. Add a comment about that so no new code gets inserted between those points.
|
276444 |
31-Dec-2014 |
ian |
Fix a paste-o.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
276397 |
30-Dec-2014 |
ian |
Add a new locore.S that #includes the right (v4 or v6) implementation. The kernel build machinery really wants the entry point to be in a file named locore.S so doing this avoids a bunch of changes to the build system for relatively little benefit.
|
276396 |
30-Dec-2014 |
ian |
Rename locore.S to locore-v4.S and add a new locore-v6.S for starting up armv6/7 systems. We need to use some new armv6/7 features at startup and splitting the implemenations to separate files will be more maintainable than adding even more #ifdef sections to locore.S.
Because of the standardized interfaces to cache and MMU operations in armv7, we can tolerate the kernel being entered with caches enabled. This allows running u-boot and loader(8) with caches enabled, and the performance improvement can be dramatic (boot times can be cut from over a minute to under 30 seconds). The new implementation also has more robust cache and mmu sequences for launching AP cores, and it paves the way for upcoming changes to the pmap code which will use the TEX remap feature.
Changes in mp_machdep.c work with the new behavior in locore-v6 mp_entry, and also reuse the original boot-time page tables to get transitioned from physical to virtual addressing before installing the normal tables.
Submitted by Svatopluk Kraus and Michal Meloun with some changes by me.
|
276395 |
30-Dec-2014 |
ian |
Export MAXCPU to the assembler code, needing by upcoming changes to locore.S.
|
276394 |
30-Dec-2014 |
ian |
Add armv6 implementations of these cache operations to avoid duplicating the #ifdef stuff at multiple points the functions are called from. Also rework the armv7 implementations so that the invalidate operations work from outermost to innermost cache level, and the writeback works from inner to outer levels.
|
276350 |
28-Dec-2014 |
ian |
Update comments (r4 is not used anywhere), use non-profiling entry macros.
|
276340 |
28-Dec-2014 |
ian |
Fix a "decl is not a prototype" error noticed by gcc (but not clang).
|
276336 |
28-Dec-2014 |
ian |
Add cache maintenance functions which will be used by startup code to initially set up the MMU. Some day they may also be useful as part of suspend/resume handling, when we get better at power management.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz
|
276335 |
28-Dec-2014 |
ian |
Eliminate an unused macro whose name clashes now with a function in the new cpu-v6.h. This should have been part of r276334.
|
276334 |
28-Dec-2014 |
ian |
Add new TLB and cache maintainence functions for armv6 and armv7. These are inline functions that handle all the routine maintenance operations except the flush-all and invalidate-all routines which are required only during early kernel init.
These inline functions should be very much faster than the old mechanism that involved jumping through the big cpufuncs table, especially for common operations such as invalidating a single TLB entry. Note that nothing is calling these yet, this just is just required infrastructure for upcoming changes to the pmap-v6 code.
|
276333 |
28-Dec-2014 |
ian |
Add new code to read and parse cpu identification data using the new CPUID mechanism defined for armv7 (and also present on some armv6 chips including the arm1176 used on rpi). The information is parsed into a global cpuinfo structure, which will be used by (upcoming) new cache and tlb maintenance code to handle cpu-specific variations of the maintence sequences.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz
|
276316 |
27-Dec-2014 |
loos |
Remove unnecessary code and, instead, use the provided iicbus_null_callback callback.
|
276315 |
27-Dec-2014 |
loos |
Fix a off-by-one bug.
Pointy hat to: loos
|
276314 |
27-Dec-2014 |
loos |
Convert the BSC (i2c) driver to use the new iicbus_get_frequency().
Tested on: Raspberry pi
|
276303 |
27-Dec-2014 |
loos |
Removes unused and duplicate headers.
Bring the wait limit on mailbox write to a more sane value.
Fix a off-by-one bug on wait time limit.
Remove extra blank line.
|
276298 |
27-Dec-2014 |
loos |
Remove the '#undef DEBUG' that should not be committed.
|
276297 |
27-Dec-2014 |
loos |
On interrupt handler, save the actual data read from mbox. The previous macro wasn't needed and was being used with swapped arguments which always give the same result (0) defeating the overflow check.
On initialization, do not use bcm_mbox_intr() to read the pending messages, with the new semaphore based implementation this will lead to semaphore being incremented on the channels that contain pending data and will make the first read for that channel return stale data.
This fixes the hang that happens on boot while initializing the cpufreq on Raspberry Pi.
|
276296 |
27-Dec-2014 |
loos |
Make consistent use of the correct debug macros across the file.
|
276249 |
26-Dec-2014 |
loos |
Fix the musb initialization sequence on AM335x.
According to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/210729 the USB reset pulse has an undocumented duration of 200ns and during this period the module must not be acessed.
We wait for 100us to take into account for some imprecision of the early DELAY() loop.
This fixes the eventual 'External Non-Linefetch Abort (S)' that happens at boot while resetting the musb subsystem.
While here, enable the USB subsystem clock before the first access.
Discussed with: ian, adrian MFC after: 2 weeks
|
276247 |
26-Dec-2014 |
ian |
Include acle-compat.h directly (we use its symbols) rather than getting it via sysreg.h.
|
276245 |
26-Dec-2014 |
ian |
Squelch a (bogus) gcc use-before-init warning.
|
276213 |
25-Dec-2014 |
ian |
Define only the CP15 register operations that are valid for the architecture.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz
|
276212 |
25-Dec-2014 |
ian |
Add macros for asm barrier instructions with arch-specific implementations.
|
276207 |
25-Dec-2014 |
loos |
Add interrupt support for GPIO pins on OMAP4 and AM335x.
This enables the use of GPIO pins as interrupt sources for kernel devices directly attached to gpiobus (userland notification will be added soon).
The use of gpio interrupts for other kernel devices will be possible when intrng is complete.
All GPIO pins can be set to trigger on:
- active-low; - active-high; - rising edge; - falling edge.
Tested on: Beaglebone-black
|
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
|
276204 |
25-Dec-2014 |
ian |
Create 'L' variants of all the ENTRY macros for file-static/local symbols.
If it seems like this is getting out of hand, I quite agree. I wonder if it's safe, here in the 21st century, to lose the distinction between C and ASM symbols?
|
276203 |
25-Dec-2014 |
ian |
Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.
|
276202 |
25-Dec-2014 |
ian |
Stylish changes... put tabs where they need to be in macros, move lines around so that related things are more grouped together, rewrite comments.
No functional changes, this is all so that the functional changes in the next commit will stand out.
|
276198 |
25-Dec-2014 |
ian |
Remove _PROF_PROLOGUE from the EENTRY() macros. These macros define 'extra' entry points which are nested within or provide a synonym name for another function. It's most likely not safe to be messing with the IP and LR registers at anything other than the primary entry point to a function. Anywhere beyond initial function entry, those registers may be in use as scratch or variable registers.
|
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.
|
276191 |
24-Dec-2014 |
ian |
Display the correct value for cache Level of Coherency. Like the other levels being displayed here, its value needs a +1 adjustment.
|
276190 |
24-Dec-2014 |
ian |
Cleanup up ARM *frame structures...
- Eliminate unused irqframe - Eliminate unused saframe - Instead of splitting r4-sp storage between the stack and switchframe, just put all the registers in switchframe and eliminate the un_32 struct.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz>
|
276187 |
24-Dec-2014 |
ian |
Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz>
|
276180 |
24-Dec-2014 |
andrew |
Rename pic_ipi_get to pic_ipi_read for intrng.
|
276177 |
24-Dec-2014 |
andrew |
Switch i.MX to use the platform code to help with a single Freescale kernel.
Differential Revision: https://reviews.freebsd.org/D1349 Reviewed by: ian, rpaulo
|
276173 |
24-Dec-2014 |
loos |
Bring in the last round of updates before adding the interrupt support.
Fix the following issues:
- Removed revision from device softc, it isn't used anywhere else out of device attach routine;
- Move the duplicated code for verification of valid banks (and pins) to a single function;
- Use some macros to simplify the handling of some constants;
- Update some stale comments.
|
276166 |
24-Dec-2014 |
ian |
Revert a glitched mismerge that got caught up in the prior commit. The PJ4B family is still armv7, not armv6.
|
276165 |
24-Dec-2014 |
ian |
Define the old-school arm arch constants we still use internally based on the somewhat newer constants predefined by the compiler. This will allow userland apps to use various machine/foo.h headers without CPUTYPE defined.
|
276151 |
23-Dec-2014 |
loos |
Do not return the total number of available pins but the maximum pin number we can cope.
Previously the returned value could prevent access to some of the pins.
|
276096 |
23-Dec-2014 |
rmacklem |
Remove the old NFS client and server from head, which means that the NFSCLIENT and NFSSERVER kernel options will no longer work. This commit only removes the kernel components. Removal of unused code in the user utilities will be done later. This commit does not include an addition to UPDATING, but that will be committed in a few minutes.
Discussed on: freebsd-fs
|
276060 |
22-Dec-2014 |
loos |
Remove some leftovers from OMAP3 support.
|
276059 |
22-Dec-2014 |
loos |
Simplify the use of locks where possible, remove the locking when it is not required.
Simplify the code a little bit.
Reviewed by: andrew (previous version)
|
276049 |
22-Dec-2014 |
ian |
Replace the clock divisor terms with values that also result in a 1 MHz clock, but actually work on real hardware, unlike the original set of values I chose.
PR: 195009 Submitted by: Scott Ellis <jumpnowtek@gmail.com>
|
276047 |
21-Dec-2014 |
ian |
Add -march=armv7a to the kernel compile for all ARM systems which are v7a.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
276033 |
21-Dec-2014 |
andrew |
Fix the unwinder to get past functions with no stack but may cause an exception. In this case no registers will be updated but the link register will be copied to the program counter to be used to find the calling function. In this case the program counter may be updated and we should continue with the trace.
|
276032 |
21-Dec-2014 |
andrew |
Pull out the fdt mapping code into intr.c. The arm_intrng branch also defines this function allowing the mapping method to change when we move to it.
|
276030 |
21-Dec-2014 |
ian |
Eliminate a redundant declaration.
|
276029 |
21-Dec-2014 |
ian |
Remove a volatile qualifier on return type that is ignored and results in a -Wreturn-type warning when compiled with gcc.
|
276028 |
21-Dec-2014 |
andrew |
Further reduce the diff between the arm_intrng gic driver and the version in head.
|
276023 |
21-Dec-2014 |
andrew |
Reduce the diff between the lpc interrupt controller in head and arm_intrng
|
276021 |
21-Dec-2014 |
andrew |
Reduce the diff in the Ti aintc between head and arm_intrng
|
276017 |
21-Dec-2014 |
andrew |
Reduce the diff between head and arm_intrng with the bcm2835 interrupt controller.
|
276015 |
21-Dec-2014 |
andrew |
Reduce the diff to the arm_intrng project branch by having the read/write macros take the softc they are accessing.
|
276004 |
21-Dec-2014 |
andrew |
Fix the indentation to simplify comparing the ARM config files.
|
276003 |
21-Dec-2014 |
andrew |
tart to clean up the armv6 kernel configs by reducing the diff between them in the first sections and the later FDT support.
Differential Revision: https://reviews.freebsd.org/D1346 Reviewed by: rpaulo (earlier version)
|
275963 |
20-Dec-2014 |
rpaulo |
Driver for CPU frequency/voltage control on the Raspberry Pi.
Differential Revision: https://reviews.freebsd.org/D1025 Submitted by: Daisuke Aoyama aoyama@peach.ne.jp Reviewed by: ian (earlier version), rpaulo MFC after: 1 month Relnotes: yes
|
275962 |
20-Dec-2014 |
andrew |
Clean up the style of the CUBIEBOARD2 config file
|
275961 |
20-Dec-2014 |
andrew |
Clean up to use the standard style of "options \t" and "device\t\t"
|
275950 |
20-Dec-2014 |
ian |
Add a new sdhci quirk, SDHCI_QUIRK_WAITFOR_RESET_ASSERTED, to work around TI OMAP controllers which will return the reset-in-progress bit as zero if you read the status register too fast after setting the reset bit.
The zero is apparently from a stale snapshot of the internal state presented in the interface register, and leads to a false indication that the reset is complete when it either hasn't started yet or is in-progress. The workaround is to first loop until the bit is seen as asserted, then do the normal loop waiting to see it de-asserted.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
275946 |
19-Dec-2014 |
ian |
Rewrap long lines; no functional changes.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
275944 |
19-Dec-2014 |
ian |
Add code to set and reset open-drain mode on the bus when requested.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
275802 |
15-Dec-2014 |
br |
Fix typo.
|
275799 |
15-Dec-2014 |
br |
Follow r275792 eliminating fdt_data_verify().
|
275660 |
10-Dec-2014 |
ian |
Fix the watchdog timeout calculation to prevent wrap. The RPi hardware can't do a timeout bigger than 15 seconds. The code wasn't checking for this and because bitmasking was involved the requested timeout was basically adjusted modulo-16. That led to things like a 128 second timeout actually being a 9 second timeout, which accidentally worked fine until watchdogd was changed to only pet the dog once every 10 seconds.
|
275647 |
09-Dec-2014 |
br |
o Add BERI Virtio Networking Frontend (if_vtbe) o Move similar block/networking methods to common file o Follow r275640 and correct MMIO registers width o Pass value to MMIO platform_note method.
Sponsored by: DARPA, AFRL
|
275639 |
09-Dec-2014 |
andrew |
Include sys/kernel.h to pick up the definition of hz. subr_syscall.c uses it after r275616.
X-MFC with: r275616
|
275583 |
07-Dec-2014 |
zbb |
Fix buffer overflow in Marvell PCI/PCIe driver
Buffer overflow occured when more than one MSI was allocated.
Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf
|
275564 |
06-Dec-2014 |
andrew |
Use the unified syntax when generating assembly for clang. The clang 3.5 integrated assembler only accepts it.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275524 |
05-Dec-2014 |
andrew |
Switch to a .cpu directive. These will work when clang 3.5 is imported where the .arch directive is a nop.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275523 |
05-Dec-2014 |
andrew |
Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is unsupported as it needs a newer cpu.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275522 |
05-Dec-2014 |
andrew |
Place the literal pool after a RET otherwise clang 3.5 tries to put it too far away from a ldr psuedo instruction. With this clang will place the literal value here where it's close enough to be loaded.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275521 |
05-Dec-2014 |
andrew |
Set the alignment to 4-bytes after a string as clang 3.5 can switch to thumb mode if this is incorrect.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275520 |
05-Dec-2014 |
andrew |
Use the unified syntax in a few more assembly files
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275519 |
05-Dec-2014 |
andrew |
Add missing END macros to some of the xscale functions.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275418 |
02-Dec-2014 |
andrew |
Switch to unified syntax so these can be built with clang 3.5.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275417 |
02-Dec-2014 |
andrew |
Use the APSR_nzcv format of mrc. The clang integrated assembler doesn't support the old usage of r15.
Sponsored by: ABT Systems Ltd
|
275416 |
02-Dec-2014 |
andrew |
Fix the name of the coprocessor to include the "p" prefix, the clang integrated assembler expects this.
MFC after: 1 Week Sponsored by: ABT Systems Ltd
|
275378 |
01-Dec-2014 |
andrew |
Pull in the NetBSD global offset table handling code. Clang 3.5 creates relocations the linker complains about.
Obtained from: NetBSD MFC after: 1 Week
|
275376 |
01-Dec-2014 |
rpaulo |
Allow multiple devices to mmap. It's impossible to prevent this with checks on the open/close functions.
MFC after: 1 week
|
275322 |
30-Nov-2014 |
andrew |
Correctly a few incorrect uses of ENTRY/EENTRY and END/EEND
Sponsored by: ABT Systems Ltd
|
275321 |
30-Nov-2014 |
andrew |
Remove extra labels, ENTRY_NP already provides them.
Sponsored by: ABT Systems Ltd
|
275264 |
29-Nov-2014 |
andrew |
Update _ENTRY to use _EENTRY to reduce the common code.
|
275208 |
28-Nov-2014 |
andrew |
Some device tree configurations place the generic timer under the root of the tree and not under simplebus. Update the driver to handle this.
Submitted by: Julien Grall <julien.grall AT linaro.org> MFC after: 1 week
|
275207 |
28-Nov-2014 |
andrew |
We don't use the hypervisor interrupt, make it optional in the device tree.
Submitted by: Julien Grall <julien.grall AT linaro.org> MFC after: 1 week
|
275050 |
25-Nov-2014 |
br |
Add new devices to the config.
|
275049 |
25-Nov-2014 |
br |
o Add PIO and vtblk mmio device info to the tree o Add FPGA memory window to static dev mappings o Fix whitespace
|
275004 |
25-Nov-2014 |
emaste |
Revert r274772: it is not valid on MIPS
Reported by: sbruno
|
274941 |
24-Nov-2014 |
ian |
The arm PJ4B cpu is armv7 architecture, not v6.
If this feels like deja vu... the last time this was fixed in this file only ARM_MMU_V6 was fixed, this time it's ARM_ARCH_V6 (and this time I searched for other occurrances of pj4b in here).
|
274839 |
22-Nov-2014 |
ian |
When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of the first cacheline if the buffer start address is not on a cacheline boundary. Normally a buffer which is not cacheline-aligned is bounced, but a special rule applies for mbufs, which are always misaligned due to the header. We know the cpu will not write to the header while dma is in progress (so we've been told anyway), but it may have written to the header shortly before starting a read, so we need to flush that write out to memory before invalidating the whole buffer.
In collaboration with Mical Meloun and Svata Kraus.
|
274772 |
21-Nov-2014 |
emaste |
Use canonical __PIC__ flag
It is automatically set when -fPIC is passed to the compiler.
Reviewed by: dim, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1179
|
274670 |
18-Nov-2014 |
loos |
Moves all the duplicate code to a single function.
Verify for invalid modes and unwanted flags before pass the new flags to driver.
|
274669 |
18-Nov-2014 |
imp |
These delays aren't needed. Elimate them. They should be on the order of a few cycles at most, not 10us. They make it impossible to implement half-duplex protocols that are faster than about 1KHz.
Sponsored by: Netflix
|
274668 |
18-Nov-2014 |
imp |
opt_global.h is included automatically in the build. No need to explicitly include it in these places.
Sponsored by: Netflix
|
274644 |
18-Nov-2014 |
ian |
Fix the i2c bus speed divisors for TI OMAP4 and AM335x.
For OMAP4, the old values for 1MHz gave a bus frequency of about 890KHz. The new numbers hit 1MHz exactly.
For AM335x the prescaler values are adjusted to give a 24MHz clock for all 3 standard speeds, as the manual recommends (as near as we can tell, there are errors and typos apparent in the document). Also, 1MHz speed is added, and has been tested successfully on a BeagleboneWhite board.
PR: 195009
|
274641 |
18-Nov-2014 |
ian |
Allow i2c bus speed to be configured via hints, FDT data, and sysctl.
The current support for controlling i2c bus speed is an inconsistant mess. There are 4 symbolic speed values defined, UNKNOWN, SLOW, FAST, FASTEST. It seems to be universally assumed that SLOW means the standard 100KHz rate from the original spec. Nothing ever calls iicbus_reset() with a speed of FAST, although some drivers would treat it as the 400KHz standard speed. Mostly iicbus_reset() is called with the speed set to UNKNOWN or FASTEST, and there's really no telling what any individual driver will do with those.
The speed of an i2c bus is limited by the speed of the slowest device on the bus. This means that generally the bus speed needs to be configured based on the board/system and the components within it. Historically for i2c we've configured with device hints. Newer systems use FDT data and it documents a clock-frequency property for i2c busses. Hobbyists and developers are likely to want on the fly changes. These changes provide all 3 methods, but do not require any existing drivers to change to use the new facilities.
This adds an iicbus method, iicbus_get_frequency(dev, speed) that gets the frequency for the requested symbolic speed. If the symbolic speed is SLOW or if there is no speed configured for the bus, the returned value is 100KHz, always. Otherwise, if bus speed is configured by hints, fdt, tunable, or sysctl, that speed is returned. It also adds a helper function, iicbus_init_frequency() that any bus driver subclassed from iicbus can initialize the frequency from some other source of info.
Initial driver implementations are provided for Freescale and TI.
Differential Revision: https://reviews.freebsd.org/D1174 PR: 195009
|
274605 |
16-Nov-2014 |
ian |
No functional changes. Remove a couple outdated or inane comments and add new comment blocks describing why the cache maintenance sequences are done in the order they are for each case.
|
274604 |
16-Nov-2014 |
ian |
Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs.
We used to invalidate the cache for PREREAD alone, or writeback+invalidate for PREREAD with PREWRITE, then treat POSTREAD as a no-op. Prefetching on modern systems can lead to parts of a DMA buffer getting pulled into the caches while DMA is in progress (due to access of "nearby" data), so it's mandatory to invalidate during the POSTREAD sync even if a PREREAD invalidate also happened.
In the PREREAD case the invalidate is done to ensure that there are no dirty cache lines that might get automatically evicted during the DMA, corrupting the buffer. In a PREREAD+PREWRITE case the writeback which is required for PREWRITE handling is suffficient to avoid corruption caused by eviction and no invalidate need be done until POSTREAD time.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
274603 |
16-Nov-2014 |
ian |
Do the cache invalidate sequence from the outermost to innermost, required for correct operation.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
274602 |
16-Nov-2014 |
ian |
Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync. The PREWRITE handling does a writeback of any dirty cachelines, so there's no danger of an eviction during the DMA corrupting the buffer. There will be an invalidate done during POSTREAD, so doing it before the read too is wasted time.
|
274596 |
16-Nov-2014 |
ian |
Indent a couple lines properly and expand a comment. No functional changes.
|
274545 |
15-Nov-2014 |
ian |
Whitespace and comment tweaks, no functional changes.
|
274538 |
15-Nov-2014 |
ian |
When doing busdma sync ops for BUSDMA_COHERENT memory, there is no need for cache maintenance operations, but ensure that all prior writes have reached memory when doing a PREWRITE sync.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
274536 |
15-Nov-2014 |
ian |
Use the standard powerof2() macro from param.h instead of a local one.
Pointed out by: jhb@
|
274484 |
13-Nov-2014 |
zbb |
Fix typo in ARM GIC device_printf()
Obtained from: Semihalf Sponsored by: The FreeBSD Foundation
|
274415 |
12-Nov-2014 |
loos |
Fix the error checking, broken on r273337, to _not_ ignore controller errors.
Without this fix you can't even scan the bus (all operations will always succeed).
MFC with: r273337 Pointy hat to: loos
|
274414 |
12-Nov-2014 |
ian |
Fix the reversed sense of the PADCONF_NONE test.
|
274412 |
12-Nov-2014 |
ian |
Bugfixes for the imx5/imx6 iomux fdt_pinctrl driver.
I originally overlooked a couple flag bits defined in the fdt binding docs. One flag suppresses the pad configuration (pullup/pulldown/etc). The other one requires that the SION (set input on) flag be set in the mux register.
Also, it appears from the data involved that if the input register address in the config tuple is zero, there is no input configuration. The old code was writing to register zero, which contains a collection of misc control bits (having nothing to do with input configuration) that probably shouldn't get overwritten arbitrarily. The bindings doc doesn't explictly mention this.
|
274409 |
12-Nov-2014 |
loos |
Since r273264 the SD card detection on Raspberry Pi is reliably working and that expose new bugs with HS mode.
When the old code could not do the proper card detection it would boot with lower defaults (and no HS mode) and this makes some HS cards boots.
Now, with the card always identified as HS capable, the sdhci controller tries to run the card at HS speeds and makes the boot always fail.
Disable the HS mode for now (which still can be enabled with the tunable) until it is properly fixed.
MFC with: r273264 Requested by: many
|
274331 |
09-Nov-2014 |
melifaro |
Renove faith(4) and faithd(8) from base. It looks like industry have chosen different (and more traditional) stateless/statuful NAT64 as translation mechanism. Last non-trivial commits to both faith(4) and faithd(8) happened more than 12 years ago, so I assume it is time to drop RFC3142 in FreeBSD.
No objections from: net@
|
274191 |
06-Nov-2014 |
ian |
Strengthen the sanity checking of busdma tag parameters.
It turns out an alignment of zero can lead to an endless loop in the vm reservations code, so specifically disallow that. The manpage says hardware which can do dma at any address should use a value of one, which hints at the forbiddeness of zero without exactly saying it. Several other conditions which could lead to insanity in working with the tag are also checked now.
Every existing call to bus_dma_tag_create() (about 680 of them) was eyeballed for violations of these things, and two alignment=0 glitches were fixed. It's possible something was missed, but overall this shouldn't lead to any arm users suddenly experiencing failures.
|
273908 |
31-Oct-2014 |
kevlo |
Fix usage of kern_getenv().
|
273799 |
28-Oct-2014 |
loos |
Make the GPIO children attach to the first unit available and not only to unit 0.
It seems that this 'simplification' was copied to all GPIO drivers in tree.
This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first.
|
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)
|
273703 |
26-Oct-2014 |
ian |
Remove the ARM_DEVICE_MULTIPASS option and make its effect be the default.
Multipass device attachment was tested on many arm platforms by users and only success was reported on the arm@ mailing list. This is just the long-delayed followup of making it the default.
Multipass attachment is necessary when using vendor-supplied FDT data, because our devices may need to be attached in a different order than they are described in the FDT data.
|
273701 |
26-Oct-2014 |
alc |
By the time that pmap_init() runs, vm_phys_segs[] has been initialized. Obtaining the end of memory address from vm_phys_segs[] is a little easier than obtaining it from phys_avail[].
Discussed with: Svatopluk Kraus
|
273610 |
24-Oct-2014 |
loos |
Add an iicbus_reset() method to bcm2835_bsc. While it is generally not used for kernel devices it is used by i2c(8).
This fix the 'error: Device not configured' when i2c(8) tries to reset the controller, as an example:
# i2c -r Resetting I2C controller on /dev/iic0: error: Device not configured
For now use conservative settings for default i2c speeds.
MFC after: 1 week
|
273606 |
24-Oct-2014 |
loos |
Fix cpsw_detach() to not panic when called from cpsw_attach().
For an unkown reason (at moment), sometimes if_cpsw cannot read from PHY and fails to attach calling cpsw_detach() which end up in a panic.
Fix it by doing the proper check before detach the miibus and also fix the leak of few variables.
And to actually make it work, ether_ifattach() has to be moved to the end of cpsw_attach() to avoid a race where calling ether_ifdetach() before domain_init() (which will only run later on) would make it crash at INP_INFO_RLOCK() on in_pcbpurgeif0().
Tested on: BBB (am335x) MFC after: 1 week
|
273603 |
24-Oct-2014 |
jhb |
Add COMPAT_FREEBSD9 and COMPAT_FREEBSD10 options to wrap code that provides compatability for FreeBSD 9.x and 10.x binaries. Enable these options in kernel configs that enable other COMPAT_FREEBSD<n> options.
|
273599 |
24-Oct-2014 |
loos |
Fix a bug where DMA maps created with bus_dmamap_create() won't increment the map count and without being able to keep track of the current map allocation, bus_dma_tag_destroy() will fail to proceed and will return EBUSY even after all the maps have been correctly destroyed with bus_dmamap_destroy().
Found while testing the detach method of a NIC.
Tested on: BBB (am335x) Reviewed by: cognet, ian MFC after: 1 week
|
273590 |
24-Oct-2014 |
ian |
Accept the documented FDT compatible string for the PL310 cache controller as well as the non-standard string we've been using for a couple years.
|
273561 |
23-Oct-2014 |
ian |
Install a temporary workaround to avoid problems in fdt data with linux's workaround for an imx6 chip erratum. Linux works around the bug with changes in fdt data that we can't currently handle, so to enable running with standard vendor-supplied fdt data, this watches for an attempt to map the gpio1_6 interrupt and remaps it back to the standard ethernet interrupt.
This can be undone when the intrng project is completed and our gpio drivers can also be interrupt controllers.
|
273514 |
23-Oct-2014 |
ian |
Unconditionally enable the clocks for all imx6 devices that we have drivers for, or that are required to run the chip (such as busses). Turn off all the devices we don't yet have drivers for.
Some day we will have a fully functional imx6 clock driver so that we can manage clocks based on fdt data. This will have to do until then.
|
273469 |
22-Oct-2014 |
br |
Provide a character device allowing us to access BERI memory regions.
Sponsored by: DARPA, AFRL
|
273380 |
21-Oct-2014 |
br |
Add driver for Micrel KSZ9021 Gigabit Ethernet Transceiver (PHY).
Sponsored by: DARPA, AFRL
|
273377 |
21-Oct-2014 |
hselasky |
Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.
- Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it should not, except for procedural SYSCTL nodes.
- Logical OR where binary OR was expected.
- Properly assert the "access" argument passed to all SYSCTL macros, using the CTASSERT macro. This applies to both static- and dynamically created SYSCTLs.
- Properly assert the the data type for both static and dynamic SYSCTLs. In the case of static SYSCTLs we only assert that the data pointed to by the SYSCTL data pointer has the correct size, hence there is no easy way to assert types in the C language outside a C-function.
- Rewrote some code which doesn't pass a constant "access" specifier when creating dynamic SYSCTL nodes, which is now a requirement.
- Updated "EXAMPLES" section in SYSCTL manual page.
MFC after: 3 days Sponsored by: Mellanox Technologies
|
273353 |
20-Oct-2014 |
ian |
Attach the imx6 CCM driver during BUS_PASS_CPU. It controls the clocks for most on-chip devices and needs to be available before other drivers start attaching and asking to have their clocks enabled.
|
273352 |
20-Oct-2014 |
ian |
The imx6 hardware is fast enough to make good use of however much timecounter resolution is available, so ask for a 1 GHz frequency. It won't actually get one that fast, but that'll get the fastest available clock and use a divisor of 1 (probably 132 or 66mhz on current hardware).
|
273337 |
20-Oct-2014 |
loos |
Fix the mtx_sleep() error checking, catch all errors and not only EWOULDBLOCK.
Do not print any message at errors. The errors are properly sent to upper layers which should be able to deal with it, including printing the errors when they need to.
The error message was quite annoying while scanning the i2c bus.
MFC after: 1 week
|
273329 |
20-Oct-2014 |
loos |
Add another wakeup() after actually set the bus as free.
This fix a race where the threads waiting for the bus would wake up early and still see bus as busy.
While here, give a better description to wmesg for the two use cases we have (bus and io waiting).
MFC after: 1 week
|
273288 |
19-Oct-2014 |
andrew |
Allow the armv6 kernel to be build with PHYSADDR undefined. The kernel will now find the virtual to physical mapping for libkvm to use at runtime. This makes PHYSADDR redundant, however keep it around to give everyone a chance to update their libkvm.
MFC after: 1 week
|
273284 |
19-Oct-2014 |
andrew |
Allow libkvm to get the kernel va to pa delta without the need for physaddr. This should allow for a kernel where PHYSADDR and KERNPHYSADDR are both undefined.
For now libkvm will use the old method of reading physaddr and kernaddr to allow it to work with old kernels. This could be removed in the future when enough time has passed.
Differential Revision: https://reviews.freebsd.org/D939 MFC after: 1 week
|
273283 |
19-Oct-2014 |
ian |
Attach this driver during BUS_PASS_BUS and move the cpu init code to a bus_new_pass() handler so it doesn't happen until BUS_PASS_CPU. This allows the anatop driver to outbid the generic simplebus driver (which the FDT data describes as compatible).
Some day when we handle power regulators, this driver may actually become a functional simplebus and attach the regulators as children, as described in the FDT data.
|
273281 |
19-Oct-2014 |
rpaulo |
Style changes as pointed out by stas@.
MFC after: 1 week
|
273278 |
19-Oct-2014 |
br |
Add driver for BERI soft processor 'ring buffer' device. Ring device provides a way for communicate to BERI peripherals such as BERI debug unit and console.
Sponsored by: DARPA, AFRL
|
273264 |
18-Oct-2014 |
loos |
Add a workaround needed to fix a bug of Arasan Host Controller where it may lose the contents of consecutive writes (that happens within two SD card clock cycles).
This fixes the causes of instability during the SD card detection and identification on Raspberry Pi (which happens at 400 kHz and so was much more vulnerable to this issue).
Remove the previous workaround which clearly can't provide the same effect.
MFC after: 1 week Relnotes: yes
|
273263 |
18-Oct-2014 |
loos |
Fix the chan address for mtx_sleep() on bus wait. Without this fix the threads waiting for the bus would never wake.
X-MFC-With: r270230
|
273262 |
18-Oct-2014 |
andrew |
Rework the Ti GPIO code to allow for both the OMAP4 and AM335X attachments to be present. Thsi creates a new per-SoC driver that handles probe and setting/getting the gpio flags.
Differential Revision: https://reviews.freebsd.org/D943 Reviewed by: loos, rpaulo MFC after: 1 week
|
273261 |
18-Oct-2014 |
rpaulo |
Remove an unused mutex.
MFC after: 1 week
|
273258 |
18-Oct-2014 |
rpaulo |
Make the ti_mbox and ti_pruss drivers optional.
MFC after: 1 week
|
273257 |
18-Oct-2014 |
rpaulo |
Add a driver for the TI watchdog.
The TI watchdog timer is present on BeagleBone's. Since 2014, U-Boot has been booting the BeagleBone with the watchdog enabled. We need to disable it on boot to avoid a spurious reset. The timer isn't exactly precise, but it will do as a watchdog. This is also a reflection of the watchdog(9) API.
In the future, we could handle interrupts, but the watchdog(9) API needs to be a bit smarter before that can happen.
Differential Revision: https://reviews.freebsd.org/D965 Reviewed by: andrew MFC after: 1 week Relnotes: yes
|
273251 |
18-Oct-2014 |
andrew |
Add an elf not so kgdb detects the kernel as a FreeBSD elf file. The ELFNOTE macro is based on one from the FreeBSD/ARM Xen tree [1].
Obtained from: Julien Grall <julien.grall AT linaro.org> [1]
|
273174 |
16-Oct-2014 |
davide |
Follow up to r225617. In order to maximize the re-usability of kernel code in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols.
Submitted by: kmacy Tested by: make universe
|
273157 |
16-Oct-2014 |
rpaulo |
Remove the "Unable to unwind further" message from DDB.
The ARM version of DDB is supposedly reliable enough making this message benign.
|
273089 |
14-Oct-2014 |
andrew |
Uncomment general options from the Pandaboard config. These are in other configs and there is no reason for them not to be here.
|
273086 |
14-Oct-2014 |
andrew |
Make the ti_padstate_devmap arrays ststic, they are only used with the file where they are defined.
|
273055 |
13-Oct-2014 |
andrew |
Move the sdhci option to files.ti, it's common to both SoCs.
|
273054 |
13-Oct-2014 |
andrew |
Remove the omap3 directory that should have happened in r273041.
|
273052 |
13-Oct-2014 |
andrew |
Use a switch on ti_chip() to find which SoC we are on. This allow us t only enable support for the SoCs we are built for.
|
273049 |
13-Oct-2014 |
andrew |
Remove ti_mmchs.c, it has been replaced by ti_sdhci.c.
|
273047 |
13-Oct-2014 |
andrew |
Remove the need for files.beaglebone and std.beaglebone by moving the one option they defined into files.am335x.
|
273045 |
13-Oct-2014 |
andrew |
Sort the files in the am355x directory.
|
273041 |
13-Oct-2014 |
andrew |
Start removing the omap3 support. In base it was only ever a header and a few changes to drivers, no kernel config was added. As the SoCs are quite old and the code is unmaintained start the process of removing support by deleting the header file and code that depends on it along with the macro SOC_OMAP3. Other Ti SoCs shouldn't be affected, other than for us to have less code to maintain.
Differential Revision: https://reviews.freebsd.org/D936 Reviewed by: rpaulo, loos
|
272896 |
10-Oct-2014 |
br |
o Add machine-dependent SMP part o Enable SMP
Sponsored by: DARPA, AFRL
|
272766 |
08-Oct-2014 |
markj |
Pass up the error status of minidumpsys() to its callers.
PR: 193761 Submitted by: Conrad Meyer <conrad.meyer@isilon.com> Sponsored by: EMC / Isilon Storage Division
|
272712 |
07-Oct-2014 |
br |
Add driver for Synopsys DesignWare Mobile Storage Host Controller.
Sponsored by: DARPA, AFRL
|
272397 |
02-Oct-2014 |
ganbold |
Allow timer0 to run at full 24MHz not at 24MHz/16 by setting prescale to 1.
Approved by: stas (mentor)
|
272356 |
01-Oct-2014 |
andrew |
Split you the syscall handling to a separate file.
|
272333 |
30-Sep-2014 |
ian |
When building the lists of available memory, actually honor the exclusion flags, like the comment says it does.
Pointy hat: ian Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
272300 |
30-Sep-2014 |
andrew |
Make sure __ARM_ARCH is defined in sysreg.h by including acle-compat.h
|
272213 |
27-Sep-2014 |
kevlo |
Fix the definitioin of AT91SAM9G45_IRQ_PIOE and rename it to AT91SAM9G45_IRQ_PIODE. According to the data sheet, both PIOD and PIOE use the same IRQ.
While here remove duplicate definitions.
|
272209 |
27-Sep-2014 |
andrew |
Add machine/sysreg.h to simplify accessing the system control coprocessor registers and use it in the ARMv7 CPU functions.
The sysreg.h file has been checked by hand, however it may contain errors with the comments on when a register was first introduced. The ARMv7 cpu functions have been checked by compiling both the previous and this version and comparing the md5 of the object files.
Submitted by: Svatopluk Kraus <onwahe at gmail.com> Submitted by: Michal Meloun <meloun at miracle.cz> Reviewed by: ian, rpaulo Differential Revision: https://reviews.freebsd.org/D795
|
272196 |
27-Sep-2014 |
kevlo |
Remove a bogus AIC.
Reviewed by: imp
|
272164 |
26-Sep-2014 |
kevlo |
Fix the size of AT91SAM9260_PIT_SIZE.
|
272163 |
26-Sep-2014 |
kevlo |
Fix typos.
|
272120 |
25-Sep-2014 |
br |
Add driver for Synopsys DesignWare 3504-0 Universal 10/100/1000 Ethernet MAC.
Sponsored by: DARPA, AFRL
|
272103 |
25-Sep-2014 |
gavin |
Move the ARM Samsung s3c2xx0 support files into the samsung directory, to match other platforms.
Discussed with: andrew
|
272098 |
25-Sep-2014 |
royger |
ddb: allow specifying the exact address of the symtab and strtab
When the FreeBSD kernel is loaded from Xen the symtab and strtab are not loaded the same way as the native boot loader. This patch adds three new global variables to ddb that can be used to specify the exact position and size of those tables, so they can be directly used as parameters to db_add_symbol_table. A new helper is introduced, so callers that used to set ksym_start and ksym_end can use this helper to set the new variables.
It also adds support for loading them from the Xen PVH port, that was previously missing those tables.
Sponsored by: Citrix Systems R&D Reviewed by: kib
ddb/db_main.c: - Add three new global variables: ksymtab, kstrtab, ksymtab_size that can be used to specify the position and size of the symtab and strtab. - Use those new variables in db_init in order to call db_add_symbol_table. - Move the logic in db_init to db_fetch_symtab in order to set ksymtab, kstrtab, ksymtab_size from ksym_start and ksym_end.
ddb/ddb.h: - Add prototype for db_fetch_ksymtab. - Declate the extern variables ksymtab, kstrtab and ksymtab_size.
x86/xen/pv.c: - Add support for finding the symtab and strtab when booted as a Xen PVH guest. Since Xen loads the symtab and strtab as NetBSD expects to find them we have to adapt and use the same method.
amd64/amd64/machdep.c: arm/arm/machdep.c: i386/i386/machdep.c: mips/mips/machdep.c: pc98/pc98/machdep.c: powerpc/aim/machdep.c: powerpc/booke/machdep.c: sparc64/sparc64/machdep.c: - Use the newly introduced db_fetch_ksymtab in order to set ksymtab, kstrtab and ksymtab_size.
|
271906 |
20-Sep-2014 |
ian |
Make the ARM MPCore Timer driver work with published standard FDT bindings.
We've always considered the mpcore timers to be a single monolithic device and we defined our own fdt binding for it with our own compat string. The published bindings treat the timers as two separate devices, a global timer and a "timer-watchdog" device for the per-cpu private timers. Thus our binding has two tuples in the regs property, one set of registers for the global timer and one for the private timers. The published bindings have two separate devices, each with a single set of registers. (Note that we don't use the optional watchdog feature of the hardware.)
These changes add the compat strings for the published bindings. If our own compat string appears, we expect to get two sets of memory resources. For the published bindings, there's only one set of memory resources, and only the private timers have an associated interrupt.
The other major change is that there can no longer be a single global var for the softc pointer because now there may be multiple devices at runtime. Since the global timer is used only as a timecounter and the private timers only as eventtimers, and there will only be one of each, those are now the pointers which are global, and the priv fields of those structures backlink to the device softc.
|
271901 |
20-Sep-2014 |
ganbold |
Fix typo in comment. Disable AHB clock gate for ehci0.
Approved by: stas (mentor)
|
271859 |
19-Sep-2014 |
glebius |
Mechanically convert to if_inc_counter().
|
271630 |
15-Sep-2014 |
ian |
The private peripheral interrupts start at offset 16, not 0. Also, use names rather than inline mystery constants for these offsets.
Pointed out by: andrew
|
271607 |
14-Sep-2014 |
ian |
Use gic_decode_fdt() rather than a local routine to parse fdt interrupt properties. Move fdt_pic_table and fdt_fixup_table into imx6_machdep.c, which means imx6 doesn't need imx_common.c anymore.
|
271601 |
14-Sep-2014 |
ian |
Add a common routine for parsing FDT data describing an ARM GIC interrupt.
In the fdt data we've written for ourselves, the interrupt properties for GIC interrupts have just been a bare interrupt number. In standard data that conforms to the published bindings, GIC interrupt properties contain 3-tuples that describe the interrupt as shared vs private, the interrupt number within the shared/private address space, and configuration info such as level vs edge triggered.
The new gic_decode_fdt() function parses both types of data, based on the #interrupt-cells property. Previously, each platform implemented a decode routine and put a pointer to it into fdt_pic_table. Now they can just list this function in their table instead if they use arm/gic.c.
|
271595 |
14-Sep-2014 |
ian |
Add compat strings for all the flavors of GIC this driver should support. Also allow the driver to attach to ofwbus as well as simplebus, some FDT data puts the root interrupt controller on the root bus.
|
271594 |
14-Sep-2014 |
ian |
Fix an undefined variable that was accidentally not causing an error.
The code had references to both intr_offset and intr_parent variable names as referring to the parent interrupt node. The intr_parent variable wasn't actually defined anywhere, but the only references to it were as an argument to a macro that didn't use that argument in expansion, so the undefined variable accidentally didn't cause an error.
The intr_parent name makes more sense in context, so change all occurrances of intr_offset to intr_parent.
|
271591 |
14-Sep-2014 |
ian |
Add a comment giving an overview of the driver. Remove leftover debugging.
|
271550 |
13-Sep-2014 |
ian |
Replace the imx5 and imx6 iomux drivers with a single common driver that uses the new fdt_pinctrl interface.
|
271548 |
13-Sep-2014 |
ian |
Convert the at91_pinctrl driver to use the new fdt_pinctrl interface.
|
271484 |
12-Sep-2014 |
jhb |
- Don't let rman_reserve_resource() activate the resource in nexus_alloc_resource() and don't set a bushandle. nexus_activate_resource() will set a proper bushandle. - Implement a proper nexus_release_resource(). - Fix ixppcib_activate_resource() to call rman_activate_resource() before creating a mapping for the resource.
Tested by: jmg
|
271431 |
11-Sep-2014 |
br |
Add Reset Manager driver. This driver provides generic way to reset and provides sysctl tunables for enable/disable FPGA<->HPS bridges.
Sponsored by: DARPA, AFRL
|
271422 |
11-Sep-2014 |
andrew |
Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function.
Submitted by: Svatopluk Kraus <onwahe at gmail.com> Submitted by: Michal Meloun <meloun at miracle.cz>
|
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
|
271394 |
10-Sep-2014 |
andrew |
Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE from asm.h as they were already defined in armreg.h.
Submitted by: Michal Meloun <meloun at miracle.cz>
|
271377 |
10-Sep-2014 |
andrew |
Move if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARM Versatile hardware.
|
271310 |
09-Sep-2014 |
ian |
Rename new to newval in inline asm code, to avoid clashes with C++ new. Also rename cmp to cmpval just to keep the asm variable names similar to the C variable names.
|
271240 |
07-Sep-2014 |
andrew |
When entering the kernel with the MMU off assume we are running from a va == pa map.
I'm not sure the code would work if we are not running from the identity map as the ARM core may attempt to read the next instruction from an invalid memory location.
|
271235 |
07-Sep-2014 |
andrew |
Remove Lvirtaddr and Lphysaddr, these don't appear to be used.
|
271232 |
07-Sep-2014 |
andrew |
Generalise the va to pa code and use it when starting secondary cores
Reviewed by: ian@, rpaulo@ Differential Revision: https://reviews.freebsd.org/D736
|
271220 |
07-Sep-2014 |
andrew |
Create a common i.MX53 config and use it with the two existing i.MX53 boards.
This is just intended to split the common config entries out, further cleanup is expected.
Reviewed by: ian@, rpaulo@ (earlier version) Differential Revision: https://reviews.freebsd.org/D731
|
271200 |
06-Sep-2014 |
br |
o Remove __unused attribute on variables which actually used o Unmagic 'configuration done' bit o Move probe() to place before attach() for better navigation o Use bus_read_n instead of bus_space_read_n functions
Pointed out by: andrew Sponsored by: DARPA, AFRL
|
271198 |
06-Sep-2014 |
andrew |
Fixthe spelling of ehci
|
271189 |
06-Sep-2014 |
andrew |
Allow us to use the virtual timer. It is currently disabled, but should be usable as the default timer in place of the physical timer.
We are guaranteed to have access to the virtual timer, but when running under a hypervisor may not have access to the physical.
Differential Revision: https://reviews.freebsd.org/D588
|
271186 |
06-Sep-2014 |
br |
Add FPGA Manager driver. This driver allows to program FPGA core from FreeBSD userspace running on ARM core.
Sponsored by: DARPA, AFRL
|
271181 |
05-Sep-2014 |
andrew |
Add the virtual timer irq to the list of interrupts we enable on secondary cores.
|
271104 |
04-Sep-2014 |
imp |
Wrap some long lines.
|
271102 |
04-Sep-2014 |
ian |
Implement the imx_iomux_get/set_gpr() interface for imx6.
|
271101 |
04-Sep-2014 |
ian |
The iomux driver is no longer optional, all imx platforms have it as standard now, so remove it from kernel configs.
|
271100 |
04-Sep-2014 |
ian |
Implement the same public interface in imx51 and imx6 iomux; use the common header file for both. Remove some unused code from imx51_iomux. The iomux drivers are required, not optional, adjust the files.* entries accordingly.
|
271097 |
04-Sep-2014 |
ian |
Add a basic iomux driver for imx6.
Submitted by: bsam@
|
271094 |
04-Sep-2014 |
ian |
Fix typo in variable name.
|
271093 |
04-Sep-2014 |
br |
Add initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family. Include board configuration for Terasic SoCKit (Altera Cyclone V).
Sponsored by: DARPA, AFRL
|
271084 |
04-Sep-2014 |
ian |
The imx5x and imx6 chips have an onboard IOMUX device which also contains a few "general purpose registers" whose values control chip behavior in ways that have nothing to do with IO pin mux control. Define a simple API that other soc-specific code can use to read and write the registers, and provide the imx51 implementation of them.
|
271055 |
03-Sep-2014 |
ian |
Add a function to get the frequency of the AHB bus. Another stopgap function until we have full clock support for imx6.
|
271050 |
03-Sep-2014 |
ian |
Remove DIAGNOSTIC from the kernel config of low-end arm systems. Sanity checks such as vmem_check() can make a low-end system go completely unresponsive for as much as 3 seconds out of every 10.
|
271046 |
03-Sep-2014 |
ian |
Fixes and enhancements for the if_cgem driver...
- miibus fixes as suggested by Yonghyeon Pyun. - enable VLAN MTU support. - fix a few WITNESS complaints in cgem_attach(). - have cgem_attach() properly init the ifnet struct before calling mii_attach() to fix panic when using e1000phy. - fix ethernet address changing. - fix transmit queue overflow handling. - tweak receive queue handling to reduce receive overflows. - bring out MAC statistic counters to sysctls. - add e1000phy to config file. - implement receive hang work-around described in reference guide. - change device name from if_cgem to cgem to be consistent with other interfaces.
Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net> Reviewed by: wkoszek, Yonghyeon PYUN <pyunyh@gmail.com>
|
270956 |
02-Sep-2014 |
ian |
The anatop driver controls power and PLLs and needs to be available before just about anything else (other than octop which provides it config info), so make it an EARLY_DRIVER_MODULE().
|
270955 |
02-Sep-2014 |
ian |
The ocotp driver provides access to registers containing chip configuration data that is needed by other drivers, so make it an EARLY_DRIVER_MODULE() that loads before just about anything else.
|
270948 |
01-Sep-2014 |
ian |
sdhci.h has grown a dependency on sysctl.h, include the latter where needed.
|
270945 |
01-Sep-2014 |
ian |
Rename OF_xref_phandle() to OF_node_from_xref() and add a new function that provides the inverse translation, OF_xref_from_node().
Discussed with: nwhitehorn
|
270930 |
01-Sep-2014 |
ian |
Do not generate unwind info in asm functions if _STANDALONE is defined. The .fnend op causes the assembler to emit RELOC references to unwind support functions that don't exist in libstand.
|
270912 |
01-Sep-2014 |
imp |
Resync comments about scbus and pass for life after AHCI joined CAM.
Sponsored by: Netflix
|
270884 |
31-Aug-2014 |
br |
GIC (Cortex A's interrupt controller) supports up to 1020 IRQs.
|
270879 |
31-Aug-2014 |
ian |
Put option FDT into the base IMX6 config and remove it from the config of boards based on IMX6.
|
270878 |
31-Aug-2014 |
ian |
The Marvell PJ4B cpu family is armv7, not armv6.
|
270862 |
30-Aug-2014 |
ian |
Fix the handling of MMU type in the AP entry code. The ARM_MMU_V6/V7 symbols are always #defined to 0 or 1, so use #if SYM not #if defined(SYM). Also, it helps if you include the header file that defines the symbols.
|
270859 |
30-Aug-2014 |
tuexen |
Enable SCTP support. It runs perfectly fine on a Wandboard quad.
MFC after: 3 days
|
270858 |
30-Aug-2014 |
tuexen |
Remove FDT option, since it is in every file, which includes this one.
|
270230 |
20-Aug-2014 |
loos |
Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:
. interrupt storm detected on "intr70:"; throttling interrupt source;
. Added access serialization on iicbus_transfer(), previously there was no such protection and a new transfer could easily confuse the controller;
. Add error checkings (i.e. stop the transfer when a error is detected and do _not_ overwrite the previous error);
. On command done interrupt do not assume that the transfer was finished sucessfully as we will receive the command done interrupt even after errors;
. Simplify the FIFO handling;
. Reset the FIFO between the transfers as the FIFO may contain data from the last (failed) transfer;
. Fix the iicbus speed for AM335x, which in turn will make better use of the I2C noise filter (set to one internal clock cycle);
. Move the read and write handler to ithread instead of notifying the requesting thread with wakeup(9);
. Fix the comments based on OMAP4 TRM.
The above changes allows me to read the EDID from my HDMI monitor on BBB with gonzo's patches to support TDA19988 (which does 128 bytes reads) and repeatedly scan the iicbus (with a modified i2c(8)) without lock up the bus.
Phabric: D465
|
270154 |
18-Aug-2014 |
imp |
Make note about reset vs RTOE actions...
|
270124 |
18-Aug-2014 |
imp |
/usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the FreeBSD 3.x and 4.x run time linker. FreeBSD/arm's first release was 5.0. Retire this long-dead code.
|
270123 |
18-Aug-2014 |
imp |
Expand the elf brandelf infrastructure to give access to the whole ELF header (Elf_Ehdr) to determine if a particular interpretor wants to accept it or not. Use this mechanism to filter EABI arm on OABI arm kernels, and vice versa. This method could also be used to implement OABI on EABI arm kernels, if desired, or to allow a single mips kernel to run o32, n32 and n64 binaries.
Differential Revision: https://reviews.freebsd.org/D609
|
270110 |
17-Aug-2014 |
bz |
Remove keyboard entropy [1] from r270105.
Reported by: ian [1] (Pointy hat)^2 to: imp
|
270105 |
17-Aug-2014 |
imp |
Add missing license to at91_common.c. It was committed w/o a license.
Pointy hat to: imp@
|
270104 |
17-Aug-2014 |
imp |
Define at91_master_clock in only one file to eliminate warnings about it multiply defined commons.
|
270103 |
17-Aug-2014 |
imp |
Convert the HL201 config file to use FDT.
|
270081 |
17-Aug-2014 |
ian |
When the initarm_* routines were renamed to platform_* and moved to their own header file, the lovely block of comments explaining what the generic init code expects of the soc implementations got lost, restore it.
|
270080 |
17-Aug-2014 |
ian |
Rename the old initarm_* functions to the new platform_* names. Also move the registration of the static device map table into the function intended to do devmap init stuff.
|
270065 |
16-Aug-2014 |
ian |
Move the imx6 sysctl temperature info to hw.imx6 where all the other soc-wide info lives. It was under dev.imx6_anatop.0.
What does anatop mean anyway? Nobody seems to know, so it's probably not where somebody will think to look for imx6 hardware info.
|
270025 |
15-Aug-2014 |
imp |
Implement the FDT static pinctl/pinmux spec for Atmel. This will configure the mux and config registers for PIO devices based on what we find in the FDT. I developed it per the spec that had been committed to Linux in the January 2014 time frame and haven't updated. In short, bundles of pins are activated in specific ways for specific configurations, and we implement all of that.
What's not included is a MI device infrastructure, any dynamic run-time changing of these pins, etc. Also not included are hooks into all the drivers to enable the latter (static at boot no driver changes are needed). These larger questions will need to be answered once we have more drivers like this for more platforms, or somebody has a heck of a lot of time to research a bunch of platforms, the Linux solution (which is good, but has its warts), etc.
|
270006 |
14-Aug-2014 |
imp |
Print the symbolic bit names for the status when we get a timeout.
|
269960 |
14-Aug-2014 |
imp |
Add AIC to at91sam9260 support, now that it is needed for multipass to work. This gets my AT91SAM9260-based boards almost booting with current in multi pass. The MCI driver is broken, but it is equally broken before multi-pass.
|
269959 |
14-Aug-2014 |
imp |
Add support for multipass to Atmel, for both FDT and !FDT cases.
|
269958 |
14-Aug-2014 |
imp |
Start to add FDT support.
|
269957 |
14-Aug-2014 |
imp |
Add support for FDT and !FDT configs on Atmel, though FDT isn't working yet. Bump rev on arm Makefile since files.at91 uses new '!' operator.
|
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.
|
269791 |
10-Aug-2014 |
dumbbell |
Fix two files forgotten in r269783 (vt_generate_cons_palette)
Reported by: bz MFC after: 1 week MFC with: 269783
|
269767 |
09-Aug-2014 |
imp |
Per discussion on arm@, the compiler generates misaligned relocations. Cope with memcpy when needed.
Submitted by: fabient@ (plus changes suggested by thread)
|
269728 |
08-Aug-2014 |
kib |
Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused). The flags includes the fault access bits, wired flag as PMAP_ENTER_WIRED, and a new flag PMAP_ENTER_NOSLEEP to indicate that pmap should not sleep.
For powerpc aim both 32 and 64 bit, fix implementation to ensure that the requested mapping is created when PMAP_ENTER_NOSLEEP is not specified, in particular, wait for the available memory required to proceed.
In collaboration with: alc Tested by: nwhitehorn (ppc aim32 and booke) Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division MFC after: 2 weeks
|
269703 |
08-Aug-2014 |
nwhitehorn |
Remove unnecessary inclusion of FDT headers.
|
269702 |
08-Aug-2014 |
nwhitehorn |
Use OF_getencprop() in preference to OF_getprop() and manual byte-swapping.
|
269698 |
08-Aug-2014 |
ian |
Add a missing clock register definition.
|
269646 |
06-Aug-2014 |
ian |
Use a SYSINIT to init the array of interrupt names on arm. This was called from initarm() in arm/machdep.c, but many legacy arm platforms have their own private initarm(), so a SYSINIT fixes everyone.
Reported by: jmg
|
269645 |
06-Aug-2014 |
jmg |
put these under bootverbose, they are only needed for debugging, not useful for the normal user durning normal runtime...
|
269607 |
05-Aug-2014 |
ian |
Cache the imx6 SoC type in a static var so that it only has to be figured out by sniffing hardware registers once.
|
269606 |
05-Aug-2014 |
ian |
Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass device attachment on arm platforms. If this is defined, nexus attaches early in BUS_PASS_BUS, and other busses and devices attach later, in the pass number they are set up for. Without it defined, nexus attaches in BUS_PASS_DEFAULT and thus so does everything else, which is status quo.
Arm platforms which use FDT data to enumerate devices have been relying on devices being attached in the exact order they're listed in the dts source file. That's one of things currently preventing us from using vendor-supplied fdt data (because then we don't control the order of the devices in the data). Multi-pass attachment can go a long way towards solving that problem by ensuring things like clock and interrupt drivers are attached before the more mundane devices that need them.
The long-term goal is to have all arm fdt-based platforms using multipass. This option is a bridge to that, letting us enable it selectively as platforms are converted and tested (the alternative being to just throw a big switch and try to fight fires as they're reported).
|
269605 |
05-Aug-2014 |
ian |
Attach arm generic interrupt and timer drivers in the middle of BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.
|
269598 |
05-Aug-2014 |
ian |
Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU. Because that's earlier than interrupts are available, set up deferred configuration of interrupts (which are used only for debugging).
|
269577 |
05-Aug-2014 |
glebius |
Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c The MD allocators were very common, however there were some minor differencies. These differencies were all consolidated in the MI allocator, under ifdefs. The defines from machine/vmparam.h turn on features required for a particular machine. For details look in the comment in sys/sf_buf.h.
As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have machine/sf_buf.h, which is usually quite small.
Tested by: glebius (i386), tuexen (arm32), kevlo (arm32) Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
269485 |
03-Aug-2014 |
alc |
Retire pmap_change_wiring(). We have never used it to wire virtual pages. We continue to use pmap_enter() for that. For unwiring virtual pages, we now use pmap_unwire(), which unwires a range of virtual addresses instead of a single virtual page.
Sponsored by: EMC / Isilon Storage Division
|
269414 |
02-Aug-2014 |
ian |
When arm 64-bit atomic ops are available, define ARM_HAVE_ATOMIC64. Use that symbol (which will be correct in both kernel and userland contexts) rather than just __arm__ to decide whether to use a local implementation.
|
269406 |
01-Aug-2014 |
ian |
Use atomic_load/store_64() in the arm implementation of counter(9), and remove the XXX comments about non-atomic access to the counters.
|
269405 |
01-Aug-2014 |
ian |
Add 64-bit atomic ops for armv4, only for kernel code, mostly so that we don't need any #ifdef stuff to use atomic_load/store_64() elsewhere in the kernel. For armv4 the atomics are trivial to implement for kernel code (just disable interrupts), less so for user mode, so this only has the kernel mode implementations for now.
|
269403 |
01-Aug-2014 |
ian |
Add 64-bit atomic ops for armv6. The only safe way to access a 64-bit value shared across multiple cores is with atomic_load_64() and atomic_store_64(), because the normal 64-bit load/store instructions are not atomic on 32-bit arm. Luckily the ldrexd/strexd instructions that are atomic are fairly cheap on armv6. Because it's fairly simple to do, this implements all the ops for 64-bit, not just load/store.
Reviewed by: andrew, cognet
|
269395 |
01-Aug-2014 |
ian |
Tell the assembler we're building for armv7a with security extensions, so that the 'smc' (secure monitor call) opcode is valid.
Submitted by: Stepan Dyatkovskiy <stpworld@narod.ru>
|
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>
|
269385 |
01-Aug-2014 |
br |
Rename files: keep codename only to make it shorter.
|
269369 |
01-Aug-2014 |
br |
Add support for Chromebook2 -- next-generation 8-core (4 in operation), 4GB ram (3.5 usable) ARM machine.
Support covers device drivers for: - Serial Peripheral Interface (SPI) - Chrome Embedded Controller (EC) - SPI-based version - XHCI and USB 3.0 dual-role device PHY
Also: - Add support for Exynos5420 in Pad module - Move power-related functions to separate driver -- Power Management Unit (PMU) - Enable XHCI for Chromebook1
Special thanks to grehan@ for hardware, and to hselasky@ for r269139.
|
269321 |
31-Jul-2014 |
ian |
Switch to using counter(9) for the new 64-bit stats kept by armv6 busdma.
|
269234 |
29-Jul-2014 |
br |
Remove unused option.
|
269233 |
29-Jul-2014 |
ray |
Remove SC_DFLT_FONT option. vt(4) don't use it.
Suggested by: emaste Sponsored by: The FreeBSD Foundation
|
269217 |
29-Jul-2014 |
ian |
Export some new busdma stats via sysctl for armv6. Added:
hw.busdma.tags_total: 46 hw.busdma.maps_total: 1302 hw.busdma.maps_dmamem: 851 hw.busdma.maps_coherent: 849 hw.busdma.maploads_total: 1568812 hw.busdma.maploads_bounced: 16750 hw.busdma.maploads_coherent: 920 hw.busdma.maploads_dmamem: 920 hw.busdma.maploads_mbuf: 1542766 hw.busdma.maploads_physmem: 0
|
269216 |
29-Jul-2014 |
ian |
A while back, the array of segments used for a load/mapping operation was moved from the stack into the tag structure. In retrospect that was a bad idea, because nothing protects that array from concurrent access by multiple threads.
This change moves the array to the map structure (actually it's allocated following the structure, but all in a single malloc() call).
This also establishes a "sane" limit of 4096 segments per map. This is mostly to prevent trying to allocate all of memory if someone accidentally uses a tag with nsegments set to BUS_SPACE_UNRESTRICTED. If there's ever a genuine need for more than 4096, don't hesitate to increase this (or maybe make it tunable).
Reviewed by: cognet
|
269215 |
29-Jul-2014 |
ian |
We never need bounce pages for memory we allocate. We cleverly allocate memory the matches all the constraints of the dma tag so that bouncing will never be required.
Reviewed by: cognet
|
269214 |
29-Jul-2014 |
ian |
Replace a bunch of double-indirection with a local pointer var (that is, (*mapp)->something becomes map->something). No functional changes.
Reviewed by: cognet
|
269213 |
29-Jul-2014 |
ian |
Don't clear the DMAMAP_DMAMEM_ALLOC flag set a few lines earlier. Doh!
Reviewed by: cognet
|
269212 |
29-Jul-2014 |
ian |
Memory belonging to an mbuf, or allocated by bus_dmamem_alloc(), never triggers a need to bounce due to cacheline alignment. These buffers are always aligned to cacheline boundaries, and even when the DMA operation starts at an offset within the buffer or doesn't extend to the end of the buffer, it's safe to flush the complete cachelines that were only partially involved in the DMA. This is because there's a very strict rule on these types of buffers that there will not be concurrent access by the CPU and one or more DMA transfers within the buffer.
Reviewed by: cognet
|
269211 |
29-Jul-2014 |
ian |
The run_filter() function doesn't just run dma tag exclusion filter functions, it has evolved to make a variety of decisions about whether the DMA needs to bounce, so rename it to must_bounce(). Rewrite it to perform checks outside of the ancestor loop if they're based on information that's wholly contained within the original tag. Now the loop only checks exclusion zones in ancestor tags.
Also, add a new function, might_bounce() which does a fast inline check of flags within the tag and map to quickly eliminate the need to call the more expensive must_bounce() for each page in the DMA operation.
Within the mapping loops, use map->pagesneeded != 0 as a proxy for all the various checks on whether bouncing might be required. If no pages were reserved for bouncing during the checks before the mapping loop, then there's no need to re-check any of the conditions that can lead to bouncing -- all those checks already decided there would be no bouncing.
Reviewed by: cognet
|
269210 |
29-Jul-2014 |
ian |
Propagate any alignment restriction from the parent tag to a new tag, keeping the more restrictive of the two values.
Reviewed by: cognet
|
269209 |
29-Jul-2014 |
ian |
Reformat some continuation lines. No functional changes.
Reviewed by: cognet
|
269208 |
29-Jul-2014 |
ian |
Correct the comparison logic when looking for intersections between exclusion zones and phsyical memory. The phys_avail[i] entries are the address of the first byte of ram in the region, and phys_avail[i+1] entries are the address of the first byte of ram in the next region (i.e., they're not included in the region that starts at phys_avail[i]).
Reviewed by: cognet
|
269207 |
29-Jul-2014 |
ian |
The exclusion_bounce() routine compares unchanging values in the tag with unchanging values in the phys_avail array, so do the comparisons just once at tag creation time and set a flag to remember the result.
Reviewed by: cognet
|
269206 |
29-Jul-2014 |
ian |
Rename _bus_dma_can_bounce(), add new inline routines.
DMA on arm can bounce for several reasons, and _bus_dma_can_bounce() only checks for the lowaddr/highaddr exclusion ranges in the dma tag, so now it's named exclusion_bounce(). The other reasons for bouncing are checked by the new functions alignment_bounce() and cacheline_bounce().
Reviewed by: cognet
|
269178 |
28-Jul-2014 |
br |
Add the rest of combined interrupt groups.
|
269136 |
26-Jul-2014 |
ian |
Pull in the armv4 "fast out" code for checking whether busdma can bounce due to an excluded region of physical memory.
|
269135 |
26-Jul-2014 |
ian |
Remove completely bogus alignment check -- it's the physical address that needs to be aligned, not the virtual, and it doesn't seem worth the cost of a vtophys() call just to see if kmem_alloc_contig() works properly.
|
269105 |
26-Jul-2014 |
gavin |
Add error return to dumpsys(), and use it in doadump().
This commit does not add error returns to minidumpsys() or textdump_dumpsys(); those can also be added later.
Submitted by: Conrad Meyer (EMC / Isilon storage division)
|
268977 |
22-Jul-2014 |
br |
Enable Freescale i.MX I2C driver for i.MX6.
|
268973 |
22-Jul-2014 |
br |
Rename i.MX I2C driver file.
|
268893 |
19-Jul-2014 |
ian |
Add dl_unwind_find_exidx() for ARM EABI, required for C++ exception handling. For statically linked apps this uses the __exidx_start/end symbols set up by the linker. For dynamically linked apps it finds the shared object that contains the given address and returns the location and size of the exidx section in that shared object.
The dl_unwind_find_exidx() name is used by other BSD projects and Android, and is mentioned in clang 3.5 comments as "the BSD interface" for finding exidx data. GCC (in libgcc_s) expects the exact same API and functionality to be provided by a function named __gnu_Unwind_Find_exidx(), so we provide that with an alias ("strong reference").
Reviewed by: kib@ MFC after: 1 week
|
268838 |
18-Jul-2014 |
br |
Add support for Toradex Apalis i.MX6 development board.
Sponsored by: Toradex AG
|
268835 |
18-Jul-2014 |
br |
Rename gpio driver file.
|
268834 |
18-Jul-2014 |
br |
o Enable GPIO device driver for i.MX6. It was originally written for i.MX5 and compatible with newer chip. o Extend device tree information o style(9) fixes
Discussed with: ian
|
268776 |
16-Jul-2014 |
alc |
Implement pmap_unwire(). See r268327 for the motivation behind this change.
|
268693 |
15-Jul-2014 |
alc |
Actually set the "no execute" bit on 1 MB page mappings in pmap_protect(). Previously, the "no execute" bit was being set directly in the PTE, instead of the local variable in which the new PTE value is being constructed. So, when the local variable was finally assigned to the PTE, the "no execute" bit setting was lost.
|
268655 |
15-Jul-2014 |
alc |
Eliminate repeated calculation of next_bucket in pmap_protect() and pmap_remove(). Eliminate an unnecessary variable from pmap_remove() and pmap_advise().
|
268633 |
14-Jul-2014 |
ian |
Fix the Zedboard/Zynq ethernet driver to handle media speed changes so that it can connect to switches at speeds other than 1gb.
This requires changing the reference clock speed. Since we still don't have a general clock API that lets a SoC-independant driver manipulate its own clocks, this change includes a weak reference to a routine named cgem_set_ref_clk(). The default implementation is a no-op; SoC-specific code can provide an implementation that actually changes the speed.
Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>
|
268623 |
14-Jul-2014 |
alc |
Eliminate dead code. There is no direct map. This code was cut-and-pasted from amd64.
|
268495 |
10-Jul-2014 |
ian |
Pending interrupt status is cleared by writing to the ISR, not the data reg.
MFC after: 1 week
|
268401 |
08-Jul-2014 |
ian |
Use named constant rather than '0' to access the reset controller register.
|
267992 |
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
267985 |
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
267961 |
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
267719 |
22-Jun-2014 |
andrew |
Remove the incomplete Tegra 2 code, nobody was maintaining it. The AC100 never booted to single user mode.
It can be brought back if someone is willing to get it into a stable state and maintain it.
|
267597 |
17-Jun-2014 |
tuexen |
Different versions of the ARM processor use different registers. Fix the code used on a Raspberry Pi.
Reviewed by: markm@
|
267589 |
17-Jun-2014 |
jhb |
Don't bother clearing maps for static DMA allocations to NULL. Instead, leave them as purely opaque values that are only set by bus_dmamem_alloc().
|
267548 |
16-Jun-2014 |
attilio |
- Modify vm_page_unwire() and vm_page_enqueue() to directly accept the queue where to enqueue pages that are going to be unwired. - Add stronger checks to the enqueue/dequeue for the pagequeues when adding and removing pages to them.
Of course, for unmanaged pages the queue parameter of vm_page_unwire() will be ignored, just as the active parameter today. This makes adding new pagequeues quicker.
This change effectively modifies the KPI. __FreeBSD_version will be, however, bumped just when the full cache of free pages will be evicted.
Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
|
267507 |
15-Jun-2014 |
br |
Add very basic driver for 12-bit Analog to Digital Converter (ADC).
|
267408 |
12-Jun-2014 |
jmg |
clear the write bit... This allows my AVILA board to survive a portsnap extract, where previously it would panic.. clearly someone who knows pmap should optimize this code per alc's comment...
Submitted by: alc MFC after: probably
|
267390 |
12-Jun-2014 |
br |
Enable SMP for both Exynos5 models we support.
|
267389 |
12-Jun-2014 |
br |
Activate IRQ 30 (non-secure private timer IRQ) for case we are running in non-secure state.
|
267388 |
12-Jun-2014 |
br |
Add machine-dependent SMP part for Exynos5420
|
267363 |
11-Jun-2014 |
jhb |
Fix various NIC drivers to properly cleanup static DMA resources. In particular, don't check the value of the bus_dma map against NULL to determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded. Instead, assume that bus_dmamap_load() succeeeded (and thus that bus_dmamap_unload() should be called) if the bus address for a resource is non-zero, and assume that bus_dmamem_alloc() succeeded (and thus that bus_dmamem_free() should be called) if the virtual address for a resource is not NULL.
In many cases these bugs could result in leaks when a driver was detached.
Reviewed by: yongari MFC after: 2 weeks
|
267354 |
11-Jun-2014 |
br |
Add a driver for Serial Peripheral Interface (SPI).
|
267340 |
10-Jun-2014 |
jhb |
Don't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases, don't create a map before calling bus_dmamem_alloc() (such maps were leaked). It is believed that the extra destroy of the map was generally harmless since bus_dmamem_alloc() often uses special maps for which bus_dmamap_destroy() is a no-op (e.g. on x86).
Reviewed by: scottl
|
267213 |
07-Jun-2014 |
alc |
Add a page size field to struct vm_page. Increase the page size field when a partially populated reservation becomes fully populated, and decrease this field when a fully populated reservation becomes partially populated.
Use this field to simplify the implementation of pmap_enter_object() on amd64, arm, and i386.
On all architectures where we support superpages, the cost of creating a superpage mapping is roughly the same as creating a base page mapping. For example, both kinds of mappings entail the creation of a single PTE and PV entry. With this in mind, use the page size field to make the implementation of vm_map_pmap_enter(..., MAP_PREFAULT_PARTIAL) a little smarter. Previously, if MAP_PREFAULT_PARTIAL was specified to vm_map_pmap_enter(), that function would only map base pages. Now, it will create up to 96 base page or superpage mappings.
Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
|
267171 |
06-Jun-2014 |
kevlo |
Remove extra semicolons.
|
267146 |
06-Jun-2014 |
imp |
Restore comments accidentally removed.
MFC after: 3 days
|
267130 |
05-Jun-2014 |
zbb |
Avoid using hard-coded SoC's register address in mptramp code for Armada XP
SoC's registers base address may differ between boards (0xf1000000 or 0xd0000000). Therefore, in order to use the proper CPU Boot Address Redirect register during SMP initialization in mptramp the real, physical address has to be passed to mptramp based on the value from DT.
Reviewed by: gber
|
267129 |
05-Jun-2014 |
zbb |
Fix broken SMP startup on Armada XP after r265694
During Armada's platform_mp_start_ap(), mptramp code is being copied to the specific physical location (0xffff0000). Before r265694 the address to which the code should be copied was equal to the address of mpentry routine that followed the mptramp in locore.S. Now the mptramp end address should be exported and used as a copy limit.
Reviewed by: gber
|
267021 |
03-Jun-2014 |
loos |
FreeBSD, historically, has always used 8-bit addresses for i2c devices (7-bit device address << 1), always leaving the room for the read/write bit.
This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them compatible with 8-bit addresses. Previous to this commit an i2c device would have different addresses depending on the controller it was attached to (by example, when compared to any iicbb(4) based i2c controller), which was a pretty annoying behavior.
Also, update the PMIC i2c address on beaglebone* DTS files to match the new address scheme.
Now the userland utilities need to do the correct slave address shifting (but it is going to work with any i2c controller on the system).
Discussed with: ian MFC after: 2 weeks
|
267009 |
03-Jun-2014 |
loos |
Remove the unnecessary i2c slave address assignment.
The ti_i2c controller only works in the master mode and the i2c address passed on iicbus_reset() is used to set the controller slave address when operating as an i2c slave (which isn't currently supported).
When talking to a slave, the slave address is correctly provided to ti_i2c_tranfer().
|
266960 |
02-Jun-2014 |
loos |
Configure the analog input 7 which, on BBB, is connected to the 3V3B rail through a voltage divisor (R163 and R164 on page 4 of BBB schematic).
Add a note about this on ti_adc(4) man page. The ti_adc(4) man page will first appear on 10.1-RELEASE.
MFC after: 1 week Suggested by: Sulev-Madis Silber (ketas) Manual page reviewed by: brueffer (D127)
|
266950 |
01-Jun-2014 |
br |
Add ident value. This fixes universe build.
Pointed out by: andrew
|
266945 |
01-Jun-2014 |
br |
Fix i2c communication interface to be compatible with vendor tools, e.g. embedded controller tool
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266944 |
01-Jun-2014 |
br |
Rename exynos uart driver filenames.
|
266943 |
01-Jun-2014 |
br |
Add support for Exynos 5420 Octa - 8-core heterogeneous (big.LITTLE) ARM machine (4 x Cortex-A15 @ 1.8Ghz, 4 x Cortex-A7 @ 1Ghz)
Add configuration for Arndale Octa development board
|
266942 |
01-Jun-2014 |
br |
Do only receive chars if there are some data in the buffer. This fixes operation on newer Exynos boards.
|
266940 |
01-Jun-2014 |
ganbold |
Silence tinderbox build.
Approved by: stas (mentor)
|
266937 |
01-Jun-2014 |
loos |
Export two new settings for the AM335x PWM, the clock prescaler (clkdiv) and the actual PWM frequency.
Enforce the maximum value for the period sysctl.
The frequency systcl now allows the direct setting of the PWM frequency (it will try to find the better clkdiv and period for a given frequency, i.e. the ones that will give the better PWM resolution).
This allows the use lower frequencies on the PWM. Without changing the clock prescaler the minimum PWM frequency was 1.52kHz.
PWM frequencies checked with an osciloscope.
PWM output tested with some R/C servos at 50Hz.
|
266919 |
31-May-2014 |
ganbold |
Add #NO_UNIVERSE to RADXA and RADXA-LITE kernel configs since there aren't any new devices in those files so unhook them from universe build.
Approved by: stas (mentor)
|
266875 |
30-May-2014 |
br |
Reset HSIC hub during EHCI initialization. This makes devices connected to external USB ports available to the system.
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266874 |
30-May-2014 |
br |
Fix off-by-one error that makes 0-th pins of each bank unreachable.
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266872 |
30-May-2014 |
br |
o Make keyboard-related properties to be compatible with vendor standard o Allow setting keymap in FDT, use hardcoded one by default o Represent fallback keymap as a list rather than directly usable M*N array
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266871 |
30-May-2014 |
ganbold |
Add common kernel config file for Rockchip RK3188 systems by splitting current RADXA config. Radxa Rock (RR) boards have few types such as RR (full version), RR Lite and some variants of RR engineering samples. Add kernel config and FDT file for RR Lite board.
Approved by: stas (mentor)
|
266868 |
30-May-2014 |
rpaulo |
Cleanup the RADXA kernel config file a bit and enable modules.
|
266850 |
29-May-2014 |
cognet |
Do not hand the VM the memory used for stacks/page tables/etc.
|
266849 |
29-May-2014 |
cognet |
For old CPUs, map the 64 first MB of RAM as it used to be. Some ports (XScale mainly) expects the memory located before the kernel to be mapped, and use it to allocate the page tables, the various stacks, etc. A better fix would probably be to rewrite the various bla_machdep.c to stop using that RAM, but I'm not so inclined to do it, especially since I don't have hardware for all of them.
|
266834 |
29-May-2014 |
hselasky |
Factor out kernel configuration for DWC OTG FDT attach code.
|
266787 |
28-May-2014 |
br |
Add simple polling mechanism that works for KDB.
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266785 |
28-May-2014 |
br |
Describe I2C arbitrator device in DTS and use it for Chromebook Snow only.
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266783 |
28-May-2014 |
br |
o Add kernel configuration for HP Chromebook 11 o Use machine codename in filenames o Add GEOM_PART_GPT kernel option
Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>
|
266707 |
26-May-2014 |
andrew |
Rework the Ti GPIO driver to work on multiple SoCs. At the moment it could work with OMAP4 and AM335x without needing to recompile.
Reviewed by: loos
|
266673 |
25-May-2014 |
zbb |
Delete obsolete and unused PJ4B CPU functions
Since PJ4Bv7 uses armv7_ CPU functions only pj4b_config function is necessary. Remove obsolete routines.
|
266672 |
25-May-2014 |
zbb |
Fix context switch on PJ4Bv7 and remove obsolete pj4b_/arm11 functions
Use armv7_setttb that sets proper PT attributes. Get rid of unused CPU functions, put nullop instead. Exchange obsolete pj4b_/arm11_ functions to the appropriate armv7_ ones.
|
266651 |
25-May-2014 |
ian |
Fix whitespace glitches.
Pointed out by: jhb
|
266649 |
25-May-2014 |
andrew |
Make ti_padconf_devmap static in both places it is defined.
|
266648 |
25-May-2014 |
andrew |
Allow the OMAP4 and AM335x prcm drivers to be compiled in the same kernel by renaming the structures used.
|
266647 |
25-May-2014 |
andrew |
Reduce the diff between the PandaBoard and BeableBone kernel configs to help with the creation of a more generic Ti kernel config.
|
266631 |
24-May-2014 |
zbb |
Enable automatic superpages promotion by default on ARMv6/v7
From now on superpages are enabled by default on ARM. One can still disable superpages utilization by adding:
vm.pmap.sp_enabled=0
to loader.conf
|
266621 |
24-May-2014 |
ian |
Eliminate one of the causes of spurious interrupts on armv6. The arm weak memory ordering model allows writes to different devices to complete out of order, leading to a situation where the write that clears an interrupt source at a device can complete after a write that unmasks and EOIs the interrupt at the interrupt controller, leading to a spurious re-interrupt.
This adds a generic barrier function specific to the needs of interrupt controllers, and calls that function from the GIC and TI AINTC controllers. There may still be other soc-specific controllers that need to make the call.
Reviewed by: cognet, Svatopluk Kraus <onwahe@gmail.com> MFC after: 3 days
|
266570 |
23-May-2014 |
imp |
Remove NetBSD implementation details not relevant to FreeBSD.
|
266565 |
22-May-2014 |
ian |
Map device memory using PTE_DEVICE attributes, and also ensure that the shared flag is set on normal-memory mappings made via pmap_kenter() for SMP.
The "shared flag" part of this change isn't obvious from the diff, here's the deal... by using the array of preformatted page table entry templates instead of constructing the PTE from scratch, we automatically get the right attribute bits set for both caching and shared.
MFC after: 1 week
|
266470 |
20-May-2014 |
hselasky |
Optimise reading of pending interrupt registers. If there are no pending interrupt bits, skip the bit iteration loop.
Reviewed by: ian @
|
266336 |
17-May-2014 |
andrew |
Allow us to compile the Ti iic driver for both OMAP4 and AM335x.
MFC after: 1 week
|
266334 |
17-May-2014 |
andrew |
Move the Ti SoCs to use the ARM platform. This should help allowing a single kernel to work on both PandaBoard and BeagleBone.
|
266333 |
17-May-2014 |
andrew |
Add FDT_PLATFORM_DEF2 for when there are multiple platforms needing to use the same platform methods.
|
266303 |
17-May-2014 |
andrew |
Fix a comment s/initarm_/platform_/
|
266301 |
17-May-2014 |
andrew |
Add the start of the ARM platform code. This is based on the PowerPC platform code, it is expected these will be merged in the future when the ARM code is more complete.
Until more boards can be tested only use this with the Raspberry Pi and rrename the functions on the other SoCs.
Reviewed by: ian@
|
266271 |
16-May-2014 |
gavin |
Fix spelling mistake in comment.
Spotted during: http://www.bsdcan.org/2014/schedule/events/484.en.html
|
266119 |
15-May-2014 |
br |
Fix return value. Should be logic one or zero.
|
266083 |
14-May-2014 |
markm |
Give suitably-endowed ARMs a register similar to the x86 TSC register.
Here, "suitably endowed" means that the System Control Coprocessor (#15) has Performance Monitoring Registers, including a CCNT (Cycle Count) register.
The CCNT register is used in a way similar to the TSC register in x86 processors by the get_cyclecount(9) function. The entropy-harvesting thread is a heavy user of this function, and will benefit from not having to call binuptime(9) instead.
One problem with the CCNT register is that it is 32-bit only, so the upper 32-bits of the returned number are always 0. The entropy harvester does not care, but in case any one else does, follow-up work may include an interrup trap to increment an upper-32-bit counter on CCNT overflow.
Another problem is that the CCNT register is not readable in user-mode code; in can be made readable by userland, but then it is also writable, and so is a good chunk of the PMU system. For that reason, the CCNT is not enabled for user-mode access in this commit.
Like the x86, there is one CCNT per core, so they don't all run in perfect sync.
Reviewed by: ian@ (an earlier version) Tested by: ian@ (same earlier version) Committed from: WANDBOARD-QUAD
|
266021 |
14-May-2014 |
br |
Fix typo.
|
266010 |
14-May-2014 |
ray |
Remove extra newlines. No functional changes.
Sponsored by: The FreeBSD Foundation
|
265914 |
12-May-2014 |
ian |
Cleanup some style nits.
|
265913 |
12-May-2014 |
ian |
Interrupts need to be disabled on entry to cpu_sleep() for ARM. Given that and the need to be in a critical section when switching to idleclock mode for event timers, use spinlock_enter()/exit() to achieve both needs.
The ARM WFI (wait for interrupt) instruction blocks until an interrupt is asserted, and it will unblock even if interrupts are masked, and it will unblock immediately if an interrupt is already pending. It is necessary to execute it with interrupts disabled, otherwise the interrupt that should unblock it may occur and be serviced just prior to executing the instruction. At that point the system is inappropriately asleep until the next timer tick or some other random interrupt happens.
In general, interrupts need to be disabled continuously from the time the decision is made that there is no work to be done and sleeping is needed until actually going to sleep, to avoid a race where handling a new interrupt changes the basis for deciding there is no work to be done.
Submitted by: hps@ (in slightly different form)
|
265870 |
11-May-2014 |
ian |
Add cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier().
On modern ARM SoCs the L2 cache controller sits between the CPU and the AXI bus, and most on-chip memory-mapped devices are on the AXI bus. We map the device registers using the 'Device' memory attribute, which means the memory is not cached, but writes to it are buffered. Ensuring that a write has made it all the way to a device may require that the L2 controller take some action.
There is currently only one implementation of the new function, for the PL310 cache controller. It invokes a function that the controller manual calls "cache sync" but it actually has nothing to do with cache at all, it triggers a drain of all pending store buffer writes and it blocks until they complete.
The sheeva and xscale L2 controllers (which predate the concept of Device memory) don't seem to have a corresponding function. It appears that the standard armv5 drain_writebuf function includes draining all the way through the L2 controller.
|
265869 |
11-May-2014 |
grehan |
Enable SMP for Exynos-based platforms (i.e. Chromebook)
Reviewed by: br
|
265861 |
11-May-2014 |
ian |
Make the hardware memory and instruction barrier functions work on armv4 and armv5 as well.
|
265858 |
10-May-2014 |
andrew |
Rename platform_gpio_init to be SoC specific
|
265854 |
10-May-2014 |
andrew |
Rename platform_gpio_init to be platform specific, and make it static as it's only used from this file.
|
265853 |
10-May-2014 |
andrew |
Rename platform_gpio_init to be SoC specific, and make it static as it's only called from this file.
|
265852 |
10-May-2014 |
ian |
When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE. On armv4 these are defined as synonyms right now, but it's a bit ambiguous what NOCACHE means (is buffering/write-combining also enabled or not?); this is a first step towards replacing PTE_NOCACHE with a less ambiguous name.
|
265784 |
09-May-2014 |
ian |
Call idcache_inv_all from the AP core entry code before turning on the MMU. Also, enable instruction and branch caches, which should be safe now that they're properly initialized/invalidated first.
|
265739 |
09-May-2014 |
ganbold |
Add the codes for enabling CPU cores of Rockchip RK3188 SoC. Enable SMP for Radxa Rock board.
Approved by: stas (mentor)
|
265705 |
08-May-2014 |
ian |
Consolitate all the AP core startup stuff under a single #ifdef SMP block. Remove some other ifdefs that came in with a copy/paste that mean basically "if this processor supports multicore stuff", because if you're starting up an AP core... it does.
|
265694 |
08-May-2014 |
ian |
Move the mptramp code which is specific to the Marvell ArmadaXP SoC out of the common locore.S file and into the mv/armadaxp directory.
|
265690 |
08-May-2014 |
ian |
Use edge-triggered interrupts rather than polling loops to avoid missing transitions of the INIT_B line. Also, release the mutex during uiomove().
Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>
|
265447 |
06-May-2014 |
ian |
Enable PL310 power-saving modes and tune the cache ram latencies for imx6.
|
265446 |
06-May-2014 |
ian |
Add a public routine to set the L2 cache ram latencies. This can be called by platform init routines to fine-tune cache performance.
|
265445 |
06-May-2014 |
ian |
Add defines for the bits in the PL310 debug control register.
This should have been part of r265444.
|
265444 |
06-May-2014 |
ian |
Call platform_pl310_init() before enabling the controller, and handle the case where the controller is already enabled.
Some of the pl310 configuration registers cannot be changed while the controller is active, so if there is any platform-specific init to be done it must happen before enabling the controller.
The controller should not be enabled upon entry to the kernel, but u-boot has recently developed the bad habit of leaving caches enabled when launching the kernel, and since we have no control over that source code we have to do our best to cope with it. The PL310 manual doesn't document a safe sequence for disabling the controller, but the sequence used here (force write-through mode and disable linefill allocations, then clean and invalidate the current contents before disabling the hardware) appears to be sound both by analysis and empirical testing.
These changes were developed and tested in collaboration with Svatopluk Kraus <onwahe@gmail.com>.
Reviewed by: cognet@
|
265441 |
06-May-2014 |
ian |
Break out the code that figures out the L2 cache geometry to its own routine, so that it can be called from multiple places in upcoming changes.
|
265440 |
06-May-2014 |
ian |
Move the pl310.enabled tunable to hw.pl310.enabled. Clean up a few minor style(9) nits. Use DEVMETHOD_END.
|
265254 |
03-May-2014 |
loos |
Fix the tinderbox armv6/arm build failure.
VYBRID code depends on FDT.
|
265207 |
02-May-2014 |
ganbold |
Switch to use arm_devmap_add_entry() to setup static device mapping.
Approved by: stas (mentor)
|
265158 |
30-Apr-2014 |
peter |
List LINT* instead of completely removing svn:ignore.
|
265156 |
30-Apr-2014 |
imp |
This was copied to IMX6, which has since evolved further. Remove this as it is no longer needed.
|
265155 |
30-Apr-2014 |
imp |
Omit from the universe build all config files tagged with #NO_UNIVERSE. Many of these config files are important examples, but add little to no regresive value to the intended purpose of UNIVERSE. We now build over 120 kernels during universe. There's really little to no value to this over building say 60 or even 30 of them (either is still a way too big number). This is especially true for kernels that are nothing more than including a common base and adding a static DTB file. Start by pruning 1/3 of the arm kernels that add little regresion value.
|
265151 |
30-Apr-2014 |
peter |
Nuke svn:ignore on the conf directory - This makes sense for the compile directory, but not so much for here as it's including ignores for things like GENERIC etc.
Submitted by: markm
|
265148 |
30-Apr-2014 |
ian |
Convert the Zynq SoC support to the new routines for static device mapping.
|
265111 |
29-Apr-2014 |
ian |
Make this declaration into a proper function prototype.
|
265099 |
29-Apr-2014 |
ian |
Add SMP support for Zedboard.
Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>
|
265036 |
28-Apr-2014 |
ian |
Don't use multiprocessing-extensions instruction on processors that don't support SMP.
Submitted by: loos@ Pointy hat to: me
|
265035 |
27-Apr-2014 |
ian |
Move duplicated code to print l2 cache config into the common code.
|
265025 |
27-Apr-2014 |
ian |
Explain why wbinv_all is SMP-safe in this case, and add a missing l2 cache flush. (Either it was missing here, or it isn't needed in the minidump case. Adding it here seems like the safer path to consistancy.)
|
265024 |
27-Apr-2014 |
ian |
Flush and invalidate caches on each CPU as part of handling IPI_STOP.
Flushing the caches is required before doing a panic dump, but ARM doesn't provide a flavor of flush that gets broadcast to other cores. However, all cores except one are stopped before doing a dump, so this works around the lack of a global flush/invalidate by doing it locally on each CPU as part of stopping.
Discussed with: cognet@
|
265023 |
27-Apr-2014 |
ian |
There is no difference between IPI_STOP and IPI_STOP_HARD on ARM, so map them both to the same interrupt number like other arches do.
|
265020 |
27-Apr-2014 |
ian |
Remove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed.
This was added ca. 2004 for the purpose of ensuring the caches were in the right state after the debugger set a breakpoint. kdb_cpu_sync_icache() was added in 2007 to handle that situation, and now the wbinv_all is actually harmful because the operation isn't broadcast to other cores.
|
264994 |
27-Apr-2014 |
ian |
Provide a proper armv7 implementation of icache_sync_all rather than using armv7_idcache_wbinv_all, because wbinv_all doesn't broadcast the operation to other cores. In elf_cpu_load_file() use icache_sync_all() and explain why it's needed (and why other sync operations aren't).
As part of doing this, all callers of cpu_icache_sync_all() were inspected to ensure they weren't relying on the old side effect of doing a wbinv_all along with the icache work.
|
264990 |
26-Apr-2014 |
ian |
Call cpu_icache_sync_range() rather than sync_all since we know the range and flushing the entire icache is needlessly expensive.
|
264984 |
26-Apr-2014 |
scottl |
Retire smp_active. It was racey and caused demonstrated problems with the cpufreq code. Replace its use with smp_started. There's at least one userland tool that still looks at the kern.smp.active sysctl, so preserve it but point it to smp_started as well.
Discussed with: peter, jhb MFC after: 3 days Obtained from: Netflix
|
264977 |
26-Apr-2014 |
ian |
Stop calling imx51_ccm_foo() clock functions from imx6 code. Instead define a few imx_ccm_foo() functions that are implemented by the imx51 or imx6 ccm code. Of course, the imx6 ccm code is still more a wish than reality, so for now its implementations just return hard-coded numbers.
|
264702 |
20-Apr-2014 |
ian |
Remove uncessary cache and TLB maintenance ops.
- These were needed on armv4/5 (VIVT cache), not needed on armv6. - The wbinv_all call can't be used on SMP systems; cache operations by set/way are not broadcast to other cores. - The TLB maintenance operations needed for pmap_growkernel() happen in pmap_grow_l2_bucket(), so there's no need to flush all TLB entries at the end. - There may not be any need for the TLB flush at the beginning of pmap_release(), but it's left in for now pending more investigation.
Pointed out by: Svatopluk Kraus <onwahe@gmail.com> Discussed with: cognet@
|
264251 |
08-Apr-2014 |
rpaulo |
Updates to i.MX53:
* Define support for the SDHCI driver, although it doesn't work yet * Fix the memory mappings for IPU [1]
Reviewed by: ray [1]
|
264219 |
07-Apr-2014 |
rpaulo |
Move sys/arm/econa to sys/arm/cavium/cns11xx.
|
264203 |
06-Apr-2014 |
ian |
Tell VM we now have ARM platforms with physically discontiguous memory.
|
264197 |
06-Apr-2014 |
loos |
Partially revert r264083.
While it is the recommended initialization procedure, it hangs on the reset of the second GPIO module on pandaboard.
Removes the module reset for now as more investigation would be needed.
Reported by: jceel
|
264183 |
06-Apr-2014 |
ian |
Add a couple more required TLB flushes.
These should have been part of r264129, they are part of the overall set of changes that got several weeks of testing. I must have fumbled them while merging various patchsets.
|
264180 |
05-Apr-2014 |
rpaulo |
Follow files.imx51 and add vt support.
|
264160 |
05-Apr-2014 |
rpaulo |
Remove code under PMAP_CACHE_VIVT that is not compiled anymore.
This is for ARMv4/ARMv5 and it doesn't belong in ARMv6 code.
Reviewed by: ian
|
264153 |
05-Apr-2014 |
loos |
- Fix the setup of interrupts for banks 2 and 3 on AM335x.
On AM335x each one of the four GPIO banks has two physical interrupt lines, so we now allocate resources and setup our interrupt handler for all the (8) available interrupts.
On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6 banks, 6 interrupts), but there are two set of registers where the first one is used to setup the delivery of interrupts to the MPU and the second set, setup the delivery of interrupts to the DSP.
On AM335x, each set of registers controls each one of the interrupt lines.
- Remove nonexistent registers for OMAP4 and AM335x, replace their use with the correct ones for these SoCs.
- Remove stray whitespace.
Based on OMAP3, OMAP4 and AM335x TRMs.
Tested on Beaglebone-black.
|
264150 |
05-Apr-2014 |
br |
Correct the end address of the video frame buffer. This fixes problem that sometimes display suddenly goes blank.
|
264138 |
04-Apr-2014 |
ian |
Enable SMP for Pandaboard.
|
264137 |
04-Apr-2014 |
ian |
Switch wandboards over to the common IMX6 kernel config, which has SMP enabled. Also switch IMX6 to use SCHED_ULE.
The now-unreferenced WANDBOARD.common config will be deleted after giving folks who may be including it a heads-up to switch to IMX6.
|
264135 |
04-Apr-2014 |
ian |
We don't support any ARM systems with an ISA bus and don't need a freelist of memory to support ISA addressing limitations.
|
264130 |
04-Apr-2014 |
ian |
Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page(). This is performance enhancement rather than bugfix.
|
264129 |
04-Apr-2014 |
ian |
Fix TLB maintenance issues for armv6 and armv7.
- Add cpu_cpwait to comply with the convention. - Add missing TLB invalidations, especially in pmap_kenter & pmap_kremove with distinguishing between D and ID pages. - Modify pmap init/bootstrap invalidations to ID, just to be safe. - Fix TLB-inv and PTE_SYNC ordering.
This combines changes submitted by ian@, cognet@, and Wojciech Macek, which have all been tested together as a unit.
|
264128 |
04-Apr-2014 |
ian |
Fix TTB set operation for armv7.
Perform sychronization (by "isb" barrier) after TTB is set. This is done to ensure that TLB invalidation always executes after TTB modification and operates on valid CP15 data (per specification).
Submitted by: Wojciech Macek <wma@semihalf.com> Reviewed by: ian@, cognet@
|
264120 |
04-Apr-2014 |
ian |
Flag several sysctl variables as tunables.
|
264119 |
04-Apr-2014 |
ian |
Adjust the comments about translating clock divisor bits to match recent code changes.
|
264103 |
04-Apr-2014 |
br |
Remove unused prototype.
|
264102 |
04-Apr-2014 |
ian |
Let's try having just one mmc/sd controller driver.
Pointed out by: gjb
|
264101 |
04-Apr-2014 |
ian |
Use the sdhci driver for Pandaboard.
|
264100 |
04-Apr-2014 |
ian |
Switch OMAP4 (Pandaboard et. al.) to use the ti_sdhci driver.
|
264099 |
04-Apr-2014 |
ian |
Fix the logic for translating between MMCHS and SDHCI clock divisors.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
264096 |
04-Apr-2014 |
ian |
Various fixes to the ti_sdhci driver, mostly to make it work on Pandaboard.
- Don't allow high-speed mode on OMAP4 due to hardware erratum. - Check the proper bit in the status register when waiting for the controller to come out of reset. - Add handling for the "non-removable" fdt property by always returning "card is present" status. - Add the non-removable property for the MMC card on a Beaglebone Black. - Add the non-removable property for Pandaboard as a workaround.
For Pandaboard the card detect pin is handled by the twl6030 fpga device which gets an interrupt on pin change and then has to query the fpga for the actual status. We don't have code to do that yet.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
264094 |
04-Apr-2014 |
ian |
Actually save the clock frequency retrieved from fdt data. I fumbled this when I converted getprop to getencprop.
Submitted by: Thomas Skibo Pointy hat to: ian
|
264083 |
03-Apr-2014 |
loos |
Move the GPIO bank initialization to a new function to make easier to detect errors.
Reset the GPIO module during the initialization. This is guaranteed to be the same as a hardware reset. Tested on AM335x (BBB) and checked against the omap3 and omap4 TRM.
Do a better job freeing resources when there are errors and on ti_gpio_detach().
|
264065 |
03-Apr-2014 |
br |
- Setup both secure and non-secure timer IRQs. We don't know our ARM security state, so one of them will operate. - Don't set frequency, since it's unpossible in non-secure state. Only rely on DTS clock-frequency value or get clock from timer.
Discussed with: ian, cognet
|
264057 |
02-Apr-2014 |
ian |
Rework the cpu frequency management code for imx6.
This adds the concept of "operating points," combinations of frequency and voltage at which the cpu is known to work correctly. Some day these should come from FDT data, but for now the table is hard-coded.
This also allows tuning the min and max operating frequencies. The min frequency is what the thermal management code will slow down to if the core temperature gets too high. The max frequency is what gets used if the temperature is okay.
Normally the max cannot be set higher than the value burned into the ocotp fuses as the chip's rated max, but there is now a new sysctl+tunable cpu_overclock_enable; when set to non-zero it allows raising the frequency above the ocotp value: USE WITH CARE! (At least one of my imx6 boards has a cpu whose ocotp values never got set correctly; they claim a max of 792mhz, but the physical markings on the chip say it's good to 1ghz.)
Because all these values affect the entire SoC, there is a new sysctl node, hw.imx6, where all these values live. The values that are currently under dev.imx6_anatop.0 should probably move to hw.imx6 too, because "anatop" doesn't even mean anything to me, let alone to an end user.
|
264056 |
02-Apr-2014 |
ian |
Switch imx6 to using the mpcore per-cpu event timers, but continue to use the GPT timer, which is fixed-frequency, as a timecounter.
|
264052 |
02-Apr-2014 |
ian |
Don't call sdhci_init_slot() until after handling the FDT properties related to detecting card presence. This actually makes no difference now, but will when we get support for gpio-based card detection.
|
264051 |
02-Apr-2014 |
ian |
Trivial changes/forced-commit to document previous change r264050 whose description was eaten by the dog (or an editor crash or something).
Add variable-frequency support to the arm mpcore eventtimer driver.
This allows a platform's early init code to tell the mpcore driver that the clock frequency can vary. That causes the mpcore driver to register an eventtimer, but not a timecounter. The platform has to provide a time counter using some other fixed-frequency clock, but can still use the per-cpu goodness of the mpcore hardware for event timers.
When the platform support code does something to change the frequency of the CPU clocks (power saving, thermal management) it must tell the mpcore driver code about it using arm_tmr_change_frequency().
|
264050 |
02-Apr-2014 |
ian |
|
264049 |
02-Apr-2014 |
ian |
Disable the timer and clear any pending bit, then setup the new counter register values, then restart the timer. This prevents a situation where an old event fires just as we're about to load a new value into the timer, when the start routine is called to change the time of the current event.
Also re-nest the parens properly for casting the result of converting time and frequency to a count. This doesn't actually change the result of the calcs, but will some day prevent a loss-of-precision warning on the assignment, if that warning gets enabled.
|
264019 |
01-Apr-2014 |
loos |
Fix some of the style(9) problems on ti_gpio. Note that this commit does not fix all the style(9) problems, but will open room for the next commits.
Remove redundant code and declarations.
No functional changes.
|
263998 |
01-Apr-2014 |
tijl |
Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions.
MFC after: 2 weeks
|
263982 |
01-Apr-2014 |
br |
Add Cortex-A15 cpu id revisions.
|
263981 |
01-Apr-2014 |
br |
Release i2c bus on detach.
|
263936 |
30-Mar-2014 |
br |
Add support for keyboard used in Samsung Chromebook (ARM machine)
Support covers device drivers for: - Interrupt Combiner - gpio/pad, External Interrupts Controller (pad) - I2C Interface - Chrome Embedded Controller - Chrome Keyboard
Also: - Use new gpio dev class in EHCI driver - Expand device tree information
|
263935 |
30-Mar-2014 |
br |
Add lowercase postfix, so SoC-common file will be ignored by tinderbox.
|
263934 |
30-Mar-2014 |
br |
Directly call kmem_alloc_contig to allocate framebuffer memory and pass VM_MEMATTR_UNCACHEABLE (no-cache, no-buffer). This fixes screen refreshing problem when data is updated too slowly.
Discussed with: ian
|
263933 |
30-Mar-2014 |
br |
- Merge SoC-common parts - Enable iicbus device
|
263914 |
29-Mar-2014 |
andrew |
VFP fixes/cleanups for ARM11: * Save the required VFP registers on context switch. If the exception bit is set we need to save and restore the FPINST register, and if the fp2v bit is also set we need to save and restore FPINST2. * Move saving and restoring the floating point control registers to C. * Clear the fpexc exception and fp2v flags on a floating-point exception. * Signal a SIGFPE if the fpexc exception flag is set on an undefined instruction. This is how the ARM core signals to software there is a floating-point exception.
|
263913 |
29-Mar-2014 |
andrew |
Initialise fpscr to a sane value when we create the pcb. This sets NaNs to be the default NaN and for denormalised numbers to be flushed to zero.
|
263910 |
29-Mar-2014 |
andrew |
Add more flags for the fpexc register from the ARM1176JZF-S Manual
|
263711 |
25-Mar-2014 |
ganbold |
Switch to my freebsd.org emal address in copyright.
Approved by: stas (mentor)
|
263698 |
25-Mar-2014 |
ganbold |
Add code for enabling second CPU core for A20 SoC. Enable SMP on Cubieboard2.
Approved by: stas (mentor)
|
263693 |
24-Mar-2014 |
loos |
Adds the ADC driver for TI AM3xxx SoC family.
The ADC has a 12bit resolution and its raw output can be read via sysctl(8) interface.
The driver allows the setup of ADC clock, samples average and open delay (the number of clock cycles to wait before start the conversion).
The TSC_ADC module is set in the general purpose mode (no touchscreen support).
Tested on Beaglebone-black.
Written based on AM335x TRM.
Reviewed by: rpaulo Approved by: adrian (mentor) Tested by: me, Brian J. McGovern, Sulev-Madis Silber (ketas)
|
263679 |
24-Mar-2014 |
andrew |
Move an else case that was missed in r263676
|
263676 |
23-Mar-2014 |
andrew |
Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are identical this allows us to build for both v6 and v7 together.
|
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.
|
263620 |
22-Mar-2014 |
bdrewery |
Rename global cnt to vm_cnt to avoid shadowing.
To reduce the diff struct pcu.cnt field was not renamed, so PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in kvm(3) and vmstat(8). The goal was to not affect externally used KPI.
Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the the global cnt variable.
Exp-run revealed no ports using it directly.
No objection from: arch@ Sponsored by: EMC / Isilon Storage Division
|
263431 |
20-Mar-2014 |
br |
Rename mct and ehci drivers files to match common naming.
|
263430 |
20-Mar-2014 |
br |
Remove printf's.
|
263427 |
20-Mar-2014 |
br |
Add support for Samsung Chromebook (ARM Cortex A15 machine).
|
263426 |
20-Mar-2014 |
br |
Add driver for Display Controller.
|
263425 |
20-Mar-2014 |
br |
- Add display-related and clk devices to the tree - Prevent resources intersection with EHCI driver
|
263424 |
20-Mar-2014 |
br |
Disable debugging by default.
|
263301 |
18-Mar-2014 |
imp |
In kernel config files, it is supposed to be 'options<space><tab>' not 'options<tab><tab>', per long standing (but recently not so strictly enforced) convention.
|
263251 |
16-Mar-2014 |
ian |
Use armv7 TLB flush code, not arm11, for cortex-a processors.
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.
|
263250 |
16-Mar-2014 |
ian |
Use the same terminology as the ARM docs in comments. No functional changes.
|
263245 |
16-Mar-2014 |
imp |
Make all the comments '# ' and align to same column. This fixes the rampently incosnsitent usage which made cut and paste from one file to another look ugly.
|
263233 |
16-Mar-2014 |
rwatson |
Update kernel inclusions of capability.h to use capsicum.h instead; some 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
|
263207 |
15-Mar-2014 |
imp |
Fix wandboard to include tmpfs, mbr and bsd labels.
PR: 187606 Submitted by: Takanori Sawada
|
263059 |
11-Mar-2014 |
imp |
Delete stray clause 3 (Advertising clause) and renumber while i'm here.
Approved by: alc@
|
263057 |
11-Mar-2014 |
ian |
Remove #include <machine/asmacros.h> from files that don't need it.
|
263056 |
11-Mar-2014 |
ian |
Remove the unreferenced DATA() macro. That leaves only GET_CURTHREAD_PTR() 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).
|
263036 |
11-Mar-2014 |
imp |
Remove clause 3 (advertising clause), per regent's letter.
|
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 |
10-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).
|
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.
|
262952 |
09-Mar-2014 |
ian |
The arm exception entry points currently vector through a function pointer 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.
|
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.
|
262949 |
09-Mar-2014 |
ian |
When a thread begins life it doesn't own the VFP hardware state on any cpu.
|
262948 |
09-Mar-2014 |
ian |
Always call vfp_discard() on thread death, not just when the VFP is 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
|
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.
|
262941 |
09-Mar-2014 |
ian |
Rework the VFP code that handles demand-based save and restore of state.
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
|
262940 |
09-Mar-2014 |
imp |
Remove bogus define that causes compile errors. Most of the defines for SAM9X are going away soonish anyway (once FDT works), but until then...
|
262935 |
09-Mar-2014 |
ian |
Follow r262916 with one more config file that references a renamed common.c
|
262925 |
08-Mar-2014 |
imp |
Move AIC related stuff to own file.
|
262924 |
08-Mar-2014 |
imp |
Properly round on unmapping.
|
262923 |
08-Mar-2014 |
imp |
Make at91_soc_id() public.
|
262919 |
08-Mar-2014 |
imp |
Add commented out dts for sam9260ek as well as early printf support.
|
262916 |
08-Mar-2014 |
imp |
Move all the files named foo/common.c to foo/foo_common.c, as 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).
|
262905 |
07-Mar-2014 |
ian |
Strip arm/conf/DEFAULTS down to just items that are mandatory for running the architecture. Move the other contents into each of the individual config files.
Requested by: imp
|
262903 |
07-Mar-2014 |
ian |
Fix the arm sys_sigreturn(): its argument is a struct ucontext, not a 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
|
262891 |
07-Mar-2014 |
br |
- Export panel info to DTS - Reset all the layers before setup first one - Enable display
|
262885 |
07-Mar-2014 |
br |
Add driver for Port control and interrupts (PORT).
PORT is responsible for external interrupts management, so move IRQ lines from GPIO driver.
|
262877 |
07-Mar-2014 |
ian |
Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configs that have it individually. Concensus on freebsd-arm@ is that it should be included in all ARM kernels.
|
262870 |
06-Mar-2014 |
cognet |
When calculating the MPU freq, make sure not to overflow by using a uint64_t.
PR: arm/187223 Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
262712 |
03-Mar-2014 |
ian |
Use the standard __used macro instead of a bare __attribute__.
Submitted by: bde
|
262711 |
03-Mar-2014 |
ganbold |
Add EMAC and SRAM controller entries to FDT. Add EMAC device to kernel config files and enable EMAC, SRAM drivers for build.
Approved by: stas (mentor)
|
262710 |
03-Mar-2014 |
ganbold |
Add EMAC 10/100 Ethernet controller driver for A10/A20. 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)
|
262709 |
03-Mar-2014 |
ganbold |
Add Static Random Access Memory controller driver for A10/A20. A10/A20's SRAM is used by devices, such as CPU, EMAC, for extra fast memory or as cache.
Approved by: stas (mentor)
|
262708 |
03-Mar-2014 |
ganbold |
Add gpio and clock bits for A10/A20's EMAC ethernet controller driver, such as: - EMAC gpio configuration - EMAC clock activation
Approved by: stas (mentor)
|
262696 |
02-Mar-2014 |
ian |
Add __attribute__((used)) so that the delay implementation doesn't get optimized away as unreferenced, causing linker errors when trying to resolve the weak reference to the missing function.
|
262695 |
02-Mar-2014 |
ian |
Add a tunable to set the number of active cores, and enable SMP by default.
|
262600 |
28-Feb-2014 |
imp |
tcb device for fdt
|
262599 |
28-Feb-2014 |
imp |
shdwc device for fdt
|
262598 |
28-Feb-2014 |
imp |
Add device node for SDRAMC device. Currently just claims device's resources.
|
262587 |
28-Feb-2014 |
ian |
Add an armv7 implementation of cpu_sleep(). The arm11/armv6 implementation 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.
|
262585 |
28-Feb-2014 |
ian |
Add some rudimentary voltage control to go with the rudimentary frequency control. If we have to scale back the frequency due to temperature, it will help to lower the voltage as well.
|
262584 |
28-Feb-2014 |
ian |
Supply a DELAY() implementation via weak linkage, so that SoC-specific code can supply a better implementation. A SoC with variable CPU frequency is likely to use a fixed-frequency timer for DELAY() (but still use the mpcore private timers as eventtimers).
Also remove spaces from the eventtimer and timecounter names.
|
262583 |
28-Feb-2014 |
ian |
All our current ARM multi-core systems have all cores in one package with a shared L2 cache, reflect that in the common cpu_topo() routine.
|
262581 |
27-Feb-2014 |
ian |
Initialize the Low Power Mode bits to keep the ARM cores running during WFI.
|
262568 |
27-Feb-2014 |
br |
Do not setup interrupt handler (polling is used).
|
262552 |
27-Feb-2014 |
br |
Add driver for Inter-Integrated Circuit (I2C).
|
262548 |
27-Feb-2014 |
imp |
Style(9) nit: Use tab here.
|
262534 |
26-Feb-2014 |
ian |
Replace many pasted identical definitions of cpu_initclocks() with a common implementation in arm/machdep.c. Most arm platforms either don't need to do anything, or just need to call the standard eventtimer init routines. A generic implementation that does that is now provided via weak linkage. Any platform that needs to do something different can provide a its own implementation to override the generic one.
|
262531 |
26-Feb-2014 |
ian |
Minor tweaks to the imx GPT timer... - Don't use spaces or dots in the eventtimer or timecounter names. They turn into sysctl node names, and it's just confusing. - Use comparator #3 instead of #1 for one-shot events. There's an extra 1-cycle penalty in the hardware for accessing the registers for comparator 1, no point in paying that penalty. - Lower the quality of the eventtimer from 1000 to 800, because the device can't support PERCPU timers and some other device in the system may be able to provide that.
|
262483 |
25-Feb-2014 |
br |
- Pin configuration is a complete iomux register now and includes drive strength, pull mode, mux mode, speed, etc. - Add i2c devices to the tree - Add IPG clock
|
262482 |
25-Feb-2014 |
ian |
Invalidate the SCU cache tag ram on all 4 cores, not just 1-3. I misread Juergen's original code, it was doing all 4 cores. Also remove the L2 cache invalidate operation, this code runs before L2 is activated.
|
262456 |
24-Feb-2014 |
br |
Add support for Quartz Module.
Quartz is a tiny module utilized Freescale VF6xx system-on-chip and development kit produced by Device Solutions.
Quartz is available in a form of LGA (38x38x2mm) or as a module with high-density connectors.
Sponsored by: Device Solutions
|
262427 |
24-Feb-2014 |
ian |
Add the bits needed to run SMP on imx6.
The 'option SMP' isn't added to the kernel config yet; people wanting to test this have to opt-in for now.
|
262426 |
24-Feb-2014 |
ian |
Invalidate caches immediately upon entry to init_secondary(). Also set the Bufferable bit in the PDE entries of the secondary processor startup pagetables.
The caches really need to be invalidated even earlier than this, but this is a big step in the right direction. The invalidate needs to happen before the MMU is enabled, which means it has to be called from asm code that's running with physical addressing. Fixing that will be handled in a future change.
|
262420 |
24-Feb-2014 |
ian |
Add a new cache maintenance function, idcache_inv_all, to the table, and implementations for each of the chips we support. Most chips up through armv6 can use the armv4 implementation which has a single coprocessor opcode for this operation. The rather more complex armv7 implementation comes from netbsd.
|
262419 |
24-Feb-2014 |
ian |
Add an ident line.
|
262413 |
23-Feb-2014 |
ian |
Actually set the proper bit to indicate TTB shared memory.
Submitted by: Juergan Weiss
|
262411 |
23-Feb-2014 |
ian |
If the L2 cache type is PIPT, pass a physical address for a flush.
While this is technically more correct, I don't think it much matters, because the only thing in the tree that calls cpu_flush_dcache() is md(4) and I'm > 99% sure it's bogus that it does so; md has no ability to do anything that can perturb data cache coherency.
|
262409 |
23-Feb-2014 |
ian |
Move the declaration for mpentry() into a header file instead of pasting it into a bunch of different .c files. Remove declarations for the unused mptramp() function from everywhere except AramadaXP (and I think it's really not used there either, because the code that references it appears to be insanely does-nothing in nature).
|
262408 |
23-Feb-2014 |
ian |
Eliminate an unused-var warning by wrapping #if 0 around some tables of values that were probably entered "for completeness" from a datasheet, and for all I know may be useful/necessary some day.
|
262393 |
23-Feb-2014 |
ian |
Fix a typo _IMX51_TZICRREG_H_ -> _IMX51_TZICREG_H_ (extra R)
|
262355 |
23-Feb-2014 |
ian |
Don't force bootverbose on anymore, it can be set from ubldr now.
|
262354 |
23-Feb-2014 |
ian |
Create a generic IMX6 kernel config. This is based on the existing WANDBOARD.common config, but with the freescale-specific optons and devices all together at the bottom now. In addition to reformatting and shuffling lines around, two new options are added because they're now known to work, VFP and FREEBSD_BOOT_LOADER.
This config does not include any static DTB, it requires that u-boot provide a DTB (or a custom kernel config can compile one in).
This will supercede all the existing WANDBOARD* configs, but those will be left around for a while to help people transition their customized configs to include this new one instead.
|
262353 |
23-Feb-2014 |
ian |
Add the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from ubldr will actually get used.
|
262280 |
21-Feb-2014 |
ian |
Add basic cpu frequency control and temperature monitoring to imx6_anatop.
The temperature monitor device is enabled to sample the die temperature at 16hz. The temperature is published via sysctl. A callout routine at 10hz monitors the temperature and throttles back the cpu if the temperature goes over a user-settable throttle point (by default 10C less than the critical high-point temperature for the chip). The hardware is supposed to be able to deliver an interrupt when the temperature exceeds a settable limit, but the interrupt never arrives so for now a callout does the job.
At attach time we read the maximum cpu frequency the chip is allowed to run at and the cpu is set to run at that speed. It's reported at attach time. A sysctl variable reports the current speed when queried.
New sysctl values:
dev.imx6_anatop.0.cpu_mhz: 984 dev.imx6_anatop.0.temperature: 37.9C dev.imx6_anatop.0.throttle_temperature: 95.0C
Steven Lawrance did the initial heavy lifting on this, but I changed enough stuff that I'm the one to blame if anything breaks.
Submitted by: Steven Lawrance <stl@koffein.net>
|
262278 |
21-Feb-2014 |
imp |
Remove bogus blank line.
|
262244 |
20-Feb-2014 |
ian |
Add early printf support, wrapped in #if 0 because it's only rarely needed.
|
262123 |
17-Feb-2014 |
ian |
Give the fdt helper routines static linkage since no global definition of them is provided anywhere. (gcc was nice enough to warn about this, clang didn't for some reason.)
|
262020 |
17-Feb-2014 |
jhay |
Make it possible to use the env kernel config file option for AVILA and CAMBRIA boards that does not use loader to load the kernel. This is basically how it was done for i386. This way tunables can also be set. For example in config file:
env "/conf/AVILA.env"
And in AVILA.env:
vfs.unmapped_buf_allowed=0
MFC after: 2 weeks
|
261987 |
16-Feb-2014 |
br |
- Decrease buffer size. - Handle eDMA interrupt on running channel only.
|
261982 |
16-Feb-2014 |
br |
Add driver for Synchronous Audio Interface (SAI).
SAI supports full-duplex serial interfaces with frame synchronization such as I2S, AC97, TDM, and codec/DSP interfaces.
|
261957 |
16-Feb-2014 |
ian |
Oops, remove some dregs of debugging.
|
261956 |
16-Feb-2014 |
ian |
Make it possible to access the ocotp registers before the ocotp device is attached, by establishing a temporary mapping of the registers when necessary. This is a temporary measure to keep progress moving; in the long run we need better control over the order in which devices attach (better than "the order they appear in the fdt dts source").
|
261947 |
15-Feb-2014 |
ian |
Sweep up a couple crumbs left over from the imx6->fsl renaming.
|
261946 |
15-Feb-2014 |
ian |
It turns out Freescale cleverly made the ocotp device compatible across several different families of SoCs, so move it to the freescale directory and prefix everything with fsl rather than imx6.
|
261939 |
15-Feb-2014 |
ian |
Convert the "R1B fix" from a busy-loop in the interrupt handler to a callout.
|
261938 |
15-Feb-2014 |
ian |
Add a driver to provide access to imx6 on-chip one-time-programmble data.
Submitted by: Steven Lawrance <stl@koffein.net>
|
261922 |
15-Feb-2014 |
zbb |
Handle pmap_enter() on already promoted mappings for ARMv6/v7
Attempt to demote the superpage if trying to pmap_enter() on one. Panic only when the particular superpage should no longer exist for that pmap and address.
|
261921 |
15-Feb-2014 |
zbb |
Remove spurious assertion from pmap_extract_locked() on ARM
The condition under assertion is no longer valid since superpages support is operating on section mappings.
|
261920 |
15-Feb-2014 |
zbb |
Avoid redundant superpage promotion attempts on ARM
Because pmap_enter_locked() is called from few different functions some redundancy in superpage promotion attempts can be observed. Hence, avoid promotion in pmap_enter_object() (if the object can be mapped by superpage it will be handled by pmap_enter_object() itself) and also do not waste time in pmap_enter_quick(). From now on the promotion will be performed only in pmap_enter().
|
261919 |
15-Feb-2014 |
zbb |
Fix superpage promotion on ARM with respect to RO/RW and wired attributes
It was possible to create RW superpage mapping even if the base pages were RO due to wrong setting of the prot flag passed to pmap_map_section(). Promotion attempt should be canceled in case of attributes mismatch between any two base pages. Since we still use pv_flags to maintain permission to write (PVF_WRITE) and wired status (PVF_WIRED) for a page, it is also necessary to take those variables into account.
|
261918 |
15-Feb-2014 |
zbb |
Ensure proper TLB invalidation on superpage promotion and demotion on ARM
Base pages within newly created superpage need to be invalidated so that new mapping is "visible" immediately after creation.
|
261917 |
15-Feb-2014 |
zbb |
Always clear L1 PTE descriptor when removing superpage on ARM
Invalidate L1 PTE regardles of existance of the corresponding l2_bucket. This is relevant when superpage is entered via pmap_enter_object() and will fix crash on entering page in place of not properly removed superpage.
|
261884 |
14-Feb-2014 |
brueffer |
Correct the order of arguments to mtx_init().
PR: 186701 Submitted by: Takanori Sawada <tak.swd at gmail.com> MFC after: 2 weeks
|
261855 |
13-Feb-2014 |
andrew |
Allow the kernel to be loaded at any 1MiB address. This requirement is because we use the 1MiB section maps as they only need a single pagetable.
To allow this we only use pc relative loads to ensure we only load from physical addresses until we are running from a known virtual address.
As a side effect any data from before or 64MiB after the kernel needs to be mapped in to be used. This should not be an issue for kernels loaded with ubldr as it places this data just after the kernel. It will be a problem when loading directly from anything using the Linux ABI that places the ATAG data outside this range, for example U-Boot.
|
261848 |
13-Feb-2014 |
ian |
Remove a couple obsolete function declarations.
|
261846 |
13-Feb-2014 |
loos |
Make the gpioled(4) work out of the box on BBB.
Add gpioled(4) to BEAGLEBONE kernel and add the description of the four on-board leds of beaglebone-black to its DTS file.
Approved by: adrian (mentor, implicit)
|
261845 |
13-Feb-2014 |
loos |
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this change the gpio children can be described as directly connected to the GPIO controller without the need of describing the OFW GPIO bus itself on the DTS file.
With this commit the OFW GPIO bus is fully functional on BBB and RPi.
GPIO controllers which want to use the OFW GPIO bus will need similar changes.
Approved by: adrian (mentor, implicit)
|
261841 |
13-Feb-2014 |
imp |
Honor the disabled status by only grabbing resources and returning when running under FDT.
|
261837 |
13-Feb-2014 |
imp |
Fix board ID too...
|
261836 |
13-Feb-2014 |
imp |
Fix board name.
|
261826 |
13-Feb-2014 |
br |
Add function for configuring PLL4 (Audio) clock frequency output.
|
261817 |
13-Feb-2014 |
ian |
Add handling of standard "non-removable" property, and also some workaround code so that if card detect is wired to a gpio pin, for now we just treat it the same as non-removable (because there isn't a gpio driver yet).
|
261815 |
13-Feb-2014 |
ian |
Write translation code for the SDHCI_PRESENT_STATE register. Freescale moved some bits around in their version of the register, adjust things so that the sdhci code sees the standard layout.
|
261810 |
12-Feb-2014 |
ian |
Use the same logic as the x86 platforms to avoid trying perform fault fixup while in a critical section or while holding a non-sleepable lock.
Reviewed by: cognet
|
261808 |
12-Feb-2014 |
ian |
Use the right symbols for determining arm architecture. Include the necessary header file which has the new FAULT_WNR symbol defined in it.
|
261803 |
12-Feb-2014 |
ian |
On armv6 and later, use the WriteNotRead bit of the fault status register to decide what protections are required by the faulting access. The old code disassembled the faulting instruction, and there are a lot of new instructions that aren't handled. The old code is still used for armv4/5 which doesn't have the WNR bit)
|
261789 |
12-Feb-2014 |
imp |
Convert two while(1); statements into proper panics. Soon, kernels with early printf support will print this info... For kernels without, the observed behavior will be the same as it is now...
|
261786 |
12-Feb-2014 |
ian |
Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf() routine, now a platform can provide a pointer to an early_putc() routine which is used instead of cn_putc(). Control can be handed off from early printf support to standard console support by NULLing out the pointer during standard console init.
This leverages all the existing error reporting that uses printf calls, such as panic() which can now be usefully employed even in early platform init code (useful at least to those who maintain that code and build kernels with EARLY_PRINTF defined).
Reviewed by: imp, eadler
|
261783 |
11-Feb-2014 |
imp |
Swap PA and VA so they are in the right registers...
|
261779 |
11-Feb-2014 |
ian |
Check in the "real" board_tsc4370 file in place of the stubbed out one.
Real means the one TSC / Symmetricom / Microsemi actually uses on their 4370 and other rm9200 boards. This code demonstrates a variety of useful things board init code can do, including adjusting the master clock frequency.
|
261778 |
11-Feb-2014 |
br |
Disable debugging by default.
|
261698 |
09-Feb-2014 |
ian |
Update legacy platforms to use new arm_physmem helper routines.
|
261690 |
09-Feb-2014 |
ian |
If someone tries to boot a generic ATMEL kernel that has no board_init() routine compiled in, print a friendly error message about it rather than mysteriously hanging while trying to init 4GB of nonexistant ram.
|
261689 |
09-Feb-2014 |
imp |
Add FDT attachment.
|
261688 |
09-Feb-2014 |
imp |
FDT attachment...
|
261687 |
09-Feb-2014 |
imp |
Add TWI attachment for FDT. We're only matching the SAMG20 device for now, others to follow.
|
261686 |
09-Feb-2014 |
imp |
Add FDT attachment.
|
261685 |
09-Feb-2014 |
imp |
Add FDT attachment. Flag lost functionality with FDT_HACKS so we can find it later.
|
261684 |
09-Feb-2014 |
imp |
Add FDT attachment.
|
261683 |
09-Feb-2014 |
imp |
Add FDT attachment, plus minor code shuffle.
|
261682 |
09-Feb-2014 |
imp |
Add FDT attachment.
|
261681 |
09-Feb-2014 |
imp |
Add FDT matching code.
|
261677 |
09-Feb-2014 |
ian |
Add some extra debugging output when DEBUG is defined.
|
261676 |
09-Feb-2014 |
ian |
Fix the exclude-region clipping logic for the edge-trim case.
|
261663 |
09-Feb-2014 |
andrew |
Pass the pagetable used from locore.S to initarm to allow it to map data in as required.
|
261657 |
09-Feb-2014 |
ian |
No need to set physmem in each initarm() instance anymore, it's handled in common code now.
|
261656 |
09-Feb-2014 |
ian |
Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.
Pointed out by: alc
|
261651 |
09-Feb-2014 |
andrew |
Remove the now unused MMU_INIT macro.
|
261649 |
09-Feb-2014 |
ian |
It turns out a global variable is the only straightforward way to communicate the kernel's physical load address from where it's known in initarm() into cpu_mp_start() which is called from non-arm code and takes no parameters.
This adds the global variable and ensures that all the various copies of initarm() set it. It uses the variable in cpu_mp_start(), eliminating the last uses of KERNPHYSADDR outside of locore.S (where we can now calculate it instead of relying on the constant).
|
261648 |
09-Feb-2014 |
ian |
Calculate the kernel's load address from the PC in the elf / gzip trampoline instead of relying on KERNPHYSADDR as a compile-time constant.
|
261646 |
09-Feb-2014 |
ian |
Replace compile-time constant KERNPHYSADDR with abp_physaddr (determined at runtime) where it's trivial to do so. Another breadcrumb on the trail to a kernel that can be loaded at any 1MB boundary.
|
261643 |
09-Feb-2014 |
ian |
Consolidate code related to setting up physical memory configuration into a new physmem.c file. The new code provides helper routines that can be used by legacy SoCs and newer FDT-based systems. There are routines to add one or more regions of physically contiguous ram, and exclude one or more physically contiguous regions of ram. Ram can be excluded from crash dumps, from being given over to the vm system for allocation management, or both. After all the included and excluded regions have been added, arm_physmem_init_kernel_globals() processes the regions into the global dump_avail and phys_avail arrays and realmem and physmem variables that communicate memory configuration to the rest of the kernel.
Convert all existing SoCs to use the new helper code.
|
261642 |
08-Feb-2014 |
ian |
Remove the ARM_USE_SMALL_ALLOC option and code related to it.
This was an optimization used only by a few xscale platforms. Part of the optimization was to create a direct map for all physical pages, and that resulted in making multiple mappings of pages in a way that bypassed the logic in pmap.c to handle VIVT cache aliasing. It also just generally made the code more complex and hard to maintain for all SoCs.
Reviewed by: cognet
|
261639 |
08-Feb-2014 |
br |
Add drivers for: - Enhanced Direct Memory Access Controller (eDMA) - Direct Memory Access Multiplexer (DMAMUX)
|
261606 |
07-Feb-2014 |
andrew |
Dynamically generate the page table. This will allow us to detect the physical address we are loaded at to change the mapping.
|
261596 |
07-Feb-2014 |
ian |
Remove references to PHYSADDR where it's used only in debugging output, and where the code that references it can safely be elided if it's not defined (meaning the code is used for legacy arm platforms that still define the compile-time PHYSADDR but not on newer systems that calculate the value at runtime).
|
261572 |
07-Feb-2014 |
ian |
Add option USB_HOST_ALIGN=64 for all SoCs that have 64 byte cache lines.
|
261570 |
07-Feb-2014 |
ian |
Revert r260440. I didn't realize that most of this change was already in effect due to r250753. That is sufficient for all SoCs with a 32 byte cache line size. Systems with 64 byte cache lines will need the option; that will be done in a separate commit.
Thanks to loos@ for pointing out r250753.
|
261565 |
06-Feb-2014 |
andrew |
Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us remove the need to load the kernel at a fixed address.
|
261564 |
06-Feb-2014 |
andrew |
Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to place 32-bit data in r1, not r0. 64-bit data is already packed correctly.
|
261563 |
06-Feb-2014 |
andrew |
Make functions only used in this file static, and remove vfp_enable as it is unused.
|
261562 |
06-Feb-2014 |
andrew |
Pass the kernel physical address to initarm through the boot param struct.
|
261513 |
05-Feb-2014 |
nwhitehorn |
Move Open Firmware device root on PowerPC, ARM, and MIPS systems to a sub-node of nexus (ofwbus) rather than direct attach under nexus. This fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier. SPARC is unchanged.
Reviewed by: imp, ian
|
261459 |
04-Feb-2014 |
imp |
Remove trailing tabs causing false grep positives
|
261458 |
04-Feb-2014 |
imp |
s/standard/optional/ for ohci and echi, since these files are optional and not standard.
|
261419 |
02-Feb-2014 |
cognet |
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.
|
261418 |
02-Feb-2014 |
cognet |
Invalidate cachelines for bounce pages on PREREAD too, there may still be stale entries from a previous transfer.
|
261417 |
02-Feb-2014 |
ian |
Add missing semicolon.
|
261416 |
02-Feb-2014 |
br |
o Add prototype for tcon_bypass() used by dcu4 o Add register definition
|
261415 |
02-Feb-2014 |
cognet |
Change the way pcpu and curthread are stored per-core: the old way was to store pcpu in a register, and get curthread from pcpu, which is not very atomic, and led to issues if the thread was migrated to another core between the time we got the pcpu address and the time we got curthread. Instead, we now store curthread where pcpu used to be store, and we calculate the pcpu address based on the cpu id.
|
261414 |
02-Feb-2014 |
cognet |
Don't call device_set_ivars() for the mmchs, it doesn't seem to be used, and it overrides the ivars set by the simplebus.
|
261413 |
02-Feb-2014 |
br |
Add driver for Display Control Unit (DCU4).
|
261411 |
02-Feb-2014 |
br |
Add support for Colibri VF50 Evaluation Board.
Colibri VF50 is a SODIMM200 Vybrid Family core module and development board produced by Toradex AG.
Sponsored by: Machdep, Inc.
|
261410 |
02-Feb-2014 |
ian |
Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings.
Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
|
261409 |
02-Feb-2014 |
br |
Split kernel configuration to chip common and board specific parts.
|
261406 |
02-Feb-2014 |
br |
o Expand device tree information o Export iomuxc (pins) configuration to DTS o Allow devices to assign clocks in DTS
|
261404 |
02-Feb-2014 |
nwhitehorn |
Fix one remnant endian flaw here. The back-and-forth endian conversions are confusing.
|
261396 |
02-Feb-2014 |
nwhitehorn |
Fix typo. Sorry for breakage!
|
261393 |
02-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.
|
261353 |
01-Feb-2014 |
imp |
Fix AT91SAM9260 to work with PA rather than VA device addresses.
|
261351 |
01-Feb-2014 |
nwhitehorn |
Open Firmware interrupt specifiers can consist of arbitrary-length byte strings and include arbitrary information (IRQ line/domain/sense). When the ofw_bus_map_intr() API was introduced, it assumed that, as on most systems, these were either 1 cell, containing an interrupt line, or 2, containing a line number plus a sense code. It turns out a non-negligible number of ARM systems use 3 (or even 4!) cells for interrupts, so make this more general.
|
261338 |
31-Jan-2014 |
imp |
Move these for diff reduction against FDT work.
|
261337 |
31-Jan-2014 |
imp |
Minor cleanup of comments.
|
261336 |
31-Jan-2014 |
imp |
Fix silly typo...
|
261322 |
31-Jan-2014 |
imp |
Switch to using PAs rather than VAs for the addresses we map for devices. This is a nop, except for what's reported by atmelbus for the resources.
It would be nice if we could dymanically allocated these things, but the pmap_mapdev panics if we don't keep the static mappings, so we still need to play the carefully allocate VA space between all supported SoC game.
User's with their own devices may need to make adjustments.
|
261304 |
31-Jan-2014 |
imp |
When mapping an address, the bsh needs the same offset we do for other things.
|
261279 |
30-Jan-2014 |
imp |
Fix the name of the dts file for the HL201...
|
261252 |
28-Jan-2014 |
imp |
Fix clang warning.
|
261227 |
28-Jan-2014 |
andrew |
Remove STARTUP_PAGETABLE_ADDR from the ARM configs and replace it with memory at the end of the kernel.
This helps reduce the SoC and board specific configuration required.
Reviewed by: bsdimp Tested by: jmg (armeb), br
|
261214 |
27-Jan-2014 |
imp |
Remove extra parens to silence clang warning.
|
261211 |
27-Jan-2014 |
jmg |
fix args to mtx_init
Note that this commit hasn't been compile tested because these files are not hooked up to the build...
PR: 186129 Submitted by: Takanori Sawada Approved by: rpaulo
|
261180 |
26-Jan-2014 |
imp |
Before resetting the USART, delay a bit to allow the transmitter to finish the current character to drain to avoid glitching. Also, simplify the code a smidge.
|
261172 |
25-Jan-2014 |
imp |
Make early printf output nicer by inserting a carriage return before any linefeeds that are output.
|
261171 |
25-Jan-2014 |
imp |
Bus space handles need to be the VA of the requested resource, not the rounded page VA. Correct so the DBGU device can be mapped for FDT console since it isn't on a page boundary.
|
261165 |
25-Jan-2014 |
andrew |
Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no parameters.
|
261137 |
24-Jan-2014 |
andrew |
Correct the alignment of sp through functions that use UNWINDSVCFRAME. We were incorrectly adding the trap frame padding to the stack pointer after reading it's value and unaligning it.
|
261131 |
24-Jan-2014 |
imp |
Remove obsolete option
|
261130 |
24-Jan-2014 |
imp |
Fix comment to match option
|
261129 |
24-Jan-2014 |
imp |
Fix comment to match option
|
261128 |
24-Jan-2014 |
imp |
Fix comment to match option
|
261127 |
24-Jan-2014 |
imp |
Add NAND support Fix comment This board has 4 wire support
|
261126 |
24-Jan-2014 |
imp |
Remove redundant declaration for uart devclass. Commint some unrelated, but harmless, FDT ifdefs.
|
261041 |
22-Jan-2014 |
imp |
Clean up HL201 config (for the hot-e 201 and 101 models from thinlinx). Make comments match parameters Add options for early printf so we get regression build testing on it. Add preview of options for FDT support coming soon (I hope)
|
261040 |
22-Jan-2014 |
imp |
Implement support for early printf. You need to define SOCDEV_{PA,VA} as described in the comments for the eputc function in your config file.
|
261039 |
22-Jan-2014 |
imp |
Add support for mapping a small range of the SoC devices for debugging purposes early in boot.
|
260921 |
20-Jan-2014 |
imp |
We need nand now that the boards reference it.
|
260889 |
19-Jan-2014 |
imp |
Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things.
Reviewed by: bde (with reservations)
|
260887 |
19-Jan-2014 |
imp |
Add nand device and NANDFS into the mix for those boards that have support for it at the moment.
|
260886 |
19-Jan-2014 |
imp |
Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201. # expect more refinement as do more boards.
|
260884 |
19-Jan-2014 |
imp |
Add standard memory controller helper functions.
|
260752 |
16-Jan-2014 |
ray |
Fix build after FDT changes.
Sponsored by: The FreeBSD Foundation
|
260696 |
15-Jan-2014 |
imp |
Add data so we can convert a PIO unit number into a base address.
|
260695 |
15-Jan-2014 |
imp |
Provide a simplified way to specify GPIO pins for the Atmel port.
|
260493 |
09-Jan-2014 |
ian |
Add a prototype for the new arm_devmap_print_table(). This should have been part of r260490.
|
260490 |
09-Jan-2014 |
ian |
Add a function to print the contents of the static device mapping table, and invoke it for bootverbose logging, and also from a new DDB command, "show devmap". Also tweak the format string for the bootverbose output of physical memory chunks to get the leading zeros in the hex values.
|
260441 |
08-Jan-2014 |
ian |
Add option USB_HOST_ALIGN to configs that contain 'device usb'. Setting this to the cache line size is required to avoid data corruption on armv4 and armv5, and improves performance on armv6, in both cases by avoiding partial cacheline flushes for USB IO.
|
260440 |
08-Jan-2014 |
ian |
Add option USB_HOST_ALIGN to configs that contain 'device usb'. Setting this to the cache line size is required to avoid data corruption on armv4 and armv5, and improves performance on armv6, in both cases by avoiding partial cacheline flushes for USB IO.
All these configs already exist in 10-stable. A few that don't (and thus can't be MFC'd yet) will be committed separately.
|
260375 |
06-Jan-2014 |
andreast |
Fix arm build.
Reviewed by: ian, zbb
|
260374 |
06-Jan-2014 |
ian |
Switch to using arm_devmap_add_entry() to set up static device mapping. This eliminates the hard-coded max kva and roughly doubles the available kva space.
|
260373 |
06-Jan-2014 |
ian |
Don't try to find a static mapping before calling pmap_mapdev(), that logic is now part of pmap_mapdev() and doesn't need to be duplicated here. Likewise for unmapping.
|
260372 |
06-Jan-2014 |
ian |
Allow 'no static device mappings' to potentially work. It's not clear that every arm system must have some static mappings to work correctly (although currently they all do), so remove some panic() calls (which would never been seen anyway, because they would happen before a console is available).
|
260371 |
06-Jan-2014 |
ian |
Switch to using arm_devmap_add_entry() to set up static device mapping. This eliminates the hard-coded max kva and roughly doubles the available kva space.
|
260340 |
05-Jan-2014 |
ian |
Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c.
|
260333 |
05-Jan-2014 |
ian |
Enable the cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config. Also generally bring the kernel config into line with what we have for other Marvell/Kirkwood systems (add lots of useful devices and options).
One particularly notable addition amongst the kernel config changes is USB_HOST_ALIGN=32, which may help eliminate data corruption on USB drives.
PR: kern/181975 arm/162159
|
260331 |
05-Jan-2014 |
ian |
Add #include <machine/fdt.h> to a few files that used to get it via pollution from other headers.
|
260327 |
05-Jan-2014 |
nwhitehorn |
Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed.
|
260326 |
05-Jan-2014 |
ian |
Convert from using fdt_immr style to arm_devmap_add_entry() to make static device mappings.
This SoC relied heavily on the fact that all devices were static-mapped at a fixed address, and it (rather bogusly) used bus_space read and write calls passing hard-coded virtual addresses instead of proper bus handles, relying on the fact that the virtual addresses of the mappings were known at compile time, and relying on the implementation details of arm bus_space never changing. All such usage was replaced with calls to bus_space_map() to obtain a proper bus handle for the read/write calls.
This required adjusting some of the #define values that map out hardware registers, and some of them were renamed in the process to make it clear which were defining absolute physical addresses and which were defining offsets. (The ones that just define offsets don't appear to be referenced and probably serve no value other than perhaps documentation.)
|
260323 |
05-Jan-2014 |
ian |
Eliminate use of fdt_immr_addr(), it's not needed for this SoC. Convert to the newer arm_devmap_add_entry() routine for creating device mappings.
|
260320 |
05-Jan-2014 |
ian |
Use the common armv6 fdt_bus_tag defintion instead of an essentially identical local copy of it.
|
260294 |
04-Jan-2014 |
ian |
Doh! Use C comments, not C++.
|
260292 |
04-Jan-2014 |
ian |
Convert static device mapping to use the new arm_devmap_add_entry(), and add static mappings that cover most of the on-chip peripherals with 1MB section mappings. This adds about 220MB or so available kva space by not using a hard-coded 0xF0000000 as the mapping address.
|
260288 |
04-Jan-2014 |
ian |
In pmap_mapdev(), first check whether a static mapping exists, and if so use it rather than allocating kva space and making another mapping. In pmap_unmapdev(), don't unmap/free if the mapping is static.
|
260283 |
04-Jan-2014 |
ian |
Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(), when running on FDT systems. Unmap memory in nexus_deactivate_resource().
Also, call rman_activate_resource() before mapping device memory, and only do the mapping if it returns success.
Reviewed by: nwhitehorn
|
260281 |
04-Jan-2014 |
nwhitehorn |
Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table, which will become an ARM-specific quirk.
|
260245 |
03-Jan-2014 |
ian |
Fix a typo that caused a loop to run beyond the end of the array it was searching. If you didn't configure a timer capture pin you'd get a data abort as it wandered into the weeds, now you get a nice warning message about your config, as originally intended.
|
260166 |
01-Jan-2014 |
zbb |
Fix race condition in DELAY for SP804 timer.
Fix race condition in DELAY function: sc->tc was not initialized yet when time_counter pointer was set, what resulted in NULL pointer dereference.
Export sysfreq to dts.
Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf
|
260161 |
01-Jan-2014 |
zbb |
Add polarity and level support to ARM GIC
Add suport for setting triggering level and polarity in GIC. New function pointer was added to nexus which corresponds to the function which sets level/sense in the hardware (GIC).
Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf
|
260093 |
30-Dec-2013 |
imp |
Set the SoC name for the atmelbus name.
|
259936 |
27-Dec-2013 |
adrian |
Revert r252694 - which attempted to fix bit emulation for armv6/armv7.
This seems to cause issues with jemalloc + {dhclient, sshd}.
Thus, revert this for now until the root cause can be found and fixed.
This should quieten some runtime problems with the Raspberry Pi.
PR: kern/185046 MFC after: 3 days
|
259750 |
22-Dec-2013 |
ian |
Add PPS support to the am335x timer driver. This uses the timer hardware's capture mode together with the timecounter's PPS polling feature to get very accurate PPS capture without any interrupt processing (or latency).
Hardware timers 4 through 7 have associated capture-trigger input pins. When the PPS support is compiled in the code automatically chooses the first timer it finds that has the capture-trigger pin set to input mode (this is configured via the fdt data).
|
259744 |
22-Dec-2013 |
ian |
A variety of cleanups... - Use named constants for register bits, instead of mystery numebrs scattered around in the code. - Use inline functions for bus space read/write, instead of macros that rely on global variables. - Move the timecounter struct into the softc instead of treating it as a global variable. Backlink from it to the softc. - This leaves a pointer to the softc as the only static/global variable and it's now used only by DELAY().
|
259743 |
22-Dec-2013 |
ian |
Map out all the timer-related registers, and define named constants for the bits within the registers.
|
259739 |
22-Dec-2013 |
ian |
Shorten the DMTIMER_ prefix used for register names to DMT_. This is in preparation for adding more complete register defintions, some of which have fairly long names.
|
259728 |
22-Dec-2013 |
ray |
Add Freescale i.MX515 vt(9) driver.
Sponsored by: The FreeBSD Foundation
|
259685 |
21-Dec-2013 |
imp |
Plumb the cn_grab and cn_ungrab routines down into the uart clients. Mask RX interrupts while grabbed on the atmel serial driver. This UART interrupts every character. When interrupts are enabled at the mountroot> prompt, this means the ISR eats the characters. Rather than try to create a cooperative buffering system for the low level kernel console, instead just mask out the ISR. For NS8250 and decsendents this isn't needed, since interrupts only happen after 14 or more characters (depending on the fifo settings). Plumb such that these are optional so there's no change in behavior for all the other UART clients. ddb worked on this platform because all interrupts were disabled while it was running, so this problem wasn't noticed. The mountroot> issue has been around for a very very long time.
MFC after: 3 days
|
259640 |
20-Dec-2013 |
ganbold |
Add identification and necessary type checks for Krait CPU cores. Krait CPU is used in Qualcomm Snapdragon S4 and Snapdragon 400/600/800 SoCs and has architectural similarities to ARM Cortex-A15. As for development boards IFC6400 series embedded boards from Inforce Computing uses Snapdragon S4 Pro/APQ8064.
Approved by: stas (mentor)
|
259518 |
17-Dec-2013 |
ray |
Fix copyright and some style(9) things.
Sponsored by: The FreeBSD Foundation
|
259517 |
17-Dec-2013 |
ray |
Add vt support for RPi. (No early stage yet.)
Sponsored by: The FreeBSD Foundation
|
259516 |
17-Dec-2013 |
nwhitehorn |
Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it.
|
259484 |
16-Dec-2013 |
nwhitehorn |
Use the common Open Firmware PCI interrupt routing code instead of the duplicate version in dev/fdt.
Tested by: zbb
|
259270 |
12-Dec-2013 |
loos |
After r256961 ofw_iicbuc.c will be built for any kernel which includes options 'iicbus' and 'fdt'. Remove the (now) unnecessary entries.
Verified on BBB (am335x), EFIKA_MX (imx51 - by ray@), DIGI-CCWMX53 (imx53 - kernel build).
Approved by: adrian (mentor)
|
259220 |
11-Dec-2013 |
imp |
Loose -> Lose so this sentence makes sense.
MFC after: 3 days
|
259212 |
11-Dec-2013 |
imp |
Fix one race and one fence post error. When the TX buffer was completely full, we'd not complete any of the mbufs due to the fence post error (this creates a large leak). When this is fixed, we still leak, but at a much smaller rate due to a race between ateintr and atestart_locked as well as an asymmetry where atestart_locked is called from elsewhere. Ensure that we free in-flight packets that have completed there as well. Also remove needless check for NULL on mb, checked earlier in the loop and simplify a redundant if.
MFC after: 3 days
|
259202 |
10-Dec-2013 |
jhb |
Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c.
Approved by: core
|
259127 |
09-Dec-2013 |
loos |
Bring the RPi I2C driver in line with ti_i2c. Make it treat any slave address as a 7-bit address.
Approved by: adrian (mentor)
|
259126 |
09-Dec-2013 |
loos |
Activate the device before attempt to access any of its registers. Without this change we may end up with a panic (Fatal kernel mode data abort: 'External Non-Linefetch Abort (S)') as described in http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.
It is now possible to bring up I2C1 and I2C2 on BBB.
Approved by: adrian (mentor)
|
259125 |
09-Dec-2013 |
loos |
Fix a few typos on the scm (control module) pin mux definitions.
Approved by: adrian (mentor)
|
259121 |
09-Dec-2013 |
ganbold |
Add gpio parse routines according to sys/boot/fdt/dts/bindings-gpio.txt.
Reviewed by: stas@
|
259099 |
08-Dec-2013 |
loos |
Similar to r255816, fix the math for the DELAY() calculation. It was off by a really small amount because of the higher timer resolution.
Approved by: adrian (mentor) Verified on: BBB
|
259039 |
06-Dec-2013 |
imp |
Although not strictly required to boot a 64MB board, bump vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some future shock protection since the KVA requirements have gone up since the unmapped changes have gone in, as well as preventing us from overlapping with the hardware devices, which we map at 0xd0000000, which we'd hit with anything more than 85MB...
MFC after: 3 days
|
259037 |
06-Dec-2013 |
loos |
Fix the pin value reading on AM335x. Because of the inverted logic it was always returning '0' for all the reads, even for the outputs. It is now known to work with gpioiic(4) and gpioled(4).
Approved by: adrian (mentor) Tested on: BBB
|
259034 |
06-Dec-2013 |
loos |
Make the sysctl node read-only.
Approved by: adrian (mentor)
|
258845 |
02-Dec-2013 |
zbb |
Enable missing Access Flag for secondary cores on ARMv6/v7
Spotted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf
> Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed.
M sys/arm/arm/locore.S
|
258828 |
02-Dec-2013 |
ian |
Add a nand flash controller driver for Atmel at91 family. Tested only on at91rm9200 so far.
The files.at91 has listed a nand driver for ages, but it never existed.
|
258820 |
02-Dec-2013 |
ian |
Add definitions for the additional PIO pins found on recent AT91 SoCs.
|
258787 |
01-Dec-2013 |
eadler |
r258780 should not have applied to .S files.
Reported by: jmallett
|
258780 |
30-Nov-2013 |
eadler |
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD.
Discussed with: -arch, rdivacky Reviewed by: cperciva
|
258742 |
29-Nov-2013 |
ian |
Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write.
Reviewed by: zbb@
|
258548 |
25-Nov-2013 |
ganbold |
Enable reset mechanism for rk3188.
Approved by: ray@
|
258546 |
25-Nov-2013 |
ganbold |
Add watchdog driver for rk3188.
Approved by: ray@
|
258534 |
24-Nov-2013 |
gavin |
Fix typo in comment.
|
258531 |
24-Nov-2013 |
gavin |
platform_devmap_init() was renamed initarm_devmap_init() in r257669, update comments to match.
|
258412 |
21-Nov-2013 |
ian |
Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c.
Pointed out by: cognet Pointy hat to: ian
|
258410 |
20-Nov-2013 |
cognet |
In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0, and for some strange reason it doesn't seem to like it.
|
258393 |
20-Nov-2013 |
ian |
Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.
|
258392 |
20-Nov-2013 |
ian |
Call cpu_setup() immediately after the page tables are installed. This enables data cache and other chip-specific features. It was previously done via an early SYSINIT, but it was being done after pmap and vm setup, and those setups need to use mutexes. On some modern ARM platforms, the ldrex/strex instructions that implement mutexes require the data cache to be enabled.
A nice side effect of enabling caching earlier is that it eliminates the multi-second pause that used to happen early in boot while physical memory and pmap and vm were being set up. On boards with 1 GB or more of ram this pause was very noticible, sometimes 5-6 seconds.
PR: arm/183740
|
258359 |
19-Nov-2013 |
zbb |
Apply access flags for managed and unmanaged pages properly on ARMv6/v7
When entering a mapping via pmap_enter() unmanaged pages ought to be naturally excluded from the "modified" and "referenced" emulation. RW permission should be granted implicitly when requested, otherwise unmanaged page will not recover from the permission fault since there will be no PV entry to indicate that the page can be written.
In addition, only managed pages that participate in "modified" emulation need to be marked as "dirty" and "writeable" when entered with RW permissions. Likewise with "referenced" flag for managed pages. Unmanaged ones however should not be marked as such.
Reviewed by: cognet, gber
|
258358 |
19-Nov-2013 |
zbb |
Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7
When emulating modified bit the executable attribute was cleared by mistake when calling pmap_set_prot(). This was not a problem before changes to ref/mod emulation since all the pages were created RW basing on the "prot" argument in pmap_enter(). Now however not all pages are RW and the RW permission can be cleared in the process.
Added proper KTRs accordingly.
Spotted by: cognet Reviewed by: gber
|
258356 |
19-Nov-2013 |
ian |
Bugfixes... the host capabilties from FDT data are stored in host.caps, not host.host_ocr, examine the correct field when setting up the hardware. Also, the offset for the capabilties register should be 0x140, not 0x240.
Submitted by: Ilya Bakulin <ilya@bakulin.de> Pointy hat to: me
|
258287 |
17-Nov-2013 |
alc |
Implement pmap_align_superpage().
MFC after: 6 weeks
|
258240 |
16-Nov-2013 |
ian |
In the data abort handler, don't panic if kdb is available and says it handled the condition.
PR: arm/183668 Submitted by: Howard Su <howard0su@gmail.com>
|
258211 |
16-Nov-2013 |
rpaulo |
Enable the ti_mbox and ti_pruss drivers.
|
258210 |
16-Nov-2013 |
rpaulo |
Add a driver for the TI Programmable Realtime Unit Subsystem.
This is only a userland accessibility driver. It mmaps the hardware region to userland and posts interrupt notifications via kqueue.
|
258209 |
16-Nov-2013 |
rpaulo |
Add a driver for the Texas Instruments Mailbox hardware.
|
258177 |
15-Nov-2013 |
jhb |
Remove an incorrectly copied and pasted clause from these license statements.
Approved by: Yohanes Nugroho <yohanes@gmail.com> MFC after: 1 week
|
258096 |
13-Nov-2013 |
br |
o Use common ARMv6/v7 bus_space tag. o Use new helper routines for arm static device mapping. o style(9) tweaks.
|
258057 |
12-Nov-2013 |
br |
Add support for Freescale Vybrid Family VF600 heterogeneous ARM Cortex-A5/M4 SoC (M4 core is not used in this work).
Support includes device drivers for: - NAND Flash Controller (NFC) - USB Enhanced Host Controller Interface (EHCI) - General-Purpose Input/Output (GPIO) - Universal Asynchronous Receiver/Transmitter (UART)
Also supported: - Generic Interrupt Controller (GIC) - MPCore timer - ffec ethernet driver
Reviewed by: ray Approved by: cognet (mentor)
|
258045 |
12-Nov-2013 |
loos |
As all the IIC controllers on system uses the same 'iichb' prefix we cannot rely only on checking the device unit to indentify the BSC unit we are attaching to. Make use of the device base address to identify our BSC unit.
Approved by: adrian (mentor)
|
257924 |
10-Nov-2013 |
ian |
Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo' to be a constant integer suitable for use in a case label, so use #defines.
|
257857 |
08-Nov-2013 |
alc |
Eliminate an unused macro.
|
257854 |
08-Nov-2013 |
alc |
As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional.
Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity.
Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to that of setting the tunable vm.kmem_size. Whereas the macros VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size have been distinct. In particular, whereas VM_KMEM_SIZE was overridden by VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size was not. Remedy this inconsistency. Now, VM_KMEM_SIZE can be used to set the size of the kmem arena at compile-time without that value being overridden by auto-sizing.
Update the nearby comments to reflect the kmem submap being replaced by the kmem arena. Stop duplicating the auto-sizing formula in every machine- dependent vmparam.h and place it in kmeminit() where auto-sizing takes place.
Reviewed by: kib (an earlier version) Sponsored by: EMC / Isilon Storage Division
|
257775 |
07-Nov-2013 |
ian |
Switch to the new common bus_space-v6.c, remove the local one.
|
257774 |
07-Nov-2013 |
ian |
Switch to the new common bus_space-v6.c, remove the local one.
|
257740 |
06-Nov-2013 |
ray |
Switch allwinner A10/A20 and rockchip ports to use common ARMv6/v7 bus_space tag.
Tested by: ganbold
|
257739 |
06-Nov-2013 |
ray |
Switch to use common ARMv6/v7 bus_space tag.
Tested by: ian, ray
|
257738 |
06-Nov-2013 |
ray |
Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs.
Tested by: ian, ray
|
257702 |
05-Nov-2013 |
nwhitehorn |
Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. This brings ARM and MIPS more in line with existing Open Firmware platforms like sparc64 and powerpc, as well as preventing double-enumeration of the OF tree on embedded PowerPC (first through nexus, then through fdtbus).
This change is also designed to simplify resource management on FDT platforms by letting there exist a platform-defined root bus resource_activate() call instead of replying on fdtbus to do the right thing through fdt_bs_tag. The OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR() kobj methods are also available to implement for similar purposes.
Discussed on: -arm, -mips Tested by: zbb, brooks, imp, and others MFC after: 6 weeks
|
257678 |
05-Nov-2013 |
ian |
Remove local devmap code and use the essentially identical common code that got moved from imx_machdep.c to arm/devmap.c.
|
257676 |
05-Nov-2013 |
ian |
Style and comment tweaks, no functional changes.
|
257673 |
05-Nov-2013 |
ian |
Add new helper routines for arm static device mapping. The new code allocates kva space from the top down for the device mappings and builds entries in an internal table which is automatically used later by arm_devmap_bootstrap(). The platform code just calls the new arm_devmap_add_entry() function as many times as it needs to (up to 32 entries allowed; most platforms use 2 or 3 at most).
There is also a new arm_devmap_lastaddr() function that returns the lowest kva address allocated; this can be used to implement initarm_lastaddr() which is used to initialize vm_max_kernel_address.
The new code is based on a similar concept developed for the imx family SoCs recently. They will soon be converted to use this new common code.
|
257672 |
05-Nov-2013 |
ian |
Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to share the same code on both architectures.
|
257669 |
05-Nov-2013 |
ian |
Call initarm_lastaddr() later in the init sequence, after establishing static device mappings, rather than as the first of the initializations that a platform can hook into. This allows a platform to allocate KVA from the top of the address space downwards for things like static device mapping, and return the final "last usable address" result after that and other early init work is done.
Because some platforms were doing work in initarm_lastaddr() that needs to be done early, add a new initarm_early_init() routine and move the early init code to that routine on those platforms.
Rename platform_devmap_init() to initarm_devmap_init() to match all the other init routines called from initarm() that are designed to be implemented by platform code.
Add a comment block that explains when these routines are called and the type of work expected to be done in each of them.
|
257660 |
04-Nov-2013 |
ian |
Move remaining code and data related to static device mapping into the new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future).
|
257648 |
04-Nov-2013 |
ian |
Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring out common code related to mapping device memory into a new devmap.c file.
Remove the growing duplication of code that used pmap_devmap_find_pa() and then did some math with the returned results to generate a virtual address, and likewise in reverse to get a physical address. Now there are a pair of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The bus_space_map() implementations are rewritten in terms of these.
|
257639 |
04-Nov-2013 |
ian |
Remove the duplicated implementations of some bus_space functions and use the essentially identical generic implementations instead. The generic implementations differ only in the spelling of a couple variable names and some formatting differences.
|
257604 |
04-Nov-2013 |
ian |
Properly quote the included filename, now that it has a dot in it. Doh.
|
257603 |
04-Nov-2013 |
ian |
Rename WANDBOARD-COMMON to WANDBOARD.common and adjust the configs that include it accordingly. The build machinery for universe and tinderbox tries to build every kernel config whose name begins and ends with [A-Z0-9] and the common include file that has most of the options isn't buildable by itself, so the new lowercase .common will avoid building it.
|
257595 |
03-Nov-2013 |
ian |
Comments and style(9) only, no functional changes.
|
257561 |
02-Nov-2013 |
ian |
Bugfix: the attach routine needs to use the same table of fdt compat strings that the probe routine used.
|
257557 |
02-Nov-2013 |
ian |
Add a missing register definition.
|
257549 |
02-Nov-2013 |
alc |
Don't create a distinct free page pool for segregating allocations that are accessed through the direct map unless the kernel configuration actually includes a direct map. Only a few configurations do, and for the rest the unnecessary free page pool is a small pessimization.
Tested by: zbb MFC after: 6 weeks
|
257519 |
01-Nov-2013 |
ian |
The ability to do 8-bit implies 4-bit capability too. Rearrange the cases and add a fallthrough comment to make that happen.
|
257518 |
01-Nov-2013 |
ian |
TI sdhci driver improvements, mostly related to fdt data...
Use the published compatible strings (our own invention, "ti,mmchs" is still accepted as well, for now).
Don't blindly turn on 8-bit bus mode, because even though the conroller supports it, the board has to be wired appropriately as well. Use the published property (bus-width=<n>) and honor all the valid values (1,4,8).
The eMMC device on a Beaglebone Black is wired for 8-bit, update the dts.
The mmchs controller can inherently do both 1.8v and 3.0v on the first device and 1.8v only on other devices, unless an external transceiver is used. Set the voltage automatically for the first device and honor the published fdt property (ti,dualvolt) for other devices.
Thanks go to Ilya Bakulin for figuring out the voltage compatibility stuff.
|
257489 |
01-Nov-2013 |
ian |
Kernel config for Wandboard.
|
257483 |
01-Nov-2013 |
ian |
Add the Soc- / machine-dependent parts of imx6 support.
|
257478 |
31-Oct-2013 |
ian |
Add definitions for the register and data that describes the SoC type. This isn't in the chip reference manuals, it was found in u-boot and various old mailing list threads.
|
257476 |
31-Oct-2013 |
ian |
Revamp the SoC identity numbering scheme to be more in line with the way Freescale numbers the chips in the ID registers.
|
257454 |
31-Oct-2013 |
ian |
Add sdhci driver glue for imx family SoCs. This should support both uSDHC (newer SoCs) and eSDHC (older SoCs), but the eSDHC support is untested and likely to need some tweaking.
|
257453 |
31-Oct-2013 |
ian |
Add stubbed-out imx6 support for clocks and power management. This contains little more than a few stub functions required to keep the linker happy, but it's enough to let early imx6 development proceed.
|
257452 |
31-Oct-2013 |
ian |
Add support for the USB PHY on imx6 SoCs. Pretty minimal at this point, but enough to get usb host mode working.
|
257419 |
31-Oct-2013 |
ian |
Do not EOI an interrupt until the point after the filter handlers / before threaded handlers.
It's not easy to see from the diffs of this change exactly how it accomplishes the above. The arm_mask_irq() and arm_unmask_irq() functions are, respectively, the pre_thread and post_thread hooks. Not seen in these diffs, the arm_post_filter() routine also EOIs. The post_filter routine runs after filter handlers if there will be no threaded handlers, so it just EOIs. The pre_thread routine masks the interrupt (at the controller, not the source) and EOIs. So one way or another, the EOI happens at the point where filter handlers are done.
|
257418 |
31-Oct-2013 |
ian |
Don't iterate through the bits of the pending interrupt register if the whole register is zero. Most of the registers will be zero most of the time.
|
257414 |
31-Oct-2013 |
rpaulo |
Enable USB.
|
257413 |
31-Oct-2013 |
ian |
Reset the timer interrupt status register at the top rather than bottom of the interrupt handler. If the event callback starts a new short timeout, the timer can fire before returning from the event callback, and clearing the interrupt status after that loses the interrupt and hangs until the counter wraps. Fixing all of this removes the need for the do-nothing loop at the top of the handler which really just waited for the counter to roll over and reach the one-shot count again.
Also add a missing return(0) in the periodic timer start case.
|
257407 |
31-Oct-2013 |
ian |
Expand the list of compatible devices this driver works with. Increase the target frequency from 1 to 10 MHz because these SoCs are plenty fast enough to benefit from the extra event timer resolution.
|
257384 |
30-Oct-2013 |
ian |
Add a "no-op" USB PHY driver for imx-family SoCs. This is used when the phy clocks need to be enabled, but no other hardware setup is needed to make the phy work.
|
257383 |
30-Oct-2013 |
ian |
Add some bare-bones support for enabling usb and usbphy clocks. This is temporary code to keep imx development moving forward for now. In the long run we need a SoC-independant clock management API.
|
257370 |
30-Oct-2013 |
nwhitehorn |
Fix typo. Sorry!
|
257343 |
29-Oct-2013 |
nwhitehorn |
A last BUS_PROBE_NOWILDCARD. Move setting the postfilter function into the attach function probe shouldn't actually set anything up but just bid on the device.
|
257342 |
29-Oct-2013 |
nwhitehorn |
A few last BUS_PROBE_NOWILDCARDs are in order.
|
257337 |
29-Oct-2013 |
nwhitehorn |
Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
|
257299 |
29-Oct-2013 |
rpaulo |
Digi-CCWMX53: enable ffec and uart.
|
257291 |
28-Oct-2013 |
zbb |
Fix condition that determines PMAP_NEEDS_PTE_SYNC value for ARM
Use values of the correct defines to determine statement's result. ARM_ARCH_ symbols are always defined, hence only values are relevant.
Reviewed by: cognet
|
257282 |
28-Oct-2013 |
zbb |
Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU
Since CPU_MV_PJ4B describes ARMv7 compliant CPU there is no need for sending an IPI each time when TLB is flushed in any way.
Tested by: kevlo
|
257281 |
28-Oct-2013 |
zbb |
Remove not working and deprecated PJ4Bv6 support
Sheeva PJ4Bv6 - based chips were only prototypes for V7 class Armada SoC family. Current in-tree support for PJ4Bv6 will not work and also there should be no platforms in active use that would incorporate that CPU revision.
|
257280 |
28-Oct-2013 |
zbb |
Change Armada XP kernel load address to the u-boot's end address
Loading kernel to 0xf00000 has no practical reason. Starting it from the u-boot's highest possible end address (2MB counting from 0x0) makes more sense.
Tested by: kevlo
|
257279 |
28-Oct-2013 |
zbb |
Fix-up DTB for Armada XP registers' base according to the actual settings
Depending on u-boot's flavor some boards have their SoC registers base address configured to 0xD0000000 and other to 0xF1000000. U-boot is passing currently set value via CP15 register. In order to create proper mapping for SoC registers and allow further successful initialization it is necessary to replace fdt_immr_pa with the real value and eventually fix-up device tree blob.
Tested by: kevlo
|
257278 |
28-Oct-2013 |
zbb |
Remove hard-coded mappings related to Armada XP support
Armada XP initialization flow requires SoC registers to be mapped very early in order to configure Snoop Filter for SMP. Additional mapping in locore.S is redundant as proper mapping is made in pmap_devmap_bootstrap() prior to calling cpu_setup() which configures the Snoop Filter. For secondaru CPUs it is better to pass VA of the SoC registers defined in MV_BASE and PA consistent with the value in the Device Tree.
Tested by: kevlo
|
257265 |
28-Oct-2013 |
ian |
Follow r257244; it's now necessary to include if_var.h.
|
257258 |
28-Oct-2013 |
ian |
Sweep up a bit of arm-land fallout after r257244; include necessary headers directly that are no longer available via accidental include.
|
257240 |
28-Oct-2013 |
zbb |
Run mvs SATA driver on Armada XP instead of old mv_sata
The mvs driver seems to be more functional than mv_sata and is not causing random interrupt storms during boot.
|
257231 |
27-Oct-2013 |
cognet |
Make sure the PCB is aligned on 8 bytes, we may use ldrd/strd to access it, which may have strong alignment requirements.
|
257228 |
27-Oct-2013 |
kib |
Add bus_dmamap_load_ma() function to load map with the array of vm_pages. Provide trivial implementation which forwards the load to _bus_dmamap_load_phys() page by page. Right now all architectures use bus_dmamap_load_ma_triv().
Tested by: pho (as part of the functional patch) Sponsored by: The FreeBSD Foundation MFC after: 1 month
|
257217 |
27-Oct-2013 |
ian |
Remove the last dregs of trapframe_t. It turns out only arm was using this type, so remove it to make arm code more consistant with other platforms. Thanks to bde@ for pointing out only arm used trapframe_t.
|
257203 |
27-Oct-2013 |
ian |
Eliminate a compiler warning about extraneous parens.
|
257202 |
27-Oct-2013 |
ian |
Oops, one more instance of ARM_NOCACHE_KVA_SIZE was hiding under the couch. This should have been cleaned up along with r257201.
|
257201 |
27-Oct-2013 |
ian |
Retire arm_remap_nocache() and the data and constants associated with it.
The only remaining user was the code that allocates bounce pages for armv4 busdma. It's not clear why bounce pages would need uncached memory, but if that ever changes, kmem_alloc_attr() would be the way to get it.
|
257200 |
27-Oct-2013 |
ian |
Remove #include <machine/frame.h> from all the arm code that doesn't really need it. That would be almost everywhere it was included. Add it in a couple files that really do need it and were previously getting it by accident via another header.
|
257199 |
27-Oct-2013 |
ian |
Remove all #include <machine/pmap.h> from arm code. It's already included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h so there's no reason to ever include it directly.
Thanks to alc@ for pointing this out.
|
257197 |
26-Oct-2013 |
ian |
Maximize available kva space by doing static device mapping from the top of the address space downwards, and then returning the lowest mapped device address from initarm_lastaddr(). This adds over 500MB of kva space compared to the old way of hardcoding the end address as 0xE0000000.
Also, pre-map most of the SoC's common memory-mapped devices using 1MB section mappings so that all device access uses just a few TLB entries. Graphics devices aren't mapped this way yet, but probably should be.
To provide this new functionality without pasting identical code into multiple imxNN_machdep.c files, rework the imx machdep code so that things common to the whole family of SoCs are in a new imx_machdep.c file. The rewritten imxNN_machdep.c files contain just things specific to an individual SoC.
|
257189 |
26-Oct-2013 |
andrew |
Fix an itt instruction. We need to execute both the mov and b instructions when building for Thumb.
|
257172 |
26-Oct-2013 |
zbb |
Enable SATA interface on Armada XP
- Add appropriate entry to DTS - Allow for MV78460 SATA probe and configuration
Tested by: kevlo Approved by: cognet (mentor)
|
257127 |
25-Oct-2013 |
loos |
Remove all the instances of '#undef DEBUG' from kernel.
Suggested by: rpaulo Approved by: adrian (mentor)
|
257062 |
24-Oct-2013 |
loos |
Add the Raspberry Pi SPI controller driver.
Reviewed by: rpaulo Approved by: adrian (mentor)
|
257015 |
23-Oct-2013 |
nwhitehorn |
Typo while reviewing diffs. Sorry for the breakage!
|
256967 |
23-Oct-2013 |
nwhitehorn |
Remove OF_instance_to_package() hack for FDT and replace with use of the generic OF_xref_phandle() API universally. Also replace some related explicit uses of fdt32_to_cpu() with OF_getencprop() calls.
|
256959 |
23-Oct-2013 |
loos |
Add the Raspberry Pi BSC (I2C compliant) controller driver.
Reviewed by: rpaulo Approved by: adrian (mentor)
|
256950 |
23-Oct-2013 |
ganbold |
Radxa Rock board (by radxa.com) kernel config file. More info on the Wiki page: https://wiki.freebsd.org/FreeBSD/arm/Radxa%20Rock
Reviewed by: ray@
|
256949 |
23-Oct-2013 |
ganbold |
Import basic support for Rockchip RK3188 SoC.
Reviewed by: ray@
|
256943 |
22-Oct-2013 |
cognet |
- Use bus_dmamap_unload(), it is not optional. - The new allocator won't return coherent memory for any size > PAGE_SIZE, so don't assume we have coherent memory, and explicitely use bus_dmamap_sync().
|
256942 |
22-Oct-2013 |
cognet |
Typo fix.
|
256941 |
22-Oct-2013 |
cognet |
Try to make sure the frame is indeed in the kernel memory.
|
256873 |
22-Oct-2013 |
gonzo |
Make watchdog function conform watchdog(9): Set error to 0 when watchdog is armed and disable it when timeout is too large to be set.
|
256871 |
22-Oct-2013 |
gonzo |
- Implement watchdog function and register it with watchdog list
|
256839 |
21-Oct-2013 |
ganbold |
Move and rename dwc otg driver to more generic one as it appears to work for rk3188 SoC based board too.
No objections from: hselasky@ Reviewed by: ray@
|
256809 |
20-Oct-2013 |
ian |
Add configuration for the Freescale i.MX53 Quick Start Board.
|
256806 |
20-Oct-2013 |
ian |
Add a driver for the Freescale Fast Ethernet Controller found on various Freescale SoCs including the i.MX series. This also works for the newer SoCs with the ENET gigabit controller, but doesn't use any of the new hardware features other than enabling gigabit speed.
|
256804 |
20-Oct-2013 |
ian |
Switch to using the standard uart console driver instead of the special driver for early boot debugging.
|
256774 |
19-Oct-2013 |
ian |
Clock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing.
|
256760 |
19-Oct-2013 |
rrs |
Corrects the Kirkwood dreamplug to use the right register for power managment. It was incorrectly using the clock register which also caused the status to be the opposite of what it is supposed to be. 1 - its disabled 0 - its enabled
Per kirkwood spec FSS_88F6180_9x_6281_OpenSource.pdf
|
256756 |
18-Oct-2013 |
cognet |
There's no need to guard pmap_extract(), it won't be called until well after the VM has been properly initialized.
Spotted out by: alc
|
256748 |
18-Oct-2013 |
cognet |
KERNBASE is unsigned, so we'd better use hs instead of ge.
Pointy hat to: cognet Suggested by: ian
|
256712 |
17-Oct-2013 |
cognet |
Increase the KVA available for xscale CPUs.
|
256708 |
17-Oct-2013 |
cognet |
Spell cpu_l2cache_wb_range correctly.
|
256707 |
17-Oct-2013 |
cognet |
- Switch to use WBWA mappings for page tables on armv6, this is needed for SMP. - Fix PTE_SYNC() for PIPT L2 caches, using the virtual address wasn't so useful. - Use PTE_SYNC() for >= armv6
|
256691 |
17-Oct-2013 |
cognet |
Make casuword() atomic for armv6
|
256672 |
17-Oct-2013 |
cognet |
If we avoid to use the page at addr 0, we should adjust the size to reflect it.
|
256647 |
16-Oct-2013 |
ian |
Invalidate the entire L2 cache before enabling it. Say whether it has been enabled or disabled.
|
256638 |
16-Oct-2013 |
ian |
Add cases for the combinations of busdma sync op flags that we handle correctly by doing nothing, then add a panic for the default case, because that implies that some driver asked for a sync (probably incorrectly) and nothing was done.
|
256637 |
16-Oct-2013 |
ian |
When calculating the number of bounce pages needed, round the maxsize up to a multiple of PAGE_SIZE, and add one page because there can always be one more boundary crossing than the number of pages in the transfer.
|
256629 |
16-Oct-2013 |
br |
Add CPU ID for ARM Cortex A5.
Approved by: cognet (mentor)
|
256628 |
16-Oct-2013 |
ian |
Fix a register name typo. The effect was that CPU_CONTROL_AFLT_ENABLE wasn't being set, but it was almost assuredly already turned on anyway by the bootloader.
|
256511 |
15-Oct-2013 |
kevlo |
Remove unsigned comparison < 0
Found by: LLVM Reviewed by: zbb
|
256291 |
10-Oct-2013 |
dim |
In sys/arm/versatile/versatile_pci.c, add a default handler, to fix a gcc warning about uninitialized use of a variable.
Approved by: re (gjb)
|
256196 |
09-Oct-2013 |
dim |
Remove redundant redeclarations of uart_s3c2410_class in sys/arm/s3c2xx0/uart_bus_s3c2410.c and uart_cpu_s3c2410.c, to silence two gcc warnings.
Approved by: re (gjb) X-MFC-With: r252394
|
255967 |
01-Oct-2013 |
br |
- Enable unmapped buffers on Exynos5 again, because board now able to see all the 2GB ram it has - Also unbreak gcc build
Approved by: cognet (mentor) Approved by: re (marius)
|
255816 |
23-Sep-2013 |
loos |
Fix DELAY() on RPi, the wrong math was making it take twice it should.
Reported by: Alexander <sht@ropnet.ru> Approved by: adrian (mentor) Approved by: re (gjb)
|
255786 |
22-Sep-2013 |
glebius |
- Create kern.ipc.sendfile namespace, and put the new "readhead" OID there as "kern.ipc.sendfile.readahead". - Push all nsfbuf related tunables into MD code. Don't move them to new namespace in favor of POLA.
Reviewed by: scottl Approved by: re (gjb)
|
255738 |
20-Sep-2013 |
zbb |
Fix GCC build for all ARMs. Revert bug introduced in r255613.
Previous change applied in r255613 fixed build for ARMv6 but broke it for previous architecture revisions. This commit eventually fixes GCC build for all ARM revisions.
Approved by: cognet (mentor) Approved by: re (kib)
|
255724 |
20-Sep-2013 |
alc |
The pmap function pmap_clear_reference() is no longer used. Remove it.
pmap_clear_reference() has had exactly one caller in the kernel for several years, more precisely, since FreeBSD 8. Now, that call no longer exists.
Approved by: re (kib) Sponsored by: EMC / Isilon Storage Division
|
255677 |
18-Sep-2013 |
pjd |
Fix panic in ktrcapfail() when no capability rights are passed. While here, correct all consumers to pass NULL instead of 0 as we pass capability rights as pointers now, not uint64_t.
Reported by: Daniel Peyrolon Tested by: Daniel Peyrolon Approved by: re (marius)
|
255613 |
16-Sep-2013 |
zbb |
Fix GCC build error when building for ARMv6
Apply theravens's idea to move __strong_reference macros into the proper ifdef section.
Approved by: cognet (mentor) Approved by: re
|
255612 |
16-Sep-2013 |
zbb |
Implement pmap_advise() for ARMv6/v7 pmap module
Apply the given advice to the specified range of addresses within the given pmap. Depending on the advice, clear the referenced and/or modified flags in each mapping. Superpage within the given range will be demoted or destroyed.
Reviewed by: alc Approved by: cognet (mentor) Approved by: re
|
255611 |
16-Sep-2013 |
zbb |
Write protect base page after superpage demotion so that it may repromote
When clearing the modification status of the superpage, one of the base pages produced during demotion should be marked as write disabled. The intention is that subsequent write access may repromote. In the current implementation this was done wrong as write permission was granted instead of forbidden.
Approved by: cognet (mentor) Approved by: re
|
255370 |
07-Sep-2013 |
loos |
Export a function to allow BCM2835's peripheral devices to enable their altenate pin function (from GPIO pins) as needed.
Approved by: adrian (mentor)
|
255361 |
07-Sep-2013 |
andrew |
On ARM EABI double precision floating point values are stored in the endian the CPU is in, i.e. little-endian on most ARM cores.
This allows ARMv4 and ARMv5 boards to boot with the ARM EABI.
|
255352 |
07-Sep-2013 |
glebius |
Fix of r255318: move sf_buf_alloc()/sf_buf_free() out of #ifdef ARM_USE_SMALL_ALLOC.
|
255334 |
06-Sep-2013 |
loos |
Fix an off-by-one bug in ar71xx_gpio and bcm2835_gpio which makes the last pin unavailable.
Reported and tested by: sbruno (ar71xx) Approved by: adrian (mentor) Pointy hat to: loos
|
255318 |
06-Sep-2013 |
glebius |
Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations to MD headers.
|
255151 |
02-Sep-2013 |
rpaulo |
Revert accidental commit.
|
255130 |
01-Sep-2013 |
rpaulo |
Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 boards.
There are many drivers missing, but we can reach single user mode now.
Hardware graciously donated by Douglas Beattie.
|
255092 |
31-Aug-2013 |
theraven |
Unconditionally compile the __sync_* atomics support functions into compiler-rt for ARM. This is quite ugly, because it has to work around a clang bug that does not allow built-in functions to be defined, even when they're ones that are expected to be built as part of a library.
Reviewed by: ed
|
255091 |
31-Aug-2013 |
rpaulo |
Fix a typo in a comment.
|
255028 |
29-Aug-2013 |
alc |
Significantly reduce the cost, i.e., run time, of calls to madvise(..., MADV_DONTNEED) and madvise(..., MADV_FREE). Specifically, introduce a new pmap function, pmap_advise(), that operates on a range of virtual addresses within the specified pmap, allowing for a more efficient implementation of MADV_DONTNEED and MADV_FREE. Previously, the implementation of MADV_DONTNEED and MADV_FREE relied on per-page pmap operations, such as pmap_clear_reference(). Intuitively, the problem with this implementation is that the pmap-level locks are acquired and released and the page table traversed repeatedly, once for each resident page in the range that was specified to madvise(2). A more subtle flaw with the previous implementation is that pmap_clear_reference() would clear the reference bit on all mappings to the specified page, not just the mapping in the range specified to madvise(2).
Since our malloc(3) makes heavy use of madvise(2), this change can have a measureable impact. For example, the system time for completing a parallel "buildworld" on a 6-core amd64 machine was reduced by about 1.5% to 2.0%.
Note: This change only contains pmap_advise() implementations for a subset of our supported architectures. I will commit implementations for the remaining architectures after further testing. For now, a stub function is sufficient because of the advisory nature of pmap_advise().
Discussed with: jeff, jhb, kib Tested by: pho (i386), marcel (ia64) Sponsored by: EMC / Isilon Storage Division
|
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
|
254915 |
26-Aug-2013 |
raj |
Provide settings for superpage reservation system on ARM.
This allows for enabling and configuring superpages reservation mechanism in order to allocate and populate 256 4KB base pages (for the purpose of promotion to a 1MB superpage).
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf
|
254913 |
26-Aug-2013 |
raj |
Add missing TAILQ initializer (omitted in r250634).
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf
|
254902 |
26-Aug-2013 |
andrew |
Update the root device to be correct for use with crochet.
|
254901 |
26-Aug-2013 |
andrew |
Revert r251370 as it contains a deadlock.
|
254847 |
25-Aug-2013 |
andrew |
Add the frame information to cpu_switch to allow us to unwind out of it, for example when dumping threads in the kernel debugger.
|
254845 |
25-Aug-2013 |
andrew |
Add the unwind information to irq_entry so we can pass through it when unwinding the stack.
|
254667 |
22-Aug-2013 |
kib |
Revert r254501. Instead, reuse the type stability of the struct pmap which is the part of struct vmspace, allocated from UMA_ZONE_NOFREE zone. Initialize the pmap lock in the vmspace zone init function, and remove pmap lock initialization and destruction from pmap_pinit() and pmap_release().
Suggested and reviewed by: alc (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation
|
254598 |
21-Aug-2013 |
ian |
Add support for uarts other than the serial console in TI OMAP SoCs.
The TI uart hardware is ns16550-compatible, except that before it can be used the clocks and power have to be enabled and a non-standard mode control register has to be set to put the device in uart mode (as opposed to irDa or other serial protocols). This adds the extra code in an extension to the standard ns8250 probe routine, and the rest of the driver is just the standard ns8250 code.
|
254593 |
21-Aug-2013 |
ian |
Make the noop clock successfully do nothing, because doing nothing and returning an error status (which the NULL method pointers caused) isn't nearly as useful.
|
254592 |
21-Aug-2013 |
ian |
Define the uart clocks so that they can be en/disabled at runtime.
|
254580 |
20-Aug-2013 |
andrew |
Enable VFP on ARMADA XP.
|
254559 |
20-Aug-2013 |
ian |
Make the standard sdhci(4) driver work for the TI OMAP family SoCs. The MMCHS hardware is pretty much a standard SDHCI v2.0 controller with a couple quirks, which are now supported by sdhci(4) as of r254507.
This should work for all TI SoCs that use the MMCHS hardware, but it has only been tested on AM335x right now, so this enables it on those platforms but leaves the existing ti_mmchs driver in place for other OMAP variants until they can be tested.
This initial incarnation lacks DMA support (coming soon). Even without it this improves performance pretty noticibly over the ti_mmchs driver, primarily because it now does multiblock IO.
|
254542 |
19-Aug-2013 |
andrew |
Enable VFP on the Zedboard.
|
254536 |
19-Aug-2013 |
raj |
Do not use pv_kva on ARMv6/v7 and save some space on each vm_page. It's only relevant for older ARM variants (with virtual cache).
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf
|
254535 |
19-Aug-2013 |
raj |
Simplify and clean up pmap_clearbit()
There is no need for calling vm_page_dirty() when clearing "modified" flag as it is already set for that page in pmap_fault_fixup() or pmap_enter() thanks to "modified" bit emulation.
Also, there is no need for checking PTE "referenced" or "writeable" flags. If there is a request to clear a particular flag we should just do it.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf
|
254533 |
19-Aug-2013 |
raj |
Fix ARMv6/v7 mapping's wired status.
Last input argument in pmap_modify_pv() should be a mask of flags to be set. In pmap_change_wiring() however, the straight wired status was used, which does not represent valid flags (and is of type boolean).
This commit fixes the issue so that wired flag is passed to pmap_modify_pv() properly.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf
|
254532 |
19-Aug-2013 |
raj |
Clear all L2 PTE protection bits before their configuration.
Revise L2_S_PROT_MASK to include all of the protection bits. Notice that clearing these bits does not always take away the corresponding permissions (for example, permission is granted when the bit is cleared). The bits are cleared but are to be set or left cleared accordingly in pmap_set_prot(), pmap_enter_locked(), etc.
Clear L2_XN along with L2_S_PROT_MASK in pmap_set_prot() so that all permissions related bits are cleared before actual configuration.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf
|
254531 |
19-Aug-2013 |
raj |
Simplify pv_entry removal or ARMv6/v7:
- PGA_WRITEABLE indicates that there *might be* a writable mapping for the particular page, so to avoid frequent sweeping of the pv_entries whenever pmap_nuke_pv(), pmap_modify_pv(), etc. is called, it is sufficient to clear that flag if there are no managed mappings for that page anymore (notice that only pmap_enter is authorized to set this flag). - Avoid redundant checking for PVF_WIRED flag when this flag cannot be set anyway. - Clear PGA_WRITEABLE only once for each vm_page instead of multiple, redundant clearing it in loop when there are no writeable mappings to that page anymore.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf
|
254514 |
19-Aug-2013 |
andrew |
Enable VFP on the Arndale Board.
|
254495 |
18-Aug-2013 |
cognet |
Increase the max KVA available for general consumption on the Exynos 5.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
254494 |
18-Aug-2013 |
andrew |
Enable VFP in the Versatile PB (QEMU) kernel. Tested on QEMU 1.6.0.
|
254493 |
18-Aug-2013 |
andrew |
Enable VFP on the CubieBoard and CubieBoard 2.
|
254487 |
18-Aug-2013 |
andrew |
Enable VFP support on EFIKA MX.
|
254464 |
17-Aug-2013 |
ian |
Enable VFP support for BeagleBone.
|
254461 |
17-Aug-2013 |
andrew |
Rename device vfp to option VFP and retire the ARM_VFP_SUPPORT option. This 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.
|
254454 |
17-Aug-2013 |
andrew |
Remove the ARMFPE option. It is unsupported, and appears to be broken as arm_fpe_core_changecontext is not a function.
|
254452 |
17-Aug-2013 |
andrew |
Remove fpe_sp_state as we don't support fpe.
|
254451 |
17-Aug-2013 |
andrew |
Remove unused FPE code. This is not enabled anywhere as it is the only file I can find containing FAST_FPE. It appears this would not work as want_resched is not defined anywhere.
|
254299 |
13-Aug-2013 |
ian |
Rename imx_machdep.c to imx51_machdep.c, because it contains hardware addresses which are specific to the imx51 chips.
|
254281 |
13-Aug-2013 |
ian |
Add imx6 compatibility and make the driver work for any clock frequency.
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
|
254229 |
11-Aug-2013 |
cognet |
Only allocate 2 bounce pages for maps that can only use them for buffers that are unaligned on cache lines boundary, as we will never need more.
|
254172 |
10-Aug-2013 |
cognet |
Use the correct address when calling kva_free()
Pointy hat to: cognet Spotted out by: alc
|
254171 |
10-Aug-2013 |
cognet |
- The address lies in the bus space handle, not in the cookie - 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)
|
254166 |
09-Aug-2013 |
cognet |
Instead of just trying to do it for arm, make sure vm_kmem_size is properly aligned in kmeminit(), where it'll work for any arch.
Suggested by: alc
|
254165 |
09-Aug-2013 |
cognet |
- The address lies in the bus space handle, not in the cookie - Use the right address when calling kva_free()
|
254164 |
09-Aug-2013 |
cognet |
Make sure vm_kmem_size is aligned on a page boundary, since that's what vmem expects.
|
254138 |
09-Aug-2013 |
attilio |
The soft and hard busy mechanism rely on the vm object lock to work. 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
|
254061 |
07-Aug-2013 |
cognet |
Don't bother trying to work around buffers which are not aligned on a cache 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)
|
254056 |
07-Aug-2013 |
ganbold |
Bring initial support for Allwinner A20 SoC (Cubieboard2). 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@
|
254025 |
07-Aug-2013 |
jeff |
Replace kernel virtual address space allocation with vmem. This provides 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
|
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.
|
253971 |
05-Aug-2013 |
cognet |
Let the platform calculate the timer frequency at runtime, and use that for the omap4, instead of relying on the (wrong) value provided in the dts.
|
253968 |
05-Aug-2013 |
andrew |
When entering exception handlers we may not have an aligned stack. This is 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.
|
253914 |
03-Aug-2013 |
ian |
Tweak the imx debug console code so that it works with multiple SoCs.
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.
|
253896 |
02-Aug-2013 |
cognet |
Only receive the interrupts on the first core, to avoid duplicate interrupts.
|
253857 |
01-Aug-2013 |
ganbold |
Add identification for Cortex-A7 (R0) cores.
Reviewed by: cognet@
|
253845 |
31-Jul-2013 |
obrien |
Back out r253779 & r253786.
|
253830 |
31-Jul-2013 |
rpaulo |
Initialisation routines for the mailbox, spinlock and PRU-ICSS clocks.
|
253788 |
29-Jul-2013 |
cognet |
The errata 727915 requires a different workaround for r2p0, we have to explicitely clean/invalidate every cache line using way/set operations.
|
253787 |
29-Jul-2013 |
cognet |
Remove useless cache operations.
|
253779 |
29-Jul-2013 |
obrien |
Decouple yarrow from random(4) device.
* 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
|
253768 |
29-Jul-2013 |
cognet |
Explicitely include <machine/pcb.h>, so that we get the definition of struct pcb.
Submitted by: Zbyszek Bodek <zbb@semihalf.com> Pointy hat to: cognet
|
253762 |
29-Jul-2013 |
cognet |
Define KDB_STOPPEDPCB, so that we can access the backtraces of threads running on other cores.
|
253750 |
28-Jul-2013 |
avg |
Revert r253748,253749
This WIP should not have been committed yet.
Pointyhat to: avg
|
253748 |
28-Jul-2013 |
avg |
put contents of cpu.h under _KERNEL
no userland-serviceable parts inside
MFC after: 20 days
|
253746 |
28-Jul-2013 |
ian |
Rename the existing std.imx and imx.files to std.imx51 and files.imx51, to pave the way for adding imx6 support.
|
253635 |
25-Jul-2013 |
rpaulo |
Revert ROOTDEVNAME change from previous commit.
|
253634 |
25-Jul-2013 |
rpaulo |
Enable modules for the BeagleBone and for the Raspberry Pi.
|
253489 |
20-Jul-2013 |
andrew |
Start adding support to build bits of our code using the Thumb-2 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.
|
253400 |
16-Jul-2013 |
andrew |
Fix vfp: - 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.
|
253355 |
15-Jul-2013 |
rpaulo |
Move the Raspberry Pi low level options out of the kernel config and into std.rpi + std.bcm2835.
Reviewed by: imp
|
253351 |
15-Jul-2013 |
ae |
Introduce new structure sfstat for collecting sendfile's statistics and remove corresponding fields from struct mbstat. Use PCPU counters and SFSTAT_INC() macro for update these statistics.
Discussed with: glebius
|
253309 |
13-Jul-2013 |
rpaulo |
Indent the "scp=... rlv=..." to make it easier to read the backtrace.
|
253142 |
10-Jul-2013 |
ray |
Remove trailing whitespaces.
|
253053 |
09-Jul-2013 |
rpaulo |
Improve a comment.
|
253052 |
09-Jul-2013 |
emaste |
Remove extraneous format string converison specifier
Submitted by: wxs@
|
253025 |
08-Jul-2013 |
gonzo |
Add IDs for TPS65217C and TPS65217D
|
253023 |
08-Jul-2013 |
gonzo |
- AM335x requires updated soft-reset logic too
|
253006 |
07-Jul-2013 |
rpaulo |
Convert bcm2835_mbox to the new mbox interface.
Reviewed by: gonzo
|
253005 |
07-Jul-2013 |
rpaulo |
Another warning.
|
252997 |
07-Jul-2013 |
rpaulo |
armadaxp_idcache_wbinv_all() is in this file.
|
252996 |
07-Jul-2013 |
rpaulo |
Fix all the compiler warnings in elf_trampoline.c.
|
252915 |
07-Jul-2013 |
gonzo |
- Add USFS driver as an example of device mode for AM335x-based devices
|
252913 |
07-Jul-2013 |
gonzo |
- Add USBSS driver for AM335x SoC. Driver is a wrapper around Mentors Graphic USB OTG core.
|
252863 |
06-Jul-2013 |
rpaulo |
Don't clear the SYSCONFIG register on boot.
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.
|
252837 |
05-Jul-2013 |
andrew |
Fix the build with gcc.
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.
|
252780 |
05-Jul-2013 |
ray |
o Make fields names short. o Slim down reg fields comments.
|
252722 |
04-Jul-2013 |
gonzo |
Add support for ePWM submodule of PWMSS
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
|
252695 |
04-Jul-2013 |
gber |
Remove redundant clearing of the PGA_WRITEABLE flag in 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
|
252694 |
04-Jul-2013 |
gber |
Fix modified bit emulation for ARMv6/v7
When doing pmap_enter_locked(), enable write permission only when access type indicates attempt to write. Otherwise, leave the page read only but mark it writable in pv_flags.
This will result in: 1. Marking page writable during pmap_enter() but only when ensured that it will be written right away so that we will not get redundant permissions fault on write attempt. 2. Keeping page read only when it is permitted to be written but there was no actual write attempt. Hence, we will get permissions fault on write access and mark page writable in pmap_fault_fixup() what will indicate modification status.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
|
252652 |
03-Jul-2013 |
gonzo |
Fix one of INVARIANTS-related UMA panics on ARM
Force UMA zone to allocate service structures like slabs using own allocator. uma_debug code performs atomic ops on uma_slab_t fields and safety of this operation is not guaranteed for write-back caches
|
252522 |
02-Jul-2013 |
andrew |
Enable VFP on Raspberry Pi. This has worked as of r251712.
|
252473 |
01-Jul-2013 |
tuexen |
Enable SCTP, since it is also enabled on GENERIC and it works fine on the Raspberry Pi.
Discussed with: rpaulo
|
252450 |
01-Jul-2013 |
rpaulo |
The mbox driver is actually MP safe, so set the right flag in bus_setup_intr().
|
252449 |
01-Jul-2013 |
rpaulo |
Disable debugging.
|
252440 |
01-Jul-2013 |
rpaulo |
Use the new FDT_FILE rpi.dts.
|
252434 |
01-Jul-2013 |
kib |
Fix issues with zeroing and fetching the counters, on x86 and ppc64. Issues were noted by Bruce Evans and are present on all architectures.
On i386, a counter fetch should use atomic read of 64bit value, otherwise carry from the increment on other CPU could be lost for the given fetch, making error of 2^32. If 64bit read (cmpxchg8b) is not available on the machine, it cannot be SMP and it is enough to disable preemption around read to avoid the split read.
On x86 the counter increment is not atomic on purpose, which makes it possible for the store of the incremented result to override just zeroed per-cpu slot. The effect would be a counter going off by arbitrary value after zeroing. Perform the counter zeroing on the same processor which does the increments, making the operations mutually exclusive. On i386, same as for the fetching, if the cmpxchg8b is not available, machine is not SMP and we disable preemption for zeroing.
PowerPC64 is treated the same as amd64.
For other architectures, the changes made to allow the compilation to succeed, without fixing the issues with zeroing or fetching. It should be possible to handle them by using the 64bit loads and stores atomic WRT preemption (assuming the architectures also converted from using critical sections to proper asm). If architecture does not provide the facility, using global (spin) mutex would be non-optimal but working solution.
Noted by: bde Sponsored by: The FreeBSD Foundation
|
252432 |
30-Jun-2013 |
rpaulo |
Add INET6.
|
252427 |
30-Jun-2013 |
ray |
Replace some spaces to tab.
|
252425 |
30-Jun-2013 |
ray |
Decrypt magic numbers - define names for fields of Generic Timer's CNTKCTL reg.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
252424 |
30-Jun-2013 |
cognet |
In generic_bs_map(), use kmem_alloc_nofault() instead of kmem_alloc(), as we only need virtual addresses.
Submitted by: alc
|
252396 |
30-Jun-2013 |
ray |
Arndale Board (by Insignal) kernel config file. More info on the Wiki page https://wiki.freebsd.org/FreeBSD/arm/ArndaleBoard
Submitted by: Ruslan Bukin <br@bsdpad.com> Reviewed by: gonzo
|
252395 |
30-Jun-2013 |
gonzo |
- Fix IMAPx registers values calculation - Initialize SMAPx registers too although they're unused in QEMU - Do not pass IO/MEM resources to upper bus for activation, handle them locally. Previously ACTIVATE method of upper bus was no-op so nothing bad happened. But now FDT maps physaddr to vaddr and it causes troubles: fdtbus_activate_resource resource assumes that bustag/bushandle are already set which in this case is wrong.
|
252393 |
29-Jun-2013 |
gonzo |
Enable patth-through of IRQ30 and IRQ31 to PIC just as comment states
|
252391 |
29-Jun-2013 |
ray |
Import basic support for Samsung Exynos 5 support.
Submitted by: Ruslan Bukin <br@bsdpad.com> Reviewed by: gonzo
|
252372 |
29-Jun-2013 |
ray |
Add ARM Generic Timer driver.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
252370 |
29-Jun-2013 |
ray |
o Initialize interrupt groups as Group 0 (secure interrupts). o Minor cleanup.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
252362 |
28-Jun-2013 |
ray |
Bump max number of IRQs for Cortex-Ax family to cover Exynos5 requirement.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
252361 |
28-Jun-2013 |
ray |
Add identification for Cortex-A15 (R0) cores.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
252320 |
27-Jun-2013 |
andrew |
Support reading registers r0-r3 when unwinding. There is a seperate instruction to load these. We only hit it when unwinding past an trap frame as in C r0-r3 would never have been saved onto the stack.
|
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.
|
252282 |
27-Jun-2013 |
gonzo |
- Request non-cached memory for framebuffer - Properly probe/initialize syscons
|
252229 |
26-Jun-2013 |
rpaulo |
Print the 'setting internal ...' message only with bootverbose.
|
251781 |
15-Jun-2013 |
ed |
Make support for atomics on ARM complete.
Provide both __sync_*-style and __atomic_*-style functions that perform the atomic operations on ARMv5 by using Restartable Atomic Sequences.
While there, clean up some pieces of code where it's sufficient to use regular uint32_t to store register contents and don't need full reg_t's. Also sync this back to the MIPS code.
|
251712 |
13-Jun-2013 |
andrew |
Fix the vfp code to work with the 16 register variants of the VFP unit. We check which variant we are on, and if it is a VFPv3 or v4, and has 32 double registers we save these. This fixes VFP support on Raspberry Pi.
While here clean fmrx and fmxr up to use the register names from vfp.h as opposed to the raw register names.
|
251695 |
13-Jun-2013 |
ed |
Add C11 atomic fallbacks for ARM.
Basically the situation is as follows:
- When using Clang + armv6, we should not need any intrinsics. It should support it, even though due to a target misconfiguration it does not. We should fix this in Clang. - When using Clang + noarmv6, provide __atomic_* functions that disable interrupts. - When using GCC + armv6, we can provide __sync_* intrinsics, similar to what we did for MIPS. As ARM and MIPS are quite similar, simply base this implementation on the one I did for MIPS. - When using GCC + noarmv6, disable the interrupts, like we do for Clang.
This implementation still lacks functions for noarmv6 userspace. To be done.
|
251586 |
09-Jun-2013 |
cognet |
Increase the maximum KVM available on TI chips. Not sure why we suddenly need that much, but that lets me boot with 1GB of RAM.
|
251517 |
08-Jun-2013 |
andrew |
Merge in changes from NetBSD: * Remove support for non-elf files. * Add the VFP setjmp magic numbers. * Add the offsets for the VFP registers within the buffer.
|
251510 |
07-Jun-2013 |
andrew |
Reduce the difference to NetBSD.
* Stop pretending we support anything other than ELF by removing code surrounded by #ifdef __ELF__ ... #endif. * Remove _JB_MAGIC_SETJMP and _JB_MAGIC__SETJMP, they are defined in setjmp.h, which is able to be included from asm. * Fix the spelling of dependent. * Rename END _END and add END and ASEND to complement ENTRY and ASENTRY respectively * Add macros to simplify accessing the Global Offset Table, some of these will be used in the upcoming update to the setjmp functions.
|
251371 |
04-Jun-2013 |
gber |
Fix the passing of time on Armada XP.
In order to become independent of Coherency Fabric frequency, configure Timer and Watchdog to operate in 25MHz mode.
Submitted by: Zbigniew Bodek <zbb@semihalf.com>
|
251370 |
04-Jun-2013 |
gber |
Implement pmap_copy() for ARMv6/v7.
Copy the given range of mappings from the source map to the destination map, thereby reducing the number of VM faults on fork.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
|
251018 |
27-May-2013 |
gonzo |
AM335x LCD controller driver with syscons support
Limitations: - Raster mode only - 24 and 32 bpp only
|
251017 |
27-May-2013 |
gonzo |
Add PWM module driver for AM335x. Only eCAS subsystem is supported
Export function to configure eCAS submodule from another drivers. It's used to control LCD panel backlight on AM335x EVM.
|
251016 |
27-May-2013 |
gonzo |
Add SCM registers definitions for AM335x platform
|
251015 |
27-May-2013 |
gonzo |
Add clock definitions for LCD controller and PWM module
|
250931 |
23-May-2013 |
gber |
Rework and organize pmap_enter_locked() function.
pmap_enter_locked() implementation was very ambiguous and confusing. Rearrange it so that each part of the mapping creation is separated. Avoid walking through the redundant conditions. Extract vector_page specific PTE setup from normal PTE setting.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
|
250930 |
23-May-2013 |
gber |
Stop using PVF_MOD, PVF_REF & PVF_EXEC flags in pv_entry, use PTE.
Using PVF_MOD, PVF_REF and PVF_EXEC is redundant as we can get the proper info from PTE bits. When the mapping is marked as executable and has been referenced we assume that it has been executed. Similarly, when the mapping is set to be writable and is referenced, it must have been due to write access to it. PVF_MOD and PVF_REF flags are kept just for pmap_clearbit() usage, to pass the information on which bit should be cleared.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
|
250929 |
23-May-2013 |
gber |
Improve, optimize and clean-up ARMv6/v7 memory management related code.
Use pmap_find_pv if needed instead of multiplying its code throughout pmap-v6.
Avoid possible NULL pointer dereference in pmap_enter_locked() When trying to get m->md.pv_memattr, make sure that m != NULL, in particular that vector_page is set to be NULL.
Do not set PGA_REFERENCED flag in pmap_enter_pv(). On ARM any new page reference will result in either entering the new mapping by calling pmap_enter, etc. or fixing-up the existing mapping in pmap_fault_fixup(). Therefore we set PGA_REFERENCED flag in the earlier mentioned cases and setting it later in pmap_enter_pv() is just waste of cycles.
Delete unused pm_pdir pointer from the pmap structure.
Rearrange brackets in the fault cause detection in trap.c Place the brackets correctly in order to see course of the conditions instantaneously.
Unify naming in pmap-v6.c and improve style Use naming common for whole pmap and compatible with other pmaps, improve style where possible: pm -> pmap pg -> m opg -> om *pt -> *ptep *pte -> *ptep *pde -> *pdep
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
|
250928 |
23-May-2013 |
gber |
Switch to AP[2:1] access permissions model. Store "referenced" bit in PTE.
Enable Access Flag in CPU control. With AF enabled each valid mapping needs to have referenced bit in PTE set in order to be able to cache it in the TLB.
AP[0] bit is to be used as reference flag. All access permissions are encoded by AP[2:1] wherein AP[1] is in fact "user enable" and AP[2](APX) is "write disable".
All mappings are always set to be valid. Reference emulation is performed by setting/clearing reference flag in PTE.
md.pvh_attrs are no longer necessary however pv_flags are still being used for now.
Marking vm_page as "dirty" or "referenced" is being performed on: - page or flag fault servicing in pmap_fault_fixup(), basing on the fault type - vm_fault servicing in pmap_enter() according to the desired protections and faulty access type Redundant page marking has been removed as on ARM we know exactly when the particular page is referenced or is going to be written.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Sponsored by: The FreeBSD Foundation, Semihalf
|
250884 |
21-May-2013 |
attilio |
o Relax locking assertions for vm_page_find_least() o Relax locking assertions for pmap_enter_object() and add them also to architectures that currently don't have any o Introduce VM_OBJECT_LOCK_DOWNGRADE() which is basically a downgrade operation on the per-object rwlock o Use all the mechanisms above to make vm_map_pmap_enter() to work mostl of the times only with readlocks.
Sponsored by: EMC / Isilon storage division Reviewed by: alc
|
250810 |
19-May-2013 |
andrew |
Add a comment explaining why stack_capture is empty for EABI and clang.
While here add a comment pointing out that, while r11 is not the frame pointer on EABI as there is no frame pointer, it's value is unused so is safe.
|
250791 |
18-May-2013 |
kientzle |
Back out r250768 until I can further investigate why it might be causing problems with the BeagleBone Black boot.
|
250768 |
18-May-2013 |
kientzle |
Label the mmc child after the parent.
|
250742 |
17-May-2013 |
rpaulo |
Revert r250692. We'll use 1 kernel config file for the BeagleBone models.
|
250695 |
16-May-2013 |
gber |
Fix L2 cache write-back invalidate for Sheeva core.
Submitted by: Michal Dubiel Obtained from: Netasq, Semihalf
|
250692 |
16-May-2013 |
rpaulo |
Add a kernel config file for the BeableBone Black SoC.
|
250634 |
14-May-2013 |
gber |
Port the new PV entry allocator from amd64/i386/mips to armv6/v7.
PV entries are now roughly half the size. Instead of using a shared UMA zone for 28 byte pv entries (two 8-byte tailq nodes, a 4 byte pointer, a 4 byte address and 4 byte flags), we allocate a page at a time per process. This provides 252 pv entries per process (actually, per pmap address space) and eliminates one of the 8-byte tailq entries since we now can track per-process pv entries implicitly. The pointer to the pmap can be eliminated by doing address arithmetic to find the metadata on the page headers to find a single pointer shared by all 252 entries. There is an 8-int bitmap for the freelist of those 252 entries. When in serious low memory condition, allocation of another pv_chunk is possible by freeing some pages in pmap_pv_reclaim().
Added pv_entry/pv_chunk related statistics to pmap. pv_entry/pv_chunk statistics can be accessed via sysctl vm.pmap.
Ported PTE freelist of KVA allocation and maintenance from i386. Using an idea from Stephan Uphoff, use the empty pte's that correspond to the unused kva in the pv memory block to thread a freelist through. This allows us to free pages that used to be used for pv entry chunks since we can now track holes in the kva memory block.
As both ARM pmap.c and pmap-v6.c use the same header and pv_entry, pmap and md_page structures are different, it was needed to separate code designed for ARMv6/7 from the one for other ARMs.
Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf
|
250544 |
12-May-2013 |
peter |
Tidy up some CVS workarounds.
|
250531 |
11-May-2013 |
kientzle |
Don't use the old stack-walking code with EABI ARM kernels or clang-compiled ARM kernels.
This fixes a crash seen in clang-compiled ARM kernels that include WITNESS.
This code could be easily modified to walk the stack for current clang-generated code (including EABI) but Andrew Turner has raised concerns that the stack frame currently emitted by clang isn't actually required by EABI so such a change might cause problems down the road.
In case anyone wants to experiment, the change to support current clang-compiled kernels involves simply setting FR_RFP=0 and FR_SCP=1.
|
250357 |
08-May-2013 |
ray |
Update copyright date.
|
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
|
250324 |
07-May-2013 |
gber |
decode_win_sdram_fixup() function should be declared, defined and used only by Armada XP
Obtained from: Semihalf
|
250299 |
06-May-2013 |
gber |
Fix page reference emulation on ARMv6 and v7
Submitted by: Zbigniew Bodek Obtained from: Semihalf
|
250297 |
06-May-2013 |
gber |
Fix L2 PTE access permissions management.
Keep following access permissions:
APX AP Kernel User 1 01 R N 1 10 R R 0 01 R/W N 0 11 R/W R/W
Avoid using reserved in ARMv6 APX|AP settings: - In case of unprivileged (user) access without permission to write, the access permission bits were being set to reserved for ARMv6 (but valid for ARMv7) value of APX|AP = 111.
Fix-up faulting userland accesses properly: - Wrong condition statement in pmap_fault_fixup() caused that any genuine, unprivileged access was being fixed-up instead of just skip doing anything and return. Staring from now we ensure proper reaction for illicit user accesses.
L2_S_PROT_R and L2_S_PROT_U names might be misleading as they do not reflect real permission levels. It will be clarified in following patches (switch to AP[2:1] permissions model).
Obtained from: Semihalf
|
250296 |
06-May-2013 |
gber |
Correct comment about initial VA=>PA mapping
|
250295 |
06-May-2013 |
gber |
Disable decoding windows with no FDT entry.
- On ARMADAXP B0 (GP development board) we are not able to use PCI due to whole 32-bit address space used by 4GB of RAM memory. - Change is required to destroy unnecessary window to free address space for PCI and other devices - Fix offset value for SDRAM decoding windows
Obtained from: Semihalf
|
250294 |
06-May-2013 |
gber |
Avoid calling pcpu_init() simultaneously.
pcpu_init() updates queue, so cannot be called by multiple cores at the same time
Obtained from: Semihalf
|
250293 |
06-May-2013 |
gber |
Properly initialize Armada XP MP subsystem.
- correct setting of Auxiliary Control Register for MP mode - correct setting of Auxiliarty Debug registers - cleanup management of memory contains bootup code - early initialization of Coherency Fabric (MP and not-MP mode) - enable Snoop Filtering
Obtained from: Semihalf
|
250292 |
06-May-2013 |
gber |
Initialize L2 cache for Armada XP.
Obtained from: Semihalf
|
250291 |
06-May-2013 |
gber |
Move initialization of CESA decoding windows from common section to driver specific files.
- window initialization is done during device attach - CESA TDMA decoding windows values are set based on DTS, not copied from CPU registers - remove unnecessary virtual mapping - update dts file
Obtained from: Semihalf
|
250255 |
04-May-2013 |
kientzle |
Make a debugging printf a little more useful.
|
250254 |
04-May-2013 |
ian |
Fix comment block formatting.
|
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.
|
250252 |
04-May-2013 |
ian |
EABI unwinder enhancements... When it's time to stop unwinding, don't exit the loop until after printing info about the current frame. Also, if executing the unwind function for a frame doesn't change the values of any registers, log that and exit the loop rather than looping endlessly.
|
250131 |
01-May-2013 |
eadler |
Correct a few sizeof()s
Submitted by: swildner@DragonFlyBSD.org Reviewed by: alfred
|
250015 |
28-Apr-2013 |
wkoszek |
Bring copyright changes with the agreement of Thomas Skibo.
Communication on src-commiters, Sat, 27 Apr 2013 22:09:06 -0700, Subject was: "Re: svn commit: r249997"
As I'm here, fix the style main block comments in files' headers.
|
249999 |
27-Apr-2013 |
wkoszek |
Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.
Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net> Tested by: wkoszek (ZedBoard) Reviewed by: wkoszek, freebsd-arm@ (no objections raised)
|
249997 |
27-Apr-2013 |
wkoszek |
Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.
Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net> Reviewed by: wkoszek, freebsd-arm@ (no objections raised)
|
249762 |
22-Apr-2013 |
dmarion |
Initialize GIC_PMRR register on ARM GIC.
Provided by: Thomas Skibo
|
249586 |
17-Apr-2013 |
gabor |
- Correct mispellings of word resource
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
|
249582 |
17-Apr-2013 |
gabor |
- Correct mispellings of the word occurrence
Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
|
249449 |
13-Apr-2013 |
dim |
Fix undefined behaviour in several gpio_pin_setflags() routines (under sys/arm and sys/mips), squelching the clang 3.3 warnings about this.
Noticed by: tinderbox and many irate spectators Submitted by: Luiz Otavio O Souza <loos.br@gmail.com> PR: kern/177759 MFC after: 3 days
|
249410 |
12-Apr-2013 |
trasz |
Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' and kern.cam.ctl.disable tunable; those were introduced as a workaround to make it possible to boot GENERIC on low memory machines.
With ctl(4) being built as a module and automatically loaded by ctladm(8), this makes CTL work out of the box.
Reviewed by: ken Sponsored by: FreeBSD Foundation
|
249268 |
08-Apr-2013 |
glebius |
Merge from projects/counters: counter(9).
Introduce counter(9) API, that implements fast and raceless counters, provided (but not limited to) for gathering of statistical data.
See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html for more details.
In collaboration with: kib Reviewed by: luigi Tested by: ae, ray Sponsored by: Nginx, Inc.
|
249265 |
08-Apr-2013 |
glebius |
Merge from projects/counters:
Pad struct pcpu so that its size is denominator of PAGE_SIZE. This is done to reduce memory waste in UMA_PCPU_ZONE zones.
Sponsored by: Nginx, Inc.
|
249232 |
07-Apr-2013 |
hselasky |
Fix regression issue after r248910.
PR: arm/177685 Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
|
249181 |
06-Apr-2013 |
gonzo |
Properly clean "spurious interrupt" state
Suggested by: Ian Lepore
|
249180 |
06-Apr-2013 |
andrew |
Hide non-assembler bits behind #ifndef __ASSEMBLER__
|
249176 |
05-Apr-2013 |
andrew |
Add the hw.floatingpoint sysctl to ARM to tell us if we have vfp support in the kernel and the hardware includes a vfp unit.
|
249083 |
04-Apr-2013 |
mav |
Remove all legacy ATA code parts, not used since options ATA_CAM enabled in most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM.
No objections: current@, stable@ MFC after: never
|
248965 |
01-Apr-2013 |
ian |
Fix low-level uart drivers that set their fifo sizes in the softc too late.
uart(4) allocates send and receiver buffers in attach() before it calls the low-level driver's attach routine. Many low-level drivers set the fifo sizes in their attach routine, which is too late. Other drivers set them in the probe() routine, so that they're available when uart(4) allocates buffers. This fixes the ones that were setting the values too late by moving the code to probe().
|
248964 |
01-Apr-2013 |
ian |
Enable hardware flow control and high speed bulk data transfer in at91 uarts.
Changes to make rtc/cts flow control work...
This does not turn on the builtin hardware flow control on the SoC's usart device, because that doesn't work on uart1 due to a chip erratum (they forgot to wire up pin PA21 to RTS0 internally). Instead it uses the hardware flow control logic where the tty layer calls the driver to assert and de-assert the flow control lines as needed. This prevents overruns at the tty layer (app doesn't read fast enough), but does nothing for overruns at the driver layer (interrupts not serviced fast enough).
To work around the wiring problem with RTS0, the driver reassigns that pin as a GPIO and controls it manually. It only does so if given permission via hint.uart.1.use_rts0_workaround=1, to prevent accidentally driving the pin if uart1 is used without flow control (because something not related to serial IO could be wired to that pin).
In addition to the RTS0 workaround, driver changes were needed in the area of reading the current set of DCE signals. A priming read is now done at attach() time, and the interrupt routine now sets SER_INT_SIGCHG when any of the DCE signals change. Without these changes, nothing could ever be transmitted, because the tty layer thought CTS was de-asserted (when in fact we had just never read the status register, and the hwsig variable was init'd to CTS de-asserted).
Changes to support bulk high-speed (230kbps and higher) data reception...
Allow the receive fifo size to be tuned with hint.uart.<dev>.fifo_bytes. For high speed receive, a fifo size of 1024 works well. The default is still 128 bytes if no hint is provided. Using a value larger than 384 requires a change in dev/uart/uart_core.c to size the intermediate buffer as MAX(384, 3*sc->sc_rxfifosize).
Recalculate the receive timeout whenever the baud rate changes. At low baud rates (19.2kbps and below) the timeout is the number of bits in 2 characters. At higher speed it's calculated to be 500 microseconds worth of bits. The idea is to compromise between being responsive in interactive situations and not timing out prematurely during a brief pause in bulk data flow. The old fixed timeout of 1.5 characters was just 32 microseconds at 460kbps.
At interrupt time, check for receiver holding register overrun status and set the corresponding status bit in the return value.
When handling a buffer overrun, get a single buffer emptied and handed back to the hardware as quickly as possible, then deal with the second buffer. This at least minimizes data loss compared to the old logic that fully processed both buffers before restarting the hardware.
Rewrite the logic for handling buffers after a receive timeout. The original author speculated in a comment that there may be a race with high speed data. There was, although it was rare. The code now handles all three possible scenarios on receive timeout: two empty buffers, one empty and one partial buffer, or one full and one partial buffer.
Reviewed by: imp
|
248961 |
31-Mar-2013 |
ian |
When running on armv6, set alignment checking to modulo-4 mode rather than modulo-8, because clang emits ldrd and strd instructions for addresses that are only 4-byte aligned.
|
248944 |
31-Mar-2013 |
ian |
Fix a typo in the CF device driver name that prevented instantiation.
|
248911 |
29-Mar-2013 |
ian |
Add userland access to at91 gpio functionality via ioctl calls. Also, add the ability for userland to be notified of changes on gpio pins via a select(2)/read(2) interface.
Change the interrupt handler from filtered to threaded.
Because of the uiomove() calls in the new interface, change locking from standard mutex to sx.
Add / restore the at91_gpio_high_z() function.
Reviewed by: imp (long ago)
|
248910 |
29-Mar-2013 |
ian |
Change the API for at91_pio_gpio_get() to return the entire masked set of bits, not just a 0/1 indicating whether any of the masked bits are on. This is compatible with the single in-tree caller of this function right now (at91_vbus_poll() in dev/usb/controller/at91dci_atemelarm.c).
|
248909 |
29-Mar-2013 |
ian |
Call soc_info.soc_data->soc_clock_init() before at91_pmc_init_clock(), so that the latter correctly fills in the clock data structures based on proper hardware-specific shift and mask values from the soc_data structure.
|
248907 |
29-Mar-2013 |
ian |
Add a couple forward declarations, so that board support routines don't have to pre-include a bunch of header files they don't need just to use this one.
|
248904 |
29-Mar-2013 |
ian |
Redo the workaround for at91rm9200 erratum #26 in a way that doesn't cause a lockup on some rm92 hardware.
|
248902 |
29-Mar-2013 |
ian |
Fix a typo: the RXD0 pin is PA18, not PA19.
|
248899 |
29-Mar-2013 |
ian |
Remove a really noisy printf left over from debugging hardware errata.
|
248655 |
23-Mar-2013 |
ian |
Don't check and warn about pmap mismatch on every call to busdma sync. With some recent busdma refactoring, sometimes it happens that a sync op gets called when bus_dmamap_load() never got called, which results in a spurious warning about a map mismatch when no sync operations will actually happen anyway. Now the check is done only if a sync operation is actually performed, and the result of the check is a panic, not just a printf.
Reviewed by: cognet (who prevented me from donning a point hat)
|
248585 |
21-Mar-2013 |
mav |
Minimal timer period of 100us introduced in r244758 is overkill. While original 2us are indeed not enough, 3us are working quite well on my tests. To be more safe set minimal period to 5us and to be even more safe replicate here from HPET mechanism of rereading counter after programming comparator.
This change allows to handle 30K of short nanosleep() calls per second on Raspberry Pi instead of just 8K before.
Discussed with: gonzo
|
248557 |
20-Mar-2013 |
ray |
Integrate Efika MX project back to home.
Sponsored by: The FreeBSD Foundation
|
248508 |
19-Mar-2013 |
kib |
Implement the concept of the unmapped VMIO buffers, i.e. buffers which do not map the b_pages pages into buffer_map KVA. The use of the unmapped buffers eliminate the need to perform TLB shootdown for mapping on the buffer creation and reuse, greatly reducing the amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30% of the system time on i/o intensive workloads.
The unmapped buffer should be explicitely requested by the GB_UNMAPPED flag by the consumer. For unmapped buffer, no KVA reservation is performed at all. The consumer might request unmapped buffer which does have a KVA reserve, to manually map it without recursing into buffer cache and blocking, with the GB_KVAALLOC flag.
When the mapped buffer is requested and unmapped buffer already exists, the cache performs an upgrade, possibly reusing the KVA reservation.
Unmapped buffer is translated into unmapped bio in g_vfs_strategy(). Unmapped bio carry a pointer to the vm_page_t array, offset and length instead of the data pointer. The provider which processes the bio should explicitely specify a readiness to accept unmapped bio, otherwise g_down geom thread performs the transient upgrade of the bio request by mapping the pages into the new bio_transient_map KVA submap.
The bio_transient_map submap claims up to 10% of the buffer map, and the total buffer_map + bio_transient_map KVA usage stays the same. Still, it could be manually tuned by kern.bio_transient_maxcnt tunable, in the units of the transient mappings. Eventually, the bio_transient_map could be removed after all geom classes and drivers can accept unmapped i/o requests.
Unmapped support can be turned off by the vfs.unmapped_buf_allowed tunable, disabling which makes the buffer (or cluster) creation requests to ignore GB_UNMAPPED and GB_KVAALLOC flags. Unmapped buffers are only enabled by default on the architectures where pmap_copy_page() was implemented and tested.
In the rework, filesystem metadata is not the subject to maxbufspace limit anymore. Since the metadata buffers are always mapped, the buffers still have to fit into the buffer map, which provides a reasonable (but practically unreachable) upper bound on it. The non-metadata buffer allocations, both mapped and unmapped, is accounted against maxbufspace, as before. Effectively, this means that the maxbufspace is forced on mapped and unmapped buffers separately. The pre-patch bufspace limiting code did not worked, because buffer_map fragmentation does not allow the limit to be reached.
By Jeff Roberson request, the getnewbuf() function was split into smaller single-purpose functions.
Sponsored by: The FreeBSD Foundation Discussed with: jeff (previous version) Tested by: pho, scottl (previous version), jhb, bf MFC after: 2 weeks
|
248467 |
18-Mar-2013 |
ray |
o Switch to use physical addresses in rman for FDT. o Remove vtophys used to translate virtual address to physical in case rman carry virtual.
Sponsored by: The FreeBSD Foundation
|
248430 |
17-Mar-2013 |
ian |
Eliminate an intermediate buffer and some memcpy() operations, and do DMA directly to/from the buffers passed in from higher layer drivers.
Reviewed by: gonzo
|
248407 |
17-Mar-2013 |
ian |
Add a macro that gets the physical address of a memory mapped device register from a bus space resource.
Note that this macro is just for ARM, and is intended to have a short lifespan. The DMA engines in some SoCs need the physical address of a memory-mapped device register as one of the arguments for the transfer. Several scattered ad-hoc solutions have been converted to use this macro, which now also serves to mark the places where a more complete fix needs to be applied (after that fix has been designed).
|
248366 |
16-Mar-2013 |
andrew |
Move the __aeabi_unwind_cpp_pr{0,1,2} functions to libkern so they can be referenced in a non-debug kernel.
|
248364 |
16-Mar-2013 |
andrew |
Implement the required but unused __aeabi_unwind_cpp_* functions in the trampoline kernel.
|
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.
|
248280 |
14-Mar-2013 |
kib |
Add pmap function pmap_copy_pages(), which copies the content of the pages around, taking array of vm_page_t both for source and destination. Starting offsets and total transfer size are specified.
The function implements optimal algorithm for copying using the platform-specific optimizations. For instance, on the architectures were the direct map is available, no transient mappings are created, for i386 the per-cpu ephemeral page frame is used. The code was typically borrowed from the pmap_copy_page() for the same architecture.
Only i386/amd64, powerpc aim and arm/arm-v6 implementations were tested at the time of commit. High-level code, not committed yet to the tree, ensures that the use of the function is only allowed after explicit enablement.
For sparc64, the existing code has known issues and a stab is added instead, to allow the kernel linking.
Sponsored by: The FreeBSD Foundation Tested by: pho (i386, amd64), scottl (amd64), ian (arm and arm-v6) MFC after: 2 weeks
|
248207 |
12-Mar-2013 |
glebius |
Functions m_getm2() and m_get2() have different order of arguments, and that can drive someone crazy. While m_get2() is young and not documented yet, change its order of arguments to match m_getm2().
Sorry for churn, but better now than later.
|
248189 |
12-Mar-2013 |
glebius |
Use m_get2() to get an mbuf of appropriate size.
Reviewed by: marius Sponsored by: Nginx, Inc.
|
248153 |
11-Mar-2013 |
cognet |
Don't use an empty struct.
|
248125 |
10-Mar-2013 |
andrew |
Fix a typo where db_printf was spelt printf.
|
248124 |
10-Mar-2013 |
andrew |
Update how we read the stack pointer to work on both GCC and clang.
|
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.
|
248119 |
10-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.
|
248084 |
09-Mar-2013 |
attilio |
Switch the vm_object mutex to be a rwlock. This will enable in the future further optimizations where the vm_object lock will be held in read mode most of the time the page cache resident pool of pages are accessed for reading purposes.
The change is mostly mechanical but few notes are reported: * The KPI changes as follow: - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK() - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK() - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK() - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED() (in order to avoid visibility of implementation details) - The read-mode operations are added: VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(), VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED() * The vm/vm_pager.h namespace pollution avoidance (forcing requiring sys/mutex.h in consumers directly to cater its inlining functions using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h consumers now must include also sys/rwlock.h. * zfs requires a quite convoluted fix to include FreeBSD rwlocks into the compat layer because the name clash between FreeBSD and solaris versions must be avoided. At this purpose zfs redefines the vm_object locking functions directly, isolating the FreeBSD components in specific compat stubs.
The KPI results heavilly broken by this commit. Thirdy part ports must be updated accordingly (I can think off-hand of VirtualBox, for example).
Sponsored by: EMC / Isilon storage division Reviewed by: jeff Reviewed by: pjd (ZFS specific review) Discussed with: alc Tested by: pho
|
248028 |
08-Mar-2013 |
kientzle |
This file is specific to arm11x6 processors, so tell the assembler it's okay to use arm11x6 instructions.
|
247864 |
06-Mar-2013 |
andrew |
Fix stack alignment in the kernel to be on an 8 byte boundary as required by AAPCS.
|
247855 |
05-Mar-2013 |
gonzo |
- Reset DMA channel if error occured - Initialize info field in bcm_dma_reset
Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>
|
247776 |
04-Mar-2013 |
cognet |
If we're using a PIPT L2 cache, only merge 2 segments if both the virtual and the physical addreses are contiguous.
Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>
|
247610 |
02-Mar-2013 |
andrew |
Move some virtual memory constants to the top of the file where they are on other architectures [1].
While here: - Remove an unused and commented out include. - Add a comment describing the file that other copies have. - Fix the style of the defines and add a comment on what each one is.
Suggested by: [1] alc
|
247609 |
02-Mar-2013 |
andrew |
Build the Raspberry Pi dtb file when building the kernel so we can copy it to the boot partition for U-Boot.
|
247608 |
02-Mar-2013 |
andrew |
Ensure the stack is correctly aligned before calling the first C function.
|
247587 |
01-Mar-2013 |
andrew |
Increase the maximum text size on ARM to 64MiB. Without this clang would be sent a SIGABRT when it is loaded as it is too large. This is the smallest power of two MiB value that allows us to execute clang.
While here wrap it in an #ifndef to be consistent with the other architectures.
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
|
247564 |
01-Mar-2013 |
alc |
Eliminate a redundant #include: machine/pmap.h is already included through vm/pmap.h.
|
247535 |
01-Mar-2013 |
alc |
Copy the definition of VM_MAX_AUTOTUNE_MAXUSERS from i386. (See r242847.)
Tested by: andrew
|
247520 |
01-Mar-2013 |
ganbold |
Enable uart driver for A10.
Approved by: gonzo@
|
247497 |
28-Feb-2013 |
gonzo |
Add platform DMA support to SDHCI driver for BCM2835
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp> Reviewed by: ian@
|
247496 |
28-Feb-2013 |
gonzo |
Add driver for BCM2835's DMA engine
This is a version of code submitted by Daisuke Aoyama <aoyama at peach.ne.jp> with some architectural changes.
|
247463 |
28-Feb-2013 |
mav |
MFcalloutng: Switch eventtimers(9) from using struct bintime to sbintime_t. Even before this not a single driver really supported full dynamic range of struct bintime even in theory, not speaking about practical inexpediency. This change legitimates the status quo and cleans up the code.
|
247429 |
28-Feb-2013 |
attilio |
Complete r247297: Remove unused inclusions of vm/vm_pager.h and vm/vnode_pager.h.
Sponsored by: EMC / Isilon storage division
|
247391 |
27-Feb-2013 |
gonzo |
Fix typo
|
247390 |
27-Feb-2013 |
gonzo |
- Initialize GPIO_OE register based on pinmux configuration
Although AM335x TRM states that GPIO_OE register is not used and just reflects pads configuration in practice it does control pin behavior and shoiuld be set in addition to pinmux setup
|
247360 |
26-Feb-2013 |
attilio |
Merge from vmc-playground branch: Replace the sub-optimal uma_zone_set_obj() primitive with more modern uma_zone_reserve_kva(). The new primitive reserves before hand the necessary KVA space to cater the zone allocations and allocates pages with ALLOC_NOOBJ. More specifically: - uma_zone_reserve_kva() does not need an object to cater the backend allocator. - uma_zone_reserve_kva() can cater M_WAITOK requests, in order to serve zones which need to do uma_prealloc() too. - When possible, uma_zone_reserve_kva() uses directly the direct-mapping by uma_small_alloc() rather than relying on the KVA / offset combination.
The removal of the object attribute allows 2 further changes: 1) _vm_object_allocate() becomes static within vm_object.c 2) VM_OBJECT_LOCK_INIT() is removed. This function is replaced by direct calls to mtx_init() as there is no need to export it anymore and the calls aren't either homogeneous anymore: there are now small differences between arguments passed to mtx_init().
Sponsored by: EMC / Isilon storage division Reviewed by: alc (which also offered almost all the comments) Tested by: pho, jhb, davide
|
247341 |
26-Feb-2013 |
cognet |
Export vfp_init() prototype, for use in the MP code.
|
247340 |
26-Feb-2013 |
cognet |
Fix SMP build.
|
247339 |
26-Feb-2013 |
cognet |
Don't forget to init the VFP stuff for all cores.
|
247314 |
26-Feb-2013 |
alc |
Be more conservative in auto-sizing and capping the kmem submap. In fact, use the same values here that we use on 32-bit x86 and MIPS. Some machines were reported to have problems with the more aggressive values.
Reported and tested by: andrew
|
247313 |
26-Feb-2013 |
alc |
Eliminate a redundant #include: machine/pmap.h is already included through vm/pmap.h.
|
247304 |
26-Feb-2013 |
kientzle |
RPi users might want to touch the boot partition, which is always FAT formatted on this board, so compile-in MSDOSFS.
Comment out the compiled-in FDT and explain why.
|
247297 |
26-Feb-2013 |
attilio |
Merge from vmobj-rwlock branch: Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h.
Sponsored by: EMC / Isilon storage division Tested by: pho Reviewed by: alc
|
247259 |
25-Feb-2013 |
gonzo |
Fix off-by-one error in sanity checks
|
247252 |
25-Feb-2013 |
gonzo |
- Fix off-by-one error when returning max pin number - Fix GPIOGET for output pins. Requesting state for output pin is valid operation, get the state from TI_GPIO_DATAOUTX register
|
247204 |
23-Feb-2013 |
gonzo |
Add macroses to properly map IO peripherals memory window from ARM physical memory address space to VideoCore address space
|
247195 |
23-Feb-2013 |
mav |
Add basic and not very reliable protection against going to sleep with thread scheduled by interrupt fired after we entered critical section. None of cpu_sleep() implementations on ARM check sched_runnable() now, so put the first line of defence here. This mostly fixes unexpectedly long sleeps in synthetic tests of calloutng code and probably other situations.
|
247046 |
20-Feb-2013 |
alc |
Initialize vm_max_kernel_address on non-FDT platforms. (This should have been included in r246926.)
The second parameter to pmap_bootstrap() is redundant. Eliminate it.
Reviewed by: andrew
|
247010 |
19-Feb-2013 |
gonzo |
Spelling fixes
Spotted by: N. J. Mann
|
247009 |
19-Feb-2013 |
gonzo |
Roll back change of frequency for initialization sequence since it seems to cause more problems then previous behavior: it either breaks initilization sequence in other places or uncovers problems with high-speed mode timing for SDHCI 3.0
|
246955 |
19-Feb-2013 |
ganbold |
Define gpio constants rather than using enum. Fix pull-up and pull-down values of gpio. According to A10 user manual possible pull register values are 00 Pull-up/down disable, 01 Pull-up, 10 Pull-down.
Approved by: gonzo@
|
246929 |
18-Feb-2013 |
alc |
Place a cap on the size of the kernel's heap, also known as the kmem submap. Otherwise, after r246204, the auto-scaling logic in kern_malloc.c tries to create a kmem submap that consumes the entire kernel map on a Pandaboard with 1 GB of RAM.
Tested by: gonzo
|
246926 |
18-Feb-2013 |
alc |
On arm, like sparc64, the end of the kernel map varies from one type of machine to another. Therefore, VM_MAX_KERNEL_ADDRESS can't be a constant. Instead, #define it to be a variable, vm_max_kernel_address, just like we do on sparc64.
Reviewed by: kib Tested by: ian
|
246888 |
17-Feb-2013 |
gonzo |
- Add hw.bcm2835.sdhci.hs tunable to enable/disable highspeed mode in SDHCI driver Suggested by: Daisuke Aoyama
- Set initilization sequence frequency to 8MHz. It should fix Data CRC errors. Standard requires initialization sequence to be executed at 400KHz but on this hardware low frequncies seems to cause Data CRC errors.
Value was derived from analyzing hardware signals after Raspberry Pi is powered up. Before any data is read though DATA line adapter's clock frequency is changed to 8MHz.
Modern cards should function fine at 8MHz but for older MMC cards it can be overriden by setting hw.bcm2835.sdhci.min_freq tunable.
|
246881 |
16-Feb-2013 |
ian |
In _bus_dmamap_addseg(), the return value must be zero for error, or the size actually added to the segment (possibly smaller than the requested size if boundary crossings had to be avoided).
|
246859 |
15-Feb-2013 |
ian |
Set map->pmap before _bus_dmamap_count_pages() tries to use it.
Obtained from: Thomas Skibo <ThomasSkibo@sbcglobal.net>
|
246851 |
15-Feb-2013 |
gonzo |
Enable USB1 (which is EHCI0) for Allwinner A10
Tested by: ganbold@
|
246850 |
15-Feb-2013 |
gonzo |
Fix copy-paste error in bus_space_unmap argument
While I'm at it - fix some style(9) issues
Submitted by: Mikael Urankar
|
246713 |
12-Feb-2013 |
kib |
Reform the busdma API so that new types may be added without modifying every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback.
The cam changes unify the bus_dmamap_load* handling in cam drivers.
The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map.
Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
|
246707 |
12-Feb-2013 |
gonzo |
Remove debug output
|
246661 |
11-Feb-2013 |
gonzo |
A10 reset mechanism is the same for all boards in this family so remove redundant reset function implementation pointer. We might want to ressurect it later when support for other Allwinner chips is introduced.
|
246660 |
11-Feb-2013 |
gonzo |
Add watchdog driver for Allwinner A10
|
246601 |
09-Feb-2013 |
kientzle |
Fix breakage introduced in r246318.
|
246375 |
06-Feb-2013 |
ganbold |
Use and set gpio pin to high to power up usb.
Approved by: gonzo@
|
246353 |
05-Feb-2013 |
ganbold |
Remove two dead assignments and make use of sc more explicit and clear
Submitted by: Christoph Mallon Approved by: gonzo@
|
246342 |
05-Feb-2013 |
ganbold |
Add gpio driver and update dts and kernel config accordingly.
Approved by: gonzo@
|
246318 |
04-Feb-2013 |
andrew |
Use the STACKALIGN macro to alight the stack rather than with a magic mask.
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
|
246276 |
03-Feb-2013 |
kientzle |
Another overhaul of the CPSW driver for BeagleBone
Major changes: * Finally tracked down the flow control setting that seems to have been causing TX stalls and watchdog timeouts * RX and TX paths now share a lot more code * TX interrupt is no longer used; we instead GC finished tx queue entries at the bottom of the start routine. * TX start now queues fragmented packets directly; it only invokes defrag() for occasional very fragmented packets. * "sysctl dev.cpsw" dumps controller statistics and queue counts * Host Error Interrupt will give extensive debugging information if the controller chokes on the queued data.
|
246228 |
02-Feb-2013 |
kientzle |
Tweaks to standard BEAGLEBONE config, as recently discussed on FreeBSD-ARM.
|
246204 |
01-Feb-2013 |
andre |
Add VM_KMEM_SIZE_SCALE parameter set to 2 (50%) for all ARM platforms.
VM_KMEM_SIZE_SCALE specifies which fraction of the available physical memory, after deduction of the kernel itself and other early statically allocated memory, can be used for the kmem_map. The kmem_map provides for all UMA/malloc allocations in KVM space.
Previously ARM was using a fixed kmem_map size of (12*1024*1024) = 12MB without regard to effectively available memory. This is too small for recent ARM SoC with more than 128MB of RAM.
For reference a description of others related kmem_map parameters:
VM_KMEM_SIZE default start size of kmem_map if SCALE is not defined VM_KMEM_SIZE_MIN hard floor on the kmem_map size VM_KMEM_SIZE_MAX hard ceiling on the kmem_map size VM_KMEM_SIZE_SCALE fraction of the available real memory to be used for the kmem_map, limited by the MIN and MAX parameters.
Tested by: ian MFC after: 1 week
|
246158 |
31-Jan-2013 |
kib |
Use pmap_kextract() instead of inlining the page table walk. Remove the comment referencing non-existing code.
Reviewed by: cognet, ian (previous version) Tested by: ian
|
246057 |
29-Jan-2013 |
ganbold |
Add simple clock driver and ehci glue code for a10 Update dts and kernel config
Approved by: gonzo@
|
246025 |
28-Jan-2013 |
dmarion |
Fix case for some signal names.
Submitted by: Emmanuel Vadot <elbarto@megadrive.org>
|
246024 |
28-Jan-2013 |
dmarion |
Filled in missing pads for AM335x / Beaglebone.
Submitted by: Emmanuel Vadot <elbarto@megadrive.org>
|
246001 |
27-Jan-2013 |
ian |
Fix off-by-one errors in low-level arm9 and arm10 cache maintenance routines.
In all the routines that loop through a range of virtual addresses, the loop is controlled by subtracting the cache line size from the total length of the request. After the subtract, a 'bpl' instruction was used, which branches if the result of the subtraction is zero or greater, but we need to exit the loop when the count hits zero. Thus, all the bpl instructions in those loops have been changed to 'bhi' (branch if greater than zero).
In addition, the two routines that walk through the cache using set-and-index were correct, but confusing. The loop control for those has been simplified, just so that it's easier to see by examination that the code is correct.
Routines for other arm architectures and generations still have the bpl instruction, but compensate for the off-by-one situation by decrementing the count register by one before entering the loop.
PR: arm/174461 Approved by: cognet (mentor)
|
246000 |
27-Jan-2013 |
ian |
Restore the irq number to the display string; I fumbled this in the previous commit while trying to make the code internally self-consistant.
Approved by: cognet (mentor) Obtained from: Christoph Mallon
|
245999 |
27-Jan-2013 |
ian |
Remove the remaining references to the now-obsolete sheevaplug config files, which have been replaced by the generic db88f6xxx config which works for all kirkwood-series chips.
Approved by: cognet (mentor)
|
245955 |
27-Jan-2013 |
ian |
Add support for the GlobalScale Technologies DreamPlug computer.
This adds support for version 10, revision 01, but it should also work without changes for the 0901 model, at least until we get drivers for the two different wifi chips involved.
Many users contributed to and tested the various patchsets floating around for the past year that have eventually evolved into this checkin, most notably Richard Neese who provided the bulk of the kernel config file.
Approved by: cognet (mentor)
|
245954 |
27-Jan-2013 |
ian |
Add a default do-nothing implementation of fdt_pci_devmap() using a weak alias, so that we don't need an empty implementation of it for every Marvell platform that has no PCI. This allows the removal of the SheevaPlug-specific stub and config files, and eliminates the need to add similar stubs for future models.
Marvell platforms that do expose PCI are compiled with 'device pci' which causes the real (non-weak) implementation in dev/fdt/fdt_pci.c to be used.
Approved by: cognet (mentor)
|
245948 |
26-Jan-2013 |
ian |
Fix a buffer overrun while pre-formatting the names array, perpetrated in the prior commit. Use essentially the same sprintf() statement for both formatting and pre-formatting, and use a format string which eliminates the need for an extra temporary buffer when formatting the name.
Noted by: Christoph Mallon Pointy hat to: ian Approved by: cognet (mentor)
|
245942 |
26-Jan-2013 |
andrew |
Align td_frame as it will be placed into the sp register which must be 8 byte aligned on ARM EABI.
|
245900 |
25-Jan-2013 |
ganbold |
Fix method of naming compatible string to follow "<manufacturer>,<model>" as described in http://www.devicetree.org/Device_Tree_Usage
Reviewed by: andrew@ Approved by: gonzo@
|
245876 |
24-Jan-2013 |
ganbold |
Fix timer to support oneshot and periodic mode Use 64 bit high and low counter for timecounter and delay
Reviewed by: mav@, ian@ Approved by: gonzo@
|
245672 |
19-Jan-2013 |
kientzle |
Clarify the error messages for unrecognized pins and muxtypes.
|
245637 |
19-Jan-2013 |
ian |
Eliminate the need for an intermediate array of indices into the arrays of interrupt counts and names, by making the names into an array of fixed-length strings that can be directly indexed. This eliminates extra memory accesses on every interrupt to increment the counts.
As a side effect, it also fixes a bug that would corrupt the names data if a name was longer than MAXCOMLEN, which led to incorrect vmstat -i output.
Approved by: cognet (mentor)
|
245551 |
17-Jan-2013 |
andrew |
* Correct KINFO_PROC_SIZE for ARM EABI. * Update the syscall interface to pass in the syscall value in register r7.
|
245549 |
17-Jan-2013 |
andrew |
Implement stack unwinding based on section 9 of the "Exception handling ABI for the ARM architecture" documentation. The unwind tables are currently not stored in the kernel but will be added later.
|
245500 |
16-Jan-2013 |
ganbold |
Fix style bugs Use defined constant instead of variable for reg_shift Change u_int32_t to uint32_t
Approved by: gonzo Suggested by: bde, wkoszek
|
245478 |
15-Jan-2013 |
cognet |
Use armv7_drain_writebuf() and armv7_context_switch, instead of the arm11 variants.
|
245477 |
15-Jan-2013 |
cognet |
Only spin on the blocked_lock for SCHED_ULE+SMP, as it's done on the other arches.
|
245475 |
15-Jan-2013 |
cognet |
Don't define rel/acq variants of some atomic operations as the regular version for armv6.
|
245455 |
15-Jan-2013 |
ganbold |
Add mistakenly removed third clause to license
Reviewed by: joel
|
245454 |
15-Jan-2013 |
ganbold |
Fix formatting of license according to share/examples/etc/bsd-style-copyright
Reviewed by: joel
|
245453 |
15-Jan-2013 |
ganbold |
Fix license to follow standard license template
Reviewed by: joel
|
245450 |
15-Jan-2013 |
ganbold |
Initial support for Allwinner A10 SoC (Cubieboard) Add simple console driver Add interrupt handling and timer codes Add kernel config file Add dts file Approved by: gonzo
|
245414 |
14-Jan-2013 |
andrew |
Update sigcode to use both the current ABI and FreeBSD's version of the ARM EABI syscall calling convention.
The current ABI encodes the syscall number in the instruction. This causes issues with the thumb mode as it only has 8 bits to encode this value and we have too many system calls and by using a register will simplify the code to get the syscall number in the kernel.
With the ARM EABI we reuse the Linux calling convention by storing the value in r7. Because of this we use both methods to encode the syscall number in this function.
|
245389 |
13-Jan-2013 |
ray |
Enable syscons framebuffer support for bcm2835. It makes possible to run Xorg on Raspberry Pi. o convert mmap address to physical. o add FBIOGTYPE ioctl handler - allow to get screen resolution by new xf86-video-scfb driver. Originally designed for "Efika MX" project.
Sponsored by: FreeBSD Foundation
|
245388 |
13-Jan-2013 |
gonzo |
Remove accidentally copypasted comment
Spotted by: gavin
|
245203 |
09-Jan-2013 |
cognet |
Define IPI_IRQ_START and IPI_IRQ_END.
|
245202 |
09-Jan-2013 |
cognet |
Use get_pcpu() instead of using pcpup, as it's wrong for SMP.
Submitted by: Lukasz Plachno <luk@semihalf.com>
|
245192 |
08-Jan-2013 |
cognet |
Remove old declarations.
|
245147 |
08-Jan-2013 |
gonzo |
Switch default cache type for ARMv6/ARMv7 from write-through to writeback-writeallocate
|
245146 |
08-Jan-2013 |
gonzo |
Fix cache-related issue with pmap for ARMv6/ARMv7:
- Missing PTE_SYNC in pmap_kremove caused memory corruption in userland applications - Fix lack of cache flushes when using special PTEs for zeroing or copying pages. If there are dirty lines for destination memory and page later remapped as a non-cached region actual content might be overwritten by these dirty lines when cache eviction happens as a result of applying cache eviction policy or because of wbinv_all call. - icache sync for new mapping for userland applications.
Tested by: gber
|
245137 |
07-Jan-2013 |
gonzo |
- Identify more devices for OMAP4 SoC (up to OMAP4470) - Whitespace fixes
|
245135 |
07-Jan-2013 |
gonzo |
Implement barriers for AMRv6 and ARMv7
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp> Reviewed by: ian, cognet
|
245120 |
07-Jan-2013 |
gonzo |
Release version check for erratum 727915 workaround in l2_wbinv_range function implementation causes function fail to flush caches for chip with RTL number 0x7. I failed to find official PL310 revision with this RTL number so further research on this matter required.
|
245087 |
06-Jan-2013 |
andrew |
Fix the build:
* Use pl310_softc when the softc is otherwise unavailable. * Use the correct spelling of sc_rtl_revision.
|
245083 |
06-Jan-2013 |
andrew |
Only work around errata when we are on a part where the erratum applies.
Reviewed by: gonzo
|
245080 |
05-Jan-2013 |
gonzo |
Export board serial and board revision obtained from FDT blob
|
245079 |
05-Jan-2013 |
gonzo |
Add hw.board.serial and hw.board.revision for exporting board-specific info
|
245071 |
05-Jan-2013 |
gonzo |
Fix background color calculation
Spotted by: ray@
|
245070 |
05-Jan-2013 |
kientzle |
Shuffle the TX underrun to work the same way as the RX underrun, as suggested by YongHyeon PYUN.
|
245068 |
05-Jan-2013 |
kientzle |
Prefer the new NFS modules
|
245064 |
05-Jan-2013 |
kientzle |
While trying to track down the root cause for TX stalls in this driver, I've also had some time to evaluate the effectiveness of different watchdog strategies.
This is the latest attempt, which consolidates all of the watchdog logic in one place and consistently detects TX stalls and resets within a couple of seconds.
|
244939 |
01-Jan-2013 |
kientzle |
Overhauled CPSW driver for TI CPSW Ethernet module (as used in AM335x SoC for BeagleBone).
Among other things: * Watchdog reset doesn't hang the driver. * Disconnecting cable doesn't hang the driver. * ifconfig up/down doesn't hang the driver * Out-of-memory no longer panics the driver.
Known issues: * Doesn't have good support for fragmented packets (calls m_defrag() on TX, assumes RX packets are never fragmented) * Promisc and allmulti still unimplimented * addmulti and delmulti still unimplemented * TX queue still stalls (but watchdog now consistently recovers in ~5s) * No sysctl monitoring * Only supports port0 * No switch configuration support * Not tested on anything but BeagleBone
Committed from: BeagleBone
|
244919 |
01-Jan-2013 |
andrew |
Document the known values of the RTL release field in the cache is register
|
244914 |
31-Dec-2012 |
gonzo |
PL310 driver update:
- Add pl310.disable tunable to disable L2 cache altogether. In order to make sure that it's 100% disabled we use cache event counters for cache line eviction and read allocate events and panic if any of these counters increased. This is purely for debugging purpose - Direct access DEBUG_CTRL and CTRL might be unavailable in unsecure mode, so use platform-specific functions for these registers - Replace #if 1 with proper erratum numbers - Add erratum 753970 workaround - Remove wait function for atomic operations - Protect cache operations with spin mutex in order to prevent race condition - Disable instruction cache prefetch and make sure data cache prefetch is enabled in OMAP4-specific intialization
|
244912 |
31-Dec-2012 |
gonzo |
Merge r234561 from busdma_machdep.c to ARMv6 version of busdma:
Interrupts must be disabled while handling a partial cache line flush, as otherwise the interrupt handling code may modify data in the non-DMA part of the cache line while we have it stashed away in the temporary stack buffer, then we end up restoring a stale value.
PR: 160431 Submitted by: Ian Lepore
|
244762 |
28-Dec-2012 |
gonzo |
Add makeshift implementation for framebuffer console's cursor
Basically it's replica of VersatilePB code which is replica of XBox FB code. All of them are linear framebuffers and should have common bits moved to reusable framework.
|
244758 |
28-Dec-2012 |
gonzo |
Fix event timer on Raspberry Pi
- Disable interrupt when updating compare value in order to make this operation atomical
- Increase minimum period for event timer. Systimer on BCM2835 is compare timer, so if minimum period is too small it might be less then fraction of time between "read current value" and "set compare timer" operations. It means that when timer is armed actual counter value is more then compare value and it will take whole cycle (~32sec for 1MHz timer) to fire interrupt.
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
|
244755 |
28-Dec-2012 |
gonzo |
Add custom renderer for poor man's cursor support for framebuffer console
|
244575 |
22-Dec-2012 |
cognet |
The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't allocate a map or mapping resources. That seems to imply that any memory allocations it does must use M_NOWAIT and check for NULL.
Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>
|
244574 |
22-Dec-2012 |
cognet |
The VM_MEMATTR_ constants are enumerated, not a bitset. Compare accordingly.
Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>
|
244480 |
20-Dec-2012 |
gonzo |
Replace generic ARM11 option with more specific support for ARM1136 and ARM1176
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp> Obtained from: NetBSD
|
244476 |
20-Dec-2012 |
gonzo |
Fix misleading comment
|
244473 |
20-Dec-2012 |
cognet |
Use C comments instead of C++ comments.
Spotted out by: gonzo (thanks, man)
|
244471 |
20-Dec-2012 |
cognet |
Busdma enhancements, especially for managing small uncacheable buffers.
- Use the new architecture-agnostic buffer pool manager that uses uma(9) to manage a set of power-of-2 sized buffers for bus_dmamem_alloc().
- Create pools of buffers backed by both regular and uncacheable memory, and use them to handle regular versus BUS_DMA_COHERENT allocations.
- Use uma(9) to manage a pool of bus_dmamap structs instead of local code to manage a static list of 500 items (it took 3300 maps to get to multi-user mode, so the static pool wasn't much of an optimization).
- Small BUS_DMA_COHERENT allocations no longer waste an entire page per allocation, or set pages to uncached when they contain data other than DMA buffers. There's no longer a need for drivers to work around the inefficiency by allocing large buffers then sub-dividing them.
- Because we know the alignment and padding of buffers allocated by bus_dmamem_alloc() (whether coherent or regular memory, and whether obtained from the pool allocator or directly from the kernel) we can avoid doing partial cacheline flushes on them.
- Add a fast-out to _bus_dma_could_bounce() (and some comments about what the routine really does because the old misplaced comment was wrong).
- Everywhere the dma tag alignment is used, the interpretation is that an alignment of 1 means no special alignment. If the tag is created with an alignment argument of zero, store it in the tag as one, and remove all the code scattered around that changed 0->1 at point of use.
- Remove stack-allocated arrays of segments, use a local array of two segments within the tag struct, or dynamically allocate an array at first use if nsegments > 2. On an arm system I tested, only 5 of 97 tags used more than two segments. On my x86 desktop it was only 7 of 111 tags.
Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>
|
244469 |
20-Dec-2012 |
cognet |
Use the new allocator in bus_dmamem_alloc().
|
244446 |
19-Dec-2012 |
gonzo |
Use NFSCL since NFSCLIENT build is broken at the moment
|
244414 |
19-Dec-2012 |
cognet |
Properly implement pmap_[get|set]_memattr
Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>
|
244412 |
18-Dec-2012 |
gonzo |
Add sysctls for changing GPIO pins function
Submitted by: Luiz Otavio O Souza
|
244281 |
16-Dec-2012 |
gonzo |
Fix comment to represent actual file purpose
Spotted by: gavin@
|
244197 |
13-Dec-2012 |
gonzo |
Add support for QEMU's version of Versatile Platform Board
|
244195 |
13-Dec-2012 |
gonzo |
Add driver for PrimeCell Vectored Interrupt Controller (PL190)
|
243909 |
05-Dec-2012 |
cognet |
Don't write-back the cachelines if we really just want to invalidate them.
Spotted out by: Ian Lepore <freebsd at damnhippie DOT dyndns dot org>
|
243882 |
05-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys.
Exceptions:
- sys/contrib not touched - sys/mbuf.h edited manually
|
243701 |
30-Nov-2012 |
gonzo |
- Enable syscons/framebuffer by default - Enable NFS client by default. Might be useful for building ports
|
243691 |
30-Nov-2012 |
gonzo |
Get reserved memory regions and exclude them from available memory map
|
243688 |
30-Nov-2012 |
gonzo |
Get frequency from "clock-frequency" property of "/axi/sdhci" FDT node
|
243687 |
30-Nov-2012 |
gonzo |
Fix RGB565 case
|
243666 |
29-Nov-2012 |
gonzo |
Fix hardcoded bpp value
|
243602 |
27-Nov-2012 |
gonzo |
Do not enable data cache until later in kernel init. Stale bits in cache might cause erroneus behavior on early stage.
Submitted by: Ian Lepore Tested on: Atmel, Marvell, and Eyxnos
|
243581 |
27-Nov-2012 |
marcel |
Add NOTES and Makefile in order to generate LINT. NOTES contains pretty much all the union of all the kernel configuration files, including all the CPU types, Marvell SOC types and at91 board types. Any device not supported (read: does not compile) has been removed, which is a fairly small set actually. As such, LINT gives us very good coverage without having to build a zillion kernels.
|
243580 |
27-Nov-2012 |
marcel |
Allow building LINT by defining both SAMPLE_AT_RESET on the one hand and SAMPLE_AT_RESET_{LO|HI} on the other. It doesn't matter which values they take, as long as they are defined.
|
243579 |
27-Nov-2012 |
marcel |
Don't include arm/xscale/i8134x/i81342reg.h when we're compiling LINT. The definitions in i81342reg.h clash with those in i80321reg.h.
|
243578 |
27-Nov-2012 |
marcel |
Remove print_kernel_section_addr(). All statements in that function expand to uncompilable code when the kernel configuration contains "options DEBUG", such as it is for LINT. The toolchain is often a better approach to figure this out, as it doesn't require one to boot the kernel.
|
243576 |
27-Nov-2012 |
marcel |
Don't define intr_disable and intr_restore as macros. The macros interfere with structure fields of the same name in drivers, like the intr_disable function pointer in struct cphy_ops in cxgb(4). Instead define intr_disable and intr_restore as inline functions.
With intr_disable() an inline function, the I32_bit and F32_bit macros now need to be visible in MI code and given the rather poor names, this is not at all good. Define ARM_CPSR_F32 and ARM_CPSR_I32 and use that instead of F32_bit and I32_bit (resp) for now.
|
243575 |
26-Nov-2012 |
marcel |
Unbreak building a kernel with EHCI: there's no ehci_atmelarm.c.
|
243523 |
25-Nov-2012 |
kientzle |
Fix spelling.
|
243465 |
23-Nov-2012 |
gonzo |
Add Raspberry Pi GPIO driver
Submitted by: Luiz Otavio O Souza
|
243462 |
23-Nov-2012 |
imp |
Strip trailing newline.
|
243434 |
23-Nov-2012 |
gonzo |
Now that we have working USB keyboard add ukbd to the syscons-enabling part of config
|
243423 |
23-Nov-2012 |
gonzo |
Multiple fixes for BCM2835 framebuffer
- Get resolution settings from FDT blob - Properly handle 24 and 16 bits per pixel - Add colors support for text console
|
243359 |
21-Nov-2012 |
cognet |
Make sure the address starts on a cache line boundary.
|
243227 |
18-Nov-2012 |
adrian |
Correctly use spaces here.
Pointed out by: pjd
|
243194 |
17-Nov-2012 |
andrew |
Clean up the two i80321 copies of initarm to be closer to one another.
|
243189 |
17-Nov-2012 |
adrian |
Just compile the whole ath chipset support in.
|
243132 |
16-Nov-2012 |
kib |
Move the declaration of vm_phys_paddr_to_vm_page() from vm/vm_page.h to vm/vm_phys.h, where it belongs.
Requested and reviewed by: alc MFC after: 2 weeks
|
243109 |
16-Nov-2012 |
cognet |
Don't forget to unlock the pmap lock on failure.
|
243108 |
15-Nov-2012 |
cognet |
Remove a useless printf
|
243107 |
15-Nov-2012 |
cognet |
Use the "inner shareable" variations of flush/invalidate functions for SMP.
Submitted by: Giovanni Trematerra <gianni at freebsd DOT org>
|
243040 |
14-Nov-2012 |
kib |
Flip the semantic of M_NOWAIT to only require the allocation to not sleep, and perform the page allocations with VM_ALLOC_SYSTEM class. Previously, the allocation was also allowed to completely drain the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT request class for vm_page_alloc() and similar functions.
Allow the caller of malloc* to request the 'deep drain' semantic by providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM allocation class.
Centralize the translation of the M_* malloc(9) flags in the single inline function malloc2vm_flags().
Discussion started by: "Sears, Steven" <Steven.Sears@netapp.com> Reviewed by: alc, mdf (previous version) Tested by: pho (previous version) MFC after: 2 weeks
|
243026 |
14-Nov-2012 |
cognet |
Make it clear the L2 ops are filled for any cpu using a PL310 cache, not just the omap4.
Spotted out by: Giovanni Trematerra <gianni at freebsd DOT org>
|
243024 |
14-Nov-2012 |
cognet |
Use the arrmv7 version for flushID too, as it does something different for SMP.
Submitted by: Giovanni Trematerra <gianni at freebsd DOT org>
|
242746 |
08-Nov-2012 |
imp |
Reduce differences between these two initarms a bit more.
|
242700 |
07-Nov-2012 |
imp |
Minor cosmetic changes to bring atmel's initarm and the default initarm for FDT closer together. More to follow.
|
242692 |
07-Nov-2012 |
kevlo |
Fix typo; s/ouput/output
|
242531 |
03-Nov-2012 |
andrew |
Merge the FDT versions of initarm.
The copies of initarm used on platforms with FDT support were almost identical. The differences were pulled out into separate functions that were called by initarm.
This change merges the, now identical, copies of initarm and a few of it's support functions. This is a step towards a common kernel on ARMv6.
|
242431 |
01-Nov-2012 |
cognet |
Fix build for SMP.
Submitted by: Giovanni Trematerra <gianni at freebsd DOT org>
|
242394 |
31-Oct-2012 |
andrew |
Merge r242125 into the other ARMv6 copies of initarm.
|
242362 |
30-Oct-2012 |
cognet |
Fix SMP build for omap4
Submitted by: Giovanni Trematerra <gianni at freebsd DOT org>
|
242343 |
30-Oct-2012 |
andrew |
Move the call to platform_gpio_init() into initarm_gpio_init() to reduce the diff to the other FDT versions of initarm.
|
242321 |
29-Oct-2012 |
gonzo |
Add BCM2835 SDHCI driver and enable it in Raspberry Pi config
|
242191 |
27-Oct-2012 |
kientzle |
Missing paren.
Pointy hat:me
|
242171 |
27-Oct-2012 |
kientzle |
Comment out the other BOOTP option This should make PANDABOARD suitable for building bootable SD images.
Submitted by: Giovanni Trematerra
|
242125 |
26-Oct-2012 |
kientzle |
set the kernelname from the boot loader environment. This fixes kern.bootfile sysctl.
Submitted by: Giovanni Trematerra
|
242124 |
26-Oct-2012 |
kientzle |
Comment out the BOOTP/NFSROOT support. Transition this config file to support a production kernel mounted on an SD card.
|
242068 |
25-Oct-2012 |
kientzle |
Do proper padding of runt packets using code copied from bge(4).
Reviewed by: gnn
|
242067 |
25-Oct-2012 |
kientzle |
Refer to headers locally. This makes it a lot easier to build this driver out-of-tree.
|
242063 |
25-Oct-2012 |
kientzle |
Support FreeBSD Boot loaders.
|
242062 |
25-Oct-2012 |
kientzle |
Everybody needs bpf.
|
242061 |
25-Oct-2012 |
kientzle |
Support boot loaders in the standard kernel.
|
241885 |
22-Oct-2012 |
eadler |
This isn't functionally identical. In some cases a hint to disable unit 0 would in fact disable all units.
This reverts r241856
Approved by: cperciva (implicit)
|
241856 |
22-Oct-2012 |
eadler |
Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature.
Reviewed by: des Approved by: cperciva MFC after: 1 week
|
241844 |
22-Oct-2012 |
eadler |
remove duplicate semicolons where possible.
Approved by: cperciva MFC after: 1 week
|
241831 |
22-Oct-2012 |
kientzle |
Don't repeat the POSTREAD dma sync.
|
241721 |
19-Oct-2012 |
kientzle |
Replace deprecated M_DONTWAIT with M_NOWAIT.
|
241572 |
15-Oct-2012 |
kientzle |
Fix an mbuf leak in cpsw driver, clean up mbuf management: * Record TX mbufs when we get them so we can release them. * Set TX/RX mbuf slots to NULL when we are no longer responsible for them * Move dma sync on RX into RX intr routine
|
241564 |
14-Oct-2012 |
kientzle |
Cut-and-paste dropped semicolon.
|
241563 |
14-Oct-2012 |
kientzle |
Name cpsw_stop to cpsw_stop_locked consistently with other functions in this file that assume locks are already held.
|
241562 |
14-Oct-2012 |
kientzle |
Return correct packet size.
|
241333 |
07-Oct-2012 |
imp |
Loop reading the RTC registers until the same values are obtained twice, as advised in the atmel docs.
Submitted by: Ian Lapore
|
241308 |
07-Oct-2012 |
imp |
Improve a few comments.
|
241307 |
07-Oct-2012 |
imp |
Use the RTC unit to get the time. This works on all known AT91SAM9* processors, either on reboot or after power down with battery backup. However, the AT91RM9200 RTC always resets on reboot making it just about useless at the moment (if we support a low-power mode or an extended sleep mode, it might become useful).
Submitted by: Ian Lepore
|
241100 |
01-Oct-2012 |
kientzle |
Support kernel options from ubldr.
|
241081 |
01-Oct-2012 |
andrew |
Remove unused variables from the OMAP ehci code.
|
241080 |
01-Oct-2012 |
andrew |
Fix the clobber list on the atomic operators that do comparisons. Without this some compilers will place a cmp instruction before the atomic operation and expect to be able to use the result afterwards. By adding "cc" to the list of used registers we tell the compiler to not do this.
|
241063 |
30-Sep-2012 |
alc |
Stop calling pmap_remove_write() from pmap_remove_all(). Doing so is not only inefficient but also leads to recursive lock acquisition.
Tested by: ray
|
241058 |
29-Sep-2012 |
alc |
Eliminate an unused declaration.
|
241055 |
29-Sep-2012 |
alc |
Eliminate unused variables.
|
241054 |
29-Sep-2012 |
alc |
Add support for mincore(). Specifically, this is an adaptation of the pmap_mincore() implementation that was added to the original arm pmap in r235717.
|
241044 |
29-Sep-2012 |
alc |
Update a comment to reflect recent locking changes.
|
240983 |
27-Sep-2012 |
alc |
Implementing pmap_kextract(va) as pmap_extract(kernel_pmap, va) is problematic because some callers to pmap_kextract() expect its implementation to be lock-less. In particular, uma_dbg_alloc() implicitly requires this. Otherwise, lock-order reversals occur between pmap locks and UMA zone locks. So, this change introduces a lock-less implementation of pmap_kextract().
Disable recursion on the pvh global lock in the new armv6 pmap. While recursion on this locks occurs in the old arm pmap, it thankfully doesn't occur in the armv6 pmap.
Tested by: jmg
|
240956 |
26-Sep-2012 |
andrew |
Create the new initarm_ functions to reduce the diff to the other FDT versions of initarm
|
240953 |
26-Sep-2012 |
andrew |
Use arm_dump_avail_init to build the dump_avail array
|
240952 |
26-Sep-2012 |
andrew |
Start to clean up the lpc initarm as it also uses FDT.
|
240913 |
25-Sep-2012 |
alc |
Eliminate an unused declaration.
|
240869 |
23-Sep-2012 |
andrew |
Clean up the bcm2835 initarm. It is now identical to the other ARMv6 copies
Tested by: Alexander Yerenkow
|
240853 |
23-Sep-2012 |
andrew |
Fix a typo in a Broadcom initarm debug printf
|
240846 |
23-Sep-2012 |
andrew |
Pull out the SoC specific parts of initarm into separate functions
|
240845 |
23-Sep-2012 |
andrew |
Update different versions of physmap_init to be identical in preparation for merging them.
|
240844 |
22-Sep-2012 |
andrew |
Reduce the diff between the FDT implementations of initarm. This only touches whitespace and comments.
|
240803 |
22-Sep-2012 |
alc |
Since UMA_ZONE_NOFREE is specified when l2zone and l2table_zone are created, there is no need to release and reacquire the pmap and pvh global locks around calls to uma_zfree(). Recursion into the pmap simply won't occur.
Eliminate the use of M_USE_RESERVE. It is deprecated and, in fact, counter- productive, meaning that it actually makes the memory allocation request more likely to fail.
Eliminate the macros pmap_{alloc,free}_l2_dtable(). They are of limited utility, and pmap_free_l2_dtable() was inconsistently used.
Tidy up pmap_init(). In particular, change the initialization of the PV zone so that it doesn't span the initialization of the l2 and l2table zones.
Tested by: jmg
|
240802 |
22-Sep-2012 |
andrew |
Create a common set_stackptrs in sys/arm/machdep.c.
On single core devices set_stackptrs is only ever called with cpu = 0 in initarm and will be identical to the existing function. On SMP this needs to be implemented for sys/arm/mp_machdep.c, but the implementations are identical for each SoC.
|
240596 |
17-Sep-2012 |
andrew |
Add a kernel config for the Toshiba AC100. The AC100 is an ARM laptop with an NVidia Tegra 2 CPU.
Tegra 2 needs an external patch to pmap for atomic operations to work. Even with this the Kernel only gets to the mount root prompt. As such Tegra support is considered experimental, however adding the kernel config will help ensure the Tegra code builds.
|
240572 |
16-Sep-2012 |
jmg |
fix the kernel files to match our standard "option<space><tab>" format such that when commenting/uncommentting lines, horizontal spacing is maintained...
Also fix some minor comment formatting to line things up, etc...
Reviewed by: gnn, imp MFC after: 1 week
|
240571 |
16-Sep-2012 |
jmg |
remove some unnecessary debugging statements, dead code and incorrect comment...
Reviewed by: gnn, imp
|
240551 |
16-Sep-2012 |
andrew |
Start to clean up ARMv6 initarm implementations by making the Tegra 2 version similar to the Ti version.
|
240550 |
16-Sep-2012 |
andrew |
In the Tegra 2 standard config: * Remove an unneeded makeoption * Set machine correctly * Properly indent the include of files.tegra2
|
240549 |
16-Sep-2012 |
andrew |
The cpu_reset function is noreturn, make sure this is true on Tegra 2. While here fix a typo.
|
240532 |
15-Sep-2012 |
alc |
Eliminate an unused malloc type.
|
240518 |
14-Sep-2012 |
eadler |
Correct double "the the"
Approved by: cperciva MFC after: 3 days
|
240493 |
14-Sep-2012 |
gber |
Implement MSI support.
MSI are implemented via Inbound Shared Doorbell 1 interrupts. Interrupts are triggered by writing to Software Triggered Interrupt registeri (PCIe card using physical address of this register in BAR0 space). There are 32 interrupts available. It can be increased by using Doorbell 2 and Doorbell 3 registers to 96 interrupts.
Obtained from: Marvell, Semihalf
|
240492 |
14-Sep-2012 |
gber |
Add support for MSI in interrupt controlller.
MSI are implemented via software interrupt. PCIe cards will write into software interrupt register which will cause inbound shared interrupt which will be interpreted as a MSI.
Obtained from: Marvell, Semihalf
|
240491 |
14-Sep-2012 |
gber |
Remove unused structure fields
Obtained from: Semihalf
|
240490 |
14-Sep-2012 |
gber |
Enable PCI for Armada XP
Obtained from: Semihalf
|
240489 |
14-Sep-2012 |
gber |
pci: Implement new memory and io space allocator for PCI.
Cleanup code and move initializing bridge into separate function. Add checking of PCI mode (RC or endpoint).
Obtained from: Semihalf
|
240488 |
14-Sep-2012 |
gber |
Add support for Armada XP A0.
- Add functions to calculate clocks instead using hardcoded values - Update reset and timers functions - Update number of interrupts - Change name of platform from db88f78100 to db78460 - Correct DRAM size and PCI IRQ routing in dts file.
Obtained from: Semihalf
|
240486 |
14-Sep-2012 |
gber |
Support identification of new PJ4B cores.
Obtained from: Semihalf
|
240483 |
14-Sep-2012 |
hselasky |
Add basic USB support to Raspberry PI target.
|
240442 |
13-Sep-2012 |
alc |
Simplify the kernel pmap locking in pmap_enter_pv(). While I'm here, tidy up the comments and whitespace.
Tested by: cognet
|
240376 |
11-Sep-2012 |
hselasky |
Add device entry for DWC OTG.
|
240321 |
10-Sep-2012 |
alc |
Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.
Revise some comments.
The file vm/vm_param.h includes the file machine/vmparam.h, so there is no need to directly include it.
Tested by: andrew
|
240280 |
09-Sep-2012 |
hselasky |
Add support for DWC OTG.
|
240181 |
07-Sep-2012 |
alc |
Eliminate an unused macro.
|
240177 |
06-Sep-2012 |
jhb |
Dynamically allocate the S/G lists passed to callback routines rather than allocating them on the stack of various bus_dmamap_load*() functions. The S/G lists are stored in the DMA tags. This matches the implementation on all other platforms.
Discussed with: scottl, gibbs Tested by: stas (arm@)
|
240166 |
06-Sep-2012 |
alc |
There is no need to release the pvh global lock around calls to pmap_get_pv_entry(). In fact, some callers already held it around calls. (In earlier versions, the same statements would apply to the page queues lock.)
While I'm here tidy up the style of a few nearby statements and revise some comments.
Tested by: Ian Lepore
|
239934 |
31-Aug-2012 |
alc |
Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.
Tested by: Ian Lepore
|
239922 |
30-Aug-2012 |
gonzo |
Add barebone Raspberry Pi port. Supported parts: - Interrupts controller - Watchdog - System timer - Framebuffer (hardcoded resolution/bpp)
|
239806 |
29-Aug-2012 |
imp |
4-wire mode isn't working quite right, so turn it off for a bit.
|
239805 |
29-Aug-2012 |
imp |
Make this work on the AT91SAM9G20: o Disable multi-block operations: they sometimes fail. o Don't use the PROOF bits yet: they hang the system hard. o Disable the the multi-block operations for !rm9200, but it still doesn't help. o Fix writing < 12 bytes errata to actually work. o Enable, for the moment, reporting extra bytes soaked up.
|
239804 |
29-Aug-2012 |
imp |
When copying data, use memcpy instead of bcopy. It matches the arguments better. Also, set the need to use the workaround flag before we actually need to use it, rather than after.
|
239785 |
28-Aug-2012 |
imp |
Make AT91_MCI_ALLOW_OVERCLOCK a real option. Rename old use 30MHz to this new option. Only try to use > 25MHz when our best frequency is < 15MHz and overclocking is enabled. Fix minor style chaff.
|
239780 |
28-Aug-2012 |
imp |
Clip the upper end to 31MHz for slow clock speeds. On faster machines, we wind up with a 66MHz clock, which is too fast.
|
239764 |
28-Aug-2012 |
imp |
Move to using a flag instead of checking the CPU type each transaction for the MCI1 rev 2.x write workarounds.
|
239763 |
28-Aug-2012 |
imp |
Style: Move these routines to be before the forward declared functions as is the normal practice.
|
239762 |
28-Aug-2012 |
imp |
Bring in the multi-block patches for mci. These required extensive restructuring of the driver. I've tried to preserve the other silicon workarounds that we've added over the years, but haven't had a chance to extensively test on other hardware. On my AT91RM9200 with 30MHz/1 wire/64 block transfers, I've been able to go from ~.66MB/s to 2.25MB/s in the simple tests I performed, almost a 3.5x improvement. This cuts the boot time almost in half when everything else goes right (timed from rtc message to login: prompt).
PR: 155214 Submitted by: Ian Lapore
|
239722 |
27-Aug-2012 |
kientzle |
Correctly fetch the MAC address.
Break down the bytes directly into the softc; the intermediate buffer isn't needed here. Break down the bytes in the correct order.
|
239721 |
27-Aug-2012 |
imp |
Add hint and sysctl support for 4 wire mode.
PR: 155241 Submitted by: Ian Lapore
|
239720 |
27-Aug-2012 |
imp |
Minor style(9) nit.
|
239719 |
27-Aug-2012 |
imp |
Don't puprosely overclock the SD bus to 30MHz, make the user explicltly enable that. The driver chose to use 60MHz / 2 (30MHz) most of the time rather than 60MHz / 4 (15MHz) based on the Linux driver of the time. This pushes the spec a little in order to not suffer the penalty of running at 15MHz. However, when other bus masters are active in the system, and the user tries 4-wire mode, the internal bus arbitration would fail with data loss as a result.
# Comments from PR were reworked to reflect my historical perspective
PR: 155214 (partial) Submitted by: Ian Lepore
|
239702 |
26-Aug-2012 |
gonzo |
Add ARM11 support for elf trampoline
|
239701 |
26-Aug-2012 |
gonzo |
Add support for ARM11 cpufunc
Obtained from: NetBSD (partially)
|
239699 |
26-Aug-2012 |
gjb |
Grammar fix: s/NIC's/NICs/
MFC after: 3 days
|
239698 |
26-Aug-2012 |
gonzo |
Call set_pcpu for ARMv6 architecture too
|
239697 |
26-Aug-2012 |
gonzo |
Merge fix for hang on ARM11 from NetBSD
|
239696 |
26-Aug-2012 |
gonzo |
Piggyback MIPS changes and add ARM syscons support for devices with framebuffer
While here - sort #if defined() order alphabetically
|
239690 |
25-Aug-2012 |
gonzo |
Style cleanup
|
239688 |
25-Aug-2012 |
gonzo |
ARM11 might have more then 32 interrupts, e.g. BCM2835: 72 interrupts
|
239687 |
25-Aug-2012 |
gonzo |
Add clrex, strex , ldrex, strex and variants
Submitted by: Alexander Rybalko
|
239626 |
23-Aug-2012 |
imp |
Fetch the chip select in the bridge driver, like all the other spi bridges do.
|
239623 |
23-Aug-2012 |
imp |
Use proper resource type when freeing.
Submitted by: Ian Lapore (indirectly in a larger patch)
|
239597 |
22-Aug-2012 |
gonzo |
Do not change "cachable" attribute for DMA memory allocated with BUS_DMA_COHERENT attribute
The minimum unit for changing "cachable" attribute is page, so call to pmap_change_attr effectively disable cache for all pages that newly allocated DMA memory region spans on. The problem is that general-purpose memory could reside on these pages too and disabling cache might affect performance. Moreover ldrex/strex operators raise Data Abort exception when accessing memory on page with "cachable" attribute off.
BUS_DMA_COHERENT does nto require memory to be coherent. It just suggests to do best effort for reducing synchronization overhead.
|
239553 |
22-Aug-2012 |
kientzle |
After r239366, fix the ti_edma3.c driver to use the exact name as used in the FDT.
|
239530 |
21-Aug-2012 |
hselasky |
Make some at91_pcm_xxx() functions NULL safe.
|
239508 |
21-Aug-2012 |
hrs |
- Calculate the I2C baud rate to keep them <100 kHz under different TCLK frequencies. The maximum freqency is 100 kHz according to the datasheet.
- Add child device probing support based on the device tree. It now tries to find i2c-address property in the tree and attach the device with given slave address to iicbus.
|
239371 |
18-Aug-2012 |
hrs |
Add mvts(4) driver for internal thermal sensor found on 88F6282 and 88F6283. The temperature value will be exported via sysctl like this:
dev.mvts.0.temperature: 52.1C
|
239370 |
18-Aug-2012 |
hrs |
Sort IDs.
|
239369 |
18-Aug-2012 |
hrs |
Fix build when DEBUG is defined.
|
239368 |
18-Aug-2012 |
hrs |
- MV_DEV_88F6282 has 256KB 4-way L2 cache. - Sort IDs in win_cpu_can_remap() and remove MV_DEV_MV78100 because it is included in MV_DEV_DISCOVERY. - Add MV_DEV_MV78XXX to xor_max_eng().
|
239367 |
18-Aug-2012 |
hrs |
Fix a bug that could fail to initialize GPIO pins specified in "gpios" because "gpio-controller" property at the controller node was always ignored.
|
239363 |
18-Aug-2012 |
andrew |
Remove machine from the LN2410SBC config, it is set by std.s3c2410
|
239362 |
18-Aug-2012 |
andrew |
Set machine correctly on ARM. This allows universe to use the correct world when building each kernel.
Reviewed by: imp
|
239351 |
17-Aug-2012 |
rpaulo |
The GPIO drivers were initialising their mutexes with type of MTX_NETWORK_LOCK. This is wrong since these mutexes have nothing to do with networking.
|
239324 |
16-Aug-2012 |
imp |
Preliminary Embest ATEB9200 support.
|
239323 |
16-Aug-2012 |
imp |
Hmmm, somehow this file was completely deleted, rather than just having the bogus lines being removed.
|
239322 |
16-Aug-2012 |
imp |
Remove unused hints.
|
239308 |
15-Aug-2012 |
gonzo |
Unbreak build for the rest of AT91 platforms
|
239307 |
15-Aug-2012 |
jceel |
Switch lpc initarm() to use struct arm_boot_params and therefore fix EA3250 kernel build.
Approved by: gonzo
|
239291 |
15-Aug-2012 |
gonzo |
Unbreak ATMEL kernel build
|
239283 |
15-Aug-2012 |
gonzo |
Specify architecture for assembler
|
239281 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, part 10
- Support for Texas Instruments SoCs: - AM335x - OMAP4
- Kernel configs, DTS for Beaglebone and Pandaboard
Submitted by: Ben Gray, Damjan Marion
|
239280 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, part 9
Very basic support for Nvidia Tegra2: timer, interrupts, UART.
Submitted by: Damjan Marion <dmarion@freebsd.org>
|
239279 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, intermission
Add configs missed in previous commits: - ARMADA XP - Embedded Artists EA3250
|
239278 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, part 8
r235162:
Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250 board.
Peripherals currently supported: - Serial ports - Interrupt controller - Timers - Ethernet - USB host - Framebuffer (in conjunction with SSD1289 LCD controller) - RTC - SPI - GPIO
Submitted by: Jakub Wojciech Klama <jceel@freebsd.org>
|
239277 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, part 7
Add Marvell ARMADA XP support
Obtained from: Marvell, Semihalf
|
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
|
239191 |
11-Aug-2012 |
andrew |
Move the decoding of the swi instruction to the syscall function. With the ARM EABI the syscall value will be moved to a register to ease adding thumb support. When this happens decoding of the instruction will no longer be required.
|
239190 |
11-Aug-2012 |
imp |
Correct the PLLA setting functions and centralize.
|
239189 |
11-Aug-2012 |
imp |
Update comments about setting PLLA and refernce the tables in the datasheet that express the limits.
|
239188 |
11-Aug-2012 |
imp |
Don't use C++ comments.
|
239168 |
10-Aug-2012 |
imp |
More comments about setting PLLA, or rather that we never do.
|
239167 |
10-Aug-2012 |
imp |
Add charge pump current register.
|
239065 |
05-Aug-2012 |
kib |
After the PHYS_TO_VM_PAGE() function was de-inlined, the main reason to pull vm_param.h was removed. Other big dependency of vm_page.h on vm_param.h are PA_LOCK* definitions, which are only needed for in-kernel code, because modules use KBI-safe functions to lock the pages.
Stop including vm_param.h into vm_page.h. Include vm_param.h explicitely for the kernel code which needs it.
Suggested and reviewed by: alc MFC after: 2 weeks
|
239033 |
04-Aug-2012 |
andrew |
Correctly return EFAULT in copyin & copyout on a fault. This fixes NFS when running FreeBSD on QEMU emulating a Gumstix board.
While here remove the use of a magic number in the not-XScale version.
Pointed out by: kib Reviewed by: stas
|
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.
|
238957 |
31-Jul-2012 |
imp |
Prefer ate over macb. macb doesn't work anymore, and ate has more errata workarounds in it.
|
238956 |
31-Jul-2012 |
imp |
Note about where we can boot this.
|
238955 |
31-Jul-2012 |
imp |
Allow chip selects other than 0. The SAM9260EK board has its dataflash on CS1.
|
238932 |
31-Jul-2012 |
imp |
macb doesn't work, switch to ate.
|
238922 |
30-Jul-2012 |
imp |
These files will support the whole at91sam9x5 family when done, so rename them now before they get copied further afield...
|
238921 |
30-Jul-2012 |
imp |
List the members of the AT91SAM9G45 family.
|
238895 |
30-Jul-2012 |
imp |
Fix a couple of comments about the rm9200, and fix a couple of indentation issues. Add note that we need to implement at91sam9260 erratum workaround.
|
238881 |
29-Jul-2012 |
imp |
Commit the dci (gadget) support to the one ATMEL kernel config where it might actually work.
|
238880 |
29-Jul-2012 |
imp |
Add usb_template for the gadget support. Even though this isn't a bootable kernel, its config will likely be copied to places that are.
Submitted by: Hans Petter Selasky
|
238873 |
28-Jul-2012 |
hrs |
Add support for Marvell 88F6282.
Sponsored by: Plat'Home, Co.,Ltd.
|
238850 |
27-Jul-2012 |
imp |
Add gadget devices. Not yet added to the child lists, but here to keep things from bit-rotting.
|
238849 |
27-Jul-2012 |
imp |
Add the usb device (gadget) side of things. Also add ehci bindings while I'm here in anticipation of usb2 support for newer SoCs.
Requested by: Hans Petter Selasky
|
238847 |
27-Jul-2012 |
imp |
Neither of these systems has PCI, but they do have ohci interface, so fix comments.
|
238846 |
27-Jul-2012 |
imp |
Add new at91sam9g45 support and sn9g45 board to the ATMEL kernel. Adapt SN9G45 board support to cope with multi-board.
|
238823 |
27-Jul-2012 |
imp |
Document the dataflash/mmc-sd issue. Add umass driver and usb. Boot off da0s1a instead of ate0. Note that MMC/SD is slot B. Until I switch over to NAND boot, dataflash booting will preclude having SD cards inserted at boot, so this last bit is untested.
My SAM9260-EK not boots to multi-user prompt.
|
238821 |
27-Jul-2012 |
imp |
Turns out the ETHERNUT5 isn't anything like the SAM9260-EK. Make this board init match better: UART1 instead of UART2, No RMMI, no SPI0, SPI1 comments.
|
238820 |
27-Jul-2012 |
imp |
Add (back?) ohci atmel attachment.
|
238811 |
26-Jul-2012 |
imp |
Trim read/write sizes to 128 bytes. Pages are only 128 bytes in size. Writes larger than this will wrap to the same page. Reads larger than this are permitted, but why take chances.
|
238789 |
26-Jul-2012 |
andrew |
Add support for the DesignA Electronics Snapper9g45 System on Module.
Reviewed by: imp
|
238788 |
26-Jul-2012 |
andrew |
Add support for the Atmel AT91SAM9G45 CPU.
Reviewed by: imp
|
238787 |
26-Jul-2012 |
imp |
Some models have 6 USARTS + DBGU. Set a consistent name.
|
238786 |
26-Jul-2012 |
imp |
Fix typo in comment. spibus uses cs= rather than addr=, so fix hints to use that (nop since spibus cs defaults to 0, and at91_spi assumes 0).
|
238785 |
26-Jul-2012 |
imp |
Update partitions to reflect "sam9 demo" defaults. Update i2c devices to just include the eeprom. Update dataflash chip select to be CS 1 (this doesn't work yet and needs changes to at91_spi and the spibus infrastructure). Fix typo in comment.
|
238545 |
17-Jul-2012 |
gonzo |
Move unmask IRQ function call up to nexus device level.
FDT-enabled targets were broken after r238043 that relies on device up the hierarchy to properly setup interrupt. nexus device for ARM platforms did job only partially: setting handler but not unmasking interrupt. Unmasking was performed by platform code.
Reviewed by: andrew@
|
238467 |
15-Jul-2012 |
imp |
These were never used, remove them.
|
238465 |
15-Jul-2012 |
imp |
Configure the peripheral pins for MCI devices. Eliminate the now-unused at91_pio_rm9200.h.
|
238443 |
14-Jul-2012 |
imp |
Add preliminary support for Atmel SAM9260-EK evaluation kit. Initially identical to the Ethernut5, but will diverge shortly before I refactor...
|
238442 |
14-Jul-2012 |
imp |
uboot should be telling us it is an ETHERNUT5 for this board. Tag it as such.
|
238439 |
14-Jul-2012 |
imp |
Create common routines for configuring the serial ports and use them on all the at91rm9200 boards.
|
238415 |
13-Jul-2012 |
imp |
For our at91rm9200 boards, register which subtype of SoC is on the board. We'll use this later to control the differences between these two variants' pins.
|
238404 |
12-Jul-2012 |
imp |
This file is no longer AT91RM9200 specific, but now is generic to all Atmel AT91 SoC's we support. Rename to reflect that.
|
238403 |
12-Jul-2012 |
imp |
Remember where we found the DBGU and use that for our console.
|
238398 |
12-Jul-2012 |
imp |
Fix whitespace divot.
|
238397 |
12-Jul-2012 |
imp |
Complete the transition away from newbus to populate the children to the linker set of CPU modules. The newbus method, although clever, had many flaws: it didn't really support multiple SoC, many of the comments about order were just wrong, and it did a few things far too late to be useful. delay and cpu_reset now work much earlier in the boot process.
|
238390 |
12-Jul-2012 |
imp |
Create the children devices for the SoC in atmelarm bus node, not in the identify routine of the CPU.
|
238389 |
12-Jul-2012 |
imp |
Export the interrupt status vector via soc_data. Set the interrupt priorities in the AIC in the atmelarm driver before attaching the children. Delete redunant copies of the code.
|
238376 |
11-Jul-2012 |
imp |
Make the SoC stuff a little more modular, and start to move away from having the CPU device that's a child of atmelarm that does stuff.
o Create a linker_set for the support fucntions for the SoCs. o Rename soc_data to soc_info. o Move the delay and reset function pointers to new soc_data struct o Create elements for all known SoCs o Add lookup of the SoC we found, and print a warning if it isn't one we know about.
|
238370 |
11-Jul-2012 |
imp |
at91pit->at91_pit for consistnecy with other drivers.
|
238369 |
11-Jul-2012 |
imp |
at91$DEV->at91_$DEV to match other Atmel drivers. Also, export at91_rst_cpu_reset.
|
238358 |
10-Jul-2012 |
imp |
Remove some more unused code.
|
238354 |
10-Jul-2012 |
imp |
Go ahead and disable the interrupts for the DBGU the boot loader may have left enabled after we detect the CPU, and remove the multiplely copied code from the SoC modules.
|
238348 |
10-Jul-2012 |
imp |
Remove a useless bit of indirection. On all Atmel ARM products, irq 1 is the system IRQ, so use the define for it and get on with life.
|
238347 |
10-Jul-2012 |
imp |
Revert committal of local change accidentally swept up in r238329.
|
238341 |
10-Jul-2012 |
imp |
Pure style mischief. at91_$DEV_ rather than at91$DEV_ to match others.
|
238340 |
10-Jul-2012 |
imp |
Minor rework to eliminate at91rm9200reg.h dependency and possibly set the stage for a detach routine (unlikely to be useful, but while I was here..)
|
238335 |
10-Jul-2012 |
imp |
Revert last change. It was accidental.
|
238334 |
10-Jul-2012 |
imp |
Collapse all copies of at91_add_child into at91.c. They were logically identical before today, and actually identical after today's changes.
|
238332 |
10-Jul-2012 |
imp |
Missed one of the special AT91SAM9xxx_BASE defines. This should be AT91_BASE.
|
238331 |
10-Jul-2012 |
imp |
The system IRQ is always IRQ 1. Make it so.
|
238330 |
10-Jul-2012 |
imp |
Eliminate the AT91XXXX_BASE for each SoC. AT91_BASE is the right way to spell this since we only have one AT91_BASE for all Atmel arm9 SoCs.
|
238329 |
10-Jul-2012 |
imp |
Remove some unused variables/externs that have been copied too many times...
|
238327 |
10-Jul-2012 |
imp |
Not quite ready for this yet, so comment it out.
|
238325 |
10-Jul-2012 |
imp |
There's nothing AT91RM9200 specific about this file at all.
|
238189 |
07-Jul-2012 |
imp |
Create a generic way to support multiple boards within an arm platform. Add all the atmel boards to the ATMEL kernel for testing purposes. Until boot loader arg parsing of baord type is done, this won't actually be able to do the runtime selection.
|
238130 |
05-Jul-2012 |
marcel |
Fix LINT.
Obtained from: Juniper Networks, Inc.
|
237883 |
01-Jul-2012 |
imp |
Create a pseudo-lint kernel for all at91 SoCs. This kernel will not currently boot, but will serve as a good linting. make universe could now be altered to skip building all the other at91 kernels...
|
237881 |
01-Jul-2012 |
imp |
Opt-in rather than opt-out of the SoC. We don't really support running with multiple SoCs compiled in very well anyway, so this just wastes space. As more and more SoCs arrive in the tree, it is better to edit one master file that builds them all than many board files.
|
237841 |
30-Jun-2012 |
marius |
Exclude at91sam9x25 support, which just wastes space for Ethernut 5.
|
237745 |
29-Jun-2012 |
imp |
Tweak comment.
|
237744 |
29-Jun-2012 |
imp |
Add PIOD, make at91sam9x25 a standard SoC, tweak some comments.
|
237743 |
29-Jun-2012 |
imp |
Ooops, replaced the at91sam9g20 interrupt list with the at91sam9x25 ones.
|
237742 |
29-Jun-2012 |
imp |
Initital support for AT91SAM9X25 SoC and the SAM9X25-EK evaluation board. Much work remains.
|
237741 |
29-Jun-2012 |
imp |
All xscale ports are armeb, so mark it here. This should reduce universe times a little.
|
237517 |
24-Jun-2012 |
andrew |
Make the wchar_t type machine dependent.
This is required for ARM EABI. Section 7.1.1 of the Procedure Call for the ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an unsigned short with the former preferred.
Because of this requirement we need to move the definition of __wchar_t to a machine dependent header. It also cleans up the macros defining the limits of wchar_t by defining __WCHAR_MIN and __WCHAR_MAX in the same machine dependent header then using them to define WCHAR_MIN and WCHAR_MAX respectively.
Discussed with: bde
|
237433 |
22-Jun-2012 |
kib |
Implement mechanism to export some kernel timekeeping data to usermode, using shared page. The structures and functions have vdso prefix, to indicate the intended location of the code in some future.
The versioned per-algorithm data is exported in the format of struct vdso_timehands, which mostly repeats the content of in-kernel struct timehands. Usermode reading of the structure can be lockless. Compatibility export for 32bit processes on 64bit host is also provided. Kernel also provides usermode with indication about currently used timecounter, so that libc can fall back to syscall if configured timecounter is unknown to usermode code.
The shared data updates are initiated both from the tc_windup(), where a fast task is queued to do the update, and from sysctl handlers which change timecounter. A manual override switch kern.timecounter.fast_gettime allows to turn off the mechanism.
Only x86 architectures export the real algorithm data, and there, only for tsc timecounter. HPET counters page could be exported as well, but I prefer to not further glue the kernel and libc ABI there until proper vdso-based solution is developed.
Minimal stubs neccessary for non-x86 architectures to still compile are provided.
Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
|
237432 |
22-Jun-2012 |
imp |
Fix a stray debug that I committed accidentally years ago...
|
237430 |
22-Jun-2012 |
kib |
Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer to timekeeping information.
MFC after: 1 week
|
237429 |
22-Jun-2012 |
imp |
Move these #defines to at91reg.h (where I should have put them in the first place).
|
237239 |
18-Jun-2012 |
marius |
Revert the part of r236495 that introduced checking of SPI_SR_TXEMPTY for TX transfer completion as for reasons unknown this occasionally causes SPI_SR_RXBUFF and SPI_SR_ENDRX to not rise. In any case, once the RX part of the transfer is done it's obvious that the preceding TX part had finished and checking of SPI_SR_TXEMPTY was introduced to rule out a possible cause for the data corruption mentioned in r236495 but which didn't turn out to be the problem anyway.
MFC after: 3 days
|
237238 |
18-Jun-2012 |
marius |
Try to bring this file closer to style(9).
|
237237 |
18-Jun-2012 |
marius |
Unbreak after r236658 by comparing the right things.
|
237168 |
16-Jun-2012 |
alc |
The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap layer, but it is read directly by the MI VM layer. This change introduces pmap_page_is_write_mapped() in order to completely encapsulate all direct access to PGA_WRITEABLE in the pmap layer.
Aesthetics aside, I am making this change because amd64 will likely begin using an alternative method to track write mappings, and having pmap_page_is_write_mapped() in place allows me to make such a change without further modification to the MI VM layer.
As an added bonus, tidy up some nearby comments concerning page flags.
Reviewed by: kib MFC after: 6 weeks
|
237151 |
16-Jun-2012 |
imp |
Throw this debug behind bootverbose. The information isn't all that exciting once the initial board bring up is over.
|
237137 |
15-Jun-2012 |
imp |
Remove stray line from merge.
|
237130 |
15-Jun-2012 |
imp |
Make it possible to link together a sam and an rm kernel. The results aren't very pretty yet, but this takes DELAY and cpu_reset and makes them pointers.
# I worry that these are set too late in the boot, especially cpu_reset.
|
237125 |
15-Jun-2012 |
imp |
These options are unused, and can safely be retired.
|
237124 |
15-Jun-2012 |
imp |
This hints file doesn't actually do anything, and besides it is commented out here. Remove it.
|
237122 |
15-Jun-2012 |
imp |
Collapse the files.at91 and files.at91sam9 back into files.at91. Create a new option for at91rm9200 support. Set this option in std.at91. Create a new option for the at91sam9 standard devices. Set this option in std.at91sam9. Retire files.at91sam9. Add options for at91sam9x25 SoC and SAM9X25EK board, but don't connect it just yet as the supporting files aren't quite ready.
Note: device at91rm9200 and device at91sam9 are presently mutually exclusive.
|
237118 |
15-Jun-2012 |
imp |
Fix a global shadowing problem when LINUX_BOOT_ABI was defined.
|
237115 |
15-Jun-2012 |
imp |
Take half a step closer towards having a unified atmel kernel by rearranging where we initialize the time counter and putting the common stubs into a central place.
|
237089 |
14-Jun-2012 |
imp |
Fix missing straggler for the move to parse_boot_param()
|
237069 |
14-Jun-2012 |
imp |
Defines for parsing linux ATAGs lists.
|
237045 |
14-Jun-2012 |
imp |
More Linux boot support. Create arm_dump_avail_init() to initialize this array either from Linux boot data, when enabled, or in the typical way that most ports do it. arm_pyhs_avail_init is coming soon since it must be a separate function.
|
237044 |
14-Jun-2012 |
imp |
Add support for parsing Linux ATAGs such as you'd see from uboot or redboot. Support is very preiminary and likely needs some work. Also, do some minor code shuffling of the FreeBSD /boot/loader metadata parsing code. This code is preliminary and should be used with caution.
|
237042 |
14-Jun-2012 |
imp |
Create default_parse_boot_param which, if FreeBSD /boot/loader support is enabled, sets values based on the metadata passed in. Otherwise fake_preload_metadata is called. Change the default parse_boot_param to default_parse_boot_param. Enable this functionality only on the mv platform, which is where most of the code is from.
Reviewed by: cognet, Ian Lapore
|
237040 |
14-Jun-2012 |
imp |
Modify all the arm platform files to call parse_boot_param passing in the boot parameters from initarm first thing. parse_boot_param parses the boot arguments and converts them to the /boot/loader metadata the rest of the kernel uses. parse_boot_param is a weak alias to fake_preload_metadata, which all the platforms use now, but may become more extensive in the future.
Since it is a weak symbol, specific boards may define their own parse_boot_param to interface to custom boot loaders.
Reviewed by: cognet@, Ian Lapore
|
237010 |
13-Jun-2012 |
imp |
Remove leakage of other patches into last commit.
|
236997 |
13-Jun-2012 |
fabient |
Add ARM callchain support for hwpmc.
Sponsored by: NETASQ MFC after: 3 days
|
236992 |
13-Jun-2012 |
imp |
trim trailing whitespace
|
236991 |
13-Jun-2012 |
imp |
Final whitespace trim.
|
236990 |
13-Jun-2012 |
imp |
Trim trailing whitespace...
|
236989 |
13-Jun-2012 |
imp |
Strip trailing whitespace before other changes.
|
236988 |
13-Jun-2012 |
imp |
Strip trailing whitespace.
|
236987 |
13-Jun-2012 |
imp |
trim trailing spaces that have accumulated over the years (these files served as the basis for too many other platforms).
|
236846 |
10-Jun-2012 |
andrew |
Remove an unneeded increment from initarm. The variable is uninitialised, is not used in this part of the function and correctly initialised later when it is used.
|
236845 |
10-Jun-2012 |
andrew |
The GUMSTIX-QEMU config file is almost identical to the GUMSTIX config, include the latter file from the former rather than duplicating it.
|
236828 |
10-Jun-2012 |
andrew |
Pull out the common code to initialise proc0 & thread0 from initarm to a common function.
Reviewed by: imp
|
236681 |
06-Jun-2012 |
imp |
Remove stray break; that resulted from a last-minute, untested change.
|
236658 |
06-Jun-2012 |
imp |
Enhance the Atmel SoC chip identification routines to account for more SoC variants. Fold the AT91SAM9XE chips into the AT91SAM9260 handling, where appropriate. The following SoCs/SoC families are recognized: at91cap9, at91rm9200, at91sam9260, at91sam9261, at91sam9263, at91sam9g10, at91sam9g20, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9x5 and the following variations are also recognized: at91rm9200_bga, at91rm9200_pqfp, at91sam9xe, at91sam9g45, at91sam9m10, at91sam9g46, at91sam9m11, at91sam9g15, at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35 This is only the identification routine: no additional Atmel devices are supported at this time.
# With these changes, I'm able to boot to the point of identification # on a few different Atmel SoCs that we don't yet support using the # KB920X config file -- someday tht will be an ATMEL config file...
|
236617 |
05-Jun-2012 |
imp |
Remove dead code.
|
236535 |
04-Jun-2012 |
imp |
Eliminate the now-unused AT91C_MASTER_CLOCK option and change the one place in the source it was used to the more correct AT91C_MAIN_CLOCK. Sort AT91C_MAIN_CLOCK into a better location in the options.arm file.
|
236524 |
03-Jun-2012 |
imp |
Minor rearrangement of the locore <-> initarm interface. Pass in a structure with the first 4 registers to allow a wider range of boot loaders to work. Future commits will make use of this to centralize support for the different loaders.
|
236498 |
03-Jun-2012 |
imp |
Remove stray repeated line...
|
236497 |
03-Jun-2012 |
marius |
- Now that the DataFlash related drivers work properly (at91_spi(4) since r236495 and at45d(4) since r236496), enable them by default. - Sort BOOTP options.
|
236495 |
03-Jun-2012 |
marius |
- Prepend the device description with "AT91" to reflect its nature. [1] - Move DMA tag and map creature to at91_spi_activate() where the other resource allocation also lives. [1] - Flesh out at91_spi_deactivate(). [1] - Work around the "Software Reset must be Written Twice" erratum. - For now, run the bus at the slowest speed possible in order to work around data corruption on transit even seen with 9 MHz on ETHERNUT5 (15 MHz maximum) and AT45DB321D (20 MHz maximum). This also serves as a poor man's work-around for the "NPCSx rises if no data data is to be transmitted" erratum of RM9200. Being able to use the appropriate bus speed would require: 1) Adding a proper work-around for the RM9200 bug consisting of taking the chip select control away from the SPI peripheral and managing it directly as a GPIO line. 2) Taking the maximum frequencies supported by the actual board and the slave devices into account and basing the whole thing on the master clock instead of hardcoding a divisor as previously done. 3) Fixing the above mentioned data corruption. - KASSERT that TX/RX command and data sizes match on transfers. - Introduce a mutex ensuring that only one child device is running a SPI transfer at a time. [1] - Add preliminary, #ifdef'ed out support for setting the chip select. [1] - Use the RX instead of the TX commando size when setting up the RX side of a transfer. - For controllers having SPI_SR_TXEMPTY, i.e. !RM9200, also wait for the completion of the TX part of transfers before stopping the whole thing again. - Use DEVMETHOD_END. [1] - Use NULL instead of 0 for pointers. [1, partially]
Additional testing by: Ian Lepore
Submitted by: Ian Lepore [1] MFC after: 1 week
|
236373 |
01-Jun-2012 |
imp |
Revert debug and other immature code accidentally committed in r236372.
|
236372 |
01-Jun-2012 |
imp |
Initialize the clocks before we call cninit() so that the serial console so initialized will work upon return from cninit. While this is the very next line, other platforms setup all this stuff before calling cninit. Also, initialize the SDRAM base register in the inner block in at91_ramsize().
|
236308 |
30-May-2012 |
gber |
Print userspace backtrace for current thread.
Reviewed by: imp Obtained from: Semihalf
|
236307 |
30-May-2012 |
gber |
Flush D and I caches after setting a breakpoint.
Reviewed by: imp Obtained from: Semihalf
|
236215 |
29-May-2012 |
imp |
Compute the master clock frequency, so we no longer need to have it compiled into the kernel. This allows us to boot the same kernel on machines with different master clock frequencies, so long as we can determine the main clock frequency accurately. Cleanup the pmc clock init function so it can be called in early boot so we can use the serial port just after we call cninit.
# We have two calls to at91_pmc_clock_init for reasons unknown, that will # be fixed later -- it is harmless for now.
|
236191 |
28-May-2012 |
marius |
- Correct the comments regarding the sizes of some partitions in the DataFlash. - Add a mapping for the Nut/OS configuration DataFlash partition according to the board manual (but not known to either Linux or U-Boot (patches).
|
235941 |
24-May-2012 |
bz |
MFp4 bz_ipv6_fast:
in_cksum.h required ip.h to be included for struct ip. To be able to use some general checksum functions like in_addword() in a non-IPv4 context, limit the (also exported to user space) IPv4 specific functions to the times, when the ip.h header is present and IPVERSION is defined (to 4).
We should consider more general checksum (updating) functions to also allow easier incremental checksum updates in the L3/4 stack and firewalls, as well as ponder further requirements by certain NIC drivers needing slightly different pseudo values in offloading cases. Thinking in terms of a better "library".
Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
Reviewed by: gnn (as part of the whole) MFC After: 3 days
|
235908 |
24-May-2012 |
gber |
Return Supervisor SP and LR registers instead of User ones while in KDB thread.
Obtained from: Semihalf
|
235907 |
24-May-2012 |
gber |
ARMs don't have motherboards.
Obtained from: Semihalf
|
235898 |
24-May-2012 |
mav |
MFprojects/zfsd: Generalize and unify ses device description.
|
235831 |
23-May-2012 |
fabient |
Soft PMC support for ARM. Callgraph is not captured, only current location.
Sample system wide profiling: "pmcstat -Sclock.hard -T"
|
235718 |
21-May-2012 |
imp |
Be a little less magical, not that these values are likely to change...
|
235717 |
21-May-2012 |
imp |
Implement pmap_mincore for arm. Now programs using it don't cause a flood of console messages.
Reviewed by: alc@
|
235715 |
21-May-2012 |
imp |
Another minor re-arrangement of the code: calcualte the master clock frequency in the at91_pmc_clock_init rather than passing it in. Allow for frequencies >= 21MHz by rounding to the nearest 500Hz (Idea from Ian Lapore whose company uses a similar arrangement in their product). at91_pmc_clock_init() is now nearly independent of the rest of the pmc driver (which means we may be able to call it much earlier in boot soon to eliminate the master clock config file requirement for printf to work during early boot and also eliminate some interdependencies with the device ordering which requires pmc to be the first device added).
|
235698 |
20-May-2012 |
imp |
Minor cleanup before some more major changes: o main_clock_hz isn't used, eliminate it o move main clock calculation code and table so we have only one ifdef.
|
235656 |
19-May-2012 |
marcel |
Unbreak LINT for ARM: DEBUG is a kernel configuration option.
|
235611 |
18-May-2012 |
gber |
Add localbus driver for Marvell's platforms.
Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
|
235609 |
18-May-2012 |
gber |
Add architecture dependent code to support NAND Framework on Marvell SoCs.
Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
|
235348 |
12-May-2012 |
marius |
Add glue/support for the SAM9XE512-based Ethernut 5 boards. Currently, all integrated and on-board peripherals except the DataFlash (at91_spi(4) and at45d(4) still need to be unb0rken) and NAND Flash (missing NAND framework) are working. AFAICT, this makes FreeBSD the first operating system besides Nut/OS supporting Ethernut 5 out of tree.
|
235278 |
11-May-2012 |
imp |
Remove unused cruft. We call through memcpy more directly when we need to move the kernel, so we no longer need this.
|
235277 |
11-May-2012 |
imp |
This comment has become unmoored from the code to which it applies. Move it back.
|
235273 |
11-May-2012 |
imp |
Remove obsolte big endian flag. It is no longer needed.
|
235271 |
11-May-2012 |
imp |
Hack to unbreak boot2 for at91rm9200 boot loader. When the at91sam code came in, it moved things around which wound up breaking the build. We have to do this bit of a hack to avoid duplication of a lot of #defines.
|
235234 |
10-May-2012 |
imp |
Generate board id's from Linux's mach-types database for all arm ports. This currently is a nop, but will soon be used to allow support for multiple boards to be built into one kernel (starting with AT91RM9200 and expanding out from there).
|
235072 |
06-May-2012 |
imp |
Fix the MACHINE_ARCH for big endian arm to be armeb.
|
235062 |
05-May-2012 |
imp |
I need to change uname -p, not uname -m, so back this out. Also, fix a couple of style(9) issues while I'm here.
Submitted by: nathanw, bde
|
235050 |
05-May-2012 |
imp |
Big endian arm boxes need to have a uname -m of armeb, not arm, so that the bootstrap from source works correctly.
MFC after: 4 days
|
234931 |
02-May-2012 |
imp |
Fix comment about what board this is really for left over from early cut and paste.
|
234923 |
02-May-2012 |
imp |
The PIT is really 16 bytes long (0x10) not 10 bytes long. Doesn't matter much, since these defines are unused...
Obtained from: AT91SAM9G20 datasheet
|
234901 |
01-May-2012 |
marius |
- Add missing locking in at91_usart_getc(). - Align the RX buffers on the cache line size, otherwise the requirement of partial cache line flushes on every are pretty much guaranteed. [1] - Make the code setting the RX timeout match its comment (apparently, start and stop bits were missed in the previous calculation). [1] - Cover the busdma operations in at91_usart_bus_{ipend,transmit}() with the hardware mutex, too, so these don't race against each other. - In at91_usart_bus_ipend(), reduce duplication in the code dealing with TX interrupts. - In at91_usart_bus_ipend(), turn the code dealing with RX interrupts into an else-if cascade in order reduce its complexity and to improve its run-time behavior. - In at91_usart_bus_ipend(), add missing BUS_DMASYNC_PREREAD calls on the RX buffer map before handing things over to the hardware again. [1] - In at91_usart_bus_getsig(), used a variable of sufficient width for storing the contents of USART_CSR. - Use KOBJMETHOD_END. - Remove an unused header.
Submitted by: Ian Lepore [1] Reviewed by: Ian Lepore MFC after: 1 week
|
234785 |
29-Apr-2012 |
dim |
Add a convenience macro for the returns_twice attribute, and apply it to the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork).
MFC after: 2 weeks
|
234688 |
25-Apr-2012 |
stas |
- Disable MMU before reconfiguring the pagetables in the trampoline code. Otherwise we might end up overwriting the PTEs we're currently using for some reason.
Reviewed by: cognet
|
234561 |
22-Apr-2012 |
marius |
Interrupts must be disabled while handling a partial cache line flush, as otherwise the interrupt handling code may modify data in the non-DMA part of the cache line while we have it stashed away in the temporary stack buffer, then we end up restoring a stale value.
PR: 160431 Submitted by: Ian Lepore MFC after: 1 week
|
234560 |
22-Apr-2012 |
marius |
- Add support for MCI1 revision 2xx controllers and a work-around for their "Data Write Operation and number of bytes" erratum. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
|
234337 |
16-Apr-2012 |
andrew |
Replace the C implementation of __aeabi_read_tp with an assembly version. This ensures we follow the ABI by preserving registers r1-r3.
Reviewed by: jmallett, imp
|
234293 |
14-Apr-2012 |
marius |
Generate an obviously missing STOP when having finished transmitting data. This fixes communication with PCF8563.
|
234292 |
14-Apr-2012 |
marius |
Add support for the Atmel SAM9XE familiy of microcontrollers, which consist of a ARM926EJ-S processor core with up to 512 Kbytes of on-chip flash. Tested with SAM9XE512.
This file was missed in r234291.
|
234291 |
14-Apr-2012 |
marius |
Add support for the Atmel SAM9XE familiy of microcontrollers, which consist of a ARM926EJ-S processor core with up to 512 Kbytes of on-chip flash. Tested with SAM9XE512.
|
234281 |
14-Apr-2012 |
marius |
- Try to bring these files closer to style(9). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
|
234006 |
07-Apr-2012 |
stas |
- Revert part of r234005, which I did not intend to commit. Sorry! :(
|
234005 |
07-Apr-2012 |
stas |
- Add kernel config file for QEMU-emulated gumstix board.
|
234004 |
07-Apr-2012 |
stas |
- Add new ARM kernel option QEMU_WORKAROUNDS which can be used in the code which needs to implement some specific behaviour when being run under QEMU. - Make PXA UART probe code to work under QEMU gumstix, which doesn't emulate all the ports properly.
|
233628 |
28-Mar-2012 |
fabient |
Add software PMC support.
New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8).
Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions.
Sponsored by: NETASQ MFC after: 1 month
|
233271 |
21-Mar-2012 |
ed |
Remove pty(4) from our kernel configurations.
As of FreeBSD 8, this driver should not be used. Applications that use posix_openpt(2) and openpty(3) use the pts(4) that is built into the kernel unconditionally. If it turns out high profile depend on the pty(4) module anyway, I'd rather get those fixed. So please report any issues to me.
The pty(4) module is still available as a kernel module of course, so a simple `kldload pty' can be used to run old-style pseudo-terminals.
|
233013 |
15-Mar-2012 |
raj |
Fix error check.
Submitted by: Lukasz Plachno Obtained from: Semihalf
|
232619 |
06-Mar-2012 |
attilio |
Disable the option VFS_ALLOW_NONMPSAFE by default on all the supported platforms. This will make every attempt to mount a non-mpsafe filesystem to the kernel forbidden, unless it is expressely compiled with VFS_ALLOW_NONMPSAFE option.
This patch is part of the effort of killing non-MPSAFE filesystems from the tree.
No MFC is expected for this patch.
|
232512 |
04-Mar-2012 |
raj |
Remove unused #defines. All this is now retrieved from the device tree.
MFC after: 1 week
|
232356 |
01-Mar-2012 |
jhb |
- Change contigmalloc() to use the vm_paddr_t type instead of an unsigned long for specifying a boundary constraint. - Change bus_dma tags to use bus_addr_t instead of bus_size_t for boundary constraints.
These allow boundary constraints to be fully expressed for cases where sizeof(bus_addr_t) != sizeof(bus_size_t). Specifically, it allows a driver to properly specify a 4GB boundary in a PAE kernel.
Note that this cannot be safely MFC'd without a lot of compat shims due to KBI changes, so I do not intend to merge it.
Reviewed by: scottl
|
232295 |
29-Feb-2012 |
cognet |
Make sure we do not provide the page 0 to the VM. It can't handle it properly, because pmap_extract() returns 0 when there's no mapping.
PR: arm/154227 MFC after: 1 week
|
230475 |
23-Jan-2012 |
das |
Add C11 macros describing subnormal numbers to float.h.
Reviewed by: bde
|
230455 |
22-Jan-2012 |
pjd |
TDF_* flags should be used with td_flags field and TDP_* flags should be used with td_pflags field. Correct two places where it was not the case.
Discussed with: kib MFC after: 1 week
|
230366 |
20-Jan-2012 |
das |
Add parentheses where required. Without them, `sizeof LDBL_MAX' is a syntax error and shouldn't be, while `1 FLT_ROUNDS' isn't a syntax error and should be. Thanks to bde for the examples.
|
230229 |
16-Jan-2012 |
das |
Fix the value of float_t to match what is implied by FLT_EVAL_METHOD.
|
230198 |
16-Jan-2012 |
das |
Fix the definition of FLT_EVAL_METHOD and some minor bugs.
|
230191 |
16-Jan-2012 |
das |
Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support for dynamic rounding modes, but FPUless chips that use softfloat can support it because everything is emulated anyway. (We presently have incomplete support for hardware FPUs.)
Submitted by: Ian Lepore
|
230133 |
15-Jan-2012 |
uqs |
Remove spurious 8bit chars, turning files into plain ASCII.
|
229639 |
05-Jan-2012 |
adrian |
Add missing options so modules build/load correctly.
|
229125 |
31-Dec-2011 |
marius |
Fix header pollution, possibly unbreaking the build of cfi_bus_ixp4xx.c as part of cfi.ko.
|
228530 |
15-Dec-2011 |
raj |
ARM pmap fixes:
- Write Buffers have to be drained after write to Page Table even if caches are in write-through mode.
- Make sure to sync PTE in pmap_zero_page_generic().
Submitted by: Michal Mazur Reviewed by: cognet Obtained from: Semihalf MFC after: 1 month
|
228522 |
15-Dec-2011 |
alc |
Eliminate vestiges of page coloring.
|
228504 |
14-Dec-2011 |
raj |
Make *intr{cnt,names} on ARM reside in data section, similar to other arches.
sintrnames and sintrcnt are initialized with non-zero values, which were discarded by the .bss directive, so consumers like "vmstat -i" were not getting correct data.
Submitted by: Lukasz Plachno Obtained from: Semihalf MFC after: 1 month
|
228483 |
14-Dec-2011 |
hselasky |
Implement better support for USB controller suspend and resume.
This patch should remove the need for kldunload of USB controller drivers at suspend and kldload of USB controller drivers at resume.
This patch also fixes some build issues in avr32dci.c
MFC after: 2 weeks
|
228469 |
13-Dec-2011 |
ed |
Replace __signed by signed.
The signed keyword is an integral part of the C syntax. There's no need to use __signed.
|
228201 |
02-Dec-2011 |
jchandra |
Fix OF_finddevice error return value in case of FDT.
According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error.
This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well.
Reported by: nwhitehorn
Reviewed by: raj Approved by: raj, nwhitehorn
|
227849 |
22-Nov-2011 |
hselasky |
Rename device_delete_all_children() into device_delete_children().
Suggested by: jhb @ and marius @ MFC after: 1 week
|
227843 |
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
227730 |
19-Nov-2011 |
raj |
Initial version of cesa(4) driver for Marvell crypto engine and security accelerator.
The following algorithms and schemes are supported: - 3DES, AES, DES - MD5, SHA1
Obtained from: Semihalf Written by: Piotr Ziecik
|
227701 |
19-Nov-2011 |
hselasky |
Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children().
MFC after: 1 week
|
227333 |
08-Nov-2011 |
attilio |
Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on all the architectures. The option allows to mount non-MPSAFE filesystem. Without it, the kernel will refuse to mount a non-MPSAFE filesytem.
This patch is part of the effort of killing non-MPSAFE filesystems from the tree.
No MFC is expected for this patch.
Tested by: gianni Reviewed by: kib
|
227309 |
07-Nov-2011 |
ed |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
|
227293 |
07-Nov-2011 |
ed |
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
|
226995 |
01-Nov-2011 |
marius |
- Import the common MII bitbang'ing code from NetBSD and convert drivers to take advantage of it instead of duplicating it. This reduces the size of the i386 GENERIC kernel by about 4k. The only potential in-tree user left unconverted is xe(4), which generally should be changed to use miibus(4) instead of implementing PHY handling on its own, as otherwise it makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to xe(4) just for the MII bitbang'ing code. The common MII bitbang'ing code also is useful in the embedded space for using GPIO pins to implement MII access. - Based on lessons learnt with dc(4) (see r185750), add bus barriers to the MII bitbang read and write functions of the other drivers converted in order to ensure the intended ordering. Given that register access via an index register as well as register bank/window switching is subject to the same problem, also add bus barriers to the respective functions of smc(4), tl(4) and xl(4). - Sprinkle some const.
Thanks to the following testers: Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4)) Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).
Reviewed by: yongari (subset of drivers) Obtained from: NetBSD (partially)
|
226832 |
27-Oct-2011 |
kevlo |
Check the return value of BUS_SETUP_INTR()
Reviewed by: imp
|
226607 |
21-Oct-2011 |
das |
People porting FreeBSD to new architectures ought not have to implement a deprecated FPU control interface in addition to the standard one. To make this clearer, further deprecate ieeefp.h by not declaring the function prototypes except on architectures that implement them already.
Currently i386 and amd64 implement the ieeefp.h interface for compatibility, and for fp[gs]etprec(), which doesn't exist on most other hardware. Powerpc, sparc64, and ia64 partially implement it and probably shouldn't, and other architectures don't implement it at all.
|
226498 |
18-Oct-2011 |
des |
Trace attempts to call restricted MD syscalls.
|
226443 |
16-Oct-2011 |
cognet |
Fix 2 bugs :
- A race condition could happen if two threads were using RAS at the same time as the code didn't reset RAS_END, the RAS code could believe we were not in a RAS, when we were in fact. - Using signed value logic to compare addresses wasn't such a good idea.
Many thanks to Ian to investigate on these issues.
Pointy hat to: cognet PR: arm/161498 Submitted by: Ian Lepore <freebsd At damnhippie DOT dyndns dot org MFC after: 1 week
|
226441 |
16-Oct-2011 |
cognet |
Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the page has been allocated, or we could end up using random values, and bad things could happen.
PR: arm/161492 Submitted by: Ian Lepore <freebsd AT damnhippie dot dyndns DOT org> MFC after: 1 week
|
226325 |
12-Oct-2011 |
thompsa |
Name these gpio pins better, they are on an external PLD and not the same as the cpu wired gpio.
|
226324 |
12-Oct-2011 |
thompsa |
Dont just set the pin high when turning on output, use the current value. Also let this value be set when in input mode.
|
226112 |
07-Oct-2011 |
kib |
Remove unused define.
MFC after: 1 month
|
226034 |
05-Oct-2011 |
thompsa |
Add missing newbus glue, this has never attached properly to gpiobus.
|
225995 |
04-Oct-2011 |
marcel |
Properly guard definitions of DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ and SGROWSIZ. They can be set in the kernel configuration file.
|
225991 |
04-Oct-2011 |
marcel |
Fix build when DEBUG is defined in the kernel configuration file (e.g. LINT).
|
225990 |
04-Oct-2011 |
marcel |
Include opt_* headers first. Otherwise we can end up with redefined symbols.
|
225988 |
04-Oct-2011 |
marcel |
Fix build when DEBUG is defined (e.g. for LINT).
|
225973 |
04-Oct-2011 |
kib |
Convert ARM to the syscallenter/syscallret system call sequence handlers.
Tested by: gber MFC after: 1 month
|
225882 |
30-Sep-2011 |
kevlo |
Remove pointless semicolons after label
|
225617 |
16-Sep-2011 |
kmacy |
In order to maximize the re-usability of kernel code in user space this patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls.
Reviewed by: rwatson Approved by: re (bz)
|
225482 |
11-Sep-2011 |
brueffer |
Fix a zyd(4) comment typo that was copy+pasted into most kernel config files.
PR: 160276 Submitted by: MATSUMIYA Ryo <matsumiya@mma.club.uec.ac.jp> Approved by: re (kib) MFC after: 1 week
|
225418 |
06-Sep-2011 |
kib |
Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomic flags field. Updates to the atomic flags are performed using the atomic ops on the containing word, do not require any vm lock to be held, and are non-blocking. The vm_page_aflag_set(9) and vm_page_aflag_clear(9) functions are provided to modify afalgs.
Document the changes to flags field to only require the page lock.
Introduce vm_page_reference(9) function to provide a stable KPI and KBI for filesystems like tmpfs and zfs which need to mark a page as referenced.
Reviewed by: alc, attilio Tested by: marius, flo (sparc64); andreast (powerpc, powerpc64) Approved by: re (bz)
|
225214 |
27-Aug-2011 |
rwatson |
Follow up to r225203 refining break-to-debugger run-time configuration improvements:
(1) Implement new model in previously missed at91 UART driver (2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h to opt_kdb.h (spotted by np) (3) Garbage collect now-unused opt_comconsole.h
MFC after: 3 weeks Approved by: re (bz)
|
224746 |
09-Aug-2011 |
kib |
- Move the PG_UNMANAGED flag from m->flags to m->oflags, renaming the flag to VPO_UNMANAGED (and also making the flag protected by the vm object lock, instead of vm page queue lock). - Mark the fake pages with both PG_FICTITIOUS (as it is now) and VPO_UNMANAGED. As a consequence, pmap code now can use use just VPO_UNMANAGED to decide whether the page is unmanaged.
Reviewed by: alc Tested by: pho (x86, previous version), marius (sparc64), marcel (arm, ia64, powerpc), ray (mips) Sponsored by: The FreeBSD Foundation Approved by: re (bz)
|
224699 |
07-Aug-2011 |
rmacklem |
Change all the sample kernel configurations to use NFSCL, NFSD instead of NFSCLIENT, NFSSERVER since NFSCL and NFSD are now the defaults. The client change is needed for diskless configurations, so that the root mount works for fstype nfs. Reported by seanbru at yahoo-inc.com for i386/XEN.
Approved by: re (hrs)
|
224612 |
02-Aug-2011 |
attilio |
Fix for arm and mips case the size of storage for sintrcnt/sintrnames. It seems that "info as" is not much precise on what expect by pseudo-op .word, by the way.
No MFC is previewed for this patch.
Tested by: andreast, pluknet Approved by: re (kib)
|
224207 |
19-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)
|
224187 |
18-Jul-2011 |
attilio |
- Remove the eintrcnt/eintrnames usage and introduce the concept of sintrcnt/sintrnames which are symbols containing the size of the 2 tables. - For amd64/i386 remove the storage of intr* stuff from assembly files. This area can be widely improved by applying the same to other architectures and likely finding an unified approach among them and move the whole code to be MI. More work in this area is expected to happen fairly soon.
No MFC is previewed for this patch.
Tested by: pluknet Reviewed by: jhb Approved by: re (kib)
|
224051 |
15-Jul-2011 |
marcel |
Do not call platform_gpio_init() early. It doesn't work because we do not have enough information to reliably setup GPIO pins. Do it when we attach the gpio driver. This prevents hangs and the need to fake up a softc.
|
224050 |
15-Jul-2011 |
marcel |
Set preload_addr_relocate accordingly so that preloaded modules and images are properly relocated.
|
224049 |
15-Jul-2011 |
marcel |
In pmap_protect(), don't call vm_page_dirty() if the page is unmanaged.
|
223692 |
30-Jun-2011 |
jonathan |
Add some checks to ensure that Capsicum is behaving correctly, and add some more explicit comments about what's going on and what future maintainers need to do when e.g. adding a new operation to a sys_machdep.c.
Approved by: mentor(rwatson), re(bz)
|
223677 |
29-Jun-2011 |
alc |
Add a new option, OBJPR_NOTMAPPED, to vm_object_page_remove(). Passing this option to vm_object_page_remove() asserts that the specified range of pages is not mapped, or more precisely that none of these pages have any managed mappings. Thus, vm_object_page_remove() need not call pmap_remove_all() on the pages.
This change not only saves time by eliminating pointless calls to pmap_remove_all(), but it also eliminates an inconsistency in the use of pmap_remove_all() versus related functions, like pmap_remove_write(). It eliminates harmless but pointless calls to pmap_remove_all() that were being performed on PG_UNMANAGED pages.
Update all of the existing assertions on pmap_remove_all() to reflect this change.
Reviewed by: kib
|
223668 |
29-Jun-2011 |
jonathan |
We may split today's CAPABILITIES into CAPABILITY_MODE (which has to do with global namespaces) and CAPABILITIES (which has to do with constraining file descriptors). Just in case, and because it's a better name anyway, let's move CAPABILITIES out of the way.
Also, change opt_capabilities.h to opt_capsicum.h; for now, this will only hold CAPABILITY_MODE, but it will probably also hold the new CAPABILITIES (implying constrained file descriptors) in the future.
Approved by: rwatson Sponsored by: Google UK Ltd
|
223665 |
29-Jun-2011 |
kevlo |
Typo
Submitted by: Damjan Marion <damjan dot marion at gmail dot com> MFC after: 3 days
|
223562 |
26-Jun-2011 |
kevlo |
Remove duplicate header includes
|
223523 |
24-Jun-2011 |
cognet |
Comment out AH_DEBUG, to get this kernel to compile, until AH_DEBUG is fixed.
|
222813 |
07-Jun-2011 |
attilio |
etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being.
Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES.
Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64).
Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC.
People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately.
Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development.
(I really hope I didn't forget anyone, if it happened I apologize in advance).
|
221855 |
13-May-2011 |
mdf |
Move the ZERO_REGION_SIZE to a machine-dependent file, as on many architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware.
Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment).
Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit.
Requested by: alc MFC after: 1 week MFC with: r221853
|
221844 |
13-May-2011 |
cognet |
In pmap_change_wiring(), use the right argument for pmap_modify_pv(). It only worked because the only consumer calls pmap_change_wiring() to remove the wiring.
|
221218 |
29-Apr-2011 |
jhb |
Change rman_manage_region() to actually honor the rm_start and rm_end constraints on the rman and reject attempts to manage a region that is out of range. - Fix various places that set rm_end incorrectly (to ~0 or ~0u instead of ~0ul). - To preserve existing behavior, change rman_init() to set rm_start and rm_end to allow managing the full range (0 to ~0ul) if they are not set by the caller when rman_init() is called.
|
221207 |
29-Apr-2011 |
jhb |
Fix build of this kernel config. The ath(4) bits need the 11n frame format even though ar5416 isn't enabled.
Reviewed by: adrian
|
221173 |
28-Apr-2011 |
attilio |
Add the watchdogs patting during the (shutdown time) disk syncing and disk dumping. With the option SW_WATCHDOG on, these operations are doomed to let watchdog fire, fi they take too long.
I implemented the stubs this way because I really want wdog_kern_* KPI to not be dependant by SW_WATCHDOG being on (and really, the option only enables watchdog activation in hardclock) and also avoid to call them when not necessary (avoiding not-volountary watchdog activations).
Sponsored by: Sandvine Incorporated Discussed with: emaste, des MFC after: 2 weeks
|
221071 |
26-Apr-2011 |
mav |
- Add shim to simplify migration to the CAM-based ATA. For each new adaX device in /dev/ create symbolic link with adY name, trying to mimic old ATA numbering. Imitation is not complete, but should be enough in most cases to mount file systems without touching /etc/fstab. - To know what behavior to mimic, restore ATA_STATIC_ID option in cases where it was present before. - Add some more details to UPDATING.
|
221025 |
25-Apr-2011 |
cognet |
Typo fix
|
220982 |
24-Apr-2011 |
mav |
Switch the GENERIC kernels for all architectures to the new CAM-based ATA stack. It means that all legacy ATA drivers are disabled and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers for each type in order of detection, unless configured otherwise with tunables, see cam(4)).
ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool for management. Instead of /dev/arX device names, use /dev/raid/rX.
|
220836 |
19-Apr-2011 |
pluknet |
Call init_param1() much earlier, so that msgbufsize is non-zero when we want to map and use the msgbuf.
Reviewed by: cognet MFC after: 1 week
|
220774 |
18-Apr-2011 |
philip |
Delete mistakenly added sys/files.ts7800 Add mistakenly forgotten sys/arm/conf/TS7800
Not sure how this happened. Apologies for the repo-churn.
Submitted by: glebius Pointy hat to: philip
|
220653 |
15-Apr-2011 |
philip |
Add basic support for the Marvell Orion TS-7800.
Submitted by: Kristof Provost <kristof -at- freebsd.org>
|
220558 |
12-Apr-2011 |
hselasky |
We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI bus driver at detach, hence ehci_detach() does exactly this since r199718.
Submitted by: Luiz Otavio O Souza MFC after: 7 days Approved by: thompsa (mentor)
|
220303 |
03-Apr-2011 |
hselasky |
- Correct EHCI interrupt disabling at detach.
Submitted by: Luiz Otavio O Souza MFC after: 7 days Approved by: thompsa (mentor)
|
220185 |
31-Mar-2011 |
adrian |
Break out the ath PCI logic into a separate device/module.
Introduce the AHB glue for Atheros embedded systems. Right now it's hard-coded for the AR9130 chip whose support isn't yet in this HAL; it'll be added in a subsequent commit.
Kernel configuration files now need both 'ath' and 'ath_pci' devices; both modules need to be loaded for the ath device to work.
|
219684 |
16-Mar-2011 |
marcel |
Fix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers. The compiler will truncate the 32-bit return value of mv_gpio_value_get() to match the 8-bit return value of mv_gpio_in(). A conditional expression is used to have mv_gpio_in() always return 0 or 1 instead.
|
219653 |
14-Mar-2011 |
jkim |
Make get_cyclecount(9) little bit more useful where binuptime(9) is used.
|
219405 |
08-Mar-2011 |
dchagin |
Extend struct sysvec with new method sv_schedtail, which is used for an explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process.
Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method.
While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI.
Discussed with: kib
MFC after: 2 Week
|
219134 |
01-Mar-2011 |
rwatson |
Continue to introduce Capsicum capability mode:
White list sysarch calls allowed in capability mode; arguably, there should be some link between the capability mode model and the privilege model here. Sysarch is a morass similar to ioctl, in many senses.
Submitted by: anderson Discussed with: benl, kris, pjd Sponsored by: Google, Inc. Obtained from: Capsicum Project MFC after: 3 months
|
219025 |
25-Feb-2011 |
obrien |
Add a real dependency on the microcode. Now when one does 'make kernel ; make kernel' the second invocation only does: `kernel.ko' is up to date. rather than reproduce all the binary microcode files and relink the kernel. [continuation of r212429]
|
218913 |
21-Feb-2011 |
cognet |
Get myself a brain, move the call to init_param1() before the first use in at91_machdep.c, and do it for the files I forgot the first time
Reported by: andrew Submitted by: pluknet
|
218909 |
21-Feb-2011 |
brucec |
Fix typos - remove duplicate "the".
PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
|
218780 |
17-Feb-2011 |
marcel |
Fix the R_ARM_ABS32 relocation implementation. The memory address contains the addend that we need to include.
Obtained from: Juniper Networks. Fixed by: Santhanakrishnan Balraj <sbalraj@juniper.net>
|
218773 |
17-Feb-2011 |
alc |
Remove pmap fields that are either unused or not fully implemented.
Discussed with: kib
|
218667 |
13-Feb-2011 |
cognet |
Oops, wasn't supposed to commit this.
|
218666 |
13-Feb-2011 |
cognet |
Call init_param1() much earlier, so that msgbufsize is non-zero when we want to map and use the msgbuf.
|
218482 |
09-Feb-2011 |
jhb |
Whitespace tweak.
|
218427 |
08-Feb-2011 |
marcel |
In arm_get_next_irq(), use the last IRQ argument in order to prevent a hard hang due to an interrupt storm or stuck interrupt pin. We return the next IRQ that is larger than the last one returned and in doing so give all interrupts a fair chance of being handled. Consequently, we're able to break into the kernel debugger in such an event.
|
218426 |
08-Feb-2011 |
marcel |
o Make sure to mask off timer1 interrupts. It's not necessarily masked-off by the firmware. o In DELAY(). Make sure we have an inner-loop body that the compiler cannot eliminate. While timing does not have to be perfect, the loops must be there to have at least some notion of delay.
Obtained from: Juniper Networks
|
218388 |
07-Feb-2011 |
marcel |
Remove use_high from the softc and simply check the number of GPIO pins to determine whether there's a high register set or not. This allows platform_gpio_init() to work without duplicating the work done in the attach method.
|
218387 |
07-Feb-2011 |
ticso |
unbreak mutlicast hash creation for the second time. at91_emac hardware is *not* using ether_crc32_be algorithm!
|
218311 |
05-Feb-2011 |
imp |
phys_addr is a PA not a VA so declare it as a vm_paddr_t not a vm_offset_t.
|
218310 |
05-Feb-2011 |
imp |
Make md_tp a register_t not a void *. This will keep us from accidentally dereferencng it and might be one fewer things to change if arm64 happens...
Submitted by: rwatson's question on irc...
|
218228 |
03-Feb-2011 |
marcel |
The FDT describes the host controller directly. There's no need to get properties from the parent. The parent is in fact the FDT bus itself and will therefore not have the properties we're looking for.
Sponsored by: Juniper Networks
|
218227 |
03-Feb-2011 |
marcel |
Accept r1 as having the metadata pointer argument if r0 is 0. This provides backward compatibility with Juniper loaders.
Sponsored by: Juniper Networks
|
218195 |
02-Feb-2011 |
mdf |
Put the general logic for being a CPU hog into a new function should_yield(). Use this in various places. Encapsulate the common case of check-and-yield into a new function maybe_yield().
Change several checks for a magic number of iterations to use should_yield() instead.
MFC after: 1 week
|
218073 |
29-Jan-2011 |
marcel |
Introduce macro FDT_MAP_IRQ to map from an interrupt controller and interrupt pin pair to a global IRQ number. When multiple PICs exist on a board, the interrupt pin alone is not unique.
|
218054 |
29-Jan-2011 |
andrew |
Move the load address of the kernel to the start of KVA as the s3c24x0 copy of initarm expects the kernel to be loaded there.
Approved by: imp (mentor)
|
217709 |
22-Jan-2011 |
marcel |
Fix r217688. We need to call init_param1() before we use msgbufsize, now that the size of the message buffer is a tunable.
|
217708 |
22-Jan-2011 |
marcel |
Fix backtraces by defining ksym_start & ksym_end if DDB is defined. The kernel linker doesn't deal with symbols of type NOTYPE and typically gives the wrong symbol ($a) for local symbols.
Obtained from: Juniper Networks, Inc.
|
217688 |
21-Jan-2011 |
pluknet |
Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.
Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
|
217561 |
18-Jan-2011 |
kib |
For architectures not using direct map , and requiring real KVA page for sf buf allocation, use wakeup() instead of wakeup_one() to notify sf buffer waiters about free buffer.
sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given, and for simultaneous wakeup and signal delivery, msleep() returns EINTR/ERESTART despite the thread was selected for wakeup_one(). As result, we loose a wakeup, and some other waiter will not be woken up.
Reported and tested by: az Reviewed by: alc, jhb MFC after: 1 week
|
217519 |
17-Jan-2011 |
jkim |
Remove empty dev_mem_md_init() stubs.
|
217515 |
17-Jan-2011 |
jkim |
Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set(). Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits.
MFC after: 1 month
|
217290 |
11-Jan-2011 |
marcel |
Don't re-use MODINFOMD_BOOTINFO as MODINFOMD_DTBP. It breaks compatibility without any means for the kernel to work with an older loader.
|
217265 |
11-Jan-2011 |
jhb |
Remove unneeded includes of <sys/linker_set.h>. Other headers that use it internally contain nested includes.
Reviewed by: bde
|
217192 |
09-Jan-2011 |
kib |
Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h. Update the outdated comments describing MAXSLP and the process selection algorithm for swap out.
Comments wording and reviewed by: alc
|
217147 |
08-Jan-2011 |
tijl |
On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather than architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and corresponding macros) are different from 32 bit. [1]
Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX.
Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition for (u)intmax_t. Do this on all architectures for consistency.
Suggested by: bde [1] Approved by: kib (mentor)
|
217146 |
08-Jan-2011 |
tijl |
On 32 bit architectures define (u)int64_t as (unsigned) long long instead of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t has type (unsigned) long long.
The mode attribute was used because long long wasn't standardised until C99. Nowadays compilers should support long long and use of the mode attribute is discouraged according to GCC Internals documentation.
The type definition has to be marked with __extension__ to support compilation with "-std=c89 -pedantic".
Discussed with: bde Approved by: kib (mentor)
|
217145 |
08-Jan-2011 |
tijl |
Fix types of some values in machine/_limits.h.
On some architectures UCHAR_MAX and USHRT_MAX had type unsigned int. However, lacking integer suffixes for types smaller than int, their type should correspond to that of an object of type unsigned char (or short) when used in an expression with objects of type int. In that case unsigned char (short) are promoted to int (i.e. signed) so the type of UCHAR_MAX and USHRT_MAX should also be int.
Where MIN/MAX constants implicitly have the correct type the suffix has been removed.
While here, correct some comments.
Reviewed by: bde Approved by: kib (mentor)
|
217128 |
07-Jan-2011 |
tijl |
Remove unused support for 64 bit long on 32 bit architectures.
It was used mainly to discover and fix some 64-bit portability problems before 64-bit arches were widely available.
Discussed with: bde Approved by: kib (mentor)
|
217097 |
07-Jan-2011 |
kib |
Add AT_STACKPROT elf aux vector. Will be used to inform rtld about the initial stack protection set by the kernel image activator.
|
217072 |
06-Jan-2011 |
jhb |
Remove bogus usage of INTR_FAST. "Fast" interrupts are now indicated by registering a filter handler rather than a threaded handler. Also remove a bogus use of INTR_MPSAFE for a filter.
|
217069 |
06-Jan-2011 |
jhb |
- Add a proper return value to mv_gpio_intr(). - Remove an obsolete use of INTR_FAST.
|
217062 |
06-Jan-2011 |
jhb |
- Use macbstart_locked() directly instead of deferring it to a task. - Expand locking scope in interrupt handler. - Flesh out the detach routine.
Reviewed by: cognet
|
217036 |
06-Jan-2011 |
imp |
Remove support for SKYEYE simulator
|
217032 |
05-Jan-2011 |
imp |
Remove ancient simulation code. Skyeye simulation never really worked quite right and hasn't been used in ages and is likely broken. QEMU with GUMSTIX is a more promising road to FreeBSD/arm in emulation anyway.
Reviewed by: cognet@
|
216681 |
23-Dec-2010 |
imp |
IXP4XX_GPIO_{,UN}LOCK() don't take args. Remove the sc here to make this compile again.
|
216227 |
06-Dec-2010 |
kevlo |
Fix double ;;
|
216143 |
03-Dec-2010 |
brucec |
Revert r216134. This checkin broke platforms where bus_space are macros: they need to be a single statement, and do { } while (0) doesn't work in this situation so revert until a solution can be devised.
|
216134 |
02-Dec-2010 |
brucec |
Disallow passing in a count of zero bytes to the bus_space(9) functions.
Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM causes a crash/hang since the 'loop' instruction decrements the counter before checking if it's zero.
PR: kern/80980 Discussed with: jhb
|
215319 |
14-Nov-2010 |
thompsa |
Provide a mutex around the read/modify/write of the IXP425_GPIO_* registers. Giant was used in some places, but not all.
|
215142 |
11-Nov-2010 |
thompsa |
Add a GPIO driver for the Gateworks Cambria platform.
The external gpio pins are connected to a PLD on the i2c bus, unfortunatley this device does not conform by failing to send an ack after each byte written. The iicbb driver will abort the transfer when the address is not ack'd and it would introduce a lot of churn to be able to pass a flag down to iicbb_start/iicbb_write. Instead we do bad things by grabbing the iicbus but then doing our own bit banging.
|
215124 |
11-Nov-2010 |
ticso |
add hint for at45d flash device sitting of spibus0
|
215054 |
09-Nov-2010 |
jhb |
- Remove <machine/mutex.h>. Most of the headers were empty, and the contents of the ones that were not empty were stale and unused. - Now that <machine/mutex.h> no longer exists, there is no need to allow it to override various helper macros in <sys/mutex.h>. - Rename various helper macros for low-level operations on mutexes to live in the _mtx_* or __mtx_* namespaces. While here, change the names to more closely match the real API functions they are backing. - Drop support for including <sys/mutex.h> in assembly source files.
Suggested by: bde (1, 2)
|
215034 |
09-Nov-2010 |
brucec |
Fix typos.
PR: bin/148894 Submitted by: olgeni
|
215031 |
09-Nov-2010 |
kevlo |
Minor cosmetic changes
|
214972 |
08-Nov-2010 |
kevlo |
Intel IXP425 SoC is based on the ARMv5TE architecture
MFC after: 3 days
|
214948 |
07-Nov-2010 |
thompsa |
Remove line for the uncommitted Cambria gpio drive that snuck in with r214946.
|
214946 |
07-Nov-2010 |
thompsa |
Hook up the five gpio pins on the Avila board to the gpio framework. There are actually 16 I/O lines but the other ones are used for system devices and interrupts.
The IXP4XX platform can set interrupts on these pins for high/low/rising/falling/transitional but this is not implemented yet.
The Cambria has the same interface but as all the pins are assigned to system functions the gpio header is toggled via a PLD on the i2c bus and is not supported by this commit.
|
214835 |
05-Nov-2010 |
jhb |
Adjust the order of operations in spinlock_enter() and spinlock_exit() to work properly with single-stepping in a kernel debugger. Specifically, these routines have always disabled interrupts before increasing the nesting count and restored the prior state of interrupts after decreasing the nesting count to avoid problems with a nested interrupt not disabling interrupts when acquiring a spin lock. However, trap interrupts for single-stepping can still occur even when interrupts are disabled. Now the saved state of interrupts is not saved in the thread until after interrupts have been disabled and the nesting count has been increased. Similarly, the saved state from the thread cannot be read once the nesting count has been decreased to zero. To fix this, use temporary variables to store interrupt state and shuffle it between the thread's MD area and the appropriate registers.
In cooperation with: bde MFC after: 1 month
|
214648 |
01-Nov-2010 |
cognet |
Try to be a little smart at guessing where _start is located in flash, instead of relying on a binutils bug.
Reported by: dim
|
214016 |
18-Oct-2010 |
mav |
Set of legacy mode SATA enchancements: - Implement proper combined mode decoding for Intel controllers to properly identify SATA and PATA channels and associate ATA channels with SATA ports. This fixes wrong reporting and in some cases hard resets to wrong SATA ports. - Improve SATA registers support to handle hot-plug events and potentially interface errors. For ICH5/6300ESB chipsets these registers accessible via PCI config space. For later ones they may be accessible via PCI BAR(5). - For controllers not generating interrupts on hot-plug events, implement periodic status polling. Use it to detect hot-plug on Intel and VIA controllers. Same probably could also be used for Serverworks and SIS.
|
213896 |
15-Oct-2010 |
marius |
Remove a device_printf() accidentally left in r213894.
Submitted by: jhb
|
213894 |
15-Oct-2010 |
marius |
Converted the remainder of the NIC drivers to use the mii_attach() introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these are only straight forward conversions though.
Reviewed by: yongari
|
213893 |
15-Oct-2010 |
marius |
Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags.
While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es).
Reviewed by: jhb, yongari
|
213499 |
06-Oct-2010 |
cognet |
Add the QILA9G20 config files.
Submitted by: Greg Ansley
|
213498 |
06-Oct-2010 |
cognet |
Add support for the AT91SAM9260
Submitted by: Greg Ansley
|
213497 |
06-Oct-2010 |
cognet |
Add the AT91SAM9G20EK config files.
Submitted by: Greg Ansley
|
213496 |
06-Oct-2010 |
cognet |
if_ate.c:
* Support for sam9 "EMAC" controller. * Support for rmii interface to phy.
at91.c & at91sam9.c:
* Eliminate separate at91sam9.c file. * Add new devices to at91sam9_devs table.
at91_machdep.c & at at91sam9_machdep.c:
* Automatic chip type determination. * Remove compile time chip dependencies. * Eliminate separate at91sam9_machdep.c file.
at91_pmc.c:
* Corrected support for all of the sam926? and sam9g20 chips. * Remove compile time chip dependencies.
My apologies to Greg for taking so long to take care of it.
|
213251 |
28-Sep-2010 |
ticso |
fix outdated comment
|
213203 |
27-Sep-2010 |
ticso |
The TWI controller automatically stops if we don't fill up with new data in time.
|
213201 |
27-Sep-2010 |
ticso |
fix off by one error for twi reads with len != 1. STOP must be requested before the last byte is received.
|
212825 |
18-Sep-2010 |
mav |
Add basic cpu_sleep() support for Marvell SoCs. This drops my SheevaPlug's heatsink termperature in open air from 49C to 43C when idle.
|
212823 |
18-Sep-2010 |
mav |
Clear timer interrupt status before calling callback, not after it, This fixes timer interrupt losses, fatal in one-shot mode.
|
212507 |
12-Sep-2010 |
cognet |
In pmap_remove_all(), do not decrease pm_stats.wired_count if the mapping was wired, as it's been done later in pmap_nuke_pv().
Submitted by: Mark Tinguely
|
212413 |
10-Sep-2010 |
avg |
bus_add_child: change type of order parameter to u_int
This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds.
Followup to: r212213 MFC after: 10 days
|
212332 |
08-Sep-2010 |
emax |
Add custom kernel configuration and device tree source files for Seagate FreeAgent DockStar(tm) device. It seems to be a dumb down version of Marvell SheevaPlug. Device tree source file could use more tweaking, but at least it wll network boot and run FreeBSD/arm.
|
211412 |
17-Aug-2010 |
kib |
Supply some useful information to the started image using ELF aux vectors. In particular, provide pagesize and pagesizes array, the canary value for SSP use, number of host CPUs and osreldate.
Tested by: marius (sparc64) MFC after: 1 month
|
211197 |
11-Aug-2010 |
jhb |
Update various places that store or manipulate CPU masks to use cpumask_t instead of int or u_int. Since cpumask_t is currently u_int on all platforms this should just be a cosmetic change.
|
210550 |
27-Jul-2010 |
jhb |
Very rough first cut at NUMA support for the physical page allocator. For now it uses a very dumb first-touch allocation policy. This will change in the future. - Each architecture indicates the maximum number of supported memory domains via a new VM_NDOMAIN parameter in <machine/vmparam.h>. - Each cpu now has a PCPU_GET(domain) member to indicate the memory domain a CPU belongs to. Domain values are dense and numbered from 0. - When a platform supports multiple domains, the default freelist (VM_FREELIST_DEFAULT) is split up into N freelists, one for each domain. The MD code is required to populate an array of mem_affinity structures. Each entry in the array defines a range of memory (start and end) and a domain for the range. Multiple entries may be present for a single domain. The list is terminated by an entry where all fields are zero. This array of structures is used to split up phys_avail[] regions that fall in VM_FREELIST_DEFAULT into per-domain freelists. - Each memory domain has a separate lookup-array of freelists that is used when fulfulling a physical memory allocation. Right now the per-domain freelists are listed in a round-robin order for each domain. In the future a table such as the ACPI SLIT table may be used to order the per-domain lookup lists based on the penalty for each memory domain relative to a specific domain. The lookup lists may be examined via a new vm.phys.lookup_lists sysctl. - The first-touch policy is implemented by using PCPU_GET(domain) to pick a lookup list when allocating memory.
Reviewed by: alc
|
210458 |
24-Jul-2010 |
andrew |
Allow external interrupts.
- Set the external pin to interrupt in bus_setup_intr - Implement bus_config_intr for external interrupts - Extend arm_{,un}mask_irq to work with external interrupts
Approved by: imp (mentor)
|
210397 |
22-Jul-2010 |
andrew |
Add the s3c24x0 real time clock driver
Approved by: imp (mentor)
|
210396 |
22-Jul-2010 |
andrew |
Rework how device memory is allocated on the s3c24x0 CPU's.
The device virtual addresses are now able to be allocated at runtime rather than from the static pmap_devmap at boot. The only exception is memory required before we have had a chance to dynamically allocate it.
While here reduce the space between the statically allocated devices by reducing the distance between the virtual addresses.
Approved by: imp (mentor)
|
210298 |
20-Jul-2010 |
mav |
Fix several un-/signedness bugs of r210290 and r210293. Add one more check.
|
210293 |
20-Jul-2010 |
mav |
Refactor Marvell ARM SoC timer driver to the new timer infrastructure.
|
210249 |
19-Jul-2010 |
raj |
Now that we are fully FDT-driven on MRVL platforms, remove PHYSMEM_SIZE option.
|
210247 |
19-Jul-2010 |
raj |
Eliminate FDT_IMMR_VA define.
This removes platform dependencies from <machine>/fdt.h for the benfit of portability.
|
210246 |
19-Jul-2010 |
raj |
Move MRVL FDT fixups and PIC decode routine to a platform specific area.
This allows for better encapsulation (and eliminates generic fdt_arm.c, at least for now).
|
210040 |
14-Jul-2010 |
cognet |
Import preliminary support for Atmel AT91SAM9G20 cpu, and the Hot-e HL201. This fine work was done by Yohanes Nugroho <yohanes a gmail dot com> Many thanks to John Nicholls and Thinlinx for providing sample hardware.
|
209909 |
11-Jul-2010 |
raj |
Get rid of bootinfo for good in loader (U-Boot-based) and ARM.
For FDT-enabled platforms the device tree is a modern replacement for bootinfo config data.
|
209613 |
30-Jun-2010 |
jhb |
Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to <sys/syscallsubr.h> where all other kern_<syscall> prototypes live.
|
209232 |
16-Jun-2010 |
raj |
Move ARM nexus rman initialization to attach routine.
This fixes a panic, which started to trigger after r209129 cleanup.
Submitted by: Andrew Turner
|
209223 |
15-Jun-2010 |
cognet |
Turn off cache if there's more than one kernel mapping, and one is writable.
Submitted by: Mark Tinguely
|
209161 |
14-Jun-2010 |
raj |
Temporarily bring back the ARM bootinfo (and make tinderbox happy).
BI will be eliminated for good when powerpc transition to FDT is complete.
|
209131 |
13-Jun-2010 |
raj |
Convert Marvell ARM platforms to FDT convention.
The following systems are involved:
- DB-88F5182 - DB-88F5281 - DB-88F6281 - DB-78100 - SheevaPlug
This overhaul covers the following major changes:
- All integrated peripherals drivers for Marvell ARM SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values).
- Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say good by to obio / mbus drivers and numerous hard-coded config data.
Note that world needs to be built WITH_FDT for the affected platforms.
Reviewed by: imp Sponsored by: The FreeBSD Foundation.
|
209130 |
13-Jun-2010 |
raj |
Initial FDT infrastructure elements for ARM.
Reviewed by: imp Sponsored by: The FreeBSD Foundation
|
209129 |
13-Jun-2010 |
raj |
Improve style.
|
209048 |
11-Jun-2010 |
alc |
Relax one of the new assertions in pmap_enter() a little. Specifically, allow pmap_enter() to be performed on an unmanaged page that doesn't have VPO_BUSY set. Having VPO_BUSY set really only matters for managed pages. (See, for example, pmap_remove_write().)
|
208990 |
10-Jun-2010 |
alc |
Reduce the scope of the page queues lock and the number of PG_REFERENCED changes in vm_pageout_object_deactivate_pages(). Simplify this function's inner loop using TAILQ_FOREACH(), and shorten some of its overly long lines. Update a stale comment.
Assert that PG_REFERENCED may be cleared only if the object containing the page is locked. Add a comment documenting this.
Assert that a caller to vm_page_requeue() holds the page queues lock, and assert that the page is on a page queue.
Push down the page queues lock into pmap_ts_referenced() and pmap_page_exists_quick(). (As of now, there are no longer any pmap functions that expect to be called with the page queues lock held.)
Neither pmap_ts_referenced() nor pmap_page_exists_quick() should ever be passed an unmanaged page. Assert this rather than returning "0" and "FALSE" respectively.
ARM:
Simplify pmap_page_exists_quick() by switching to TAILQ_FOREACH().
Push down the page queues lock inside of pmap_clearbit(), simplifying pmap_clear_modify(), pmap_clear_reference(), and pmap_remove_write(). Additionally, this allows for avoiding the acquisition of the page queues lock in some cases.
PowerPC/AIM:
moea*_page_exits_quick() and moea*_page_wired_mappings() will never be called before pmap initialization is complete. Therefore, the check for moea_initialized can be eliminated.
Push down the page queues lock inside of moea*_clear_bit(), simplifying moea*_clear_modify() and moea*_clear_reference().
The last parameter to moea*_clear_bit() is never used. Eliminate it.
PowerPC/BookE:
Simplify mmu_booke_page_exists_quick()'s control flow.
Reviewed by: kib@
|
208846 |
05-Jun-2010 |
alc |
Don't set PG_WRITEABLE in pmap_enter() unless the page is managed.
Correct a typo in a nearby comment on sparc64.
|
208688 |
01-Jun-2010 |
alc |
In pmap_enter_locked(), don't require the vector page to be VPO_BUSY.
|
208574 |
26-May-2010 |
alc |
Push down page queues lock acquisition in pmap_enter_object() and pmap_is_referenced(). Eliminate the corresponding page queues lock acquisitions from vm_map_pmap_enter() and mincore(), respectively. In mincore(), this allows some additional cases to complete without ever acquiring the page queues lock.
Assert that the page is managed in pmap_is_referenced().
On powerpc/aim, push down the page queues lock acquisition from moea*_is_modified() and moea*_is_referenced() into moea*_query_bit(). Again, this will allow some additional cases to complete without ever acquiring the page queues lock.
Reorder a few statements in vm_page_dontneed() so that a race can't lead to an old reference persisting. This scenario is described in detail by a comment.
Correct a spelling error in vm_page_dontneed().
Assert that the object is locked in vm_page_clear_dirty(), and restrict the page queues lock assertion to just those cases in which the page is currently writeable.
Add object locking to vnode_pager_generic_putpages(). This was the one and only place where vm_page_clear_dirty() was being called without the object being locked.
Eliminate an unnecessary vm_page_lock() around vnode_pager_setsize()'s call to vm_page_clear_dirty().
Change vnode_pager_generic_putpages() to the modern-style of function definition. Also, change the name of one of the parameters to follow virtual memory system naming conventions.
Reviewed by: kib
|
208538 |
25-May-2010 |
raj |
Initial loader(8) support for Flattened Device Tree.
o This is disabled by default for now, and can be enabled using WITH_FDT at build time.
o Tested with ARM and PowerPC.
Reviewed by: imp Sponsored by: The FreeBSD Foundation
|
208504 |
24-May-2010 |
alc |
Roughly half of a typical pmap_mincore() implementation is machine- independent code. Move this code into mincore(), and eliminate the page queues lock from pmap_mincore().
Push down the page queues lock into pmap_clear_modify(), pmap_clear_reference(), and pmap_is_modified(). Assert that these functions are never passed an unmanaged page.
Eliminate an inaccurate comment from powerpc/powerpc/mmu_if.m: Contrary to what the comment says, pmap_mincore() is not simply an optimization. Without a complete pmap_mincore() implementation, mincore() cannot return either MINCORE_MODIFIED or MINCORE_REFERENCED because only the pmap can provide this information.
Eliminate the page queues lock from vfs_setdirty_locked_object(), vm_pageout_clean(), vm_object_page_collect_flush(), and vm_object_page_clean(). Generally speaking, these are all accesses to the page's dirty field, which are synchronized by the containing vm object's lock.
Reduce the scope of the page queues lock in vm_object_madvise() and vm_page_dontneed().
Reviewed by: kib (an earlier version)
|
208453 |
23-May-2010 |
kib |
Reorganize syscall entry and leave handling.
Extend struct sysvec with three new elements: sv_fetch_syscall_args - the method to fetch syscall arguments from usermode into struct syscall_args. The structure is machine-depended (this might be reconsidered after all architectures are converted). sv_set_syscall_retval - the method to set a return value for usermode from the syscall. It is a generalization of cpu_set_syscall_retval(9) to allow ABIs to override the way to set a return value. sv_syscallnames - the table of syscall names.
Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding the call to cpu_set_syscall_retval().
The new functions syscallenter(9) and syscallret(9) are provided that use sv_*syscall* pointers and contain the common repeated code from the syscall() implementations for the architecture-specific syscall trap handlers.
Syscallenter() fetches arguments, calls syscall implementation from ABI sysent table, and set up return frame. The end of syscall bookkeeping is done by syscallret().
Take advantage of single place for MI syscall handling code and implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the thread is stopped at syscall entry or return point respectively. The EXEC flag augments SCX and notifies debugger that the process address space was changed by one of exec(2)-family syscalls.
The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are changed to use syscallenter()/syscallret(). MIPS and arm are not converted and use the mostly unchanged syscall() implementation.
Reviewed by: jhb, marcel, marius, nwhitehorn, stas Tested by: marcel (ia64), marius (sparc64), nwhitehorn (powerpc), stas (mips) MFC after: 1 month
|
208175 |
16-May-2010 |
alc |
On entry to pmap_enter(), assert that the page is busy. While I'm here, make the style of assertion used by pmap_enter() consistent across all architectures.
On entry to pmap_remove_write(), assert that the page is neither unmanaged nor fictitious, since we cannot remove write access to either kind of page.
With the push down of the page queues lock, pmap_remove_write() cannot condition its behavior on the state of the PG_WRITEABLE flag if the page is busy. Assert that the object containing the page is locked. This allows us to know that the page will neither become busy nor will PG_WRITEABLE be set on it while pmap_remove_write() is running.
Correct a long-standing bug in vm_page_cowsetup(). We cannot possibly do copy-on-write-based zero-copy transmit on unmanaged or fictitious pages, so don't even try. Previously, the call to pmap_remove_write() would have failed silently.
|
208052 |
14-May-2010 |
cognet |
Catchup with new prototype for db_printf().
|
207954 |
12-May-2010 |
kevlo |
The FA526 belongs to the ARM9TDMI family
|
207796 |
08-May-2010 |
alc |
Push down the page queues into vm_page_cache(), vm_page_try_to_cache(), and vm_page_try_to_free(). Consequently, push down the page queues lock into pmap_enter_quick(), pmap_page_wired_mapped(), pmap_remove_all(), and pmap_remove_write().
Push down the page queues lock into Xen's pmap_page_is_mapped(). (I overlooked the Xen pmap in r207702.)
Switch to a per-processor counter for the total number of pages cached.
|
207611 |
04-May-2010 |
kevlo |
Add support for FA626TE. Tested on GM8181 development board.
|
207554 |
03-May-2010 |
sobomax |
Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value.
MFC after: 1 month
|
207536 |
02-May-2010 |
mav |
Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers driver for CAM ATA subsystem. This driver supports same hardware as atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides many additional features, such as NCQ, PMP, etc.
|
207410 |
30-Apr-2010 |
kmacy |
On Alan's advice, rather than do a wholesale conversion on a single architecture from page queue lock to a hashed array of page locks (based on a patch by Jeff Roberson), I've implemented page lock support in the MI code and have only moved vm_page's hold_count out from under page queue mutex to page lock. This changes pmap_extract_and_hold on all pmaps.
Supported by: Bitgravity Inc.
Discussed with: alc, jeffr, and kib
|
207269 |
27-Apr-2010 |
kib |
Style: use #define<TAB> instead of #define<SPACE>.
Noted by: bde, pluknet gmail com MFC after: 11 days
|
207155 |
24-Apr-2010 |
alc |
Resurrect pmap_is_referenced() and use it in mincore(). Essentially, pmap_ts_referenced() is not always appropriate for checking whether or not pages have been referenced because it clears any reference bits that it encounters. For example, in mincore(), clearing the reference bits has two negative consequences. First, it throws off the activity count calculations performed by the page daemon. Specifically, a page on which mincore() has called pmap_ts_referenced() looks less active to the page daemon than it should. Consequently, the page could be deactivated prematurely by the page daemon. Arguably, this problem could be fixed by having mincore() duplicate the activity count calculation on the page. However, there is a second problem for which that is not a solution. In order to clear a reference on a 4KB page, it may be necessary to demote a 2/4MB page mapping. Thus, a mincore() by one process can have the side effect of demoting a superpage mapping within another process!
|
207152 |
24-Apr-2010 |
kib |
Move the constants specifying the size of struct kinfo_proc into machine-specific header files. Add KINFO_PROC32_SIZE for struct kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add CTASSERT for the size of struct kinfo_proc32.
Submitted by: pluknet Reviewed by: imp, jhb, nwhitehorn MFC after: 2 weeks
|
207077 |
22-Apr-2010 |
thompsa |
Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had the illusion of a tunable setting but was always turned on regardless.
MFC after: 1 week
|
206404 |
08-Apr-2010 |
imp |
Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the other platforms.
|
206054 |
01-Apr-2010 |
mav |
Oops! Wrong copy-paste in r206053.
|
206053 |
01-Apr-2010 |
mav |
Fill extended ATA command registers in cPRD to support 48bit commands.
|
205864 |
29-Mar-2010 |
imp |
Build modules for this config to make sure they stay buildable...
|
205705 |
26-Mar-2010 |
rpaulo |
Pass the correct pointer to fled_cb().
|
205642 |
25-Mar-2010 |
nwhitehorn |
Change the arguments of exec_setregs() so that it receives a pointer to the image_params struct instead of several members of that struct individually. This makes it easier to expand its arguments in the future without touching all platforms.
Reviewed by: jhb
|
205425 |
21-Mar-2010 |
cognet |
Make sure we insert and remove the PV entries related to unmanaged kernel mappings into the kernel pmap, not into the pmap related to the pmap_enter_pv()/pmap_remove_pv() call.
|
205354 |
20-Mar-2010 |
imp |
Add support for the Samsung S3C2xx0 family of ARM SoCs written by Andrew Turner. The kernel supports the LN2410SBC evaluation board, and likely others. These parts (or similar ones) are in some open hardware designs for phones.
Submitted by: Andrew Turner
|
205103 |
12-Mar-2010 |
ticso |
fix type in comment
|
205028 |
11-Mar-2010 |
raj |
Fix ARM cache handling yet more.
1) vm_machdep.c: remove the dangling allocations so they do not un-necessarily turn off the cache upon consecutive access.
2) busdma_machdep.c: remove the same amount than shadow mapped.
Reported by: Maks Verver Submitted by: Mark Tinguely Reviewed by: Grzegorz Bernacki MFC after: 3 days
|
205027 |
11-Mar-2010 |
raj |
Let detailed info about CPU features print on Marvell Sheeva CPU as well.
Provide missing entry in the cpu_classes[].
Reported by: Maks Verver MFC after: 1 week
|
204764 |
05-Mar-2010 |
raj |
Provide correct TCLK value for Kirkwood A1 silicon revision.
While there improve SOC ID output accordingly.
Obtained from: Semihalf MFC after: 1 week
|
204476 |
28-Feb-2010 |
ticso |
simplify hash calculation
|
204463 |
28-Feb-2010 |
ticso |
remove debug leftover
|
204462 |
28-Feb-2010 |
ticso |
Fix multicast hashes. Atmel uses a simple xor hash instead of the typical crc based one.
|
204283 |
24-Feb-2010 |
raj |
Do not force verbose and single mode in non-metadata boot case.
We want to go multi-user by default also in case of booting without loader(8).
|
204280 |
24-Feb-2010 |
brucec |
Update the commented out option for omitting the sysctl descriptions; it was committed as NO_SYSCTL_DESCR.
Approved by: rrs (mentor)
|
204198 |
22-Feb-2010 |
rpaulo |
Fix previous commit: led_func() doesn't exist, it should be fled_cb().
Pointed out by: bz
|
204122 |
20-Feb-2010 |
kevlo |
Show the cpu info for fa526
Submitted by: Yohanes Nugroho <yohanes at gmail dot com>
|
204121 |
20-Feb-2010 |
kevlo |
Correct both FA526/FA626TE cpu ids since the cpu id is always masked with 0xfffffff0
|
203974 |
16-Feb-2010 |
imp |
The NetBSD Foundation has granted permission to remove clauses 3 and 4.
Obtained from: NetBSD
|
203938 |
15-Feb-2010 |
attilio |
Adjust style (following the already existing rules) for the newly introduced option DEADLKRES.
Reported by: danfe, julian, avg
|
203852 |
14-Feb-2010 |
kevlo |
Correct cpu id for FA526. While I'm here, add cpu id for FA626TE.
|
203758 |
10-Feb-2010 |
attilio |
Add the options DEADLKRES (introducing the deadlock resolver thread) in the 'debugging' section of any HEAD kernel and enable for the mainstream ones, excluding the embedded architectures. It may, of course, enabled on a case-by-case basis.
Sponsored by: Sandvine Incorporated Requested by: emaste Discussed with: kib
|
203752 |
10-Feb-2010 |
rpaulo |
Turn on the front LED at boot time like we do with the Avila.
|
203637 |
07-Feb-2010 |
raj |
Improve checking whether an ARM VA has a valid mapping before performing cache sync.
VIPT/PIPT caches need valid VA-PA mapping in PTE for a cache operation to succeed (unlike VIVT). Prior to this fix pmap was using l2pte_valid() for that check, but this is not sufficient as the function merely checks if a PTE exists (there can be existing but _invalid_ entries in the table).
A new pmap_has_valid_mapping() routine is introduced to do this job right by checking proper PTE flags.
Among other potential problems this cures coherency issues with L2 caches on MV-78100.
Submitted by: Grzegorz Bernacki, Piotr Ziecik Reviewed, tested by: marcel Obtained from: Semihalf MFC after: 1 week
|
203171 |
29-Jan-2010 |
marcel |
When backtracing self, start with the current frame (i.e. the frame of db_trace_self()) and not the caller's frame. The use of builtin_frame_address(1) to get the caller's frame is not reliable and can cause panics.
|
202634 |
19-Jan-2010 |
jhb |
Move the examples for the 'hints' and 'env' keywords from various GENERIC kernel configs into NOTES.
Reviewed by: imp
|
202353 |
15-Jan-2010 |
cognet |
Do not free the dmamap if it is still busy.
Submitted by: Mark Tinguely MFC after: 3 days
|
201534 |
04-Jan-2010 |
imp |
Revert 200594. This file isn't intended for these sorts of things.
|
201469 |
04-Jan-2010 |
rpaulo |
Remove CNS11XXNAS.hints.
|
201468 |
04-Jan-2010 |
rpaulo |
Add support for Cavium Econa CNS11XX ARM boards. These boards were previously know by StarSemi STR9104.
Tested by the submitter on an Emprex NSD-100 board.
Submitted by: Yohanes Nugroho <yohanes at gmail.com> Reviewed by: freebsd-arm, stas Obtained from: //depot/projects/str91xx/...
|
201223 |
29-Dec-2009 |
rnoland |
Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.
This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t.
Purge d_mmap2().
All driver modules will need to be rebuilt since D_VERSION is also bumped.
Reviewed by: jhb@ MFC after: Not in this lifetime...
|
200928 |
23-Dec-2009 |
rpaulo |
Intel XScale hwpmc(4) support.
This brings hwpmc(4) support for 2nd and 3rd generation XScale cores. Right now it's enabled by default to make sure we test this a bit. When the time comes it can be disabled by default. Tested on Gateworks boards.
A man page is coming.
Obtained from: //depot/user/rpaulo/xscalepmc/...
|
200594 |
16-Dec-2009 |
dougb |
Add INCLUDE_CONFIG_FILE, and a note in comments about how to also include the comments with CONFIGARGS
|
200275 |
08-Dec-2009 |
mav |
Fix the build.
|
200171 |
06-Dec-2009 |
mav |
MFp4: Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead.
As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again.
Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware.
Submitted by: nwitehorn (powerpc part)
|
200015 |
02-Dec-2009 |
thompsa |
Add missing ath_ar9* ath hal entries.
|
200014 |
02-Dec-2009 |
thompsa |
Remove unknown ath hal device entries.
|
199868 |
27-Nov-2009 |
alc |
Simplify the invocation of vm_fault(). Specifically, eliminate the flag VM_FAULT_DIRTY. The information provided by this flag can be trivially inferred by vm_fault().
Discussed with: kib
|
199557 |
19-Nov-2009 |
jhb |
- Initialize callout before it is used in atestop() during attach. - Reorder detach so that ether_ifdetach() is called first. This removes the race that ATE_FLAG_DETACHING closed, so that flag can be removed. - Trim a duplicate clearing of IFF_DRV_RUNNING.
Reviewed by: imp
|
199537 |
19-Nov-2009 |
jhb |
These drivers only set if_timer but never set if_watchdog. Just remove the assignments to if_timer.
|
199135 |
10-Nov-2009 |
kib |
Extract the code that records syscall results in the frame into MD function cpu_set_syscall_retval().
Suggested by: marcel Reviewed by: marcel, davidxu PowerPC, ARM, ia64 changes: marcel Sparc64 tested and reviewed by: marius, also sunv reviewed MIPS tested by: gonzo MFC after: 1 month
|
198944 |
05-Nov-2009 |
marcel |
Fix gdb_cpu_getreg() to actually match GDB's register definition.
|
198943 |
05-Nov-2009 |
marcel |
Implement db_trace_thread() by calling db_stack_trace_cmd() and passing a frame pointer that comes from the thread context. This fixes DDB backtraces by not unwinding debugger functions first.
|
198942 |
05-Nov-2009 |
marcel |
Implement db_trace_self() by calling db_stack_trace_cmd() and not db_trace_thread().
|
198872 |
04-Nov-2009 |
alc |
Eliminate an unnecessary vm include file.
|
198717 |
31-Oct-2009 |
mav |
MFp4: - Remove most of direct relations between ATA(4) peripherial and controller levels. It makes logic more transparent and is a mandatory step to wrap ATA(4) controller level into ATA-native CAM SIM. - Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger I/O transaction sizes without additional cost.
|
198507 |
27-Oct-2009 |
kib |
In r197963, a race with thread being selected for signal delivery while in kernel mode, and later changing signal mask to block the signal, was fixed for sigprocmask(2) and ptread_exit(3). The same race exists for sigreturn(2), setcontext(2) and swapcontext(2) syscalls.
Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals, closing the race.
Reviewed by: davidxu Tested by: pho MFC after: 1 month
|
198342 |
21-Oct-2009 |
marcel |
Review previous change. It has no relation to the I-cache coherency changes and thus unintentional.
Spotted by: rdivacky@
|
198341 |
21-Oct-2009 |
marcel |
o Introduce vm_sync_icache() for making the I-cache coherent with the memory or D-cache, depending on the semantics of the platform. vm_sync_icache() is basically a wrapper around pmap_sync_icache(), that translates the vm_map_t argumument to pmap_t. o Introduce pmap_sync_icache() to all PMAP implementation. For powerpc it replaces the pmap_page_executable() function, added to solve the I-cache problem in uiomove_fromphys(). o In proc_rwmem() call vm_sync_icache() when writing to a page that has execute permissions. This assures that when breakpoints are written, the I-cache will be coherent and the process will actually hit the breakpoint. o This also fixes the Book-E PMAP implementation that was missing necessary locking while trying to deal with the I-cache coherency in pmap_enter() (read: mmu_booke_enter_locked).
The key property of this change is that the I-cache is made coherent *after* writes have been done. Doing it in the PMAP layer when adding or changing a mapping means that the I-cache is made coherent *before* any writes happen. The difference is key when the I-cache prefetches.
|
198044 |
13-Oct-2009 |
jhb |
Sync with other GENERIC kernel configs: - Move USB serial drivers earlier to match their placement in other kernel configs. - Add descriptions to various USB drivers. - Move the USB wireless drivers into a new section. - Add ulscom to the list of USB serial drivers.
|
197933 |
10-Oct-2009 |
kib |
Define architectural load bases for PIE binaries. Addresses were selected by looking at the bases used for non-relocatable executables by gnu ld(1), and adjusting it slightly.
Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
|
197770 |
05-Oct-2009 |
stas |
- Drop unused pmap_use_l1 function and comment out currently unused pmap_dcache_wbinv_all/pmap_copy_page functions which we might want to take advatage of later. This fixes the build with PMAP_DEBUG defined.
Discussed with: cognet
|
197733 |
03-Oct-2009 |
rpaulo |
Remove remaining bits of performance counter support.
Submitted by: Tom Judge <tom at tomjudge.com>
|
197729 |
03-Oct-2009 |
bz |
Make sure that the primary native brandinfo always gets added first and the native ia32 compat as middle (before other things). o(ld)brandinfo as well as third party like linux, kfreebsd, etc. stays on SI_ORDER_ANY coming last.
The reason for this is only to make sure that even in case we would overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo would still be there and the system would be operational.
Reviewed by: kib MFC after: 1 month
|
197704 |
02-Oct-2009 |
rpaulo |
Remove performance counter headers. This code came from NetBSD, but our hardware perf. counter support is different, so we don't need these files.
Reviewed by: freebsd-arm (no comments)
|
197523 |
26-Sep-2009 |
rpaulo |
Promote the cpu_class local variable to global and expose it in md_var.h
Reviewed by: freebsd-arm
|
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.
|
196730 |
01-Sep-2009 |
kib |
Reintroduce the r196640, after fixing the problem with my testing.
Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1].
This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size.
Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks.
Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho (and retested according to new test scenarious) MFC after: 1 week
|
196648 |
29-Aug-2009 |
kib |
Reverse r196640 and r196644 for now.
|
196640 |
29-Aug-2009 |
kib |
Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1].
This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size.
Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks.
Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho MFC after: 1 week
|
196605 |
27-Aug-2009 |
sam |
revert r196600; didn't notice it'd been done already
Submitted by: jhay
|
196600 |
27-Aug-2009 |
sam |
enable mesh by default
|
196536 |
25-Aug-2009 |
raj |
Introduce SheevaPlug support.
- The device is based on Marvell 88F6281 system on chip. - More info about the platform at http://www.plugcomputer.org
- To build the FreeBSD kernel: make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG
- Installation notes at: http://wiki.freebsd.org/FreeBSDMarvell
Submitted by: Michal Hajduk Obtained from: Semihalf
|
196533 |
25-Aug-2009 |
raj |
Exclude common Kirkwood settings so they can be shared among various platforms based on this SOC. This is a preliminary step for SheevaPlug support.
Submitted by: Michal Hajduk Obtained from: Semihalf
|
196532 |
25-Aug-2009 |
raj |
Properly handle initial state of power mgmt.
Modules on Marvell SOC can be selectively PM-disabled, and we must not access disabled devices' registers (attempt to initialize them) unconditionally, as this leads to the system hang. This patch introduces graceful handling of the PM state during devices init.
Submitted by: Michal Hajduk Obtained from: Semihalf
|
196531 |
25-Aug-2009 |
raj |
Eliminate platform_pmap_init() to simplify Marvell bootstrap code.
|
196484 |
23-Aug-2009 |
cognet |
KDB needs <machine/db_machdep.h>, so move it under #ifdef KDB. While I'm there, remove dead code, we will never support acorn26.
|
196479 |
23-Aug-2009 |
cognet |
No need to remove the same flag multiple times.
|
196246 |
15-Aug-2009 |
stas |
- Proprely intialize UART parameters at probe stage, so uart(4) will initialize the FIFO memory correctly on attach. Before that this values was intialized in only in at91_usart_bus_attach which is called after the uart(4) memory allocation happens.
Approved by: re (kib) MFC after: 1 week
|
196193 |
13-Aug-2009 |
raj |
Use correct wbinv operation in pmap_l2cache_wbinv_range().
Submitted by: Michal Hajduk Reviewed by: stas Approved by: re (kib) Obtained from: Semihalf
|
196019 |
01-Aug-2009 |
rwatson |
Merge the remainder of kern_vimage.c and vimage.h into vnet.c and vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes.
Reviewed by: bz Approved by: re (vimage blanket)
|
195840 |
24-Jul-2009 |
jhb |
Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to a device pager (OBJT_DEVICE) object in that it uses fictitious pages to provide aliases to other memory addresses. The primary difference is that it uses an sglist(9) to determine the physical addresses for a given offset into the object instead of invoking the d_mmap() method in a device driver.
Reviewed by: alc Approved by: re (kensmith) MFC after: 2 weeks
|
195798 |
21-Jul-2009 |
raj |
Make dcache_inv_range() point to the proper routines on ARM9 and ARM9E/ARM10.
On some ARM variations CPU func dispatcher has the D-cache invalidate method point to write-back invalidate, which is wrong, and can lead to a crash/panic on affected platforms.
Spotted by: HPS Reviewed by: cognet Approved by: re (kib)
|
195779 |
20-Jul-2009 |
raj |
ARM pmap fixes.
a) nocache-remap problem
When a page is remapped into a non-cacheable virtual memory region there was no associated write-back invalidate operation performed. We remove writeback of the original buffer size from bus_dmamem_alloc() and add appropriate L1/L2 flush operation.
b) missing write-back invalidate operation
In pmap_kremove a page is removed so we must do a write-back invalidate operation aligned to the page virtual address.
Submitted by: Michal Hajduk Reviewed by: Mark Tinguely, rpaulo, stas Approved by: re (kib) Obtained from: Semihalf
|
195742 |
17-Jul-2009 |
rpaulo |
Add IEEE80211_SUPPORT_MESH, following similar change to nanobsd and other GENERIC kernels.
Approved by: re (kib)
|
195649 |
12-Jul-2009 |
alc |
Add support to the virtual memory system for configuring machine- dependent memory attributes:
Rename vm_cache_mode_t to vm_memattr_t. The new name reflects the fact that there are machine-dependent memory attributes that have nothing to do with controlling the cache's behavior.
Introduce vm_object_set_memattr() for setting the default memory attributes that will be given to an object's pages.
Introduce and use pmap_page_{get,set}_memattr() for getting and setting a page's machine-dependent memory attributes. Add full support for these functions on amd64 and i386 and stubs for them on the other architectures. The function pmap_page_set_memattr() is also responsible for any other machine-dependent aspects of changing a page's memory attributes, such as flushing the cache or updating the direct map. The uses include kmem_alloc_contig(), vm_page_alloc(), and the device pager:
kmem_alloc_contig() can now be used to allocate kernel memory with non-default memory attributes on amd64 and i386.
vm_page_alloc() and the device pager will set the memory attributes for the real or fictitious page according to the object's default memory attributes.
Update the various pmap functions on amd64 and i386 that map pages to incorporate each page's memory attributes in the mapping.
Notes: (1) Inherent to this design are safety features that prevent the specification of inconsistent memory attributes by different mappings on amd64 and i386. In addition, the device pager provides a warning when a device driver creates a fictitious page with memory attributes that are inconsistent with the real page that the fictitious page is an alias for. (2) Storing the machine-dependent memory attributes for amd64 and i386 as a dedicated "int" in "struct md_page" represents a compromise between space efficiency and the ease of MFCing these changes to RELENG_7.
In collaboration with: jhb
Approved by: re (kib)
|
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)
|
195256 |
01-Jul-2009 |
raj |
Map DPCPU pages into ARM kernel VA space.
DPCPU area was not properly mapped into kernel VA space, which caused page fault on the first DPCPU access. This patch fixes the problem by mapping DPCPU area into kernel VA space.
Submitted by: Michal Hajduk, Piotr Ziecik Reviewed by: cognet, stas Approved by: re (kib) Obtained from: Semihalf
|
195060 |
26-Jun-2009 |
alc |
Correct the #endif comment.
Noticed by: jmallett Approved by: re (kib)
|
195049 |
26-Jun-2009 |
rwatson |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list.
Approved by: re (kib) MFC after: 6 weeks
|
195033 |
26-Jun-2009 |
alc |
This change is the next step in implementing the cache control functionality required by video card drivers. Specifically, this change introduces vm_cache_mode_t with an appropriate VM_CACHE_DEFAULT definition on all architectures. In addition, this changes adds a vm_cache_mode_t parameter to kmem_alloc_contig() and vm_phys_alloc_contig(). These will be the interfaces for allocating mapped kernel memory and physical memory, respectively, with non-default cache modes.
In collaboration with: jhb
|
194983 |
25-Jun-2009 |
sam |
temporarily disable optional uarts; apparently we hang when probing them (and they are not present)
|
194949 |
25-Jun-2009 |
raj |
Enable all populated TWSI (I2C) controllers on Marvell SOCs.
Obtained from: Semihalf
|
194908 |
24-Jun-2009 |
cognet |
Fix typo.
|
194906 |
24-Jun-2009 |
cognet |
Fix typo.
|
194845 |
24-Jun-2009 |
raj |
Introduce ata(4) support for Marvell integrated SATA controllers (found on 88F5xxx, 88F6xxx and MV78xxx system on chip devices).
Reviewed by: stas Obtained from: Semihalf
|
194784 |
23-Jun-2009 |
jeff |
Implement a facility for dynamic per-cpu variables. - Modules and kernel code alike may use DPCPU_DEFINE(), DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined PCPU_*. Requires only one extra instruction more than PCPU_* and is virtually the same as __thread for builtin and much faster for shared objects. DPCPU variables can be initialized when defined. - Modules are supported by relocating the module's per-cpu linker set over space reserved in the kernel. Modules may fail to load if there is insufficient space available. - Track space available for modules with a one-off extent allocator. Free may block for memory to allocate space for an extent.
Reviewed by: jhb, rwatson, kan, sam, grehan, marius, marcel, stas
|
194753 |
23-Jun-2009 |
sam |
Now that we have UARTs running with fast interrupt handlers the ata driver's i/o ops must be locked to avoid chaos. Extend the cambria bus tag to support ata and add a spin lock. The ata driver is hacked to use that instead of it's builtin hack for ixp425. Once the ata driver is fixed to not be confused about byte order we can generalize the cambria bus tag code and make it generally useful.
While here take advantage of our being ixp435-specific to remove delays when switching between byte+word accesses and to eliminate the 2us delay for the uarts (the spin lock overhead looks to do this for us).
|
194752 |
23-Jun-2009 |
sam |
use consistent style
|
194673 |
22-Jun-2009 |
sam |
kill left over cruft
|
194671 |
22-Jun-2009 |
sam |
enable optional GPS+RS485 uarts
|
194670 |
22-Jun-2009 |
sam |
o add a bus space tag that forces a 2usec delay between r/w ops; this is used for the optional GPS+RS485 uarts on the Gateworks Cambria boards which otherwise are unreliable o setup the hack bus space tag for the GPS+RS485 uarts o program the gpio interrupts for the uarts to be edge-rising o force timing on the expansion bus for the uarts to be "slow"
Thanks to Chris Lang of Gateworks for these tips.
|
194669 |
22-Jun-2009 |
sam |
fix typo
|
194668 |
22-Jun-2009 |
sam |
o remove hack to write UUE+RTOIE in the uart's IER; force them with hints o honor hints for the rclk
|
194656 |
22-Jun-2009 |
sam |
hook arm_post_filter to ACK GPIO interrupts; this fixes the interrupt storm observed on the GPS+RS485 uarts on Gateworks Cambria boards
Reviewed by: cognet
|
194655 |
22-Jun-2009 |
sam |
always define Cambria GPS+RS485 mappings as they are no longer conditional
|
194654 |
22-Jun-2009 |
sam |
map the optional GPS and RS485 uart's on the Gateworks Cambria board (may want to make these conditional)
|
194653 |
22-Jun-2009 |
sam |
add ixp425_set_gpio to program the gpio interrupt type
|
194652 |
22-Jun-2009 |
sam |
rewrite arm_get_next_irq to always make forward progress (should be optimized)
|
194651 |
22-Jun-2009 |
sam |
kill stray whitespace
|
194650 |
22-Jun-2009 |
sam |
move logic to ACK a GPIO to a separate function
|
194649 |
22-Jun-2009 |
sam |
swap order in ddb show gpio printf
|
194648 |
22-Jun-2009 |
sam |
make type use consistent
|
194609 |
21-Jun-2009 |
cognet |
Disable write-back until I figure out what's wrong with it on the i81342. There's no need to disable the MMU once we're done inflating the kernel.
|
194459 |
18-Jun-2009 |
thompsa |
Track the kernel mapping of a physical page by a new entry in vm_page structure. When the page is shared, the kernel mapping becomes a special type of managed page to force the cache off the page mappings. This is needed to avoid stale entries on all ARM VIVT caches, and VIPT caches with cache color issue.
Submitted by: Mark Tinguely Reviewed by: alc Tested by: Grzegorz Bernacki, thompsa
|
194379 |
17-Jun-2009 |
sam |
enable npe-a now that it works
|
194378 |
17-Jun-2009 |
sam |
Add workaround to get IXP435 NPE-A working: reseting NPE-A after NPE-C causes both to become inoperative; this apparently was done by the original IAL code as a workaround for IMEM parity errors which we've not seen so just disable the reset.
Note this problem does not occur on IXP425 boards. The linux driver does fuse-resets on each NPE but in the order NPE-A < NPE-B < NPE-C (when probing for which NPE's are present/operational); we may want to switch to a similar scheme but for now disable the resets until we see an issue.
|
194325 |
17-Jun-2009 |
sam |
correct data/instruction memory sizes for non-ixp425 parts (these are only used to bounds-check writes when loading firmware)
|
194322 |
17-Jun-2009 |
sam |
remove IAL vestige for defining the max data/instruction memory size; instead of defining them according to ixp46x add new defines so we can do this at run time
|
194321 |
17-Jun-2009 |
sam |
o correct default miibase for NPE-B and NPE-C; these values are normally taken from the hints file so this should have no effect o set the port address "just in case" o add NPE-A support to the tx done qmgr callback
|
194319 |
17-Jun-2009 |
sam |
add ixp4xx_write_feature_bits
|
194072 |
12-Jun-2009 |
marcel |
Move the memory layout definitions and logic from mvreg.h to mvwin.h so that it isn't exposured unless needed. In particular this means that it's easier to tune the memory layout based on board details. While here, remove inclusion of <machine/intr.h> from mvreg.h. This also contains exposure to SoC specifics in MI drivers, because NIRQ depends on the SoC.
|
194044 |
12-Jun-2009 |
imp |
devclass_find_free_unit(xxx, 0) is identical to -1 for most applications (including this one). Switch to it since the former is a racy interface.
|
194015 |
11-Jun-2009 |
avg |
strict kobj signatures: number of fixes for arm architecture
no functional changes should result
Reviewed by: imp, current@ Approved by: jhb (mentor)
|
193934 |
10-Jun-2009 |
imp |
Eliminate devclass_find_free_unit call here, since -1 gives the same net behavior.
|
193847 |
09-Jun-2009 |
marcel |
Pass the previously returned IRQ back to arm_get_next_irq() so that the implementation can guarantee forward progress in the event of a stuck interrupt or interrupt storm. This is especially critical for fast interrupt handlers, as they can cause a hard hang in that case. When first called, arm_get_next_irq() is passed -1.
Obtained from: Juniper Networks, Inc.
|
193846 |
09-Jun-2009 |
marcel |
Disable interrupts to allow booting on firmware (e.g. U-Boot) that has interrupts enabled and active.
Obtained from: Juniper Networks, Inc.
|
193712 |
08-Jun-2009 |
raj |
Invalidate cache in pmap_remove_all() on ARM.
When pages are removed from virtual address space by calling pmap_remove_all() CPU caches were not invalidated, which led to read corruption when another page got mapped at this same virtual address at later time (the CPU was retrieving stale contents).
Submitted by: Piotr Ziecik Obtained from: Semihalf
|
193104 |
30-May-2009 |
sam |
maintain existing style
|
193096 |
30-May-2009 |
attilio |
When user_frac in the polling subsystem is low it is going to busy the CPU for too long period than necessary. Additively, interfaces are kept polled (in the tick) even if no more packets are available. In order to avoid such situations a new generic mechanism can be implemented in proactive way, keeping track of the time spent on any packet and fragmenting the time for any tick, stopping the processing as soon as possible.
In order to implement such mechanism, the polling handler needs to change, returning the number of packets processed. While the intended logic is not part of this patch, the polling KPI is broken by this commit, adding an int return value and the new flag IFCAP_POLLING_NOCOUNT (which will signal that the return value is meaningless for the installed handler and checking should be skipped).
Bump __FreeBSD_version in order to signal such situation.
Reviewed by: emaste Sponsored by: Sandvine Incorporated
|
193066 |
29-May-2009 |
jamie |
Place hostnames and similar information fully under the prison system. The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible.
The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed.
Approved by: bz (mentor)
|
192901 |
27-May-2009 |
thompsa |
Delete the old USB stack. The new stack has settled in and has all the drivers/functionality and then some.
|
192660 |
23-May-2009 |
sam |
accumulate npe statistics and expose them through dev.npe.X.stats
|
192599 |
22-May-2009 |
des |
Expand $FreeBSD$
|
192323 |
18-May-2009 |
marcel |
Add cpu_flush_dcache() for use after non-DMA based I/O so that a possible future I-cache coherency operation can succeed. On ARM for example the L1 cache can be (is) virtually mapped, which means that any I/O that uses temporary mappings will not see the I-cache made coherent. On ia64 a similar behaviour has been observed. By flushing the D-cache, execution of binaries backed by md(4) and/or NFS work reliably. For Book-E (powerpc), execution over NFS exhibits SIGILL once in a while as well, though cpu_flush_dcache() hasn't been implemented yet.
Doing an explicit D-cache flush as part of the non-DMA based I/O read operation eliminates the need to do it as part of the I-cache coherency operation itself and as such avoids pessimizing the DMA-based I/O read operations for which D-cache are already flushed/invalidated. It also allows future optimizations whereby the bcopy() followed by the D-cache flush can be integrated in a single operation, which could be implemented using on-chips DMA engines, by-passing the D-cache altogether.
|
192135 |
15-May-2009 |
imp |
Fix name for driver to assign to the SPI device.
|
192064 |
13-May-2009 |
stas |
- Set MAC address in ateinit, so it can be changed later.
|
192063 |
13-May-2009 |
stas |
- Style(9) and consistency nitpicking.
Reviewed by: imp
|
192059 |
13-May-2009 |
gonzo |
- Make SPI bus bridge be non-arch dependent by using more generic name
Reviewed by: imp
|
192028 |
12-May-2009 |
stas |
- Resurrect the debug printf message I accidentally dropped in the previous commit. - Use device_printf instead of printf. - Put all printfs in the interrupt handler under bootverbose.
|
192027 |
12-May-2009 |
stas |
- Eliminate extra register reads by using a variable to store registers contents. - Use memory barriers to preserve the order of buffer space operations. This might be needed if we'll ever use this driver on architectures where ordering is not guaranteed.
|
192018 |
12-May-2009 |
stas |
- Implement detach path. - Release memory and DMA resources on stop. - Unload the associated DMA maps after transmit is complete.
|
191961 |
10-May-2009 |
stas |
- Fix build with INVARIANTS enabled.
|
191960 |
10-May-2009 |
stas |
- Fix multicast operation that I broke in previous commit. - Do not enable multicast hash lookup if no multicast addresses were configured or if promisc mode is enabled.
|
191959 |
10-May-2009 |
stas |
- Fix promisc/multicast/broadcast parameters setting by introducing the new ate_rxfilter function to set requested parameters. Use this function on parameters change rather than reinitializing the chip.
|
191954 |
10-May-2009 |
kuriyama |
- Use "device\t" and "options \t" for consistency.
|
191873 |
07-May-2009 |
alc |
Define the kernel pmap in the same way on arm as on every other architecture.
Eliminate an unused definition.
Tested by: cognet
|
191858 |
06-May-2009 |
cognet |
Use the good hints for the NSLU, it should fix the network adapter.
PR: arm/134092 Submitted by: gavin
|
191817 |
05-May-2009 |
stas |
- Add support for PXA270 cpu.
Submitted by: Jacques Fourie <jacques.fourie@gmail.com>
|
191438 |
23-Apr-2009 |
jhb |
Reduce the number of bounce zones (and thus the number of bounce pages used in some cases): - Ignore DMA tag boundaries when allocating bounce pages. The boundaries don't determine whether or not parts of a DMA request bounce. Instead, they are just used to carve up segments. - Allow tags with sub-page alignment to share bounce pages since bounce pages are always page aligned.
Reviewed by: scottl (amd64) MFC after: 1 month
|
191410 |
23-Apr-2009 |
stas |
- Whitespace nitpicking.
|
191408 |
22-Apr-2009 |
stas |
- Add the driver for AT91RM9200 CompactFlash controller. The driver operates in the common memory mode and use polling mode to control the status of operations as I don't have any board with interrupt line routed yet. I'll add the GPIO interrupt driven mode as soon as I get one.
|
191369 |
21-Apr-2009 |
stas |
- Rename ds1672 and ds133x devices to "ds1672_rtc" and "ds133x_rtc" respectivly. This will allow one to have a kernel with both devices present and use it for multiple boards with different types of RTC sitting on a bus.
Discussed with: imp
|
191322 |
20-Apr-2009 |
stas |
- Give a warning and start the oscillator if it was not previously runned. - Rename ds1672 -> rtc to follow the other drivers. - Refactor/simplify the code a bit.
MFC after: 2 weeks
|
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@
|
191228 |
17-Apr-2009 |
ticso |
minor cleanup
|
191201 |
17-Apr-2009 |
jhb |
Restore bus DMA bounce pages to an offset of 0 when they are released by a tag that has BUS_DMA_KEEP_PG_OFFSET set. Otherwise the page could be reused with a non-zero offset by a tag that doesn't have BUS_DMA_KEEP_PG_OFFSET leading to data corruption.
Sleuthing by: avg Reviewed by: scottl
|
191141 |
16-Apr-2009 |
raj |
Minor style fixes and better comments.
|
191140 |
16-Apr-2009 |
raj |
Adjust Marvell Discovery (MV78xxx) support to recognize newest chip revisions, handle Z0 revision (early silicon) explicitly due to its quirks.
Obtained from: Marvell, Semihalf
|
191011 |
13-Apr-2009 |
kib |
The bus_dmamap_load_uio(9) shall use pmap of the thread recorded in the uio_td to extract pages from, instead of unconditionally use kernel pmap.
Submitted by: Jason Harmening <jason.harmening gmail com> (amd64 version) PR: amd64/133592 Reviewed by: scottl (original patch), jhb MFC after: 2 weeks
|
190845 |
08-Apr-2009 |
raj |
Minor description fix.
|
190844 |
08-Apr-2009 |
raj |
Properly handle KDB entry in fatal abort. This lets KDB_UNATTENDED work on ARM.
Submitted by: Grzegorz Bernacki gjb ! semihalf dot com
|
190740 |
05-Apr-2009 |
thompsa |
MFp4 //depot/projects/usb@159992
at91_udp.c does not exist anymore, it is now replaced by at91dci in src/sys/dev/usb/controller. Also remove the ohci_atmelarm.c because it is also included in src/sys/conf/files
Submitted by: Sylvestre Gallon
|
190708 |
05-Apr-2009 |
dchagin |
Fix KBI breakage by r190520 which affects older linux.ko binaries:
1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored.
Suggested by: jhb Reviewed by: jhb Approved by: kib (mentor) MFC after: 6 days
|
190705 |
04-Apr-2009 |
alc |
Retire VM_PROT_READ_IS_EXEC. It was intended to be a micro-optimization, but I see no benefit from it today.
VM_PROT_READ_IS_EXEC was only intended for use on processors that do not distinguish between read and execute permission. On an mmap(2) or mprotect(2), it automatically added execute permission if the caller specified permissions included read permission. The hope was that this would reduce the number of vm map entries needed to implement an address space because there would be fewer neighboring vm map entries that differed only in the presence or absence of VM_PROT_EXECUTE. (See vm/vm_mmap.c revision 1.56.)
Today, I don't see any real applications that benefit from VM_PROT_READ_IS_EXEC. In any case, vm map entries are now organized as a self-adjusting binary search tree instead of an ordered list. So, the need for coalescing vm map entries is not as great as it once was.
|
190634 |
01-Apr-2009 |
jhb |
Remove some pointless mergeinfo that is the result of doing a local 'svn cp' and having svn create empty mergeinfo for the file.
|
190633 |
01-Apr-2009 |
piso |
Implement an ipfw action to reassemble ip packets: reass.
|
190603 |
31-Mar-2009 |
cognet |
Fix the userland, RAS, version of atomic_fetchadd_32 : return the correct value, and do not store the wrong one in the supplied pointer.
Submitted by: Mark Tinguely <tinguely casselton net>
|
190602 |
31-Mar-2009 |
cognet |
Use Oxf0000000 instead of 0xff000000 to guess the physical address, relative to the virtual one. I may had a reason at some point to use the later, but can't remember which, and it can leads to issues.
Reported by: Guillaume Ballet <gballet gmail com>
|
190581 |
30-Mar-2009 |
mav |
Integrate user/mav/ata branch:
Add ch_suspend/ch_resume methods for PCI controllers and implement them for AHCI. Refactor AHCI channel initialization according to it.
Fix Port Multipliers operation. It is far from perfect yet, but works now. Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair. Previous version was also tested with SiI 4726 PMP.
Hardware sponsored by: Vitsch Electronics / VEHosting.nl
|
190580 |
30-Mar-2009 |
sam |
revert unintended change
|
190579 |
30-Mar-2009 |
sam |
Hoist 802.11 encapsulation up into net80211: o call ieee80211_encap in ieee80211_start so frames passed down to drivers are already encapsulated o remove ieee80211_encap calls in drivers o fixup wi so it recreates the 802.3 head it requires from the 802.11 header contents o move fast-frame aggregation from ath to net80211 (conditional on IEEE80211_SUPPORT_SUPERG): - aggregation is now done in ieee80211_start; it is enabled when the packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames are held on a staging queue according to ieee80211_ffagemax (net.wlan.ffagemax) to wait for a frame to combine with - drivers must call back to age/flush the staging queue (ath does this on tx done, at swba, and on rx according to the state of the tx queues and/or the contents of the staging queue) - remove fast-frame-related data structures from ath - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle per-node fast-frames state (we reuse 11n tx ampdu state) o change ieee80211_encap calling convention to include an explicit vap so frames coming through a WDS vap are recognized w/o setting M_WDS
With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames.
Reviewed by: thompsa, rpaulo, avatar, imp, sephe
|
190571 |
30-Mar-2009 |
sam |
Remove ATH_SUPPORT_TDMA and use IEEE80211_SUPPORT_TDMA instead. It doesn't make much sense to configure driver support w/o net80211. Note this means ath now depends on opt_wlan.h.
|
190100 |
19-Mar-2009 |
thompsa |
Remove the uscanner(4) driver, this follows the removal of the kernel scanner driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and contained no logic, the default interface is now libusb (supported by sane).
Reviewed by: HPS
|
189926 |
17-Mar-2009 |
kib |
Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointer to the full path of the image that is being executed. Increase AT_COUNT.
Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries.
Reviewed by: kan
|
189771 |
13-Mar-2009 |
dchagin |
Implement new way of branding ELF binaries by looking to a ".note.ABI-tag" section.
The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through.
Move code which fetch osreldate for ELF binary to check_note() handler.
PR: 118473 Approved by: kib (mentor)
|
189656 |
11-Mar-2009 |
sam |
switch to !legacy usb stack
|
189652 |
10-Mar-2009 |
sam |
configure flash support
|
189651 |
10-Mar-2009 |
sam |
add IXP4XX_FLASH_SIZE config knob that can be used to override the default flash size; this is necessary at the moment because we map all of flash at boot, eventually we'll do this on the fly
|
189650 |
10-Mar-2009 |
sam |
map CS0 on 2358 so flash is accessible
|
189645 |
10-Mar-2009 |
sam |
mark device capable of vlan-size frames
Obtained from: netbsd
|
189642 |
10-Mar-2009 |
sam |
turn off inclusion of FCS in rx'd frames; we don't use it anywhere and dhclient gets annoyed when it receives FCS in frames via bpf
|
189641 |
10-Mar-2009 |
sam |
o add missing bus_release_resource and bus_deactivate_resource that just operate on the resource (we have no local resources to manage); this fixes drivers that alloc/release resources in their probe method and then do it again in attach o while here add some prints to catch failures and massage style a bit
|
189633 |
10-Mar-2009 |
sam |
bring in ddb "show gpio" support from Cambria branch
|
189632 |
10-Mar-2009 |
sam |
Small cleanup of memory resource allocation from Cambria branch: o encode need for A4 bus space tag hackery according to the memory address; checking for "uart" breaks down with the GPS chip support which is also a uart but does not require the same hackery o encode the correct memory window instead of carving up all of i/o space, potentially with a larger window than a device should have; this likely should be handled in the drivers by using a proper bus alloc call but since some drivers depend on the bus support to figure this out we cannot simply mod them o add optional GPS and RS485 support (conditionally as the support isn't ready yet)
|
189630 |
10-Mar-2009 |
sam |
catch up with r189306; handle delayed activation of resources
Submitted by: jhb
|
189609 |
09-Mar-2009 |
sam |
add cfid and geom_redboot
|
189548 |
08-Mar-2009 |
sam |
o mark unexpected callbacks more clearly o unwrap some lines
|
189463 |
06-Mar-2009 |
sam |
Cleanup virtual device mapping some more: o improves understandability by replacing numerous relative address calculations with fixed addresses; everything should now match up more easily with the vm layout shown at the top of the file o move the expansion bus chip select regions to be contiguous with the expansion bus configuration area; this is not exploited right now but allows map consolidation in the future o leave a gap between the expansion bus regions and the pci config space in case we want to map more exp bus cs regions
Reviewed by: imp, thompsa
|
189461 |
06-Mar-2009 |
sam |
remove unneeded static mappings for NPE and MAC regions; these are already mapped through the IO region so never used
Reviewed by: imp, thompsa
|
189460 |
06-Mar-2009 |
sam |
enable tdma support by default; many people using these boards are using them to setup tdma p2p links
|
189459 |
06-Mar-2009 |
sam |
legacy USB is required on these platforms at the moment
|
189457 |
06-Mar-2009 |
sam |
fix legacy usb configuration
|
189456 |
06-Mar-2009 |
sam |
o simplify code in ixppcib_conf_setup o fixup debug printfs
|
189126 |
27-Feb-2009 |
imp |
Move to new usb stack that puts the front-end bus attachments with the usb stack rather than with the rest of the processor support code. Not sure that's a good idea, as we were moving away from it, but this fixes the build in the mean time so we can have that discussion.
|
189020 |
24-Feb-2009 |
thompsa |
Update paths for ehci_ixp4xx.c in the old and new stacks.
|
189019 |
24-Feb-2009 |
thompsa |
Fix path and config name for ehci_mbus.c
|
188944 |
23-Feb-2009 |
thompsa |
Change over the usb kernel options to the new stack (retaining existing naming). The old usb stack can be compiled in my prefixing the name with 'o'.
|
188744 |
18-Feb-2009 |
sam |
use mii instead of miibus so we don't drag in all phy support (we only need ukphy which is brought in by mii)
MFC after: 1 week
|
188698 |
16-Feb-2009 |
marcel |
Include Marvell EHCI HC driver for USB2.
|
188581 |
13-Feb-2009 |
cognet |
Oops. ARM_RAS_END is ARM_TP_ADDRESS + 8, not 4.
Spotted out by: Mark Tinguely <tinguely at casselton d0t net>
|
188540 |
12-Feb-2009 |
cognet |
To prevent various race conditions in the RAS code, store and restore the values in ARM_RAS_START and ARM_RAS_END at context switch time.
MFC after: 1 week
|
188539 |
12-Feb-2009 |
cognet |
Do not set thread0.td_frame to a bogus value, as it's going to overwrite the thread0 pcb, while the board-dependant code already set a good trapframe.
Reported by: Mark Tinguely <tinguely at casselton d0t net>
MFC after: 1 week
|
188505 |
11-Feb-2009 |
sam |
fix ARM_USE_SMALL_ALLOC after memory layout changes
Submitted by: cognet
|
188403 |
09-Feb-2009 |
cognet |
The bounce zone sees its page number increased if multiple dma maps use it in the same dma tag. However, it can happen multiple dma tags share the same bounce zone too, so add a per-bounce zone map counter, and check it instead of the dma tag map counter, to know if we have to alloc more pages.
Reported by: miwi Reviewed by: scottl
|
188350 |
08-Feb-2009 |
imp |
When bouncing pages, allow a new option to preserve the intra-page offset. This is needed for the ehci hardware buffer rings that assume this behavior.
This is an interim solution, and a more general one is being worked on. This solution doesn't break anything that doesn't ask for it directly. The mbuf and uio variants with this flag likely don't work and haven't been tested.
Universe builds with these changes. I don't have a huge-memory machine to test these changes with, but will be happy to work with folks that do and hps if this changes turns out not to be sufficient.
Submitted by: alfred@ from Hans Peter Selasky's original
|
188112 |
04-Feb-2009 |
cognet |
Erm... Report the buffer as being bounced even when it's the entire buffer, or we would end up invalidating the cache line for what we just copied...
Reported by: thompsa Pointy at to: cognet
MFC after: 3 days
|
188088 |
03-Feb-2009 |
sam |
Add support for the StrataFlash on 2348 boards: o add bus shim for cfi driver o add static mapping for CS0 (we map all 16M as the cfi driver doesn't support demand mapping)
Note this needs some tweaking to work for 2358 boards which is why the CAMBRIA config is not touched.
|
188085 |
03-Feb-2009 |
sam |
force atomic_cmpset_ptr types to match atomic_cmpset_32; this matches what powerpc does
Submitted by: stass MFC after: 2 weeks
|
188020 |
02-Feb-2009 |
cognet |
Move a comment to where it belongs.
Spotted out by: Christoph Mallon <christoph d0t mallon AT gmx d0t de>
|
188019 |
02-Feb-2009 |
cognet |
Remove unused variables.
Spotted out by: Christoph Mallon <christoph d0t mallon AT gmx d0t de>
|
187911 |
30-Jan-2009 |
thompsa |
Increment total_bounced busdma stat as required.
|
187606 |
23-Jan-2009 |
imp |
Move to having a caps flag. Newer versions of the AT91 family don't need the bouncing, so save a few copies in that case. Also convert 4-bit code selection to using it.
|
187603 |
22-Jan-2009 |
imp |
Don't over-commit the DMA. Use the passed in size of the transfer rather than a fixed 512... This fixes the mount root problem on at91. Prior to the SD card reorg, all data transfers were 512 bytes, so we didn't notice.
|
187602 |
22-Jan-2009 |
imp |
Migrate towards using at91_master_clock. Initialize the clocks for the serial port class when we set the devclass since it is now no-longer a compile time constant. Eliminate the pci include, as it isn't relevant or necessary.
|
187601 |
22-Jan-2009 |
imp |
Use at91_master_clock instead of AT91C_MASTER_CLOCK.
|
187600 |
22-Jan-2009 |
imp |
Remove now-redundant declaration.
|
187599 |
22-Jan-2009 |
imp |
Store at91_master_clock in a global variable as opposed to a compile time constant. This allows us to potentially change it at runtime or autodetect it early in the boot (the latter being much more likely to have a good outcome).
|
187592 |
22-Jan-2009 |
cognet |
Add a comment explaining what ARM_KERN_DIRECTMAP is all about.
Suggested by: raj
|
187548 |
21-Jan-2009 |
imp |
o The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such. o Only set 4-bit caps on those boards that have 4-bit caps (this means that because we don't set wire4 yet, this forces us to always use 1-bit bus). o Don't test wire4 when setting up the bus width, since bad things will happen if we do.
# This likely won't fix the busted at91 sd card support, but these are # needful changes for correctness.
|
187476 |
20-Jan-2009 |
mav |
Implement MMCBR_IVAR_CAPS. It should better be implemented, or results can be unpredictable.
PR: arm/128987
|
187340 |
16-Jan-2009 |
cognet |
Remove a duplicate #include.
|
187192 |
13-Jan-2009 |
thompsa |
Restore the if_*var.h and if_*reg.h to their original names, they dont need to be different.
|
186947 |
09-Jan-2009 |
raj |
Check PCIE link status before accessing the bus.
Some 88F5182-based systems (Linkstation) have problems when PCIE is accessed without any peripherals present.
|
186934 |
09-Jan-2009 |
raj |
Rename Marvell ARM CPU specific file according to r186933.
|
186933 |
09-Jan-2009 |
raj |
Fix confusing naming of Marvell ARM CPU specific routines.
- The contents of 'feroceon_cpufuncs' dispatch table was really dedicated for the new Sheeva CPU (in 88F6xxx and MV-78xxx SOCs), and NOT Feroceon.
- Feroceon CPU (in 88F5xxx SOCs) appears as a regular ARM926EJ-S core and does not require dedicated routines.
This will be accompanied by a file rename commit.
|
186932 |
09-Jan-2009 |
raj |
Improve Marvell SOCs PCI/PCIE driver.
- Provide dedicated rmans for MEM and IO resources.
- Convert PCI IRQ routing info into a table (from callback approach), provide config data for alternative DB- boards.
- Fix a wrong boundary check error in pcib_mbus_init_bar()
Obtained from: Semihalf
|
186909 |
08-Jan-2009 |
raj |
Improve and extend Marvell SOCs platform code.
- Allow for setting per platform MPP/GPIO configuration in the kernel, so that we can override all settings firmware might set.
- Set decode windows for the remaining on-chip peripherals: CESA, SATA and XOR.
- Improve handling of USB controllers so that all port are available on the given SOC/platform (e.g. up to three on DB-78xxx), this includes rework of USB decode windows set-up.
- Other minor fixes and cosmetics.
Obtained from: Semihalf
|
186901 |
08-Jan-2009 |
raj |
Minor style(9) corrections.
|
186899 |
08-Jan-2009 |
raj |
Adjust Marvell SOC support for A0 chip revision.
- Clean up TCLK handling so that it's dynamically recognized depending on registers settings or chip version/revision. Update registers definitions.
- Teach SOC ident routine about A0 (initial silicon version for general audience)
Obtained from: Marvell, Semihalf
|
186539 |
28-Dec-2008 |
bz |
Include std.ixp425 for "cpu" and comment out duplicate memory map options. Using the already included std.avila is not considered to be entirely right (and the options slightly differ) but the best match we currently have. Upcoming work should fit better.
Reorder another variable to match the layout of other configs.
Reviewed by: sam, warner (earlier version with options removed)
|
186525 |
27-Dec-2008 |
bz |
In additions to the configs from r185478, which also enabled the use of modules for arm, disable them by adding MODULES_OVERRIDE="" here as well.
Reviewed by: sam MFC after: 3 weeks
|
186524 |
27-Dec-2008 |
sam |
arm is in DEFAULTS; remove dup
Submitted by: bz
|
186523 |
27-Dec-2008 |
bz |
Removed duplicate makeoptions MODULES_OVERRIDE=""
|
186461 |
23-Dec-2008 |
marcel |
Add support for the FPA floating-point format on ARM. The FPA floating-point format is identical to the VFP format, but is always stored in big-endian. Introduce _IEEE_WORD_ORDER to describe the byte-order of the FP representation.
Obtained from: Juniper Networks, Inc
|
186441 |
23-Dec-2008 |
sam |
move IXP4XX EHCI bus shim to the usb directory and rename
|
186420 |
23-Dec-2008 |
sam |
NPE cleanups needed for ancillary drivers (e.g. crypto acceleration): o check feature bits when probing NPE ethernet support o move firmware loading logic from if_npe to core npe support o allow multiple refs to core NPE driver o while here fix hw.npe.debug tunable path
|
186419 |
23-Dec-2008 |
sam |
kill NPE_PORTS_MAX, it's not used and likely will not be
|
186418 |
23-Dec-2008 |
sam |
Fill in feature control support: o add definitions for more bits, for masking out IXP465-specific bits, and %b format string o add ixp4xx_read_feature_bits to retrieve the mask of valid features (aka fuse bits) o add cpu_is_ixp42x() macro o print feature bits at boot
|
186417 |
23-Dec-2008 |
sam |
add IXP465 and generic IXP425 definition
|
186416 |
23-Dec-2008 |
sam |
o enable TT and big-endian MMIO o force a reset before ehci_init to get byte-select setup
LS, FS, and HS devices now work on the Cambria board
|
186352 |
20-Dec-2008 |
sam |
Merge support for Gateworks Cambria boards: o add support for IXP435 cpu's (e.g. 64 irq's) o add support for Cambria-specific devices: npe, led's (front panel and octal latch), ehci, mcu, ide cf o redo memory mapping for xscale/ixp4xx boards: previously memory was assumed aliased to 0x10000000 but this appears to be true only for ixp425 systems and breaks operation on others; rework so memory is assumed to start at 0 o rework NPE configuration support to use NPE id's instead of port #'s; these changes also rename the associated MAC's to follow the NPE's they are attached to o update npe firmware to latest rev (same license) and update default fw imageid's to match; in particular this adds NPE-A and crypto support o re-style NPE fw handling code and add a console msg identifying the attributes of the loaded fw o fix numerous problems with handling failures during npe setup o fix npe rx q setup; need to spin waiting for mailbox responses during early boot stages as qmgr interrupts are not delivered; this fixes the problem where all 8 traffic classifications were not tied to the rx q (and eliminates the console msg "remember to fix rx q setup") o add DELAY to npe MII wait logic for IXP435 o strip down builtin phys->virt address translation table in resource handling to just those resources that require it and add a console msg to alert people when this (kludge) table needs to be extended o purge a bunch of dead netbsd-ism's o cleanup avila led driver o add Cambria support to boot2 and rework code for better multi-board support
Notes: 1. NPE-A doesn't work and causes NPE-C to stop working; it is disabled in the hints 2. USB isn't working yet; controller communicates ok but device discovery fails 3. Cambria support must be configured separately from IXP425 boards; multi-board support is TBD
Sponsored by: Hobnob, Gateworks (board donation) Reviewed by: imp
|
186240 |
17-Dec-2008 |
marcel |
Make gpart the default partitioning class on all platforms. Both ia64 and powerpc were using gpart exclusively already so there's no change for those two.
Discussed on: arch@
|
186212 |
17-Dec-2008 |
imp |
AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
Reviewed by: peter
|
185640 |
05-Dec-2008 |
raj |
Avoid confusion and adjust link address range of Marvell Orion kernel so it is the same as for Kirkwood and Discovery.
|
185639 |
05-Dec-2008 |
raj |
Fix configuration of the PCI bridge. This got omitted in the initial import of this code.
|
185539 |
02-Dec-2008 |
peter |
Delete a bunch of empty mergeinfo records caused by local copies.
|
185522 |
01-Dec-2008 |
sam |
Switch to ath hal source code. Note this removes the ath_hal module; the ath module now brings in the hal support. Kernel config files are almost backwards compatible; supplying
device ath_hal
gives you the same chip support that the binary hal did but you must also include
options AH_SUPPORT_AR5416
to enable the extended format descriptors used by 11n parts. It is now possible to control the chip support included in a build by specifying exactly which chips are to be supported in the config file; consult ath_hal(4) for information.
|
185513 |
01-Dec-2008 |
stas |
- Fix spelling error in comments.
PR: arm/128891 Submitted by: Pavel Pankov <pankov_p@mail.ru> Approved by: kib (mentor)
|
185494 |
30-Nov-2008 |
stas |
- Get rid of unused variable in KTR checks. This allows ktr(4) enabled ARM kernel to compile.
PR: arm/128897 Submitted by: Pankov Pavel <pankov_p@mail.ru> Reviewed by: raj Approved by: kib (mentor, implicit) MFC after: 1 week
|
185492 |
30-Nov-2008 |
stas |
- Get rid of extra include file, erroneously added by the previous commit. This include file was required by the first version of the patch.
Approved by: kib (mentor, implicit)
|
185491 |
30-Nov-2008 |
stas |
- Obtain main clock frequency dynamically based on CKGR_MCFR register contents. - It is possible to override the dynamic configuration by using AT91C_MAIN_CLOCK option in kernel config.
PR: arm/128961 (based on) Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de> Reviewed by: imp Approved by: kib (mentor, implicit)
|
185478 |
30-Nov-2008 |
sam |
enable use of modules but disable them by adding MODULES_OVERRIDE="" in each config file until we can sort out issues in the modules tree
Reviewed by: imp MFC after: 1 month
|
185477 |
30-Nov-2008 |
imp |
opt_at91.h isn't needed here at all anymore, since the board init routines have been split out. Remove it. This leaves only one instance of it in the tree that will be going away soon.
|
185307 |
25-Nov-2008 |
imp |
Convert BWCT and HL200 over to new board mechanism as well. The TSC4370 config file wasn't committed to this tree, so I don't know if my changes will work on it or not.
|
185305 |
25-Nov-2008 |
imp |
Start to make it easier to add AT91RM9200 based boards: o Copy kb920x_machdep.c to at91_machdep.c o Move board_init to new board_kb920x.c o rename ramsize to at91_ramsize and make it accessible to board_* files. o Delete files.kb920x. We can do this selection with the new boards. o Add a stub for the tsc4370 board init, which will be added in a future commit. o Add new 'devices' at91_board_kb920x and at91_board_tsc4370. More are needed and will be added in future commits.
Reviewed by: stass, cognet
|
185300 |
25-Nov-2008 |
imp |
Whitespace nit.
|
185288 |
25-Nov-2008 |
imp |
Save boot args.
|
185287 |
25-Nov-2008 |
imp |
more silly whitespace changes.
|
185270 |
25-Nov-2008 |
imp |
Fix various whitespace botches, mostly having them at the end of a line.
|
185267 |
25-Nov-2008 |
imp |
Replace disclaimer with the one from COPYRIGHT. Joint authors aggreed to the change.
|
185266 |
25-Nov-2008 |
imp |
Replace three magic constants with L1_S_SIZE, since that's what is really meant in those places.
|
185265 |
25-Nov-2008 |
imp |
Tweak the disclaimer section of the license to match COPYRIGHT, for better or worse. Ok'd by folks that have additional copyrights to the files in cases where there's joint authorship.
|
185169 |
22-Nov-2008 |
kib |
Add sv_flags field to struct sysentvec with intention to provide description of the ABI of the currently executing image. Change some places to test the flags instead of explicit comparing with address of known sysentvec structures to determine ABI features.
Discussed with: dchagin, imp, jhb, peter
|
185162 |
22-Nov-2008 |
kmacy |
- bump __FreeBSD version to reflect added buf_ring, memory barriers, and ifnet functions
- add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own
- add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers
- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues
This work was supported by Bitgravity Inc. and Chelsio Inc.
|
185098 |
19-Nov-2008 |
raj |
Improve error handling in pcib_mbus_identify().
|
185092 |
19-Nov-2008 |
raj |
Improve style(9) and other cosmetics in Marvell SOCs code.
|
185091 |
19-Nov-2008 |
raj |
Fix off-by-one error in mbus_attach().
|
185090 |
19-Nov-2008 |
raj |
Enable PCI in Marvell kernel configs.
|
185089 |
19-Nov-2008 |
raj |
PCI/PCI-Express support for Marvell systems.
Obtained from: Marvell, Semihalf
|
185049 |
18-Nov-2008 |
stas |
- Fix two minor errors in at91 code.
PR: arm/128959 Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de> Approved by: kib (mentor)
|
184730 |
06-Nov-2008 |
raj |
ARM pmap style(9) and cosmetics.
|
184729 |
06-Nov-2008 |
raj |
Auto-size kernel page tables allocation on Marvell systems.
This allows mini dumps to fully work for these platforms.
Obtained from: Juniper Networks, Semihalf
|
184728 |
06-Nov-2008 |
raj |
Support kernel crash mini dumps on ARM architecture.
Obtained from: Juniper Networks, Semihalf
|
184452 |
29-Oct-2008 |
mav |
Allow card reader bridge driver to report maximum supported transfer size. sdhci supports up to 65535 blocks transfers, at91_mci - one block.
Enable multiblock operations disabled before to follow at91_mci driver limitations.
Reviewed by: imp@
|
184310 |
26-Oct-2008 |
stas |
- Add stream bus_space operations.
Reviewed by: cognet Approved by: kib (mentor, implicit) MFC after: 1 week
|
184309 |
26-Oct-2008 |
stas |
- Add a missing NULL-pointer check.
Reviewed by: cognet Approved by: kib (mentor, implicit) MFC after: 3 days
|
184205 |
23-Oct-2008 |
des |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
|
184193 |
23-Oct-2008 |
marcel |
Add arm/conf/DEFAULTS and populate it with: machine arm device mem options GEOM_BSD options GEOM_MBR
Remove the first two from all kernel configuration files and change geom_bsd and geom_mbr from standard to optional.
|
183958 |
16-Oct-2008 |
raj |
Eliminate flushing of L2 cache in ARM context switch routines.
With VIPT L2 cache such syncing not only is redundant, but also a performance penalty.
Pointed out by: cognet
|
183886 |
14-Oct-2008 |
sam |
correct sizeof calculation
PR: arm/128095 Submitted by: Henning Petersen MFC after: 1 week
|
183878 |
14-Oct-2008 |
raj |
Initial support of loader(8) for ARM machines running U-Boot.
This uses the common U-Boot support lib (sys/boot/uboot, already used on FreeBSD/powerpc), and assumes the underlying firmware has the modern API for stand-alone apps enabled in the config (CONFIG_API).
Only netbooting is supported at the moment.
Obtained from: Marvell, Semihalf
|
183873 |
14-Oct-2008 |
raj |
Add kernel config files for Marvell development boards.
FreeBSD 8-CURRENT was tested and run successfully on the following eval boards and devices :
* DB-88F5182, DB-88F5281 (Orion based)
* DB-88F6281, RD-88F6281 (Kirkwood based)
* DB-78100 (Discovery based)
For more detailed info on build instructions and other examples please refer to http://wiki.freebsd.org/FreeBSDMarvell
Obtained from: Marvell, Semihalf
|
183840 |
13-Oct-2008 |
raj |
Introduce basic support for Marvell families of system-on-chip ARM devices:
* Orion - 88F5181 - 88F5182 - 88F5281
* Kirkwood - 88F6281
* Discovery - MV78100
The above families of SOCs are built around CPU cores compliant with ARMv5TE instruction set architecture definition. They share a number of integrated peripherals. This commit brings support for the following basic elements:
* GPIO * Interrupt controller * L1, L2 cache * Timers, watchdog, RTC * TWSI (I2C) * UART
Other peripherals drivers will be introduced separately.
Reviewed by: imp, marcel, stass (Thanks guys!) Obtained from: Marvell, Semihalf
|
183839 |
13-Oct-2008 |
raj |
One more L2 cache synchronization call that didn't make the previous commit.
|
183838 |
13-Oct-2008 |
raj |
Provide L2 cache synchronization (write back + invalidation) on ARM.
Note the cpu_l2cache_wbinv_* routines are no-ops on systems not populated with L2 caches.
Obtained from: Marvell, Semihalf
|
183836 |
13-Oct-2008 |
raj |
Do not use cached page for temporary mapping in pmap_zero_page_generic()
The physical page which we clear is accessed via additional temp kernel mapping for the period of zeroing operation. However in systems with virtual d-cache (most ARMs) when write-allocate feature is enabled, we can have modified but unflushed content pertaining to this physical page still in the d-cache due to its primary (pre-existing) mapping. In such scenario that cached content upon flush is likely to overwrite [portions of] the physical page we want to zero here..
This is a general problem with multiple virtual mappings covering the same physical page with write-allocate and virtual d-cache: there is inherent potential for corruptions of this kind, which are not easily resolved; it is best policy that such multiple mappings be not allowed.
Obtained from: Marvell, Semihalf
|
183835 |
13-Oct-2008 |
raj |
Introduce low-level support for new Marvell core CPUs: 88FR131, 88FR571.
They are compliant with ARMv5TE and integrated on 88F6281 (Kirkwood) and MV78100 (Discovery) system-on-chip families.
Obtained from: Marvell, Semihalf
|
183670 |
07-Oct-2008 |
imp |
Use bus_get_dma_tag() instead of NULL here. Not really needed for atmel at the moment, but it is more correct.
|
183557 |
02-Oct-2008 |
bms |
Allow static hints to override kenv.
|
183527 |
01-Oct-2008 |
peter |
Collect N identical (or near identical) mkdumpheader() implementations into one, as threatened in the comment. Textdump magic can be passed in.
|
183479 |
30-Sep-2008 |
imp |
Properly implement read only. Also, the caps implementation is wrong here, so I'm backing it out.
|
183451 |
28-Sep-2008 |
imp |
Implement MMCBR_IVAR_CAPS for AT91 MCI device.
Submitted by: mav@ (well, not this one, but the base impl was)
|
183429 |
28-Sep-2008 |
imp |
White space nit.
|
183397 |
27-Sep-2008 |
ed |
Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere.
This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware.
Reviewed by: kib
|
183322 |
24-Sep-2008 |
kib |
Change the static struct sysentvec and struct Elf_Brandinfo initializers to the C99 style. At least, it is easier to read sysent definitions that way, and search for the actual instances of sigcode etc.
Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs.
No objection from: jhb MFC after: 1 month
|
182946 |
11-Sep-2008 |
cognet |
Bandaid: disable interrupts to make sure intr_enabled and the IER register are in sync. I'm not sure why it is needed, and why it wouldn't be on other arm platforms, but it prevents a lockup under heavy I/O.
|
182945 |
11-Sep-2008 |
cognet |
Remove the unused field "pc_prvspace" from the MD fields for the struct pcpu. There's not even a thing such as a "struct pcup". While I'm there, remove a comment that makes no sense for arm.
Spotted out by: Mark Tinguely
|
182934 |
11-Sep-2008 |
raj |
ARM nexus style(9) improvements.
|
182933 |
11-Sep-2008 |
raj |
ARM interrupts improvements.
- Fix nexus_setup_intr() abuse of setting up multiple IRQs in one go. Calling arm_setup_irqhandler() in loop is bogus, as there's just one cookie given from the caller and it is overwritten in each iteration so that only the last handler's cookie value prevails.
- Proper intr masking/unmasking handling: the IRQ source is masked at PIC level only after the last handler has been removed from the list.
Reviewed by: cognet, imp, sam, stass Obtained from: Grzegorz Bernacki gjb ! semihalf dot com
|
182932 |
11-Sep-2008 |
raj |
IXP425: split handling of the two QMGR interrupts so they are separately managed. Adjust ixpqmgr_{attach,detach} to comply with device_* interface.
Reviewed by: cognet, imp, sam, stass Tested by: cognet
|
182859 |
08-Sep-2008 |
imp |
Commit the no-brainer parts of my space saving kernel experiments. We don't inline the locking primitives, and only grab those parts of mii that we really need. Other space optimizations are too agressive for the generic file (removing all of usb, and loading it as kernel modules).
|
182852 |
07-Sep-2008 |
imp |
Minor cleanup of this config file: o It has been tested only on KB9202, KB9202A and KB9202B boards o Better comments about hints o option<space><tab> o Add newer SX_NOINLINE option. o Fix a few comments
|
182807 |
05-Sep-2008 |
imp |
Turn some lame pseudo-code into a less lame comment.
|
182806 |
05-Sep-2008 |
imp |
Kill bogus #if 0'd stuff for interrupts. They don't happen, and this driver will need more serious help to work with an interrupt driven path. There's many subtleties in driving the DMA engine with interrupts in many configurations. Best to not "guess" what the right way would be and mislead people.
|
182805 |
05-Sep-2008 |
imp |
Kill vestiges of the special case code we once had in place for usb memory allocation. It was change to include the range in the normal memory area, so these ifdef'd out special cases are no longer useful to keep around.
|
182803 |
05-Sep-2008 |
imp |
Kill bogus #if 1. There's no need for it since usb works these days.
|
182555 |
31-Aug-2008 |
imp |
Use a locally assigned address rather than stealing Atmel's which might cause a conflict...
|
182524 |
31-Aug-2008 |
stas |
- Fix comment. - Set U/L bit of generated ethernet address to 1 to not clash with Atmel assigned addresses.
Suggested by: yar Approved by: kib (mentor)
|
182477 |
30-Aug-2008 |
stas |
- Try to look for MAC address in all SA registers, not only in the first one. U-boot, for example, uses the second register to store MAC.[1] - Use random MAC address if none configured instead of failing.
Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de> [1] Reviewed by: imp Approved by: kib (mentor) MFC after: 1 week
|
182476 |
30-Aug-2008 |
stas |
- Style fix.
Approved by: kib (mentor) MFC after: 1 week
|
182086 |
23-Aug-2008 |
imp |
Whitespace nit.
|
181884 |
19-Aug-2008 |
imp |
Provide hooks into the GPIO lines and the ability to set/clear interrupts from them. This should be more generalized, but is sufficient for now.
Submitted by: Hans Petter Selasky
|
181883 |
19-Aug-2008 |
imp |
Use the proper clock domain for the usb host controller.
Submitted by: Hans Petter Selasky
|
181882 |
19-Aug-2008 |
imp |
Add IRQ line for usb device. I'm not 100% sure this is the right place to add this connection, since the interrupt is for a GPIO pin, but since we have no alternative at the moment...
Submitted by: Hans Petter Selasky
|
181875 |
19-Aug-2008 |
jhb |
Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data.
MFC after: 1 week
|
181803 |
17-Aug-2008 |
bz |
Commit step 1 of the vimage project, (network stack) virtualization work done by Marko Zec (zec@).
This is the first in a series of commits over the course of the next few weeks.
Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only.
We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again.
Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
|
181303 |
04-Aug-2008 |
jhb |
Add locking to the various iicbus(4) bridge drivers: - Just grab Giant in the ixp425_iic(4) driver since this driver uses a shared address/data register window pair to access the actual I2C registers. None of the other ixp425 drivers lock access to these shared address/data registers yet and that would need to be done before this could use any meaningful locking. - Add locking to the interrupt handler and 'iicbus_reset' methods of the at91_twi(4) driver. - Add locking to the pcf(4) driver. Other pcf(4) fixes include: - Don't needlessly zero the softc. - Use bus_foo rather than bus_space_foo and remove bus space tag and handle from softc. - The lpbb(4) driver just grabs Giant for now. This will be refined later when ppbus(4) is locked. - As was done with smbus earlier, move the DRIVER_MODULE() lines to match the bus driver (either iicbus or iicbb) to the bridge driver into the bridge drivers.
Tested by: sam (arm/ixp425)
|
181302 |
04-Aug-2008 |
cognet |
Do not modify td->td_intr_nesting_level, it is now done in the MI code. This fixes the cpu time being falsely reported as interrupt time.
MFC after: 3 days
|
181296 |
04-Aug-2008 |
raj |
Fix ARM nocache allocator:
- let the loop iterate every page (as intended), and not some multiplies (which led to a fake exhaustion of the ARM_NOCACHE_KVA_SIZE)
- eliminate using MIN(): it compared number of pages vs. address (ARM_TP_ADDRESS), which was bogus
Reviewed by: cognet, imp Obtained from: Piotr Ziecik kosmo ! semihalf dot com MFC after: 3 days
|
181293 |
04-Aug-2008 |
cognet |
Remove unneeded #include <stdlib.h> (?)
MFC after: 3 days
|
181253 |
03-Aug-2008 |
cognet |
Add "add pc, whatever" as a branch instruction, we use it in memcpy().
MFC after: 3 days
|
181233 |
03-Aug-2008 |
ed |
Disconnect drivers that haven't been ported to MPSAFE TTY yet.
As clearly mentioned on the mailing lists, there is a list of drivers that have not been ported to the MPSAFE TTY layer yet. Remove them from the kernel configuration files. This means people can now still use these drivers if they explicitly put them in their kernel configuration file, which is good.
People should keep in mind that after August 10, these drivers will not work anymore. Even though owners of the hardware are capable of getting these drivers working again, I will see if I can at least get them to a compilable state (if time permits).
|
181229 |
03-Aug-2008 |
imp |
Kernel config for the Linksys NSLU2. This is just a basic configuration, with no support for the LED, buttons, realtime clock or flash support.
|
181223 |
03-Aug-2008 |
cognet |
Handle ldr pc, [reg] in branch_taken().
Obtained from: NetBSD MFC after: 3 days
|
181222 |
03-Aug-2008 |
cognet |
Add blx as a branch instruction.
MFC after: 3 days
|
181219 |
02-Aug-2008 |
imp |
Minor style nit.
|
181174 |
02-Aug-2008 |
cognet |
Add yet another branch instruction.
Obtained from: NetBSD MFC after: 3 days
|
181158 |
02-Aug-2008 |
ed |
Make the at91 uart(4) driver compile again.
As of r178766 this driver didn't compile anymore, because it missed a switch()-statement. I'm getting tired of seeing this driver being broken for two months already. When I run `make universe', everything passes, except the BWCT kernel configuration file.
|
181157 |
02-Aug-2008 |
imp |
ixp425 parts aren't multicore, so remove the SMP option. They also don't support the ioapic either, so remove that option too. These were commented out, but could never be enabled, unlike the other options in the file that are commented out.
|
181156 |
02-Aug-2008 |
imp |
Conform to the options<space><tab> convention everywhere in this file. This is just a white space change, no functional change.
|
181144 |
02-Aug-2008 |
cognet |
Store the PC while context switching, for the benefits of DDB.
|
180693 |
22-Jul-2008 |
stas |
- Whitespace fixes.
Approved by: gonzo MFC after: 1 week
|
180584 |
18-Jul-2008 |
alc |
Eliminate unused global variables. (These global variables became fields of struct kva_md_info many years ago.)
|
180486 |
12-Jul-2008 |
ticso |
fix multicast hash register definition
|
180209 |
03-Jul-2008 |
peter |
Exclude .cvsignore files from $FreeBSD$ checking
|
179990 |
25-Jun-2008 |
ed |
Remove the unused major/minor numbers from iodev and memdev.
Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem.
Approved by: philip (mentor)
|
179745 |
12-Jun-2008 |
kevlo |
Fix a typo: i80321_pci_probe -> i81342_pci_probe
|
179701 |
10-Jun-2008 |
kevlo |
Add the pxa_teardown_intr() bus method function to de-associate the interrupt handler
|
179700 |
10-Jun-2008 |
kevlo |
Pull all the code to deal with bus space methods into a shared set of routines.
|
179693 |
09-Jun-2008 |
wkoszek |
Since we create a DMA tag "mtag" for TX map with bus_dmamap_create(), we must synchronize such a map against "mtag" with bus_dmamap_sync(), not the tag designated for RX map.
Fix it.
Approved by: cognet
|
179664 |
09-Jun-2008 |
kevlo |
Remove sa1_cache_clean_addr
|
179663 |
09-Jun-2008 |
kevlo |
Unify arminit() and clean up
|
179595 |
06-Jun-2008 |
benno |
Support for the XScale PXA255 SoC as found on the Gumstix Basix and Connex boards. This is enough to net-boot to multiuser.
Also supported is the SMSC LAN91C111 parts used on the netCF, netDUO and netMMC add-on boards.
I'll be putting some instructions on how to boot this on the Gumstix boards online soon.
This is still fairly rough and will be refined over time but I felt it was better to get this out there where other people can help out.
|
179375 |
28-May-2008 |
imp |
Release the resources for the registers for the TWI device with SYS_RES_MEMORY to match how we allocate them...
Noticed by: Ian Lepore
|
179229 |
23-May-2008 |
alc |
The VM system no longer uses setPQL2(). Remove it and its helpers.
|
179081 |
18-May-2008 |
alc |
Retire pmap_addr_hint(). It is no longer used.
|
178893 |
09-May-2008 |
alc |
Add a stub for pmap_align_superpage() on machines that don't (yet) implement pmap-level support for superpages.
|
178766 |
04-May-2008 |
peter |
Expand kdb_alt_break a little, most commonly used with the option ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the debugger), there is now "Enter ~ ctrl-P" (force panic) and "Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons).
We've used variations of this at work. The force panic sequence is best used with KDB_UNATTENDED for when you just want it to dump and get on with it.
The reboot request is a safer way of getting into single user than a power cycle. eg: you've hosed the ability to log in (pam, rtld, etc). It gives init the reboot signal, which causes an orderly reboot.
I've taken my best guess at what the !x86 and non-sio code changes should be.
This also makes sio release its spinlock before calling KDB/DDB.
|
178471 |
25-Apr-2008 |
jeff |
- Add an integer argument to idle to indicate how likely we are to wake from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted.
Sponsored by: Nokia
|
178429 |
22-Apr-2008 |
phk |
Now that all platforms use genclock, shuffle things around slightly for better structure.
Much of this is related to <sys/clock.h>, which should really have been called <sys/calendar.h>, but unless and until we need the name, the repocopy can wait.
In general the kernel does not know about minutes, hours, days, timezones, daylight savings time, leap-years and such. All that is theoretically a matter for userland only.
Parts of kernel code does however care: badly designed filesystems store timestamps in local time and RTC chips almost universally track time in a YY-MM-DD HH:MM:SS format, and sometimes in local timezone instead of UTC. For this we have <sys/clock.h>
<sys/time.h> on the other hand, deals with time_t, timeval, timespec and so on. These know only seconds and fractions thereof.
Move inittodr() and resettodr() prototypes to <sys/time.h>. Retain the names as it is one of the few surviving PDP/VAX references.
Move startrtclock() to <machine/clock.h> on relevant platforms, it is a MD call between machdep.c/clock.c. Remove references to it elsewhere.
Remove a lot of unnecessary <sys/clock.h> includes.
Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs. XXX: should be kern.disable_rtc_set really, it's not MD.
|
178372 |
21-Apr-2008 |
phk |
Make genclock standard on all platforms.
Thanks to: grehan & marcel for platform support on ia64 and ppc.
|
178366 |
20-Apr-2008 |
cognet |
On the AT91, we need to write on the EOI register after we handle an interrupt. So, add a new function pointer, arm_post_filter, which defaults to NULL, and which will be used as the post_filter arg for intr_event_create(). Set it properly for the AT91, so that it boots again.
Reported by: hps
|
178354 |
20-Apr-2008 |
sam |
Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware loading to use firmware(9) and a separate module (e.g. ral). Also there no longer are separate wlan_scan* modules; this functionality is now bundled into the wlan module.
Supported by: Hobnob and Marvell Reviewed by: many Obtained from: Atheros (some bits)
|
178092 |
11-Apr-2008 |
jeff |
- Add the interrupt vector number to intr_event_create so MI code can lookup hard interrupt events by number. Ignore the irq# for soft intrs. - Add support to cpuset for binding hardware interrupts. This has the side effect of binding any ithread associated with the hard interrupt. As per restrictions imposed by MD code we can only bind interrupts to a single cpu presently. Interrupts can be 'unbound' by binding them to all cpus.
Reviewed by: jhb Sponsored by: Nokia
|
178001 |
08-Apr-2008 |
kevlo |
Remove some long-dead code
Reviewed by: cognet
|
177944 |
05-Apr-2008 |
cognet |
Remove bus_space_generic.c from the per-plarform files. Having it in the per-cpu files should be enough.
|
177943 |
05-Apr-2008 |
cognet |
Add bus_space_generic.c for the i81342 as well.
|
177940 |
05-Apr-2008 |
jhb |
Add a MI intr_event_handle() routine for the non-INTR_FILTER case. This allows all the INTR_FILTER #ifdef's to be removed from the MD interrupt code. - Rename the intr_event 'eoi', 'disable', and 'enable' hooks to 'post_filter', 'pre_ithread', and 'post_ithread' to be less x86-centric. Also, add a comment describe what the MI code expects them to do. - On amd64, i386, and powerpc this is effectively a NOP. - On arm, don't bother masking the interrupt unless the ithread is scheduled in the non-INTR_FILTER case to match what INTR_FILTER did. Also, don't bother unmasking the interrupt in the post_filter case if we never masked it. The INTR_FILTER case had been doing this by having arm_unmask_irq for the post_filter (formerly 'eoi') hook. - On ia64, stray interrupts are now masked for the non-INTR_FILTER case. They were already masked in the INTR_FILTER case. - On sparc64, use the a NULL pre_ithread hook and use intr_enable_eoi() for both the 'post_filter' and 'post_ithread' hooks to match what the non-INTR_FILTER code did. - On sun4v, retire the ithread wrapper hack by using an appropriate 'post_ithread' hook instead (it's what 'post_ithread'/'enable' was designed to do even in 5.x).
Glanced at by: piso Reviewed by: marius Requested by: marius [1], [5] Tested on: amd64, i386, arm, sparc64
|
177920 |
04-Apr-2008 |
imp |
Fix stupid typo
|
177916 |
04-Apr-2008 |
raj |
Make kernel.tramp build properly on ARM9E.
Reviewed by: imp Approved by: cognet (mentor)
|
177888 |
03-Apr-2008 |
raj |
Now really add the bus_space_generic.c file...
Reviewed by: sam Approved by: cognet (mentor)
|
177887 |
03-Apr-2008 |
raj |
Refactor certain ARM bus space methods: instead of having multiple copies of the same code introduce sys/arm/arm/bus_space_generic.c for a shared set of routines.
Reviewed by: sam Approved by: cognet (mentor)
|
177886 |
03-Apr-2008 |
raj |
Fix AVILA build.
Reviewed by: sam Approved by: cognet(mentor)
|
177883 |
03-Apr-2008 |
imp |
Take the first baby step towards unifying and cleaning up arminit(): - Pull all the code to deal with the trampoline stuff into one centeralized place and use it from everywhere. - Some minor style tidiness
Reviewed by: tinguely
|
177874 |
03-Apr-2008 |
imp |
KERNBASE + 0x00200000 is the same thing as KERNVIRTADDR on this platform, so use the latter in preference to the former. This makes the fake_preload setup be the same between kb920x_machdep.c and avila_machdep.c....
|
177873 |
03-Apr-2008 |
imp |
Remove unnecessary #define.
|
177662 |
27-Mar-2008 |
dfr |
Add kernel module support for nfslockd and krpc. Use the module system to detect (or load) kernel NLM support in rpc.lockd. Remove the '-k' option to rpc.lockd and make kernel NLM the default. A user can still force the use of the old user NLM by building a kernel without NFSLOCKD and/or removing the nfslockd.ko module.
|
177661 |
27-Mar-2008 |
jb |
When building a kernel module, define MAXCPU the same as SMP so that modules work with and without SMP.
|
177508 |
22-Mar-2008 |
cognet |
We need to prototype _start() as well, as we use it to test if we're running from flash or from RAM.
Reported by: imp MFC After: 3 days
|
177506 |
22-Mar-2008 |
sam |
add hints to specify how NPE ports are mapped to MAC+PHY; these could be commented out as they just duplicate the defaults that are built into the code
Reviewed by: imp MFC after: 1 week
|
177505 |
22-Mar-2008 |
sam |
Improve mac+phy configuration so that hints can be used to describe layouts different than the defaults: o hint.npe.0.mac="A", "B", etc. specifies the window for MAC register accesses o hint.npe.0.mii="A", "B", etc. specifies PHY registers o hint.npe.1.phy=%d specifies the PHY to map to a port
This allows devices like NSLU to be setup w/o code changes and will also be used for forthcoming support for more Avila boards.
Reviewed by: imp MFC after 1 week
|
177461 |
20-Mar-2008 |
sam |
add usb devices and more wlan stuff now that usb is functional
MFC after: 1 month
|
177456 |
20-Mar-2008 |
sam |
map device 5; the optional USB controller on Gateworks 2348 boards shows up here instead of the minipci slot at J4
Reviewed by: cognet, imp MFC after: 1 week
|
177325 |
17-Mar-2008 |
jhb |
Simplify the interrupt code a bit: - Always include the ie_disable and ie_eoi methods in 'struct intr_event' and collapse down to one intr_event_create() routine. The disable and eoi hooks simply aren't used currently in the !INTR_FILTER case. - Expand 'disab' to 'disable' in a few places. - Use function casts for arm and i386:intr_eoi_src() instead of wrapper routines since to trim one extra indirection.
Compiled on: {arm,amd64,i386,ia64,ppc,sparc64} x {FILTER, !FILTER} Tested on: {amd64,i386} x {FILTER, !FILTER}
|
177253 |
16-Mar-2008 |
rwatson |
In keeping with style(9)'s recommendations on macros, use a ';' after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr.
MFC after: 1 month Discussed with: imp, rink
|
177181 |
14-Mar-2008 |
jhb |
Add preliminary support for binding interrupts to CPUs: - Add a new intr_event method ie_assign_cpu() that is invoked when the MI code wishes to bind an interrupt source to an individual CPU. The MD code may reject the binding with an error. If an assign_cpu function is not provided, then the kernel assumes the platform does not support binding interrupts to CPUs and fails all requests to do so. - Bind ithreads to CPUs on their next execution loop once an interrupt event is bound to a CPU. Only shared ithreads are bound. We currently leave private ithreads for drivers using filters + ithreads in the INTR_FILTER case unbound. - A new intr_event_bind() routine is used to bind an interrupt event to a CPU. - Implement binding on amd64 and i386 by way of the existing pic_assign_cpu PIC method. - For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up an interrupt source and binds its interrupt event to the specified CPU. MI code can currently (ab)use this by doing:
intr_bind(rman_get_start(irq_res), cpu);
however, I plan to add a truly MI interface (probably a bus_bind_intr(9)) where the implementation in the x86 nexus(4) driver would end up calling intr_bind() internally.
Requested by: kmacy, gallatin, jeff Tested on: {amd64, i386} x {regular, INTR_FILTER}
|
177105 |
12-Mar-2008 |
raj |
Respect RF_SHAREABLE flag in ARM nexus_setup_intr()
Reviewed by: imp Approved by: cognet (mentor)
|
177103 |
12-Mar-2008 |
raj |
Improve ARM bus_dmamap_load_buffer() error handling.
Reviewed by: imp Approved by: cognet (mentor) Spotted by: Grzegorz Bernacki gjb AT semihalf DOT com
|
177091 |
12-Mar-2008 |
jeff |
Remove kernel support for M:N threading.
While the KSE project was quite successful in bringing threading to FreeBSD, the M:N approach taken by the kse library was never developed to its full potential. Backwards compatibility will be provided via libmap.conf for dynamically linked binaries and static binaries will be broken.
|
176886 |
06-Mar-2008 |
cognet |
MFi386: revision 1.6 date: 2004/08/21 18:50:34; author: alc; state: Exp; lines: +3 -1 Properly free the temporary sf_buf in uiomove_fromphys() if a copyin or copyout fails.
Obtained from: DragonFlyBSD
Spotted out by: Mark Tinguely MFC After: 3 days
|
176885 |
06-Mar-2008 |
cognet |
Remove unused pv_list_count from the vm_page, and pm_count from the struct pmap.
Submitted by: Mark Tinguely
|
176820 |
05-Mar-2008 |
kevlo |
Add rl(4) support
|
176759 |
03-Mar-2008 |
kevlo |
Convert to be a 2-clause bsd-only license.
Pointed out by: rwatson
|
176589 |
26-Feb-2008 |
rwatson |
Remove errant % in license comment.
MFC after: 3 days
|
176588 |
26-Feb-2008 |
rwatson |
On the ixp425, when we fail to initialize the memory rman instance, the panic message should read "memory", not "IRQ".
MFC after: 3 days
|
175983 |
05-Feb-2008 |
raj |
ARM locore cosmetics.
Approved by: cognet (mentor)
|
175982 |
05-Feb-2008 |
raj |
Improve ARM_TP_ADDRESS and RAS area.
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)
|
175840 |
31-Jan-2008 |
cognet |
Bring in the nice work from Mark Tinguely on arm pmap. The only downside is that it renames pmap_vac_me_harder() to pmap_fix_cache(). From Mark's email on -arm : pmap_get_vac_flags(), pmap_vac_me_harder(), pmap_vac_me_kpmap(), and pmap_vac_me_user() has been rewritten as pmap_fix_cache() to be more efficient in the kernel map case. I also removed the reference to the md.kro_mappings, md.krw_mappings, md.uro_mappings, and md.urw_mappings counts.
In pmap_clearbit(), we can also skip over tests and writeback/invalidations in the PVF_MOD and PVF_REF cases if those bits are not set in the pv_flag. PVF_WRITE will turn caching back on and remove the PV_MOD bit.
In pmap_nuke_pv(), the vm_page_flag_clear(pg, PG_WRITEABLE) has been moved to the pmap_fix_cache().
We can be more agressive in attempting to turn caching back on by calling pmap_fix_cache() at times that may be appropriate to turn cache on (a kernel mapping has been removed, a write has been removed or a read has been removed and we know the mapping does not have multiple write mappings to a page).
In pmap_remove_pages() the cpu_idcache_wbinv_all() is moved to happen before the page tables are NULLed because the caches are virtually indexed and virtually tagged.
In pmap_remove_all(), the pmap_remove_write(m) is added before the page tables are NULLed because the caches are virtually indexed and virtually tagged. This also removes the need for the caches fixing routine (whichever is being used pmap_vac_me_harder() or pmap_fix_cache()) to be called on any of these mappings.
In pmap_remove(), I simplified the cache cleaning process and removed extra TLB removals. Basically if more than PMAP_REMOVE_CLEAN_LIST_SIZE are removed, then just flush the entire cache.
|
175768 |
28-Jan-2008 |
ru |
Add a wrapper function that bound checks writes to the dump device.
|
175418 |
17-Jan-2008 |
jhb |
- Retire npe_defrag(), gem_defrag(), msk_defrag(), nfe_defrag(), and re_defrag() and use m_collapse() instead. - Replace a reference to ath_defrag() in a comment in if_wpi.c with m_collapse().
|
175397 |
17-Jan-2008 |
cognet |
Unbreak build by adding the missing parameter to pmap_enter().
|
175255 |
12-Jan-2008 |
cognet |
Back when I committed the arm port, I've been asked to move memcpy/memset/memcmp and friends from libkern/arm to arm/arm/support.S, and so I did, but in the process, I didn't add the appropriate copyrights. This is a major oversight from me, and I apology to the NetBSD people for it.
MFC After: 1 day
|
175120 |
07-Jan-2008 |
cognet |
Add a missing \n.
|
175067 |
03-Jan-2008 |
alc |
Add an access type parameter to pmap_enter(). It will be used to implement superpage promotion.
Correct a style error in kmem_malloc(): pmap_enter()'s last parameter is a Boolean.
|
175066 |
03-Jan-2008 |
imp |
Use correct function name in panic message
|
175064 |
03-Jan-2008 |
imp |
Modernize comment about diagnostic.
|
174938 |
27-Dec-2007 |
alc |
Add configuration knobs for the superpage reservation system. Initially, the reservation will only be enabled on amd64.
|
174898 |
25-Dec-2007 |
rwatson |
Add a new 'why' argument to kdb_enter(), and a set of constants to use for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run.
Assign approximate why values to all current consumers of the kdb_enter() interface.
|
174880 |
23-Dec-2007 |
stas |
- Fix a typo in comments.
MFC after: 1 week Approved by: cognet
|
174781 |
19-Dec-2007 |
imp |
Actually program the interrupt controller for priorities. As we support more AT91 platforms, we'll need to move this into some platform init routine.
|
174700 |
17-Dec-2007 |
kevlo |
Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL
Reviewed by: imp
|
174661 |
16-Dec-2007 |
stas |
- Don't return 0xffff if PHY id isn't equal 0. This allows PHYs with non-zero addresses to be used.
Approved by: cognet MFC after: 2 weeks
|
174540 |
11-Dec-2007 |
cognet |
There's no need to call pmap_vac_me_harder() in pmap_protect(), as it already happened in pmap_modify_pv().
Submitted by: Mark Tinguely <tinguely AT casselton DOT net>
|
174405 |
07-Dec-2007 |
jkoshy |
Add stubs to unbreak LINT.
|
174402 |
07-Dec-2007 |
cognet |
Fix style in previous commit.
Pointed out by: njl
|
174378 |
06-Dec-2007 |
cognet |
Erm, add a missing else, we do not want to increase the mapping counters for both kernel and userland when we create a pv for pmap_kernel.
Reported by: Mark Tinguely <tinguely AT casselton DOT net> MFC After: 3 days
|
174195 |
02-Dec-2007 |
rwatson |
Break out stack(9) from ddb(4):
- Introduce per-architecture stack_machdep.c to hold stack_save(9). - Introduce per-architecture machine/stack.h to capture any common definitions required between db_trace.c and stack_machdep.c. - Add new kernel option "options STACK"; we will build in stack(9) if it is defined, or also if "options DDB" is defined to provide compatibility with existing users of stack(9).
Add new stack_save_td(9) function, which allows the capture of a stacktrace of another thread rather than the current thread, which the existing stack_save(9) was limited to. It requires that the thread be neither swapped out nor running, which is the responsibility of the consumer to enforce.
Update stack(9) man page.
Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)
|
174181 |
02-Dec-2007 |
cognet |
Fix a potential bug in pmap : We used to allocate the domains 0-14 for userland, and leave the domain 15 for the kernel. Now supersections requires the use of domain 0, so we switched the kernel domain to 0, and use 1-15 for userland. How it's done currently, the kernel domain could be allocated for a userland process. So switch back to the previous way we did things, set the first available domain to 0, and just add 1 to get the real domain number in the struct pmap.
Reported by: Mark Tinguely <tinguely AT casselton DOT net> MFC After: 3 days
|
174176 |
02-Dec-2007 |
cognet |
Move the strongarm-specific files from conf/files.arm to sa11x0/files.sa11xO.
Submitted by: Rafal Jaworowski <raj AT semihalf DOT com>
|
174172 |
02-Dec-2007 |
cognet |
Cleanup : make nexus standard, as it is mandatory anyway. Garbage-collect unused nexus_io.c and nexus_io_asm.S
Submitted by: Rafal Jaworowski <raj AT semihalf DOT com>
|
174170 |
02-Dec-2007 |
cognet |
Close a race.
The RAS implementation would set the end address, then the start address. These were used by the kernel to restart a RAS sequence if it was interrupted. When the thread switching code ran, it would check these values and adjust the PC and clear them if it did.
However, there's a small flaw in this scheme. Thread T1, sets the end address and gets preempted. Thread T2 runs and also does a RAS operation. This resets end to zero. Thread T1 now runs again and sets start and then begins the RAS sequence, but is preempted before the RAS sequence executes its last instruction. The kernel code that would ordinarily restart the RAS sequence doesn't because the PC isn't between start and 0, so the PC isn't set to the start of the sequence. So when T1 is resumed again, it is at the wrong location for RAS to produce the correct results. This causes the wrong results for the atomic sequence.
The window for the first race is 3 instructions. The window for the second race is 5-10 instructions depending on the atomic operation. This makes this failure fairly rare and hard to reproduce.
Mutexs are implemented in libthr using atomic operations. When the above race would occur, a lock could get stuck locked, causing many downstream problems, as you might expect.
Also, make sure to reset the start and end address when doing a syscall, or a malicious process could set them before doing a syscall.
Reviewed by: imp, ups (thanks guys) Pointy hat to: cognet MFC After: 3 days
|
174058 |
28-Nov-2007 |
cognet |
Fixes for ARM9/ARM10 : Call uma_sel_align() there at well. Set CPU_CONTROL_VECRELOC if we're using the high vectors page.
Submitted by: Rafal Jaworowski <raj AT semihalf DOT com> MFC After: 1 week
|
174051 |
28-Nov-2007 |
cognet |
Correct the logic : we can just invalidate the cache lines, and not write-back them, only if PREWRITE is not set, and if the buffer is cache-line aligned.
MFC After: 1 week
|
173999 |
27-Nov-2007 |
cognet |
In atomic_fetchadd_32(), do not blindly increase the value of %3. It should just contain the value we want to add, as if we're interrupted between the add and the str, we will restart from the beginning. Just use a register we can scratch instead.
MFC After: 1 week
|
173988 |
27-Nov-2007 |
jhb |
Remove the 'needbounce' variable from the _bus_dmamap_load_buffer() routine. It is not needed as the existing tests for segment coalescing already handle bounced addresses and it prevents legal segment coalescing in certain edge cases.
MFC after: 1 week Reviewed by: scottl
|
173708 |
17-Nov-2007 |
alc |
Prevent the leakage of wired pages in the following circumstances: First, a file is mmap(2)ed and then mlock(2)ed. Later, it is truncated. Under "normal" circumstances, i.e., when the file is not mlock(2)ed, the pages beyond the EOF are unmapped and freed. However, when the file is mlock(2)ed, the pages beyond the EOF are unmapped but not freed because they have a non-zero wire count. This can be a mistake. Specifically, it is a mistake if the sole reason why the pages are wired is because of wired, managed mappings. Previously, unmapping the pages destroys these wired, managed mappings, but does not reduce the pages' wire count. Consequently, when the file is unmapped, the pages are not unwired because the wired mapping has been destroyed. Moreover, when the vm object is finally destroyed, the pages are leaked because they are still wired. The fix is to reduce the pages' wired count by the number of wired, managed mappings destroyed. To do this, I introduce a new pmap function pmap_page_wired_mappings() that returns the number of managed mappings to the given physical page that are wired, and I use this function in vm_object_page_remove().
Reviewed by: tegge MFC after: 6 weeks
|
173696 |
17-Nov-2007 |
cognet |
Add a kernel config file for the Hot-e HL200 (AT91RM92 based). Many thanks to John Nicholls from Thinklinx for sending sample hardware.
|
173615 |
14-Nov-2007 |
marcel |
o Rename cpu_thread_setup() to cpu_thread_alloc() to better communicate that it relates to (is called by) thread_alloc() o Add cpu_thread_free() which is called from thread_free() to counter-act cpu_thread_alloc().
i386: Have cpu_thread_free() call cpu_thread_clean() to preserve behaviour. ia64: Have cpu_thread_free() call mtx_destroy() for the mutex initialized in cpu_thread_alloc().
PR: ia64/118024
|
173600 |
14-Nov-2007 |
julian |
generally we are interested in what thread did something as opposed to what process. Since threads by default have teh name of the process unless over-written with more useful information, just print the thread name instead.
|
173442 |
08-Nov-2007 |
cognet |
Add entries for the L2 cache-related functions for armv5.
Spotted out by: Rafal Jaworowski
|
173361 |
05-Nov-2007 |
kib |
Fix for the panic("vm_thread_new: kstack allocation failed") and silent NULL pointer dereference in the i386 and sparc64 pmap_pinit() when the kmem_alloc_nofault() failed to allocate address space. Both functions now return error instead of panicing or dereferencing NULL.
As consequence, vmspace_exec() and vmspace_unshare() returns the errno int. struct vmspace arg was added to vm_forkproc() to avoid dealing with failed allocation when most of the fork1() job is already done.
The kernel stack for the thread is now set up in the thread_alloc(), that itself may return NULL. Also, allocation of the first process thread is performed in the fork1() to properly deal with stack allocation failure. proc_linkup() is separated into proc_linkup() called from fork1(), and proc_linkup0(), that is used to set up the kernel process (was known as swapper).
In collaboration with: Peter Holm Reviewed by: jhb
|
173336 |
04-Nov-2007 |
cognet |
Remove a staled comment, NPE-C should work fine.
Reviewed by: sam
|
173249 |
01-Nov-2007 |
kevlo |
__CPU_XSCALE_PXA2XX -> CPU_XSCALE_PXA2X0
|
173215 |
31-Oct-2007 |
kevlo |
Don't define get_cachetype() for CPU_ARM9E unless it's going to be used.
|
173155 |
29-Oct-2007 |
imp |
kill commented out line of code.
|
172993 |
25-Oct-2007 |
cognet |
Add an option to be able to override the value of the AT91 master clock frequency. It'd be better to be able to calculate it at runtime, but we need the information very early, to setup the uart.
|
172992 |
25-Oct-2007 |
cognet |
Move some KB920x-specific options into the KB920x file.
|
172989 |
25-Oct-2007 |
cognet |
Oooops, get the end of the memory right.
|
172945 |
24-Oct-2007 |
cognet |
KERNBASE should really be KERNVIRTADDR there too.
MFC after: 1 week
|
172944 |
24-Oct-2007 |
cognet |
In ate_get_mac(), try to get the mac address in the right order, at least in the same order as it's set in ate_set_mac. I remember a discussion about this on -arm, but apparently nothing was done. Warner, is this wrong ?
X-MFC After: proper review
|
172943 |
24-Oct-2007 |
cognet |
Handle the case where PHYSADDR != KERNPHYSADDR (ie we do not load the kernel at the beginning of the RAM).
MFC After: 1 week
|
172942 |
24-Oct-2007 |
cognet |
Correct a comment, this was not true anymore.
|
172739 |
18-Oct-2007 |
imp |
correct guard variable names.
|
172738 |
18-Oct-2007 |
imp |
Merge support from p4 (from NetBSD) for arm9e and arm10, arm11 cores. Not yet connected to the build, but reduces diffs to p4 repo.
Obtained from: NetBSD
|
172734 |
18-Oct-2007 |
imp |
Merge definitions for ARM9E, ARM10 and ARM11 processors from p4 (which got them from NetBSD).
|
172713 |
16-Oct-2007 |
cognet |
Use the direct mapping, if available, for pmap_zero_page_xscale() as well.
|
172614 |
13-Oct-2007 |
cognet |
Do not use __XSCALE__ to detect if pld/strd/ldrd is available, use _ARM_ARCH_5E instead.
MFC After: 3 days
|
172613 |
13-Oct-2007 |
cognet |
Define _ARM_ARCH_5E too, so that we know if pld/strd/ldrd are available.
MFC After: 3 days
|
172568 |
12-Oct-2007 |
kevlo |
Spelling fix for interupt -> interrupt
|
172394 |
30-Sep-2007 |
marius |
Make the PCI code aware of PCI domains (aka PCI segments) so we can support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled.
Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat)
|
172358 |
27-Sep-2007 |
cognet |
Ok I hope I got it right this time. After discussion with Sam, switch back to use firmware(9) instead of having the firmware in hex format. Put the binary firmware uuencoded into sys/contrib/dev/npe, and slap a LICENSE file, as found on the Intel website.
Approved by: re (blanket), mux (mentor) MFC After: 1 week
|
172357 |
27-Sep-2007 |
cognet |
Now that Intel changed the license for the NPE firmware, import it directly hexed into our tree, instead of requiring the user to download it.
Approved by: re (blanket) MFC after: 1 week
|
172356 |
27-Sep-2007 |
cognet |
Fix a comment to reflect the truth.
Spotted out by: Marius Nuennerich <marius.nuennerich AT gmx D0T de> Approved by: re (blanket)
|
172317 |
25-Sep-2007 |
alc |
Change the management of cached pages (PQ_CACHE) in two fundamental ways:
(1) Cached pages are no longer kept in the object's resident page splay tree and memq. Instead, they are kept in a separate per-object splay tree of cached pages. However, access to this new per-object splay tree is synchronized by the _free_ page queues lock, not to be confused with the heavily contended page queues lock. Consequently, a cached page can be reclaimed by vm_page_alloc(9) without acquiring the object's lock or the page queues lock.
This solves a problem independently reported by tegge@ and Isilon. Specifically, they observed the page daemon consuming a great deal of CPU time because of pages bouncing back and forth between the cache queue (PQ_CACHE) and the inactive queue (PQ_INACTIVE). The source of this problem turned out to be a deadlock avoidance strategy employed when selecting a cached page to reclaim in vm_page_select_cache(). However, the root cause was really that reclaiming a cached page required the acquisition of an object lock while the page queues lock was already held. Thus, this change addresses the problem at its root, by eliminating the need to acquire the object's lock.
Moreover, keeping cached pages in the object's primary splay tree and memq was, in effect, optimizing for the uncommon case. Cached pages are reclaimed far, far more often than they are reactivated. Instead, this change makes reclamation cheaper, especially in terms of synchronization overhead, and reactivation more expensive, because reactivated pages will have to be reentered into the object's primary splay tree and memq.
(2) Cached pages are now stored alongside free pages in the physical memory allocator's buddy queues, increasing the likelihood that large allocations of contiguous physical memory (i.e., superpages) will succeed.
Finally, as a result of this change long-standing restrictions on when and where a cached page can be reclaimed and returned by vm_page_alloc(9) are eliminated. Specifically, calls to vm_page_alloc(9) specifying VM_ALLOC_INTERRUPT can now reclaim and return a formerly cached page. Consequently, a call to malloc(9) specifying M_NOWAIT is less likely to fail.
Discussed with: many over the course of the summer, including jeff@, Justin Husted @ Isilon, peter@, tegge@ Tested by: an earlier version by kris@ Approved by: re (kensmith)
|
172300 |
22-Sep-2007 |
cognet |
Make sure we do not call _arm_bzero() or _arm_memcpy() if the size is not at least the minimum asked by the driver.
Approved by: re (blanket)
|
172299 |
22-Sep-2007 |
cognet |
Add various macros for the ADMA unit.
Approved by: re (blanket)
|
172297 |
22-Sep-2007 |
cognet |
Add a driver for the 7seg found on the CRB board, largely based on the IQ31244 version.
Approved by: re (blanket)
|
172296 |
22-Sep-2007 |
cognet |
Twist the RAS logic a bit to avoid branching.
MFC After: 1 week Approved by: re (blanket)
|
172245 |
19-Sep-2007 |
cognet |
Remove dead code.
Approved by: re (blanket) Beer from: jadawin
|
172196 |
16-Sep-2007 |
imp |
Kill bogus printf debugs.
Approved by: re@ (blanket)
|
172195 |
16-Sep-2007 |
imp |
Kill overly verbose messages about setting bus width.
Approved by: re@ (blanket)
|
172189 |
15-Sep-2007 |
alc |
It has been observed on the mailing lists that the different categories of pages don't sum to anywhere near the total number of pages on amd64. This is for the most part because uma_small_alloc() pages have never been counted as wired pages, like their kmem_malloc() brethren. They should be. This changes fixes that.
It is no longer necessary for the page queues lock to be held to free pages allocated by uma_small_alloc(). I removed the acquisition and release of the page queues lock from uma_small_free() on amd64 and ia64 weeks ago. This patch updates the other architectures that have uma_small_alloc() and uma_small_free().
Approved by: re (kensmith)
|
172152 |
12-Sep-2007 |
cognet |
It's probably time I learn C. Fix a few while (!uart_getreg() & SR1_TNF) when while (!(uart_getreg() & SR18TNF)) was really meant. This driver should die anyway, it's awful, and uart_ns8250 should be fine for the StrongArm 1110. I'll kill it later.
Submitted by: Mikhael Skvorts Approved by: re (blanket)
|
172104 |
09-Sep-2007 |
cognet |
In __bswap16_var(), make sure the 16 upper bits are cleared; while optimizing, gcc4 doesn't always do so.
Reported by: Nathan Whitehorn Approved by: re (blanket)
|
172046 |
04-Sep-2007 |
cognet |
There's no need to re-read PCIR_COMMAND once we set it.
Approved by: re (blanket)
|
171890 |
18-Aug-2007 |
cognet |
Just wbinv if both PREREAD and PREWRITE are set. In PREREAD, just invalidate the cache lines, and do not write back them, if the buffer is properly aligned.
Approved by: re (blanket)
|
171788 |
08-Aug-2007 |
cognet |
Ooops, we need to define TD_LOCK here.
Approved by: re (blanket) Pointy hat to: cognet
|
171781 |
07-Aug-2007 |
cognet |
Add cast to silent gcc warnings.
Approved by: re (blanket)
|
171780 |
07-Aug-2007 |
cognet |
Use the third argument of cpu_switch(), as done for i386/amd63, as it is required for ULE.
Approved by: re (blanket)
|
171674 |
31-Jul-2007 |
imp |
Add in all the USB devices and all the wireless goo. The KB9202 has only USB 1.1 speeds available, but this shouldn't hurt. Now that we have working usb support for this board, this is a natural followup.
Approved by: re (kensmith)
|
171673 |
31-Jul-2007 |
imp |
Make USB work on the KB9202{,A,B} boards. This has been in p4 for about 7 months. You must have JP6 in the 1-2 position to supply power to the USB devices, but I've used uftdi, uplcom and umass successfully. If you have it in 2-3, then nothing will show up. Also, if you have the FQPA packaging for the AT91RM9200 (like the KN9202 boards have), you will get the following message
uhub0: device problem (IOERROR), disabling port 2
due to a hardware erratum. It is safe to ignore as it is about pins that aren't brought out on the FQPA package and aren't proeprly terminated either. Alas, there's no register to read to tell the FQPA from the BGA versions.
Submitted by: Daan Vreeken Approved by: re (kensmith)
|
171672 |
31-Jul-2007 |
cognet |
MFppc: revision 1.66 date: 2007/07/31 06:23:26; author: marcel; state: Exp; lines: +2 -2 Fix backward compatibility of the "old" (i.e. FreeBSD6) lseek syscall. It was broken when a new lseek syscall was introduced. The problem is that we need to swap the 32-bit td_retval values for the __syscall indirect syscall when the actual syscall has a 32-bit return value. Hence, we need to exclude lseek(2). And this means the "old" lseek(2) as well -- which we didn't.
Based on a patch from: grehan@
Approved by: re (blanket)
|
171631 |
27-Jul-2007 |
cognet |
CRB config file.
Approved by: re (blanket)
|
171630 |
27-Jul-2007 |
cognet |
XScale core 3 definitions.
Approved by: re (blanket)
|
171629 |
27-Jul-2007 |
cognet |
Cleanup
Approved by: re (blanket)
|
171628 |
27-Jul-2007 |
cognet |
Do not define NIRQ, it is already defined in include/intr.h
Approved by: re (blanket)
|
171627 |
27-Jul-2007 |
cognet |
Share the timer and watchdog drivers with the i81342. It's the same, except it uses different registers.
Approved by: re (blanket)
|
171626 |
27-Jul-2007 |
cognet |
Add initial IOP342 support. Thanks to Intel for providing sample hardware.
Approved by: re (blanket)
|
171625 |
27-Jul-2007 |
cognet |
Say if the L2 cache is enabled or disabled as well.
Approved by: re (blanket)
|
171623 |
27-Jul-2007 |
cognet |
Handle supersections and L2 cache.
Approved by: re (blanket)
|
171622 |
27-Jul-2007 |
cognet |
Use supersection instead of standard sections to map the whole memory when available.
Approved by: re (blanket)
|
171621 |
27-Jul-2007 |
cognet |
Fix the cache mode description.
Approved by: re (blanket)
|
171620 |
27-Jul-2007 |
cognet |
Properly handle supersections. Make sure we cache entries in the L2 cache.
Approved by: re (blanket)
|
171619 |
27-Jul-2007 |
cognet |
Bring in two bandaids to get the elf trampoline to work again, until I find a proper solution. - Add a dummy entry point which just calls the C entry points, and try to make sure it's the first code in the binary. - Copy a bit more than func_end to try to copy the whole load_kernel() function. gcc4 puts code behind the func_end symbol.
Approved by: re (blanket)
|
171618 |
27-Jul-2007 |
cognet |
Add a new set of functions to handle L2 cache. Make them no-op for every CPU except Xscale core 3.
Approved by: re (blanket)
|
171617 |
27-Jul-2007 |
cognet |
Import xscale core 3 cache management functions.
Approved by: re (blanket)
|
171616 |
27-Jul-2007 |
cognet |
INTR_FILTER bits for arm
Approved by: re (blanket)
|
170827 |
16-Jun-2007 |
cognet |
The iop34x has 128 interrupts.
|
170582 |
11-Jun-2007 |
cognet |
Introduce pmap_kenter_supersection(), which maps 16MB super-sections into the kernel pmap. Document a bit more the behavior of the xscale core 3.
|
170574 |
11-Jun-2007 |
imp |
Fix a spacing nit.
|
170502 |
10-Jun-2007 |
cognet |
Initialize the dma tag's bounce_zone to NULL if we didn't allocate it.
|
170473 |
09-Jun-2007 |
marcel |
Add kdb_cpu_sync_icache(), intended to synchronize instruction caches with data caches after writing to memory. This typically is required to make breakpoints work on ia64 and powerpc. For those architectures the function is implemented.
|
170406 |
07-Jun-2007 |
cognet |
There's no nobounce_dmamap on arm.
|
170388 |
06-Jun-2007 |
jeff |
- PCPU_ADD is no longer spelled with LAZY_ in the middle.
Submitted by: attilio
|
170305 |
04-Jun-2007 |
jeff |
- Change comments and asserts to reflect the removal of the global scheduler lock.
Tested by: kris, current@ Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc. Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
|
170291 |
04-Jun-2007 |
attilio |
Rework the PCPU_* (MD) interface: - Rename PCPU_LAZY_INC into PCPU_INC - Add the PCPU_ADD interface which just does an add on the pcpu member given a specific value.
Note that for most architectures PCPU_INC and PCPU_ADD are not safe. This is a point that needs some discussions/work in the next days.
Reviewed by: alc, bde Approved by: jeff (mentor)
|
170286 |
04-Jun-2007 |
marcel |
Revert to the previous version where the return value of uart_getenv() is being ignored. It's optional and the lack of environment variable is not an error condition.
|
170277 |
04-Jun-2007 |
alc |
Add the machine-specific definitions for configuring the new physical memory allocator.
Approved by: re
|
170170 |
31-May-2007 |
attilio |
Revert VMCNT_* operations introduction. Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately.
Requested by: alc Approved by: jeff (mentor)
|
170162 |
31-May-2007 |
piso |
In some particular cases (like in pccard and pccbb), the real device handler is wrapped in a couple of functions - a filter wrapper and an ithread wrapper. In this case (and just in this case), the filter wrapper could ask the system to schedule the ithread and mask the interrupt source if the wrapped handler is composed of just an ithread handler: modify the "old" interrupt code to make it support this situation, while the "new" interrupt code is already ok.
Discussed with: jhb
|
170109 |
29-May-2007 |
jhay |
Remove the hardcoded IXP425_UART?_VBASE values in the uart_ixp425_probe() and uart_cpu_getdev(). Change uart_cpu_getdev() to use hints to find the console.
Reviewed by: marcel
|
170086 |
29-May-2007 |
yongari |
Honor maxsegsz of less than a page size in a DMA tag. Previously it used to return PAGE_SIZE without respect to restrictions of a DMA tag. This affected all of the busdma load functions that use _bus_dmamap_loader_buffer() as their back-end.
Reviewed by: scottl
|
170072 |
28-May-2007 |
alc |
Eliminate some unused definitions that came from NetBSD.
|
170069 |
28-May-2007 |
jhay |
We do not need to get the irq out of ivars in ixp425_setup_intr(). By this time they have already been set. In fact trying to set it here too breaks irqs for pci devices.
|
170068 |
28-May-2007 |
jhay |
Optimize a bit more, both the Avila and Pronghorn Metro boards work with GPIO_TYPE_EDG_RISING.
Reviewed by: sam
|
169954 |
24-May-2007 |
sam |
Search for a proper ucode image to use by incrementing the minor release number up to the max. This should eliminate the need to tweak the default imageid define for later releases that are found on the Intel web site.
MFC after: 1 month
|
169953 |
24-May-2007 |
sam |
o add hints for avila boards; brings back i2c devices lost when iicbus started using hints instead of wired down device enumeration o add usb commented out; will enable when support works
MFC after: 1 month
|
169952 |
24-May-2007 |
sam |
Move to hints for configuring numerous devices so we can eliminate various quirky code: uarts, led, cf/ide, ixpqmgr, npe are now specified with hints.
May want to put some of these devices back in the code and just use hints to override/specify configuration.
MFC after: 1 month
|
169950 |
24-May-2007 |
sam |
Don't muck with the internal state of a uart during probe, all we should setup is the class. This corrects an issue where enabling uart1 on the avila board caused uart0 to stop working during boot (no msgs generated by rc scripts were displayed).
Reviewed by: imp MFC after: 3 weeks
|
169947 |
24-May-2007 |
sam |
Fix interrupt setup; rev 1.3 switched the irq to GPIO_TYPE_ACT_LOW but this does not work on avila boards; special case them to use GPIO_TYPE_EDG_RISING.
MFC after: 3 weeks Submitted by: jhay
|
169900 |
23-May-2007 |
cognet |
Remove duplicate includes.
Submitted by: Cyril Nguyen Huu <cyril ci0 org>
|
169846 |
22-May-2007 |
kan |
Allow FreeBSD's native ELF image activators to execute shared libraries the same way it was enabled for Linux binares in linuxulator.
This allows binaries built with -pie. Many ports auto-detect -fPIE support in GCC 4.2 and build binaries FreeBSD was unable to run.
|
169768 |
19-May-2007 |
cognet |
Use __mcount() instead of _mcount() to reduce diffs with NetBSD.
|
169764 |
19-May-2007 |
cognet |
Constify to please gcc 4.2.
|
169763 |
19-May-2007 |
cognet |
Do not try to inline pmap_kremove(), as it's exported.
|
169761 |
19-May-2007 |
cognet |
Do not try to inline bus_dmamap_sync_buf(), gcc 4.2 doesn't want to do so because it uses alloca(). Initialize lastaddr in bus_dmamap_load_uio().
|
169756 |
19-May-2007 |
cognet |
Switch the kernel's pmap domain from 15 to 0. This should be a no-op, and this is needed for xscale core 3 supersections support, as they are always part of the domain 0
|
169667 |
18-May-2007 |
jeff |
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating vmcnts. This can be used to abstract away pcpu details but also changes to use atomics for all counters now. This means sched lock is no longer responsible for protecting counts in the switch routines.
Contributed by: Attilio Rao <attilio@FreeBSD.org>
|
169291 |
05-May-2007 |
alc |
Define every architecture as either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE depending on whether the physical address space is densely or sparsely populated with memory. The effect of this definition is to determine which of two implementations of vm_page_array and PHYS_TO_VM_PAGE() is used. The legacy implementation is obtained by defining VM_PHYSSEG_DENSE, and a new implementation that trades off time for space is obtained by defining VM_PHYSSEG_SPARSE. For now, all architectures except for ia64 and sparc64 define VM_PHYSSEG_DENSE. Defining VM_PHYSSEG_SPARSE on ia64 allows the entirety of my Itanium 2's memory to be used. Previously, only the first 1 GB could be used. Defining VM_PHYSSEG_SPARSE on sparc64 allows USIIIi-based systems to boot without crashing.
This change is a combination of Nathan Whitehorn's patch and my own work in perforce.
Discussed with: kmacy, marius, Nathan Whitehorn PR: 112194
|
169230 |
03-May-2007 |
kevlo |
Remove sa1_cache_clean_addr. It isn't needed.
|
168281 |
02-Apr-2007 |
marcel |
Don't expose the uart_ops structure directly, but instead have it obtained through the uart_class structure. This allows us to declare the uart_class structure as weak and as such allows us to reference it even when it's not compiled-in. It also allows is to get the uart_ops structure by name, which makes it possible to implement the dt tag handling in uart_getenv(). The side-effect of all this is that we're using the uart_class structure more consistently which means that we now also have access to the size of the bus space block needed by the hardware when we map the bus space, eliminating any hardcoding.
|
167950 |
27-Mar-2007 |
n_hibma |
Revisit the watchdogs: Resetting the error to EINVAL after failing to set the watchdog might hide the succesful arming of an earlier one. Accept that on failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is returned instead of the more appropriate EINVAL.
MFC after: 3 days
|
167935 |
27-Mar-2007 |
kevlo |
Don't map mini-data cache page since ARM920T doesn't have it.
|
167858 |
23-Mar-2007 |
imp |
Default to booting off the SD card. It is more useful, and a full FreeBSD/arm installworld install is only 170MB. The smallest SD card I could find at the store today was 512MB (and it was only $10 after rebate), with a 2GB card for as low as $25.00...
Now that the IIC stuff has been sorted out, include that as well. Include hints for the icee 16kb 16-bit i2c device. It should include info about the temperature sensor as well, but that driver isn't quite ready.
Add bpf for dhclient happiness.
MFC After: 1 week
|
167852 |
23-Mar-2007 |
imp |
MFp4: A bunch of patches from myself and Tisco to improve the robustness of IIC transactions when parts aren't present. This also removes a bunch of debug. This also moves this driver to 7-1 addressing rather than 6-0 addressing, which is more inline with all the other iic drivers in the tree. I've tested this for about a million years on the systems at work.
|
167761 |
21-Mar-2007 |
kevlo |
Fix a comment
|
167752 |
21-Mar-2007 |
kevlo |
Remove __P
|
167570 |
14-Mar-2007 |
jhay |
Map the second CS of the compact flash too. This allow us access to the alternate status and the control registers. Remove the local version of ata_reset.
Add support for the ADI Pronghorn Metro boards. They use CS3 and CS4 instead of Avila's CS1 and CS2.
|
167565 |
14-Mar-2007 |
jhay |
Map the second CS of the compact flash too. This allow us access to the alternate status and the control registers. Remove the local version of ata_reset.
Add support for the ADI Pronghorn Metro boards. They use CS3 and CS4 instead of Avila's CS1 and CS2.
OKed by: sam, cognet
|
167429 |
11-Mar-2007 |
alc |
Push down the implementation of PCPU_LAZY_INC() into the machine-dependent header file. Reimplement PCPU_LAZY_INC() on amd64 and i386 making it atomic with respect to interrupts.
Reviewed by: bde, jhb
|
167263 |
06-Mar-2007 |
piso |
Wrap ixppcib_setup_intr() at 80.
|
167262 |
06-Mar-2007 |
piso |
Wrap a BUS_SETUP_INTR() line at 80.
|
167261 |
06-Mar-2007 |
piso |
o substitute INTR_FAST with FILTER in a panic message. o wrap a BUS_SETUP_INTR() line at 80.
|
167255 |
06-Mar-2007 |
kevlo |
Reverse this change. malloc() with M_WAITOK never fails.
Noted by: cognet, brian and thompsa
|
167219 |
05-Mar-2007 |
kevlo |
Check for malloc return value
|
167135 |
01-Mar-2007 |
piso |
Update bus_setup_intr().
Pointed by: Krassimir Slavchev
|
167082 |
27-Feb-2007 |
jhb |
Use tsleep() rather than msleep() with a NULL mtx.
|
167069 |
27-Feb-2007 |
piso |
Correct return code (int) for at91_rtc_intr() prototype.
Approved by: cognet
|
167009 |
26-Feb-2007 |
kevlo |
Remove unused header file <machine/katelib.h>
|
167004 |
26-Feb-2007 |
cognet |
Define FLASHADDR and LOADERRAMADDR for the Avila, so that we can boot a kernel from the onboard flash.
|
167003 |
26-Feb-2007 |
cognet |
Erm we can't change the value of arm_memcpy if we're running from flash. Instead, make memcpy() check if we're running from flash, and avoid using arm_memcpy if we're doing so.
|
166996 |
25-Feb-2007 |
cognet |
Update for the new prototype of bus_setup_intr().
|
166974 |
25-Feb-2007 |
piso |
Fix attach of at91_pio() after bus_setup_intr() modification.
Reported and tested by: Krassimir Slavchev
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many Approved by: re@
|
166820 |
19-Feb-2007 |
cognet |
Add two new options, FLASHADDR, which defines the address the flash is mapped at, and LOADERRAMADDR, the address at which the loader maps the ram at at the time the kernel is booted. They are used to detect if the kernel is booted from the onboard flash. Define those for the IQ31244
|
166819 |
19-Feb-2007 |
cognet |
Teach the kernel and the ELF trampoline how to boot from onboard flash.
|
166818 |
19-Feb-2007 |
cognet |
There's no such thing as a GENERIC kernel on arm.
Spotted out by: csjp MFC After: 3 days
|
166756 |
15-Feb-2007 |
luigi |
Cleanup and document the implementation of firmware(9) based on a version that i posted earlier on the -current mailing list, and subsequent feedback received.
The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level).
In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer;
- internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly.
The diffs are large, but the code is really straightforward now (i hope).
Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past.
Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice.
MFC after: 1 week
|
166697 |
14-Feb-2007 |
kevlo |
Add KTR tracing
|
166695 |
14-Feb-2007 |
kevlo |
style(9) cleanup.
|
166694 |
14-Feb-2007 |
kevlo |
In sendsig:
- Add sigacts locking. - Add a mutex to struct sigacts that protects all the members of the struct. - Create and log events via the CTRx macros.
Reviewed by: cognet
|
166688 |
13-Feb-2007 |
cognet |
Make sure the address is valid before mapping it.
MFC after: 1 week
|
166686 |
13-Feb-2007 |
kevlo |
Fix typo: MacPPC -> ARM
|
166655 |
11-Feb-2007 |
cognet |
Use uma_set_align().
|
166625 |
10-Feb-2007 |
mlaier |
Fix small altq related copy and paste error.
|
166573 |
08-Feb-2007 |
imp |
Add sanity check to make sure that the MAC address isn't all 0's. Bad boot loaders can do this, and this leads to all kinds of ill effects downstream. Also, minor formatting nits.
|
166551 |
07-Feb-2007 |
marcel |
Evolve the ctlreq interface added to geom_gpt into a generic partitioning class that supports multiple schemes. Current schemes supported are APM (Apple Partition Map) and GPT. Change all GEOM_APPLE anf GEOM_GPT options into GEOM_PART_APM and GEOM_PART_GPT (resp).
The ctlreq interface supports verbs to create and destroy partitioning schemes on a disk; to add, delete and modify partitions; and to commit or undo changes made.
|
166532 |
06-Feb-2007 |
imp |
at91_twi depends on the iicbus module to satisfy its symbols when loaded, so make that explicit. Works for the monolithic kernel case, won't work for the kldload case.
|
166510 |
05-Feb-2007 |
kevlo |
<sys/sx.h> is unneeded.
|
166454 |
03-Feb-2007 |
kevlo |
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again.
Approved by: imp, cognet
|
166414 |
02-Feb-2007 |
kevlo |
Remove a bogus i = 0
Approved by: cognet
|
166339 |
30-Jan-2007 |
kevlo |
Use our own timer that piggybacks on npe_tick() callout instead of if_watchdog/if_timer interface.
Approved by: sam, cognet
|
166248 |
26-Jan-2007 |
kevlo |
Fix comments.
Approved by: cognet
|
166100 |
18-Jan-2007 |
marius |
- Add a uart_rxready() and corresponding device-specific implementations that can be used to check whether receive data is ready, i.e. whether the subsequent call of uart_poll() should return a char, and unlike uart_poll() doesn't actually receive data. - Remove the device-specific implementations of uart_poll() and implement uart_poll() in terms of uart_getc() and the newly added uart_rxready() in order to minimize code duplication. - In sunkbd(4) take advantage of uart_rxready() and use it to implement the polled mode part of sunkbd_check() so we don't need to buffer a potentially read char in the softc. - Fix some mis-indentation in sunkbd_read_char().
Discussed with: marcel
|
166064 |
17-Jan-2007 |
cognet |
Create bus dma tags for both the PCI bus and the IXP425 root bus. Set the PCI bus' one as the default one, and explicitely use the other one for non-PCI devices. This is needed because the PCI bus can only address 64MB of RAM, while some IXP425 boards have 128MB or more, and most of the PCI drivers do not bother providing the parent dma tag.
|
166063 |
17-Jan-2007 |
cognet |
- Add bounce pages for arm, largely based on the i386 implementation. - Add a default parent dma tag, similar to what has been done for sparc64. - Before invalidating the dcache in POSTREAD, save the bits which are in the same cachelines than our buffers, but not part of it, and restore them after the invalidation.
|
165799 |
05-Jan-2007 |
ticso |
Hints are handled differently on -current Don't include hints.at91rm9200 for now
|
165787 |
05-Jan-2007 |
ticso |
MFp4: Use the next possible value for hz instead of defaulting to 128 Update tick value after modifying hz.
|
165786 |
05-Jan-2007 |
ticso |
MFp4: Add missing atomic functions Based on a patch by: des
|
165784 |
05-Jan-2007 |
ticso |
MFp4: add BWCT kernel configuration
|
165783 |
05-Jan-2007 |
ticso |
MFp4: Make at91_rtc optional to allow other RTC choices
|
165781 |
05-Jan-2007 |
ticso |
MFp4: Read access require PDC to be setup first otherwise we might get overrun errors. Write access however need cmd first, so keep the existing order for them.
|
165780 |
05-Jan-2007 |
ticso |
MFp4: BWCT boards are using an 16MHz xtal
|
165779 |
05-Jan-2007 |
ticso |
MFp4: Add VLAN_MTU support
|
165778 |
05-Jan-2007 |
ticso |
MFp4: fix a race in transmit buffer handling
|
165713 |
01-Jan-2007 |
imp |
MFp4: Fix bit name for SPI SR register
|
165712 |
01-Jan-2007 |
imp |
MFp4: Remove watchdog timeout that appears to be unused.
|
165711 |
01-Jan-2007 |
imp |
Merge from FreeBSD-tsf-6 by way of p4: correct values for PIO registers
submitted by: patrick schweiger
|
165260 |
15-Dec-2006 |
n_hibma |
Align the interfaces for the various watchdogs and make the interface behave as expected.
Also: - Return an error if WD_PASSIVE is passed in to the ioctl as only WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an explanation of the difference between WD_ACTIVE and WD_PASSIVE. - Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've lost your sense of humor, than don't add a define.
Specific changes:
i80321_wdog.c Don't roll your own passive watchdog tickle as this would defeat the purpose of an active (userland) watchdog tickle.
ichwd.c / ipmi.c: WD_ACTIVE means active patting of the watchdog by a userland process, not whether the watchdog is active. See sys/watchdog.h.
kern_clock.c: (software watchdog) Remove a check for WD_ACTIVE as this does not make sense here. This reverts r1.181.
|
164970 |
07-Dec-2006 |
sam |
Handle a missing NPE firmware file better; if it's missing print a (somewhat) meaningful message and terminate the build. It'd be nice to print a proper URL from which to fetch the file but that seems problematic. Leave a suggested starting point in this file (TBD: add it to the man page).
Submitted by: ru
|
164969 |
07-Dec-2006 |
cognet |
Unbreak build for Skyeye: do not attempt to do any DMA, as Skyeye doesn't emulate it.
Reported by: ru
|
164936 |
06-Dec-2006 |
julian |
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it.
Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable.
The ULE scheduler compiles again but I have no idea if it works.
The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit.
Tested by David Xu, and Dan Eischen using libthr and libpthread.
|
164874 |
04-Dec-2006 |
cognet |
Do not forget to call pmap_free_l2_bucket() in pmap_remove_pages(). This can fix the pmap-related panics reported on arm.
MFC After: 3 days
|
164824 |
02-Dec-2006 |
cognet |
Provide stream operations.
|
164790 |
01-Dec-2006 |
cognet |
We can have no PV entry here if the previous mapping was unmanaged, and the new one is unmanaged too, so update the KASSERT to reflect this.
|
164779 |
30-Nov-2006 |
cognet |
In pmap_ts_referenced(), don't attempt to do anything if the page is fictitious, and just return 0.
|
164778 |
30-Nov-2006 |
cognet |
First bits of Xscale core 3 support (the VM bits are far from being optimal yet).
|
164777 |
30-Nov-2006 |
cognet |
Introduce CPU_XSCALE_CORE3, as XScale Core 3 is significally different than regular Xscale (it has no mini data cache, has armv6-style 16MB supersections, and can address 36bits). Define it for i81342.
|
164763 |
30-Nov-2006 |
kevlo |
Better i2c bit definitions.
Approved by: cognet
|
164760 |
30-Nov-2006 |
jb |
Turn console printf buffering into a kernel option and only on by default for sun4v where it is absolutely required.
This change moves the buffer from struct pcpu to the stack to avoid using the critical section which created a LOR in a couple of cases due to interaction with the tty code and kqueue. The LOR can't be fixed with the critical section and the pcpu buffer can't be used without the critical section.
Putting the buffer on the stack was my initial solution, but it was pointed out that the stress on the stack might cause problems depending on the call path. We don't have a way of creating tests for those possible cases, so it's best to leave this as an option for the time being. In time we may get enough data to enable this option more generally.
|
164745 |
29-Nov-2006 |
imp |
MFp4: formatting nit
|
164744 |
29-Nov-2006 |
imp |
Make this work a lot better: Remove a lot of older cruft not needed. Improve ISR support, but it is still unused since polling is faster Properly initalize the speed register to get 90kb/s, not 400b/s. Try to catch NACK Allow 0 length read transfers to generate start/top pairs.
|
164741 |
29-Nov-2006 |
imp |
MFp4: correct data counts so that we clock enough data for the spi transaction. This allows complete spi transactions to happen.
|
164508 |
22-Nov-2006 |
kevlo |
Bring in status led support for /dev/led/gpioled on Avila.
Approved by: cognet
|
164503 |
22-Nov-2006 |
imp |
MFp4: Make it work :-) o Don't delay when checking the done bits. There's no gain other than a small performance hit. o calculate the clock divisors better (things are still way slow, so maybe there's more here?) o don't always fail reset. Always succeed instead. o fix inverted logic around at91_twi_wait() return value o remove debug code o remove unneeded, unworking junk
|
164440 |
20-Nov-2006 |
kevlo |
Match bus space unmap prototype.
Approved by: cognet
|
164432 |
20-Nov-2006 |
imp |
MFp4: Tweak descriptions in preparation for porting to other members of the AT91 arm9 family.
|
164428 |
19-Nov-2006 |
sam |
config for Gateworks Avila board booting with NFS-mounted root on npe0
Reviewed by: cognet, imp MFC after: 1 month
|
164426 |
19-Nov-2006 |
sam |
Gateworks Avila board support: o ixp425 support o NPE network driver (requires Intel microcode) o h/w qmgr support o True IDE compact flash over expansion bus o pci (ath and hifn795x parts tested) o xscale watchdog timer o ds1672 RTC on i2c bus o ad7418 voltage + temp monitoring on i2c bus o uart
Work done together with cognet, kevlo, and jmg. Parts of the ixp425 support obtaine/derived from netbsd.
Reviewed by: cognet, imp MFC after: 1 month
|
164425 |
19-Nov-2006 |
sam |
change bus space unmap protoype
Reviewed by: cognet, imp MFC After: 1 month
|
164424 |
19-Nov-2006 |
sam |
correct bus space unmap prototype
Reviewed by: cognet, imp MFC after: 1 month
|
164423 |
19-Nov-2006 |
sam |
elaborate on stepping names; add intel terminology to help people cross-referencing intel docs
Reviewed by: imp, cognet MFC after: 1 month
|
164355 |
17-Nov-2006 |
cognet |
Erm we really want to mask all interrupts in the range, just not the first one.
Submitted by: ru
|
164351 |
17-Nov-2006 |
kevlo |
Compile -- remove an unused global variable avail_end.
Approved by: cognet
|
164250 |
13-Nov-2006 |
ru |
Fix a comment.
|
164229 |
12-Nov-2006 |
alc |
Make pmap_enter() responsible for setting PG_WRITEABLE instead of its caller. (As a beneficial side-effect, a high-contention acquisition of the page queues lock in vm_fault() is eliminated.)
|
164198 |
11-Nov-2006 |
alc |
Eliminate unused global variables.
|
164090 |
08-Nov-2006 |
alc |
MFamd64/ia64/i386/sun4v Use cnt.v_page_count, the actual count of available physical pages, instead of vm_page_array_size to compute the maximum number of pv entries.
|
164087 |
08-Nov-2006 |
cognet |
Increate cnt.v_intr on interrupt.
|
164080 |
07-Nov-2006 |
cognet |
Identify the xscale 81342.
|
164079 |
07-Nov-2006 |
cognet |
In the ARM_USE_SMALL_ALLOC case, vm_page_t may have an address < KERNBASE, so adjust the KASSERT to reflect this.
|
164059 |
07-Nov-2006 |
cognet |
Add atomic_cmpset_acq_32.
|
163937 |
03-Nov-2006 |
imp |
MFp4: o Fix the packet statistics o Make sure we set the FD bit when in full duplex o Improve TX side efficency by eliminating a data copy for unfragmented mbufs (the hardware can't do s/g). o Minor busdma pedantry o better comments in some places, more XXX in others o Minor style nits.
This solves a problem I was seeing where I'd get no ethernet when not booting with a NFS root. Well, unless I unplugged the cable and plugged it back in first so I'd get the same up down up messages I get for NFS root...
Thanks to sam and scottl for suggestions on making this driver more efficient through better use of approrpiate APIs.
|
163871 |
01-Nov-2006 |
cognet |
Do not include both <sys/types.h> and <sys/param.h>, it is a style bug as sys/types.h is included in sys/param.h, so instead just move the #include <sys/param.h> before the headers that need it.
Spotted out by: bde
|
163858 |
01-Nov-2006 |
jb |
Add a cnputs() function to write a string to the console with a lock to prevent interspersed strings written from different CPUs at the same time.
To avoid putting a buffer on the stack or having to malloc one, space is incorporated in the per-cpu structure. The buffer size if 128 bytes; chosen because it's the next power of 2 size up from 80 characters.
String writes to the console are buffered up the end of the line or until the buffer fills. Then the buffer is flushed to all console devices.
Existing low level console output via cnputc() is unaffected by this change. ithread calls to log() are also unaffected to avoid blocking those threads.
A minor change to the behaviour in a panic situation is that console output will still be buffered, but won't be written to a tty as before. This should prevent interspersed panic output as a number of CPUs panic before we end up single threaded running ddb.
Reviewed by: scottl, jhb MFC after: 2 weeks
|
163810 |
30-Oct-2006 |
cognet |
Include <sys/types.h>, to get definition for uint32_t.
Submitted by: David Sharp
|
163711 |
26-Oct-2006 |
jb |
Remove the KSE option now that it's in DEFAULTS on these arches/machines.
The 'nooption' kernel config entry has to be used to turn KSE off now. This isn't my preferred way of dealing with this, but I'll defer to scottl's experience with the io/mem kernel option change and the grief experienced over that.
Submitted by: scottl@
|
163709 |
26-Oct-2006 |
jb |
Make KSE a kernel option, turned on by default in all GENERIC kernel configs except sun4v (which doesn't process signals properly with KSE).
Reviewed by: davidxu@
|
163694 |
25-Oct-2006 |
cognet |
Let allow to teardown multiple irqs as well.
|
163693 |
25-Oct-2006 |
cognet |
Setup multiple interrupts if needed.
|
163681 |
25-Oct-2006 |
imp |
MFp4: Move the parameters that are basically dictated by the AT91 organization to that file.
|
163680 |
25-Oct-2006 |
imp |
MFp4: Status register bits
|
163674 |
24-Oct-2006 |
cognet |
Ooops, dump_avail[i] can be 0 if the RAM starts at 0x00000000, so check that dump_avail[i + 1] is == 0 as a stop condition instead. MFC after: 3 days
|
163553 |
21-Oct-2006 |
kevlo |
style(9) cleanup.
Approved by: cognet
|
163551 |
21-Oct-2006 |
cognet |
Ok I am an idiot. On 32 bits big-endian systems, it is needed to handle the syscalls using __syscall but only actually returning 32bits, such as mmap(), specially : they set the return value in td->td_retval[0], but the userland functions will expect this in r1, and not in r0 as it is normally done, as it is the LSB. So add a special case for all these syscalls (all except lseek, which truly returns 64bits).
Many thanks to Peter Grehan for his patience while explaining me the issue.
|
163547 |
20-Oct-2006 |
cognet |
Use __QUAD_LOWWORD for __syscall, to always use the good word, whatever the endianness is.
|
163537 |
20-Oct-2006 |
cognet |
There's no need to special-case lseek for arm/big-endian.
|
163526 |
20-Oct-2006 |
imp |
MFp4: Working SPI driver.
|
163525 |
20-Oct-2006 |
imp |
Commit WIP SSC driver, more work is needed here, but it configures things OK.
|
163524 |
20-Oct-2006 |
imp |
More register definitions.
|
163523 |
20-Oct-2006 |
imp |
Progress commit for getting TWI working
|
163522 |
20-Oct-2006 |
imp |
Add sysctl to export current state of rmii vs mii configuraiton. Fix a typo in resource allocation.
|
163521 |
20-Oct-2006 |
imp |
Add configuration of the SSC lines for second SSC.
|
163517 |
20-Oct-2006 |
imp |
MMC/SD bridge driver (host adapter) for AT91RM9200's MCI interface. This interface also appears in the AT91SAM9260 and '61 as well as the AVR32 based micros from Atmel. We don't yet support write protect or hot-swap in this bridge driver.
|
163449 |
17-Oct-2006 |
davidxu |
o Add keyword volatile for user mutex owner field. o Fix type consistent problem by using type long for old umtx and wait channel. o Rename casuptr to casuword.
|
163016 |
04-Oct-2006 |
jb |
PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security: Move the relocation definitions to the common elf header so that DTrace can use them on one architecture targeted to a different one.
Add the additional ELF types defines in Sun's "Linker and Libraries" manual.
|
162954 |
02-Oct-2006 |
phk |
First part of a little cleanup in the calendar/timezone/RTC handling.
Move relevant variables to <sys/clock.h> and fix #includes as necessary.
Use libkern's much more time- & spamce-efficient BCD routines.
|
162487 |
21-Sep-2006 |
kan |
Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes the former and __builtin_va_start was present in all GCC version 3.1 and later.
|
162130 |
07-Sep-2006 |
imp |
MFp4: first cut at getting I2C transfers working (generically). I'm unsure if this driver correctly implements all the start/stop junk right (but it did or didn't before I made this commit).
|
162129 |
07-Sep-2006 |
imp |
MFp4: berndt pointed me at an errata that shows that the stat register offsets were originally documented incorrectly. This fixes that. It shouldn't affect anything other than error stat reporting.
|
161735 |
30-Aug-2006 |
cognet |
Remove dead code, already defined in sys/cdef.h
Spotted out by: bde
|
161734 |
30-Aug-2006 |
cognet |
Use ENTRY_NP for alternate entry points instead of ENTRY to avoid calling mcount twice when profiling.
Spotted out by: bde
|
161727 |
29-Aug-2006 |
cognet |
Use ENTRY instead of ALTENTRY, it doesn't exist on arm.
|
161705 |
28-Aug-2006 |
cognet |
Ooops m->md.pvh_attrs can't be used to know if the page is writeable, because it only remembers if the page is modified or referenced.
Bad review from: cognet
|
161704 |
28-Aug-2006 |
cognet |
Relocate the vector page for AT91, to work around bugs with the LOW_VECTOR code.
|
161675 |
28-Aug-2006 |
davidxu |
Implement casuword32, compare and set user integer, thank Marcel Moolenarr who wrote the IA64 version of casuword32.
|
161670 |
27-Aug-2006 |
cognet |
Fill in dump_avail[] before pmap_boostrap() is called so that ARM_USE_SMALL_ALLOC work.
|
161628 |
25-Aug-2006 |
alc |
Eliminate unused definitions. (They came from NetBSD.)
Discussed with: cognet, grehan, marcel
|
161618 |
25-Aug-2006 |
cognet |
Explicitely set the "allocbuffer" field to NULL when creating a new dmamap.
|
161617 |
25-Aug-2006 |
cognet |
Do not create dma maps with bus_dmamap_create, as we call bus_dmamem_alloc later which will overwrite the value, leading to a small memory leak.
|
161592 |
24-Aug-2006 |
cognet |
Finally bring it support for the i80219 XScale processor.
Submitted by: Max M. Boyarov <m.boyarov bsd by>
|
161591 |
24-Aug-2006 |
cognet |
Use ELFDATA2MSB if we're building big endian.
Noticed by: Oleksandr Tymoshenko <gonzo freebsd org>
|
161334 |
15-Aug-2006 |
imp |
add comment about why we include opt_global.h
|
161323 |
15-Aug-2006 |
cognet |
Ooops we need to include <machine/vmparam.h> to get the definition of KERNBASE and VM_MAXUSER_ADDRESS. Remove the useless include of opt_global.h, as noticed by netchild@ (the one in arm/elf_trampoline.c is legit, because this file is compiled outside the kernel, and doesn't use the standard CFLAGS).
|
161138 |
09-Aug-2006 |
imp |
Hook into the watchdog device, if present. Also, turn off the watchdog timer stuff when we boot because the boot blocks are turning it on...
|
161105 |
08-Aug-2006 |
cognet |
Rewrite ARM_USE_SMALL_ALLOC so that instead of the current behavior, it maps whole the physical memory, cached, using 1MB section mappings. This reduces the address space available for user processes a bit, but given the amount of memory a typical arm machine has, it is not (yet) a big issue. It then provides a uma_small_alloc() that works as it does for architectures which have a direct mapping.
|
161063 |
08-Aug-2006 |
kevlo |
Remove a bogus i = 0. Approved by: cognet
|
160889 |
01-Aug-2006 |
alc |
Complete the transition from pmap_page_protect() to pmap_remove_write(). Originally, I had adopted sparc64's name, pmap_clear_write(), for the function that is now pmap_remove_write(). However, this function is more like pmap_remove_all() than like pmap_clear_modify() or pmap_clear_reference(), hence, the name change.
The higher-level rationale behind this change is described in src/sys/amd64/amd64/pmap.c revision 1.567. The short version is that I'm trying to clean up and fix our support for execute access.
Reviewed by: marcel@ (ia64)
|
160801 |
28-Jul-2006 |
jhb |
Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg is now back to just being an argument count.
|
160798 |
28-Jul-2006 |
jhb |
Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used to mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
|
160773 |
27-Jul-2006 |
jhb |
Unify the checking for lock misbehavior in the various syscall() implementations and adjust some of the checks while I'm here: - Add a new check to make sure we don't return from a syscall in a critical section. - Add a new explicit check before userret() to make sure we don't return with any locks held. The advantage here is that we can include the syscall number and name in syscall() whereas that info is not available in userret(). - Drop the mtx_assert()'s of sched_lock and Giant. They are replaced by the more general checks just added.
MFC after: 2 weeks
|
160740 |
27-Jul-2006 |
cognet |
Define BYTE_MSF if we're compiling a big endian kernel, so that DDB can correctly disassemble instructions on big endian.
|
160683 |
25-Jul-2006 |
cognet |
Use virtual_avail instead of freemempos as the starting point of the available physical memory, as the vm uses the memory between freemempos and virtual_avail.
MFC After: 3 days
|
160655 |
25-Jul-2006 |
kevlo |
Cleanup. Approved by: cognet
|
160537 |
20-Jul-2006 |
alc |
Implement pmap_clear_write().
Discussed with: cognet@
|
160533 |
20-Jul-2006 |
cognet |
Fix ALT_BREAK_TO_DEBUGGER on the AT91 : The core uart code expects the receive method to actually puts the characters read into its buffers. For AT91, it's done in the ipend routine, so also check if we have the alternate break sequence here.
MFC after: 3 days
|
160459 |
18-Jul-2006 |
cognet |
Make sure we use REDUCE32 on the result of do_cksum(), as in_cksum_skip() expects this. If we do not, this could result in wrong checksums.
MFC after: 1 day
|
160455 |
17-Jul-2006 |
cognet |
If we can't defrag a packet, re-queue it instead of dropping it.
|
160453 |
17-Jul-2006 |
cognet |
#if => #ifdef
|
160451 |
17-Jul-2006 |
cognet |
at91_spi won't compile without spibus, so add it.
|
160393 |
15-Jul-2006 |
cognet |
Oops bring back code that shouldn't have been removed by the previous commit.
|
160392 |
15-Jul-2006 |
cognet |
Make sure that if uma_small_alloc() gets called recursively, we just give up and call kmem_malloc(), to avoid a deadlock.
|
160374 |
15-Jul-2006 |
cognet |
Add a comment explaining why the OHCI mapping has been commented out.
|
160369 |
14-Jul-2006 |
imp |
MFp4: this now depends on new spi bus stuff
|
160368 |
14-Jul-2006 |
imp |
MFp4: tweaks
|
160366 |
14-Jul-2006 |
imp |
MFp4: elevate quality of slow clock a little
|
160365 |
14-Jul-2006 |
imp |
MFp4: paren police
|
160363 |
14-Jul-2006 |
imp |
MFp4: Introduce framework to configure the multiplexed pins on boot.
Since the USART supprots RS-485 multidrop mode, it allows the TX pins to float. However, for RS-232 operations, we don't want these pins to float. Instead, they should be pulled up to avoid mismatches. Linux does something similar when it configures the TX lines. This implies that we also allow the RX lines to float rather than be in the state they are left in by the boot loader. Since they are input pins, I think that this is the right thing to do.
Plus minor for our board.
|
160362 |
14-Jul-2006 |
imp |
MFp4: Fix typo in RTC_CALR_MK.
|
160361 |
14-Jul-2006 |
imp |
The TSC board uses a 16MHz base clock for the AT91RM9200, while the Kwikbyte board uses a 10MHz base clock. Cope with this difference.
|
160359 |
14-Jul-2006 |
imp |
Implement the set_time function. Rather pointless with this RTC, as it resets when the core resets, but there may be some use for it...
|
160358 |
14-Jul-2006 |
imp |
MF p4:
Adapt to forthcoming spi framework. The ioctls for SPI commands and such belong in the higher level driver.
|
160357 |
14-Jul-2006 |
imp |
Be sure to flush the cache after a partial read on timeout. Expand comments about timeouts. Fix a style nit. Sometimes small messages were getting corrupted.
|
160348 |
14-Jul-2006 |
imp |
Move some of the common parameters into the std. files for this platform. Also migrate from MD disk to NFS boot.
|
160343 |
14-Jul-2006 |
cognet |
Remove prototype for the undefined function counterhandler().
Submitted by: kevlo
|
160332 |
14-Jul-2006 |
cognet |
Add remote GDB bits for arm.
|
160312 |
12-Jul-2006 |
jhb |
Simplify the pager support in DDB. Allowing different db commands to install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0.
Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
|
160282 |
12-Jul-2006 |
cognet |
Comment out the mapping of the OHCI controller registers va == pa. This address is in the userland address space. The proper thing is either to choose a virtual address in the kernel address space beyond the KVA, or to use pmap_mapdev().
|
160260 |
11-Jul-2006 |
cognet |
Add a new flag to pmap_enter_locked() to say if it's OK to wait. If it is, and we're unable to allocate the memory for a PTE, we'll wait until we can. If not, we'll just return. Use M_NOWAIT|M_USE_RESERVE to allocate PTEs, it is less aggressive than M_NOWAIT alone.
Suggested by: alc
|
160072 |
02-Jul-2006 |
imp |
Add support for configuring pins to be one of {GPIO, PERIPHERAL A or PERIPHERAL B}, as well as direction of GPIO pin. Add defines for all the pins.
|
160071 |
02-Jul-2006 |
imp |
MFp4:
Make serial ports more robust and reliable. Make non-console ports work. This might have broken skyeye stuff.
o Introduce ping-pong receive buffers. o Use DMA to copy characters directly into memory. o Support baud rates other than 115200 o Use 1 stop bit when 1 stop bit is requested (otherwise 2 were used, which caused dropped characters when received in bursts). o Use 1.5 stop bits for 5-bit bytes, and 2 stop bits otherwise when 2 stop bits were requested. o Actually update line parameters. o Fix comments o Move init into attach o Tweaks to TX interrupt registers to get them reliable and non-storming. o harvest data in ipend since the latency between it and the callback was too long. This likely is how it should be, I don't know why I deferred things to the callback before. o disable all interrupts in console init. We don't want interrupts until we turn on an ISR. o cosmetic tweaks o Automatically detect of the TIMEOUT interrupt is supported. If so, use it so we get better CPU utilization. Otherwise do a character at a time RX. Good news here is that it seems we have enough CPU and low enough fast interrupt latency to do this reliably. o Don't read USART_CR. It is a write-only register. o start to implement bus_ioctl. Do BAUD now...
|
159902 |
23-Jun-2006 |
cognet |
Backout previous commit, Warner committed at91_pio.c...
|
159901 |
23-Jun-2006 |
cognet |
There's no need to allocate that much phdr/shdr from the stack.
|
159900 |
23-Jun-2006 |
cognet |
Add the arm9_setup() prototype.
|
159899 |
23-Jun-2006 |
cognet |
Comment out at91_pio.c, it's not in CVS.
|
159868 |
22-Jun-2006 |
cognet |
arm9_setup() is now needed even if we're not using a gzipped kernel, so move it outside the #ifdef KZIP
Pointy Hat to: cognet
|
159849 |
21-Jun-2006 |
imp |
Nitsville: the routine is called initarm, not init_arm, correct it in a comment.
|
159834 |
21-Jun-2006 |
cognet |
Don't forget to define uart_sa1110_vaddr.
Submitted by: kevlo
|
159814 |
20-Jun-2006 |
imp |
Compute physmem so we can print it correctly on boot. Slightly optimize while I'm here.
|
159795 |
20-Jun-2006 |
imp |
Probe the memory size of the board better. Look at the bus width, number of banks, rows and columns the SDRAMC is programmed to access to determine the RAM size for the board, rather than hard-wiring it to be 32MB. My company's board with 64MB now probes correctly, as does the KB9202 with only 32MB. This means that to detect the right memory size, our boot loader must correctly initialize these values. This is a fairly safe assumption because the boot loader has to initialize SDRAM already, and it isn't really possible to change this register after we've accessed SDRAM.
|
159758 |
18-Jun-2006 |
cognet |
Make sure the stack is properly aligned. Enable the MMU when relocating as well, and use write-through cache.
|
159709 |
17-Jun-2006 |
imp |
comment out twi for now: no iicbus in KB920X: it breaks booting
|
159708 |
17-Jun-2006 |
imp |
Carefully note the RMII bit in the config register at attach time. The boot loader is supposed to leave this bit set to the right value for the board. If this bit was set at attach time, use it to init the config register correctly.
Note: this means the boot loader has to properly initialize it.
|
159707 |
17-Jun-2006 |
imp |
improve reporting of clocks
|
159651 |
15-Jun-2006 |
netchild |
Remove COMPAT_43 from GENERIC (and other kernel configs). For amd64 there's an explicit comment that it's needed for the linuxolator. This is not the case anymore. For all other architectures there was only a "KEEP THIS". I'm (and other people too) running a COMPAT_43-less kernel since it's not necessary anymore for the linuxolator. Roman is running such a kernel for a for longer time. No problems so far. And I doubt other (newer than ia32 or alpha) architectures really depend on it.
This may result in a small performance increase for some workloads.
If the removal of COMPAT_43 results in a not working program, please recompile it and all dependencies and try again before reporting a problem.
The only place where COMPAT_43 is needed (as in: does not compile without it) is in the (outdated/not usable since too old) svr4 code.
Note: this does not remove the COMPAT_43TTY option.
Nagging by: rdivacky
|
159627 |
15-Jun-2006 |
ups |
Remove mpte optimization from pmap_enter_quick(). There is a race with the current locking scheme and removing it should have no measurable performance impact. This fixes page faults leading to panics in pmap_enter_quick_locked() on amd64/i386.
Reviewed by: alc,jhb,peter,ps
|
159557 |
12-Jun-2006 |
cognet |
MFp4: - Try hard to calculate a safe sp, so that the stack doesn't get smashed while uncompressing or relocating the kernel. - Bring in code needed to calculate the cacheline size etc, needed for arm9_idcache_wbinv_all.
|
159556 |
12-Jun-2006 |
cognet |
MFp4: Increase the L1 pagetable needed for the kernel from 8 to 22, to be able to boot fat kernels.
|
159500 |
11-Jun-2006 |
alc |
Remove pmap_pagedaemon_waken and update pmap_get_pv_entry() to match the current interface with the machine-independent layer. Without this change, the page daemon would only have been awakened the first time that the number of pv entries went above the high water mark, not each time.
|
159499 |
11-Jun-2006 |
alc |
Eliminate spl calls.
|
159474 |
10-Jun-2006 |
alc |
Add a lock assertion. Remove dead (locking) code. Change some white space.
Reviewed by: cognet@
|
159450 |
09-Jun-2006 |
alc |
Add pmap locking to pmap_extract().
Tested by: cognet@
|
159387 |
07-Jun-2006 |
cognet |
Oops it seems I forgot to remove ARM32_NEW_VM_LAYOUT from here.
|
159384 |
07-Jun-2006 |
alc |
Add pmap locking to pmap_fault_fixup().
Add an assertion to pmap_vac_me_harder().
Tested by: cognet@
|
159378 |
07-Jun-2006 |
alc |
Properly synchronize access to the pmap in pmap_extract_and_hold().
Eliminate an unneeded variable from pmap_extract_and_hold().
Tested by: cognet@
|
159371 |
07-Jun-2006 |
cognet |
Now that we use pmap_mapdev_boostrap(), we can get ride of the got_mmu hack.
Submitted by: kevlo
|
159365 |
07-Jun-2006 |
imp |
Remove sa1_cache_clean_addr. It isn't needed.
Submitted by: kevlo
|
159359 |
06-Jun-2006 |
cognet |
Convert the last offender, the SA1110 port, to ARM32_NEW_VM_LAYOUT, and completely nuke the !ARM32_NEW_VM_LAYOUT case.
|
159358 |
06-Jun-2006 |
cognet |
Remove a bogus, useless, "i++".
|
159352 |
06-Jun-2006 |
alc |
Add partial pmap locking.
Tested by: cognet@
|
159325 |
06-Jun-2006 |
alc |
Add partial pmap locking.
Eliminate the unused allpmaps list.
Tested by: cognet@
|
159322 |
06-Jun-2006 |
cognet |
Make VERBOSE_INIT_ARM compile by fixing various printf formats, and add it as an option.
Submitted by: Max N. Boyarov <m.boyarov at bsd dot by>
|
159321 |
05-Jun-2006 |
cognet |
vm_page_alloc_contig() can sleep, so don't even think about using it in the M_NOWAIT case.
|
159303 |
05-Jun-2006 |
alc |
Introduce the function pmap_enter_object(). It maps a sequence of resident pages from the same object. Use it in vm_map_pmap_enter() to reduce the locking overhead of premapping objects.
Reviewed by: tegge@
|
159167 |
02-Jun-2006 |
cognet |
Don't #error if no CPU is defined but we're not compiling the kernel.
|
159145 |
01-Jun-2006 |
cognet |
Don't enable the FIQ in enable_interrupts() if F32_bit is not specified. This has been committed by mistake.
Reported by: ssouhlal
|
159127 |
01-Jun-2006 |
alc |
Introduce pmap_enter_locked() and use it to reimplement pmap_enter_quick().
Tested by: cognet@
|
159108 |
31-May-2006 |
cognet |
Avoid a LOR by unlocking the vm_page_queue_mtx before calling uma_zalloc, and freeing the allocated memory if another thread already did the same.
|
159107 |
31-May-2006 |
cognet |
If our buffer is not aligned on the cache line size, write back/invalidate the first and last cache line in PREREAD, and just invalidate the cache lines in POSTREAD, instead of write-back/invalidating in POSTREAD, which could lead to stale data overriding what has been transfered by DMA.
|
159101 |
31-May-2006 |
cognet |
Ooops arm10 is armv5, not armv4.
Submitted by: kevlo
|
159100 |
31-May-2006 |
cognet |
Include machine/cpuconf.h in pmap.h in order to get ARM_NMMUS defined, to appease -Wundef.
|
159088 |
30-May-2006 |
cognet |
Protect the mapping used for pmap_copy_page/pmap_zero_page with a mutex.
|
159084 |
30-May-2006 |
cognet |
To avoid problems, invalidate the data cache and disable the MMU once we're done uncompressing the kernel.
|
159073 |
30-May-2006 |
cognet |
In pmap_is_prefaultable(), assert that the pte isn't NULL if pmap_get_pde_pte() returns TRUE.
Suggested by: ssouhlal
|
159070 |
30-May-2006 |
cognet |
The Assabet has 32MB of RAM, not 16.
Submitted by: kevlo
|
159068 |
30-May-2006 |
benno |
In pmap_mapdev we correctly round the address off to the nearest page boundary, but we must also add the offset back on to the va we return.
|
159067 |
30-May-2006 |
cognet |
Uncomment the call to cpu_idcache_wbinv_all() after the MMU has been enabled. It has been commented out for a reason I forgot but I suspect does not apply anymore. Technically speaking it's not required to do it, has the data and the instruction cache have been disabled in _start(). However, it may change in the future, so I don't want to rely on this behavior.
Submitted by: kevlo
|
159047 |
29-May-2006 |
cognet |
Nuke sa11x0_attach_args. It's a NetBSDIsm, and we have no use for it.
Submitted by: kevlo
|
158928 |
26-May-2006 |
cognet |
Remove any reference to enable_mmu(), it's been gone for a long time.
Submitted by: kevlo
|
158854 |
23-May-2006 |
cognet |
Use pmap_devmap_bootstrap(), instead of mapping the SACOM1 registers with pmap_map_entry. More use of macros instead of hardcoding the addr.
Submitted by: kevlo
|
158839 |
22-May-2006 |
cognet |
Use macros instead of hardcoding the address for SACOM1. Also don't pretend we're working with SACOM3, as we're really mapping SACOM1.
Submitted by: kevlo
|
158746 |
19-May-2006 |
cognet |
We have an implementation of generic_bs_rr_1, so use it, as some drivers use it.
Submitted by: kevlo
|
158740 |
19-May-2006 |
cognet |
Comment out SYSCTL_OMIT_DESCR until it's committed.
|
158733 |
18-May-2006 |
cognet |
Implement sa11x0_bs_unmap. Submitted by: kevlo
|
158732 |
18-May-2006 |
cognet |
Make this compile (UART_IPEND_* => SER_INT_*).
|
158593 |
15-May-2006 |
cognet |
Add definitions for atomic_subtract_rel_32, atomic_add_rel_32 and atomic_load_acq_32, needed for hwpmc.
|
158590 |
15-May-2006 |
benno |
Display real/avail memory as per other platforms.
Approved by: cognet
|
158581 |
15-May-2006 |
cognet |
Switch to a 64bit time_t, while it's not a big problem to do so.
Suggested by: imp
|
158531 |
13-May-2006 |
cognet |
Resurrect Skyeye support : Add a new option, SKYEYE_WORKAROUNDS, which as the name suggests adds workarounds for things skyeye doesn't simulate. Specifically : - Use USART0 instead of DBGU as the console, make it not use DMA, and manually provoke an interrupt when we're done in the transmit function. - Skyeye maintains an internal counter for clock, but apparently there's no way to access it, so hack the timecounter code to return a value which is increased at every clock interrupts. This is gross, but I didn't find a better way to implement timecounters without hacking Skyeye to get the counter value. - Force the write-back of PTEs once we're done writing them, even if they are supposed to be write-through. I don't know why I have to do that.
|
158507 |
13-May-2006 |
imp |
Tidy up a bit...
|
158445 |
11-May-2006 |
phk |
Clean out sysctl machdep.* related defines.
The cmos clock related stuff should really be in MI code.
|
158432 |
11-May-2006 |
cognet |
Get this to compile : - The prototype of uart_bus_probe() hasn't been changed in cvs yet, so use the old one. - Add at91_pdcreg.h, needed by uart_dev_at91usart.c.
|
158396 |
10-May-2006 |
cognet |
Move the call to cpu_setup() before the call to vm_ksubmap_init(). vm_ksubmap_init() calls pmap_copy_page(), which uses the mini data cache to do the copy, but we're running uncaching before cpu_setup(). For some reason it hasn't been a problem so far, but it is for the PXA255.
Spotted out by: benno
|
158319 |
05-May-2006 |
cognet |
Setting the rid of the resource is a good idea, but we still need to return the resource after.
|
157970 |
22-Apr-2006 |
cognet |
MFother arches : date: 2006/04/12 04:22:50; author: alc; state: Exp; lines: +14 -41 Retire pmap_track_modified(). We no longer need it because we do not create managed mappings within the clean submap. To prevent regressions, add assertions blocking the creation of managed mappings within the clean submap.
Reviewed by: tegge
|
157891 |
20-Apr-2006 |
imp |
When returning a resource that we've allocated with rman_reserve_resource, go ahead and set the rid for that resource.
|
157726 |
13-Apr-2006 |
cognet |
We need to adjust the bus handle if the resource is SYS_RES_MEMORY, NOT SYS_RES_IOPORT.
|
157725 |
13-Apr-2006 |
cognet |
Disable/enable fiqs as well as irqs.
|
157618 |
09-Apr-2006 |
cognet |
MFp4: Use CPU_CONTROL_ROUNDROBIN for arm9, it seems to give marginally better performances.
|
157616 |
09-Apr-2006 |
cognet |
Not only disable/enable interrupts, do it for FIQs as well, when needed.
|
157615 |
09-Apr-2006 |
cognet |
MFp4: Don't write-back the PTEs if they are mapped write-through, this was apparently only needed because skyeye has bugs in its cache emulation.
|
157570 |
06-Apr-2006 |
cognet |
MFp4: Catchup with recent UART changes.
|
157567 |
06-Apr-2006 |
cognet |
Add a new option, XSCALE_DISABLE_CCNT, to not use the xscale ccnt as a timecounter (because gxemul doesn't emule it yet).
|
157564 |
06-Apr-2006 |
imp |
Add debug writes in error cases that, in theory, should never happen
|
157563 |
06-Apr-2006 |
imp |
Connect twi to the FreeBSD iicbus infrastructure.
|
157562 |
06-Apr-2006 |
imp |
Pull in numerous fixes from myself and cognet. With these fixes the KB9202 eval board is finally stable with a nfs root.
|
157561 |
06-Apr-2006 |
imp |
Remove unused bit definitions. Minor style cleanup while I'm here.
|
157560 |
06-Apr-2006 |
imp |
Optimize the TX side of the part by using the PDC to move bytes out to the wire. This increases the speed considerably. Start to put infrastructure in place to do RX side, but that requires more study before it can be done.
|
157443 |
03-Apr-2006 |
peter |
Remove the unused sva and eva arguments from pmap_remove_pages().
|
157156 |
26-Mar-2006 |
cognet |
Implement pmap_object_init_pt() the way it is on sparc64/alpha, by doing nothing except asserting the vm object is locked, and a device object, instead of a useless printf.
|
157091 |
24-Mar-2006 |
imp |
Skeleton support for the SSC device, which implements I2S interfaces, amoung others.
|
157089 |
24-Mar-2006 |
imp |
Skeleton PIO support.
|
157088 |
24-Mar-2006 |
imp |
Add the sekelton of support for the Power Management Controller.
|
157087 |
24-Mar-2006 |
imp |
Add rtc to files.at91
|
157086 |
24-Mar-2006 |
imp |
Add RTC support. This may be of dubious value since the RTC is reset to 1998 every reboot.
|
157029 |
22-Mar-2006 |
cognet |
MFp4: Don't force single-user now we can go multi-user. Call cninit() only after the pagetable has been set, as locore.S won't map the system device for us anymore.
|
157027 |
22-Mar-2006 |
cognet |
MFp4: More special casing of when vector_page == 0x00000000 : catch attempts to write to vector_page earlier in pmap_fault_fixup(), and deny it.
|
157025 |
22-Mar-2006 |
cognet |
MFp4: If we're mapping the vector page (this will happen if we didn't relocate it), do not attempt to call pmap_vac_me_harder() on the page. At this point m will be NULL, and we know we won't have any cache issues with this page.
|
157024 |
22-Mar-2006 |
cognet |
MFp4: teach the KB920x bits how to know where the ELF trampoline puts the strtab and the symtab.
|
157023 |
22-Mar-2006 |
cognet |
MFp4: Handle break interrupts (it seems to only work for USART, not DBGU).
|
156833 |
18-Mar-2006 |
imp |
MFp4:
Add bus attachment for the ohci device on this chip. The bus and hub are detected correctly, but the children devices aren't detected correctly for reasons unknown.
|
156832 |
18-Mar-2006 |
imp |
Add ohci controller mapping.
|
156831 |
18-Mar-2006 |
imp |
MFp4:
o update TODO list o Better use of busdma o mark RX dtors as COHERENT. This helps performance a lot by not requiring so many EXPENSIVE cache flushes. The cost of accessing it non-cached is much smaller. o Copy data from Rx buffers to make IP header 4 byte aligned. o CRC length included in reported length, so cope o Don't free TX buffer twice o Manage TX buffers better. o Enable just the interrupts we want. o Manage OACTIVE better
# Some of these done by cognet # These changes let us get to # via NFS root.
|
156830 |
18-Mar-2006 |
imp |
MFP4: Gratuitously sort alphabetically.
|
156829 |
18-Mar-2006 |
imp |
MFP4:
GC and fix definitions.
# some of this may have been done by cognet
|
156828 |
18-Mar-2006 |
imp |
MFp4:
o Add memory barrier to bus space o Allow for up to 3 IRQs per device o Move to table driven population of children devices. o Add support for usb ohci memory mapped controller resource allocation. o Clean up a bunch of extra writes to disable interrupts that are now done elsewhere. o Force all system interrupt handlers be fast. We get deadlock if they aren't.
|
156827 |
18-Mar-2006 |
imp |
MFp4:
o Disable all interrupts that the ST can generate until we have an ISR to service them. o Correct clock calculation to make DELAY the right length...
Submitted by: cognet (#2)
|
156520 |
09-Mar-2006 |
cognet |
MFp4: Forget the asm inlined version of in_cksum_hdr(). It doesn't work if the pointer is unaligned, and it just doesn't worth it.
|
156212 |
02-Mar-2006 |
cognet |
Use BUS_DMA_COHERENT.
|
156199 |
02-Mar-2006 |
cognet |
Use 8 * sizeof(int) instead of hardcoding 32, for the unlikely case this code ever get used on a plateform where sizeof(int) != 4.
Suggested by: jmg
|
156191 |
01-Mar-2006 |
cognet |
Try to honor BUS_DMA_COHERENT : if the flag is set, normally allocate memory with malloc() or contigmalloc() as usual, but try to re-map the allocated memory into a VA outside the KVA, non-cached, thus making the calls to bus_dmamap_sync() for these buffers useless.
|
156175 |
01-Mar-2006 |
cognet |
Use a better panic message than lol.
|
156174 |
01-Mar-2006 |
cognet |
Make sure we decrement p_lock before leaving prefetch_abort_handler()
|
156166 |
01-Mar-2006 |
cognet |
userret() now only takes 2 parameters.
|
156094 |
27-Feb-2006 |
cognet |
Get this to compile with the recent UART changes.
|
155922 |
22-Feb-2006 |
jhb |
Close some races between procfs/ptrace and exit(2): - Reorder the events in exit(2) slightly so that we trigger the S_EXIT stop event earlier. After we have signalled that, we set P_WEXIT and then wait for any processes with a hold on the vmspace via PHOLD to release it. PHOLD now KASSERT()'s that P_WEXIT is clear when it is invoked, and PRELE now does a wakeup if P_WEXIT is set and p_lock drops to zero. - Change proc_rwmem() to require that the processing read from has its vmspace held via PHOLD by the caller and get rid of all the junk to screw around with the vmspace reference count as we no longer need it. - In ptrace() and pseudofs(), treat a process with P_WEXIT set as if it doesn't exist. - Only do one PHOLD in kern_ptrace() now, and do it earlier so it covers FIX_SSTEP() (since on alpha at least this can end up calling proc_rwmem() to clear an earlier single-step simualted via a breakpoint). We only do one to avoid races. Also, by making the EINVAL error for unknown requests be part of the default: case in the switch, the various switch cases can now just break out to return which removes a _lot_ of duplicated PRELE and proc unlocks, etc. Also, it fixes at least one bug where a LWP ptrace command could return EINVAL with the proc lock still held. - Changed the locking for ptrace_single_step(), ptrace_set_pc(), and ptrace_clear_single_step() to always be called with the proc lock held (it was a mixed bag previously). Alpha and arm have to drop the lock while the mess around with breakpoints, but other archs avoid extra lock release/acquires in ptrace(). I did have to fix a couple of other consumers in kern_kse and a few other places to hold the proc lock and PHOLD.
Tested by: ps (1 mostly, but some bits of 2-4 as well) MFC after: 1 week
|
155793 |
17-Feb-2006 |
imp |
These files apply to all the atmel parts that freebsd is going to run on, so name them more generically. If we do support the MMU-less ARM7 parts, then we'll need to, at that time, expand the files we have.
|
155791 |
17-Feb-2006 |
imp |
This file was obsolete when committed. Catchup and delete it.
|
155527 |
11-Feb-2006 |
imp |
Use the correct address for the ohci device.
|
155455 |
08-Feb-2006 |
phk |
Simplify system time accounting for profiling.
Rename struct thread's td_sticks to td_pticks, we will need the other name for more appropriately named use shortly. Reduce it from uint64_t to u_int.
Clear td_pticks whenever we enter the kernel instead of recording its value as reference for userret(). Use the absolute value of td->pticks in userret() and eliminate third argument.
|
155445 |
07-Feb-2006 |
cognet |
Set the MAC address after we just read it at attach time, as it seems needed.
|
155443 |
07-Feb-2006 |
cognet |
Set m_pkthdr.len and m_pkthdr.rcvif.
|
155437 |
07-Feb-2006 |
imp |
This file isn't GENERIC, so change the header
|
155436 |
07-Feb-2006 |
imp |
Rather than pull in all the phy, just pull in the lxt phy that we need for this board (although our lxtphy driver isn't claiming it, but that's a different problem).
This saves 57k in this kernel.
|
155405 |
06-Feb-2006 |
cognet |
- Call mii_phy_probe() after we allocated an ifp. mii has this evil hack where it assumes the first field of the driver softc is the struct ifnet, and it copies its value in mii_phy_probe(). - In the interrupt handler, set the mbuf m_len field on packet receive.
|
155391 |
06-Feb-2006 |
cognet |
Use memory clobbers, to be on the safe side. Suggested by: jhb
|
155355 |
05-Feb-2006 |
cognet |
Backout rev 1.12. It would have been a good thing, if gcc was smart enough not to generate bad code.
|
155324 |
04-Feb-2006 |
imp |
Import support for the Atmel AT91RM9200 CPU/Microcontroller. This SoC is a ARM920T based CPU with a bunch of built-in peripherals. The inital import supports the SPI bus, the TWI bus (although iicbus integration is not complete), the uarts, the system timer and the onboard ethernet. Support for the Kwikbyte KB9202 (http://www.kwikbyte.com) board is also included, although there's no reason why the 9200 and the 9201 wouldn't also work. Primitive support for running under the skyeye emulator is also provided (although skyeye's support for the AT91RM9200 is a little weak).
The code has been structured so that other members of Atmel's arm family can be supported in the future. The AT91SAM9260 is not presently supported due to lack of hardware. The arm7tdmi families are also not supported becasue they lack an MMU.
Many thanks to cognet@ for his help and assistance in bringing up this board. He did much of the vm work and wrote parts of the uart and system timer code as well as the bus space implementation.
The system boots to single user w/o problem, although the serial console is a little slow and the ethernet driver is still in flux.
This work was sponsored by Timing Solutions, Corporation. I am grateful to their support of the FreeBSD project in this manner.
|
155308 |
04-Feb-2006 |
cognet |
Don't forget to set the address of the next descriptor to 0 when we're zeroing a physical page, or we could end up re-zeroing portions of memory we have zeroed before, which is clearly not wanted.
|
155306 |
04-Feb-2006 |
cognet |
MFi386: revision 1.288 date: 2006/02/04 14:11:33; author: wsalamon; state: Exp; lines: +4 -1 Hook up the audit system to system call entry and exit. System calls will now be audited.
Obtained from: TrustedBSD Project Approved by: rwatson (mentor)
|
155242 |
03-Feb-2006 |
imp |
MFp4: Small cleanup of cpu messages at boot.
|
155241 |
03-Feb-2006 |
imp |
Merge from p4: minor formatting nits.
|
154928 |
27-Jan-2006 |
cognet |
Try harder not to recurse.
|
154712 |
23-Jan-2006 |
cognet |
Donc recompute the io port address if it's already the good one.
|
154561 |
20-Jan-2006 |
cognet |
Build a minimal pagetables, with only section mappings, mapped write through, to speed up the decompression.
|
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.
|
154074 |
06-Jan-2006 |
jhb |
Fix various places that were testing td_critnest to see if interrupts should remain disabled during a trap or not to check td_md.md_spinlock_count instead.
|
153955 |
01-Jan-2006 |
imp |
Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate for each platform. These will be used in the pci code in preference to the complicated #ifdefs we have there now.
|
153940 |
31-Dec-2005 |
netchild |
MI changes: - provide an interface (macros) to the page coloring part of the VM system, this allows to try different coloring algorithms without the need to touch every file [1] - make the page queue tuning values readable: sysctl vm.stats.pagequeue - autotuning of the page coloring values based upon the cache size instead of options in the kernel config (disabling of the page coloring as a kernel option is still possible)
MD changes: - detection of the cache size: only IA32 and AMD64 (untested) contains cache size detection code, every other arch just comes with a dummy function (this results in the use of default values like it was the case without the autotuning of the page coloring) - print some more info on Intel CPU's (like we do on AMD and Transmeta CPU's)
Note to AMD owners (IA32 and AMD64): please run "sysctl vm.stats.pagequeue" and report if the cache* values are zero (= bug in the cache detection code) or not.
Based upon work by: Chad David <davidc@acns.ab.ca> [1] Reviewed by: alc, arch (in 2004) Discussed with: alc, Chad David, arch (in 2004)
|
153741 |
26-Dec-2005 |
sobomax |
Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structure with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually allow executing elf dynamic binaries (aka shared libraries). When it is requested to execute ET_DYN elf image check if this flag is on after we know the elf brand allowing execution if so.
PR: kern/87615 Submitted by: Marcin Koziej <creep@desk.pl>
|
153666 |
22-Dec-2005 |
jhb |
Tweak how the MD code calls the fooclock() methods some. Instead of passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket.
Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
|
153616 |
21-Dec-2005 |
cognet |
Ooops, I removed the wrong bits. This unbreak boot from a VA which is different from the PA.
|
153615 |
21-Dec-2005 |
cognet |
Remove #undef DDB I shouldn't have committed.
|
153550 |
20-Dec-2005 |
cognet |
- Disable the instruction cache very early, until it's time to enable it again. - Revamp the code that jumps from physical to virtual address.
|
153549 |
20-Dec-2005 |
cognet |
Make the elf trampoline disable the MMU, and link it at physical address, to avoid bad surprises.
|
153279 |
09-Dec-2005 |
cognet |
- Better use of the busdma API. - Use spin locks instead of sleep locks.
|
153278 |
09-Dec-2005 |
cognet |
Fix a harmless bug in the way we allocate the early PTEs.
|
153277 |
09-Dec-2005 |
cognet |
The IQ80321 clock is 200MHz, but the IQ80321 is 198MHz, so add a kernel option to override the frequency
|
153276 |
09-Dec-2005 |
cognet |
A #define is not enough, we need to cast from u_long * to uint32_t *.
|
153275 |
09-Dec-2005 |
cognet |
Define atomic_whatever_long
|
153273 |
09-Dec-2005 |
cognet |
In copyout(), quad-align the source buffer, and use ldrd if possible.
|
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.
|
153113 |
05-Dec-2005 |
cognet |
Try to use contigmalloc() even if M_NOWAIT has been specified.
|
153112 |
05-Dec-2005 |
cognet |
Teach the elf trampoline how to deal with gzipped kernels.
|
152753 |
24-Nov-2005 |
ru |
Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.
|
152743 |
24-Nov-2005 |
cognet |
Use a magic number to know we were started from the elf wrapper. Add a dummy _start function to make the non-elf version of the wrapper work.
|
152723 |
23-Nov-2005 |
cognet |
MFP4: Bring in arm9 cache-related functions
Obtained from: NetBSD
|
152654 |
21-Nov-2005 |
cognet |
Force pmap to write-back the pte cacheline after each pte modification, even if the pte is supposed to be cached in write through mode (might be a skyeye bug, I'll have to check).
|
152653 |
21-Nov-2005 |
cognet |
Add an alternate ID for the arm920t (the real solution is to have per-cpu class masks, but oh well).
|
152630 |
20-Nov-2005 |
alc |
Eliminate pmap_init2(). It's no longer used.
|
152189 |
08-Nov-2005 |
cognet |
There's no need to include <machine/asmacros.h> here.
|
152128 |
06-Nov-2005 |
cognet |
MFi386 rev 1.536 (sort of) Move what can be moved (UMA zones creation, pv_entry_* initialization) from pmap_init2() to pmap_init(). Create a new function, pmap_postinit(), called from cpu_startup(), to do the L1 tables allocation. pmap_init2() is now empty for arm as well.
|
151897 |
31-Oct-2005 |
rwatson |
Normalize a significant number of kernel malloc type names:
- Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat.
- Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters.
- Disambiguate some collisions by adding subsystem prefixes to some memory types.
- Generally prefer lower case to upper case.
- If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases.
Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
|
151658 |
25-Oct-2005 |
jhb |
Reorganize the interrupt handling code a bit to make a few things cleaner and increase flexibility to allow various different approaches to be tried in the future. - Split struct ithd up into two pieces. struct intr_event holds the list of interrupt handlers associated with interrupt sources. struct intr_thread contains the data relative to an interrupt thread. Currently we still provide a 1:1 relationship of events to threads with the exception that events only have an associated thread if there is at least one threaded interrupt handler attached to the event. This means that on x86 we no longer have 4 bazillion interrupt threads with no handlers. It also means that interrupt events with only INTR_FAST handlers no longer have an associated thread either. - Renamed struct intrhand to struct intr_handler to follow the struct intr_foo naming convention. This did require renaming the powerpc MD struct intr_handler to struct ppc_intr_handler. - INTR_FAST no longer implies INTR_EXCL on all architectures except for powerpc. This means that multiple INTR_FAST handlers can attach to the same interrupt and that INTR_FAST and non-INTR_FAST handlers can attach to the same interrupt. Sharing INTR_FAST handlers may not always be desirable, but having sio(4) and uhci(4) fight over an IRQ isn't fun either. Drivers can always still use INTR_EXCL to ask for an interrupt exclusively. The way this sharing works is that when an interrupt comes in, all the INTR_FAST handlers are executed first, and if any threaded handlers exist, the interrupt thread is scheduled afterwards. This type of layout also makes it possible to investigate using interrupt filters ala OS X where the filter determines whether or not its companion threaded handler should run. - Aside from the INTR_FAST changes above, the impact on MD interrupt code is mostly just 's/ithread/intr_event/'. - A new MI ddb command 'show intrs' walks the list of interrupt events dumping their state. It also has a '/v' verbose switch which dumps info about all of the handlers attached to each event. - We currently don't destroy an interrupt thread when the last threaded handler is removed because it would suck for things like ppbus(8)'s braindead behavior. The code is present, though, it is just under #if 0 for now. - Move the code to actually execute the threaded handlers for an interrrupt event into a separate function so that ithread_loop() becomes more readable. Previously this code was all in the middle of ithread_loop() and indented halfway across the screen. - Made struct intr_thread private to kern_intr.c and replaced td_ithd with a thread private flag TDP_ITHREAD. - In statclock, check curthread against idlethread directly rather than curthread's proc against idlethread's proc. (Not really related to intr changes)
Tested on: alpha, amd64, i386, sparc64 Tested on: arm, ia64 (older version of patch by cognet and marcel)
|
151596 |
23-Oct-2005 |
cognet |
Unbreak for !__XSCALE__.
|
151524 |
20-Oct-2005 |
cognet |
Cleanup.
|
151415 |
17-Oct-2005 |
cognet |
Use the clock count register as a timecounter, as it's more accurate.
|
151340 |
14-Oct-2005 |
jhb |
Whitespace.
|
151334 |
14-Oct-2005 |
jhb |
Change the userland atomic operations on arm to use memory operands for the modified memory rather than using register operands that held a pointer to the memory. The biggest effect is that we now correctly tell the compiler that these functions change the memory that these functions modify.
Reviewed by: cognet
|
151316 |
14-Oct-2005 |
davidxu |
1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most changes in MD code are trivial, before this change, trapsignal and sendsig use discrete parameters, now they uses member fields of ksiginfo_t structure. For sendsig, this change allows us to pass POSIX realtime signal value to user code.
2. Remove cpu_thread_siginfo, it is no longer needed because we now always generate ksiginfo_t data and feed it to libpthread.
3. Add p_sigqueue to proc structure to hold shared signals which were blocked by all threads in the proc.
4. Add td_sigqueue to thread structure to hold all signals delivered to thread.
5. i386 and amd64 now return POSIX standard si_code, other arches will be fixed.
6. In this sigqueue implementation, pending signal set is kept as before, an extra siginfo list holds additional siginfo_t data for signals. kernel code uses psignal() still behavior as before, it won't be failed even under memory pressure, only exception is when deleting a signal, we should call sigqueue_delete to remove signal from sigqueue but not SIGDELSET. Current there is no kernel code will deliver a signal with additional data, so kernel should be as stable as before, a ksiginfo can carry more information, for example, allow signal to be delivered but throw away siginfo data if memory is not enough. SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can not be caught or masked. The sigqueue() syscall allows user code to queue a signal to target process, if resource is unavailable, EAGAIN will be returned as specification said. Just before thread exits, signal queue memory will be freed by sigqueue_flush. Current, all signals are allowed to be queued, not only realtime signals.
Earlier patch reviewed by: jhb, deischen Tested on: i386, amd64
|
150996 |
06-Oct-2005 |
cognet |
Export PAGE_SIZE from genassym.c, and include assym.s in bcopy_page.S, instead of <machine/param.h>.
|
150944 |
04-Oct-2005 |
cognet |
Remove a never reached RET.
|
150943 |
04-Oct-2005 |
cognet |
strd needs the destination to be double-word aligned, but the pointer passed to savectx isn't always, so always use stmia, savectx isn't called enough to need that kind of optimization.
|
150936 |
04-Oct-2005 |
cognet |
dump_avail has nothing to do with ARM_USE_SMALL_ALLOC, so move its declaration out of the #ifdef.
|
150919 |
04-Oct-2005 |
cognet |
Remove duplicate entry for DDB.
|
150916 |
04-Oct-2005 |
cognet |
Fix build when DDB isn't defined.
|
150893 |
03-Oct-2005 |
cognet |
Bring in the good version of this file.
|
150873 |
03-Oct-2005 |
cognet |
Add dma and aau.
|
150872 |
03-Oct-2005 |
cognet |
Import dummy drivers for the i80321 DMA controller and AAU. The DMA controller driver only knows how to do memory to memory copies, and the AAU driver how to zero a chunk of memory. Use them to process big (>=1KB) copying/zeroing.
|
150871 |
03-Oct-2005 |
cognet |
Make mem.c know about the pages allocated with ARM_USE_SMALL_ALLOC.
|
150870 |
03-Oct-2005 |
cognet |
Export the variables needed for the copy/zero API.
|
150869 |
03-Oct-2005 |
cognet |
Make sure the interrupt is masked before processing it, or bad things can happen.
|
150868 |
03-Oct-2005 |
cognet |
If a thread already tries to allocate a new memory range, wait for it instead of trying to do the same.
|
150867 |
03-Oct-2005 |
cognet |
Provide a dump_avail[] variable, which contains the page ranges to be dumped.
For iq31244_machdep.c, attempt to recognize hints provided by the elf trampoline.
|
150865 |
03-Oct-2005 |
cognet |
- Provide the kernel l1pt physical address, for userland. - Use the new API for pmap_copy_page() and pmap_zero_page(). - Just write-back the pages in pmap_qenter(), and invalidate it in pmap_qremove(). - Nuke the cache flushing in pmap_enter_quick(), it's not needed anymore.
|
150864 |
03-Oct-2005 |
cognet |
Add a new API to let platform-specific ports provide functions for big copy/zeroing.
|
150863 |
03-Oct-2005 |
cognet |
Export the virtual and physical address in which the kernel was loaded, needed for userland when reading kernel dumps.
|
150861 |
03-Oct-2005 |
cognet |
Import a small ELF trampoline, in which the kernel is embedded, and that is able to load the kernel into memory, symbol table included. This is needed to be able to access the symbol table from DDB without a boot loader.
|
150860 |
03-Oct-2005 |
cognet |
*blush* Don't try to dereference map if it's NULL. While I'm there, increase the minimum value to write-back/invalidate the whole dcache in bus_dmamap_sync().
|
150859 |
03-Oct-2005 |
cognet |
Only save the registers that are used.
|
150858 |
03-Oct-2005 |
cognet |
asm versions of in_cksum_hdr() and in_pseudo().
|
150856 |
03-Oct-2005 |
cognet |
Implement savectx().
Obtained from: NetBSD
|
150855 |
03-Oct-2005 |
cognet |
Kernel dump for arm, ripped from the ia64/amd64 version.
|
150627 |
27-Sep-2005 |
jhb |
Add a new atomic_fetchadd() primitive that atomically adds a value to a variable and returns the previous value of the variable.
Tested on: i386, alpha, sparc64, arm (cognet) Reviewed by: arch@ Submitted by: cognet (arm) MFC after: 1 week
|
150552 |
25-Sep-2005 |
cognet |
Fix multiple abuses of __RMAN_RESOURCE_VISIBLE in the arm code.
Spotted out by: phk
|
149925 |
10-Sep-2005 |
marcel |
Move the prototypes of db_md_set_watchpoint(), db_md_clr_watchpoint() and db_md_list_watchpoints() to ddb/ddb.h.
|
149768 |
03-Sep-2005 |
alc |
Pass a value of type vm_prot_t to pmap_enter_quick() so that it determine whether the mapping should permit execute access.
|
149337 |
20-Aug-2005 |
stefanf |
Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename it to __MINSIGSTKSZ. Define MINSIGSTKSZ in <sys/signal.h>.
This is done in order to use MINSIGSTKSZ for the macro PTHREAD_STACK_MIN in <pthread.h> (soon <limits.h>) without having to include the whole <sys/signal.h> header.
Discussed with: bde
|
148666 |
03-Aug-2005 |
jeff |
- Add support for saving stack traces and displaying them via printf(9) and KTR.
Contributed by: Antoine Brodin <antoine.brodin@laposte.net> Concept code from: Neal Fachan <neal@isilon.com>
|
148455 |
27-Jul-2005 |
imp |
msdosfs_conv.c references cmos_wall_clock and adjkerntz. Since these are 0 for arm, define them as such to make msdosfs_conv.c compile again on arm.
|
148453 |
27-Jul-2005 |
jhb |
Add extra constraints to tell the compiler that the memory be modified in the arm __swp() and sparc64 casa() and casax() functions is actually being used as an input and output and not just the value of the register that points to the memory location. This was the underlying source of the mbuf refcount problems on sparc64 a while back. For arm this should be a nop because __swp() has a constraint to clobber all memory which can probably be removed now.
Reviewed by: alc, cognet MFC after: 1 week
|
148452 |
27-Jul-2005 |
jhb |
Use a + constraint modifier for a register arg in __bswap16_var().
Reviewed by: cognet
|
148067 |
15-Jul-2005 |
jhb |
Convert the atomic_ptr() operations over to operating on uintptr_t variables rather than void * variables. This makes it easier and simpler to get asm constraints and volatile keywords correct.
MFC after: 3 days Tested on: i386, alpha, sparc64 Compiled on: ia64, powerpc, amd64 Kernel toolchain busted on: arm
|
147889 |
10-Jul-2005 |
davidxu |
Validate if the value written into {FS,GS}.base is a canonical address, writting non-canonical address can cause kernel a panic, by restricting base values to 0..VM_MAXUSER_ADDRESS, ensuring only canonical values get written to the registers.
Reviewed by: peter, Josepha Koshy < joseph.koshy at gmail dot com > Approved by: re (scottl)
|
147591 |
24-Jun-2005 |
cognet |
- Use a TAILQ instead of parsing the array to find a free dmamap. - Inline busdma_alloc_dmamap, busdma_free_dmamap and bus_dmamap_sync_buf.
Approved by: re (blanket)
|
147555 |
23-Jun-2005 |
jhb |
Fix a typo.
Approved by: re (scottl)
|
147545 |
23-Jun-2005 |
cognet |
Remove the va == pa mapping.
Approved by: re (blanket)
|
147544 |
23-Jun-2005 |
cognet |
Call kdb_trap() on fatal abort.
Approved by: re (blanket)
|
147543 |
23-Jun-2005 |
cognet |
Implement db_frame() and use it to obtain the registers value.
Approved by: re (blanket)
|
147542 |
23-Jun-2005 |
cognet |
Don't abuse UMA_SLAB_KMEM.
Approved by: re (blanket)
|
147504 |
20-Jun-2005 |
obrien |
Add .cvsignore files just like in sys/<arch>/compiled, this keeps CVS from questing kernel config files not in CVS.
Approved by: re(kensmith)
|
147417 |
16-Jun-2005 |
cognet |
Try harder to detect if the allocated memory for L2 PTP comes from a 1MB section or not.
Approved by: re (blanket)
|
147416 |
16-Jun-2005 |
cognet |
Don't pass the kernel_pmap to pmap_fault_fixup() if the fault comes from kernel mode, always use the curthread pmap instead. There are valid cases were we can fault on a user address from the kernel without pcb_onfault being set.
Approved by: re (blanket)
|
147249 |
10-Jun-2005 |
cognet |
Remove the last use of pmap_initialized.
|
147217 |
10-Jun-2005 |
alc |
Introduce a procedure, pmap_page_init(), that initializes the vm_page's machine-dependent fields. Use this function in vm_pageq_add_new_page() so that the vm_page's machine-dependent and machine-independent fields are initialized at the same time.
Remove code from pmap_init() for initializing the vm_page's machine-dependent fields.
Remove stale comments from pmap_init().
Eliminate the Boolean variable pmap_initialized from the alpha, amd64, i386, and ia64 pmap implementations. Its use is no longer required because of the above changes and earlier changes that result in physical memory that is being mapped at initialization time being mapped without pv entries.
Tested by: cognet, kensmith, marcel
|
147191 |
09-Jun-2005 |
jkoshy |
MFP4:
- Implement sampling modes and logging support in hwpmc(4).
- Separate MI and MD parts of hwpmc(4) and allow sharing of PMC implementations across different architectures. Add support for P4 (EMT64) style PMCs to the amd64 code.
- New pmcstat(8) options: -E (exit time counts) -W (counts every context switch), -R (print log file).
- pmc(3) API changes, improve our ability to keep ABI compatibility in the future. Add more 'alias' names for commonly used events.
- bug fixes & documentation.
|
147171 |
09-Jun-2005 |
cognet |
Use tabs, not spaces.
Reported by: ru
|
147168 |
09-Jun-2005 |
cognet |
Add ata stuff.
|
147166 |
09-Jun-2005 |
cognet |
- MFp4: modify slightly the arm intr API, there's arm CPUs with more than 32 interrupts. - Implement teardown methods where appropriate.
|
147114 |
07-Jun-2005 |
cognet |
Add a new arm-specific option, ARM_USE_SMALL_ALLOC. If defined, it provides an implementation of uma_small_alloc() which tries to preallocate memory 1MB per 1MB, and maps it into a section mapping.
|
146948 |
03-Jun-2005 |
cognet |
Bring in bits I forgot while importing write back support for arm9.
|
146932 |
03-Jun-2005 |
cognet |
Remove a useless printf.
|
146794 |
29-May-2005 |
marcel |
Create nexus in configure_first() instead of in configure(). This makes sure that sysinit tasks that run after configure_first(), but before configure() have a nexus to hang devices off.
|
146790 |
29-May-2005 |
marcel |
Call cninit_finish() and set cold to 0 in configure_final() instead of in configure(). Call cninit_finish() before setting cold to 0. This is how it's done for other platforms. Be alike to avoid problems.
|
146734 |
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
146668 |
27-May-2005 |
cognet |
Remove pmap_deactivate(), we do not use it.
|
146649 |
26-May-2005 |
cognet |
s/_KLD_MODULE/KLD_MODULE/
|
146648 |
26-May-2005 |
cognet |
Don't enable interrupts in the dispatcher, there's no need to do so.
|
146647 |
26-May-2005 |
cognet |
Don't call vm_page_dirty() in pmap_nuke_pv(), it's not the place to do so, and it leads to funny things, such as pmap_remove_all() marking the page as dirty.
|
146619 |
25-May-2005 |
cognet |
Remove bits specific to CPUs we won't support (< armv4).
|
146618 |
25-May-2005 |
cognet |
Increase the refresh rate.
|
146605 |
24-May-2005 |
cognet |
MFp4: Setup arm9 to write back by default.
Obtained from: NetBSD
|
146604 |
24-May-2005 |
cognet |
Remove kcopy(), we don't use it.
|
146600 |
24-May-2005 |
cognet |
We need to decrease p->p_lock after vm_fault() has been called.
|
146599 |
24-May-2005 |
cognet |
Correctly setup the UND stack in cpu_set_upcall(), and the trapframe in cpu_thread_setup(), as done in cpu_fork().
|
146597 |
24-May-2005 |
cognet |
- Try to avoid calling malloc() in bus_dmamap_create() and bus_dmamem_alloc() for the dmamap by using static dmamaps. - Don't do anything for BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTWRITE in bus_dmamap_sync(), it's not needed anymore.
|
146596 |
24-May-2005 |
cognet |
Write back affected pages in pmap_qremove() as well. This removes the need 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.
|
146595 |
24-May-2005 |
cognet |
Use a more sane value for HZ.
|
146594 |
24-May-2005 |
cognet |
Use asm versions of in_cksum() and friends.
|
146592 |
24-May-2005 |
cognet |
Asm version of bswap16().
Obtained from: NetBSD
|
146591 |
24-May-2005 |
cognet |
Make sure we clean the RAS start address once we're done. This fixes the random segfaults which occurs at high interrupts rate.
|
146122 |
11-May-2005 |
cognet |
Don't forget to copy the TP when forking, or bad things will happen to the child process if it tries to use threads.
|
145594 |
27-Apr-2005 |
cognet |
Allocating the memory for the kernel stack one time is enough.
|
145452 |
23-Apr-2005 |
cognet |
Don't use fusufault in casuptr(), as it assumes the current PCB will be stored in r2, which can't be easily done with casuptr(). Introduce casuptrfault instead.
|
145433 |
23-Apr-2005 |
davidxu |
Change cpu_set_kse_upcall to more generic style, so we can reuse it in other codes. Add cpu_set_user_tls, use it to tweak user register and setup user TLS. I ever wanted to merge it into cpu_set_kse_upcall, but since cpu_set_kse_upcall is also used by M:N threads which may not need this feature, so I wrote a separated cpu_set_user_tls.
|
145332 |
20-Apr-2005 |
marcel |
Add empty header (except of the multiple-inclusion protection) to get hwpmc(4) to compile on this platform.
|
145253 |
18-Apr-2005 |
imp |
Break out the definition of bus_space_{tag,handle}_t and a few other types into _bus.h to help with name space polution from including all of bus.h. In a few days, I'll commit changes to the MI code to take advantage of thse sepration (after I've made sure that these changes don't break anything in the main tree, I've tested in my trees, but you never know...).
Suggested by: bde (in 2002 or 2003 I think) Reviewed in principle by: jhb
|
145071 |
14-Apr-2005 |
cognet |
Unbreak the vector_page == 0x00000000 case. Map the vector page L1PT into the kernel domain for each pmap, as we don't update the page table when we're switching to a kernel thread, but we do however update the DACR.
|
145017 |
13-Apr-2005 |
cognet |
pmap_update() is gone.
|
144971 |
12-Apr-2005 |
jhb |
Use PCPU_LAZY_INC() for cnt.v_{intr,trap,syscalls} rather than atomic operations in some places and simple non-per CPU math in others.
|
144967 |
12-Apr-2005 |
cognet |
We have an asm version of bcmp(), so we could use it as well.
|
144763 |
07-Apr-2005 |
cognet |
Don't announce the range SDRAM_START-freemempos until I figure out what's going on, it produces random memory corruption.
|
144762 |
07-Apr-2005 |
cognet |
pmap_update() is gone.
|
144761 |
07-Apr-2005 |
cognet |
Import a basic implementation of the restartable atomic sequences to provide atomic operations to userland (this is OK for UP only, but SMP is still so far away).
|
144760 |
07-Apr-2005 |
cognet |
- Try harder to report dirty page. - Garbage-collect pmap_update(), it became quite useless.
|
144637 |
04-Apr-2005 |
jhb |
Divorce critical sections from spinlocks. Critical sections as denoted by critical_enter() and critical_exit() are now solely a mechanism for deferring kernel preemptions. They no longer have any affect on interrupts. This means that standalone critical sections are now very cheap as they are simply unlocked integer increments and decrements for the common case.
Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter() and spinlock_exit(). This KPI is responsible for providing whatever MD guarantees are needed to ensure that a thread holding a spin lock won't be preempted by any other code that will try to lock the same lock. For now all archs continue to block interrupts in a "spinlock section" as they did formerly in all critical sections. Note that I've also taken this opportunity to push a few things into MD code rather than MI. For example, critical_fork_exit() no longer exists. Instead, MD code ensures that new threads have the correct state when they are created. Also, we no longer try to fixup the idlethreads for APs in MI code. Instead, each arch sets the initial curthread and adjusts the state of the idle thread it borrows in order to perform the initial context switch.
This change is largely a big NOP, but the cleaner separation it provides will allow for more efficient alternative locking schemes in other parts of the kernel (bare critical sections rather than per-CPU spin mutexes for per-CPU data for example).
Reviewed by: grehan, cognet, arch@, others Tested on: i386, alpha, sparc64, powerpc, arm, possibly more
|
143857 |
20-Mar-2005 |
cognet |
Bring in a version of float.h more correct for softfloat.
|
143773 |
17-Mar-2005 |
cognet |
Bring back some of the cleanups and fixes jmg did in the TS7200 port.
|
143728 |
17-Mar-2005 |
cognet |
Use PCIR_BARS instead of PCIR_MAPS.
|
143724 |
16-Mar-2005 |
cognet |
Introduce a new function, pmap_wb_page(), which check all userland mappings for a given page and, if the pmap is the current pmap, write back the associated cache line. Use pmap_wb_page in pmap_qenter() instead of inconditionally write back/invalidating the data cache.
|
143682 |
16-Mar-2005 |
jmg |
MFp4: add in making fiq's work by coping to the correct page incase we have the vectors relocated high..
|
143681 |
16-Mar-2005 |
jmg |
fix up white space, I had a simple comment fix, but I might as well do the rest while I'm here...
|
143671 |
16-Mar-2005 |
jmg |
make bus_dmamem_alloc always allocate a new map like we are suppose to.. This was found when I tried to run the usb code on my arm board...
Approved by: cognet
|
143655 |
15-Mar-2005 |
jmg |
fix arm wrt to busdma...
also wrap the two macros that have bare if's w/ do {} while(0) so that my epe driver doesn't get a warning about braces around confused else...
|
143598 |
14-Mar-2005 |
scottl |
Refactor the bus_dma header files so that the interface is described in sys/bus_dma.h instead of being copied in every single arch. This slightly reorders a flag that was specific to AXP and thus changes the ABI there. The interface still relies on bus_space definitions found in <machine/bus.h> so it cannot be included on its own yet, but that will be fixed at a later date. Add an MD <machine/bus_dma.h> for ever arch for consistency and to allow for future MD augmentation of the API. sparc64 makes heavy use of this right now due to its different bus_dma implemenation.
|
143294 |
08-Mar-2005 |
mux |
Fixup KTR traces.
|
143284 |
08-Mar-2005 |
mux |
Use __func__ in the KTR_BUSDMA traces. This avoids copy and paste errors like in the bus_dmamap_load_mbuf_sg() case where we were wrongly displaying the function name as bus_dmamap_load_mbuf.
|
143199 |
07-Mar-2005 |
mux |
Fix typo.
|
143193 |
06-Mar-2005 |
cognet |
Use [ldr|str]t instead of [ldr|str] when accessing ARM_TP_ADDRESS.
|
143192 |
06-Mar-2005 |
cognet |
Make sure ARM_TP_ADDRESS is accessible right now by calling pmap_fault_fixup, as we can't rely on a trap happening, as it is done normally. While I'm there, uncomment the call to cpu_dcache_wbinv_range() in pmap_kenter_internal, as we don't call cpu_dcache_wbinv_all() there anymore.
|
143175 |
06-Mar-2005 |
cognet |
Unlike NetBSD's bcopy(), our bcopy allows the two strings to overlap, even in kernel. So bring in the userland version, instead of just calling memcpy.
|
143116 |
03-Mar-2005 |
cognet |
Handle endianness correctly.
Spotted out by: jmg
|
143063 |
02-Mar-2005 |
joerg |
netchild's mega-patch to isolate compiler dependencies into a central place.
This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.
By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course.
Submitted by: netchild Reviewed by: various developers on arch@, some time ago
|
142955 |
01-Mar-2005 |
cognet |
In cpu_throw(), correctly calculate td->td_md.md_tp. In cpu_switch(), set the DACR even if we're switching to a kernel thread.
|
142947 |
01-Mar-2005 |
cognet |
Introduce realmem.
|
142570 |
26-Feb-2005 |
cognet |
Instead of using sysarch() to store-retrieve the tp, add a magic address, 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
|
142528 |
26-Feb-2005 |
cognet |
Add the field in the md part of the struct thread required by ARM_[GET|SET]_TP.
|
142519 |
25-Feb-2005 |
cognet |
Implement two new sysarch for arm, ARM_GET_TP and ARM_SET_TP, to work around the lack of tls on arm.
|
142518 |
25-Feb-2005 |
cognet |
Make sure casuptr() reset pcb->pcb_onfault when returning.
|
142145 |
20-Feb-2005 |
cognet |
MFp4: get the code that set the pc correctly to work, remove a few IQ31244 specific mappings from locore.S, re-organize iq31244_machdep.c to work with the new locore.S
Spotted out by: jmg
|
142116 |
20-Feb-2005 |
cognet |
Removing the #endif as well sounds like a good idea.
|
142115 |
20-Feb-2005 |
cognet |
In cpufunc_control, uncomment the code responsible for returning the old state of the control register.
|
142107 |
19-Feb-2005 |
ru |
Use a common multi-inclusion protection, and add such a protection to alpha/include/exec.h.
|
142050 |
18-Feb-2005 |
cognet |
Support high vectors for arm9.
Obtained from: NetBSD
|
141820 |
13-Feb-2005 |
cognet |
Define NIRQ to 64 for CPU_ARM9, because Cirrus Logic EP93XX cores provides 64 irqs. This should be re-thought later.
|
141819 |
13-Feb-2005 |
cognet |
Remove unused prototype.
|
141817 |
13-Feb-2005 |
cognet |
Remove redondant includes.
|
141813 |
13-Feb-2005 |
cognet |
Don't prototype pmap_kenter().
|
141551 |
09-Feb-2005 |
jmg |
move pmap.h after vm.h include... some of the headers from pmap.h depend upon vm.h
|
141378 |
06-Feb-2005 |
njl |
Finish the job of sorting all includes and fix the build by including malloc.h before proc.h on sparc64. Noticed by das@
Compiled on: alpha, amd64, i386, pc98, sparc64
|
141249 |
04-Feb-2005 |
njl |
Sort includes a little so that bus.h comes before cpu.h (for device_t).
|
141237 |
04-Feb-2005 |
njl |
Add an implementation of cpu_est_clockrate(9). This function estimates the current clock frequency for the given CPU id in units of Hz.
|
141094 |
01-Feb-2005 |
njl |
Sort functions.
|
140683 |
23-Jan-2005 |
cognet |
Make sure we can boot both with and without MMU enabled.
|
140682 |
23-Jan-2005 |
cognet |
Define bus_dmamap_load_buffer before bus_dmamap_load to make gcc happy.
|
140680 |
23-Jan-2005 |
cognet |
Fix compile for !KTR.
|
140533 |
20-Jan-2005 |
cognet |
Remove references to non-existing symbols DO_corb and got_mmu. While I'm there, remove dead code.
|
140478 |
19-Jan-2005 |
cognet |
Fix compile for __ARMEB__.
|
140462 |
19-Jan-2005 |
cognet |
MFpowerpc: Work around the problem of returning a 32 bits value from __syscall() on a 32 bits big-endian arch.
Spotted out by: grehan
|
140425 |
18-Jan-2005 |
cognet |
Start to support the big endian case as well.
|
140350 |
16-Jan-2005 |
cognet |
Add a new sysctl, hw.sevenseg.freq, to control the update frequency.
|
140349 |
16-Jan-2005 |
cognet |
Erm, don't forget to store the mbuf in the dmamap in bus_dmamap_load_mbuf_sg(), so that bus_dmamap_sync() knows what to invalidate. This makes em(4) work again. While I'm there, remove the unused "first" variable.
|
140313 |
15-Jan-2005 |
cognet |
Add support for KTR_BUSDMA.
|
140312 |
15-Jan-2005 |
cognet |
Add the prototype for bus_dmamap_load_mbuf_sg().
Spotted out by: scottl
|
140310 |
15-Jan-2005 |
cognet |
MFi386: add bus_dmamap_load_mbuf_sg().
|
140309 |
15-Jan-2005 |
cognet |
Add the 7 seg display.
|
140308 |
15-Jan-2005 |
cognet |
Add support for the IQ31244 7 seg display.
Obtained from: NetBSD
|
140307 |
15-Jan-2005 |
cognet |
Start the license statement with /*-
|
140305 |
15-Jan-2005 |
cognet |
Use device_set_desc().
|
140304 |
15-Jan-2005 |
cognet |
Add the i80321 watchdog.
|
140303 |
15-Jan-2005 |
cognet |
Add a driver for the i80321 watchdog.
Obtained from: NetBSD
|
140001 |
10-Jan-2005 |
cognet |
Add support for ptrace() and gdb breakpoints.
|
140000 |
10-Jan-2005 |
cognet |
Don't assume pmap_update() will cpwait for us, pmap_update will disappear soon.
|
139735 |
05-Jan-2005 |
imp |
Start all license statements with /*-
|
139241 |
23-Dec-2004 |
alc |
Modify pmap_enter_quick() so that it expects the page queues to be locked on entry and it assumes the responsibility for releasing the page queues lock if it must sleep.
Remove a bogus comment from pmap_enter_quick().
Using the first change, modify vm_map_pmap_enter() so that the page queues lock is acquired and released once, rather than each time that a page is mapped.
|
139117 |
21-Dec-2004 |
cognet |
- The IQ80321 has a jumper which changes the PCI device id from 4 to 8 for the GigE controller, so handle this. - Use the outbound window 0 if the PCI mem requested is in its range, instead of inconditionally use the outbound window 1. This should be enough to get FreeBSD/arm to work on the IQ80321 board as well.
Reported and tested by: Jia-Shiun Li <jiashiun at gmail dot com>
|
139022 |
18-Dec-2004 |
cognet |
Update the StrongArm port to match the current code. - Implement arm_mask_irqs and arm_unmask_irqs - Provide the available physical address range after pmap_bootstrap allocated things, instead or before, or bad things happen.
|
139021 |
18-Dec-2004 |
cognet |
Make sure gcc doesn't generate something such as swp r3, r4, [r3] for __swp, as it has unpredictable results.
|
138897 |
15-Dec-2004 |
alc |
In the common case, pmap_enter_quick() completes without sleeping. In such cases, the busying of the page and the unlocking of the containing object by vm_map_pmap_enter() and vm_fault_prefault() is unnecessary overhead. To eliminate this overhead, this change modifies pmap_enter_quick() so that it expects the object to be locked on entry and it assumes the responsibility for busying the page and unlocking the object if it must sleep. Note: alpha, amd64, i386 and ia64 are the only implementations optimized by this change; arm, powerpc, and sparc64 still conservatively busy the page and unlock the object within every pmap_enter_quick() call.
Additionally, this change is the first case where we synchronize access to the page's PG_BUSY flag and busy field using the containing object's lock rather than the global page queues lock. (Modifications to the page's PG_BUSY flag and busy field have asserted both locks for several weeks, enabling an incremental transition.)
|
138857 |
14-Dec-2004 |
cognet |
Enable interrupts once the active ones have been masked.
|
138856 |
14-Dec-2004 |
cognet |
Update the sp after popping the regs. This is a good candidate for the golden pointy hat awards.
|
138751 |
12-Dec-2004 |
cognet |
Save a few more cycles in cpu_switch() and cpu_throw().
|
138710 |
11-Dec-2004 |
cognet |
Fix style.
|
138709 |
11-Dec-2004 |
cognet |
Add entries to trace syscalls with KTR.
|
138683 |
11-Dec-2004 |
cognet |
Fix compilation with INVARIANTS.
|
138665 |
10-Dec-2004 |
cognet |
s/RETEQ/RETeq/.
|
138525 |
07-Dec-2004 |
cognet |
Include <sys/signalvar.h> for trapsignal().
|
138417 |
05-Dec-2004 |
cognet |
Make sure to map the whole kernel into 1MB pages. Try to use the remaining memory for things such as the kernel stack.
|
138415 |
05-Dec-2004 |
cognet |
Reactivate the use of the minidata cache.
|
138414 |
05-Dec-2004 |
cognet |
Do not change the page directory and do not flush the TLB when switching to a kernel thread.
|
138413 |
05-Dec-2004 |
cognet |
Remove an unused field from the struct pv_entry. While I'm there, fix style.
|
138328 |
02-Dec-2004 |
cognet |
Include <sys/signalvar.h> for trapsignal().
|
138129 |
27-Nov-2004 |
das |
Don't include sys/user.h merely for its side-effect of recursively including other headers.
|
138022 |
23-Nov-2004 |
cognet |
Enable interrupts as soon as the pending interrupts have been masked.
|
138021 |
23-Nov-2004 |
cognet |
Use ns8250.
|
137977 |
21-Nov-2004 |
cognet |
Cleanup.
|
137976 |
21-Nov-2004 |
cognet |
Set the frame pointer to 0 in fork_trampoline().
|
137975 |
21-Nov-2004 |
cognet |
Implement breakpoints and single stepping on arm.
Obtained from: NetBSD
|
137941 |
20-Nov-2004 |
cognet |
Remove useless code.
|
137940 |
20-Nov-2004 |
cognet |
Implement enough to be able to enter and leave DDB.
|
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@
|
137918 |
20-Nov-2004 |
das |
Remove some references to U area here while trying not to break anything. Someone with ARM hardware could do a lot more to untangle this code.
Reviewed by: arch@
|
137917 |
20-Nov-2004 |
das |
Remove references to U area and garbage collect includes.
Reviewed by: arch@
|
137912 |
20-Nov-2004 |
das |
U areas are going away, so don't allocate one for process 0.
Reviewed by: arch@
|
137903 |
20-Nov-2004 |
cognet |
Increase cnt.v_syscall and cnt.v_trap when needed.
|
137838 |
18-Nov-2004 |
cognet |
Move KERNPHYSADDR and KERNVIRTADDR from std.i80321 to std.iq31244. Use the correct KERNPHYSADDR.
|
137760 |
16-Nov-2004 |
cognet |
Simplify a bit bus_dmamap_load_buffer by removing the "first" parameter, use nseg == -1 instead.
Obtained from: NetBSD
|
137758 |
15-Nov-2004 |
cognet |
MFi386: - inlina bus_dmamap_load_buffer - Directly pass the pmap to bus_dmamap_load_buffer, instead of the struct thread
|
137665 |
13-Nov-2004 |
cognet |
Remove debugging printf.
|
137664 |
13-Nov-2004 |
cognet |
Don't forget to clear the PG_WRITEABLE flag when appropriate.
|
137663 |
13-Nov-2004 |
cognet |
Use uma_prealloc() on the l2table_zone to prevent a LOR at startup.
|
137629 |
12-Nov-2004 |
cognet |
Implement interrupt counting, so that vmstat -i work.
|
137552 |
10-Nov-2004 |
cognet |
Don't forget to include opt_vm.h.
|
137551 |
10-Nov-2004 |
cognet |
Convert the IQ31244 code to use ARM32_NEW_VM_LAYOUT.
|
137549 |
10-Nov-2004 |
cognet |
Invalidate the data cache in pmap_qremove() instead of in pmap_kenter(), and in pmap_enter_quick() instead of pmap_enter().
|
137498 |
10-Nov-2004 |
trhodes |
Remove __P here too.
Ok'ed by: cognet
|
137463 |
09-Nov-2004 |
cognet |
Use the RET macro.
|
137462 |
09-Nov-2004 |
cognet |
Import a RET macro, that will use bx if the arch supports it.
Obtained from: NetBSD
|
137372 |
08-Nov-2004 |
alc |
Introduce two new options, "CPU private" and "no wait", to sf_buf_alloc(). Change the spelling of the "catch" option to be consistent with the new options. Implement the "no wait" option. An implementation of the "CPU private" for i386 will be committed at a later date.
|
137363 |
07-Nov-2004 |
cognet |
Add device mem in config files.
|
137362 |
07-Nov-2004 |
cognet |
Import md bits for mem(4) on arm. While I'm there, cleanup a bit pmap.h.
|
137341 |
07-Nov-2004 |
cognet |
Remove useless code.
|
137282 |
05-Nov-2004 |
cognet |
Disable interrupts for atomic_cmpset_32, this one is just not atomic. Don't export it to userland.
|
137275 |
05-Nov-2004 |
cognet |
Copy the syscall args in a tmp variable instead of directly using the trapframe, as it can be modified in the syscall. Call thread_user_enter() when appropriate.
|
137274 |
05-Nov-2004 |
cognet |
Save a few cycles in context switch. Update comments to reflect reality.
|
137273 |
05-Nov-2004 |
cognet |
If we're still running at the physical address, jump to the virtual address instead before calling initarm(). This removes the need to map virtual == physical in initarm().
|
137272 |
05-Nov-2004 |
cognet |
Be more verbose about cache capacities.
|
137271 |
05-Nov-2004 |
cognet |
Implement casuptr.
|
137270 |
05-Nov-2004 |
cognet |
Call pmap_pte_init_arm9 instead of pmap_pte_init_generic if ARM9_CACHE_WRITE_THROUGH is defined.
|
137264 |
05-Nov-2004 |
cognet |
In cpu_critical_fork_exit(), make sure to set td_md.md_critnest so that interrupts will be enabled.
Spotted out by: jhb
|
137229 |
04-Nov-2004 |
cognet |
Protect the function declarations with #ifdef _KERNEL.
|
137228 |
04-Nov-2004 |
cognet |
Directly use __pcpu for PCPU_* instead of pcpup.
|
137227 |
04-Nov-2004 |
cognet |
Decrease KSTACK_PAGES and UAREA_PAGES.
|
137226 |
04-Nov-2004 |
cognet |
Use interrupts_disable() and interrupts_restore() as intr_disable() and intr_restore() instead of re-implement it.
|
137224 |
04-Nov-2004 |
cognet |
Don't barf if no CPU type is defined while compiling kernel modules.
|
137223 |
04-Nov-2004 |
cognet |
Implement get_cyclecount().
|
137222 |
04-Nov-2004 |
cognet |
Try to implement atomic operations using swp, instead of disabling interrupts.
|
137216 |
04-Nov-2004 |
cognet |
Use casts to enforce the return type of bswap16() and bswap32().
|
137215 |
04-Nov-2004 |
cognet |
Implement cpu_thread_siginfo() and set_mcontext(). Nuke getframe(), and choose which stack to use directly in sendsig().
|
137214 |
04-Nov-2004 |
cognet |
Implement cpu_set_upcall and cpu_set_upcall_kse. Calculate td_frame and td_pcb the right way in cpu_thread_setup.
|
137211 |
04-Nov-2004 |
cognet |
Get kernel modules to work.
|
137137 |
02-Nov-2004 |
andre |
Reduce annoying SCSI probing delay from 15 to 5 seconds in all GENRIC kernels.
Discussed on: -current
|
137117 |
01-Nov-2004 |
jhb |
- Change the ddb paging "support" to use a variable (db_lines_per_page) to control the number of lines per page rather than a constant. The variable can be examined and changed in ddb as '$lines'. Setting the variable to 0 will effectively turn off paging. - Change db_putchar() to force out pending whitespace before outputting newlines and carriage returns so that one can rub out content on the current line via '\r \r' type strings. - Change the simple pager to rub out the --More-- prompt explicitly when the routine exits. - Add some aliases to the simple pager to make it more compatible with more(1): 'e' and 'j' do a single line. 'd' does half a page, and 'f' does a full page.
MFC after: 1 month Inspired by: kris
|
136743 |
21-Oct-2004 |
cognet |
We want to ignore BUS_DMASYNC_POSTWRITE, not BUS_DMASYNC_POSTREAD. Spotted out by: mux Pointy hat to: cognet
|
136383 |
11-Oct-2004 |
cognet |
Use a default MD_ROOT_SIZE of 65535.
|
136382 |
11-Oct-2004 |
cognet |
Use MD_ROOT_SIZE, instead of our own macro.
|
136033 |
01-Oct-2004 |
cognet |
Add optimized version of the bswap macroes for constants if __OPTIMIZED__ is defined.
|
136032 |
01-Oct-2004 |
cognet |
There's no need to turn on MALLOC_PROFILE by default.
|
135881 |
28-Sep-2004 |
cognet |
Calling fuword from fuword32 with bl and without returning after is really a bad idea. Any way I get a customized CVS template with "Pointy hat to: cognet" pre-filled ?
|
135880 |
28-Sep-2004 |
cognet |
Always invalidate the whole data cache in pmap_enter() for now. It should not be needed.
|
135879 |
28-Sep-2004 |
cognet |
Remove dead code.
|
135675 |
23-Sep-2004 |
cognet |
Add the config file for the IQ31244 board.
|
135674 |
23-Sep-2004 |
cognet |
Use the new KERNVIRTADDR and PHYSADDR options. Add KDB.
|
135669 |
23-Sep-2004 |
cognet |
Import partial support for the IQ31244 eval board (i80321 CPU). IQ80321 might work out of the box too, but I have no hardware to test. It works well enough to go multiuser. Network works, SATA does not, as I have no drive to test. Thanks to Intel for sending such a board.
Obtained from: NetBSD
|
135668 |
23-Sep-2004 |
cognet |
Add Xscale common headers.
|
135667 |
23-Sep-2004 |
cognet |
Big cleanup: get ride of the whole spl level logic, as FreeBSD doesn't use it anymore.
|
135666 |
23-Sep-2004 |
cognet |
Now that we have pmap_growkernel(), use more KVA.
|
135665 |
23-Sep-2004 |
cognet |
Remove the empty definition of struct osigcontext, as it will never be used.
|
135664 |
23-Sep-2004 |
cognet |
Remove the pcb32_cstate field of struct pcb.
|
135663 |
23-Sep-2004 |
cognet |
Declare sigcode and szsigcode.
|
135662 |
23-Sep-2004 |
cognet |
Define VM_PROT_READ_IS_EXEC.
|
135661 |
23-Sep-2004 |
cognet |
Implement _mcount().
Obtained from: NetBSD
|
135660 |
23-Sep-2004 |
cognet |
Define STACKALIGNBYTES and STACKALIGN.
|
135659 |
23-Sep-2004 |
cognet |
We are using _mcount, not __mcount. Remove the !__ELF__ case.
|
135658 |
23-Sep-2004 |
cognet |
Use sf_bufs for uiomove_fromphys().
|
135657 |
23-Sep-2004 |
cognet |
On Xscale, use the minicache for the kernel stack.
|
135656 |
23-Sep-2004 |
cognet |
Make sure to call cred_update_thread() if needed. Add partial support for KTRACE.
|
135655 |
23-Sep-2004 |
cognet |
Implement cpu_throw().
Obtained from: NetBSD
|
135654 |
23-Sep-2004 |
cognet |
Remove unused macroes. Add user, btrap, etrap, bintr and eintrt in the GPROF case.
|
135653 |
23-Sep-2004 |
cognet |
Implement sigreturn().
|
135652 |
23-Sep-2004 |
cognet |
Add the hw.machine sysctl.
|
135651 |
23-Sep-2004 |
cognet |
Remove definitions related to the pmap cache state, and add TDF_NEEDRESCHED.
|
135650 |
23-Sep-2004 |
cognet |
Add new functions to know which irqs are pending, and to mask and unmask interrupts, as these are CPU specific. If the interrupt handler is not marked as INTR_FAST, don't unmask the interrupt until it as been serviced.
|
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.
|
135648 |
23-Sep-2004 |
cognet |
Use sigcode.
|
135647 |
23-Sep-2004 |
cognet |
In db_stack_trace_cmd, remove the "pc" variable, we don't need it.
|
135646 |
23-Sep-2004 |
cognet |
Use the right path for xscale files.
|
135645 |
23-Sep-2004 |
cognet |
Remove bus_space_vaddr(), it does not exists in FreeBSD.
|
135644 |
23-Sep-2004 |
cognet |
Don't attempt to manage our own segment list, and just remember the buffers provided.
Obtained from: NetBSD
|
135643 |
23-Sep-2004 |
cognet |
Use the right path for the bcopyinout_xscale.S file.
|
135642 |
23-Sep-2004 |
cognet |
Add MD syscalls to sync the icache and to drain the write buffer.
Obtained from: NetBSD
|
135641 |
23-Sep-2004 |
cognet |
Implement pmap_growkernel() and pmap_extract_and_hold(). Remove the cache state logic : right now, it provides more problems than it helps. Add helper functions for mapping devices while bootstrapping. Reorganize the code a bit, and remove dead code.
Obtained from: NetBSD (partially)
|
135640 |
23-Sep-2004 |
cognet |
Map the kernel very early if needed. Implement sigcode.
|
135529 |
20-Sep-2004 |
jhb |
- Add support for "paging" in stack trace output. That is, when you do a stack trace from ddb, the output will pause with a '--More--' prompt every 18 lines. If you hit Enter, it will print another line and prompt again. If you hit space it will output another page and then prompt. If you hit 'q' or 'x' it will abort the rest of the stack trace. - Fix the sparc64 userland stack trace to honor the total count of lines to print. This is useful if your trace happens to walk back onto 0xdeadc0de and gets stuck in an endless loop.
MFC after: 1 month Tested on: i386, alpha, sparc64
|
134934 |
08-Sep-2004 |
scottl |
Fix a problem with tag->boundary inheritence that has existed since day one and was propagated to nearly every platform. The boundary of the child needs to consider the boundary of the parent and pick the minimum of the two, not the maximum. However, if either is 0 then pick the appropriate one. This bug was exposed by a recent change to ATA, which should now be fixed by this change. The alignment and maxsegsz tag attributes likely also need a similar review in the near future.
This is a MT5 candidate.
Reviewed by: marcel Submitted by: sos (in part)
|
134791 |
05-Sep-2004 |
julian |
Refactor a bunch of scheduler code to give basically the same behaviour but with slightly cleaned up interfaces.
The KSE structure has become the same as the "per thread scheduler private data" structure. In order to not make the diffs too great one is #defined as the other at this time.
The KSE (or td_sched) structure is now allocated per thread and has no allocation code of its own.
Concurrency for a KSEGRP is now kept track of via a simple pair of counters rather than using KSE structures as tokens.
Since the KSE structure is different in each scheduler, kern_switch.c is now included at the end of each scheduler. Nothing outside the scheduler knows the contents of the KSE (aka td_sched) structure.
The fields in the ksegrp structure that are to do with the scheduler's queueing mechanisms are now moved to the kg_sched structure. (per ksegrp scheduler private data structure). In other words how the scheduler queues and keeps track of threads is no-one's business except the scheduler's. This should allow people to write experimental schedulers with completely different internal structuring.
A scheduler call sched_set_concurrency(kg, N) has been added that notifies teh scheduler that no more than N threads from that ksegrp should be allowed to be on concurrently scheduled. This is also used to enforce 'fainess' at this time so that a ksegrp with 10000 threads can not swamp a the run queue and force out a process with 1 thread, since the current code will not set the concurrency above NCPU, and both schedulers will not allow more than that many onto the system run queue at a time. Each scheduler should eventualy develop their own methods to do this now that they are effectively separated.
Rejig libthr's kernel interface to follow the same code paths as linkse for scope system threads. This has slightly hurt libthr's performance but I will work to recover as much of it as I can.
Thread exit code has been cleaned up greatly. exit and exec code now transitions a process back to 'standard non-threaded mode' before taking the next step. Reviewed by: scottl, peter MFC after: 1 week
|
134398 |
27-Aug-2004 |
marcel |
Move the kernel-specific logic to adjust frompc from MI to MD. For these two reasons: 1. On ia64 a function pointer does not hold the address of the first instruction of a functions implementation. It holds the address of a function descriptor. Hence the user(), btrap(), eintr() and bintr() prototypes are wrong for getting the actual code address. 2. The logic forces interrupt, trap and exception entry points to be layed-out contiguously. This can not be achieved on ia64 and is generally just bad programming.
The MCOUNT_FROMPC_USER macro is used to set the frompc argument to some kernel address which represents any frompc that falls outside the kernel text range. The macro can expand to ~0U to bail out in that case. The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to some kernel address to represent a call to a trap or interrupt handler. This to avoid that the trap or interrupt handler appear to be called from everywhere in the call graph. The macro can expand to ~0U to prevent adjusting frompc. Note that the argument is selfpc, not frompc.
This commit defines the macros on all architectures equivalently to the original code in sys/libkern/mcount.c. People can take it from here...
Compile-tested on: alpha, amd64, i386, ia64 and sparc64 Boot-tested on: i386
|
133464 |
11-Aug-2004 |
marcel |
Add __elfN(dump_thread). This function is called from __elfN(coredump) to allow dumping per-thread machine specific notes. On ia64 we use this function to flush the dirty registers onto the backingstore before we write out the PRSTATUS notes.
Tested on: alpha, amd64, i386, ia64 & sparc64 Not tested on: arm, powerpc
|
133453 |
10-Aug-2004 |
alc |
Add a comment describing pmap_extract_and_hold() noting that the protection check still needs implementation on arm.
|
133237 |
06-Aug-2004 |
cognet |
Use the new prototype for the zone constructor.
|
133143 |
04-Aug-2004 |
alc |
- Push down the acquisition and release of Giant into pmap_enter_quick() on those architectures without pmap locking. - Eliminate the acquisition and release of Giant in vm_map_pmap_enter().
|
133084 |
03-Aug-2004 |
mux |
Instead of calling ia32_pause() conditionally on __i386__ or __amd64__ being defined, define and use a new MD macro, cpu_spinwait(). It only expands to something on i386 and amd64, so the compiled code should be identical.
Name of the macro found by: jhb Reviewed by: jhb
|
133012 |
02-Aug-2004 |
cognet |
*blush* Fix htonl and htons.
|
133011 |
02-Aug-2004 |
cognet |
Fix comments.
Spotted out by: mux
|
132899 |
30-Jul-2004 |
alc |
- Push down the acquisition and release of Giant into pmap_protect() on those architectures without pmap locking. - Eliminate the acquisition and release of Giant from vm_map_protect().
(Translation: mprotect(2) runs to completion without touching Giant on alpha, amd64, i386 and ia64.)
|
132834 |
29-Jul-2004 |
cognet |
Don't use cast as lvalue.
|
132702 |
27-Jul-2004 |
rwatson |
Correct typo in prior commit: s/cd/td/
|
132700 |
27-Jul-2004 |
rwatson |
Pass a thread argument into cpu_critical_{enter,exit}() rather than dereference curthread. It is called only from critical_{enter,exit}(), which already dereferences curthread. This doesn't seem to affect SMP performance in my benchmarks, but improves MySQL transaction throughput by about 1% on UP on my Xeon.
Head nodding: jhb, bmilekic
|
132560 |
22-Jul-2004 |
alc |
MFi386 revision 1.421 - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in pmap_mapdev(). See revision 1.140 of kern/sys_pipe.c for a detailed rationale.
|
132516 |
21-Jul-2004 |
cognet |
Do not declare curpcb.
|
132514 |
21-Jul-2004 |
cognet |
Use the kernel pmap if no thread is provided.
|
132513 |
21-Jul-2004 |
cognet |
Define pmap_page_is_mapped().
|
132503 |
21-Jul-2004 |
cognet |
Do not use NULL as a malloc type for contigmalloc().
|
132482 |
21-Jul-2004 |
marcel |
Unify db_stack_trace_cmd(). All it did was look up the thread given the thread ID and call db_trace_thread(). Since arm has all the logic in db_stack_trace_cmd(), rename the new DB_COMMAND function to db_stack_trace to avoid conflicts on arm. While here, have db_stack_trace parse its own arguments so that we can use a more natural radix for IDs. If the ID is not a thread ID, or more precisely when no thread exists with the ID, try if there's a process with that ID and return the first thread in it. This makes it easier to print stack traces from the ps output.
requested by: rwatson@ tested on: amd64, i386, ia64
|
132474 |
20-Jul-2004 |
cognet |
Implement ptrace_set_pc(). Add a stub for ptrace_clear_single_step().
|
132473 |
20-Jul-2004 |
cognet |
Remove astpending, it has not been used for a long time.
|
132472 |
20-Jul-2004 |
cognet |
Uncomment the vector relocation code.
|
132471 |
20-Jul-2004 |
cognet |
Nuke disable_intr() and enable_intr(), as it already exists elsewhere.
|
132402 |
19-Jul-2004 |
cognet |
Make kdb_backtrace() sort of work.
|
132383 |
19-Jul-2004 |
das |
Make FLT_ROUNDS correctly reflect the dynamic rounding mode.
|
132119 |
13-Jul-2004 |
cognet |
In pmap_remove_pages(), when the pv_list is entry, we want to clean the PG_WRITEABLE flag, not the PG_REFERENCED flag.
Submitted by: alc
|
132082 |
13-Jul-2004 |
alc |
Push down the acquisition and release of the page queues lock into pmap_remove_pages(). (The implementation of pmap_remove_pages() is optional. If pmap_remove_pages() is unimplemented, the acquisition and release of the page queues lock is unnecessary.)
Remove spl calls from the alpha, arm, and ia64 pmap_remove_pages().
|
132059 |
12-Jul-2004 |
cognet |
Update to kdb.
|
132058 |
12-Jul-2004 |
cognet |
Remove the kbd_trap() declaration.
|
132057 |
12-Jul-2004 |
cognet |
Protect setjmp.h with #ifndef _MACHINE_SETJMP_H_.
|
132056 |
12-Jul-2004 |
cognet |
Forward declare "struct pcb", so that one does not need to include <machine/pcb.h> before including <machine/pmap.h>.
|
132055 |
12-Jul-2004 |
cognet |
Implement a stub breakpoint().
|
132054 |
12-Jul-2004 |
cognet |
Implement makectx().
|
132053 |
12-Jul-2004 |
cognet |
Prototype makectx().
|
132052 |
12-Jul-2004 |
cognet |
Import bus_memio.h and bus_pio.h for arm.
|
132051 |
12-Jul-2004 |
cognet |
Import a kdb.h for arm, which contains stubs right now.
|
131837 |
08-Jul-2004 |
cognet |
Define NSFBUFS and use it.
|
131658 |
05-Jul-2004 |
alc |
Correct pmap_extract()'s return type. It should be vm_paddr_t, not vm_offset_t.
|
131496 |
02-Jul-2004 |
cognet |
ithread_schedule() now only takes one argument.
|
131495 |
02-Jul-2004 |
cognet |
Define __RMAN_RESOURCE_VISIBLE where appropriate.
|
131231 |
28-Jun-2004 |
cognet |
Remove unused includes.
Spotted out by: pjd
|
130745 |
19-Jun-2004 |
cognet |
Fix compilation for Xscale.
|
130734 |
19-Jun-2004 |
cognet |
Include sys/module.h.
|
130733 |
19-Jun-2004 |
cognet |
I happened to have a sys/pool.h file in my tree, but most people do not, so nuke this useless include.
|
130645 |
17-Jun-2004 |
cognet |
Nuke dead code.
|
130644 |
17-Jun-2004 |
cognet |
Nuke bus_space_mmap(), as it does not exist in FreeBSD.
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130164 |
06-Jun-2004 |
phk |
Remove filename+line number from panic messages.
|
130028 |
03-Jun-2004 |
tjr |
Remove checks for curthread == NULL - it can't happen.
|
130023 |
03-Jun-2004 |
tjr |
Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid having to acquire sched_lock when manipulating it in lockmgr(), uiomove(), and uiomove_fromphys().
Reviewed by: jhb
|
129750 |
26-May-2004 |
tmm |
Retire cpu_sched_exit(); it is not used any more.
|
129580 |
22-May-2004 |
mux |
Remove two debugging printf().
On behalf of: cognet
|
129444 |
19-May-2004 |
bde |
Moved most of the "MI" definitions and declarations from <machine/profile.h> to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef for incomplete and out of date support for GUPROF in userland, as in the sparc64 version.
|
129393 |
18-May-2004 |
stefanf |
<stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no WINT_M{AX,IN} at all.
PR: 64956 Approved by: das (mentor)
|
129282 |
16-May-2004 |
peter |
Make a small revision to the api between the elf linker core and the elf_reloc() backends for two reasons. First, to support the possibility of there being two elf linkers in the kernel (eg: amd64), and second, to pass the relocbase explicitly (for relocating .o format kld files).
|
129254 |
14-May-2004 |
cognet |
Implement bcopy, memcpy and memcmp in support.S.
|
129250 |
14-May-2004 |
cognet |
Implement bzero et memset in support.S
|
129227 |
14-May-2004 |
cognet |
This is FreeBSD/arm, not FreeBSD/i386
Submitted by: ru
|
129220 |
14-May-2004 |
cognet |
Define uart_sa1110_ops and uart_sa1110_classe in .c files instead of spamming uart_cpu.h
|
129212 |
14-May-2004 |
cognet |
Implement enough of an uart driver to get serial console working.
|
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.
|
128940 |
04-May-2004 |
cognet |
Don't declare osigset_t, as it is done in sys/_sigset.h.
|
128938 |
04-May-2004 |
cognet |
Add some endianess-related functions and macros.
|
128937 |
04-May-2004 |
cognet |
Add the Elf32_Auxinfo declaretion. Define AT_*. (Maybe some of this could go in a MI header ?)
|
128936 |
04-May-2004 |
cognet |
Define __double_t and __float_t.
|
127914 |
05-Apr-2004 |
imp |
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999.
Approved by: core
|
127239 |
20-Mar-2004 |
marcel |
Introduce the cpumask_t type. The purpose of the type is to create a level of abstraction for any and all CPU mask and CPU bitmap variables so that platforms have the ability to break free from the hard limit of 32 CPUs, simply because we don't have more bits in an u_int. Note that the type is not supposed to solve massive parallelism, where the number of CPUs can be larger than the width of the widest integral type. As such, cpumask_t is not supposed to be a compound type. If such would be necessary in the future, we can deal with the issues then and there. For now, it can be assumed that the type is integral and unsigned.
With this commit, all MD definitions start off as u_int. This allows us to phase-in cpumask_t at our leasure without breaking anything. Once cpumask_t is used consistently, platforms can switch to wider (or smaller) types if such would be beneficial (or not; whatever :-)
Compile-tested on: i386
|
120422 |
25-Sep-2003 |
peter |
Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit systems where the data/stack/etc limits are too big for a 32 bit process.
Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c.
Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy.
Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced.
Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does.
Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things.
|
118382 |
03-Aug-2003 |
obrien |
Style sync.
|
115164 |
19-May-2003 |
kan |
sys/sys/limits.h:
- Fix visibilty test for LONG_BIT and WORD_BIT. `#if defined(__FOO_VISIBLE)' is alays wrong because __FOO_VISIBLE is always defined (to 0 for invisibility).
sys/<arch>/include/limits.h sys/<arch>/include/_limits.h:
- Style fixes.
Submitted by: bde Reviewed by: bsdmike Approved by: re (scottl)
|
114678 |
04-May-2003 |
kan |
Style fixes. Remove DBL_DIG, DBL_MIN, DBL_MAX and their FLT_ counterparts, they were marked for deprecation ever since SUSv1 at least. Only define ULLONG_MIN/MAX and LLONG_MAX if long long type is supported. Restore a lost comment in MI _limits.h file and remove it from sys/limits.h where it does not belong.
|
114216 |
29-Apr-2003 |
kan |
Deprecate machine/limits.h in favor of new sys/limits.h. Change all in-tree consumers to include <sys/limits.h>
Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
|
113941 |
23-Apr-2003 |
kan |
Add a new sys/limits.h file which in turn depends on machine/_limits.h to get actual constant values. This is in preparation for machine/limits.h retirement.
Discussed on: standards@ Submitted by: Craig Rodrigues <rodrigc@attbi.com> (*) Modified by: kan
|
112569 |
25-Mar-2003 |
jake |
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long.
Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms.
Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
|
108175 |
22-Dec-2002 |
tjr |
MB_LEN_MAX is not MD, move it to the MI limits.h.
|
105014 |
13-Oct-2002 |
mike |
Add standards visibility conditionals. Change any uses of sigset_t to struct __sigset to avoid depending on objects from <sys/signal.h>.
|
103436 |
17-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
|
102874 |
03-Sep-2002 |
mike |
Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on all architectures, move the definition directly into <time.h> and finish the removal of <machine/ansi.h>.
|
102429 |
26-Aug-2002 |
mike |
Since arm and powerpc aren't far enough to set stathz, take a preemptive strike and change _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ to 128.
Approved by: benno
|
102315 |
23-Aug-2002 |
mike |
Move several MI types from <machine/_types.h> to <sys/_types.h>. These types are unlikely to ever become very MD. They include: clockid_t, ct_rune_t, fflags_t, intrmask_t, mbstate_t, off_t, pid_t, rune_t, socklen_t, timer_t, wchar_t, and wint_t.
While moving them, make a few adjustments (submitted by bde): o __ct_rune_t needs to be precisely `int', not necessarily __int32_t, since the arg type of the ctype functions is int. o __rune_t, __wchar_t and __wint_t inherit this via a typedef of __ct_rune_t. o Some minor wording changes in the comment blocks for ct_rune_t and mbstate_t.
Submitted by: bde (partially)
|
102227 |
21-Aug-2002 |
mike |
o Merge <machine/ansi.h> and <machine/types.h> into a new header called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif
Concept by: bde Reviewed by: jake, obrien
|
100882 |
29-Jul-2002 |
mike |
Create a new header <machine/_stdint.h> for storing MD parts of <stdint.h>. Previously, parts were defined in <machine/ansi.h> and <machine/limits.h>. This resulted in two problems: (1) Defining macros in <machine/ansi.h> gets in the way of that header only defining types. (2) Defining C99 limits in <machine/limits.h> adds pollution to <limits.h>.
|
99733 |
10-Jul-2002 |
mike |
Remove label_t and physadr, which seem to have never been used in FreeBSD.
Submitted by: bde
|
99630 |
09-Jul-2002 |
mike |
Remove an unused type.
|
99594 |
08-Jul-2002 |
mike |
Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's hardly MD, since all our platforms share the same macro. It's not really compiler dependent either, but this helps in reducing <machine/ansi.h> to only type definitions.
|
98710 |
23-Jun-2002 |
iedowse |
Make vm_pindex_t 64-bit on all platforms. This is necessary to avoid overflows with the large file sizes that UFS2 permits.
Reviewed by: dillon, alc, tegge
|
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().
|
96319 |
10-May-2002 |
obrien |
Sync with the other platforms.
|
93092 |
24-Mar-2002 |
obrien |
Guard against redefining __gnuc_va_list.
|
92812 |
20-Mar-2002 |
alfred |
Remove __P.
|
87575 |
09-Dec-2001 |
obrien |
We need machine/{signal,ucontext}.h to build a cross GCC compiler. So craft the proper versions of these and commit em.
|
87574 |
09-Dec-2001 |
obrien |
Following sys/i386/include/ansi.h rev 1.33, add additional integer types in <machine/ansi.h> and that are required by <sys/stdint.h>.
|
87571 |
09-Dec-2001 |
obrien |
We need machine/types.h to build a cross GCC compiler. (copied from src/sys/i386/include/types.h rev 1.23, except for the label_t size, which is '10' everywhere BUT on i386)
|
87567 |
09-Dec-2001 |
obrien |
machine/limits.h (taken from i386/include/limits.h rev 1.19)
|
87158 |
01-Dec-2001 |
mike |
o Stop abusing MD headers with non-MD types. o Hide nonstandard functions and types in <netinet/in.h> when _POSIX_SOURCE is defined. o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>. o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new __FBSDID() macro. o Fix some miscellaneous issues in <arpa/inet.h>. o Correct final argument for the inet_ntop() function (POSIX.1-200x). o Get rid of the namespace pollution from <sys/types.h> in <arpa/inet.h>.
Reviewed by: fenner Partially submitted by: bde
|
85335 |
23-Oct-2001 |
mike |
Remove funky right justification.
Pointed out by: bde
|
85187 |
19-Oct-2001 |
obrien |
Try two on the preprocessing logic.
Reviewed by: ru
|
85183 |
19-Oct-2001 |
obrien |
Blah, fix braino where ru had to remind me of proper preprocessor syntax. Bad fingers, no cookie.
|
85108 |
18-Oct-2001 |
obrien |
My attempts at minimizing the number of #def's got me in trouble.
|
84783 |
10-Oct-2001 |
ps |
Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader tunable.
Reviewed by: peter MFC after: 2 weeks
|
82530 |
30-Aug-2001 |
mike |
o Remove some GCCisms in src/powerpc/include/endian.h. o Unify <machine/endian.h>'s across all architectures. o Make bswapXX() functions use a different spelling of u_int16_t and friends to reduce namespace pollution. The bswapXX() functions don't actually exist, but we'll probably import these at some point. Atleast one driver (if_de) depends on bswapXX() for big endian cases. o Deprecate byteorder(3) prototypes from <sys/types.h>, these are now prototyped indirectly in <arpa/inet.h>. o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these are now typedef'd in <arpa/inet.h>. o Change byteorder(3) prototypes to use standards compliant uint32_t (spelled __uint32_t to reduce namespace pollution). o Document new preferred headers and standards compliance.
Discussed with: bde PR: 29946 Reviewed by: bmilekic
|
79053 |
01-Jul-2001 |
imp |
Don't need the .keep_me files. Obrien and I committed past each other.
Add 0-9 to the list of possible kernel names at matsushita-san's suggestion.
Submitted by: Makoto MATSUSHITA-san <matusita@jp.FreeBSD.org>
|
79032 |
30-Jun-2001 |
obrien |
Add .cvsignore so that CVS stop's complaining about people's kernel build dirs.
|
79030 |
30-Jun-2001 |
obrien |
Ensure sys/${MACHINE}/compile/FOO exists
Reviewed by: arch, imp, peter, and the USENIX terminal room secret kernel cabal
|
77931 |
09-Jun-2001 |
obrien |
Fix style of defines.
|
76785 |
18-May-2001 |
obrien |
Make _BSD_TIME_T_ (time_t) an `int' rather than `long'. This will help flag errors where programmers assume time_t is a long, which it is not on 64-bit platforms.
Submitted by: bde
|
76784 |
18-May-2001 |
obrien |
Style changes -- revert ordering to mostly two revs ago. Embellish some comments, fix tab'ing.
Requested by: bde
|
76701 |
16-May-2001 |
obrien |
Consistently define the rune types. Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
|
76700 |
16-May-2001 |
obrien |
Move the int typedefs to the top so they can be used in defining other types. Ensure every platform has __offsetof. Make multiple inclusion detection consistent with other <platform>/include/*.h files.
|
72569 |
17-Feb-2001 |
ume |
Correct disordering which is corresponding to bde's fix to i386/include/ansi.h.
|
72510 |
15-Feb-2001 |
ume |
Correct 2nd argument of getnameinfo(3) to socklen_t.
Reviewed by: itojun
|
72358 |
11-Feb-2001 |
markm |
RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK() has been moved to <i386/include/apic.h> (AKA <machine/apic.h>). Reviewed by: jhb
|
71576 |
24-Jan-2001 |
jasone |
Convert all simplelocks to mutexes and remove the simplelock implementations.
|
70786 |
08-Jan-2001 |
obrien |
Remove seconds types we don't use that came in thru the NetBSD heiratage.
|
70651 |
04-Jan-2001 |
obrien |
StrongARM platform-specific definitions.
|