Re: CVS commit: src/sys/sys

2011-02-18 Thread Aymeric Vincent
"Jonathan A. Kollasch"  writes:

> On Thu, Feb 17, 2011 at 07:28:46PM +, Matt Thomas wrote:
>> 
>> Log Message:
>> Move lwp_getpcb to the area with the rest of the _KERNEL function 
>> declarations.
>
> This (probably) is what broke the gdb build in its kvm code.
> Apparently it needs _KMEMUSER defined.

Joerg just fixed that. However, usr.sbin/crash is broken at least on
i386 because of this change.

I think adding -D_KERNEL in usr.sbin/crash/Makefile is gross. Unless you
prefer to make lwp_getpcb() declaration dependent on _KMEMUSER or on a
new macro, could you please revert this change, Matt?

Regards,
 Aymeric


Re: CVS commit: [netbsd-7] src/libexec/getty

2015-02-11 Thread Aymeric Vincent

Hi Matthew,

matthew green  writes:

>> update the example to use dty00 instead of ttyd0 to reflect a current 
>> practice
>
> is this actually right?  the example shows:
>
> # dialup at 1200 baud, no root logins
> dty00   "/usr/libexec/getty d1200"  dialup  on  # 555-1234
>
> but i thought the dty was the dial *out* device, which
> matches eg, com.c 1.143's commit message.

You're definitely right. The correct corresponding /dev entry should be
tty00 for dialin on NetBSD.

I'm waiting a bit for anyone to raise concerns and will fix in HEAD and
request new pullups.

Best regards,
 Aymeric


Re: CVS commit: src/external/mit/xorg

2015-08-08 Thread Aymeric Vincent
David Holland  writes:

>  > Fix bracket expressions by moving '-' to the end of them. GNU awk choked.
>
> Front is safer. fwiw.

OK, I moved them to the front, together with '_' because it felt awkward
to separate the separators. Out of curiosity, is it "safer" just because
it is more robust to future additions to the expression or is it
actually "safer" even if the expression is left as is?

Regards,
 Aymeric


Re: CVS commit: src/external/mit/xorg

2015-08-09 Thread Aymeric Vincent

matthew green  writes:

> don't we also have TOOL_AWK to handle this?  (mind making that change too? :)

Sure, consider it done. :-) Waiting for a release to finish successfully
first.

Regards,
 Aymeric


Re: CVS commit: src/tools/compat

2016-02-29 Thread Aymeric Vincent

chris...@astron.com (Christos Zoulas) writes:

> Can you explain how it breaks? Is it because of the locale settings?

Sure, and no: it's simply because it uses [[:<:]] and [[:>:]] as word
delimiters, and that appears to be a BSD extension.

Regards,
 Aymeric


Re: CVS commit: src/sbin/gpt

2017-02-12 Thread Aymeric Vincent
chris...@astron.com (Christos Zoulas) writes:

> Yes, doesn't libcompat provide our getopt()? Or are you trying to compile
> this standalone?

It does, but from what I understand, we replace only getopt_long()
unconditionnally and use the host's getopt() if the optind variable can
be linked against.

Confirmed on a Linux host in /lib:

$ nm libnbcompat.a | grep getopt
getopt_long.lo:
0098 T __nbcompat_getopt_long
$ 

I agree it would be nicer to use always our getopt().

 Aymeric


Re: CVS commit: src

2018-05-29 Thread Aymeric Vincent


Hi,

"Chuck Silvers"  writes:

> Module Name:  src
> Committed By: chs
> Date: Mon May 28 21:05:12 UTC 2018
>
> Modified Files:
> [...]
> Log Message:
> merge a new version of the CDDL dtrace and ZFS code.

Thanks for your work, but unfortunately this breaks the tools build on a
Linux host. It pulls at least sys/proc.h, sys/lwp.h and sys/time.h while
compiling libctf. At this point I stopped trying to add proxies in
tools/compat/sys because "struct timeval" is defined twice legitimately
but incompatibly: once in Linux headers and once in NetBSD headers.

Probably a right fix would be to pull fewer includes from the tools but
I would prefer your insight on this matter because I'm not familiar at
all with ctf to know what can/should be cut out from the tools part of
the build.

Regards,
 Aymeric


Re: CVS commit: src/external/cddl/osnet/sys/sys

2018-06-03 Thread Aymeric Vincent


Hi,

"Chuck Silvers"  writes:

> Committed By: chs
> [...]
> Log Message:
> tweak the osnet compat headers to allow building on MacOS and Linux hosts.

Thanks a lot. The tools build works for me under Linux now.

Regards,
 Aymeric


Re: CVS commit: src/sys/arch

