Re: ifdef bwfm_pci_debug_console()

2018-01-08 Thread Patrick Wildt
On Mon, Jan 08, 2018 at 10:53:48AM +0800, Michael W. Bombardieri wrote: > Hello, > > I noticed that calls to the function bwfm_pci_debug_console() > are wrapped in ifdef but the function itself isn't. > > - Michael Fixed that and also changed it so it only prints it when we're running with a hi

libsa: zero-padding in printf

2018-01-16 Thread Patrick Wildt
Hi, I always stumble upon missing zero-padding every time I do something in the bootloader. This time I really need it so that I can load a file depending on a number. The files are named %02x-%02x-%02x if you were wondering. This implements the bare minimum to make it work. I don't claim it f

Re: efiboot: fix TFTP reading of 0-size files

2018-01-30 Thread Patrick Wildt
On Fri, Jan 26, 2018 at 12:25:56AM +0100, Christian Weisgerber wrote: > Fix TFTP reading of zero-size files in efiboot: > > The AllocatePages EFI call returns an error when the allocation > size is 0. Skip allocating memory and actually transferring the > file when it is empty. > > Properly retu

Re: armv7: banana pi, Allwinner A20 board

2014-10-02 Thread Patrick Wildt
Hi, I remember that there has been an issue, only seen on Cortex-A7/A15, like the Allwinner A20. The fix for that issue is somewhere here[0]. Try this[1] kernel and have a look if it has the same issue or not. I do not have an A20, so I can’t test it, sorry. But I’ll probably buy this[2][3] o

Re: armv7: banana pi, Allwinner A20 board

2014-10-02 Thread Patrick Wildt
< 13) | (((x) & 3) << 10)) /* AP */ \Patrick > Am 02.10.2014 um 21:16 schrieb Patrick Wildt : > > Hi, > > I remember that there has been an issue, only seen on Cortex-A7/A15, like the > Allwinner A20. > > The fix for that issue is somewhere here[0].

Re: armv7: banana pi, Allwinner A20 board

2014-10-16 Thread Patrick Wildt
I do believe that this is a pmap issue. I just got hands on an Allwinner A20 and suffered the same issues: pool_setlowat crashing randomly, same for ahci and so on. I believe we are not syncing the PTEs correctly. Here’s the snippet from PTE_SYNC(), but PTE_SYNC_RANGE() has the same issue: #def

clang warning in sys/scsi/st.c

