Page MenuHomeFreeBSD

arichardson (Alexander Richardson)
User

Projects

User Details

User Since
Jan 17 2017, 2:21 PM (185 w, 2 d)

Recent Activity

Yesterday

arichardson committed rS363993: stand: use portable ln -n instead of ln -h.
stand: use portable ln -n instead of ln -h
Thu, Aug 6, 8:46 PM
arichardson closed D24783: stand: use portable ln -n instead of ln -h.
Thu, Aug 6, 8:46 PM
arichardson committed rS363992: Allow bootstrapping pwd_mkdb on Linux/macOS.
Allow bootstrapping pwd_mkdb on Linux/macOS
Thu, Aug 6, 8:46 PM
arichardson closed D25931: Allow bootstrapping pwd_mkdb on Linux/macOS.
Thu, Aug 6, 8:46 PM
arichardson committed rS363991: ctfmerge: Fix missing pthread_cond_init().
ctfmerge: Fix missing pthread_cond_init()
Thu, Aug 6, 8:45 PM
arichardson closed D25973: ctfmerge: Fix missing pthread_cond_init().
Thu, Aug 6, 8:45 PM
arichardson updated the diff for D14316: Add Linux/macOS compatibility system headers to tools/build/cross-build.
  • fix C++ style commments
  • Use clang-format to get consistent style
Thu, Aug 6, 8:38 PM
arichardson added inline comments to D14316: Add Linux/macOS compatibility system headers to tools/build/cross-build.
Thu, Aug 6, 7:54 PM
arichardson retitled D14316: Add Linux/macOS compatibility system headers to tools/build/cross-build from WIP: Add Linux/MacOS compatibility system headers to tools/build/cross-build to Add Linux/macOS compatibility system headers to tools/build/cross-build.
Thu, Aug 6, 6:42 PM
arichardson requested review of D25979: Fix cddl tools bootstrapping on macOS and Linux.
Thu, Aug 6, 6:34 PM
arichardson requested review of D25978: Add missing FreeBSD functions to -legacy when building on macOS/Linux.
Thu, Aug 6, 6:02 PM
arichardson updated the diff for D14316: Add Linux/macOS compatibility system headers to tools/build/cross-build.

rebased, should be ready for review now

Thu, Aug 6, 6:01 PM
arichardson requested review of D25977: Fix -Wundef warnings when building liblua.
Thu, Aug 6, 5:54 PM
arichardson added inline comments to D25931: Allow bootstrapping pwd_mkdb on Linux/macOS.
Thu, Aug 6, 3:54 PM
arichardson requested review of D25973: ctfmerge: Fix missing pthread_cond_init().
Thu, Aug 6, 11:21 AM
arichardson accepted D25967: The practice of creating symbolic links is somewhat fragile. Make hard copies instead always..

I can confirm that cross-building from macOS still works with this patch. I have a slight preference for keeping symlinks in the ${.MAKE.OS} != "FreeBSD" / -DNO_ROOT case but keeping stuff consistent is more important.

Thu, Aug 6, 10:43 AM
arichardson added a comment to D25967: The practice of creating symbolic links is somewhat fragile. Make hard copies instead always..
In D25967#575752, @imp wrote:
In D25967#575682, @imp wrote:

Copying instead of creating links *should* be fine. However, I vaguely seem to recall this previously caused issues for bootstrapping macOS since one tool wanted to find something relative to realpath argv[0]. Will check if that's still the case tomorrow morning UK time.

Sure thing. I included you because I had hoped to get this perspective. On Mac/Linux, only the incompatible tools need to be bootstrapped, and they will use $HOST libraries always, no?

Yes, and they default to BOOTSTRAP_ALL_TOOLS.

So they never use the host native binaries once bootsrapped?

Thu, Aug 6, 6:45 AM

Wed, Aug 5

arichardson added a comment to D25967: The practice of creating symbolic links is somewhat fragile. Make hard copies instead always..
In D25967#575682, @imp wrote:

Copying instead of creating links *should* be fine. However, I vaguely seem to recall this previously caused issues for bootstrapping macOS since one tool wanted to find something relative to realpath argv[0]. Will check if that's still the case tomorrow morning UK time.

Sure thing. I included you because I had hoped to get this perspective. On Mac/Linux, only the incompatible tools need to be bootstrapped, and they will use $HOST libraries always, no?

Wed, Aug 5, 9:55 PM
arichardson added a comment to D25967: The practice of creating symbolic links is somewhat fragile. Make hard copies instead always..