2018-09-19 Thread Aymeric Vincent


Jared McNeill  writes:

> Any chance that you could use sys/dev/fdt/dwcmmc_fdt.c instead of the
> new cycv_dwcmmc.c? It should be fairly generic.

>From reading the code, and to avoid any modification except
compat_data[], I will first have to add support for changing clock rates
to cycv_clkmgr.c, it seems to be required by dwcmmc_fdt.c. Other than
that, you're right, it should work as is. Thanks, it's now on my todo
list.

Regards,
 Aymeric


Re: CVS commit: src/sys/arch/arm/altera

2018-10-28 Thread Aymeric Vincent
Nick Hudson  writes:

> Does it work now?

Yes, it does.

Regards,
 Aymeric


Re: CVS commit: src/distrib/utils/embedded

2018-11-23 Thread Aymeric Vincent
Jared McNeill  writes:

> You shouldn't set fdtfile in this script because U-Boot already sets
> it. From socfpga_de0_nano_soc_defconfig:
>
> CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"
>
> This way, if you match on the SoC type in this file, you can run on
> any board using this SoC as long as you have a dtb for it. We
> shouldn't have to update the boot script to add new boards.

Thanks, agreed. The board has two names so I'll look into the problem in
the coming days to determine which files should be renamed to what in
order to be consistent.

Regards,
 Aymeric


CVS commit: src/sys/arch/arm/altera

2019-05-20 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Mon May 20 20:14:08 UTC 2019

Modified Files:
src/sys/arch/arm/altera: cycv_dwcmmc.c

Log Message:
use NULL instead of cycv_dwcmmc_card_detect() for sc_card_detect.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/altera/cycv_dwcmmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/altera

2019-05-20 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Mon May 20 20:14:08 UTC 2019

Modified Files:
src/sys/arch/arm/altera: cycv_dwcmmc.c

Log Message:
use NULL instead of cycv_dwcmmc_card_detect() for sc_card_detect.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/altera/cycv_dwcmmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/altera/cycv_dwcmmc.c
diff -u src/sys/arch/arm/altera/cycv_dwcmmc.c:1.1 src/sys/arch/arm/altera/cycv_dwcmmc.c:1.2
--- src/sys/arch/arm/altera/cycv_dwcmmc.c:1.1	Wed Sep 19 17:31:38 2018
+++ src/sys/arch/arm/altera/cycv_dwcmmc.c	Mon May 20 20:14:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_dwcmmc.c,v 1.1 2018/09/19 17:31:38 aymeric Exp $ */
+/* $NetBSD: cycv_dwcmmc.c,v 1.2 2019/05/20 20:14:08 aymeric Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_dwcmmc.c,v 1.1 2018/09/19 17:31:38 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_dwcmmc.c,v 1.2 2019/05/20 20:14:08 aymeric Exp $");
 
 #include 
 #include 
@@ -47,8 +47,6 @@ __KERNEL_RCSID(0, "$NetBSD: cycv_dwcmmc.
 static int	cycv_dwcmmc_match(device_t, cfdata_t, void *);
 static void	cycv_dwcmmc_attach(device_t, device_t, void *);
 
-static int	cycv_dwcmmc_card_detect(struct dwc_mmc_softc *);
-
 struct cycv_dwcmmc_softc {
 	struct dwc_mmc_softc	sc;
 	struct clk		*sc_clk_biu;
@@ -130,7 +128,7 @@ cycv_dwcmmc_attach(device_t parent, devi
 	sc->sc_fifo_reg = FIFO_REG;
 	sc->sc_flags = DWC_MMC_F_USE_HOLD_REG | DWC_MMC_F_DMA;
 
-	sc->sc_card_detect = cycv_dwcmmc_card_detect;
+	sc->sc_card_detect = NULL;
 	sc->sc_write_protect = NULL;
 
 	aprint_naive("\n");
@@ -153,11 +151,3 @@ cycv_dwcmmc_attach(device_t parent, devi
 	}
 	aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 }
-
-static int
-cycv_dwcmmc_card_detect(struct dwc_mmc_softc *sc)
-{
-	/* Card detection is broken on the nanosoc. Pretend it's present. */
-
-	return 0;
-}



CVS commit: src/sys/arch/arm/altera

2019-05-20 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Mon May 20 20:17:25 UTC 2019

Modified Files:
src/sys/arch/arm/altera: cycv_platform.c

Log Message:
make CPU 1 bootstrapping work even if the kernel is not loaded close to PA 0.

More precisely, we used "B cpu_mpstart", which worked for small addresses and
thus does not work in the EFI case.
It is now replaced by a "LDR PC, =cpu_mpstart", which works for arbitrary
addresses.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/altera/cycv_platform.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/altera

