CVS commit: src/sys/arch/evbarm/fdt

2023-03-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  5 22:04:54 UTC 2023

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Locate wedges as boot device and also match a partition GUID.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.100 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.101
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.100	Sun Feb  5 22:42:39 2023
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Sun Mar  5 22:04:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.100 2023/02/05 22:42:39 mrg Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.101 2023/03/05 22:04:54 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.100 2023/02/05 22:42:39 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.101 2023/03/05 22:04:54 mlelstv Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -743,9 +743,6 @@ fdt_detect_root_device(device_t dev)
 {
 	int error, len;
 
-	if (booted_device)
-		return;
-
 	const int chosen = OF_finddevice("/chosen");
 	if (chosen < 0)
 		return;
@@ -801,8 +798,15 @@ fdt_detect_root_device(device_t dev)
 		const struct uuid *guid =
 		fdtbus_get_prop(chosen, "netbsd,gpt-guid", );
 
-		if (guid != NULL && len == 16)
-			booted_device = dev;
+		if (guid == NULL || len != 16)
+			return;
+
+		char guidstr[UUID_STR_LEN];
+		uuid_snprintf(guidstr, sizeof(guidstr), guid);
+
+		device_t dv = dkwedge_find_by_wname(guidstr);
+		if (dv != NULL)
+			booted_device = dv;
 
 		return;
 	}
@@ -895,8 +899,7 @@ fdt_cpu_rootconf(void)
 		if (device_class(dev) != DV_DISK)
 			continue;
 
-		if (device_is_a(dev, "ld") || device_is_a(dev, "sd") || device_is_a(dev, "wd"))
-			fdt_detect_root_device(dev);
+		fdt_detect_root_device(dev);
 
 		if (booted_device != NULL)
 			break;



CVS commit: src/sys/arch/evbarm/fdt

2023-03-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Mar  5 22:04:54 UTC 2023

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Locate wedges as boot device and also match a partition GUID.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 21 05:51:08 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Fix build after previous.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 21 05:51:08 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Fix build after previous.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.97 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.98
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.97	Thu Oct 20 07:16:19 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Fri Oct 21 05:51:08 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.98 2022/10/21 05:51:08 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.98 2022/10/21 05:51:08 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -609,7 +609,7 @@ initarm(void *arg)
 	fdt_probe_rndseed(_start, _end);
 	fdt_probe_efirng(_start, _end);
 
-	fdt_memory_remove_reserved(mem_start, mem_end);
+	fdt_memory_remove_reserved(memory_start, memory_end);
 
 	/*
 	 * Populate bootconfig structure for the benefit of dodumpsys



CVS commit: src/sys/arch/evbarm/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:16:20 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Remove an empty line


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.96 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.97
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.96	Thu Oct 20 07:13:45 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Thu Oct 20 07:16:19 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -662,7 +662,6 @@ initarm(void *arg)
 		"loading in freelist %d\n", spa, epa, VM_FREELIST_DEFAULT);
 
 		uvm_page_physload(spg, epg, spg, epg, VM_FREELIST_DEFAULT);
-
 	}
 
 	return sp;



CVS commit: src/sys/arch/evbarm/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:16:20 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Remove an empty line


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:13:45 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Move the fdt_memory_remove_reserved call out of fdt_build_bootconfig

NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.95 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.96
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.95	Fri Sep 30 06:39:54 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Thu Oct 20 07:13:45 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -240,8 +240,6 @@ fdt_build_bootconfig(uint64_t mem_start,
 	uint64_t addr, size;
 	int index;
 
-	fdt_memory_remove_reserved(mem_start, mem_end);
-
 	const uint64_t initrd_size =
 	round_page(initrd_end) - trunc_page(initrd_start);
 	if (initrd_size > 0)
@@ -611,6 +609,8 @@ initarm(void *arg)
 	fdt_probe_rndseed(_start, _end);
 	fdt_probe_efirng(_start, _end);
 
+	fdt_memory_remove_reserved(mem_start, mem_end);
+
 	/*
 	 * Populate bootconfig structure for the benefit of dodumpsys
 	 */



CVS commit: src/sys/arch/evbarm/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:13:45 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Move the fdt_memory_remove_reserved call out of fdt_build_bootconfig

NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 30 06:39:55 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Actually release the VA in fdt_unmap_range


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.94 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.95
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.94	Fri Sep 30 06:36:28 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Fri Sep 30 06:39:54 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.94 2022/09/30 06:36:28 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.94 2022/09/30 06:36:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -342,9 +342,12 @@ fdt_unmap_range(void *ptr, uint64_t size
 	const char *start = ptr, *end = start + size;
 	const vaddr_t startva = trunc_page((vaddr_t)(uintptr_t)start);
 	const vaddr_t endva = round_page((vaddr_t)(uintptr_t)end);
+	const vsize_t sz = endva - startva;
 
-	pmap_kremove(startva, endva - startva);
+	pmap_kremove(startva, sz);
 	pmap_update(pmap_kernel());
+
+	uvm_km_free(kernel_map, startva, sz, UVM_KMF_VAONLY);
 }
 
 static void



CVS commit: src/sys/arch/evbarm/fdt

2022-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 30 06:39:55 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Actually release the VA in fdt_unmap_range


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 30 06:36:28 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.93 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.94
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.93	Wed Sep 28 05:54:24 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Fri Sep 30 06:36:28 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.93 2022/09/28 05:54:24 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.94 2022/09/30 06:36:28 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.93 2022/09/28 05:54:24 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.94 2022/09/30 06:36:28 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -322,7 +322,7 @@ fdt_map_range(uint64_t start, uint64_t e
 
 	const vaddr_t voff = start & PAGE_MASK;
 
-	va = uvm_km_alloc(kernel_map, *psize, 0, UVM_KMF_VAONLY|UVM_KMF_NOWAIT);
+	va = uvm_km_alloc(kernel_map, *psize, 0, UVM_KMF_VAONLY | UVM_KMF_NOWAIT);
 	if (va == 0) {
 		printf("Failed to allocate VA for %s\n", purpose);
 		return NULL;
@@ -330,7 +330,7 @@ fdt_map_range(uint64_t start, uint64_t e
 	ptr = (void *)(va + voff);
 
 	for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE)
-		pmap_kenter_pa(va, pa, VM_PROT_READ|VM_PROT_WRITE, 0);
+		pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, 0);
 	pmap_update(pmap_kernel());
 
 	return ptr;



CVS commit: src/sys/arch/evbarm/fdt

2022-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Sep 30 06:36:28 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-09-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 28 05:54:24 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.92 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.93
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.92	Wed Sep 28 05:49:15 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Wed Sep 28 05:54:24 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.92 2022/09/28 05:49:15 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.93 2022/09/28 05:54:24 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.92 2022/09/28 05:49:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.93 2022/09/28 05:54:24 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -43,31 +43,34 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep.
 #include "wsdisplay.h"
 
 #include 
-#include 
-#include 
+#include 
+
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
+#include 
+#include 
+#include 
 #include 
-#include 
-#include 
 #include 
-#include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
 #include 
 #include 
@@ -75,8 +78,6 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep.
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/evbarm/fdt

2022-09-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 28 05:54:24 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-09-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 28 05:49:15 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-09-27 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 28 05:49:15 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.91 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.92
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.91	Sat Apr  2 11:16:07 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Wed Sep 28 05:49:15 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.91 2022/04/02 11:16:07 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.92 2022/09/28 05:49:15 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.91 2022/04/02 11:16:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.92 2022/09/28 05:49:15 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -548,7 +548,7 @@ initarm(void *arg)
 
 #if BYTE_ORDER == BIG_ENDIAN
 	/*
-	 * Most boards are configured to little-endian mode in initial, and
+	 * Most boards are configured to little-endian mode initially, and
 	 * switched to big-endian mode after kernel is loaded. In this case,
 	 * framebuffer seems byte-swapped to CPU. Override FDT to let
 	 * drivers know.



CVS commit: src/sys/arch/evbarm/fdt

2022-03-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 19 09:55:30 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Improve a VPRINTF


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.88 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.89
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.88	Wed Mar  9 10:06:36 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Sat Mar 19 09:55:30 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.88 2022/03/09 10:06:36 mrg Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.89 2022/03/19 09:55:30 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.88 2022/03/09 10:06:36 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.89 2022/03/19 09:55:30 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -475,8 +475,8 @@ fdt_map_efi_runtime(const char *prop, en
 		const paddr_t pa = be64toh(map[0]);
 		const vaddr_t va = be64toh(map[1]);
 		const size_t sz = be64toh(map[2]);
-		VPRINTF("%s: %s %" PRIxPADDR "-%" PRIxVADDR "(%" PRIxVADDR
-		"-%" PRIxVSIZE "\n", __func__, prop, pa, pa + sz - 1,
+		VPRINTF("%s: %s %#" PRIxPADDR "-%#" PRIxVADDR " (%#" PRIxVADDR
+		"-%#" PRIxVSIZE ")\n", __func__, prop, pa, pa + sz - 1,
 		va, va + sz - 1);
 		arm_efirt_md_map_range(va, pa, sz, type);
 		map += 3;



CVS commit: src/sys/arch/evbarm/fdt

2022-03-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 19 09:55:30 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Improve a VPRINTF


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2022-03-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar  9 10:06:36 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
in fdt_cpu_rootconf(), return without doing anything (like setting
"root=something" in boot_args, or booted_device), if booted_device
is already set to something.

this makes raidframe softroot work on evbarm.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.87 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.88
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.87	Fri Mar 19 10:23:34 2021
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Wed Mar  9 10:06:36 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.87 2021/03/19 10:23:34 jmcneill Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.88 2022/03/09 10:06:36 mrg Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.87 2021/03/19 10:23:34 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.88 2022/03/09 10:06:36 mrg Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -879,6 +879,9 @@ fdt_cpu_rootconf(void)
 	deviter_t di;
 	char *ptr;
 
+	if (booted_device != NULL)
+		return;
+
 	for (dev = deviter_first(, 0); dev; dev = deviter_next()) {
 		if (device_class(dev) != DV_DISK)
 			continue;



CVS commit: src/sys/arch/evbarm/fdt

2022-03-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar  9 10:06:36 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
in fdt_cpu_rootconf(), return without doing anything (like setting
"root=something" in boot_args, or booted_device), if booted_device
is already set to something.

this makes raidframe softroot work on evbarm.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2019-07-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jul 15 08:44:33 UTC 2019

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Fix and improve a VPRINTF


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt

2019-07-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jul 15 08:44:33 UTC 2019

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Fix and improve a VPRINTF


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/fdt/fdt_machdep.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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.62 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.63
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.62	Wed Apr 24 06:37:31 2019
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Mon Jul 15 08:44:33 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.62 2019/04/24 06:37:31 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.63 2019/07/15 08:44:33 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.62 2019/04/24 06:37:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.63 2019/07/15 08:44:33 skrll Exp $");
 
 #include "opt_machdep.h"
 #include "opt_bootconfig.h"
@@ -571,9 +571,11 @@ initarm(void *arg)
 		const paddr_t spg = atop(spa);
 		const paddr_t epg = atop(epa);
 
+		VPRINTF(" start %08lx  end %08lx... "
+		"loading in freelist %d\n", spa, epa, VM_FREELIST_DEFAULT);
+
 		uvm_page_physload(spg, epg, spg, epg, VM_FREELIST_DEFAULT);
 
-		VPRINTF("   start %08lx  end %08lx", ptoa(spa), ptoa(epa));
 	}
 
 	return sp;



Re: CVS commit: src/sys/arch/evbarm/fdt

2018-09-17 Thread Christos Zoulas
On Sep 17,  8:25am, scole_m...@gmx.com (scole_mail) wrote:
-- Subject: Re: CVS commit: src/sys/arch/evbarm/fdt

| chris...@astron.com (Christos Zoulas) writes:
| >
| > This is why we have __nothing
| >
| 
| Should this be documented in src/share/man/man3/attribute.3 ?
| 
| Wish I had known about this man page earlier...

It is not an attribute per say, and there are other macros that
are not attributes in cdefs.h that are not documented. We should
either add them to this page or create a new one with a more
appropriate name.

christos


Re: CVS commit: src/sys/arch/evbarm/fdt

2018-09-17 Thread scole_mail
chris...@astron.com (Christos Zoulas) writes:
>
> This is why we have __nothing
>

Should this be documented in src/share/man/man3/attribute.3 ?

Wish I had known about this man page earlier...

Thanks


Re: CVS commit: src/sys/arch/evbarm/fdt

2018-09-16 Thread Christos Zoulas
In article <20180916112430.0f...@cvs.netbsd.org>,
Nick Hudson  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  skrll
>Date:  Sun Sep 16 11:24:29 UTC 2018
>
>Modified Files:
>   src/sys/arch/evbarm/fdt: fdt_machdep.c
>
>Log Message:
>Use do { } while (/* CONSTCOND */ 0) for nop VPRINTF

This is why we have __nothing

christos