2015-01-08 Thread Patrick Wildt
Hi, while compiling a kernel with a newer clang version it stumbled upon the following code starting line 1020 in sys/scsi/st.c: struct scsi_rw_tape *cmd; ... /* * Handle "fixed-block-mode" tape drives by using the * block count instead of the length.

remove unnecessary comparisons

2015-01-08 Thread Patrick Wildt
Hi, the following diff removes two unnecessary comparisons. In dsdt.c, pdata->pnpid is an array embedded in a struct, not a pointer, so if pdata is not NULL, which is checked a few lines above, pdata->pnpid probably isn't either. A similar issue also occurs in ti.c for ti_event_ring and ti_tx_ri

Re: restore all the psr bits on arm

2015-01-14 Thread Patrick Wildt
> Am 15.01.2015 um 02:51 schrieb Jonathan Gray : > > The '_all' PSR mask ends up being treated as 'fc' so switch 'msr' > instructions with '_all' to '_fsxc' so bits 23-8 are restored. > In older arm cores these bits were reserved now they are used. > > While here fix 'mrs' instructions to not u

support em(4) i210/i211 OTP chips

2015-03-08 Thread Patrick Wildt
Hi, this diff adds support for a special configuration of i210/i211 chips. Those can have a OTP chip instead of the usual EEPROM, so this diff adds the infrastructure to read needed data from OTP and have it not bail out when there's no EEPROM. \Patrick diff --git a/sys/dev/pci/if_em.c b/sys/de

[PATCH] smsc: unlock MII in error case

2015-03-18 Thread Patrick Wildt
Hi, in the case that reading the MII errors, the lock isn't released. This means on the next call, the lock will fail and make it panic. This diff properly unlocks the mii in the error case. Best regards, Patrick diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c index 7d99da8..4c2aebe

[PATCH] dwc2: re-establish default pipe after setting MPS/address

2015-03-18 Thread Patrick Wildt
Hi, similar to ehci/ohci, the default pipe has to be re-established after setting the new MaxPacketSize and address. Also, the following diff makes dwc2 actually set the address by setting a setaddr() function in the bus method struct. This makes the raspberry Pi 2's USB properly enumerate all d

Re: support em(4) i210/i211 OTP chips

2015-03-18 Thread Patrick Wildt
Any updates on this? > Am 09.03.2015 um 07:32 schrieb Patrick Wildt : > > Hi, > > this diff adds support for a special configuration of i210/i211 chips. > > Those can have a OTP chip instead of the usual EEPROM, so this diff > adds the infrastructure to read needed d

[PATCH] dwc2: abort is of task type abort

2015-03-18 Thread Patrick Wildt
Hi, running an abort task should be done using the abort task type. Best regards, Patrick diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c index afa749d..133c311 100644 --- sys/dev/usb/dwc2/dwc2.c +++ sys/dev/usb/dwc2/dwc2.c @@ -438,7 +438,7 @@ dwc2_timeout(void *addr) /*

compiler-rt: upgrade to 3.9.1 / fix gcc personality compile error

2017-01-03 Thread Patrick Wildt
Hi, the GCC personality C file does not compile with clang 3.8 on ARM. They have fixed the issue in compiler-rt and released 3.9.1. Apparently that is the only thing they changed in the builtins. Thus this diff is in essence an update to the compiler-rt release 3.9.1. ok? Patrick diff --git

libcrypto: fix assembly for clang

2017-01-03 Thread Patrick Wildt
Hi, clang complains about the ARM assembly, since it expects the conditional branch instructions to state the condition (in this case pl/ne) after the "b" for branch. We also need to state that we're using the unified syntax, so that binutils 2.17 likes it as well. OpenSSL fixed that issue in an

Re: libcrypto: fix assembly for clang

2017-01-04 Thread Patrick Wildt
On Tue, Jan 03, 2017 at 02:16:25PM -0500, Ted Unangst wrote: > Patrick Wildt wrote: > > > > Maybe they want to support older binutils that do not support the unified > > syntax? > > What's our policy there? > > OpenBSD is just about the oldest binutils aro

libcrypto: another ARM assembly change

2017-01-04 Thread Patrick Wildt
Hi, with our base clang targeting armv7 by default, this enables the NEON assembly in libcrypto as well. Note that is only used if NEON is actually available. Clang doesn't like the extra size definition ".32" on vmov which is not needed, so simply remove it. ok? Patrick diff --git a/lib/libc

llvm: pass library paths for cross-build

2017-01-04 Thread Patrick Wildt
Hi, with GCC as cross-compiler the PREFIX define (which is set to the CROSSDIR) makes sure that the linker includes the correct dirs. Otherwise the cross-build will only find the host libraries, which does not really work well. Our clang doesn't do this so far. The changes in clang make sure tha

arm: fixup allocate idle pcb

2017-01-05 Thread Patrick Wildt
Hi, we don't have SMP, but there are a few things one could start with already. For instance allowing the code to work/compile, even though not all components are there yet. This diff allows allocating the idle pcb / kernelstack. Rename of idlepcb to idle_pcb to be comparable with amd64. ok?

Re: Installing clang headers

2017-01-05 Thread Patrick Wildt
On Thu, Jan 05, 2017 at 03:37:43PM +0100, Mark Kettenis wrote: > The clang in base installs several header files in > /usr/lib/clang/3.8.1/include that are interfering somewhat with our > own headers. In particular these headers don't include > which leads to issues because our own headers expect

csu: prevent too aggressive optimization by clang

2017-01-09 Thread Patrick Wildt
Hi, while working on OpenBSD/arm64 I stumbled upon the issue that the CTOR and DTOR LIST was optimized away by clang. Instead of the __ctors() call it created an endless loop, doing nothing at all. I don't know why it does exactly that optimization. Marking the lists as __used prevents clang fr

arm64: userland pieces (libm)

2017-01-11 Thread Patrick Wildt
Hi, I'd like to start importing the userland pieces, piece by piece. This diff implements support for aarch64 in libm. It's based on the FreeBSD header, modified to look and feel more like our code. ok? Patrick diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 3854bb395fe..3d063929d0a

net: constant conversion

2017-01-20 Thread Patrick Wildt
Hi, the new clang complains when variables might unintentionally switch from a positive to a negative number. This happens on the MULTICAST flag which sets the uppermost bit. ../../../../net/if.h:#defineIFF_MULTICAST 0x8000 /* supports multicast */ Thus if_flags = IFF_MULTICAST

arm64/llvm: default to strict alignment

2017-01-20 Thread Patrick Wildt
Hi, currently our clang for ARM64 creates code thinking it can do unaligned access. Which is kinda true, since our kernel does not enforce strict alignment yet. The Pine64 on the other hand enforces strict alignment at least as long as EFI is running. This means efiboot needs to be compiled wit

sunxi: add Allwinner A64 support for USB and USB clocks

2017-01-20 Thread Patrick Wildt
Hi, so this diff makes the Pine64 work with EHCI. The only not nice thing is the switch. It would be better if this depends on the compatible since the A64 and H3 have different numbers (and clock parents) for the APB2 clock. I would still like to go ahead with this version since I don't think

hook up libcompiler_rt, libcxx(abi) to the build

2017-01-20 Thread Patrick Wildt
Hi, now that the Makefiles in libcompiler_rt, libcxx and libcxxabi are guarded to not compile for !CLANG architectures, I am hopefuly that we can simply hook them up to the build. ok? Patrick diff --git a/lib/Makefile b/lib/Makefile index 7bca1e4bf2d..70cade57caa 100644 --- a/lib/Makefile +++ b

