#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
284147 |
|
08-Jun-2015 |
alc |
Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.
Differential Revision: https://reviews.freebsd.org/D2712 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
|
#
276439 |
|
30-Dec-2014 |
alc |
The physical memory allocator supports the use of distinct free lists for managing pages from different address ranges. Generally speaking, this feature is used to increase the likelihood that physical pages are available that can meet special DMA requirements or can be accessed through a limited-coverage direct mapping (e.g., MIPS). However, prior to this change, the configuration of the free lists was static, i.e., it was determined at compile time. Consequentally, free lists could be created for address ranges that held no actual pages, for example, on 32-bit MIPS- based systems with 512 MB or less of physical memory. This change makes the creation of the free lists dynamic, i.e., it is based on the available physical memory at boot time.
On 64-bit x86-based systems with 64 GB or more of physical memory, create free lists for managing pages with physical addresses below 4 GB. This change is to address reported problems with initializing devices that require the allocation of physical pages below 4 GB on some systems with 128 GB or more of physical memory.
PR: 185727 Differential Revision: https://reviews.freebsd.org/D1274 Reviewed by: jhb, kib MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
|
#
271213 |
|
06-Sep-2014 |
adrian |
Implement local sfbuf_map and sfbuf_unmap for MIPS32.
The pre-rework behaviour was not to keep the cached mappings around after the sfbuf was used but instead to recycle said mappings.
PR: kern/193400
|
#
269577 |
|
05-Aug-2014 |
glebius |
Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c The MD allocators were very common, however there were some minor differencies. These differencies were all consolidated in the MI allocator, under ifdefs. The defines from machine/vmparam.h turn on features required for a particular machine. For details look in the comment in sys/sf_buf.h.
As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have machine/sf_buf.h, which is usually quite small.
Tested by: glebius (i386), tuexen (arm32), kevlo (arm32) Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
#
257854 |
|
08-Nov-2013 |
alc |
As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional.
Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity.
Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to that of setting the tunable vm.kmem_size. Whereas the macros VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size have been distinct. In particular, whereas VM_KMEM_SIZE was overridden by VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size was not. Remedy this inconsistency. Now, VM_KMEM_SIZE can be used to set the size of the kmem arena at compile-time without that value being overridden by auto-sizing.
Update the nearby comments to reflect the kmem submap being replaced by the kmem arena. Stop duplicating the auto-sizing formula in every machine- dependent vmparam.h and place it in kmeminit() where auto-sizing takes place.
Reviewed by: kib (an earlier version) Sponsored by: EMC / Isilon Storage Division
|
#
250338 |
|
07-May-2013 |
attilio |
Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in order to match the MAXCPU concept. The change should also be useful for consolidation and consistency.
Sponsored by: EMC / Isilon storage division Obtained from: jeff Reviewed by: alc
|
#
245337 |
|
12-Jan-2013 |
alc |
Define VM_KMEM_SIZE_MAX as a fraction of the kernel address space size rather than a constant so that VM_KMEM_SIZE_MAX will scale automatically with the kernel address space size. This is particularly important for MIPS because the same definition is used by both 32- and 64-bit kernels.
Tested by: jchandra
|
#
232449 |
|
03-Mar-2012 |
jmallett |
o) Add COMPAT_FREEBSD32 support for MIPS kernels using the n64 ABI with userlands using the o32 ABI. This mostly follows nwhitehorn's lead in implementing COMPAT_FREEBSD32 on powerpc64. o) Add a new type to the freebsd32 compat layer, time32_t, which is time_t in the 32-bit ABI being used. Since the MIPS port is relatively-new, even the 32-bit ABIs use a 64-bit time_t. o) Because time{spec,val}32 has the same size and layout as time{spec,val} on MIPS with 32-bit compatibility, then, disable some code which assumes otherwise wrongly when built for MIPS. A more general macro to check in this case would seem like a good idea eventually. If someone adds support for using n32 userland with n64 kernels on MIPS, then they will have to add a variety of flags related to each piece of the ABI that can vary. That's probably the right time to generalize further. o) Add MIPS to the list of architectures which use PAD64_REQUIRED in the freebsd32 compat code. Probably this should be generalized at some point.
Reviewed by: gonzo
|
#
221855 |
|
13-May-2011 |
mdf |
Move the ZERO_REGION_SIZE to a machine-dependent file, as on many architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware.
Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment).
Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit.
Requested by: alc MFC after: 1 week MFC with: r221853
|
#
217192 |
|
09-Jan-2011 |
kib |
Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h. Update the outdated comments describing MAXSLP and the process selection algorithm for swap out.
Comments wording and reviewed by: alc
|
#
216315 |
|
09-Dec-2010 |
jchandra |
UMA_MD_SMALL_ALLOC for mips.
Implement uma_small_alloc() and uma_small_free() for mips that allocates pages from direct mapped memory. Uses the same mechanism as the page table page allocator, so that we allocate from KSEG0 in 32 bit, and from XKPHYS on 64 bit.
Reviewed by: alc, jmallett
|
#
216157 |
|
03-Dec-2010 |
jchandra |
1. Fix off by one errors in calls to MIPS_DIRECT_MAPPABLE, reported by alc@ 2. Remove unnecessary #defines from vmparam.h
Submitted by: alc (2) Reviewed by: alc (1)
|
#
211453 |
|
18-Aug-2010 |
jchandra |
MIPS n64 support - continued...
1. On n64, use XKPHYS to map page table pages instead of KSEG0. Maintain just one freepages list on n64.
The changes are mainly to introduce MIPS_PHYS_TO_DIRECT(pa), MIPS_DIRECT_TO_PHYS(), which will use KSEG0 in 32 bit compilation and XKPHYS in 64 bit compilation.
2. Change macro based PMAP_LMEM_MAP1(), PMAP_LMEM_MAP2(), PMAP_LMEM_UNMAP() to inline functions.
3. Introduce MIPS_DIRECT_MAPPABLE(pa), which will further reduce the cases in which we will need to have a special case for 64 bit compilation.
4. Update CP0 hazard definitions for CPU_RMI - the cpu does not need any nops
Reviewed by: neel
|
#
210846 |
|
04-Aug-2010 |
jchandra |
Add 3 level page tables for MIPS in n64.
- 32 bit compilation will still use old 2 level page tables - re-arrange pmap code so that adding another level is easier - pmap code for 3 level page tables for n64 - update TLB handler to traverse 3 levels in n64
Reviewed by: jmallett
|
#
210627 |
|
29-Jul-2010 |
jchandra |
Prepare for 3 level page tables for MIPS.
- Move page table second level shift and mask to param.h - rename SEGOFSET to SEGMASK - fix values for 64 bit maximum kernel and user addresses.
|
#
210550 |
|
27-Jul-2010 |
jhb |
Very rough first cut at NUMA support for the physical page allocator. For now it uses a very dumb first-touch allocation policy. This will change in the future. - Each architecture indicates the maximum number of supported memory domains via a new VM_NDOMAIN parameter in <machine/vmparam.h>. - Each cpu now has a PCPU_GET(domain) member to indicate the memory domain a CPU belongs to. Domain values are dense and numbered from 0. - When a platform supports multiple domains, the default freelist (VM_FREELIST_DEFAULT) is split up into N freelists, one for each domain. The MD code is required to populate an array of mem_affinity structures. Each entry in the array defines a range of memory (start and end) and a domain for the range. Multiple entries may be present for a single domain. The list is terminated by an entry where all fields are zero. This array of structures is used to split up phys_avail[] regions that fall in VM_FREELIST_DEFAULT into per-domain freelists. - Each memory domain has a separate lookup-array of freelists that is used when fulfulling a physical memory allocation. Right now the per-domain freelists are listed in a round-robin order for each domain. In the future a table such as the ACPI SLIT table may be used to order the per-domain lookup lists based on the penalty for each memory domain relative to a specific domain. The lookup lists may be examined via a new vm.phys.lookup_lists sysctl. - The first-touch policy is implemented by using PCPU_GET(domain) to pick a lookup list when allocating memory.
Reviewed by: alc
|
#
210460 |
|
25-Jul-2010 |
imp |
Get N64 building by defining VM_FREELIST_DIRECT to be VM_FREELIST_DEFAULT. I believe this is correct, since KX is set in n64, and thus all RAM can be direct mapped.
|
#
210327 |
|
21-Jul-2010 |
jchandra |
Redo the page table page allocation on MIPS, as suggested by alc@.
The UMA zone based allocation is replaced by a scheme that creates a new free page list for the KSEG0 region, and a new function in sys/vm that allocates pages from a specific free page list.
This also fixes a race condition introduced by the UMA based page table page allocation code. Dropping the page queue and pmap locks before the call to uma_zfree, and re-acquiring them afterwards will introduce a race condtion(noted by alc@).
The changes are : - Revert the earlier changes in MIPS pmap.c that added UMA zone for page table pages. - Add a new freelist VM_FREELIST_HIGHMEM to MIPS vmparam.h for memory that is not directly mapped (in 32bit kernel). Normal page allocations will first try the HIGHMEM freelist and then the default(direct mapped) freelist. - Add a new function 'vm_page_t vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to allocate a page from a specified freelist. The MIPS page table pages will be allocated using this function from the freelist containing direct mapped pages. - Move the page initialization code from vm_phys_alloc_contig() to a new function vm_page_alloc_init(), and use this function to initialize pages in vm_page_alloc_freelist() too. - Split the function vm_phys_alloc_pages(int pool, int order) to create vm_phys_alloc_freelist_pages(int flind, int pool, int order), and use this function from both vm_page_alloc_freelist() and vm_phys_alloc_pages().
Reviewed by: alc
|
#
209500 |
|
24-Jun-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD - changeset 7
Initial support for n32 and n64 ABIs from http://svn.freebsd.org/base/user/jmallett/octeon
Changes are: - syscall, exception and trap support for n32/n64 ABIs - 64-bit address space defines - _jmp_buf for n32/n64 - casts between registers and ptr/int updated to work on n32/n64
Approved by: rrs(mentor), jmallett
|
#
207139 |
|
24-Apr-2010 |
jmallett |
Most MIPS systems have a comparatively-sparse physical memory layout. Switch to using the sparse physseg layout in the VM system.
|
#
206746 |
|
17-Apr-2010 |
jmallett |
o) Add NPDEPG, like NPTEPG but for PDEs. o) Remove NBPG, PGOFSET and PGSHIFT. Use the standard names. o) Remove some unused macros and move things from param.h to vmparam.h that belong in the latter. (Actually, all of the kernel segment values, virtual addresses, etc., belong in one place, but this is a step in the right direction.)
|
#
206716 |
|
16-Apr-2010 |
jmallett |
o) Remove code related to VM_ALLOC_WIRED_TLB_PG_POOL, VM_KERNEL_ALLOC_OFFSET and floating pages. They are unused and unsupported.
|
#
202175 |
|
12-Jan-2010 |
imp |
Set the svn:eol-style = native and svn:mime-type = text/plain properties on all files in this tree.
Submitted by: rpaulo@
|
#
178172 |
|
13-Apr-2008 |
imp |
FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64, mips32r2 and mips64r2 (and close relatives) processors. There presently is support for ADMtek ADM5120, A mips 4Kc in a malta board, the RB533 routerboard (based on IDT RC32434) and some preliminary support for sibtye/broadcom designs. Other hardware support will be forthcomcing.
This port boots multiuser under gxemul emulating the malta board and also bootstraps on the hardware whose support is forthcoming...
Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard, Randall Stewert and others that have contributed to the mips2 and/or mips2-jnpr perforce branches. Juniper contirbuted a generic mips port late in the life cycle of the misp2 branch. Warner Losh merged the mips2 and Juniper code bases, and others list above have worked for the past several months to get to multiuser.
In addition, the mips2 work owe a debt to the trail blazing efforts of the original mips branch in perforce done by Juli Mallett.
|