2019-05-20 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Mon May 20 20:17:25 UTC 2019

Modified Files:
src/sys/arch/arm/altera: cycv_platform.c

Log Message:
make CPU 1 bootstrapping work even if the kernel is not loaded close to PA 0.

More precisely, we used "B cpu_mpstart", which worked for small addresses and
thus does not work in the EFI case.
It is now replaced by a "LDR PC, =cpu_mpstart", which works for arbitrary
addresses.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/altera/cycv_platform.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/altera/cycv_platform.c
diff -u src/sys/arch/arm/altera/cycv_platform.c:1.10 src/sys/arch/arm/altera/cycv_platform.c:1.11
--- src/sys/arch/arm/altera/cycv_platform.c:1.10	Thu Jan 31 13:06:10 2019
+++ src/sys/arch/arm/altera/cycv_platform.c	Mon May 20 20:17:25 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_platform.c,v 1.10 2019/01/31 13:06:10 skrll Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.11 2019/05/20 20:17:25 aymeric Exp $ */
 
 /* This file is in the public domain. */
 
@@ -7,7 +7,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.10 2019/01/31 13:06:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.11 2019/05/20 20:17:25 aymeric Exp $");
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include 
@@ -92,18 +92,21 @@ cycv_mpstart(void)
 	bus_space_write_4(bst, bsh_scu, SCU_CTL,
 		bus_space_read_4(bst, bsh_scu, SCU_CTL) | SCU_CTL_SCU_ENA);
 
-	const uint32_t startfunc = (uint32_t) KERN_VTOPHYS((vaddr_t)cpu_mpstart);
+	const uint32_t startfunc =
+		(uint32_t) KERN_VTOPHYS((vaddr_t) cpu_mpstart);
 
 	/*
-	 * We place a "B cortex_mpstart" at address 0 in order to bootstrap
+	 * We place a "LDR PC, =cpu_mpstart" at address 0 in order to bootstrap
 	 * CPU 1. We can't use the similar feature of the Boot ROM because
-	 * it was unmapped by u-boot in favor of the SDRAM. Plus the dtb is
-	 * stored very low in RAM so we can't re-map the Boot ROM easily.
+	 * it was unmapped by u-boot in favor of the SDRAM.
 	 */
 	pmap_map_chunk(kernel_l1pt.pv_va, CYCV_SDRAM_VBASE, CYCV_SDRAM_BASE,
 		L1_S_SIZE, VM_PROT_READ|VM_PROT_WRITE, PMAP_NOCACHE);
-	*(volatile uint32_t *) CYCV_SDRAM_VBASE =
-	htole32(0xea00 | ((startfunc - 8 - 0x0) >> 2));
+
+	/* 0: LDR PC, [PC, #0x18] -> loads address at 0x20 into PC */
+	*(volatile uint32_t *) CYCV_SDRAM_VBASE = htole32(0xe59ff018);
+	*(volatile uint32_t *) (CYCV_SDRAM_VBASE + 0x20) = startfunc;
+
 	pmap_unmap_chunk(kernel_l1pt.pv_va, CYCV_SDRAM_VBASE, L1_S_SIZE);
 
 	bus_space_write_4(bst, bsh_rst, CYCV_RSTMGR_MPUMODRST,



CVS commit: src/sys/arch/arm/dts

2019-10-22 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Tue Oct 22 18:43:14 UTC 2019

Modified Files:
src/sys/arch/arm/dts: socfpga_cyclone5_de0_nano_soc.dts

Log Message:
Disable private timer whose new driver clashes with the global timer's one.

Stopgap measure to make the DE0 Nano Soc work again, targeted for netbsd-9
pullup. We'll see later if we switch to using the private timer.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/dts

2019-10-22 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Tue Oct 22 18:43:14 UTC 2019

Modified Files:
src/sys/arch/arm/dts: socfpga_cyclone5_de0_nano_soc.dts

Log Message:
Disable private timer whose new driver clashes with the global timer's one.

Stopgap measure to make the DE0 Nano Soc work again, targeted for netbsd-9
pullup. We'll see later if we switch to using the private timer.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
diff -u src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.2 src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.3
--- src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.2	Tue Jan 22 15:30:57 2019
+++ src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts	Tue Oct 22 18:43:14 2019
@@ -4,6 +4,10 @@
 
 / {
 	soc {
+		timer@fffec600 {
+			status = "disabled";
+		};
+
 		gtimer@fffec200 {
 			compatible = "arm,cortex-a9-global-timer";
 			reg = <0xfffec200 0x20>;