Copying instead of creating links *should* be fine. However, I vaguely seem to recall this previously caused issues for bootstrapping macOS since one tool wanted to find something relative to realpath argv[0]. Will check if that's still the case tomorrow morning UK time.

Wed, Aug 5, 9:38 PM

Mon, Aug 3

arichardson committed rS363805: Allow building setmode.c on Linux/macOS.
Allow building setmode.c on Linux/macOS
Mon, Aug 3, 6:08 PM
arichardson committed rS363806: Allow bootstrapping mtree on Linux systems.
Allow bootstrapping mtree on Linux systems
Mon, Aug 3, 6:08 PM
arichardson closed D25929: Allow building setmode.c on Linux/macOS.
Mon, Aug 3, 6:08 PM
arichardson closed D25930: Allow bootstrapping mtree on Linux systems.
Mon, Aug 3, 6:08 PM
arichardson requested review of D25931: Allow bootstrapping pwd_mkdb on Linux/macOS.
Mon, Aug 3, 2:50 PM
arichardson requested review of D25930: Allow bootstrapping mtree on Linux systems.
Mon, Aug 3, 2:43 PM
arichardson updated the diff for D25929: Allow building setmode.c on Linux/macOS.

remove file that wasn't intended for this change

Mon, Aug 3, 2:42 PM
arichardson requested review of D25929: Allow building setmode.c on Linux/macOS.
Mon, Aug 3, 2:41 PM
arichardson requested review of D25928: Fix makefs bootstrap on macOS after D25563.
Mon, Aug 3, 2:40 PM

Fri, Jul 31

arichardson closed D25217: Include virtio support in std.MALTA.
Fri, Jul 31, 11:28 AM
arichardson committed rS363730: Include virtio support in std.MALTA.
Include virtio support in std.MALTA
Fri, Jul 31, 11:28 AM

Tue, Jul 28

arichardson added a comment to D25217: Include virtio support in std.MALTA.

D25416 has been committed. Any objections to me committing this?

Tue, Jul 28, 1:34 PM
arichardson accepted D25416: Make access to VirtIO configuration to mips architecture..

@alfredo/ @fernando.valle_eldorado.org.br Are you planning to commit this soon?

Tue, Jul 28, 10:38 AM · PowerPC, MIPS

Fri, Jul 24

arichardson committed rS363471: Include TMPFS in all the GENERIC kernel configs.
Include TMPFS in all the GENERIC kernel configs
Fri, Jul 24, 8:40 AM
arichardson closed D25317: Include TMPFS in all the GENERIC kernel configs.
Fri, Jul 24, 8:40 AM

Thu, Jul 23

arichardson added a reviewer for D25317: Include TMPFS in all the GENERIC kernel configs: brooks.
Thu, Jul 23, 9:01 PM

Wed, Jul 22

arichardson accepted D25416: Make access to VirtIO configuration to mips architecture..

Minor grammar suggestions but otherwise looks good to me. Thanks!

Wed, Jul 22, 1:34 PM · PowerPC, MIPS

Mon, Jul 20

arichardson added a comment to D25317: Include TMPFS in all the GENERIC kernel configs.

ping?

Mon, Jul 20, 3:51 PM
arichardson added a comment to D25416: Make access to VirtIO configuration to mips architecture..

@arichardson Which freebsd .img revision are you using?

Mon, Jul 20, 2:15 PM · PowerPC, MIPS
arichardson added a comment to D25416: Make access to VirtIO configuration to mips architecture..

@arichardson Which freebsd .img revision are you using?

Mon, Jul 20, 12:28 PM · PowerPC, MIPS

Wed, Jul 15

arichardson closed D25662: Allow install(1)'s create_tempfile() to work on Linux hosts.
Wed, Jul 15, 5:24 PM
arichardson committed rS363230: Allow install(1)'s create_tempfile() to work on Linux hosts.
Allow install(1)'s create_tempfile() to work on Linux hosts
Wed, Jul 15, 5:24 PM
arichardson committed rS363229: Remove warning that is no longer accurate after r361853.
Remove warning that is no longer accurate after r361853
Wed, Jul 15, 5:24 PM
arichardson closed D25664: Remove warning that is no longer accurate after r361853.
Wed, Jul 15, 5:24 PM
arichardson committed rS363219: Fix BUILD_WITH_STRICT_TMPPATH builds.
Fix BUILD_WITH_STRICT_TMPPATH builds
Wed, Jul 15, 12:08 PM
arichardson committed rS363218: Allow bootstrapping localdef on non-FreeBSD systems.
Allow bootstrapping localdef on non-FreeBSD systems
Wed, Jul 15, 12:08 PM
arichardson closed D25229: Allow bootstrapping localdef on non-FreeBSD systems.
Wed, Jul 15, 12:08 PM
arichardson committed rS363217: Add missing newline and return in localedef error message.
Add missing newline and return in localedef error message
Wed, Jul 15, 12:08 PM
arichardson closed D24784: Avoid rebuilding libpmc in every incremental rebuild.
Wed, Jul 15, 12:07 PM
arichardson committed rS363216: Avoid rebuilding libpmc in every incremental rebuild.
Avoid rebuilding libpmc in every incremental rebuild
Wed, Jul 15, 12:07 PM

