svn commit: r368767 - in head/sys/riscv: include riscv

2020-12-18 Thread Mitchell Horne
Author: mhorne Date: Fri Dec 18 20:10:30 2020 New Revision: 368767 URL: https://svnweb.freebsd.org/changeset/base/368767 Log: riscv: report additional known SBI implementations These implementation IDs are defined in the SBI spec, so we should print their name if detected. Submitted

svn commit: r368765 - in head/sys/amd64: amd64 include

2020-12-18 Thread Mitchell Horne
Author: mhorne Date: Fri Dec 18 16:16:03 2020 New Revision: 368765 URL: https://svnweb.freebsd.org/changeset/base/368765 Log: amd64: use register macros for gdb_cpu_getreg() Prefer these newly-added definitions to bare values. MFC after:2 weeks Sponsored by: NetApp, Inc. Sponso

svn commit: r368764 - in head/sys/amd64: amd64 include

2020-12-18 Thread Mitchell Horne
Author: mhorne Date: Fri Dec 18 16:09:24 2020 New Revision: 368764 URL: https://svnweb.freebsd.org/changeset/base/368764 Log: amd64: allow gdb(4) to write to most registers Similar to the recent patch to arm's gdb stub in r368414, allow GDB to update the contents of most general purpose r

svn commit: r368719 - head/usr.sbin/bsdinstall/partedit

2020-12-17 Thread Mitchell Horne
Author: mhorne Date: Thu Dec 17 15:00:19 2020 New Revision: 368719 URL: https://svnweb.freebsd.org/changeset/base/368719 Log: bsdinstall: remove VTOC8 partition scheme option Now that sparc64 has been removed, there are no kernels built with support for the VTOC8 partitioning scheme by de

svn commit: r368705 - head/release/riscv

2020-12-16 Thread Mitchell Horne
Author: mhorne Date: Wed Dec 16 20:21:56 2020 New Revision: 368705 URL: https://svnweb.freebsd.org/changeset/base/368705 Log: riscv: increase GENERICSD gap Leave more room for bootloaders at the beginning of the image. In particular, the u-boot files for the HiFive Unleashed are ~5MB in s

svn commit: r368558 - head/sys/riscv/include

2020-12-11 Thread Mitchell Horne
Author: mhorne Date: Fri Dec 11 20:01:45 2020 New Revision: 368558 URL: https://svnweb.freebsd.org/changeset/base/368558 Log: riscv: small counter(9) improvements Prefer atomics to critical section. This reduces the cost of the increment operation and removes the possibility of it being i

svn commit: r368527 - head/sys/riscv/riscv

2020-12-10 Thread Mitchell Horne
Author: mhorne Date: Thu Dec 10 22:20:20 2020 New Revision: 368527 URL: https://svnweb.freebsd.org/changeset/base/368527 Log: riscv: handle debug.debugger_on_trap for fatal page faults Allows recovery or diagnosis of a fatal page fault before panicking the system. Reviewed by: jhb,

svn commit: r368458 - head/sys/arm64/linux

2020-12-08 Thread Mitchell Horne
Author: mhorne Date: Tue Dec 8 18:24:33 2020 New Revision: 368458 URL: https://svnweb.freebsd.org/changeset/base/368458 Log: arm64: fix struct l_sigaction_t layout The definition was copied from amd64, but the layout of the struct differs slightly between these platforms. This fixes spur

svn commit: r368424 - head/release

2020-12-07 Thread Mitchell Horne
Author: mhorne Date: Tue Dec 8 00:48:50 2020 New Revision: 368424 URL: https://svnweb.freebsd.org/changeset/base/368424 Log: release: don't checksum images if there are none For platforms that don't have any of the memstick, cdrom, or dvdrom release images (i.e. riscv64), the release-ins

svn commit: r368423 - head/release/riscv

2020-12-07 Thread Mitchell Horne
Author: mhorne Date: Tue Dec 8 00:42:03 2020 New Revision: 368423 URL: https://svnweb.freebsd.org/changeset/base/368423 Log: RISC-V release confs Add two release flavors for RISC-V. First, the traditional "big-iron" images, capable of generating distribution sets and VM images. Installer

svn commit: r368422 - in head: release/tools tools/boot

2020-12-07 Thread Mitchell Horne
Author: mhorne Date: Tue Dec 8 00:37:11 2020 New Revision: 368422 URL: https://svnweb.freebsd.org/changeset/base/368422 Log: riscv: allow building virtual machine images RISC-V has the same booting requirements as arm64 (loader.efi, no legacy boot options), so generated images for both a

svn commit: r368421 - in head/release: . tools

2020-12-07 Thread Mitchell Horne
Author: mhorne Date: Tue Dec 8 00:35:13 2020 New Revision: 368421 URL: https://svnweb.freebsd.org/changeset/base/368421 Log: release.sh: add support for RISC-V embedded builds Since the few existing RISC-V hardware platforms are single board computers, we can piggyback off of arm/arm64's

svn commit: r368350 - in head: share/man/man4 sys/conf sys/crypto/openssl sys/crypto/openssl/aarch64 sys/modules sys/modules/ossl tests/sys/opencrypto