Re: sunxi: add Allwinner A64 support for USB and USB clocks

2017-01-20 Thread Patrick Wildt
On Sat, Jan 21, 2017 at 10:50:20AM +1000, Patrick Wildt wrote: > Hi, > > so this diff makes the Pine64 work with EHCI. The only not nice thing > is the switch. It would be better if this depends on the compatible > since the A64 and H3 have different numbers (and clock parents)

sunxi: clock for PIO

2017-01-20 Thread Patrick Wildt
Hi, this diff adds the clock for the Allwinner A64 PIO. ok? Patrick diff --git a/sys/arch/armv7/sunxi/sxiccmu_clocks.h b/sys/arch/armv7/sunxi/sxiccmu_clocks.h index fdd0282623b..5a8f36f9993 100644 --- a/sys/arch/armv7/sunxi/sxiccmu_clocks.h +++ b/sys/arch/armv7/sunxi/sxiccmu_clocks.h @@ -19,6

llvm: add infrastructure to build lld

2017-01-21 Thread Patrick Wildt
Hi, for arm64 our goal is to use lld. Even though we really need lld 4.0, which is not yet released, it is already a good start to have lld 3.9.1 make infrastructure available. This diff adds the neccesary Makefiles and modified lld to not use Mach-O/COFF (so that we don't need those libraries a

llvm: install clang as cc,c++,cpp and lld as ld

2017-01-21 Thread Patrick Wildt
Hi, in architectures which use clang by default we should provide clang as cc, c++ and cpp as well. Also lld should be called ld. ok? Patrick diff --git a/gnu/usr.bin/clang/clang/Makefile b/gnu/usr.bin/clang/clang/Makefile index b16aaa5e67c..104f7c593f1 100644 --- a/gnu/usr.bin/clang/clang/Mak

Re: llvm: install clang as cc,c++,cpp and lld as ld

2017-01-21 Thread Patrick Wildt
On Sun, Jan 22, 2017 at 01:42:19PM +1000, Patrick Wildt wrote: > Hi, > > in architectures which use clang by default we should provide clang as > cc, c++ and cpp as well. Also lld should be called ld. > > ok? > > Patrick > Of course it needs to be guarded with COMP

uvm: guard unused function for RAMDISK kernel

2017-01-22 Thread Patrick Wildt
Hi, on a RAMDISK kernel this function is not used, thus clang complains. Simply guard it with SMALL_KERNEL, like the rest of that part of the code. ok? Patrick diff --git a/sys/uvm/uvm_addr.c b/sys/uvm/uvm_addr.c index af33700273b..4527e1fda78 100644 --- a/sys/uvm/uvm_addr.c +++ b/sys/uvm/uvm_a

Re: uvm: guard unused function for RAMDISK kernel

2017-01-22 Thread Patrick Wildt
On Mon, Jan 23, 2017 at 10:20:39AM +1000, Patrick Wildt wrote: > Hi, > > on a RAMDISK kernel this function is not used, thus clang complains. > Simply guard it with SMALL_KERNEL, like the rest of that part of the > code. > > ok? > > Patrick > As requested by dera

arm64: distrib/special installboot

2017-01-22 Thread Patrick Wildt
Hi, this makes installboot compile for arm64 at the RAMDISK build. ok? Patrick diff --git a/distrib/special/installboot/Makefile b/distrib/special/installboot/Makefile index 760daf0e44e..bfff63b11e4 100644 --- a/distrib/special/installboot/Makefile +++ b/distrib/special/installboot/Makefile @@

arm64: distrib for ramdisk kernel

2017-01-22 Thread Patrick Wildt
Hi, this diff provides the infrastructure to compile a ramdisk kernel for arm64. It's been copied from armv7 and stripped from u-boots, device trees and mkuboot. ok? Patrick diff --git a/distrib/arm64/Makefile b/distrib/arm64/Makefile new file mode 100644 index 000..bb5d606b329 --- /d

no pointer sign warnings

2017-01-24 Thread Patrick Wildt
Hi, clang complains about pointer sign changes The most simple fix would be to disable the warning for clang. Example from librthread: /home/patrick/openbsd-src/lib/librthread/rthread_sem.c:316:13: error: passing 'const char *' to parameter of type 'const u_int8_t *' (aka 'const unsigned char

lld: fix library search

2017-01-27 Thread Patrick Wildt
Hi, Apparently if you convert a twine to a string (using str() on the Twine) and setting that to a StringRef variable creates a broken string. This means that the code never runs and thus never finds libc.so.x.y. It falls back to picking up the .a files instead. Apparently you have to provide a

Re: lld: fix library search

2017-01-27 Thread Patrick Wildt
On Fri, Jan 27, 2017 at 10:05:38PM +1000, Patrick Wildt wrote: > Hi, > > Apparently if you convert a twine to a string (using str() on the Twine) > and setting that to a StringRef variable creates a broken string. This > means that the code never runs and thus never finds l

provide libc++abi as shared library as well

2017-01-30 Thread Patrick Wildt
Hi, when I first imported the new C++ stack with libc++, libc++abi and libunwind I wanted to find out if we really needed libc++abi as a shared library or not. Thus so far only libc++ is a shared object, while libc++abi is only provided as .a. My reasoning was that the ABI should never change, w

arm64: efiboot pass physical esym address

2017-02-03 Thread Patrick Wildt
Hi, due to the previous armv7 non-EFI history, our current efiboot on armv7 still manually modifies a symbol in the kernel before booting it. Since efiboot for arm64 was copied from armv7, this code is still there and the mechanism is partially in use. Why partially? Well, we pass the virtual a

arm64: properly exit EFI BootServices

2017-02-03 Thread Patrick Wildt
Hi, reading the UEFI specification (and also FreeBSD code) it turns out that to make EFI properly exit, we need to prove that we know the state of the current memory mappings. Otherwise EFI can opt to only do a partial shutdown of its services. It would be nice to eventually parse and use the EF

arm64: flush data and instruction cache before calling kernel

2017-02-03 Thread Patrick Wildt
Hi, turns out that machines (in my case the AMD machine) can have the MMU and caches enabled while running EFI. This means that once we jump into the kernel and disable the MMU, the cache is lost and we kind of crash. To fix that, make sure to clean the data cache and flush the instruction cache

Re: stop building arm64 kernels with -mcpu=cortex-a57

2017-02-05 Thread Patrick Wildt
On Sun, Feb 05, 2017 at 09:57:13PM +1100, Jonathan Gray wrote: > Ask for a generic armv8-a encoding rather than one based on and tuned > for cortex-a57. If that works for you, sure, ok patrick@. > > Index: Makefile.arm64 > === > RCS

Re: arm/simplebus: externalize simplebus_attach_node

2017-02-12 Thread Patrick Wildt
On Sat, Feb 11, 2017 at 08:50:23PM -0500, Ian Sutton wrote: > Currently, we do not have a way to iterate over child FDT nodes, which > is a problem when you have a devices like the USB system on the am335x > (Beaglebone Black): > > https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=bbb-usb.git;a=blob;

npppd: reload enables stripping NT domains on radius

2017-02-20 Thread Patrick Wildt
Hi, when using RADIUS, the NT domains should not be stripped from the username. When a base object is instantiated based on an auth object, the "strip_nt_domain" variable is always enforced to zero in case of using RADIUS. The auth object itself though has it set to one by default. Now on confi

Re: npppd: reload enables stripping NT domains on radius

2017-02-20 Thread Patrick Wildt
On Tue, Feb 21, 2017 at 02:11:05PM +0900, YASUOKA Masahiko wrote: > Hi, > > On Mon, 20 Feb 2017 11:38:19 +0100 > Patrick Wildt wrote: > > when using RADIUS, the NT domains should not be stripped from the > > username. > > I suppose it depends on the use-case. >

Re: arm64 SMP support, diff #2/5

2017-02-25 Thread Patrick Wildt
On Wed, Feb 22, 2017 at 06:45:20PM -0500, Dale Rahn wrote: > Changes in interrupt controller infrastructure to support smp. > > Add an API that allows a processor to direct an interrupt to multiple cores > enable support for ampintc to serice MPSAFE interrupts. > > bcm does not yet have support e

Re: Switch agtimer from physical timer to virtual timer.

2017-02-27 Thread Patrick Wildt
On Sun, Feb 26, 2017 at 10:35:17PM -0500, Dale Rahn wrote: > Switch agtimer from physical timer to virtual timer. > > This diff makes the arm generic timer for arm64 use the virtual > timer instead of the physical timer. > > Linux uses the virtual timer in the kernel unless it is operating in > h

efiboot: boot device lookup typo

2017-02-27 Thread Patrick Wildt
Hi, in comparison to my usual diffs this is actually amd64 and not arm64. I'm surprised this didn't come up earlier, but I think the for-loop is a bit wrong. What the code is supposed to be doing is going over each device path node for the loaded image, which is supposed to be the path to the de

Re: efiboot: boot device lookup typo

2017-02-28 Thread Patrick Wildt
On Tue, Feb 28, 2017 at 10:41:21PM +0900, YASUOKA Masahiko wrote: > Hi, > > On Mon, 27 Feb 2017 11:10:31 +0100 > Patrick Wildt wrote: > > I'm surprised this didn't come up earlier, but I think the for-loop is a > > bit wrong. What the code is supposed to be d

Re: efiboot: boot device lookup typo

2017-02-28 Thread Patrick Wildt
On Tue, Feb 28, 2017 at 11:09:51PM +0900, YASUOKA Masahiko wrote: > Let me update the diff, > > On Tue, 28 Feb 2017 22:41:21 +0900 (JST) > YASUOKA Masahiko wrote: > > On Mon, 27 Feb 2017 11:10:31 +0100 > > Patrick Wildt wrote: > >> I'm surprised this didn&

efiboot: update to efidevp header

2017-02-28 Thread Patrick Wildt
Hi, this diff pulls in some additions that were made in FreeBSD, which includes a define cleanup and the addition of the SATA device path and the EFI_DEVICE_PATH_TO_TEXT_PROTOCOL protocol. ok? Patrick diff --git a/sys/stand/efi/include/efidevp.h b/sys/stand/efi/include/efidevp.h index 7b78c3664

Re: efiboot: boot device lookup typo

2017-02-28 Thread Patrick Wildt
On Tue, Feb 28, 2017 at 03:16:58PM +0100, Patrick Wildt wrote: > On Tue, Feb 28, 2017 at 10:41:21PM +0900, YASUOKA Masahiko wrote: > > Hi, > > > > On Mon, 27 Feb 2017 11:10:31 +0100 > > Patrick Wildt wrote: > > > I'm surprised this didn't come up ea

Re: efiboot: boot device lookup typo

2017-02-28 Thread Patrick Wildt
On Wed, Mar 01, 2017 at 12:17:02AM +0900, YASUOKA Masahiko wrote: > Hi, > > On Tue, 28 Feb 2017 15:16:58 +0100 > Patrick Wildt wrote: > > On Tue, Feb 28, 2017 at 10:41:21PM +0900, YASUOKA Masahiko wrote: > >> On Mon, 27 Feb 2017 11:10:31 +0100 > >> Patrick Wil

Re: efiboot: boot device lookup typo

2017-02-28 Thread Patrick Wildt
On Tue, Feb 28, 2017 at 04:33:14PM +0100, Patrick Wildt wrote: > On Wed, Mar 01, 2017 at 12:17:02AM +0900, YASUOKA Masahiko wrote: > > Hi, > > > > On Tue, 28 Feb 2017 15:16:58 +0100 > > Patrick Wildt wrote: > > > On Tue, Feb 28, 2017 at 10:41:21PM +0900, YASUO

efiboot: disallow com(4) speed changes

2017-03-01 Thread Patrick Wildt
Hi, there is no com(4) direct access support in EFI, so setting the speed will fail and crash the EFI Application. Happens when you run stty com0 115200. ok? Patrick diff --git a/sys/arch/amd64/stand/libsa/dev_i386.c b/sys/arch/amd64/stand/libsa/dev_i386.c index e40856cbf05..245ced84a8e 1006

Re: exuart(4) diff

2017-03-05 Thread Patrick Wildt
On Sun, Mar 05, 2017 at 12:33:57PM +0100, Mark Kettenis wrote: > Diff below makes the console on the odroid-xu4 actually work. I don't > completely understand the current code. It doesn't check whether a > character can be written before doing so. Instead it tries to make > sure the transmission

Re: arm64 setjmp/longjmp signal mask storage error

2017-03-06 Thread Patrick Wildt
On Tue, Mar 07, 2017 at 01:44:19AM -0500, Dale Rahn wrote: > Setjmp, longjmp was converted from calling sigprocmask to invoking > sigprocmask directly. The ABI for the function call and the syscall > are not the same and the register manipulation code was not updated > in the change. > > This dif

Re: arm64 setjmp/longjmp signal mask storage error

2017-03-07 Thread Patrick Wildt
On Tue, Mar 07, 2017 at 08:40:22AM +0100, Patrick Wildt wrote: > On Tue, Mar 07, 2017 at 01:44:19AM -0500, Dale Rahn wrote: > > Setjmp, longjmp was converted from calling sigprocmask to invoking > > sigprocmask directly. The ABI for the function call and the syscall > > are

pf: time since uptime instead of wall clock?

2017-03-07 Thread Patrick Wildt
Hi, currently the pf status struct contains the time since pf was enabled as seen on the wall clock. This means when time drifts, or is set to some earlier value, the time will be off. If we use time since uptime it always increments and shows how long pf has been running compared to its uptime.

Re: pf: time since uptime instead of wall clock?

2017-03-07 Thread Patrick Wildt
On Tue, Mar 07, 2017 at 10:17:16AM +0100, Patrick Wildt wrote: > Hi, > > currently the pf status struct contains the time since pf was enabled as > seen on the wall clock. This means when time drifts, or is set to some > earlier value, the time will be off. If we use time

Re: pf: time since uptime instead of wall clock?

2017-03-13 Thread Patrick Wildt
On Mon, Mar 13, 2017 at 02:33:02PM +0100, Mike Belopuhov wrote: > On Tue, Mar 07, 2017 at 10:36 +0100, Patrick Wildt wrote: > > On Tue, Mar 07, 2017 at 10:17:16AM +0100, Patrick Wildt wrote: > > > Hi, > > > > > > currently the pf status struct contains the tim

Re: pf: time since uptime instead of wall clock?

2017-03-16 Thread Patrick Wildt
On Mon, Mar 13, 2017 at 03:14:25PM +0100, Mike Belopuhov wrote: > On 13 March 2017 at 15:09, Patrick Wildt wrote: > > On Mon, Mar 13, 2017 at 02:33:02PM +0100, Mike Belopuhov wrote: > >> On Tue, Mar 07, 2017 at 10:36 +0100, Patrick Wildt wrote: > >> > On Tue, Ma

pf: percpu anchor stacks

2017-03-17 Thread Patrick Wildt
Hi, to step into and out of pf(4) anchors, pf(4) uses a temporary stack that is a global variable. Now once we run pf_test_rule() in parallel and an anchor is evaluated in parallel, the global stack would be used concurrently, which can lead to panics. To solve this issue this diff allocates a p

Re: arm64 kernel W^X

2017-03-17 Thread Patrick Wildt
On Fri, Mar 17, 2017 at 06:42:38PM +0100, Mark Kettenis wrote: > The diff below introduces kernel W^X on arm64. It changes the linker > script to align the RX, R and RW segments on a 2MB boundary such that > we can continue to use block mappings for the kernel. Then it adds > some additional link

Re: Optimize cerror on arm64

2017-03-18 Thread Patrick Wildt
On Sat, Mar 18, 2017 at 03:47:18PM +0100, Mark Kettenis wrote: > Just like we did on other architectures. > > ok? guenther@ had the same diff (but he also removed the movn x1), which looked good to me as well. Basically still ok patrick@. ;) > > > Index: lib/libc/arch/aarch64/sys/cerror.S > =

Re: lld -znodlopen support

2017-03-18 Thread Patrick Wildt
On Sat, Mar 18, 2017 at 04:17:30PM +0100, Mark Kettenis wrote: > Diff below adds support for -Wl,-znodlopen. This fixes the > libexec/ld.so/df_1_noopen regression test. > > ok? Seems easy enough, looks good to me. > > > Index: gnu/llvm/tools/lld/ELF/Config.h >

cross: fix crossdir export

2017-03-19 Thread Patrick Wildt
Hi, we now have at least two parts of the build system depend on CROSSDIR to check for a cross-compile environment (ld.so + binutils). Unfortunately we never really exported CROSSDIR for those so the checks never worked. This diff exports CROSSDIR for binutils, moves the CROSSDIR define around i

efi: device i/o protocol has been replaced

2017-03-20 Thread Patrick Wildt
Hi, the Device I/O Protocol has been replaced by the PCI Root Bridge I/O protocol. Since we don't make use of it I think it makes sense to remove the protocol from our headers to actively discourage the use of that protocol. Instead it would make sense to add the PCI Root Bridge I/O protocol and

makefs: fix msdos create size

2017-03-22 Thread Patrick Wildt
Hi, apparently the "create_size" option does currently not work. This is because the strsuftoll() function uses "long long" compares which limits the positive maximum to LLONG_MAX. Unfortunately the maximum is always set to ULLONG_MAX, which is treated as -1 and cannot be a reasonable maximum va

Re: arm64 ampintc(4) fix

2017-04-08 Thread Patrick Wildt
On Sat, Apr 08, 2017 at 01:05:30PM +0200, Mark Kettenis wrote: > So here is the diff that brings the changes I made to the armv7 > version over to arm64. I've now verified that it actually works. > Even better, I've verified that it fixes my Overdrive 1000! > > It seems not all Overdrives are cre

Re: aarch64: undefined math symbols, at least __floatunditf __fixunstfsi __fixunstfdi

2017-04-09 Thread Patrick Wildt
On Sun, Apr 09, 2017 at 09:39:14PM +0100, Stuart Henderson wrote: > I'm building ports on aarch64 to see how things go and am looking for common > problems. At this stage, mostly just wanting to show people what things I run > into so they can mull them over. (I'll also fix simple things as I go).