Tue, Jul 14

arichardson added a comment to D25416: Make access to VirtIO configuration to mips architecture..

I can confirm that this makes virtio-rng work again for MIPS64. LGTM if you apply @alfredo's suggestions.

Tue, Jul 14, 11:36 AM · PowerPC, MIPS
arichardson requested review of D25664: Remove warning that is no longer accurate after r361853.
Tue, Jul 14, 11:30 AM
arichardson updated the diff for D25217: Include virtio support in std.MALTA.

address review comments

Tue, Jul 14, 10:59 AM
arichardson retitled D25317: Include TMPFS in all the GENERIC kernel configs from Include TMPFS in the RISC-V GENERIC kernel to Include TMPFS in all the GENERIC kernel configs.
Tue, Jul 14, 10:48 AM
arichardson updated the diff for D25317: Include TMPFS in all the GENERIC kernel configs.

Add TMPFS to all kernel configs instead

Tue, Jul 14, 10:47 AM
arichardson requested review of D25663: Fix linker error in libuutil with recent LLVM.
Tue, Jul 14, 10:29 AM
arichardson added a comment to D25229: Allow bootstrapping localdef on non-FreeBSD systems.

If no one objects I'll commit this patch later this week.

Tue, Jul 14, 9:49 AM
arichardson added a comment to D25662: Allow install(1)'s create_tempfile() to work on Linux hosts.
In D25662#567794, @mjg wrote:

manpage refers to the string and needs to be updated

Tue, Jul 14, 9:33 AM
arichardson updated the diff for D25662: Allow install(1)'s create_tempfile() to work on Linux hosts.

Also update manpage

Tue, Jul 14, 9:33 AM
arichardson requested review of D25662: Allow install(1)'s create_tempfile() to work on Linux hosts.
Tue, Jul 14, 9:25 AM

Jul 1 2020

arichardson accepted D25312: Relax the rule against declaring variables in nested scopes..
Jul 1 2020, 9:44 PM

Jun 30 2020

arichardson added a reviewer for D25523: riscv pmap: zero reserved pte bits in ppn: riscv.
Jun 30 2020, 9:50 PM · riscv
arichardson added inline comments to D24784: Avoid rebuilding libpmc in every incremental rebuild.
Jun 30 2020, 6:48 PM
arichardson added inline comments to D25229: Allow bootstrapping localdef on non-FreeBSD systems.
Jun 30 2020, 1:10 PM
arichardson added a comment to D25229: Allow bootstrapping localdef on non-FreeBSD systems.

collate.c looks like an independent bugfix you can just commit first?

Jun 30 2020, 1:08 PM
arichardson updated the diff for D24784: Avoid rebuilding libpmc in every incremental rebuild.

use a single make target

Jun 30 2020, 12:07 PM
arichardson updated the diff for D25229: Allow bootstrapping localdef on non-FreeBSD systems.

avoid unncessary diff to makefile

Jun 30 2020, 11:42 AM
arichardson updated the summary of D25229: Allow bootstrapping localdef on non-FreeBSD systems.
Jun 30 2020, 11:40 AM
arichardson updated the diff for D25229: Allow bootstrapping localdef on non-FreeBSD systems.

New approach that avoids modifying public headers

Jun 30 2020, 11:38 AM

Jun 24 2020

arichardson added a comment to D25416: Make access to VirtIO configuration to mips architecture..

I stepped through MIPS init in QEMU and it turns out MALTA ends up with

p sc->vtpci_res->r_bustag
$7 = (bus_space_tag_t) 0xffffffff809aefc0 <gt_pci_space>
Jun 24 2020, 1:52 PM · PowerPC, MIPS
arichardson added a reviewer for D25416: Make access to VirtIO configuration to mips architecture.: jrtc27.
Jun 24 2020, 1:37 PM · PowerPC, MIPS
arichardson added inline comments to D25416: Make access to VirtIO configuration to mips architecture..
Jun 24 2020, 1:37 PM · PowerPC, MIPS