2020-12-04 Thread Mitchell Horne
define ARMV8_SHA512(1<<6) + +#endif Added: head/sys/crypto/openssl/ossl_aarch64.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/openssl/ossl_aarch64.c Fri Dec 4

svn commit: r368349 - in head/sys: conf crypto/openssl modules/ossl

2020-12-04 Thread Mitchell Horne
Author: mhorne Date: Fri Dec 4 20:54:20 2020 New Revision: 368349 URL: https://svnweb.freebsd.org/changeset/base/368349 Log: ossl: split out x86 bits to x86/ossl_cpuid.c Make room for adding arm64 support to this driver by moving the x86-specific feature parsing to a separate file.

svn commit: r368284 - head/sys/dev/uart

2020-12-02 Thread Mitchell Horne
Author: mhorne Date: Wed Dec 2 21:01:52 2020 New Revision: 368284 URL: https://svnweb.freebsd.org/changeset/base/368284 Log: uart: allow UART_DEV_DBGPORT for fdt consoles Allow fdt devices to be used as debug ports for gdb(4). A debug console can be specified with the "freebsd,debug-p

svn commit: r368281 - head/sys/dev/e1000

2020-12-02 Thread Mitchell Horne
Author: mhorne Date: Wed Dec 2 17:37:32 2020 New Revision: 368281 URL: https://svnweb.freebsd.org/changeset/base/368281 Log: em: fix a null de-reference in em_free_pci_resources A failure in iflib_device_register() can result in em_free_pci_resources() being called after receive queues h

svn commit: r368200 - head/usr.sbin/efibootmgr

2020-11-30 Thread Mitchell Horne
Author: mhorne Date: Mon Nov 30 22:16:11 2020 New Revision: 368200 URL: https://svnweb.freebsd.org/changeset/base/368200 Log: efibootmgr: fix an incorrect error handling check efivar_device_path_to_unix_path() returns standard error codes on failure and zero on success. Checking for a ret

svn commit: r367896 - head/sys/riscv/riscv

2020-11-20 Thread Mitchell Horne
Author: mhorne Date: Fri Nov 20 15:21:10 2020 New Revision: 367896 URL: https://svnweb.freebsd.org/changeset/base/367896 Log: riscv: always initialize the static kernel environment Ensure we initialize the static environment when not booting via loader(8), and provide a static buffer if t

svn commit: r367894 - head/sys/net

2020-11-20 Thread Mitchell Horne
Author: mhorne Date: Fri Nov 20 14:45:45 2020 New Revision: 367894 URL: https://svnweb.freebsd.org/changeset/base/367894 Log: Make net/ifq.h C++ friendly Don't use "new" as an identifier, and add explicit casts from void *. As a general policy, FreeBSD doesn't make any C++ compatibilit

svn commit: r367848 - in head: share/man/man4 sys/kern

2020-11-19 Thread Mitchell Horne
Author: mhorne Date: Thu Nov 19 18:03:40 2020 New Revision: 367848 URL: https://svnweb.freebsd.org/changeset/base/367848 Log: Add an option for entering KDB on recursive panics There are many cases where one would choose avoid entering the debugger on a normal panic, opting instead to reb

svn commit: r367734 - head/usr.bin/bsdiff/bsdiff

2020-11-16 Thread Mitchell Horne
Author: mhorne Date: Mon Nov 16 18:41:49 2020 New Revision: 367734 URL: https://svnweb.freebsd.org/changeset/base/367734 Log: bsdiff: fix off-by-one error The program reads oldsize bytes from oldfile, and proceeds to initialize a suffix array of oldsize elements using divsufsort(). As per

svn commit: r367494 - head/sys/net

2020-11-08 Thread Mitchell Horne
Author: mhorne Date: Sun Nov 8 19:02:22 2020 New Revision: 367494 URL: https://svnweb.freebsd.org/changeset/base/367494 Log: Fix definition of rn_addmask() Add the missing static keyword present in the declaration. Reviewed by: melifaro Sponsored by: NetApp, Inc. Sponsored by: Kl

svn commit: r367493 - head/sys/netinet

2020-11-08 Thread Mitchell Horne
Author: mhorne Date: Sun Nov 8 18:49:23 2020 New Revision: 367493 URL: https://svnweb.freebsd.org/changeset/base/367493 Log: igmp: convert igmpstat to use PCPU counters Currently there is no locking done to protect this structure. It is likely okay due to the low-volume nature of IGMP, b

svn commit: r367356 - head/sys/riscv/riscv

2020-11-04 Thread Mitchell Horne
Author: mhorne Date: Thu Nov 5 00:52:52 2020 New Revision: 367356 URL: https://svnweb.freebsd.org/changeset/base/367356 Log: riscv: set kernel_pmap hart mask more precisely In pmap_bootstrap(), we fill kernel_pmap->pm_active since it is invariably active on all harts. However, this marks

svn commit: r367178 - head/release/arm64

2020-10-30 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 30 18:22:46 2020 New Revision: 367178 URL: https://svnweb.freebsd.org/changeset/base/367178 Log: arm64: set the correct partition type in make-memstick.sh We create a UFS root filesystem using makefs(8), and later pass it to mkimg(1) when creating the final im

