aboutsummaryrefslogtreecommitdiff
path: root/sys/mips
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up a couple of MD warts in vm_fault_populate():Jason A. Harmening2021-03-311-0/+6
| | | | | | | | | | | | | | | | | | | | --Eliminate a big ifdef that encompassed all currently-supported architectures except mips and powerpc32. This applied to the case in which we've allocated a superpage but the pager-populated range is insufficient for a superpage mapping. For platforms that don't support superpages the check should be inexpensive as we shouldn't get a superpage in the first place. Make the normal-page fallback logic identical for all platforms and provide a simple implementation of pmap_ps_enabled() for MIPS and Book-E/AIM32 powerpc. --Apply the logic for handling pmap_enter() failure if a superpage mapping can't be supported due to additional protection policy. Use KERN_PROTECTION_FAILURE instead of KERN_FAILURE for this case, and note Intel PKU on amd64 as the first example of such protection policy. Reviewed by: kib, markj, bdragon Differential Revision: https://reviews.freebsd.org/D29439
* gdb: report specific stop reason for watchpointsMitchell Horne2021-03-301-0/+6
| | | | | | | | | | | | | | | | The remote protocol allows for implementations to report more specific reasons for the break in execution back to the client [1]. This is entirely optional, so it is only implemented for amd64, arm64, and i386 at the moment. [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Stop-Reply-Packets.html Reviewed by: jhb MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 51 Differential Revision: https://reviews.freebsd.org/D29174
* ddb: replace watchpoint set/clear functionsMitchell Horne2021-03-291-14/+0
| | | | | | | | | | Use the new kdb variants. Print more specific error messages. Reviewed by: jhb, markj MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D29156
* Introduce kdb-level watchpoint functionsMitchell Horne2021-03-291-0/+15
| | | | | | | | | | | | | | | | | | | This basically mirrors what already exists in ddb, but provides a slightly improved interface. It allows the caller to specify the watchpoint access type, and returns more specific error codes to differentiate failure cases. This will be used to support hardware watchpoints in gdb(4). Stubs are provided for architectures lacking hardware watchpoint logic (mips, powerpc, riscv), while other architectures are added individually in follow-up commits. Reviewed by: jhb, kib, markj MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D29155
* Consolidate machine/endian.h definitionsMitchell Horne2021-03-261-105/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This change serves two purposes. First, we take advantage of the compiler provided endian definitions to eliminate some long-standing duplication between the different versions of this header. __BYTE_ORDER__ has been defined since GCC 4.6, so there is no need to rely on platform defaults or e.g. __MIPSEB__ to determine endianness. A new common sub-header is added, but there should be no changes to the visibility of these definitions. Second, this eliminates the hand-rolled __bswapNN() routines, again in favor of the compiler builtins. This was done already for x86 in e6ff6154d203. The benefit here is that we no longer have to maintain our own implementations on each arch, and can instead rely on the compiler to emit appropriate instructions or libcalls, as available. This should result in equivalent or better code generation. Notably 32-bit arm will start using the `rev` instruction for these routines, which is available on armv6+. PR: 236920 Reviewed by: arichardson, imp Tested by: bdragon (BE powerpc) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D29012
* Remove PCPU_INCJason A. Harmening2021-03-211-1/+0
| | | | | | | | | | | | | | | | e4b8deb22227 removed the last in-tree uses of PCPU_INC(). Its potential benefit is also practically nonexistent. Non-x86 platforms already implement it as PCPU_ADD(..., 1), and according to [0] there are no recent x86 processors for which the 'inc' instruction provides a performance benefit over the equivalent memory-operand form of the 'add' instruction. The only remaining benefit of 'inc' is smaller instruction size, which in this case is inconsequential given the limited number of per-CPU data consumers. [0]: https://www.agner.org/optimize/instruction_tables.pdf Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D29308
* nlmrsa: Mark deprecated for 14.John Baldwin2021-03-161-0/+1
| | | | | | | | This is the only in-tree driver for the asymmetric crypto support in OCF that is already marked deprecated for 14. MFC after: 3 days Sponsored by: Chelsio Communications
* Fix some common typos in commentsGordon Bergling2021-03-131-3/+3
| | | | | | | | | | | - occured -> occurred - normaly -> normally - controling -> controlling - fileds -> fields - insterted -> inserted - outputing -> outputting MFC after: 1 week
* [ar71xx] Fix routerstation / routerstation pro redboot FIS probingAdrian Chadd2021-02-252-0/+8
| | | | | | | | | | | | | | Some changes back in ye olde times somewhere has changed the default block size the flash device exposes. So, the default geom redboot FIS probing (to find the partition table structure in flash!) is no longer finding it. So, force it to probe at the last 64k of flash regardless of the underlying flash block size. Tested: * Ubiquiti Routerstation pro, boots -HEAD MIPS
* Add a VA_IS_CLEANMAP() macro.John Baldwin2021-02-181-3/+2
| | | | | | | | | | | | | | This macro returns true if a provided virtual address is contained in the kernel's clean submap. In CHERI kernels, the buffer cache and transient I/O map are allocated as separate regions. Abstracting this check reduces the diff relative to FreeBSD. It is perhaps slightly more readable as well. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28710
* mips: fix NLM platforms breakage caused by e0a0a3efOleksandr Tymoshenko2021-02-011-0/+18
| | | | | | | NetLogic platforms have their own implementation of cpu_init_interrupts. Apply the same logic to it as to intr_machdep.c. PR: 253051
* mips: fix early kernel panic when setting up interrupt countersOleksandr Tymoshenko2021-01-312-36/+22
| | | | | | | | | | | | | | | | | | Commit 248f0ca converted intrcnt and intrnames from u_long[] and char[] to u_long* and char* respectively, but for non-INTRNG mips these symbols were defined in .S file as a pre-allocated static arrays, so the problem wasn't cought at compile time. Conversion from an array to a pointer requires pointer initialization and it wasn't done for MIPS, so whatever happenned to be in the begginning of intcnt[] array was used as a pointer value. Move intrcnt/intrnames to C code and allocate them dynamically although with a fixed size at the moment. Reviewed by: emaste PR: 253051 Differential Revision: https://reviews.freebsd.org/D28424 MFC after: 1 day
* make maximum interrupt number tunable on ARM, ARM64, MIPS, and RISC-VOleksandr Tymoshenko2021-01-191-1/+1
| | | | | | | | | | | | Use a machdep.nirq tunable intead of compile-time constant NIRQ as a value for maximum number of interrupts. It allows keep a system footprint small by default with an option to increase the limit for large systems like server-grade ARM64 Reviewd by: mhorne Differential Revision: https://reviews.freebsd.org/D27844 Submitted by: Klara, Inc. Sponsored by: Ampere Computing
* mips: Fix build by using the correct device-tree include pathEmmanuel Vadot2021-01-164-4/+4
|
* hid: Import functions and constants required by new subsystemVladimir Kondratyev2021-01-073-0/+3
| | | | | | | | | | | | | | | | | | | | This does an import of quirk stubs, debugging macros from USB code and numerous usage constants used by dependent drivers. Besides, this change renames some functions to get a better matching with userland library and NetBSD/OpenBSD HID code. Namely: - Old hid_report_size() renamed to hid_report_size_max() - New hid_report_size() calculates size of given report rather than maximum size of all reports. - hid_get_data_unsigned() renamed to hid_get_udata() - hid_put_data_unsigned() renamed to hid_put_udata() Compat shim functions are provided in usbhid.h to make possible compile of legacy code unmodified after this change. Reviewed by: manu, hselasky Differential revision: https://reviews.freebsd.org/D27887
* Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev2021-01-073-0/+9
| | | | | | | | It will be used by the upcoming HID-over-i2C implementation. Should be no-op, except hid.ko module dependency is to be added to affected drivers. Reviewed by: hselasky, manu Differential revision: https://reviews.freebsd.org/D27867
* Handle KDB_WHY_TRAP return on arm and mipsMitchell Horne2021-01-021-1/+6
| | | | | | | | | Upon exit from the debugger, checking the return code of kdb_trap() allows one to retry the fatal page fault. This matches what is done on all other architectures. Reviewed by: jhb (earlier version) Differential Revision: https://reviews.freebsd.org/D27535
* mips: fix build w/ TICK_USE_MALTA_RTC definedMarius Strobl2020-12-251-9/+8
| | | | | | This was mainly broken by 7e82012aff9888d64a85d19aaed51def9ebbff22 and r178192 respectively. Also, remove unused #include.
* mips: Fix sub-word atomics implementationJessica Clarke2020-12-141-48/+77
| | | | | | | | | | | | | | | These aligned the address but then always used the least significant bits of the value in memory, which is the wrong half 50% of the time for 16-bit atomics and the wrong quarter 75% of the time for 8-bit atomics. These bugs were all present in r178172, the commit that added the mips port, and have remained for its entire existence to date. Reviewed by: jhb (mentor) Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D27343 Notes: svn path=/head/; revision=368624
* Various fixes for the MIPS DDB stack unwinder.John Baldwin2020-12-041-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix kernel stack unwinding end-of-function false-positive The kernel stack unwinder assumes that any jr $ra indicates the end of the current function. However, modern compilers generate code that contains jr $ra at various places inside the function. - Handle LLD inter-function padding when looking for the start of a function. - Use call site for symbol name/offset when unwinding Currently we use the return address, which will normally just give an output that's off by 8 from the actual call site. However, for tail calls, this is particularly bad, as we end up printing the symbol name for the function that comes after the one that made the call. Instead we should go back two instructions from the return address for the unwound program counter. Submitted by: arichardson (1, 2), jrtc27 (3) Reviewed by: arichardson Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27363 Notes: svn path=/head/; revision=368347
* Always use 64-bit physical addresses for dump_avail[] in minidumpsMark Johnston2020-12-031-7/+16
| | | | | | | | | | | | | | | | | | | | | | As of r365978, minidumps include a copy of dump_avail[]. This is an array of vm_paddr_t ranges. libkvm walks the array assuming that sizeof(vm_paddr_t) is equal to the platform "word size", but that's not correct on some platforms. For instance, i386 uses a 64-bit vm_paddr_t. Fix the problem by always dumping 64-bit addresses. On platforms where vm_paddr_t is 32 bits wide, namely arm and mips (sometimes), translate dump_avail[] to an array of uint64_t ranges. With this change, libkvm no longer needs to maintain a notion of the target word size, so get rid of it. This is a no-op on platforms where sizeof(vm_paddr_t) == 8. Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27082 Notes: svn path=/head/; revision=368307
* Make stack_save*() more robust on MIPS.John Baldwin2020-12-011-35/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Validate any stack addresses read from against td_kstack before reading. If an unwind operation would attempt to read outside the bounds of td_kstack, abort the unwind instead. - For stack_save_td(), don't use the PC and SP from the current thread, instead read the PC and SP from pcb_context[]. - For stack_save(), use the current PC and SP of the current thread, not the values from pcb_regs (the horribly named td_frame of the outermost trapframe). The result was that stack_trace() never logged _any_ kernel frames but only the frame from the saved userspace registers on entry from the kernel. - Inline the one use of stack_register_fetch(). - Add a VALID_PC() helper macro and simplify types to remove excessive casts in stack_capture(). - Fix stack_capture() to work on compilers written in this century. Don't treat function epilogues as function prologues by skipping additions to SP when searching for a function start. - Add some comments to stack_capture() and fix some style bugs. Reviewed by: arichardson Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27358 Notes: svn path=/head/; revision=368241
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Notes: svn path=/head/; revision=368124
* Fix octeon_pmc post-r334827Justin Hibbits2020-11-181-1/+1
| | | | | | | | MFC after: 3 days Sponsored by: Juniper Networks, Inc Notes: svn path=/head/; revision=367807
* Remove 'struct trapframe' pointer from mips64's 'struct syscall_args'.Edward Tomasz Napierala2020-11-062-6/+5
| | | | | | | | | | | | | While here, use MAXARGS. This brings its 'struct syscall_args' in sync with most other architectures. Reviewed by: arichardson, brooks MFC after: 2 weeks Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D26619 Notes: svn path=/head/; revision=367429
* Fix UMA alignment for COP2 context structure.Justin Hibbits2020-11-041-1/+1
| | | | | | | | | | UMA alignment needs specified as (power-of-2) - 1, not power-of-2. Discussed with: gonzo MFC after: 3 days Notes: svn path=/head/; revision=367355
* Tidy up the #includes. Recent changes, such as the introduction ofAlan Cox2020-11-021-5/+0
| | | | | | | | | | | VM_ALLOC_WAITOK and vm_page_unwire_noq(), have eliminated the need for many of the #includes. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D27052 Notes: svn path=/head/; revision=367281
* Avoid dump_avail[] redefinition.Konstantin Belousov2020-10-1412-2/+14
| | | | | | | | | | | | | Move dump_avail[] extern declaration and inlines into a new header vm/vm_dumpset.h. This fixes default gcc build for mips. Reviewed by: alc, scottph Tested by: kevans (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26741 Notes: svn path=/head/; revision=366711
* random(4) FenestrasX: Push root seed version to arc4random(3)Conrad Meyer2020-10-102-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Push the root seed version to userspace through the VDSO page, if the RANDOM_FENESTRASX algorithm is enabled. Otherwise, there is no functional change. The mechanism can be disabled with debug.fxrng_vdso_enable=0. arc4random(3) obtains a pointer to the root seed version published by the kernel in the shared page at allocation time. Like arc4random(9), it maintains its own per-process copy of the seed version corresponding to the root seed version at the time it last rekeyed. On read requests, the process seed version is compared with the version published in the shared page; if they do not match, arc4random(3) reseeds from the kernel before providing generated output. This change does not implement the FenestrasX concept of PCPU userspace generators seeded from a per-process base generator. That change is left for future discussion/work. Reviewed by: kib (previous version) Approved by: csprng (me -- only touching FXRNG here) Differential Revision: https://reviews.freebsd.org/D22839 Notes: svn path=/head/; revision=366622
* Print symbol index for unsupported relocation typesMitchell Horne2020-10-071-3/+3
| | | | | | | | | | | | | | | It is unlikely, but possible, that an unrecognized or unsupported relocation type is encountered while trying to load a kernel module. If this occurs we should offer the symbol index as a hint to the user. While here, fix some small style issues. Reviewed by: markj, kib (amd64 part, in D26701) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Notes: svn path=/head/; revision=366519
* Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead.Edward Tomasz Napierala2020-09-272-7/+4
| | | | | | | | | Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26458 Notes: svn path=/head/; revision=366205
* Check for the only 32-bit MIPS ABIs we support, rather than !n64Justin Hibbits2020-09-261-1/+1
| | | | | | | | | | | There may be additional 64-bit ABIs supported, so use a positive check rather than a negative check. Suggested by: imp MFC after: 1 week Sponsored by: Juniper Networks, Inc Notes: svn path=/head/; revision=366188
* Fix mips64 buildJustin Hibbits2020-09-251-1/+1
| | | | | | | | | | | | Original patch was against FreeBSD 12, and a test compile wasn't run against head. md_tls_tcb_offset field was moved from mdthread to mdproc in the meantime. MFC after: 1 week Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=366171
* mips: Fix compat32 library builds from r366162Justin Hibbits2020-09-251-0/+4
| | | | | | | | | | Re-add the a_ptr and a_fcn fields to Elf32_Auxinfo. MFC after: 1 week Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=366169
* Fix compat32 on mips64Justin Hibbits2020-09-252-2/+12
| | | | | | | | | | | | | | | | | | Summary: Two bugs: * Elf32_Auxinfo is broken, using pointers in the union, which are 64-bits not 32. * freebsd32_sysarch() doesn't update the 'user local' register when handling MIPS_SET_TLS, leading to a NULL pointer dereference in the 32-bit application. Reviewed by: #mips, brooks MFC after: 1 week Sponsored by: Juniper Networks, Inc Differential Revision: https://reviews.freebsd.org/D26556 Notes: svn path=/head/; revision=366162
* Add a vmparam.h constant indicating pmap support for large pages.Mark Johnston2020-09-231-0/+5
| | | | | | | | | | | Enable SHM_LARGEPAGE support on arm64. Reviewed by: alc, kib Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26467 Notes: svn path=/head/; revision=366090
* Sparsify the vm_page_dump bitmapD Scott Phillips2020-09-212-1/+13
| | | | | | | | | | | | | | | | | | | On Ampere Altra systems, the sparse population of RAM within the physical address space causes the vm_page_dump bitmap to be much larger than necessary, increasing the size from ~8 Mib to > 2 Gib (and overflowing `int` for the size). Changing the page dump bitmap also changes the minidump file format, so changes are also necessary in libkvm. Reviewed by: jhb Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26131 Notes: svn path=/head/; revision=365978
* Move vm_page_dump bitset array definition to MI codeD Scott Phillips2020-09-213-62/+21
| | | | | | | | | | | | | | | | | | | These definitions were repeated by all architectures, with small variations. Consolidate the common definitons in machine independent code and use bitset(9) macros for manipulation. Many opportunities for deduplication remain in the machine dependent minidump logic. The only intended functional change is increasing the bit index type to vm_pindex_t, allowing the indexing of pages with address of 8 TiB and greater. Reviewed by: kib, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26129 Notes: svn path=/head/; revision=365977
* Add missing assignment forgotten in r365899Michal Meloun2020-09-201-0/+1
| | | | | | | | | Noticed by: mav MFC after: 1 month MFC with: r365899 Notes: svn path=/head/; revision=365926
* Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() functions.Michal Meloun2020-09-191-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | One problem with the bus_space_read_N() and bus_space_write_N() family of functions is that they provide no protection against exceptions which can occur when no physical hardware or device responds to the read or write cycles. In such a situation, the system typically would panic due to a kernel-mode bus error. The bus_space_peek_N() and bus_space_poke_N() family of functions provide a mechanism to handle these exceptions gracefully without the risk of crashing the system. Typical example is access to PCI(e) configuration space in bus enumeration function on badly implemented PCI(e) root complexes (RK3399 or Neoverse N1 N1SDP and/or access to PCI(e) register when device is in deep sleep state. This commit adds a real implementation for arm64 only. The remaining architectures have bus_space_peek()/bus_space_poke() emulated by using bus_space_read()/bus_space_write() (without exception handling). MFC after: 1 month Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25371 Notes: svn path=/head/; revision=365899
* Get rid of sv_errtbl and SV_ABI_ERRNO().Edward Tomasz Napierala2020-09-172-4/+0
| | | | | | | | | Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26388 Notes: svn path=/head/; revision=365832
* Refine the busdma template interface. Provide tools for filling in fieldsScott Long2020-09-141-32/+1
| | | | | | | | | | that can be extended, but also ensure compile-time type checking. Refactor common code out of arch-specific implementations. Move the mpr and mps drivers to this new API. The template type remains visible to the consumer so that it can be allocated on the stack, but should be considered opaque. Notes: svn path=/head/; revision=365706
* Add the MEM_EXTRACT_PADDR ioctl to /dev/mem.Mark Johnston2020-09-022-1/+8
| | | | | | | | | | | | | | | This allows privileged userspace processes to find information about the physical page backing a given mapping. It is useful in applications such as DPDK which perform some of their own memory management. Reviewed by: kib, jhb (previous version) MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D26237 Notes: svn path=/head/; revision=365265
* mips: clean up empty lines in .c and .h filesMateusz Guzik2020-09-01140-357/+61
| | | | Notes: svn path=/head/; revision=365076
* Include virtio support in std.MALTAAlex Richardson2020-07-311-0/+7
| | | | | | | | | | | The MALTA kernel config is generally used for QEMU and having support for VirtIO there by default is quite useful. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D25217 Notes: svn path=/head/; revision=363730
* Fix si_addr value for breakpoints in a delay slot.John Baldwin2020-07-271-1/+1
| | | | | | | | | | Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25773 Notes: svn path=/head/; revision=363617
* Don't include T_USER in si_trapno reported to userland.John Baldwin2020-07-271-1/+1
| | | | | | | | | | | | | | Signals are only reported for user traps, so T_USER is redundant. It is also a software convention and not included in the value reported by the hardware. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25769 Notes: svn path=/head/; revision=363613
* Set si_addr to badvaddr for TLB faults.John Baldwin2020-07-231-1/+1
| | | | | | | | | Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25775 Notes: svn path=/head/; revision=363458
* Revert r240317 to prevent leaking pmap entriesConrad Meyer2020-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Subsequent to r240317, kmem_free() was replaced with kva_free() (r254025). kva_free() releases the KVA allocation for the mapped region, but no longer clears the pmap (pagetable) entries. An affected pmap_unmapdev operation would leave the still-pmap'd VA space free for allocation by other KVA consumers. However, this bug easily avoided notice for ~7 years because most devices (1) never call pmap_unmapdev and (2) on amd64, mostly fit within the DMAP and do not need KVA allocations. Other affected arch are less popular: i386, MIPS, and PowerPC. Arm64, arm32, and riscv are not affected. Reported by: Don Morris <dgmorris AT earthlink.net> Submitted by: Don Morris (amd64 part) Reviewed by: kib, markj, Don (!amd64 parts) MFC after: I don't intend to, but you might want to Sponsored by: Dell Isilon Differential Revision: https://reviews.freebsd.org/D25689 Notes: svn path=/head/; revision=363266
* Switch from SCTP to SCTP_SUPPORT in GENERIC configs.Mark Johnston2020-07-162-2/+2
| | | | | | | | | | | | | This removes SCTP from in-tree kernel configuration files. Now, SCTP can be enabled by simply loading the module, as discussed on freebsd-net@. Reviewed by: tuexen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25611 Notes: svn path=/head/; revision=363253