Jun 23 2020

arichardson closed D25152: sys/riscv: Remove debug printfs.
Jun 23 2020, 3:26 AM
arichardson requested review of D25317: Include TMPFS in all the GENERIC kernel configs.
Jun 23 2020, 3:22 AM
arichardson requested review of D25217: Include virtio support in std.MALTA.
Jun 23 2020, 3:21 AM
arichardson requested review of D25152: sys/riscv: Remove debug printfs.
Jun 23 2020, 3:21 AM
arichardson closed D25151: RISC-V: handle DTB aligned to less than 2MB.
Jun 23 2020, 3:21 AM
arichardson requested review of D25151: RISC-V: handle DTB aligned to less than 2MB.
Jun 23 2020, 3:21 AM
arichardson requested review of D24787: Link efi programs with -pie rather than -shared.
Jun 23 2020, 3:17 AM
arichardson requested review of D24784: Avoid rebuilding libpmc in every incremental rebuild.
Jun 23 2020, 3:17 AM
arichardson requested review of D24783: stand: use portable ln -n instead of ln -h.
Jun 23 2020, 3:17 AM

Jun 19 2020

arichardson added a comment to D25217: Include virtio support in std.MALTA.
In D25217#559400, @jhb wrote:

I'm not sure it makes sense to commit this until it works?

Jun 19 2020, 3:45 PM
arichardson added a comment to D25317: Include TMPFS in all the GENERIC kernel configs.

Why are we doing this for GENERIC? No other architecture does so, and the only differences between them for GENERIC should be genuinely architecture-specific things, which TMPFS is not. If you want it for MFSROOT kernels, limit it to those. GENERIC is supposed to pick it up as a module just like everything else not required during earlyish boot.

arm/GENERIC has include "std.armv7" which enables TMPFS

True, and perhaps for similar reasons of being used on (somewhat-)embedded devices. Honestly I don't know why it _isn't_ always compiled in.

Jun 19 2020, 9:15 AM

Jun 18 2020

arichardson added a comment to D25317: Include TMPFS in all the GENERIC kernel configs.

Why are we doing this for GENERIC? No other architecture does so, and the only differences between them for GENERIC should be genuinely architecture-specific things, which TMPFS is not. If you want it for MFSROOT kernels, limit it to those. GENERIC is supposed to pick it up as a module just like everything else not required during earlyish boot.

Jun 18 2020, 10:37 AM
arichardson added a reviewer for D25317: Include TMPFS in all the GENERIC kernel configs: br.
Jun 18 2020, 9:19 AM
arichardson accepted D25312: Relax the rule against declaring variables in nested scopes..

I'm in favor of the change. However, it's been pointed out to me in the past that with all object declarations at the start of the function body it's easier to reason about the stack.

Jun 18 2020, 9:18 AM

Jun 17 2020

arichardson awarded D25312: Relax the rule against declaring variables in nested scopes. a Like token.
Jun 17 2020, 9:55 AM

Jun 12 2020

arichardson added a comment to D25210: llvm: Default to -mno-relax.

Patching the in-tree Clang to default to -mno-relax for FreeBSD might make sense. But out-of-tree can be used with BFD so that's not upstreamable.

Jun 12 2020, 4:34 PM
arichardson added a comment to D25210: llvm: Default to -mno-relax.

That test doesn't show anything, we know the flag is required by default, and there's no easy way for Clang to know what your linker is at compile time (it doesn't get LDFLAGS normally, and you don't know what /usr/bin/ld is).

Jun 12 2020, 4:28 PM

Jun 11 2020

arichardson added a comment to D25229: Allow bootstrapping localdef on non-FreeBSD systems.

Not sure what arc did here with copied from. Those are new files not copies.

Jun 11 2020, 10:26 AM
arichardson requested review of D25229: Allow bootstrapping localdef on non-FreeBSD systems.
Jun 11 2020, 10:24 AM

Jun 10 2020

arichardson added a comment to D23401: Make access to VirtIO configuration with proper endianness on big endian platforms.

@arichardson Could you say what is the complete command you use to run this vm on qemu? (./qemu-system-mips64 -M malta (...) what else?)
I reversed this commit and compiled the kernel and would like to test it according to your environment.

I have the following patch to enable virtio for std.MALTA (uploaded as D25217):