svn commit: r367177 - in head/release: scripts tools

2020-10-30 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 30 18:20:52 2020 New Revision: 367177 URL: https://svnweb.freebsd.org/changeset/base/367177 Log: arm64: convert virtual machine images to GPT These images were switched to MBR in r281876 as a way to cope with a hard-coded partition GUID in QEMU's default EFI f

svn commit: r367176 - head/release/tools

2020-10-30 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 30 18:18:25 2020 New Revision: 367176 URL: https://svnweb.freebsd.org/changeset/base/367176 Log: vmimage.subr: noisier failure for unsupported targets The return code of write_partition_layout() doesn't bubble up, so an invocation of make vm-release for an inc

svn commit: r367175 - head/release/tools

2020-10-30 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 30 18:16:10 2020 New Revision: 367175 URL: https://svnweb.freebsd.org/changeset/base/367175 Log: Slight refactor in vmimage.subr De-duplicate the invocation of mkimg(1). No functional change. Reviewed by: gjb MFC after:2 weeks Sponsored by: The Fre

svn commit: r367163 - head/sys/net

2020-10-30 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 30 13:32:58 2020 New Revision: 367163 URL: https://svnweb.freebsd.org/changeset/base/367163 Log: net: add ETHER_IS_IPV6_MULTICAST This can be used to detect if an ethernet address is specifically an IPv6 multicast address, defined in accordance to RFC 2464.

svn commit: r367068 - in head/sys/riscv: include riscv

2020-10-26 Thread Mitchell Horne
Author: mhorne Date: Mon Oct 26 19:13:22 2020 New Revision: 367068 URL: https://svnweb.freebsd.org/changeset/base/367068 Log: riscv: make use of SBI legacy replacement extensions Version 0.2 of the SBI specification [1] marked the existing SBI functions as "legacy" in order to move to a n

svn commit: r367067 - in head/sys/riscv: include riscv

2020-10-26 Thread Mitchell Horne
Author: mhorne Date: Mon Oct 26 19:06:30 2020 New Revision: 367067 URL: https://svnweb.freebsd.org/changeset/base/367067 Log: riscv: remove sbi_clear_ipi() S-mode software has write access to the SIP.SSIP bit, so instead of making a second round-trip through the SBI we can clear it oursel

svn commit: r367033 - head/sys/cddl/dev/dtrace/riscv

2020-10-24 Thread Mitchell Horne
Author: mhorne Date: Sat Oct 24 23:21:51 2020 New Revision: 367033 URL: https://svnweb.freebsd.org/changeset/base/367033 Log: Fix build after r367020 DTrace also relies on these definitions. Reported by: jenkins Modified: head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c Modified: head

svn commit: r367020 - in head/sys/riscv: include riscv

2020-10-24 Thread Mitchell Horne
Author: mhorne Date: Sat Oct 24 20:57:13 2020 New Revision: 367020 URL: https://svnweb.freebsd.org/changeset/base/367020 Log: riscv: improve exception code naming The existing names were inherited from arm64, but we should prefer RISC-V terminology. Change the prefix to SCAUSE, and furthe

svn commit: r366794 - head/sys/riscv/riscv

2020-10-17 Thread Mitchell Horne
Author: mhorne Date: Sat Oct 17 17:31:06 2020 New Revision: 366794 URL: https://svnweb.freebsd.org/changeset/base/366794 Log: riscv: zero reserved PTE bits for L2 PTEs As was done for L3 PTEs in r362853, mask out the reserved bits when extracting the physical address from an L2 PTE. Futur

svn commit: r366764 - head/sys/arm64/arm64

2020-10-16 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 16 13:37:58 2020 New Revision: 366764 URL: https://svnweb.freebsd.org/changeset/base/366764 Log: arm64: export a few more HWCAPs These were missed in the previous pass. The extensions (partially) supported by this change are: - ARMv8.2-FHM, Floating-point m

svn commit: r366763 - in head/sys/arm64: arm64 include

2020-10-16 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 16 13:35:29 2020 New Revision: 366763 URL: https://svnweb.freebsd.org/changeset/base/366763 Log: Update the ID_AA64MMFR2_EL1 register definitions This brings these definitions in sync with the ARMv8.6 version of the architecture reference manual. Sponsore

svn commit: r366737 - in head/sys: amd64/amd64 arm/arm arm64/arm64 riscv/riscv

2020-10-15 Thread Mitchell Horne
Author: mhorne Date: Thu Oct 15 20:21:15 2020 New Revision: 366737 URL: https://svnweb.freebsd.org/changeset/base/366737 Log: Simplify preload_dump() condition Hiding this feature behind RB_VERBOSE is gratuitous. The tunable is enough to limit its use to only those who explicitly request

svn commit: r366574 - head/sys/riscv/conf

2020-10-09 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 9 14:45:41 2020 New Revision: 366574 URL: https://svnweb.freebsd.org/changeset/base/366574 Log: RISC-V LINT kernel config Create the RISC-V NOTES and LINT files. As of r366559, LINT configs are no longer generated but checked in to the tree. Reviewed by:

Re: svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys

2020-10-08 Thread Mitchell Horne
On Thu, Oct 8, 2020 at 3:15 PM Kyle Evans wrote: > > On Thu, Oct 8, 2020 at 1:02 PM Mitchell Horne wrote: > > > > Author: mhorne > > Date: Thu Oct 8 18:02:05 2020 > > New Revision: 366542 > > URL: https://svnweb.freebsd.org/changeset/base/366542 > >

Re: svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys

2020-10-08 Thread Mitchell Horne
sbuf_printf(sbp, "\tlen:\t%u\n", len); > + sbuf_cat(sbp, "\tvalue:\t"); > + preload_modinfo_value(sbp, bptr, type, len); > + sbuf_putc(sbp, '\n'); > + > + bptr += roundup(len, sizeof(u

svn commit: r366543 - head/sys/kern

2020-10-08 Thread Mitchell Horne
Author: mhorne Date: Thu Oct 8 18:29:17 2020 New Revision: 366543 URL: https://svnweb.freebsd.org/changeset/base/366543 Log: Fix a loop condition The correct way to identify the end of the metadata is two adjacent entries set to zero/MODINFO_END. I made a typo and this was checking the

svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys

2020-10-08 Thread Mitchell Horne
Author: mhorne Date: Thu Oct 8 18:02:05 2020 New Revision: 366542 URL: https://svnweb.freebsd.org/changeset/base/366542 Log: Add a routine to dump boot metadata The boot metadata (also referred to as modinfo, or preload metadata) provides information about the size and location of the ke

svn commit: r366526 - head/sys/kern

2020-10-07 Thread Mitchell Horne
Author: mhorne Date: Wed Oct 7 23:14:49 2020 New Revision: 366526 URL: https://svnweb.freebsd.org/changeset/base/366526 Log: Handle kmod local relocation failures gracefully It is possible for elf_reloc_local() to fail in the unlikely case of an unsupported relocation type. If this occur

svn commit: r366519 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 mips/mips powerpc/powerpc riscv/riscv

2020-10-07 Thread Mitchell Horne
Author: mhorne Date: Wed Oct 7 18:48:10 2020 New Revision: 366519 URL: https://svnweb.freebsd.org/changeset/base/366519 Log: Print symbol index for unsupported relocation types It is unlikely, but possible, that an unrecognized or unsupported relocation type is encountered while trying t

svn commit: r366503 - in head/sys: kern sys x86/x86

2020-10-06 Thread Mitchell Horne
Author: mhorne Date: Tue Oct 6 23:16:56 2020 New Revision: 366503 URL: https://svnweb.freebsd.org/changeset/base/366503 Log: Remove unused function cpu_boot() The prototype was added with the creation of kern_shutdown.c in r17658, but it appears to have never been implemented. Remove it

svn commit: r366351 - head/contrib/netbsd-tests/fs

2020-10-01 Thread Mitchell Horne
Author: mhorne Date: Fri Oct 2 00:52:31 2020 New Revision: 366351 URL: https://svnweb.freebsd.org/changeset/base/366351 Log: tmpfs tests: check for built-in tmpfs module As of r363471, tmpfs is included in all GENERIC kernel configs. This results in a warning being emitted for each call

svn commit: r366271 - head/sys/arm64/arm64

2020-09-29 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 29 23:21:56 2020 New Revision: 366271 URL: https://svnweb.freebsd.org/changeset/base/366271 Log: arm64: set the correct HWCAP This appears to be a typo. The AdvSIMD field encodes support for half-precision floating point SIMD instructions, which corresponds to

svn commit: r365995 - head/sys/riscv/conf

2020-09-22 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 22 13:00:02 2020 New Revision: 365995 URL: https://svnweb.freebsd.org/changeset/base/365995 Log: RISC-V: build SiFive drivers and DTB in GENERIC In the spirit of the GENERIC config, we should include the drivers required to run on most supported platforms.

svn commit: r365955 - head/sys/sys

2020-09-21 Thread Mitchell Horne
Author: mhorne Date: Mon Sep 21 17:28:41 2020 New Revision: 365955 URL: https://svnweb.freebsd.org/changeset/base/365955 Log: Hide tunable definitions behind _KERNEL Some userspace code include sys/kernel.h. Namely, some OpenZFS tests do this, and it was causing breakage after r365945 due

svn commit: r365947 - head/sys/kern

2020-09-21 Thread Mitchell Horne
Author: mhorne Date: Mon Sep 21 15:44:23 2020 New Revision: 365947 URL: https://svnweb.freebsd.org/changeset/base/365947 Log: Use getenv_is_true() in init_static_kenv() A small example of how these functions can be used to simplify checks of this nature. Sponsored by: Klara, Inc. D

svn commit: r365945 - in head: share/man/man9 sys/kern sys/sys

2020-09-21 Thread Mitchell Horne
Author: mhorne Date: Mon Sep 21 15:24:44 2020 New Revision: 365945 URL: https://svnweb.freebsd.org/changeset/base/365945 Log: Add getenv(9) boolean parsing functions This adds the getenv_bool() function, to parse a boolean value from a kernel environment variable or tunable. This works fo

svn commit: r365884 - head/release/arm64

2020-09-18 Thread Mitchell Horne
Author: mhorne Date: Fri Sep 18 14:40:13 2020 New Revision: 365884 URL: https://svnweb.freebsd.org/changeset/base/365884 Log: arm64: generate ISO release images Some IPMI implementations on arm64 are reportedly unable to load our memstick installer images, but support the older ISO format

svn commit: r365881 - head/sys/netinet

2020-09-18 Thread Mitchell Horne
Author: mhorne Date: Fri Sep 18 14:01:10 2020 New Revision: 365881 URL: https://svnweb.freebsd.org/changeset/base/365881 Log: Initialize some local variables earlier Move the initialization of these variables to the beginning of their respective functions. On our end this creates a s

svn commit: r365835 - head/sys/modules/dtb/sifive

2020-09-17 Thread Mitchell Horne
Author: mhorne Date: Thu Sep 17 14:58:30 2020 New Revision: 365835 URL: https://svnweb.freebsd.org/changeset/base/365835 Log: Add dtb/sifive module This allows building the HiFive Unleashed device tree blob. Reviewed by: manu Differential Revision:https://reviews.freebsd.org

svn commit: r365801 - head/sys/net

2020-09-16 Thread Mitchell Horne
Author: mhorne Date: Wed Sep 16 14:45:16 2020 New Revision: 365801 URL: https://svnweb.freebsd.org/changeset/base/365801 Log: if_media: definitions for 40GE LM4 ethernet media type Reviewed by: erj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:htt

Re: svn commit: r365460 - in head/sys/arm64: arm64 include

2020-09-08 Thread Mitchell Horne
On Tue, Sep 8, 2020 at 12:36 PM Mitchell Horne wrote: > > Author: mhorne > Date: Tue Sep 8 15:36:38 2020 > New Revision: 365460 > URL: https://svnweb.freebsd.org/changeset/base/365460 > > Log: > arm64: export new HWCAP features > > Expose some of the new HWCAP

svn commit: r365461 - head/sys/libkern

2020-09-08 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 8 15:39:19 2020 New Revision: 365461 URL: https://svnweb.freebsd.org/changeset/base/365461 Log: arm64: check for CRC32 support via HWCAP Doing it this way eliminates the assumption about homogeneous support for the feature, since HWCAP values are only set if

svn commit: r365460 - in head/sys/arm64: arm64 include

2020-09-08 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 8 15:36:38 2020 New Revision: 365460 URL: https://svnweb.freebsd.org/changeset/base/365460 Log: arm64: export new HWCAP features Expose some of the new HWCAP features added in r65304. This includes the addition of elf_hwcap2 into the sysvec, and a separate fu

svn commit: r365459 - in head/sys: arm64/include sys

2020-09-08 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 8 15:08:20 2020 New Revision: 365459 URL: https://svnweb.freebsd.org/changeset/base/365459 Log: arm64: fix incorrect HWCAP definitions FreeBSD exports CPU features as bits in the AT_HWCAP and AT_HWCAP2 vectors via elf_aux_info(3). This interface is similar to

Re: svn commit: r365449 - head/sbin/rcorder

2020-09-08 Thread Mitchell Horne
Hi, I think this change warrants an entry in RELNOTES. Cheers, Mitchell On Tue, Sep 8, 2020 at 7:36 AM Andrey V. Elsukov wrote: > > Author: ae > Date: Tue Sep 8 10:36:11 2020 > New Revision: 365449 > URL: https://svnweb.freebsd.org/changeset/base/365449 > > Log: > Add a few features to rcor

svn commit: r365456 - head/sys/conf

2020-09-08 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 8 13:24:44 2020 New Revision: 365456 URL: https://svnweb.freebsd.org/changeset/base/365456 Log: RISC-V: enable MK_FORMAT_EXTENSIONS This option was marked as broken because our riscv64-xtoolchain-gcc package lacked support. Since we are moving away from xtool

svn commit: r365455 - in head/sys: dev/xilinx riscv/riscv

2020-09-08 Thread Mitchell Horne
Author: mhorne Date: Tue Sep 8 13:21:13 2020 New Revision: 365455 URL: https://svnweb.freebsd.org/changeset/base/365455 Log: RISC-V: fix some mismatched format specifiers RISC-V is currently built with -Wno-format, which is how these went undetected. Address them now before re-enabling t

svn commit: r365316 - head/sys/rpc/rpcsec_tls

2020-09-03 Thread Mitchell Horne
Author: mhorne Date: Thu Sep 3 22:40:51 2020 New Revision: 365316 URL: https://svnweb.freebsd.org/changeset/base/365316 Log: Remove a duplicate declaration This is already declared in sys/file.h, which is included directly. Compiling with GCC9 emits an error. Discussed with: rmackle

svn commit: r365304 - head/sys/arm64/include

2020-09-03 Thread Mitchell Horne
Author: mhorne Date: Thu Sep 3 17:07:58 2020 New Revision: 365304 URL: https://svnweb.freebsd.org/changeset/base/365304 Log: arm64: update the set of HWCAP definitions This is in sync with what is defined for Linux 5.8. Note that all bits in HWCAP are exhausted, and HWCAP2 has been added

svn commit: r364256 - head/sys/riscv/riscv

2020-08-15 Thread Mitchell Horne
Author: mhorne Date: Sat Aug 15 16:15:34 2020 New Revision: 364256 URL: https://svnweb.freebsd.org/changeset/base/364256 Log: RISC-V: copy kernelname from the environment This is allows kern.bootfile to report the correct value. Modified: head/sys/riscv/riscv/machdep.c Modified: head/sy

svn commit: r364255 - head/sys/arm64/arm64

2020-08-15 Thread Mitchell Horne
Author: mhorne Date: Sat Aug 15 15:06:39 2020 New Revision: 364255 URL: https://svnweb.freebsd.org/changeset/base/364255 Log: arm64: parse HWCAP values using user_cpu_desc The hard work of parsing fields per-CPU, handling heterogeneous features, and excluding features from userspace is al

svn commit: r364254 - in head/sys/arm64: arm64 include

2020-08-15 Thread Mitchell Horne
Author: mhorne Date: Sat Aug 15 14:57:53 2020 New Revision: 364254 URL: https://svnweb.freebsd.org/changeset/base/364254 Log: arm64: update instruction set attribute register definitions This adds definitions for the latest additions to the AA64ISAR[01] ID registers. This brings these reg

svn commit: r364193 - head/sys/riscv/riscv

2020-08-13 Thread Mitchell Horne
Author: mhorne Date: Thu Aug 13 14:21:05 2020 New Revision: 364193 URL: https://svnweb.freebsd.org/changeset/base/364193 Log: Enable interrupts while handling traps I observed hangs post-r362977 in QEMU with -smp 2, in which one thread would acquire write access to an rm_lock (sysctllock)

svn commit: r364192 - head/sys/riscv/riscv

2020-08-13 Thread Mitchell Horne
Author: mhorne Date: Thu Aug 13 14:17:36 2020 New Revision: 364192 URL: https://svnweb.freebsd.org/changeset/base/364192 Log: Small fixes in locore.S - Properly set up the frame pointer - Hang if we return from mi_startup - Whitespace Clearing the frame pointer marks the end of

svn commit: r364172 - head/sys/net

2020-08-12 Thread Mitchell Horne
Author: mhorne Date: Wed Aug 12 16:43:20 2020 New Revision: 364172 URL: https://svnweb.freebsd.org/changeset/base/364172 Log: Correctly set error in rt_mpath_unlink It is possible for rn_delete() to return NULL. If this happens, then set *perror to ESRCH, as is done in the rest of the fun

svn commit: r363404 - in head/sys: kern riscv/riscv

2020-07-21 Thread Mitchell Horne
Author: mhorne Date: Tue Jul 21 22:47:02 2020 New Revision: 363404 URL: https://svnweb.freebsd.org/changeset/base/363404 Log: INTRNG: only shuffle for !EARLY_AP_STARTUP During device attachment, all interrupt sources will bind to the BSP, as it is the only processor online. This means int

svn commit: r363345 - head/sys/riscv/riscv

2020-07-19 Thread Mitchell Horne
Author: mhorne Date: Sun Jul 19 23:34:52 2020 New Revision: 363345 URL: https://svnweb.freebsd.org/changeset/base/363345 Log: riscv: look for bootargs in FDT The FDT may contain a short /chosen/bootargs string which we should pass to boot_parse_cmdline. Notably, this allows the use of qem

svn commit: r363339 - head/sys/modules

2020-07-19 Thread Mitchell Horne
Author: mhorne Date: Sun Jul 19 23:19:09 2020 New Revision: 363339 URL: https://svnweb.freebsd.org/changeset/base/363339 Log: Make efirt module dependent on MK_EFI MK_EFI was added to kern.opts.mk in r331099, but is currently unused. Take advantage of that fact and gate the build of efirt

Re: svn commit: r363242 - head/sys/amd64/include

2020-07-16 Thread Mitchell Horne
On Thu, Jul 16, 2020 at 8:28 AM Mateusz Guzik wrote: > > Author: mjg > Date: Thu Jul 16 11:28:24 2020 > New Revision: 363242 > URL: https://svnweb.freebsd.org/changeset/base/363242 > > Log: > amd64: patch ffsl to use the compiler builtin > > This shortens fdalloc by over 60 bytes. Correctness

svn commit: r363197 - head/stand

2020-07-14 Thread Mitchell Horne
Author: mhorne Date: Tue Jul 14 21:15:16 2020 New Revision: 363197 URL: https://svnweb.freebsd.org/changeset/base/363197 Log: Really fix cleandir after r362973 I made an attempt to fix this in r362978, but all it really did was confine the issue to the $MACHINE_CPUARCH == "riscv" case. Th

svn commit: r362978 - head/stand

2020-07-06 Thread Mitchell Horne
Author: mhorne Date: Mon Jul 6 21:39:14 2020 New Revision: 362978 URL: https://svnweb.freebsd.org/changeset/base/362978 Log: Fix cleandir target post r362973 Reported by: mmacy Modified: head/stand/defs.mk Modified: head/stand/defs.mk ==

svn commit: r362974 - head/share/man/man5

2020-07-06 Thread Mitchell Horne
Author: mhorne Date: Mon Jul 6 18:43:00 2020 New Revision: 362974 URL: https://svnweb.freebsd.org/changeset/base/362974 Log: src.conf.5: regen after r362972, r362973, RISC-V EFI support Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ===

Re: svn commit: r362973 - in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include

2020-07-06 Thread Mitchell Horne
On Mon, Jul 6, 2020 at 3:19 PM Mitchell Horne wrote: > > Author: mhorne > Date: Mon Jul 6 18:19:42 2020 > New Revision: 362973 > URL: https://svnweb.freebsd.org/changeset/base/362973 > > Log: > RISC-V boot1.efi and loader.efi support > > This implementation doe

svn commit: r362973 - in head: share/mk stand stand/common stand/efi/include/riscv stand/efi/libefi stand/efi/loader stand/efi/loader/arch/riscv sys/riscv/include

2020-07-06 Thread Mitchell Horne
{ *(.dynsym) } + _edata = .; + + /* Unused sections */ + .dynstr : { *(.dynstr) } + .hash: { *(.hash) } +} Added: head/stand/efi/loader/arch/riscv/start.S == --- /dev/null 00:00:00 1970 (emp

svn commit: r362972 - head/lib/libefivar

2020-07-06 Thread Mitchell Horne
Author: mhorne Date: Mon Jul 6 17:47:29 2020 New Revision: 362972 URL: https://svnweb.freebsd.org/changeset/base/362972 Log: libefivar: define MDE_CPU_RISCV64 The necessary definitions from EDK2 are present, so this allows the library to be built on RISC-V. Modified: head/lib/libefiva

svn commit: r362788 - head/lib/libc/riscv

2020-06-29 Thread Mitchell Horne
Author: mhorne Date: Mon Jun 29 19:30:35 2020 New Revision: 362788 URL: https://svnweb.freebsd.org/changeset/base/362788 Log: Fix printf(3) output of long doubles on RISC-V When the RISC-V port was initially committed to FreeBSD, GCC would generate 64-bit long doubles, and the definitions

svn commit: r362584 - head/sys/riscv/riscv

2020-06-24 Thread Mitchell Horne
Author: mhorne Date: Wed Jun 24 15:21:12 2020 New Revision: 362584 URL: https://svnweb.freebsd.org/changeset/base/362584 Log: Only invalidate the early DTB mapping if it exists This temporary mapping will become optional. Booting via loader(8) means that the DTB will have already been cop

svn commit: r362583 - in head/sys/riscv: include riscv

2020-06-24 Thread Mitchell Horne
Author: mhorne Date: Wed Jun 24 15:20:00 2020 New Revision: 362583 URL: https://svnweb.freebsd.org/changeset/base/362583 Log: Handle load from loader(8) In locore, we must detect and handle different arguments passed by loader(8) compared to what we recieve when booting directly via SBI

svn commit: r362576 - in head/lib: libc/tests/gen libc/tests/stdlib msun/tests

2020-06-24 Thread Mitchell Horne
Author: mhorne Date: Wed Jun 24 13:11:19 2020 New Revision: 362576 URL: https://svnweb.freebsd.org/changeset/base/362576 Log: Enable long double tests on RISC-V Some of the NetBSD contributed tests are gated behind the __HAVE_LONG_DOUBLE flag. This flag seems to be defined only for plat

svn commit: r362546 - head/share/man/man7

2020-06-23 Thread Mitchell Horne
Author: mhorne Date: Tue Jun 23 17:17:13 2020 New Revision: 362546 URL: https://svnweb.freebsd.org/changeset/base/362546 Log: arch(7): small corrections for RISC-V Document that RISC-V supports multiple page sizes: 4K, 2M, and 1G. RISC-V's long double is always 128-bits wide, therefore

Re: svn commit: r361587 - in head/sys/riscv: include riscv

2020-06-08 Thread Mitchell Horne
On Thu, May 28, 2020 at 11:56 AM Mitchell Horne wrote: > > Author: mhorne > Date: Thu May 28 14:56:11 2020 > New Revision: 361587 > URL: https://svnweb.freebsd.org/changeset/base/361587 > > Log: > Add macros simplifying the fake preload setup > > This is in prep

svn commit: r361807 - head/sys/contrib/edk2

2020-06-04 Thread Mitchell Horne
Author: mhorne Date: Thu Jun 4 20:48:57 2020 New Revision: 361807 URL: https://svnweb.freebsd.org/changeset/base/361807 Log: Document upgrade procedure in FREEBSD-upgrade It was pointed out to me that this is the convention for documenting upgrade instructions, rather than just leaving t

svn commit: r361802 - in head/sys/contrib/edk2: . Include Include/Guid Include/IndustryStandard Include/Library Include/Protocol Include/Uefi

2020-06-04 Thread Mitchell Horne
Author: mhorne Date: Thu Jun 4 19:21:41 2020 New Revision: 361802 URL: https://svnweb.freebsd.org/changeset/base/361802 Log: Update edk2 headers to stable202005 We use these to compile libefivar. The particular motivation for this update is the inclusion of the RISC-V machine definition

svn commit: r361754 - head/stand/efi/gptboot

2020-06-03 Thread Mitchell Horne
Author: mhorne Date: Wed Jun 3 16:38:16 2020 New Revision: 361754 URL: https://svnweb.freebsd.org/changeset/base/361754 Log: gptboot.efi: align secbuf to 4K The u-boot EFI implementation of the ReadBlocks and WriteBlocks methods requires that the provided buffer meet the IO alignment req

svn commit: r361661 - in head/sys: arm/arm arm/include arm64/arm64 riscv/riscv

2020-05-31 Thread Mitchell Horne
Author: mhorne Date: Sun May 31 14:43:04 2020 New Revision: 361661 URL: https://svnweb.freebsd.org/changeset/base/361661 Log: Remove remnant of arm's ELF trampoline The trampoline code used for loading gzipped a.out kernels on arm was removed in r350436. A portion of this code allowed for

svn commit: r361587 - in head/sys/riscv: include riscv

2020-05-28 Thread Mitchell Horne
Author: mhorne Date: Thu May 28 14:56:11 2020 New Revision: 361587 URL: https://svnweb.freebsd.org/changeset/base/361587 Log: Add macros simplifying the fake preload setup This is in preparation for booting via loader(8). Lift these macros from arm64 so we don't need to worry about the si

svn commit: r361402 - head/sys/conf

2020-05-22 Thread Mitchell Horne
Author: mhorne Date: Fri May 22 18:54:56 2020 New Revision: 361402 URL: https://svnweb.freebsd.org/changeset/base/361402 Log: Simplify the RISC-V kernel linker invocation Remove our custom SYSTEM_LD definition. This generates program headers that are more consistent with other architectur

svn commit: r360826 - head/sys/sys

2020-05-08 Thread Mitchell Horne
Author: mhorne Date: Fri May 8 22:21:56 2020 New Revision: 360826 URL: https://svnweb.freebsd.org/changeset/base/360826 Log: Sync relocation definitions Add the most recent relocation types from the RISC-V ELF psABI spec. MFC after:3 days Modified: head/sys/sys/elf_common.h Mo

svn commit: r360554 - head/sys/riscv/riscv

2020-05-01 Thread Mitchell Horne
Author: mhorne Date: Fri May 1 21:59:47 2020 New Revision: 360554 URL: https://svnweb.freebsd.org/changeset/base/360554 Log: Use the HSM SBI extension to halt CPUs Differential Revision:https://reviews.freebsd.org/D24498 Modified: head/sys/riscv/riscv/machdep.c Modified: head/s

svn commit: r360553 - head/sys/riscv/riscv

2020-05-01 Thread Mitchell Horne
Author: mhorne Date: Fri May 1 21:58:19 2020 New Revision: 360553 URL: https://svnweb.freebsd.org/changeset/base/360553 Log: Use the HSM SBI extension to start APs The addition of the HSM SBI extension to OpenSBI introduces a new breaking change: secondary harts will remain parked in the

svn commit: r360552 - in head/sys/riscv: include riscv

2020-05-01 Thread Mitchell Horne
Author: mhorne Date: Fri May 1 21:55:51 2020 New Revision: 360552 URL: https://svnweb.freebsd.org/changeset/base/360552 Log: Add support for HSM SBI extension The Hardware State Management (HSM) extension provides a set of SBI calls that allow the supervisor software to start and stop ha

svn commit: r360551 - head/sys/riscv/riscv

2020-05-01 Thread Mitchell Horne
Author: mhorne Date: Fri May 1 21:52:29 2020 New Revision: 360551 URL: https://svnweb.freebsd.org/changeset/base/360551 Log: Make mpentry independent of _start APs enter the kernel at the same point as the BSP, the _start routine. They then jump to mpentry, but not before storing the ker

svn commit: r360519 - head/usr.sbin/binmiscctl

2020-04-30 Thread Mitchell Horne
Author: mhorne Date: Fri May 1 01:31:19 2020 New Revision: 360519 URL: https://svnweb.freebsd.org/changeset/base/360519 Log: Add RISC-V interpreter example Now that RISC-V support has landed in qemu-user-static, add to the list of examples in the binmiscctl(8) manpage. Reviewed by:

svn commit: r360085 - head/sys/riscv/riscv

2020-04-18 Thread Mitchell Horne
Author: mhorne Date: Sun Apr 19 00:34:49 2020 New Revision: 360085 URL: https://svnweb.freebsd.org/changeset/base/360085 Log: RISC-V: provide the correct value for kernstart pmap_bootstrap() expects the kernel's physical load address, but we have been providing the start of physical memor

svn commit: r360084 - head/sys/riscv/riscv

2020-04-18 Thread Mitchell Horne
Author: mhorne Date: Sun Apr 19 00:33:05 2020 New Revision: 360084 URL: https://svnweb.freebsd.org/changeset/base/360084 Log: RISC-V: exclude reserved memory regions The device tree may contain a "reserved-memory" node, whose purpose is to communicate sections of physical memory that shou

  1   2   >