Re: arm64 pmap tlb flushing diff

2017-04-14 Thread Patrick Wildt
On Fri, Apr 14, 2017 at 11:51:52AM +0200, Mark Kettenis wrote: > While reading the arm64 code the ranges covered by the tlb flushes in > the code that sets the l1/l2/l3 tables made no sense to me. I came to > the conclusion that these flushes aren't necessary. When we enter the > final page table

Re: arm64 ieee.h

2017-04-16 Thread Patrick Wildt
On Sun, Apr 16, 2017 at 05:52:54PM +0200, Mark Kettenis wrote: > Like mips64 and sparc64, the 128-bit long double floating point format > needs the EXT_IMPLICIT_NBIT define. This fixes the lib/libc/printf > regress test. > > While there, remove struct ieee_ldouble, which isn't used and doesn't >

ld.lld: disable colors/bold/whatever

2017-04-16 Thread Patrick Wildt
Hi, this diff disables the color diagnostics by default so that LLVM's lld does not throw any ANSI sequences. ok? Patrick diff --git a/gnu/llvm/tools/lld/ELF/DriverUtils.cpp b/gnu/llvm/tools/lld/ELF/DriverUtils.cpp index 5ba494d791d..36b4052d72a 100644 --- a/gnu/llvm/tools/lld/ELF/DriverUtils.