diff --git a/sys/mips/conf/std.MALTA b/sys/mips/conf/std.MALTA
index 26940db1b92f..787b3962caea 100644
--- a/sys/mips/conf/std.MALTA
+++ b/sys/mips/conf/std.MALTA
@@ -55,3 +55,13 @@ device               miibus
 device         bpf
 device         md
 device         uart
+
+# VirtIO support
+device         virtio          # Generic VirtIO bus (required)
+device         virtio_pci      # VirtIO PCI device
+device         vtnet           # VirtIO Ethernet device
+device         virtio_blk      # VirtIO Block device
+device         virtio_mmio     # VirtIO MMIO bus
+device         virtio_random       # VirtIO RNG
+device         virtio_console      # VirtIO Console
+

Then I use
qemu-system-mips64 -M malta -m 2048 -nographic -kernel /home/alr48/cheri/output/freebsd-mips/boot/kernel/kernel -drive file=/home/alr48/cheri/output/freebsd-mips.img,format=raw,index=0,media=disk -nic 'user,id=net0,ipv6=off,smb=/exports/users/alr48/sources -device virtio-rng-pci to boot.

This works for me, but it freezes on startup if I have this change included.
I use the following (probably incorrect) patch to allow it to compile on MIPS since bs_be_tag doesn't exist there:

diff --git a/sys/dev/virtio/pci/virtio_pci.c b/sys/dev/virtio/pci/virtio_pci.c
index aba35eb38ff5..7b48b771c417 100644
--- a/sys/dev/virtio/pci/virtio_pci.c
+++ b/sys/dev/virtio/pci/virtio_pci.c
@@ -297,7 +297,7 @@ vtpci_attach(device_t dev)
  * other parts of this file via functions
  * 'vtpci_[read|write]_header_[2|4]'
  */
-#if _BYTE_ORDER == _BIG_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN && defined(__powerpc__)
        rman_set_bustag(sc->vtpci_res, &bs_be_tag);
 #endif
Jun 10 2020, 8:21 PM · PowerPC
arichardson added a comment to D23401: Make access to VirtIO configuration with proper endianness on big endian platforms.

@arichardson Could you say what is the complete command you use to run this vm on qemu? (./qemu-system-mips64 -M malta (...) what else?)
I reversed this commit and compiled the kernel and would like to test it according to your environment.

Jun 10 2020, 8:12 PM · PowerPC

Jun 8 2020

arichardson committed rS361905: RISC-V: Check that the DTB doesn't overlap with kernel.
RISC-V: Check that the DTB doesn't overlap with kernel
Jun 8 2020, 8:52 AM
arichardson closed D25153: RISC-V: Check that the DTB doesn't overlap with kernel.
Jun 8 2020, 8:52 AM
arichardson committed rS361904: sys/riscv: Remove debug printfs.
sys/riscv: Remove debug printfs
Jun 8 2020, 8:52 AM
arichardson committed rS361903: RISC-V: handle DTB aligned to less than 2MB.
RISC-V: handle DTB aligned to less than 2MB
Jun 8 2020, 8:52 AM

Jun 6 2020

arichardson added inline comments to D25151: RISC-V: handle DTB aligned to less than 2MB.
Jun 6 2020, 4:10 PM

Jun 5 2020

arichardson added inline comments to D25153: RISC-V: Check that the DTB doesn't overlap with kernel.
Jun 5 2020, 7:50 PM
arichardson added a comment to D23401: Make access to VirtIO configuration with proper endianness on big endian platforms.

This commit appears to have broken using QEMU MALTA (MIPS64 BE) with -device virtio-rng-pci.
With this change I get an infinite loop on boot that goes away if I revert it:

I tested -device virtio-rng-pci with qemu-system-ppc64 and had no issues. Some questions:

  • Did you use -global virtio-pci.disable-modern=on ?

I just tried and this flag does not seem to make any difference, it also hangs.

  • If you don't use -device virtio-rng-pci it works?

Yes, it works in that case. If the device isn't there it doesn't use vtrnd_harvest()

  • What is the compilation error?

sys/dev/virtio/pci/virtio_pci.c:301:34: error: use of undeclared identifier 'bs_be_tag'

Jun 5 2020, 7:47 PM · PowerPC
arichardson added a comment to D25154: skein_block_asm.s: use #ifdef not .ifdef, for Clang IAS.

The other option would have been to change the build system to pass -Wa,-defsym, SKEIN_USE_ASM=XXX (that's what I did for my godbolt testing.
But either solution seems fine.

Oh hmm, I tried that and had an error, but now I see I tried --defsym with two dashes.

Jun 5 2020, 7:44 PM