summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Merge in changes from NetBSD:andrew2013-06-081-17/+25
| | | | | | * Remove support for non-elf files. * Add the VFP setjmp magic numbers. * Add the offsets for the VFP registers within the buffer.
* Reduce the difference to NetBSD.andrew2013-06-071-25/+27
| | | | | | | | | | | | * 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.
* Fix the passing of time on Armada XP.gber2013-06-042-1/+12
| | | | | | | 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>
* Implement pmap_copy() for ARMv6/v7.gber2013-06-041-0/+120
| | | | | | | | 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
* AM335x LCD controller driver with syscons supportgonzo2013-05-274-0/+1518
| | | | | | Limitations: - Raster mode only - 24 and 32 bpp only
* Add PWM module driver for AM335x. Only eCAS subsystem is supportedgonzo2013-05-273-0/+319
| | | | | Export function to configure eCAS submodule from another drivers. It's used to control LCD panel backlight on AM335x EVM.
* Add SCM registers definitions for AM335x platformgonzo2013-05-271-0/+38
|
* Add clock definitions for LCD controller and PWM modulegonzo2013-05-272-3/+99
|
* Rework and organize pmap_enter_locked() function.gber2013-05-231-86/+72
| | | | | | | | | | 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
* Stop using PVF_MOD, PVF_REF & PVF_EXEC flags in pv_entry, use PTE.gber2013-05-232-36/+33
| | | | | | | | | | | | | 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
* Improve, optimize and clean-up ARMv6/v7 memory management related code.gber2013-05-234-222/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch to AP[2:1] access permissions model. Store "referenced"gber2013-05-235-111/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* o Relax locking assertions for vm_page_find_least()attilio2013-05-212-0/+4
| | | | | | | | | | | | 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
* Add a comment explaining why stack_capture is empty for EABI and clang.andrew2013-05-191-0/+12
| | | | | | 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.
* Back out r250768 until I can further investigate why it mightkientzle2013-05-181-1/+1
| | | | be causing problems with the BeagleBone Black boot.
* Label the mmc child after the parent.kientzle2013-05-181-1/+1
|
* Revert r250692. We'll use 1 kernel config file for the BeagleBone models.rpaulo2013-05-172-128/+3
|
* Fix L2 cache write-back invalidate for Sheeva core.gber2013-05-161-0/+8
| | | | | Submitted by: Michal Dubiel Obtained from: Netasq, Semihalf
* Add a kernel config file for the BeableBone Black SoC.rpaulo2013-05-161-0/+127
|
* Port the new PV entry allocator from amd64/i386/mips to armv6/v7.gber2013-05-142-79/+470
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Tidy up some CVS workarounds.peter2013-05-122-2/+0
|
* Don't use the old stack-walking code withkientzle2013-05-111-4/+5
| | | | | | | | | | | | | | | | | | 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.
* Update copyright date.ray2013-05-0824-23/+24
|
* Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h inattilio2013-05-072-7/+4
| | | | | | | | | 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
* decode_win_sdram_fixup() function should be declared, defined and usedgber2013-05-071-0/+4
| | | | | | only by Armada XP Obtained from: Semihalf
* Fix page reference emulation on ARMv6 and v7gber2013-05-061-0/+1
| | | | | Submitted by: Zbigniew Bodek Obtained from: Semihalf
* Fix L2 PTE access permissions management.gber2013-05-062-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Correct comment about initial VA=>PA mappinggber2013-05-061-1/+1
|
* Disable decoding windows with no FDT entry.gber2013-05-063-0/+61
| | | | | | | | | | - 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
* Avoid calling pcpu_init() simultaneously.gber2013-05-061-1/+8
| | | | | | | pcpu_init() updates queue, so cannot be called by multiple cores at the same time Obtained from: Semihalf
* Properly initialize Armada XP MP subsystem.gber2013-05-066-91/+179
| | | | | | | | | | - 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
* Initialize L2 cache for Armada XP.gber2013-05-063-0/+109
| | | | Obtained from: Semihalf
* Move initialization of CESA decoding windows from common sectiongber2013-05-063-158/+48
| | | | | | | | | | | | 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
* Make a debugging printf a little more useful.kientzle2013-05-041-2/+2
|
* Fix comment block formatting.ian2013-05-041-1/+2
|
* Insert STOP_UNWINDING directives in the _start (kernel entry point) andian2013-05-043-4/+12
| | | | | | | | | 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.
* EABI unwinder enhancements... When it's time to stop unwinding, don'tian2013-05-041-26/+39
| | | | | | 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.
* Correct a few sizeof()seadler2013-05-011-1/+1
| | | | | Submitted by: swildner@DragonFlyBSD.org Reviewed by: alfred
* Bring copyright changes with the agreement of Thomas Skibo.wkoszek2013-04-288-161/+170
| | | | | | | 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.
* Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.wkoszek2013-04-273-1/+5
| | | | | | Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net> Tested by: wkoszek (ZedBoard) Reviewed by: wkoszek, freebsd-arm@ (no objections raised)
* Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.wkoszek2013-04-2715-0/+3236
| | | | | Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net> Reviewed by: wkoszek, freebsd-arm@ (no objections raised)
* Initialize GIC_PMRR register on ARM GIC.dmarion2013-04-221-0/+6
| | | | Provided by: Thomas Skibo
* - Correct mispellings of word resourcegabor2013-04-171-4/+4
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* - Correct mispellings of the word occurrencegabor2013-04-172-2/+2
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* Fix undefined behaviour in several gpio_pin_setflags() routines (underdim2013-04-135-10/+10
| | | | | | | | | 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
* Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE'trasz2013-04-121-1/+1
| | | | | | | | | | | 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
* Merge from projects/counters: counter(9).glebius2013-04-081-0/+54
| | | | | | | | | | | | | 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.
* Merge from projects/counters:glebius2013-04-081-3/+4
| | | | | | | 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.
* Fix regression issue after r248910.hselasky2013-04-072-3/+3
| | | | | PR: arm/177685 Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* Properly clean "spurious interrupt" stategonzo2013-04-061-0/+1
| | | | Suggested by: Ian Lepore
OpenPOWER on IntegriCloud