- 21 Sep, 2020 31 commits
-
-
D Scott Phillips authored
On an Ampere Altra system, the physical memory is populated sparsely within the physical address space, with only about 0.4% of physical addresses backed by RAM in the range [0, last_pa]. This is causing the vm_reserv_array to be over-sized by a few orders of magnitude, wasting roughly 5 GiB on a system with 256 GiB of RAM. The sparse allocation of vm_reserv_array is controlled by defining VM_PHYSSEG_SPARSE, with the dense allocation still remaining for platforms with VM_PHYSSEG_DENSE. Reviewed by: markj, alc, kib Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26130
-
D Scott Phillips authored
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
-
D Scott Phillips authored
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
-
Mark Johnston authored
pmap_update_entry() will temporarily clear the valid bit of page table entries in order to satisfy the arm64 pmap's break-before-make constraint. pmap_kextract() may operate concurrently on kernel page table pages, introducing windows where the assertions added in r365879 may fail incorrectly since they implicitly assert that the valid bit is set. Modify the assertions to handle this. Reviewed by: andrew, mmel (previous version) Reviewed by: alc, kib Reported by: mmel, scottph MFC with: r365879
-
D Scott Phillips authored
An upcoming patch to use the bitset macros for tracking vm page dump information could conceivably need more than INT_MAX bits. Expand the bit type to long so that the extra range is available on 64-bit platforms where it would most likely be needed. CPUSET_COUNT and DOMAINSET_COUNT are also modified to remain of type `int`. Reviewed by: kib, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26190
-
D Scott Phillips authored
An upcoming change to include bitset(9) macros from vm_page.h causes a macro name collision with vchi's custom bitset macros. This change was performed mechanically by: sed -i .orig s/BITSET/VCHI_BITSET/g $(grep -rl BITSET sys/contrib/vchiq) Reviewed by: andrew Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26177
-
Alexander V. Chernikov authored
* Split rt_setmetrics into get_info_weight() and rt_set_expire_info(), as these two can be applied at different entities and at different times. * Start filling route weight in route change notifications * Pass flowid to UDP/raw IP route lookups * Rework nd6_subscription_cb() and sysctl_dumpentry() to prepare for the fact that rtentry can contain multiple nexthops. Differential Revision: https://reviews.freebsd.org/D26497
-
Kyle Evans authored
libifconfig now generates file(s) into its .OBJDIR that are essential to the build. Make sure we -I that in, like we already do in the ^/rescue build.
-
Alex Richardson authored
usr.bin/mkcsmapper/yacc.y:466:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
-
Alex Richardson authored
This applies my upstreamed fix: https://github.com/onetrueawk/awk/commit/ad9bd2f40a89ec9533b92254b86a756cf4f40fd4 Found By: UBSan
-
Alex Richardson authored
When matching a regex with ^, it would attempt to access gototab[NSTATES][NCHARS+2], and therefore access the state for the \002 character instead. This change is required to run awk under CHERI (with sub-object bounds) and when running with UBSan instrumentation. This was committed upstream as https://github.com/onetrueawk/awk/commit/cbf924342b63a095a4c6842280c3085b1b63ae45 Found by: CHERI (with subobject bounds enabled) Obtained from: CheriBSD Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D26509
-
David Bright authored
MFC after: 1 week Sponsored by: Dell EMC Isilon
-
Hans Petter Selasky authored
PR: 249384 MFC after: 1 week Submitted by: darius@dons.net.au Sponsored by: Mellanox Technologies // NVIDIA Networking
-
Hans Petter Selasky authored
Differential Revision: https://reviews.freebsd.org/D26488 MFC after: 1 week Reviewed by: pi, bcr (manpages) Submitted by: lutz_donnerhacke.de (Lutz Donnerhacke) Sponsored by: Mellanox Technologies // NVIDIA Networking
-
Adrian Chadd authored
This fixes a compile issue under gcc6 which complains about legacy style C function declarations. Differential Revision: https://reviews.freebsd.org/D26504
-
Alan Somers authored
* signed/unsigned comparisons * use standard warn(3) * Suppress warnings about local vars and funcs not declared static * const-correctness * declaration shadows a variable in the global scope Reviewed by: kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26516
-
Mitchell Horne authored
Some userspace code include sys/kernel.h. Namely, some OpenZFS tests do this, and it was causing breakage after r365945 due to a lack of bool typedef. Userspace should not need the TUNABLE_** stuff, so hide it behind an #ifdef _KERNEL. Sorry for the breakage. Reported by: andrew, Michael Butler, Jenkins Discussed with: kevans, allanjude
-
Kyle Evans authored
These are low-effort to add, so let's just do it. Reported by: "LukeShu" on Hacker News (-r / --no-run-if-empty) MFC after: 1 week
-
Poul-Henning Kamp authored
If Unwind_Backtrace is broken, ctx.n will still contain ~0, and we will return that which poor behavior for the user, so return 0 instead. We could document ~0 to be an error, but that would deviate from the Linux behavior which is not desirable. Noted by Poul-Henning Kamp PR: 209842
-
Konstantin Belousov authored
Noted by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26499
-
Alex Richardson authored
The Ubuntu /bin/sh (dash) removes all environment variables that contain characters outside the [a-zA-Z0-9_] range and this breaks the bmake tests that run as part of bootstrapping bmake. This can be reverted when the bmake tests have been updated.
-
Alex Richardson authored
This makes it possible to compile on non-FreeBSD systems since make will usually be GNU make there. Even if they include bmake, it will often either be a broken version or too old to build FreeBSD. This should be the last commit needed to compile FreeBSD on Linux+macOS. After over two years, I've finally managed to upstream all our local CheriBSD changes to allow building on Linux (and as a result of being reviewed by more people they are slightly less ugly than they were before). It should now be possible to run the following to build on Linux+macOS if you have LLVM/Clang 10 or newer installed: MAKEOBJDIRPREFIX=/somewhere ./tools/build/make.py TARGET=amd64 TARGET_ARCH=amd64 buildworld I have only tested macOS 15, Ubuntu 18.04 and openSUSE Leap, but other Linux distributions might also work (as long as they ship a recent GLibc and compiler). Reviewed By: emaste (should be fine to commit to tools/) Differential Revision: https://reviews.freebsd.org/D16767
-
David Bright authored
nvmecontrol tries to upload firmware in chunks as large as it thinks the device permits. It fails to take into account the FWUG value used by some drives to advertise the size and alignment limits for firmware chunks. - Use the firwmare update granularity value from the - If the granularity is not reported or not restricted, fall back to the previously existing logic that calculates the max transfer size based on MDTS. - Add firmware update granularity to the identify-controller output. Reviewed by: imp (previous version), chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390
-
Mitchell Horne authored
A small example of how these functions can be used to simplify checks of this nature. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26271
-
David Bright authored
Reviewed by: imp, chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390
-
Mitchell Horne authored
This adds the getenv_bool() function, to parse a boolean value from a kernel environment variable or tunable. This works for traditional boolean values like "0" and "1", and also "true" and "false" (case-insensitive). These semantics do not yet apply to sysctls declared using SYSCTL_BOOL with CTLFLAG_TUN (they still only parse 1 and 0). Also added are two wrapper functions, getenv_is_true() and getenv_is_false(). These are slightly simpler for callers wishing to perform a single check of a configuration variable. Reviewed by: jhb (slightly earlier version) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26270
-
Andriy Gapon authored
OTG mode is not supported still. It's easy to do it as a one-off detection, but the proper support requires continuous monitoring and communicating the current state to the USB layer. Also, fix phy0_route setting for H3. Remove duplicate register definitions. Tested on Orange Pi PC Plus with dr_mode="peripheral" using hw.usb.template=3 umodem_load="YES" Reviewed by: manu MFC after: 5 weeks Differential Revision: https://reviews.freebsd.org/D26348
-
Alex Richardson authored
This absolute include causes a build failure on Linux for me: .../cheri/freebsd/contrib/nvi/cl/../common/common.h:10:10: fatal error: '/usr/include/db.h' file not found This change patches the file to use #include <db.h> instead until a solution has been found upstream. See also https://github.com/lichray/nvi2/issues/69 Reviewed By: bapt Differential Revision: https://reviews.freebsd.org/D26480
-
Alex Richardson authored
Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D26479
-
Alex Richardson authored
Otherwise we get lots of warnings when building on Linux/macOS during installworld: Scanning /local/scratch/alr48/cheri/output/freebsd-x86/usr/share/certs/blacklisted for certificates... install: invalid option -- 'U' Try 'install --help' for more information. install: invalid option -- 'U' .... Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D26481
-
Toomas Soome authored
bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512
-
- 20 Sep, 2020 9 commits
-
-
Jessica Clarke authored
This was broken in r357940 which introduced the __typeof use. We need the volatile qualifier to be on the pointee not the pointer otherwise it does nothing. This was found by mhorne in D26498, noticing there was a problem (a spin loop condition was hoisted for RISC-V boot code) but not the root cause of it. Reported by: mhorne Reviewed by: mhorne, mjg Approved by: mhorne, mjg Differential Revision: https://reviews.freebsd.org/D26500
-
Konstantin Belousov authored
Possible in LA57 pmap config. Noted by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26492
-
Alexander V. Chernikov authored
Remove "opt_mpath.h" header where not needed. No functional changes.
-
Michal Meloun authored
It should be at least as large as the maximum value of caheline size for currently known CPUs. MFC after: 2 weeks
-
Emmanuel Vadot authored
MFC after: 1 week
-
Michal Meloun authored
Noticed by: mav MFC after: 1 month MFC with: r365899
-
Alexander V. Chernikov authored
* Zero gw_sdl if switching to interface route - the assumption that underlying storage is zeroed is incorrect with route changes. * Apply proper flag mask to rte. Reported by: vangyzen
-
Stefan Eßer authored
by Steve Kargl: - Use sincos[f] instead of a call to cos[f] and a call to sin[f]. - While here, alphabetize declaration. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl)
-
Stefan Eßer authored
- Micro-optimization: use sincosl(x) instead of a call to cosl(x) and a call to sinl(x). Argument reduction is done once not twice. - Use a long double constant instead of an invalid double constant. - Spell scale2 correctly He could not test ld128, so that patch is untested. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl)
-