Re: ld.lld: disable colors/bold/whatever

2017-04-17 Thread Patrick Wildt
On Mon, Apr 17, 2017 at 06:51:57PM +0200, Pascal Stumpf wrote: > On Mon, 17 Apr 2017 18:25:34 +0200 (CEST), Mark Kettenis wrote: > > > Date: Sun, 16 Apr 2017 22:00:23 +0200 (CEST) > > > From: Mark Kettenis > > > > > > > Date: Sun, 16 Apr 2017

Re: Add Cortex-A12 support

2017-04-24 Thread Patrick Wildt
On Mon, Apr 24, 2017 at 06:48:22PM +0200, Mark Kettenis wrote: > Even though ARM "merged" the Cortex-A12 as Cortex-A17, there are cores > with the original Cortex-A12 MIDR out there. So it is useful to > differentiate between them. The Rockchip RK3288 has 4 of these cores. > The diff below adds s

Re: arm64 gic-v3 driver

2017-04-29 Thread Patrick Wildt
On Sat, Apr 29, 2017 at 06:45:15PM +0200, Mark Kettenis wrote: > The firefly rk3399 board has a gic-v3, so I'd like to get Dale's > driver into the tree. I did some further cleanup, renamed the driver > to agintc(4) (as jsg@ felt the "new" in angintc(4) did't make sense) > and fixed two bugs: > >

Re: Make mainbus(4) recognize early attribute on arm64

2017-04-30 Thread Patrick Wildt
On Sun, Apr 30, 2017 at 03:04:38PM +0200, Mark Kettenis wrote: > Here is a diff that makes mainbus(4) behave in a similar way as > simplebus(4). Needed for the Firefly-RK3399 since it attaches most > devices directly on mainbus(4) and need to control the order a bit. > > I dropped the "no device

Re: arm64 bus_dmamap_sync(9)

2017-05-05 Thread Patrick Wildt
On Fri, May 05, 2017 at 03:19:07PM +0200, Mark Kettenis wrote: > To support sdhc(4) on the Firefly-RK3399, I actually need a working > bus_dmamap_sync(9) implementation that does proper cache flushes. So > far we've gotten away with not having one, because the USB stack tends > to set the BUS_DMA_

Re: sdhc(4) quirks

2017-05-05 Thread Patrick Wildt
On Fri, May 05, 2017 at 02:26:51PM +0200, Mark Kettenis wrote: > I'm working on support for the SDHC controller on the Rockchip RK3399 > such that I can use the onboard eMMC on the Firefly-RK3399. This > controller is based on the Arasan eMMC 5.1 "IP", which has a standard > SDHC 3.0 interface. H

pf: remove pfr_{sin,sin6,mask} globals

2017-05-08 Thread Patrick Wildt
Hi, in order to reduce globals so that we can run more parts of pf in parallel, this diff removes the pfr_sin, pfr_sin6 and pfr_mask globals. Those are instead allocated on the stack. ok? Patrick diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c index 708bd68cbcd..2cdff265ff5 100644 --- a/s

boot: put debug printfs inside of defines

2017-05-08 Thread Patrick Wildt
Hi, most if (debug) prints are inside of an ifdef guard, but those two apparently aren't. The amd64 efiboot for instance does only define debug if EFI_DEBUG is set, which it is not per default. So it won't build. We can either guard those checks as well or remove the EFI_DEBUG ifdef guarding th

Re: pf: remove pfr_{sin,sin6,mask} globals

2017-05-09 Thread Patrick Wildt
On Mon, May 08, 2017 at 02:56:55PM +0200, Patrick Wildt wrote: > @@ -2307,9 +2326,9 @@ pfr_pool_get(struct pf_pool *rpool, struct pf_addr > **raddr, > rpool->curweight = kt->pfrkt_maxweight; > } > > - pfr_prepare_network(&

Re: pf: remove pfr_{sin,sin6,mask} globals

2017-05-09 Thread Patrick Wildt
On Tue, May 09, 2017 at 01:55:18PM +0200, Mike Belopuhov wrote: > On Tue, May 09, 2017 at 10:36 +0200, Patrick Wildt wrote: > > On Mon, May 08, 2017 at 02:56:55PM +0200, Patrick Wildt wrote: > > > @@ -2307,9 +2326,9 @@ pfr_pool_get(struct pf_pool *rpool, struct pf_a

LLVM 15: mismatched bound errors

2022-12-20 Thread Patrick Wildt
Hi, clang complains when the function is declared with a fixed array size in a parameter while the prototype is unbounded, like this: /usr/src/sys/net/pf.c:4353:54: error: argument 'sns' of type 'struct pf_src_node *[4]' with mismatched bound [-Werror,-Warray-parameter] struct pf_rule_action

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Patrick Wildt
On Tue, Dec 20, 2022 at 05:48:41PM -0700, Todd C. Miller wrote: > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: > > > clang complains when the function is declared with a fixed array size in > > a parameter while the prototype is unbounded, like this: > > > &

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Patrick Wildt
Am Thu, Dec 22, 2022 at 01:57:37AM +0100 schrieb Jeremie Courreges-Anglas: > On Thu, Dec 22 2022, Theo Buehler wrote: > > On Thu, Dec 22, 2022 at 11:39:41AM +1100, Jonathan Gray wrote: > >> On Thu, Dec 22, 2022 at 01:20:32AM +0100, Theo Buehler wrote: > >> > > Any concerns regarding the changes in

Re: LLVM 15: mismatched bound errors

2022-12-24 Thread Patrick Wildt
On Thu, Dec 22, 2022 at 01:14:57AM +0100, Patrick Wildt wrote: > On Tue, Dec 20, 2022 at 05:48:41PM -0700, Todd C. Miller wrote: > > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: > > > > > clang complains when the function is declared with a fixed array size in

Re: gptimer(4): switch to clockintr

2023-01-24 Thread Patrick Wildt
Am Mon, Jan 23, 2023 at 04:34:27PM -0600 schrieb Scott Cheloha: > Whoops, missed one. This is the fifth and (I think) last armv7 clock > interrupt driver that needs to switch to clockintr. gptimer(4) is > nearly identical to dmtimer(4). > > Notable changes: > > - Switch stathz from 128 to hz. >

Re: gptimer(4): switch to clockintr

2023-01-24 Thread Patrick Wildt
Am Tue, Jan 24, 2023 at 10:32:49PM +0100 schrieb Mark Kettenis: > > Date: Tue, 24 Jan 2023 20:57:48 +0100 > > From: Patrick Wildt > > > > Am Mon, Jan 23, 2023 at 04:34:27PM -0600 schrieb Scott Cheloha: > > > Whoops, missed one. This is the fifth and (I think)

Re: wsmouse(4): Apple-like multi-touch buttons

2023-02-07 Thread Patrick Wildt
On Tue, Feb 07, 2023 at 02:12:57PM +0100, Tobias Heider wrote: > On Mon, Sep 19, 2022 at 11:16:51AM +0200, Ulf Brosziewski wrote: > > Is there enough interest in this feature among OpenBSD users? I haven't > > seen many requests for it, if any. Moreover, is it a good idea to configure > > differe

Re: wsmouse(4): Apple-like multi-touch buttons

2023-02-07 Thread Patrick Wildt
On Tue, Feb 07, 2023 at 10:07:56PM +0100, Ulf Brosziewski wrote: > I wouldn't mind seeing such a feature in the driver, but I think there's more > to do than counting contacts. The start of a click-and-drag gesture may > involve > two contacts and a button-press event, or people who place a thumb

xhci(4): map MSI-X

2023-04-18 Thread Patrick Wildt
Hi, I noticed that on Qemu with arm64 we're falling back to legacy interrupts with xhci(4) on PCI. Turns out that the virtual xHCI does not support MSI, but it does support MSI-X. By having xhci(4) map MSI-X as well I can use that on Qemu. My x395, which so far used MSI, is still working fine w

Re: Allwinner

2013-10-11 Thread Patrick Wildt
Am 11.10.2013 um 22:46 schrieb Artturi Alm : > On 10/11/13 20:39, Markus Hennecke wrote: >> On Sat, 5 Oct 2013, Artturi Alm wrote: >> >>> Current version attached, extract to /sys/arch/armv7 and read the short >>> notes file, no more out of allwinner/ patches needed thanks to armv7. >>> >>> A20

Re: beaglebone

2013-04-26 Thread Patrick Wildt
Am 26.04.2013 um 17:09 schrieb Raphael Graf : > On Thu, April 25, 2013 7:30 pm, Alexey E. Suslikov wrote: >> Raphael Graf undefined.ch> writes: >> >>> I have a beaglebone (AM3359) running OpenBSD, see below. >>> Is there any interest in such code? >> >> Diffs are interesting. Teasers are not.

Re: Allwinner wip

2013-07-20 Thread Patrick Wildt
Am 20.07.2013 um 14:20 schrieb Martin Pieuchot : > On 20/07/13(Sat) 14:10, Artturi Alm wrote: >> Hi, >> >> work-in-progress-quality 'port' to add support for Allwinner A10, tested >> on cubieboard only. > > Nice work. For what I've seen this port is really similar to the beagle > one. Do you

ntpd(8) option to provide time even when not being synced

2012-08-24 Thread Patrick Wildt
the diff below adds an option to the ntpd(8), which has him provide time, even though he's not synced. ok? Index: ntpd.8 === RCS file: /cvs/src/usr.sbin/ntpd/ntpd.8,v retrieving revision 1.31 diff -u -r1.31 ntpd.8 --- ntpd.8 1

fix log_err() messages in sasyncd(8)

2012-09-04 Thread Patrick Wildt
I think those were log_msg()s before, as log_msg() has to be called with a debug level as first argument. As log_err() doesn't take a debug level, just call it with the string. Index: monitor.c === RCS file: /cvs/src/usr.sbin/sasyncd/

<    1   2   3   4   5   6   >