337036 |
01-Aug-2018 |
hselasky |
MFC r321686 and r330361: Add inline functions to convert between sbintime_t and decimal time units. Use them in some existing code that is vulnerable to roundoff errors. |
335557 |
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. |
318977 |
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 |
294686 |
24-Jan-2016 |
ian |
MFC r293830:
Fix the spelling of fueword* to eliminate compile warnings about mismatched begin/end symbols when the warning level is turned up. |
294685 |
24-Jan-2016 |
ian |
MFC r293053, r293061, r293063, r293064, r293065, r293775, r293792:
Use 64-bit math when finding a block of ram to hold the kernel. This fixes a problem on 32-bit systems which have ram occupying the end of the physical address space -- for example, a block of ram at 0x80000000 with a size of 0x80000000 was overflowing 32 bit math and ending up with a calculated size of zero.
Use 64-bit math when processing the lists of physical and excluded memory to generate the phys_avail and dump_avail arrays.
Work around problems that happen when there is ram at the end of the physical address space.
Cast pointer through uintptr_t on the way to uint64_t to squelch a warning.
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).
Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded because rounding down cannot increase the number of bits needed to express the result.
Go back to using uintptr_t, because code that actually compiles is infinitely less buggy than code that is theoretically correct in some alternate universe.
PR: 201614 |
294683 |
24-Jan-2016 |
ian |
MFC r293045, r293046:
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.
Also, revert accidental change that snuck into r293045. |
294682 |
24-Jan-2016 |
ian |
MFC r290647, r292523, r292891:
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
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.
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). |
294681 |
24-Jan-2016 |
ian |
MFC r277416, r282023, r282024, r282025, r284264:
Remove the SMP code from locore-v4. These will never use the SMP code as there is no multi-core hardware prior to ARMv6.
Remove the armv6 code from locore-v4.S, it's not needed there.
Fix the style of locore-v4.S and locore-v6.S to help find any common code.
Cleanup a little more: - Remove whitespace at the end of lines - Use a tab after instructions, not spaces
Fix the spelling of __ARM_ARCH >= 6 in sys/arm/arm. |
294671 |
24-Jan-2016 |
ian |
MFC r289619:
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. |
294136 |
16-Jan-2016 |
dchagin |
MFC r293613:
Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall instead of vdso. An upcoming linux_base-c6 needs it. |
293581 |
09-Jan-2016 |
dchagin |
MFC r283479:
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. |
293490 |
09-Jan-2016 |
dchagin |
MFC r283382:
In preparation for switching linuxulator to the use the native 1:1 threads add a hook for cleaning thread resources before the thread die. |
288287 |
27-Sep-2015 |
kib |
MFC r288000: Add support for weak symbols to the kernel linkers. |
283931 |
02-Jun-2015 |
imp |
MFC:
r283014: Disable unmapped I/O: it is broken for unaligned pages r283126: Fix comments |
283510 |
25-May-2015 |
ian |
MFC r283033, r283062, r283066, r283069:
Do not set preload_addr_relocate for ARM.
Refactor net_getparams() to make it easier to get params from sources other than bootp and rarp.
Add a routine to obtain netboot parameters from the U-Boot env vars
Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr. |
283499 |
24-May-2015 |
ian |
MFC r282418:
On an icache sync by address/len, round the length up if the operation spans a cacheline boundary. |
283339 |
23-May-2015 |
ian |
MFC r280278, r280402:
Allow to override default kernel virtual address assignment on ARM.
Do not save/restore the TLS pointer on context switch for armv6. |
283336 |
23-May-2015 |
ian |
MFC r279810, r279811:
Clean data cache before instruction cache in armv7_icache_sync_range().
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. |
283335 |
23-May-2015 |
ian |
MFC r278518: Resolve cache line size from CP15 instead of hard-coded 32. |
283334 |
23-May-2015 |
ian |
MFC r277098, r279235:
Introduce ofw_bus_reg_to_rl() to replace part of common bus code
Fix endianness on FDT read in ARM GIC |
283332 |
23-May-2015 |
ian |
MFC r274249, r274484, r275583:
Avoid panic in ofwbus caused by not released resource list entry
Fix typo in ARM GIC device_printf()
Fix buffer overflow in Marvell PCI/PCIe driver |
283319 |
23-May-2015 |
ian |
MFC r279702: Update a comment that had drifted out of date. |
283317 |
23-May-2015 |
ian |
MFC r278770, r279114, r279215, r279338, r279543:
Add logic for handling new-style ARM cpu ID info.
Correct a comment which was exactly backwards from reality.
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.
Add casting to make atomic ops work for pointers. (Apparently nobody has ever done atomic ops on pointers before now on arm).
Revert incorrect casting. |
282506 |
05-May-2015 |
hselasky |
MFC r282120: 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> Reviewed by: jhb@ |
280258 |
19-Mar-2015 |
rwatson |
Merge r263233 from HEAD to stable/10:
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.
Sponsored by: Google, Inc. |
279467 |
01-Mar-2015 |
dim |
MFC r279312:
Fix a number of -Wcast-qual warnings under sys/arm. No functional change.
Submitted by: andrew |
278746 |
14-Feb-2015 |
kib |
MFC r277643: Remove Giant from /dev/mem and /dev/kmem.
MFC r277743: Arm: ensure that _tmppt KVA is used exclusively. |
278735 |
13-Feb-2015 |
ian |
MFC r278031: Remove a stale comment. |
278731 |
13-Feb-2015 |
ian |
MFC r277523: Add last_fault_code when DEBUG is defined. |
278730 |
13-Feb-2015 |
ian |
MFC r277532, r277533: Add Maxmem global for arm. |
278727 |
13-Feb-2015 |
ian |
MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471, r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479, r277480, r277512, r277516:
Add inline implementations of arm bus_space_read/write_N().
Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses.
Use the explicit member initializer style to init the bus_space struct.
Use arm/bus_space-v6.c for all armv6 systems
Consolidate many identical implementations of bus_space to a single common tag and implementation shared by armv4 and armv6.
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 so that they all fit in a single cache line. |
278702 |
13-Feb-2015 |
ian |
MFC r277305: Minor cleanups, comment changes. |
278680 |
13-Feb-2015 |
ian |
MFC r266083, r267597:
Give suitably-endowed ARMs a register similar to the x86 TSC register. |
278656 |
13-Feb-2015 |
ian |
MFC r272356, r275639, r276638:
Split syscall handling out to a separate file.
Include sys/kernel.h to pick up the definition of hz in syscall.c
Add a new trap-v6.c which has support for all armv7 exceptions. |
278652 |
13-Feb-2015 |
ian |
MFC r276525, r276596:
Put in a workaround for bug 196407 (arm modules cause crashes & panics). (Don't allow movw/movt insn in modules.)
Fix alignment directives in arm asm code after clang 3.5 import. |
278648 |
13-Feb-2015 |
ian |
MFC r276519:
Define a WFI macro that expands to the right form of wait-for-interrupt depending on the architecture. |
278646 |
13-Feb-2015 |
ian |
MFC r276518: Rework vfp code so it will compile on clang 3.4 and 3.5. |
278645 |
13-Feb-2015 |
ian |
MFC r276444, r276445, r276470:
Fix a paste-o in dcache_inv_pou_all().
Change the order of operations for the initial cache setup.
A couple small fixes to make clang 3.5 happy... Move END(sigcode) and other misplace ENTRY/END macros. |
278643 |
13-Feb-2015 |
ian |
MFC r276394, r276397:
Add armv6 implementations of the startup-time cache maintenence functions.
Create a new locore.S that includes locore-v4 or locore-v6 as needed. |
278639 |
12-Feb-2015 |
ian |
MFC r276395, r276396: Rename locore.S to locore-v4.S and add a new locore-v6.S. |
278635 |
12-Feb-2015 |
ian |
MFC r276247, r276333, r276334, r276335, r276336, r276340, r276350:
Include acle-compat.h directly rather than getting it via sysreg.h.
Add new code to read and parse cpu identification data using the new CPUID mechanism defined for armv7.
Add new TLB and cache maintainence functions for armv6 and armv7.
Eliminate an unused macro whose name clashes now with a function in the new cpu-v6.h
Add cache maintenance functions which will be used by startup code to initially set up the MMU.
Fix a "decl is not a prototype" error noticed by gcc (but not clang).
Update comments (r4 is not used anywhere), use non-profiling entry macros.
Add arm option ARM_NEW_PMAP, to allow us to begin adding the new pmap code alongside the existing implementation
Add armv6 implementations of cache operations to avoid duplication |
278631 |
12-Feb-2015 |
ian |
MFC r272209, r272300, r276212, r276213:
Add machine/sysreg.h to simplify accessing the system control coprocessor registers and use it in the ARMv7 CPU functions.
Add macros for asm barrier instructions with arch-specific implementations.
Define only the CP15 register operations that are valid for the architecture. |
278630 |
12-Feb-2015 |
ian |
MFC r276206:
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. |
278629 |
12-Feb-2015 |
ian |
MFC r276196, r276197, r276198, r276202, r276203, r276204:
Change the style of the DO_AST macro to match the others
Remove _PROF_PROLOGUE from the EENTRY() macros.
Stylish changes... put tabs where they need to be in macros, move lines around so that related things are more grouped together, rewrite comments.
Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.
Create 'L' variants of all the ENTRY macros for file-static/local symbols. |
278626 |
12-Feb-2015 |
ian |
MFC r276191: Display correct value for cache level-of-coherency (needs +1). |
278614 |
12-Feb-2015 |
ian |
MFC r276187, r276190, r271422:
Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function.
Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping.
Cleanup up ARM *frame structures. |
278613 |
12-Feb-2015 |
ian |
MFC r271394, r271398:
Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE from asm.h as they were already defined in armreg.h.
Unify interrupts bit definition and usage. While here remove PSR_C_bit. |
278347 |
07-Feb-2015 |
kib |
MFC r278001: Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as const. |
276874 |
09-Jan-2015 |
loos |
MFC r273599:
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. |
276546 |
02-Jan-2015 |
alc |
MFC r273701, r274556 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[].
Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default on i386 PAE. (The use of VM_PHYSSEG_SPARSE on i386 PAE saves us some precious kernel virtual address space that would have been wasted on unused vm_page structures.) |
276274 |
27-Dec-2014 |
ian |
MFC r274538, r274545, r274596, r274602, r274603, r274604, r274605, r274839:
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.
Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync.
Do the cache invalidate sequence from the outermost to innermost, required for correct operation.
Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs.
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. |
275776 |
14-Dec-2014 |
andrew |
MFC 275564:
Use the unified syntax when generating assembly for clang. The clang 3.5 integrated assembler only accepts it.
Sponsored by: ABT Systems Ltd |
275767 |
14-Dec-2014 |
andrew |
Clean up our ARM assembly:
MFC 275256:
Switch to the ARM unified assembly language as the clang integrated as only supports it. Binutils supports it when the ".syntax unified" directive is set.
Sponsored by: ABT Systems Ltd
MFC 275264:
Update _ENTRY to use _EENTRY to reduce the common code.
MFC 275321:
Remove extra labels, ENTRY_NP already provides them.
Sponsored by: ABT Systems Ltd
MFC 275322:
Correctly a few incorrect uses of ENTRY/EENTRY and END/EEND
Sponsored by: ABT Systems Ltd
MFC 275416:
Fix the name of the coprocessor to include the "p" prefix, the clang integrated assembler expects this.
Sponsored by: ABT Systems Ltd
MFC 275418:
Switch to unified syntax so these can be built with clang 3.5.
Sponsored by: ABT Systems Ltd
MFC 275519:
Add missing END macros to some of the xscale functions.
Sponsored by: ABT Systems Ltd
MFC 275520:
Use the unified syntax in a few more assembly files
Sponsored by: ABT Systems Ltd
MFC 275521:
Set the alignment to 4-bytes after a string as clang 3.5 can switch to thumb mode if this is incorrect.
Sponsored by: ABT Systems Ltd
MFC 275522:
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.
Sponsored by: ABT Systems Ltd
MFC 275523:
Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is unsupported as it needs a newer cpu.
Sponsored by: ABT Systems Ltd
MFC 275524:
Switch to a .cpu directive. These will work when clang 3.5 is imported where the .arch directive is a nop.
Sponsored by: ABT Systems Ltd |
275764 |
14-Dec-2014 |
andrew |
MFC 275207:
We don't use the hypervisor interrupt, make it optional in the device tree.
Submitted by: Julien Grall <julien.grall AT linaro.org>
MFC 275208:
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> |
274268 |
08-Nov-2014 |
ian |
MFC r273703:
Remove the ARM_DEVICE_MULTIPASS option and make its effect be the default. |
273830 |
29-Oct-2014 |
andrew |
MFC r273288:
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. |
273828 |
29-Oct-2014 |
andrew |
MFC r273284:
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. |
273827 |
29-Oct-2014 |
andrew |
MFC r269956:
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. |
273736 |
27-Oct-2014 |
hselasky |
MFC r263710, r273377, r273378, r273423 and r273455:
- De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros.
Sponsored by: Mellanox Technologies |
273695 |
26-Oct-2014 |
ian |
MFC r273590: Accept documented compatible string for PL310 cache controller/ |
273676 |
26-Oct-2014 |
ian |
MFC r272333: Honor exclusion flags when building the memory lists. |
273673 |
26-Oct-2014 |
ian |
MFC r271906:
Make the ARM MPCore Timer driver work with published standard FDT bindings. |
273672 |
26-Oct-2014 |
ian |
MFC r271595, r271601, r271607, r271630:
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.
Add a common routine for parsing FDT data describing an ARM GIC interrupt.
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.
The private peripheral interrupts start at offset 16, not 0. Also, use names rather than inline mystery constants for these offsets. |
273671 |
26-Oct-2014 |
ian |
MFC r271594:
Fix an undefined variable that was accidentally not causing an error. |
273652 |
26-Oct-2014 |
ian |
MFC r270945:
Rename OF_xref_phandle() to OF_node_from_xref() and add a new function that provides the inverse translation, OF_xref_from_node(). |
271327 |
09-Sep-2014 |
ian |
MFC r270862, r270878: MMU fixes for kernel startup.
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.
The Marvell PJ4B cpu family is armv7, not armv6.
Approved by: re(gjb) |
270920 |
01-Sep-2014 |
kib |
Fix a leak of the wired pages when unwiring of the PROT_NONE-mapped wired region. Rework the handling of unwire to do the it in batch, both at pmap and object level.
All commits below are by alc.
MFC r268327: Introduce pmap_unwire().
MFC r268591: Implement pmap_unwire() for powerpc.
MFC r268776: Implement pmap_unwire() for arm.
MFC r268806: pmap_unwire(9) man page.
MFC r269134: When unwiring a region of an address space, do not assume that the underlying physical pages are mapped by the pmap. This fixes a leak of the wired pages on the unwiring of the region mapped with no access allowed.
MFC r269339: In the implementation of the new function pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before any changes are made to the PVO. Otherwise, MOEA64_PVO_TO_PTE() will panic.
MFC r269365: Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed by the combination of r268591 and r269134: When we attempt to add the wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing. (They only set the wired attribute on newly created mappings.)
MFC r269433: Handle wiring failures in vm_map_wire() with the new functions pmap_unwire() and vm_object_unwire(). Retire vm_fault_{un,}wire(), since they are no longer used.
MFC r269438: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized.
MFC r269485: Retire pmap_change_wiring().
Reviewed by: alc |
270439 |
24-Aug-2014 |
kib |
Merge the changes to pmap_enter(9) for sleep-less operation (requested by flag). The ia64 pmap.c changes are direct commit, since ia64 is removed on head.
MFC r269368 (by alc): Retire PVO_EXECUTABLE.
MFC r269728: Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused).
MFC r269759 (by alc): Update the text of a KASSERT() to reflect the changes in r269728.
MFC r269822 (by alc): Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table page allocation.
MFC r270151 (by alc): Replace KASSERT that no PV list locks are held with a conditional unlock.
Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation |
270077 |
17-Aug-2014 |
ian |
MFC r269646: Use a SYSINIT to init the array of interrupt names on arm. |
270075 |
17-Aug-2014 |
ian |
MFC r269594, r269596, r269597, r269598, r269605, r269606:
Set ofwbus and simplebus to attach during BUS_PASS_BUS.
Define names that drivers can use to adjust their position relative to other drivers within a BUS_PASS
Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that a platform can attach some other bus first if necessary.
Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.
Attach arm generic interrupt and timer drivers in the middle of BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.
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. |
269796 |
11-Aug-2014 |
ian |
MFC r269390: Fix unwind info in hand-written asm (avoid nested functions). |
269794 |
11-Aug-2014 |
ian |
MFC r269206, r269207, r269208, r269209, r269210, r269211, r269212, r269213, r269214, r269215, r269216, r269217, r269221:
busdma-v6 improvements, primarily: - Allocate the temporary segments array per-map rather than per-tag. - Avoid needlessly bouncing IO for mbufs and buffers allocated by bus_dmamem_alloc() (in both situations we known they're allocated on cacheline boundaries and don't need bouncing). - Various minor reformatting and cleanups. |
269679 |
07-Aug-2014 |
ian |
MFC r256691, r256748: casuword fixes
Use unsigned compare against KERNBASE addr. Use atomic ops on armv6. |
269103 |
25-Jul-2014 |
ian |
MFC r266565, r266651:
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.
Fix whitespace glitches. |
269072 |
24-Jul-2014 |
kib |
MFC r267213 (by alc): Add a page size field to struct vm_page.
Approved by: alc |
266755 |
27-May-2014 |
ian |
MFC 266621: Eliminte spurious interrupts caused by ARM weak memory ordering. |
266412 |
18-May-2014 |
ian |
MFC 258287: Implement pmap_align_superpage(). |
266404 |
18-May-2014 |
ian |
MFC 256941: make sure the frame is indeed in the kernel memory. |
266388 |
18-May-2014 |
ian |
MFC 265913, 265914:
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.
Clean up some style nits. |
266387 |
18-May-2014 |
ian |
MFC 265861, 265870:
Make the hardware memory and instruction barrier functions work on armv4 and armv5 as well.
Add cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier(). |
266385 |
18-May-2014 |
ian |
MFC 265694, 265705, 265784:
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.
Consolidate all the AP core startup stuff under a single #ifdef SMP block
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. |
266384 |
18-May-2014 |
ian |
MFC 265440, 265441, 265444, 265445, 265446, 265447:
Move the pl310.enabled tunable to hw.pl310.enabled. Clean up a few minor style(9) nits. Use DEVMETHOD_END.
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.
Call platform_pl310_init() before enabling the controller, and handle the case where the controller is already enabled.
Add defines for the bits in the PL310 debug control register.
Add a public routine to set the L2 cache ram latencies. This can be called by platform init routines to fine-tune cache performance.
Enable PL310 power-saving modes and tune the cache ram latencies for imx6. |
266375 |
17-May-2014 |
ian |
MFC 265035: Move duplicated code to print l2 config into the common code. |
266374 |
17-May-2014 |
ian |
MFC 265023, 265024, 265036:
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.
Flush and invalidate caches on each CPU as part of handling IPI_STOP.
Don't use multiprocessing-extensions instruction on processors that don't support SMP. |
266373 |
17-May-2014 |
ian |
MFC 264990, 264994, 265020, 265025:
Call cpu_icache_sync_range() rather than sync_all since we know the range and flushing the entire icache is needlessly expensive.
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).
Remove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed.
Explain why wbinv_all is SMP-safe when dumping, 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.) |
266369 |
17-May-2014 |
ian |
MFC 264702: Remove uncessary armv6 cache and TLB maintenance ops. |
266359 |
17-May-2014 |
ian |
MFC 264160: Remove code under PMAP_CACHE_VIVT, not compiled on armv6. |
266357 |
17-May-2014 |
ian |
MFC 264183: Add a couple more required TLB flushes. |
266353 |
17-May-2014 |
ian |
MFC 264128, 264129, 264130, 264135,
Fix TTB set operation for armv7. Perform sychronization (by "isb" barrier) after TTB is set.
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.
Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page(). This is performance enhancement rather than bugfix.
We don't support any ARM systems with an ISA bus and don't need a freelist of memory to support ISA addressing limitations. |
266352 |
17-May-2014 |
ian |
MFC 264052, 264057, 264065, 264094, 264103, 264120
Actually save the mpcore clock frequency retrieved from fdt data.
imx6.. - Don't call sdhci_init_slot() until after handling the FDT properties related to detecting card presence. - Flag several sysctl variables as tunables. - Rework the cpu frequency management code for imx6 to add "operating points" and min/max frequency controls.
generic timer... - 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. |
266347 |
17-May-2014 |
ian |
MFC 264019, 264041, 264048, 264049, 264050, 264051
Add support for event timers whose clock frequency can change while running.
Apparently all ARM configs build kern_et.c, but only a few of them also build kern_clocksource.c, un-break the build by not referencing functions in kern_clocksource if NO_EVENTTIMERS is defined.
Add variable-frequency support to the arm mpcore eventtimer driver.
mpcore_timer: Disable the timer and clear any pending bit, then setup the new counter register values, then restart the timer. Also re-nest the parens properly for casting the result of converting time and frequency to a count. |
266341 |
17-May-2014 |
ian |
MFC 263910, 263913, 263914, 263933, 263934, 263935, 263936, 263981, 263982,
Add more flags for the fpexc register from the ARM1176JZF-S Manual
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.
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.
Add Cortex-A15 cpu id revisions.
Exynos/Arndale... - Merge SoC-common parts - Enable iicbus device - 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. - 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 - Use new gpio dev class in EHCI driver - Expand device tree information - Release i2c bus on detach. |
266332 |
17-May-2014 |
ian |
MFC 263250, 263251, 263424, 263425, 263426, 263427, 263430, 263431
Use the same cache terminology as the ARM docs in comments. No functional changes.
Use armv7 TLB flush code, not arm11, for cortex-a processors.
Exynos/ Arndale... - Disable debugging by default. - Add display-related and clk devices to the tree - Prevent resources intersection with EHCI driver - Add display-related and clk devices to the tree - Prevent resources intersection with EHCI driver - Add driver for Display Controller. - Add support for Samsung Chromebook (ARM Cortex A15 machine). - Rename mct and ehci drivers files to match common naming. |
266312 |
17-May-2014 |
ian |
MFC 263036, 263059: delete advertising clause in licenses, renumber. |
266311 |
17-May-2014 |
ian |
MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997, 263030, 263033, 263034, 263056, 263057,
Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places.
Remove all traces of support for ARM chips prior to the arm9 series.
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).
Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S.
Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S.
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.
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.
Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted.
Remove some unnecessary indirection and jump right to the handler functions.
Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32).
Remove the unreferenced DATA() macro.
Remove #include <machine/asmacros.h> from files that don't need it. |
266277 |
17-May-2014 |
ian |
MFC 257774, 256760, 262916, 262905, 262918, 262919, 262920, 262921, 262924, 262925, 262929, 262932, 262935, 262940, 262941, 262942, 262948, 262949, 262950
Strip arm/conf/DEFAULTS down to just items that are mandatory for running the architecture.
Move all the files named foo/common.c to foo/foo_common.c
Initial cut for DTS on the hl201 board.
Add commented out dts for sam9260ek as well as early printf support.
Make clock optional on uart nodes, then back it out ("I don't know what I was thinking, but it is lame.")
Set the baud rate if it isn't 0
Make at91_soc_id() public.
Properly round at91 resource on unmapping.
Move AT91 AIC related stuff to own file.
Fix another bug in multicast filtering. i.MX uses 6 bits from MSB in LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32.
Follow r262916 with one more config file that references a renamed common.c
Remove bogus AT91 define that causes compile errors. Most of the defines for SAM9X are going away soonish anyway (once FDT works), but until then...
Remove all dregs of a per-thread undefined-exception-mode stack.
Rework the VFP code that handles demand-based save and restore of state.
Always call vfp_discard() on thread death.
When a thread begins life it doesn't own the VFP hardware state on any cpu.
Make undefined exception entry MP-safe. |
266274 |
16-May-2014 |
ian |
MFC 262695, 262708, 262709, 262710, 262711, 262728, 262870, 262877, 262880, 262885, 262891, 262903,
imx6: Add a tunable to set the number of active cores, enable SMP by default.
ffec: Fix multicast filtering.
Allwinner a10/a20... - Add gpio and clock bits for A10/A20's EMAC ethernet controller driver - EMAC gpio configuration - EMAC clock activation - 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. - 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 - Add EMAC and SRAM controller entries to FDT. - Add EMAC device to kernel config files and enable EMAC, SRAM drivers.
OMAP: When calculating the MPU freq, make sure not to overflow.
Vybrid: - Add driver for Port control and interrupts (PORT). - Export panel info to DTS - Reset all the layers before setup first one - Enable display
nandfs: Slight code reordering to make error branch last.
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.
Fix the arm sys_sigreturn(): its argument is a struct ucontext, not a struct sigframe containing the struct ucontext. |
266207 |
16-May-2014 |
ian |
MFC r262534, r262548, r262549, r262552, r262568, r262581, r262583, r262584, r262585, r262587, r262696, r262712
Replace many pasted identical definitions of cpu_initclocks() with a common implementation in arm/machdep.c.
aicasm: Don't complain about missing prototypes to ease bootstrap issues.
Vybrid: Add driver for Inter-Integrated Circuit (I2C).
imx6: Initialize the Low Power Mode bits to keep the ARM cores running during WFI.
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.
mpcore timer: Supply a DELAY() implementation via weak linkage, so that SoC-specific code can supply a better implementation.
imx6: Add some rudimentary voltage control.
Add an armv7 implementation of cpu_sleep().
Add __used attribute 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. |
266203 |
16-May-2014 |
ian |
MFC r262409, r262411, r262413, r262420, r262426, r262427, r262440, r262456, r262482, r262483, r262531,
Move the declaration for mpentry() into a header file instead of pasting it into a bunch of different .c files.
If the L2 cache type is PIPT, pass a physical address for a flush.
Actually set the proper bit to indicate TTB shared memory.
Add a new cache maintenance function, idcache_inv_all, to the table, and implementations for each of the chips we support.
Invalidate caches immediately upon entry to init_secondary(). Also set the Bufferable bit in the PDE entries of the secondary processor startup pagetables.
Add the bits needed to run SMP on imx6.
Invalidate the SCU cache tag ram on all 4 cores, not just 1-3.
Minor tweaks to the imx GPT timer
Vybrid enhancements... - 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 - Add support for Quartz Module. - 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 |
266201 |
15-May-2014 |
ian |
MFC r261982, r261987, r262123, r262244, r262278, r262280, r262353, r262354, r262355, r262419,
Add Vybrid driver for Synchronous Audio Interface (SAI).
Decrease SAI buffer size. Handle eDMA interrupt on running channel only.
Give the physmem fdt helper routines static linkage since no global definition of them is provided anywhere.
Add imx6 early printf support, wrapped in #if 0 because it's rarely needed.
Add basic cpu frequency control and temperature monitoring to imx6_anatop.
Add the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from ubldr will actually get used.
Create a generic IMX6 kernel config, then fix it to have an ident line.
Don't force imx6 bootverbose on anymore, it can be set from ubldr now. |
266199 |
15-May-2014 |
ian |
MFC r261917, r261918, r261919, r261920, r261921, r261922
Always clear L1 PTE descriptor when removing superpage on ARM
Invalidate L1 PTE regardles of existance of the corresponding l2_bucket.
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.
Fix superpage promotion on ARM with respect to RO/RW and wired attributes
Avoid redundant superpage promotion attempts on ARM
Remove spurious assertion from pmap_extract_locked() on ARM
Handle pmap_enter() on already promoted mappings for ARMv6/v7 |
266198 |
15-May-2014 |
ian |
MFC r261803, r261808, r261814, r261815, r261816, r261817, r261818, r261826, r261848, r261855
On armv6 and later, use the WriteNotRead bit of the fault status register to decide what protections are required by the faulting access.
Use the right symbols for determining arm architecture. Include the necessary header file which has the new FAULT_WNR symbol defined in it.
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.
Add function for configuring Vybrid PLL4 (Audio) clock frequency output.
imx6 changes ...
- Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and add SDHCI_RETUNE_REQUEST. None of these are actually used in the code yet.
- 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.
- Add standard non-removable and cd-gpios properties to the usdhc devices. That generates references to gpio devices, so uncomment them even though there isn't a gpio driver to do anything with them yet.
- 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).
- Enable both sdcard slots, but not the sdio-based wifi that we don't yet have a driver for.
- Remove a couple obsolete function declarations. |
266197 |
15-May-2014 |
ian |
MFC r261786, r261789
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.
Convert two while(1); statements into proper panics. |
266196 |
15-May-2014 |
ian |
MFC r261681, r261682, r261683, r261684, r261685, r261686, r261687, r261688, r261689, r261690, r261783, r261791, r261836, r261837, r261841,
Add FDT matching code to AT91 device drivers.
Better nomatch messages: include compat string. Also, flag devices as disabled in the successful probe message, but leave what that means to the actual driver (no semantic changes).
Fix Embest board name and id.
Honor the disabled status by only grabbing resources and returning when running under FDT in the AT91 SPI driver. |
266194 |
15-May-2014 |
ian |
MFC r261643, r261646, r261648, r261649, r261651, r261656, r261657, r261663, r261676, r261677, r261698, r261778
Consolidate code related to setting up physical memory configuration into a new physmem.c file.
Replace compile-time constant KERNPHYSADDR with abp_physaddr
Calculate the kernel's load address from the PC in the elf / gzip trampoline instead of relying on KERNPHYSADDR as a compile-time constant.
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.
Remove the now unused MMU_INIT macro.
Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.
No need to set physmem in each initarm() instance anymore, it's handled in common code now.
Pass the pagetable used from locore.S to initarm to allow it to map data in as required.
Fix the physmem exclude-region clipping logic for the edge-trim case.
Add some extra debugging output when DEBUG is defined.
Update legacy platforms to use new arm_physmem helper routines. |
266178 |
15-May-2014 |
ian |
MFC r256672
If we avoid to use the page at addr 0, we should adjust the size to reflect it. |
266175 |
15-May-2014 |
ian |
MFC r257549, r261642
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.
Remove the ARM_USE_SMALL_ALLOC option and code related to it. |
266160 |
15-May-2014 |
ian |
MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565, r261596, r261606
Add the imx sdhci controller.
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.
Add the missing ')' at end of sentence. Reword it to use a more common idiom.
Pass the kernel physical address to initarm through the boot param struct.
Make functions only used in vfp.c static, and remove vfp_enable.
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.
Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us remove the need to load the kernel at a fixed address.
Remove references to PHYSADDR where it's used only in debugging output.
Dynamically generate the page table. This will allow us to detect the physical address we are loaded at to change the mapping. |
266159 |
15-May-2014 |
ian |
MFC r261414, r261415, r261417, r261418, r261419
Don't call device_set_ivars() for the mmchs
Change the way pcpu and curthread are stored per-core
Invalidate cachelines for bounce pages on PREREAD too, there may still be stale entries from a previous transfer.
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. |
266152 |
15-May-2014 |
ian |
MFC r261410
Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines. |
266144 |
15-May-2014 |
ian |
MFC r261137, r261393
Correct the alignment of sp through functions that use UNWINDSVCFRAME.
Update all arm code that manipulates the PSR registers to use modern syntax. |
266128 |
15-May-2014 |
ian |
MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404, r261405
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.
Provide a simpler and more standards-compliant simplebus implementation to get the Routerboard 800 up and running with the vendor device tree. This does not implement some BERI-specific features (which hopefully won't be necessary soon), so move the old code to mips/beri, with a higher attach priority when built, until MIPS interrupt domain support is rearranged.
Allow nesting of simplebuses.
Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to process "status" properties of OF nodes.
Fix one remnant endian flaw in nexus. |
266110 |
15-May-2014 |
ian |
MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338, r261353
Fix the name of the dts file for the HL201...
When mapping an address, the bsh needs the same offset we do for other things.
Add explicit depends on bus_if.h and device_if.h to avoid a chicken and egg problem in some compilation environments.
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.
Comment cleanups. Move things around for diff reduction against FDT work. |
266097 |
14-May-2014 |
ian |
MFC r260886, r261165, r261171, r261172, r261214
Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no parameters.
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.
Make early printf output nicer by inserting a carriage return before any linefeeds that are output.
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.
Remove extra parens to silence clang warning. |
266094 |
14-May-2014 |
ian |
MFC r261038, r261039, r261040, r261041
Implement generic support for early printf. |
266086 |
14-May-2014 |
ian |
MFC r260440, r260441, r260447, r260490, r260493
Add option USB_HOST_ALIGN to configs that contain 'device usb'.
Update dts files of Cubieboard1,2 to use 1GB memory.
Add a function to print the contents of the static device mapping table, |
266084 |
14-May-2014 |
ian |
MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323, r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373, r260374, r260375
Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c.
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
In pmap_mapdev(), first check whether a static mapping exists,
Convert TI static device mapping to use the new arm_devmap_add_entry(),
Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy.
Eliminate use of fdt_immr_addr(), it's not needed for tegra
Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make static device mappings.
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.
Add #include <machine/fdt.h> to a few files that used to get it via pollution
Enable the mv cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config.
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.
Switch RPi to using arm_devmap_add_entry() to set up static device mapping.
Allow 'no static device mappings' to potentially work.
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.
Switch a10 to using arm_devmap_add_entry() to set up static device mapping. |
266079 |
14-May-2014 |
ian |
MFC r260281, r260282, r260283, r260285
Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table
Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR().
Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(), when running on FDT systems. Unmap memory in nexus_deactivate_resource().
Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer used by anything. |
266070 |
14-May-2014 |
ian |
MFC r260161, r260163, r260165, r260166, r260189
Add polarity and level support to ARM GIC
Do not attach to PCI bridges in AHCI driver
Use only mapped BIOs on ARM
Fix race condition in DELAY for SP804 timer. |
266058 |
14-May-2014 |
ian |
MFC r258359, r258742, r258845, r259936, r259640
Apply access flags for managed and unmanaged pages properly on ARMv6/v7
Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write.
Enable missing Access Flag for secondary cores on ARMv6/v7
Add identification and necessary type checks for Krait CPU cores. |
266050 |
14-May-2014 |
ian |
MFC r256707, r256708, r257291, r258358
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 Spell cpu_l2cache_wb_range correctly.
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.
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(). |
266046 |
14-May-2014 |
ian |
MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281, r257282, r257332
Wait for DesignWare UART transfers completion before accessing line control
Enable UART busy detection handling for Armada XP - based board
Enable SATA interface on Armada XP Run mvs SATA driver on Armada XP instead of old mv_sata
Retire arm_remap_nocache() and the data and constants associated with it.
Remove hard-coded mappings related to Armada XP support
Fix-up DTB for Armada XP registers' base according to the actual settings
Change Armada XP kernel load address to the u-boot's end address
Remove not working and deprecated PJ4Bv6 support
Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU
Add missing ARMv6 CPU functions to ARM Makefile |
266000 |
14-May-2014 |
ian |
MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793, r257794, r257795, r257992
Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases.
Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API.
Do not panic if pmap_mincore() is called.
An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY.
Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware.
Allow OF_decode_addr() to also be able to map resources on big-endian devices.
Make tsec work with the device tree present on the RB800.
Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree.
Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR. |
265606 |
07-May-2014 |
scottl |
Merge r264984
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.
Obtained from: Netflix, Inc. |
261490 |
04-Feb-2014 |
eadler |
MFC r258787: r258780 should not have applied to .S files. |
261455 |
04-Feb-2014 |
eadler |
MFC r258779,r258780,r258787,r258822:
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.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
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. |
259963 |
27-Dec-2013 |
adrian |
Revert r252694 from stable/10 to fix instabilities seen with jemalloc + dhclient/sshd.
This is a direct commit to stable/10 as the VM code has changed since the stable/10 branch.
PR: kern/185046 |
259510 |
17-Dec-2013 |
kib |
MFC r257228: Add bus_dmamap_load_ma() function to load map with the array of vm_pages. |
259377 |
14-Dec-2013 |
ian |
MFC r258392, r258412:
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.
Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c. |
259373 |
14-Dec-2013 |
ian |
MFC r258240:
In the data abort handler, don't panic if kdb is available and says it handled the condition. |
259365 |
14-Dec-2013 |
ian |
MFC r257669, r257672, r257673, r257676, r257678:
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.
Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to share the same code on both architectures.
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).
Remove imx local devmap code and use the essentially identical common code that got moved from imx_machdep.c to arm/devmap.c. |
259364 |
14-Dec-2013 |
ian |
MFC r257648, r257649, r257660:
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.
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). |
259349 |
13-Dec-2013 |
ian |
MFC r257419:
Do not EOI an interrupt until the point after the filter handlers / before threaded handlers. |
259337 |
13-Dec-2013 |
ian |
MFC r257203: Eliminate a compiler warning about extraneous parens. |
259335 |
13-Dec-2013 |
ian |
MFC r257201, r257202
Retire arm_remap_nocache() and the data and constants associated with it. |
259329 |
13-Dec-2013 |
ian |
MFC r257199, r257200, r257217:
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.
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.
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. |
259313 |
13-Dec-2013 |
ian |
MFC r256647:
Invalidate the entire L2 cache before enabling it. Say whether it has been enabled or disabled. |
259310 |
13-Dec-2013 |
ian |
MFC r256638:
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. |
259309 |
13-Dec-2013 |
ian |
MFC r256637:
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. |
259308 |
13-Dec-2013 |
ian |
MFC r256628: 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. |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
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
|
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
|
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
|
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
|
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
|
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.
|
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.
|
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.
|
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()
|
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)
|
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.
|
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@
|
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.
|
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.
|
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.
|
253052 |
09-Jul-2013 |
emaste |
Remove extraneous format string converison specifier
Submitted by: wxs@
|
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.
|
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.
|
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
|
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
|
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>
|
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.
|
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.
|
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
|
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.
|
250695 |
16-May-2013 |
gber |
Fix L2 cache write-back invalidate for Sheeva core.
Submitted by: Michal Dubiel Obtained from: Netasq, Semihalf
|
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
|
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.
|
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
|
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
|
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.
|
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)
|
249762 |
22-Apr-2013 |
dmarion |
Initialize GIC_PMRR register on ARM GIC.
Provided by: Thomas Skibo
|
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.
|
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.
|
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)
|
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
|
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
|
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.
|
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>
|
247608 |
02-Mar-2013 |
andrew |
Ensure the stack is correctly aligned before calling the first C function.
|
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.
|
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
|
247340 |
26-Feb-2013 |
cognet |
Fix SMP build.
|
247339 |
26-Feb-2013 |
cognet |
Don't forget to init the VFP stuff for all cores.
|
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
|
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
|
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>
|
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>)
|
246601 |
09-Feb-2013 |
kientzle |
Fix breakage introduced in r246318.
|
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>
|
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
|
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
|
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.
|
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.
|
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.
|
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.
|
245192 |
08-Jan-2013 |
cognet |
Remove old declarations.
|
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
|
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
|
245079 |
05-Jan-2013 |
gonzo |
Add hw.board.serial and hw.board.revision for exporting board-specific info
|
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
|
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
|
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().
|
244414 |
19-Dec-2012 |
cognet |
Properly implement pmap_[get|set]_memattr
Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>
|
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>
|
243691 |
30-Nov-2012 |
gonzo |
Get reserved memory regions and exclude them from available memory map
|
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
|
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.
|
243523 |
25-Nov-2012 |
kientzle |
Fix spelling.
|
243359 |
21-Nov-2012 |
cognet |
Make sure the address starts on a cache line boundary.
|
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.
|
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.
|
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
|
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
|
240913 |
25-Sep-2012 |
alc |
Eliminate an unused declaration.
|
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.
|
240532 |
15-Sep-2012 |
alc |
Eliminate an unused malloc type.
|
240486 |
14-Sep-2012 |
gber |
Support identification of new PJ4B cores.
Obtained from: Semihalf
|
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
|
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
|
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
|
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)
|
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
|
239687 |
25-Aug-2012 |
gonzo |
Add clrex, strex , ldrex, strex and variants
Submitted by: Alexander Rybalko
|
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.
|
239369 |
18-Aug-2012 |
hrs |
Fix build when DEBUG is defined.
|
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.
|
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.
|
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@
|
237118 |
15-Jun-2012 |
imp |
Fix a global shadowing problem when LINUX_BOOT_ABI was defined.
|
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
|
236991 |
13-Jun-2012 |
imp |
Final whitespace trim.
|
236828 |
10-Jun-2012 |
andrew |
Pull out the common code to initialise proc0 & thread0 from initarm to a common function.
Reviewed by: imp
|
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.
|
236308 |
30-May-2012 |
gber |
Print userspace backtrace for current thread.
Reviewed by: imp Obtained from: Semihalf
|
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
|
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"
|
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@
|
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.
|
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
|
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
|
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
|
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
|
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
|
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.
|
226498 |
18-Oct-2011 |
des |
Trace attempts to call restricted MD syscalls.
|
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
|
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
|
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)
|
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)
|
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)
|
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)
|
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)
|
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
|
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).
|
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.
|
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
|
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
|
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>
|
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...
|
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
|
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
|
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
|
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.
|
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
|
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
|
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
|
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.
|
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.
|
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
|
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!
|
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.
|
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
|
204122 |
20-Feb-2010 |
kevlo |
Show the cpu info for fa526
Submitted by: Yohanes Nugroho <yohanes at gmail dot com>
|
203974 |
16-Feb-2010 |
imp |
The NetBSD Foundation has granted permission to remove clauses 3 and 4.
Obtained from: NetBSD
|
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.
|
202353 |
15-Jan-2010 |
cognet |
Do not free the dmamap if it is still busy.
Submitted by: Mark Tinguely MFC after: 3 days
|
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...
|
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
|
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.
|
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
|
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.
|
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
|
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
|
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.
|
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
|
194908 |
24-Jun-2009 |
cognet |
Fix typo.
|
194906 |
24-Jun-2009 |
cognet |
Fix typo.
|
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
|
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
|
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
|
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)
|
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.
|
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
|
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
|
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.
|
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
|
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
|
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.
|
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
|
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)
|
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
|
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
|
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.
|
187192 |
13-Jan-2009 |
thompsa |
Restore the if_*var.h and if_*reg.h to their original names, they dont need to be different.
|
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.
|
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
|
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
|
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
|
184730 |
06-Nov-2008 |
raj |
ARM pmap style(9) and cosmetics.
|
184728 |
06-Nov-2008 |
raj |
Support kernel crash mini dumps on ARM architecture.
Obtained from: Juniper Networks, Semihalf
|
184205 |
23-Oct-2008 |
des |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
|
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
|
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
|
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
|
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.
|
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
|
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
|
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
|
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
|
181223 |
03-Aug-2008 |
cognet |
Handle ldr pc, [reg] in branch_taken().
Obtained from: NetBSD MFC after: 3 days
|
181144 |
02-Aug-2008 |
cognet |
Store the PC while context switching, for the benefits of DDB.
|
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.
|
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
|
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
|
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
|
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
|
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)
|
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
|
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
|
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
|
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.
|
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
|
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.
|
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>
|
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
|
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>
|
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
|
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
|
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
|
173215 |
31-Oct-2007 |
kevlo |
Don't define get_cachetype() for CPU_ARM9E unless it's going to be used.
|
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
|
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
|
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)
|
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)
|
172245 |
19-Sep-2007 |
cognet |
Remove dead code.
Approved by: re (blanket) Beer from: jadawin
|
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)
|
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)
|
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)
|
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)
|
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)
|
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.
|
170502 |
10-Jun-2007 |
cognet |
Initialize the dma tag's bounce_zone to NULL if we didn't allocate it.
|
170406 |
07-Jun-2007 |
cognet |
There's no nobounce_dmamap on arm.
|
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)
|
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
|
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
|
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.
|
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>
|
167761 |
21-Mar-2007 |
kevlo |
Fix a comment
|
167009 |
26-Feb-2007 |
kevlo |
Remove unused header file <machine/katelib.h>
|
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.
|
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@
|
166819 |
19-Feb-2007 |
cognet |
Teach the kernel and the ELF trampoline how to boot from onboard flash.
|
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().
|
166510 |
05-Feb-2007 |
kevlo |
<sys/sx.h> is unneeded.
|
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.
|
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
|
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).
|
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.
|
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
|
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
|
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.
|
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
|
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.
|
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.
|
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.
|
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
|
161675 |
28-Aug-2006 |
davidxu |
Implement casuword32, compare and set user integer, thank Marcel Moolenarr who wrote the IA64 version of casuword32.
|
161618 |
25-Aug-2006 |
cognet |
Explicitely set the "allocbuffer" field to NULL when creating a new dmamap.
|
161592 |
24-Aug-2006 |
cognet |
Finally bring it support for the i80219 XScale processor.
Submitted by: Max M. Boyarov <m.boyarov bsd by>
|
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).
|
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.
|
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
|
160537 |
20-Jul-2006 |
alc |
Implement pmap_clear_write().
Discussed with: cognet@
|
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
|
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.
|
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.
|
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
|
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.
|
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.
|
159758 |
18-Jun-2006 |
cognet |
Make sure the stack is properly aligned. Enable the MMU when relocating as well, and use write-through cache.
|
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.
|
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@
|
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@
|
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.
|
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@
|
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.
|
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
|
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.
|
158590 |
15-May-2006 |
benno |
Display real/avail memory as per other platforms.
Approved by: cognet
|
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
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|
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.
|
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.
|
154561 |
20-Jan-2006 |
cognet |
Build a minimal pagetables, with only section mappings, mapped write through, to speed up the decompression.
|
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.
|
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.
|
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.
|
153273 |
09-Dec-2005 |
cognet |
In copyout(), quad-align the source buffer, and use ldrd if possible.
|
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
|
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.
|
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__.
|
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.
|
150893 |
03-Oct-2005 |
cognet |
Bring in the good version of this file.
|
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.
|
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.
|
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.
|
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>
|
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)
|
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)
|
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
|
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.
|
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.
|
146668 |
27-May-2005 |
cognet |
Remove pmap_deactivate(), we do not use it.
|
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).
|
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.
|
146594 |
24-May-2005 |
cognet |
Use asm versions of in_cksum() and friends.
|
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.
|
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.
|
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.
|
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.
|
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
|
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...
|
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
|
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.
|
142050 |
18-Feb-2005 |
cognet |
Support high vectors for arm9.
Obtained from: NetBSD
|
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.
|
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.
|
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
|
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.
|
140310 |
15-Jan-2005 |
cognet |
MFi386: add bus_dmamap_load_mbuf_sg().
|
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.
|
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().
|
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.
|
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.
|
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.
|
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@
|
137903 |
20-Nov-2004 |
cognet |
Increase cnt.v_syscall and cnt.v_trap when needed.
|
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
|
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.
|
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.
|
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.
|
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.
|
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
|
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.
|
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
|
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.
|
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)
|
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().
|
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.
|
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.
|
132514 |
21-Jul-2004 |
cognet |
Use the kernel pmap if no thread is provided.
|
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.
|
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.
|
132054 |
12-Jul-2004 |
cognet |
Implement makectx().
|
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.
|
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.
|
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
|
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
|
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.
|