CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: martin Date: Mon Apr 24 16:32:54 UTC 2023 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Fix DEVMAP_FLAGS, patch from Nick. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.174 src/sys/arch/arm/include/arm32/pmap.h:1.175 --- src/sys/arch/arm/include/arm32/pmap.h:1.174 Thu Apr 20 08:28:03 2023 +++ src/sys/arch/arm/include/arm32/pmap.h Mon Apr 24 16:32:54 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.174 2023/04/20 08:28:03 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.175 2023/04/24 16:32:54 martin Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -207,7 +207,7 @@ union pmap_cache_state { #define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET) #define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE) -#define DEVMAP_FLAGS PTE_DEV +#define DEVMAP_FLAGS PMAP_DEV /* * The pmap structure itself
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: martin Date: Mon Apr 24 16:32:54 UTC 2023 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Fix DEVMAP_FLAGS, patch from Nick. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sat Oct 16 07:04:36 UTC 2021 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: pm_remove_all is a shared field so move it out the #ifdefs To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.170 src/sys/arch/arm/include/arm32/pmap.h:1.171 --- src/sys/arch/arm/include/arm32/pmap.h:1.170 Tue May 4 09:02:21 2021 +++ src/sys/arch/arm/include/arm32/pmap.h Sat Oct 16 07:04:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.170 2021/05/04 09:02:21 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.171 2021/10/16 07:04:36 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -238,10 +238,10 @@ struct pmap { struct l2_dtable *pm_l2[L2_SIZE]; struct pmap_statistics pm_stats; LIST_ENTRY(pmap) pm_list; + bool pm_remove_all; #ifdef ARM_MMU_EXTENDED pd_entry_t *pm_l1; paddr_t pm_l1_pa; - bool pm_remove_all; #ifdef MULTIPROCESSOR kcpuset_t *pm_onproc; kcpuset_t *pm_active; @@ -255,7 +255,6 @@ struct pmap { union pmap_cache_state pm_cstate; uint8_t pm_domain; bool pm_activated; - bool pm_remove_all; #endif };
Re: CVS commit: src/sys/arch/arm/include/arm32
"Rin Okuyama" wrote: > Module Name: src > Committed By: rin > Date: Sun May 30 07:20:00 UTC 2021 > > Modified Files: > > src/sys/arch/arm/include/arm32: param.h > > Log Message: > > Include opt_param.h for MSGBUFSIZE ifdef _KERNEL_OPT. Thanks Rin! I thought I had checked all the ways MSGBUFSIZE was pulled in. Cheers, Simon.
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: rin Date: Sun May 30 07:20:00 UTC 2021 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Include opt_param.h for MSGBUFSIZE ifdef _KERNEL_OPT. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/include/arm32/param.h 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/include/arm32
Module Name:src Committed By: rin Date: Sun May 30 07:20:00 UTC 2021 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Include opt_param.h for MSGBUFSIZE ifdef _KERNEL_OPT. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/include/arm32/param.h 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/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.33 src/sys/arch/arm/include/arm32/param.h:1.34 --- src/sys/arch/arm/include/arm32/param.h:1.33 Fri Jul 10 12:25:09 2020 +++ src/sys/arch/arm/include/arm32/param.h Sun May 30 07:20:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.33 2020/07/10 12:25:09 skrll Exp $ */ +/* $NetBSD: param.h,v 1.34 2021/05/30 07:20:00 rin Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -38,6 +38,7 @@ #ifdef _KERNEL_OPT #include "opt_arm32_pmap.h" #include "opt_kasan.h" +#include "opt_param.h" #endif /*
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Tue May 4 09:02:21 UTC 2021 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Provide pte_{value,valid_p} To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.169 src/sys/arch/arm/include/arm32/pmap.h:1.170 --- src/sys/arch/arm/include/arm32/pmap.h:1.169 Fri Oct 30 18:54:36 2020 +++ src/sys/arch/arm/include/arm32/pmap.h Tue May 4 09:02:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.169 2020/10/30 18:54:36 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.170 2021/05/04 09:02:21 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -627,6 +627,20 @@ l2pte_reset(pt_entry_t *ptep) #define pmap_pte_v(pte) l2pte_valid_p(*(pte)) #define pmap_pte_pa(pte) l2pte_pa(*(pte)) +static inline uint32_t +pte_value(pt_entry_t pte) +{ + return pte; +} + +static inline bool +pte_valid_p(pt_entry_t pte) +{ + + return l2pte_valid_p(pte); +} + + /* Size of the kernel part of the L1 page table */ #define KERNEL_PD_SIZE \ (L1_TABLE_SIZE - (KERNEL_BASE >> L1_S_SHIFT) * sizeof(pd_entry_t))
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Tue May 4 09:02:21 UTC 2021 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Provide pte_{value,valid_p} To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: he Date: Thu Oct 8 12:49:06 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Bump MAXDSIZ from 1536 to 1836. 1836 is 2048-128(MAXTSIZ)-64(MAXSSIZ). Gives us a fighting chance to build rust natively. OK'ed by skrll@ To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.55 src/sys/arch/arm/include/arm32/vmparam.h:1.56 --- src/sys/arch/arm/include/arm32/vmparam.h:1.55 Sat Aug 29 06:49:53 2020 +++ src/sys/arch/arm/include/arm32/vmparam.h Thu Oct 8 12:49:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.55 2020/08/29 06:49:53 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.56 2020/10/08 12:49:06 he Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -70,7 +70,7 @@ #define DFLDSIZ (384*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (1536*1024*1024) /* max data size */ +#define MAXDSIZ (1856*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (4*1024*1024) /* initial stack size limit */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: he Date: Thu Oct 8 12:49:06 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Bump MAXDSIZ from 1536 to 1836. 1836 is 2048-128(MAXTSIZ)-64(MAXSSIZ). Gives us a fighting chance to build rust natively. OK'ed by skrll@ To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sat Aug 29 06:49:53 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Cover the full kernel address range in KASAN To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.54 src/sys/arch/arm/include/arm32/vmparam.h:1.55 --- src/sys/arch/arm/include/arm32/vmparam.h:1.54 Sat Jul 11 06:46:19 2020 +++ src/sys/arch/arm/include/arm32/vmparam.h Sat Aug 29 06:49:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.54 2020/07/11 06:46:19 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.55 2020/08/29 06:49:53 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -127,7 +127,7 @@ #ifdef KASAN #define VM_KERNEL_KASAN_BASE 0xc000 -#define VM_KERNEL_KASAN_SIZE (VM_KERNEL_VM_SIZE >> KASAN_SHADOW_SCALE_SHIFT) +#define VM_KERNEL_KASAN_SIZE (VM_KERNEL_ADDR_SIZE >> KASAN_SHADOW_SCALE_SHIFT) #define VM_KERNEL_KASAN_END (VM_KERNEL_KASAN_BASE + VM_KERNEL_KASAN_SIZE) #define VM_KERNEL_VM_END VM_KERNEL_KASAN_BASE #else @@ -143,6 +143,7 @@ #define VM_KERNEL_VM_BASE 0x9000 #endif +#define VM_KERNEL_ADDR_SIZE (VM_KERNEL_VM_END - KERNEL_BASE) #define VM_KERNEL_VM_SIZE (VM_KERNEL_VM_END - VM_KERNEL_VM_BASE) #define VM_KERNEL_IO_ADDRESS 0xf000
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Aug 29 06:49:53 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Cover the full kernel address range in KASAN To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sat Jul 11 06:46:19 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Fix ARM builds To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.53 src/sys/arch/arm/include/arm32/vmparam.h:1.54 --- src/sys/arch/arm/include/arm32/vmparam.h:1.53 Fri Jul 10 15:12:33 2020 +++ src/sys/arch/arm/include/arm32/vmparam.h Sat Jul 11 06:46:19 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.53 2020/07/10 15:12:33 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.54 2020/07/11 06:46:19 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -38,7 +38,9 @@ #ifndef _ARM_ARM32_VMPARAM_H_ #define _ARM_ARM32_VMPARAM_H_ +#if defined(_KERNEL_OPT) #include "opt_kasan.h" +#endif /* * Virtual Memory parameters common to all arm32 platforms. @@ -96,6 +98,7 @@ #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) KERNEL_BASE) #define VM_MAX_KERNEL_ADDRESS ((vaddr_t) -(PAGE_SIZE+1)) +#if defined(_KERNEL) // AddressSanitizer dedicates 1/8 of kernel memory to its shadow memory (e.g. // 128MB to cover 1GB for ARM) and uses a special KVA range for the shadow // address corresponding to a kernel memory address. @@ -144,5 +147,6 @@ #define VM_KERNEL_IO_ADDRESS 0xf000 #define VM_KERNEL_IO_SIZE (VM_MAX_KERNEL_ADDRESS - VM_KERNEL_IO_ADDRESS) +#endif #endif /* _ARM_ARM32_VMPARAM_H_ */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Jul 11 06:46:19 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Fix ARM builds To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Fri Jul 10 15:12:33 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Remove stray #else / #endif block in KASAN support commit To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Fri Jul 10 15:12:33 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Remove stray #else / #endif block in KASAN support commit To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.52 src/sys/arch/arm/include/arm32/vmparam.h:1.53 --- src/sys/arch/arm/include/arm32/vmparam.h:1.52 Fri Jul 10 12:45:15 2020 +++ src/sys/arch/arm/include/arm32/vmparam.h Fri Jul 10 15:12:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.52 2020/07/10 12:45:15 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.53 2020/07/10 15:12:33 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -139,10 +139,6 @@ #else #define VM_KERNEL_VM_BASE 0x9000 #endif -#else -#ifdef KASAN -#error KASAN is unsupported on pre-ARMv6 -#endif #define VM_KERNEL_VM_SIZE (VM_KERNEL_VM_END - VM_KERNEL_VM_BASE)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jul 8 07:59:49 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Remove an unnecessary #ifdef To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.47 src/sys/arch/arm/include/arm32/vmparam.h:1.48 --- src/sys/arch/arm/include/arm32/vmparam.h:1.47 Mon Jan 13 20:36:44 2020 +++ src/sys/arch/arm/include/arm32/vmparam.h Wed Jul 8 07:59:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.47 2020/01/13 20:36:44 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.48 2020/07/08 07:59:49 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -88,11 +88,7 @@ * Mach derived constants */ #define VM_MIN_ADDRESS ((vaddr_t) PAGE_SIZE) -#ifdef ARM_MMU_EXTENDED -#define VM_MAXUSER_ADDRESS ((vaddr_t) 0x8000 - PAGE_SIZE) -#else #define VM_MAXUSER_ADDRESS ((vaddr_t) KERNEL_BASE - PAGE_SIZE) -#endif #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) KERNEL_BASE)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jul 8 07:59:49 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Remove an unnecessary #ifdef To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Jul 8 06:58:33 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Define USPACE in terms of UPAGES (not the other way around) now that NBPG is fixed at 4K To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/include/arm32/param.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Jul 8 06:58:33 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Define USPACE in terms of UPAGES (not the other way around) now that NBPG is fixed at 4K To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/include/arm32/param.h 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/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.31 src/sys/arch/arm/include/arm32/param.h:1.32 --- src/sys/arch/arm/include/arm32/param.h:1.31 Wed Jul 8 06:54:57 2020 +++ src/sys/arch/arm/include/arm32/param.h Wed Jul 8 06:58:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.31 2020/07/08 06:54:57 skrll Exp $ */ +/* $NetBSD: param.h,v 1.32 2020/07/08 06:58:33 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -54,8 +54,8 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ -#define USPACE 8192 /* total size of u-area */ -#define UPAGES (USPACE / NBPG) /* pages of u-area */ +#define UPAGES 2 +#define USPACE (UPAGES * NBPG) /* total size of u-area */ #ifndef MSGBUFSIZE #define MSGBUFSIZE 16384 /* default message buffer size */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jul 8 06:54:57 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/include/arm32/param.h 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/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.30 src/sys/arch/arm/include/arm32/param.h:1.31 --- src/sys/arch/arm/include/arm32/param.h:1.30 Thu Feb 13 07:40:24 2020 +++ src/sys/arch/arm/include/arm32/param.h Wed Jul 8 06:54:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.30 2020/02/13 07:40:24 skrll Exp $ */ +/* $NetBSD: param.h,v 1.31 2020/07/08 06:54:57 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -36,7 +36,7 @@ #define _ARM_ARM32_PARAM_H_ #ifdef _KERNEL_OPT -# include "opt_arm32_pmap.h" +#include "opt_arm32_pmap.h" #endif /*
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jul 8 06:54:57 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/include/arm32/param.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sat Jul 4 07:02:35 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: Protect with #ifdef _KERNEL To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sat Jul 4 07:02:35 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: Protect with #ifdef _KERNEL To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32/machdep.h diff -u src/sys/arch/arm/include/arm32/machdep.h:1.33 src/sys/arch/arm/include/arm32/machdep.h:1.34 --- src/sys/arch/arm/include/arm32/machdep.h:1.33 Thu Mar 5 15:18:54 2020 +++ src/sys/arch/arm/include/arm32/machdep.h Sat Jul 4 07:02:35 2020 @@ -1,8 +1,10 @@ -/* $NetBSD: machdep.h,v 1.33 2020/03/05 15:18:54 riastradh Exp $ */ +/* $NetBSD: machdep.h,v 1.34 2020/07/04 07:02:35 skrll Exp $ */ #ifndef _ARM32_MACHDEP_H_ #define _ARM32_MACHDEP_H_ +#ifdef _KERNEL + /* Define various stack sizes in pages */ #ifndef IRQ_STACK_SIZE #define IRQ_STACK_SIZE 1 @@ -103,4 +105,7 @@ void set_spl_masks(void); #ifdef DIAGNOSTIC void dump_spl_masks(void); #endif -#endif + +#endif /* _KERNEL */ + +#endif /* _ARM32_MACHDEP_H_ */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Fri Jul 3 06:49:26 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Consistency...#define To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Fri Jul 3 06:49:26 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Consistency...#define To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.167 src/sys/arch/arm/include/arm32/pmap.h:1.168 --- src/sys/arch/arm/include/arm32/pmap.h:1.167 Sat Apr 18 11:00:38 2020 +++ src/sys/arch/arm/include/arm32/pmap.h Fri Jul 3 06:49:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.167 2020/04/18 11:00:38 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.168 2020/07/03 06:49:26 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -84,20 +84,20 @@ #endif #ifdef ARM_MMU_EXTENDED -#define PMAP_HWPAGEWALKER 1 -#define PMAP_TLB_MAX 1 +#define PMAP_HWPAGEWALKER 1 +#define PMAP_TLB_MAX 1 #if PMAP_TLB_MAX > 1 -#define PMAP_TLB_NEED_SHOOTDOWN 1 +#define PMAP_TLB_NEED_SHOOTDOWN 1 #endif -#define PMAP_TLB_FLUSH_ASID_ON_RESET (arm_has_tlbiasid_p) -#define PMAP_TLB_NUM_PIDS 256 -#define cpu_set_tlb_info(ci, ti)((void)((ci)->ci_tlb_info = (ti))) +#define PMAP_TLB_FLUSH_ASID_ON_RESET (arm_has_tlbiasid_p) +#define PMAP_TLB_NUM_PIDS 256 +#define cpu_set_tlb_info(ci, ti)((void)((ci)->ci_tlb_info = (ti))) #if PMAP_TLB_MAX > 1 -#define cpu_tlb_info(ci) ((ci)->ci_tlb_info) +#define cpu_tlb_info(ci) ((ci)->ci_tlb_info) #else -#define cpu_tlb_info(ci) (_tlb0_info) +#define cpu_tlb_info(ci) (_tlb0_info) #endif -#define pmap_md_tlb_asid_max() (PMAP_TLB_NUM_PIDS - 1) +#define pmap_md_tlb_asid_max() (PMAP_TLB_NUM_PIDS - 1) #include #include @@ -143,7 +143,7 @@ * three of these to map their whole working set. */ #define L2_BUCKET_XLOG2 (L1_S_SHIFT) -#define L2_BUCKET_XSIZE (1 << L2_BUCKET_XLOG2) +#define L2_BUCKET_XSIZE (1 << L2_BUCKET_XLOG2) #define L2_BUCKET_LOG2 4 #define L2_BUCKET_SIZE (1 << L2_BUCKET_LOG2) @@ -160,9 +160,9 @@ * ARMv6 is physically-tagged but all others are virtually-tagged. */ #if (ARM_MMU_V6 + ARM_MMU_V7) > 0 -#define PMAP_CACHE_VIPT +#define PMAP_CACHE_VIPT #else -#define PMAP_CACHE_VIVT +#define PMAP_CACHE_VIVT #endif #ifndef _LOCORE @@ -356,13 +356,13 @@ extern int arm_poolpage_vmfreelist; #define pmap_copy(dp, sp, da, l, sa) /* nothing */ -#define pmap_phys_address(ppn) (arm_ptob((ppn))) +#define pmap_phys_address(ppn) (arm_ptob((ppn))) u_int arm32_mmap_flags(paddr_t); -#define ARM32_MMAP_WRITECOMBINE 0x4000 -#define ARM32_MMAP_CACHEABLE 0x2000 -#define ARM_MMAP_WRITECOMBINE ARM32_MMAP_WRITECOMBINE -#define ARM_MMAP_CACHEABLE ARM32_MMAP_CACHEABLE -#define pmap_mmap_flags(ppn) arm32_mmap_flags(ppn) +#define ARM32_MMAP_WRITECOMBINE 0x4000 +#define ARM32_MMAP_CACHEABLE 0x2000 +#define ARM_MMAP_WRITECOMBINE ARM32_MMAP_WRITECOMBINE +#define ARM_MMAP_CACHEABLE ARM32_MMAP_CACHEABLE +#define pmap_mmap_flags(ppn) arm32_mmap_flags(ppn) #define PMAP_PTE 0x1000 /* kenter_pa */ #define PMAP_DEV 0x2000 /* kenter_pa */ @@ -377,7 +377,7 @@ bool pmap_remove_all(pmap_t); bool pmap_extract(pmap_t, vaddr_t, paddr_t *); #define PMAP_NEED_PROCWR -#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ +#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ #define PMAP_ENABLE_PMAP_KMPAGE /* enable the PMAP_KMPAGE flag */ #if (ARM_MMU_V6 + ARM_MMU_V7) > 0 @@ -426,7 +426,7 @@ void pmap_devmap_register(const struct p * Special page zero routine for use by the idle loop (no cache cleans). */ bool pmap_pageidlezero(paddr_t); -#define PMAP_PAGEIDLEZERO(pa) pmap_pageidlezero((pa)) +#define PMAP_PAGEIDLEZERO(pa) pmap_pageidlezero((pa)) #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS /* @@ -546,14 +546,14 @@ pmap_ptesync(pt_entry_t *ptep, size_t cn #define PTE_SYNC(ptep) pmap_ptesync((ptep), PAGE_SIZE / L2_S_SIZE) #define PTE_SYNC_RANGE(ptep, cnt) pmap_ptesync((ptep), (cnt)) -#define l1pte_valid_p(pde) ((pde) != 0) -#define l1pte_section_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_S) -#define l1pte_supersection_p(pde) (l1pte_section_p(pde) \ +#define l1pte_valid_p(pde) ((pde) != 0) +#define l1pte_section_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_S) +#define l1pte_supersection_p(pde) (l1pte_section_p(pde) \ && ((pde) & L1_S_V6_SUPER) != 0) -#define l1pte_page_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_C) -#define l1pte_fpage_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_F) -#define l1pte_pa(pde) ((pde) & L1_C_ADDR_MASK) -#define l1pte_index(v) ((vaddr_t)(v) >> L1_S_SHIFT) +#define l1pte_page_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_C) +#define l1pte_fpage_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_F) +#define l1pte_pa(pde) ((pde) & L1_C_ADDR_MASK) +#define l1pte_index(v) ((vaddr_t)(v) >> L1_S_SHIFT) static inline void
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: joerg Date: Mon May 4 18:36:24 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pte.h Log Message: Prevent double definition of pt_entry_t from machine/param.h To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/arm32/pte.h 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/include/arm32/pte.h diff -u src/sys/arch/arm/include/arm32/pte.h:1.22 src/sys/arch/arm/include/arm32/pte.h:1.23 --- src/sys/arch/arm/include/arm32/pte.h:1.22 Sun Feb 2 09:19:48 2020 +++ src/sys/arch/arm/include/arm32/pte.h Mon May 4 18:36:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.22 2020/02/02 09:19:48 skrll Exp $ */ +/* $NetBSD: pte.h,v 1.23 2020/05/04 18:36:24 joerg Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -89,7 +89,11 @@ #ifndef _LOCORE typedef uint32_t pd_entry_t; /* L1 table entry */ -typedef uint32_t pt_entry_t; /* L2 table entry */ +#ifndef __BSD_PTENTRY_T__ +#define __BSD_PTENTRY_T__ +typedef uint32_t pt_entry_t; +#define PRIxPTE PRIx32 +#endif #endif /* _LOCORE */ #define L1_SS_SIZE 0x0100 /* 16M */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: joerg Date: Mon May 4 18:36:24 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pte.h Log Message: Prevent double definition of pt_entry_t from machine/param.h To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/arm32/pte.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Mar 29 21:34:33 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Don't define pt_entry_t if _LOCORE Reported by Patrick Welche To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Mar 29 21:34:33 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Don't define pt_entry_t if _LOCORE Reported by Patrick Welche To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.165 src/sys/arch/arm/include/arm32/pmap.h:1.166 --- src/sys/arch/arm/include/arm32/pmap.h:1.165 Sun Mar 29 09:01:32 2020 +++ src/sys/arch/arm/include/arm32/pmap.h Sun Mar 29 21:34:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.165 2020/03/29 09:01:32 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.166 2020/03/29 21:34:33 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -1184,14 +1184,14 @@ do { \ (pg)->mdpage.k_mappings = 0; \ } while (/*CONSTCOND*/0) -#endif /* !_LOCORE */ - #ifndef __BSD_PTENTRY_T__ #define __BSD_PTENTRY_T__ typedef uint32_t pt_entry_t; #define PRIxPTE PRIx32 #endif +#endif /* !_LOCORE */ + #endif /* _KERNEL */ #endif /* _ARM32_PMAP_H_ */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sun Mar 29 09:01:32 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Provide a pt_entry_t and PRIxPTE To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.164 src/sys/arch/arm/include/arm32/pmap.h:1.165 --- src/sys/arch/arm/include/arm32/pmap.h:1.164 Sat Mar 14 14:05:42 2020 +++ src/sys/arch/arm/include/arm32/pmap.h Sun Mar 29 09:01:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.164 2020/03/14 14:05:42 ad Exp $ */ +/* $NetBSD: pmap.h,v 1.165 2020/03/29 09:01:32 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -1186,6 +1186,12 @@ do { \ #endif /* !_LOCORE */ +#ifndef __BSD_PTENTRY_T__ +#define __BSD_PTENTRY_T__ +typedef uint32_t pt_entry_t; +#define PRIxPTE PRIx32 +#endif + #endif /* _KERNEL */ #endif /* _ARM32_PMAP_H_ */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sun Mar 29 09:01:32 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Provide a pt_entry_t and PRIxPTE To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Feb 23 15:12:19 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: G/C l1pte_pgindex To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.161 src/sys/arch/arm/include/arm32/pmap.h:1.162 --- src/sys/arch/arm/include/arm32/pmap.h:1.161 Wed Feb 5 07:37:36 2020 +++ src/sys/arch/arm/include/arm32/pmap.h Sun Feb 23 15:12:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.161 2020/02/05 07:37:36 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.162 2020/02/23 15:12:18 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -557,8 +557,6 @@ pmap_ptesync(pt_entry_t *ptep, size_t cn #define l1pte_fpage_p(pde) (((pde) & L1_TYPE_MASK) == L1_TYPE_F) #define l1pte_pa(pde) ((pde) & L1_C_ADDR_MASK) #define l1pte_index(v) ((vaddr_t)(v) >> L1_S_SHIFT) -#define l1pte_pgindex(v) l1pte_index((v) & L1_ADDR_BITS \ - & ~(PAGE_SIZE * PAGE_SIZE / sizeof(pt_entry_t) - 1)) static inline void l1pte_setone(pt_entry_t *pdep, pt_entry_t pde)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sun Feb 23 15:12:19 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: G/C l1pte_pgindex To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu Feb 13 07:40:24 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Bump the amount of KMEM allowed to 1/3rd of KVM. _ARCH_ARM_6 has a split of 2:2 and others have a split of 3:1. Tested by martin@ Thanks To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/include/arm32/param.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu Feb 13 07:40:24 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Bump the amount of KMEM allowed to 1/3rd of KVM. _ARCH_ARM_6 has a split of 2:2 and others have a split of 3:1. Tested by martin@ Thanks To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/include/arm32/param.h 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/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.29 src/sys/arch/arm/include/arm32/param.h:1.30 --- src/sys/arch/arm/include/arm32/param.h:1.29 Sat Feb 1 09:21:49 2020 +++ src/sys/arch/arm/include/arm32/param.h Thu Feb 13 07:40:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.29 2020/02/01 09:21:49 skrll Exp $ */ +/* $NetBSD: param.h,v 1.30 2020/02/13 07:40:24 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -66,7 +66,12 @@ * logical pages. */ #define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) -#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) + +#if defined(_ARM_ARCH_6) +#define NKMEMPAGES_MAX_DEFAULT ((768 * 1024 * 1024) >> PAGE_SHIFT) +#else +#define NKMEMPAGES_MAX_DEFAULT ((256 * 1024 * 1024) >> PAGE_SHIFT) +#endif /* Constants used to divide the USPACE area */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Tue Feb 11 13:31:23 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: types.h Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/arm32/types.h 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/include/arm32
Module Name:src Committed By: skrll Date: Tue Feb 11 13:31:23 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: types.h Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/arm32/types.h 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/include/arm32/types.h diff -u src/sys/arch/arm/include/arm32/types.h:1.12 src/sys/arch/arm/include/arm32/types.h:1.13 --- src/sys/arch/arm/include/arm32/types.h:1.12 Wed Jan 24 09:04:45 2018 +++ src/sys/arch/arm/include/arm32/types.h Tue Feb 11 13:31:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.12 2018/01/24 09:04:45 skrll Exp $ */ +/* $NetBSD: types.h,v 1.13 2020/02/11 13:31:23 skrll Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -38,13 +38,6 @@ #ifndef _ARM_ARM32_TYPES_H_ #define _ARM_ARM32_TYPES_H_ -#ifdef _KERNEL - -#ifdef _KERNEL_OPT -#include "opt_arm32_pmap.h" -#endif -#endif - #include /* pull in generic ARM definitions */ #define __HAVE_CPU_LWP_SETPRIVATE
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Mon Jan 13 20:36:44 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Revert previous; we don't want arm to have variable page size. Instead nick@ is fixing the cache pages issue to use a separate pool. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: christos Date: Mon Jan 13 20:36:44 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Revert previous; we don't want arm to have variable page size. Instead nick@ is fixing the cache pages issue to use a separate pool. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.46 src/sys/arch/arm/include/arm32/vmparam.h:1.47 --- src/sys/arch/arm/include/arm32/vmparam.h:1.46 Sat Jan 11 14:06:34 2020 +++ src/sys/arch/arm/include/arm32/vmparam.h Mon Jan 13 15:36:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.46 2020/01/11 19:06:34 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.47 2020/01/13 20:36:44 christos Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -84,11 +84,6 @@ #define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK (PAGE_SIZE - 1) -#define MIN_PAGE_SHIFT 12 /* normal */ -#define MAX_PAGE_SHIFT 13 /* _ARM_ARCH_6 */ -#define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) -#define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) - /* * Mach derived constants */
Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)
In article <20200113163830.e7a6317f...@rebar.astron.com>, Christos Zoulas wrote: >| >| Probably this is the same reason of recent arm build failures: >| https://releng.netbsd.org/builds/HEAD/202001130720Z/ >| https://releng.netbsd.org/builds/HEAD/202001130720Z/evbarm-earm.build.failed >| --- >| /tmp/genassym.Lq8h9d/assym.c:57:1: error: asm operand 0 probably >doesn't match constraints [-Werror] >| __asm("XYZZY VM_MIN_ADDRESS %0" : : "n" (VM_MIN_ADDRESS)); >| ^ >| /tmp/genassym.Lq8h9d/assym.c:58:1: error: asm operand 0 probably >doesn't match constraints [-Werror] >| __asm("XYZZY VM_MAXUSER_ADDRESS %0" : : "n" (VM_MAXUSER_ADDRESS)); >| ^ >| /tmp/genassym.Lq8h9d/assym.c:97:1: error: asm operand 0 probably >doesn't match constraints [-Werror] >| __asm("XYZZY PAGE_MASK %0" : : "n" (PAGE_MASK)); >| ^ >| /tmp/genassym.Lq8h9d/assym.c:98:1: error: asm operand 0 probably >doesn't match constraints [-Werror] >| __asm("XYZZY PAGE_SIZE %0" : : "n" (PAGE_SIZE)); >| ^ >| --- >| >| Should we prepare independent constant for >| "possible pagesize value among different MACHINE with the same MACHINE_ARCH" >| for jemalloc(3)? > >Ouch, this hurts. Sure, perhaps MALLOC_PAGE_SIZE? Talking to myself: The arm PAGE_SIZE_{MIN,MAX} should go away after nick eliminates the need for the 8K pages. This leaves us with m68k to deal with... Do modules work on m68k? Should modules be shared between kernels with different page sizes? Then perhaps we don't need a new constant? christos
Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)
> On Jan 13, 2020, at 8:15 AM, Izumi Tsutsui wrote: > > christos@ wrote: > >>> Now I get the following erro during local tests of >>> "build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host: >>> >>> --- >>> #create compat_util/compat_exec.d > : >>> In file included from /s/cvs/src/sys/sys/param.h:149:0, >>>from /s/cvs/src/sys/compat/common/compat_exec.c:41: >>> ./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand >>> #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */ >>>^ >>> nbmkdep: compile failed. >>> *** [compat_exec.d] Error code 1 >> >> try cc -E? > > It turns out the problem is more complicated. > > has the following definitions: > > https://nxr.netbsd.org/xref/src/sys/uvm/uvm_param.h?r=1.38#135 I would suggest a possible workaround for this could be to define an additional: #define __HAVE_FIXED_PAGE_SIZE ...at could also be tested here... the kernel truly does have a fixed page size, but userland not necessarily so. > --- >135 * If MIN_PAGE_SIZE and MAX_PAGE_SIZE are not equal, then we must use >136 * non-constant PAGE_SIZE, et al for LKMs. >137 */ >138 #if (MIN_PAGE_SIZE != MAX_PAGE_SIZE) >139 #define__uvmexp_pagesize >140 #if defined(_LKM) || defined(_MODULE) >141 #undef PAGE_SIZE >142 #undef PAGE_MASK >143 #undef PAGE_SHIFT >144 #endif >145 #endif >146 >147 /* >148 * Now provide PAGE_SIZE, PAGE_MASK, and PAGE_SHIFT if we do not >149 * have ones that are compile-time constants. >150 */ >151 #if !defined(PAGE_SIZE) >152 extern const int *const uvmexp_pagesize; >153 extern const int *const uvmexp_pagemask; >154 extern const int *const uvmexp_pageshift; >155 #definePAGE_SIZE (*uvmexp_pagesize) /* size of page > */ >156 #definePAGE_MASK (*uvmexp_pagemask) /* size of page > - 1 */ >157 #definePAGE_SHIFT (*uvmexp_pageshift) /* bits to > shift for pages */ >158 #endif /* PAGE_SIZE */ > --- > > I.e. assumes PAGE_SIZE is not compile time constant > for MODULEs if (MIN_PAGE_SIZE != MAX_PAGE_SIZE). > > Probably this is the same reason of recent arm build failures: > https://releng.netbsd.org/builds/HEAD/202001130720Z/ > https://releng.netbsd.org/builds/HEAD/202001130720Z/evbarm-earm.build.failed > --- > /tmp/genassym.Lq8h9d/assym.c:57:1: error: asm operand 0 probably doesn't > match constraints [-Werror] > __asm("XYZZY VM_MIN_ADDRESS %0" : : "n" (VM_MIN_ADDRESS)); > ^ > /tmp/genassym.Lq8h9d/assym.c:58:1: error: asm operand 0 probably doesn't > match constraints [-Werror] > __asm("XYZZY VM_MAXUSER_ADDRESS %0" : : "n" (VM_MAXUSER_ADDRESS)); > ^ > /tmp/genassym.Lq8h9d/assym.c:97:1: error: asm operand 0 probably doesn't > match constraints [-Werror] > __asm("XYZZY PAGE_MASK %0" : : "n" (PAGE_MASK)); > ^ > /tmp/genassym.Lq8h9d/assym.c:98:1: error: asm operand 0 probably doesn't > match constraints [-Werror] > __asm("XYZZY PAGE_SIZE %0" : : "n" (PAGE_SIZE)); > ^ > --- > > Should we prepare independent constant for > "possible pagesize value among different MACHINE with the same MACHINE_ARCH" > for jemalloc(3)? > > --- > Izumi Tsutsui -- thorpej
Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)
On Jan 14, 1:15am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/incl | christos@ wrote: | | > >Now I get the following erro during local tests of | > >"build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host: | > > | > >--- | > >#create compat_util/compat_exec.d | : | > >In file included from /s/cvs/src/sys/sys/param.h:149:0, | > > from /s/cvs/src/sys/compat/common/compat_exec.c:41: | > >./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand | > > #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */ | > > ^ | > >nbmkdep: compile failed. | > >*** [compat_exec.d] Error code 1 | > | > try cc -E? | | It turns out the problem is more complicated. | | has the following definitions: | | https://nxr.netbsd.org/xref/src/sys/uvm/uvm_param.h?r=1.38#135 | --- | 135 * If MIN_PAGE_SIZE and MAX_PAGE_SIZE are not equal, then we must use | 136 * non-constant PAGE_SIZE, et al for LKMs. | 137 */ | 138 #if (MIN_PAGE_SIZE != MAX_PAGE_SIZE) | 139 #define __uvmexp_pagesize | 140 #if defined(_LKM) || defined(_MODULE) | 141 #undef PAGE_SIZE | 142 #undef PAGE_MASK | 143 #undef PAGE_SHIFT | 144 #endif | 145 #endif | 146 | 147 /* | 148 * Now provide PAGE_SIZE, PAGE_MASK, and PAGE_SHIFT if we do not | 149 * have ones that are compile-time constants. | 150 */ | 151 #if !defined(PAGE_SIZE) | 152 extern const int *const uvmexp_pagesize; | 153 extern const int *const uvmexp_pagemask; | 154 extern const int *const uvmexp_pageshift; | 155 #define PAGE_SIZE (*uvmexp_pagesize) /* size of page */ | 156 #define PAGE_MASK (*uvmexp_pagemask) /* size of page - 1 */ | 157 #define PAGE_SHIFT (*uvmexp_pageshift) /* bits to shift for pages */ | 158 #endif /* PAGE_SIZE */ | --- | | I.e. assumes PAGE_SIZE is not compile time constant | for MODULEs if (MIN_PAGE_SIZE != MAX_PAGE_SIZE). | | Probably this is the same reason of recent arm build failures: | https://releng.netbsd.org/builds/HEAD/202001130720Z/ | https://releng.netbsd.org/builds/HEAD/202001130720Z/evbarm-earm.build.failed | --- | /tmp/genassym.Lq8h9d/assym.c:57:1: error: asm operand 0 probably doesn't match constraints [-Werror] | __asm("XYZZY VM_MIN_ADDRESS %0" : : "n" (VM_MIN_ADDRESS)); | ^ | /tmp/genassym.Lq8h9d/assym.c:58:1: error: asm operand 0 probably doesn't match constraints [-Werror] | __asm("XYZZY VM_MAXUSER_ADDRESS %0" : : "n" (VM_MAXUSER_ADDRESS)); | ^ | /tmp/genassym.Lq8h9d/assym.c:97:1: error: asm operand 0 probably doesn't match constraints [-Werror] | __asm("XYZZY PAGE_MASK %0" : : "n" (PAGE_MASK)); | ^ | /tmp/genassym.Lq8h9d/assym.c:98:1: error: asm operand 0 probably doesn't match constraints [-Werror] | __asm("XYZZY PAGE_SIZE %0" : : "n" (PAGE_SIZE)); | ^ | --- | | Should we prepare independent constant for | "possible pagesize value among different MACHINE with the same MACHINE_ARCH" | for jemalloc(3)? Ouch, this hurts. Sure, perhaps MALLOC_PAGE_SIZE? christos
Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)
christos@ wrote: > >Now I get the following erro during local tests of > >"build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host: > > > >--- > >#create compat_util/compat_exec.d : > >In file included from /s/cvs/src/sys/sys/param.h:149:0, > > from /s/cvs/src/sys/compat/common/compat_exec.c:41: > >./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand > > #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */ > > ^ > >nbmkdep: compile failed. > >*** [compat_exec.d] Error code 1 > > try cc -E? It turns out the problem is more complicated. has the following definitions: https://nxr.netbsd.org/xref/src/sys/uvm/uvm_param.h?r=1.38#135 --- 135 * If MIN_PAGE_SIZE and MAX_PAGE_SIZE are not equal, then we must use 136 * non-constant PAGE_SIZE, et al for LKMs. 137 */ 138 #if (MIN_PAGE_SIZE != MAX_PAGE_SIZE) 139 #define __uvmexp_pagesize 140 #if defined(_LKM) || defined(_MODULE) 141 #undef PAGE_SIZE 142 #undef PAGE_MASK 143 #undef PAGE_SHIFT 144 #endif 145 #endif 146 147 /* 148 * Now provide PAGE_SIZE, PAGE_MASK, and PAGE_SHIFT if we do not 149 * have ones that are compile-time constants. 150 */ 151 #if !defined(PAGE_SIZE) 152 extern const int *const uvmexp_pagesize; 153 extern const int *const uvmexp_pagemask; 154 extern const int *const uvmexp_pageshift; 155 #define PAGE_SIZE (*uvmexp_pagesize) /* size of page */ 156 #define PAGE_MASK (*uvmexp_pagemask) /* size of page - 1 */ 157 #define PAGE_SHIFT (*uvmexp_pageshift) /* bits to shift for pages */ 158 #endif /* PAGE_SIZE */ --- I.e. assumes PAGE_SIZE is not compile time constant for MODULEs if (MIN_PAGE_SIZE != MAX_PAGE_SIZE). Probably this is the same reason of recent arm build failures: https://releng.netbsd.org/builds/HEAD/202001130720Z/ https://releng.netbsd.org/builds/HEAD/202001130720Z/evbarm-earm.build.failed --- /tmp/genassym.Lq8h9d/assym.c:57:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY VM_MIN_ADDRESS %0" : : "n" (VM_MIN_ADDRESS)); ^ /tmp/genassym.Lq8h9d/assym.c:58:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY VM_MAXUSER_ADDRESS %0" : : "n" (VM_MAXUSER_ADDRESS)); ^ /tmp/genassym.Lq8h9d/assym.c:97:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY PAGE_MASK %0" : : "n" (PAGE_MASK)); ^ /tmp/genassym.Lq8h9d/assym.c:98:1: error: asm operand 0 probably doesn't match constraints [-Werror] __asm("XYZZY PAGE_SIZE %0" : : "n" (PAGE_SIZE)); ^ --- Should we prepare independent constant for "possible pagesize value among different MACHINE with the same MACHINE_ARCH" for jemalloc(3)? --- Izumi Tsutsui
Re: MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)
In article <200114002918.m0108...@mirage.ceres.dti.ne.jp>, Izumi Tsutsui wrote: >christos@ wrote: > >> LGTM too. > >> >> thorpej@ wrote: > : >> >> How about the attached diff? (untested, just for review) >> > >> > This looks good to me. > >Now I get the following erro during local tests of >"build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host: > >--- >#create compat_util/compat_exec.d >CC=/s/cvs/src/obj.hp300/tooldir.NetBSD-9.0_RC1-i386/bin/m68k--netbsdelf-gcc >/s/cvs/src/obj.hp300/tooldir.NetBSD-9.0_RC1-i386/bin/nbmkdep -f >compat_exec.d.tmp -- -std=gnu99 -I/s/cvs/src/common/include >-DDIAGNOSTIC --sysroot=/s/cvs/src/obj.hp300/destdir.hp300 >-I/s/cvs/src/common/include -DDIAGNOSTIC -nostdinc -I. >-I/s/cvs/src/sys/modules/compat_util -isystem /s/cvs/src/sys -isystem >/s/cvs/src/sys/arch -isystem /s/cvs/src/sys/../common/include -D_KERNEL >-D_LKM -D_MODULE -DSYSCTL_INCLUDE_DESCR >/s/cvs/src/sys/compat/common/compat_exec.c && mv -f compat_exec.d.tmp >compat_exec.d >In file included from /s/cvs/src/sys/sys/param.h:149:0, > from /s/cvs/src/sys/compat/common/compat_exec.c:41: >./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand > #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */ > ^ >nbmkdep: compile failed. >*** [compat_exec.d] Error code 1 > >--- > >I'm not sure why my change causes this error, >but I also wonder if we should use "PGSHIFT == 13" rather than >"PAGE_SIZE == 8192" in .. try cc -E? christos
MAX_PAGE_SIZE for m68k (Re: CVS commit: src/sys/arch/arm/include/arm32)
christos@ wrote: > LGTM too. > >> thorpej@ wrote: : > >> How about the attached diff? (untested, just for review) > > > > This looks good to me. Now I get the following erro during local tests of "build.sh -U -m hp300 release" on NetBSD/i386 9.0_RC1 host: --- #create compat_util/compat_exec.d CC=/s/cvs/src/obj.hp300/tooldir.NetBSD-9.0_RC1-i386/bin/m68k--netbsdelf-gcc /s/cvs/src/obj.hp300/tooldir.NetBSD-9.0_RC1-i386/bin/nbmkdep -f compat_exec.d.tmp -- -std=gnu99 -I/s/cvs/src/common/include -DDIAGNOSTIC --sysroot=/s/cvs/src/obj.hp300/destdir.hp300 -I/s/cvs/src/common/include -DDIAGNOSTIC -nostdinc -I. -I/s/cvs/src/sys/modules/compat_util -isystem /s/cvs/src/sys -isystem /s/cvs/src/sys/arch -isystem /s/cvs/src/sys/../common/include -D_KERNEL -D_LKM -D_MODULE -DSYSCTL_INCLUDE_DESCR /s/cvs/src/sys/compat/common/compat_exec.c && mv -f compat_exec.d.tmp compat_exec.d In file included from /s/cvs/src/sys/sys/param.h:149:0, from /s/cvs/src/sys/compat/common/compat_exec.c:41: ./m68k/pmap_motorola.h:165:5: error: operator '*' has no left operand #if PAGE_SIZE == 8192 /* NBPG / (SG4_LEV1SIZE * sizeof(st_entry_t)) */ ^ nbmkdep: compile failed. *** [compat_exec.d] Error code 1 --- I'm not sure why my change causes this error, but I also wonder if we should use "PGSHIFT == 13" rather than "PAGE_SIZE == 8192" in .. --- Izumi Tsutsui
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Sun Jan 12 20:06:52 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: fix -Wsign-compare because module tests trigger it. To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.157 src/sys/arch/arm/include/arm32/pmap.h:1.158 --- src/sys/arch/arm/include/arm32/pmap.h:1.157 Tue Dec 10 13:02:14 2019 +++ src/sys/arch/arm/include/arm32/pmap.h Sun Jan 12 15:06:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.157 2019/12/10 18:02:14 ad Exp $ */ +/* $NetBSD: pmap.h,v 1.158 2020/01/12 20:06:52 christos Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -564,13 +564,13 @@ l1pte_set(pt_entry_t *pdep, pt_entry_t p *pdep = pde; if (l1pte_page_p(pde)) { KASSERTMSGuintptr_t)pdep / sizeof(pde)) & (PAGE_SIZE / L2_T_SIZE - 1)) == 0, "%p", pdep); - for (size_t k = 1; k < PAGE_SIZE / L2_T_SIZE; k++) { + for (int k = 1; k < PAGE_SIZE / L2_T_SIZE; k++) { pde += L2_T_SIZE; pdep[k] = pde; } } else if (l1pte_supersection_p(pde)) { KASSERTMSGuintptr_t)pdep / sizeof(pde)) & (L1_SS_SIZE / L1_S_SIZE - 1)) == 0, "%p", pdep); - for (size_t k = 1; k < L1_SS_SIZE / L1_S_SIZE; k++) { + for (int k = 1; k < L1_SS_SIZE / L1_S_SIZE; k++) { pdep[k] = pde; } } @@ -589,12 +589,12 @@ l2pte_set(pt_entry_t *ptep, pt_entry_t p { if (l1pte_lpage_p(pte)) { KASSERTMSGuintptr_t)ptep / sizeof(pte)) & (L2_L_SIZE / L2_S_SIZE - 1)) == 0, "%p", ptep); - for (size_t k = 0; k < L2_L_SIZE / L2_S_SIZE; k++) { + for (int k = 0; k < L2_L_SIZE / L2_S_SIZE; k++) { *ptep++ = pte; } } else { KASSERTMSGuintptr_t)ptep / sizeof(pte)) & (PAGE_SIZE / L2_S_SIZE - 1)) == 0, "%p", ptep); - for (size_t k = 0; k < PAGE_SIZE / L2_S_SIZE; k++) { + for (int k = 0; k < PAGE_SIZE / L2_S_SIZE; k++) { KASSERTMSG(*ptep == opte, "%#x [*%p] != %#x", *ptep, ptep, opte); *ptep++ = pte; pte += L2_S_SIZE; @@ -609,7 +609,7 @@ l2pte_reset(pt_entry_t *ptep) { KASSERTMSGuintptr_t)ptep / sizeof(*ptep)) & (PAGE_SIZE / L2_S_SIZE - 1)) == 0, "%p", ptep); *ptep = 0; - for (vsize_t k = 1; k < PAGE_SIZE / L2_S_SIZE; k++) { + for (int k = 1; k < PAGE_SIZE / L2_S_SIZE; k++) { ptep[k] = 0; } }
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Sun Jan 12 20:06:52 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: fix -Wsign-compare because module tests trigger it. To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/arch/arm/include/arm32/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/arm/include/arm32
LGTM too. christos > On Jan 12, 2020, at 10:09 AM, Jason Thorpe wrote: > > > >> On Jan 11, 2020, at 10:47 PM, Izumi Tsutsui wrote: >> >> thorpej@ wrote: >> PGSHIFT is defined in and PAGE_SHIFT and PAGE_SIZE is in , but there is no common . >>> >>> Make a common that all of the platforms can #include, and >>> just put these common definitions in it (for now)? >> >> How about the attached diff? (untested, just for review) > > This looks good to me. > > -- thorpej signature.asc Description: Message signed with OpenPGP
Re: CVS commit: src/sys/arch/arm/include/arm32
> On Jan 11, 2020, at 10:47 PM, Izumi Tsutsui wrote: > > thorpej@ wrote: > >>> PGSHIFT is defined in and >>> PAGE_SHIFT and PAGE_SIZE is in , >>> but there is no common . >> >> Make a common that all of the platforms can #include, and >> just put these common definitions in it (for now)? > > How about the attached diff? (untested, just for review) This looks good to me. -- thorpej
Re: CVS commit: src/sys/arch/arm/include/arm32
thorpej@ wrote: > > PGSHIFT is defined in and > > PAGE_SHIFT and PAGE_SIZE is in , > > but there is no common . > > Make a common that all of the platforms can #include, and > just put these common definitions in it (for now)? How about the attached diff? (untested, just for review) - Only sun3 use immediate "13" (not PGSHIFT) for PG_SHIFT, but sun3/include/param.h also has "#define PGSHIFT 13". - For now I'll leave evbcf as is. (I doubt its MACHINE_ARCH is m68k) --- /dev/null 2020-01-12 15:11:38.258153018 +0900 +++ m68k/include/vmparam.h 2020-01-12 15:29:21.866107854 +0900 @@ -0,0 +1,65 @@ +/* $NetBSD$*/ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1982, 1986, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ + * + * @(#)vmparam.h 8.2 (Berkeley) 4/19/94 + */ + +#ifndef _M68K_VMPARAM_H_ +#define_M68K_VMPARAM_H_ + +/* + * Common constants for m68k ports + */ + +/* + * hp300 pmap derived m68k ports can use 4K or 8K pages. + * (except HPMMU machines) + * sun3 and sun3x use 8K pages. + * The page size is specified by PGSHIFT in . + * Override the PAGE_* definitions to be compile-time constants. + */ +#definePAGE_SHIFT PGSHIFT +#definePAGE_SIZE (1 << PAGE_SHIFT) +#definePAGE_MASK (PAGE_SIZE - 1) + +/* Some implemantations like jemalloc(3) require physical page size details. */ +#defineMIN_PAGE_SHIFT 12 +#defineMAX_PAGE_SHIFT 13 +#defineMIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) +#defineMAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) + +#endif /* _M68K_VMPARAM_H_ */ Index: amiga/include/vmparam.h === RCS file: /cvsroot/src/sys/arch/amiga/include/vmparam.h,v retrieving revision 1.47 diff -u -p -d -r1.47 vmparam.h --- amiga/include/vmparam.h 27 Mar 2019 17:15:29 - 1.47 +++ amiga/include/vmparam.h 12 Jan 2020 06:29:56 - @@ -46,12 +46,9 @@ */ /* - * We use 8K pages on the Amiga. Override the PAGE_* definitions - * to be compie-time constants. + * Use common m68k definitions to define PAGE_SIZE and related constants. */ -#definePAGE_SHIFT PGSHIFT -#definePAGE_SIZE (1 << PAGE_SHIFT) -#definePAGE_MASK (PAGE_SIZE - 1) +#include /* * USRSTACK is the top (end) of the user stack. Index: atari/include/vmparam.h === RCS file: /cvsroot/src/sys/arch/atari/include/vmparam.h,v retrieving revision 1.33 diff -u -p -d -r1.33 vmparam.h --- atari/include/vmparam.h 27 Mar 2019 17:15:29 - 1.33 +++ atari/include/vmparam.h 12 Jan 2020 06:29:56 - @@ -46,12 +46,9 @@ */ /* - * We use 8K pages on the Atari. Override the PAGE_* definitions - * to be compile-time constants. + * Use common m68k definitions to define PAGE_SIZE and related constants. */ -#definePAGE_SHIFT PGSHIFT -#definePAGE_SIZE (1 << PAGE_SHIFT) -#definePAGE_MASK (PAGE_SIZE - 1) +#include /* * USRSTACK is the top (end) of the user stack. Index: cesfic/include/vmparam.h === RCS file:
Re: CVS commit: src/sys/arch/arm/include/arm32
> On Jan 11, 2020, at 8:32 PM, Izumi Tsutsui wrote: > > PGSHIFT is defined in and > PAGE_SHIFT and PAGE_SIZE is in , > but there is no common . Make a common that all of the platforms can #include, and just put these common definitions in it (for now)? -- thorpej
Re: CVS commit: src/sys/arch/arm/include/arm32
> >m68k also needs this? (currently no common though) > > Good catch. Yup, looks like it: : > > #define MIN_PAGE_SHIFT 11 /* sun2 */ > #define MAX_PAGE_SHIFT 13 /* amiga,atari,sun3 */ > #define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) > #define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) sun2 is different MACHINE_ARCH (m68000) from other m68k ports, so MIN_PAGE_SHIFT should be 12. > Should I take care of it or can you? I just wonder which header file these definitions should be in. Is ok? PGSHIFT is defined in and PAGE_SHIFT and PAGE_SIZE is in , but there is no common . --- Izumi Tsutsui
Re: CVS commit: src/sys/arch/arm/include/arm32
In article <200112121414.m0101...@mirage.ceres.dti.ne.jp>, Izumi Tsutsui wrote: >> Module Name: src >> Committed By:christos >> Date:Sat Jan 11 19:06:35 UTC 2020 >> >> Modified Files: >> src/sys/arch/arm/include/arm32: vmparam.h >> >> Log Message: >> Define the min and max page size supported for the benefit of jemalloc >> >> >> To generate a diff of this commit: >> cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/vmparam.h > >--- src/sys/arch/arm/include/arm32/vmparam.h:1.45 Wed Jun 19 09:54:42 2019 >+++ src/sys/arch/arm/include/arm32/vmparam.h Sat Jan 11 19:06:34 2020 >@@ -84,6 +84,11 @@ > #define PAGE_SIZE (1 << PAGE_SHIFT) > #define PAGE_MASK (PAGE_SIZE - 1) > >+#define MIN_PAGE_SHIFT 12 /* normal */ >+#define MAX_PAGE_SHIFT 13 /* _ARM_ARCH_6 */ >+#define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) >+#define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) >+ > /* > * Mach derived constants > */ > >--- > >m68k also needs this? (currently no common though) Good catch. Yup, looks like it: $ fgrep PGSHIFT {amiga,atari,hp300,luna68k,mac68k,mvme68k,next68k,sun2,sun3,x68k}/ param.h amiga/include/param.h:#define PGSHIFT 13 /* LOG2(NBPG) */ atari/include/param.h:#define PGSHIFT 13 /* LOG2(NBPG) */ hp300/include/param.h:#define PGSHIFT 12 /* LOG2(NBPG) */ luna68k/include/param.h:#define PGSHIFT 12 /* LOG2(NBPG) */ mac68k/include/param.h:#define PGSHIFT 12 /* LOG2(NBPG) */ mvme68k/include/param.h:#define PGSHIFT 12 /* LOG2(NBPG) */ next68k/include/param.h:#define PGSHIFT 12 /* LOG2(NBPG) */ sun2/include/param.h:#define PGSHIFT11 /* LOG2(NBPG) */ sun3/include/param.h:#definePGSHIFT 13 /* LOG2(NBPG) */ x68k/include/param.h:#definePGSHIFT 12 /* LOG2(NBPG) */ ... #define MIN_PAGE_SHIFT 11 /* sun2 */ #define MAX_PAGE_SHIFT 13 /* amiga,atari,sun3 */ #define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) #define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) Should I take care of it or can you? christos
Re: CVS commit: src/sys/arch/arm/include/arm32
> Module Name: src > Committed By: christos > Date: Sat Jan 11 19:06:35 UTC 2020 > > Modified Files: > src/sys/arch/arm/include/arm32: vmparam.h > > Log Message: > Define the min and max page size supported for the benefit of jemalloc > > > To generate a diff of this commit: > cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/vmparam.h --- src/sys/arch/arm/include/arm32/vmparam.h:1.45 Wed Jun 19 09:54:42 2019 +++ src/sys/arch/arm/include/arm32/vmparam.hSat Jan 11 19:06:34 2020 @@ -84,6 +84,11 @@ #definePAGE_SIZE (1 << PAGE_SHIFT) #definePAGE_MASK (PAGE_SIZE - 1) +#defineMIN_PAGE_SHIFT 12 /* normal */ +#defineMAX_PAGE_SHIFT 13 /* _ARM_ARCH_6 */ +#defineMIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) +#defineMAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) + /* * Mach derived constants */ --- m68k also needs this? (currently no common though) --- Izumi Tsutsui
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Sat Jan 11 19:06:35 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Define the min and max page size supported for the benefit of jemalloc To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: christos Date: Sat Jan 11 19:06:35 UTC 2020 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Define the min and max page size supported for the benefit of jemalloc To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.45 src/sys/arch/arm/include/arm32/vmparam.h:1.46 --- src/sys/arch/arm/include/arm32/vmparam.h:1.45 Wed Jun 19 05:54:42 2019 +++ src/sys/arch/arm/include/arm32/vmparam.h Sat Jan 11 14:06:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.45 2019/06/19 09:54:42 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.46 2020/01/11 19:06:34 christos Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -84,6 +84,11 @@ #define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK (PAGE_SIZE - 1) +#define MIN_PAGE_SHIFT 12 /* normal */ +#define MAX_PAGE_SHIFT 13 /* _ARM_ARCH_6 */ +#define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) +#define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) + /* * Mach derived constants */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: ad Date: Tue Dec 10 18:02:14 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: pg->phys_addr -> VM_PAGE_TO_PHYS(pg) To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: ad Date: Tue Dec 10 18:02:14 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: pg->phys_addr -> VM_PAGE_TO_PHYS(pg) To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.156 src/sys/arch/arm/include/arm32/pmap.h:1.157 --- src/sys/arch/arm/include/arm32/pmap.h:1.156 Thu Oct 18 09:01:52 2018 +++ src/sys/arch/arm/include/arm32/pmap.h Tue Dec 10 18:02:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.156 2018/10/18 09:01:52 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.157 2019/12/10 18:02:14 ad Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -1158,7 +1158,7 @@ struct vm_page_md { */ #if ARM_MMU_V6 > 0 #define VM_MDPAGE_PVH_ATTRS_INIT(pg) \ - (pg)->mdpage.pvh_attrs = (pg)->phys_addr & arm_cache_prefer_mask + (pg)->mdpage.pvh_attrs = VM_PAGE_TO_PHYS(pg) & arm_cache_prefer_mask #else #define VM_MDPAGE_PVH_ATTRS_INIT(pg) \ (pg)->mdpage.pvh_attrs = 0
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jun 19 09:54:15 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: pte.h Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/arm32/pte.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Jun 19 09:54:42 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Update a comment To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.44 src/sys/arch/arm/include/arm32/vmparam.h:1.45 --- src/sys/arch/arm/include/arm32/vmparam.h:1.44 Sat Mar 30 21:06:42 2019 +++ src/sys/arch/arm/include/arm32/vmparam.h Wed Jun 19 09:54:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.44 2019/03/30 21:06:42 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.45 2019/06/19 09:54:42 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -78,7 +78,7 @@ /* * While the ARM architecture defines Section mappings, large pages, - * and small pages, the standard page size is (and will always be) 4K. + * and small pages, the standard MMU page size is (and will always be) 4K. */ #define PAGE_SHIFT PGSHIFT #define PAGE_SIZE (1 << PAGE_SHIFT)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jun 19 09:54:42 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Update a comment To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Jun 19 09:53:39 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: KNF and add a comment To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/arm32/param.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Jun 19 09:54:15 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: pte.h Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/arm32/pte.h 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/include/arm32/pte.h diff -u src/sys/arch/arm/include/arm32/pte.h:1.19 src/sys/arch/arm/include/arm32/pte.h:1.20 --- src/sys/arch/arm/include/arm32/pte.h:1.19 Wed Oct 29 10:59:48 2014 +++ src/sys/arch/arm/include/arm32/pte.h Wed Jun 19 09:54:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.19 2014/10/29 10:59:48 skrll Exp $ */ +/* $NetBSD: pte.h,v 1.20 2019/06/19 09:54:15 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -131,6 +131,7 @@ typedef uint32_t pt_entry_t; /* L2 table #define L1_TABLE_SIZE 0x4000 /* 16K */ #define L2_TABLE_SIZE 0x1000 /* 4K */ + /* * The new pmap deals with the 1KB coarse L2 tables by * allocating them from a pool. Until every port has been converted,
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Wed Jun 19 09:53:39 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: KNF and add a comment To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/arm32/param.h 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/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.26 src/sys/arch/arm/include/arm32/param.h:1.27 --- src/sys/arch/arm/include/arm32/param.h:1.26 Mon Feb 4 13:06:39 2019 +++ src/sys/arch/arm/include/arm32/param.h Wed Jun 19 09:53:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.26 2019/02/04 13:06:39 skrll Exp $ */ +/* $NetBSD: param.h,v 1.27 2019/06/19 09:53:39 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -53,9 +53,8 @@ #endif #endif #define NBPG (1 << PGSHIFT) /* bytes/page */ -#define PGOFSET (NBPG-1) /* byte offset into page */ -#define NPTEPG (NBPG/(sizeof (pt_entry_t))) - +#define PGOFSET (NBPG - 1) /* byte offset into page */ +#define NPTEPG (NBPG / sizeof(pt_entry_t)) /* PTEs per Page */ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Sat Mar 30 21:06:42 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Need to include so that the _ARM_CPU* macros get defined so that we always select the correct page size (8K for armv6+). To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.43 src/sys/arch/arm/include/arm32/vmparam.h:1.44 --- src/sys/arch/arm/include/arm32/vmparam.h:1.43 Wed Mar 27 13:15:29 2019 +++ src/sys/arch/arm/include/arm32/vmparam.h Sat Mar 30 17:06:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.43 2019/03/27 17:15:29 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.44 2019/03/30 21:06:42 christos Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -43,6 +43,7 @@ * Virtual Memory parameters common to all arm32 platforms. */ +#include #include #include
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Sat Mar 30 21:06:42 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Need to include so that the _ARM_CPU* macros get defined so that we always select the correct page size (8K for armv6+). To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Mon Feb 4 13:06:39 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/include/arm32/param.h 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/include/arm32/param.h diff -u src/sys/arch/arm/include/arm32/param.h:1.25 src/sys/arch/arm/include/arm32/param.h:1.26 --- src/sys/arch/arm/include/arm32/param.h:1.25 Fri Jun 9 01:16:54 2017 +++ src/sys/arch/arm/include/arm32/param.h Mon Feb 4 13:06:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.25 2017/06/09 01:16:54 chs Exp $ */ +/* $NetBSD: param.h,v 1.26 2019/02/04 13:06:39 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -98,7 +98,7 @@ #define arm_btop(x) ((unsigned)(x) >> PGSHIFT) #define arm_ptob(x) ((unsigned)(x) << PGSHIFT) #define arm_trunc_page(x) ((unsigned)(x) & ~PGOFSET) - + #ifdef _KERNEL #ifndef _LOCORE #ifndef __HIDE_DELAY
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Mon Feb 4 13:06:39 UTC 2019 Modified Files: src/sys/arch/arm/include/arm32: param.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/include/arm32/param.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Oct 28 14:46:59 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Consistency - NFC To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Oct 28 14:46:59 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Consistency - NFC To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32/frame.h diff -u src/sys/arch/arm/include/arm32/frame.h:1.46 src/sys/arch/arm/include/arm32/frame.h:1.47 --- src/sys/arch/arm/include/arm32/frame.h:1.46 Sun Oct 28 14:45:02 2018 +++ src/sys/arch/arm/include/arm32/frame.h Sun Oct 28 14:46:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.46 2018/10/28 14:45:02 skrll Exp $ */ +/* $NetBSD: frame.h,v 1.47 2018/10/28 14:46:59 skrll Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -402,7 +402,7 @@ LOCK_CAS_DEBUG_LOCALS ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ add sp, sp, #(TF_PC-TF_R0); /* Adjust the stack pointer */ \ - ldr lr, [sp], #0x0004 /* Pop the return address */ + ldr lr, [sp], #4 /* Pop the return address */ #define PULLIDLEFRAME \ add sp, sp, #TF_R4; /* Adjust the stack pointer */ \
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sun Oct 28 14:45:02 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Remove magic number To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Oct 28 14:45:02 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Remove magic number To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32/frame.h diff -u src/sys/arch/arm/include/arm32/frame.h:1.45 src/sys/arch/arm/include/arm32/frame.h:1.46 --- src/sys/arch/arm/include/arm32/frame.h:1.45 Fri Jul 7 16:59:35 2017 +++ src/sys/arch/arm/include/arm32/frame.h Sun Oct 28 14:45:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.45 2017/07/07 16:59:35 skrll Exp $ */ +/* $NetBSD: frame.h,v 1.46 2018/10/28 14:45:02 skrll Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -484,7 +484,7 @@ LOCK_CAS_DEBUG_LOCALS */ #define PULLFRAMEFROMSVCANDEXIT \ - ldr r0, [sp], #0x0008; /* Pop the SPSR from stack */ \ + ldr r0, [sp], #TF_R0; /* Pop the SPSR from stack */ \ msr spsr_fsxc, r0; /* restore SPSR */ \ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Oct 27 13:26:23 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.41 src/sys/arch/arm/include/arm32/vmparam.h:1.42 --- src/sys/arch/arm/include/arm32/vmparam.h:1.41 Mon Feb 13 09:46:30 2017 +++ src/sys/arch/arm/include/arm32/vmparam.h Sat Oct 27 13:26:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.41 2017/02/13 09:46:30 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.42 2018/10/27 13:26:23 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -48,7 +48,7 @@ #include #include /* pt_entry_t */ -#define __USE_TOPDOWN_VM +#define __USE_TOPDOWN_VM #define USRSTACK VM_MAXUSER_ADDRESS /*
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Oct 27 13:26:23 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/include/arm32/vmparam.h 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/include/arm32
Module Name:src Committed By: skrll Date: Sun Aug 5 06:18:05 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: Expose kern_vtopdiff To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32/machdep.h diff -u src/sys/arch/arm/include/arm32/machdep.h:1.24 src/sys/arch/arm/include/arm32/machdep.h:1.25 --- src/sys/arch/arm/include/arm32/machdep.h:1.24 Fri Aug 3 15:46:41 2018 +++ src/sys/arch/arm/include/arm32/machdep.h Sun Aug 5 06:18:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.24 2018/08/03 15:46:41 skrll Exp $ */ +/* $NetBSD: machdep.h,v 1.25 2018/08/05 06:18:05 skrll Exp $ */ #ifndef _ARM32_MACHDEP_H_ #define _ARM32_MACHDEP_H_ @@ -52,6 +52,8 @@ extern char *booted_kernel; extern volatile uint32_t arm_cpu_hatched; extern volatile uint32_t arm_cpu_mbox; extern u_int arm_cpu_max; +extern u_long kern_vtopdiff; + /* misc prototypes used by the many arm machdeps */ void cortex_pmc_ccnt_init(void); @@ -74,16 +76,12 @@ struct boot_physmem; static inline paddr_t aarch32_kern_vtophys(vaddr_t va) { - extern u_long kern_vtopdiff; - return va - kern_vtopdiff; } static inline vaddr_t aarch32_kern_phystov(paddr_t pa) { - extern u_long kern_vtopdiff; - return pa + kern_vtopdiff; }
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sun Aug 5 06:18:05 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: Expose kern_vtopdiff To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Aug 1 13:48:01 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: s/_ARM32_BOOT_MACHDEP_H_/_ARM32_MACHDEP_H_/ in multiple inclusion protection. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32
Module Name:src Committed By: skrll Date: Wed Aug 1 13:48:01 UTC 2018 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: s/_ARM32_BOOT_MACHDEP_H_/_ARM32_MACHDEP_H_/ in multiple inclusion protection. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32/machdep.h diff -u src/sys/arch/arm/include/arm32/machdep.h:1.22 src/sys/arch/arm/include/arm32/machdep.h:1.23 --- src/sys/arch/arm/include/arm32/machdep.h:1.22 Sun Jul 15 05:16:41 2018 +++ src/sys/arch/arm/include/arm32/machdep.h Wed Aug 1 13:48:00 2018 @@ -1,7 +1,7 @@ -/* $NetBSD: machdep.h,v 1.22 2018/07/15 05:16:41 maxv Exp $ */ +/* $NetBSD: machdep.h,v 1.23 2018/08/01 13:48:00 skrll Exp $ */ -#ifndef _ARM32_BOOT_MACHDEP_H_ -#define _ARM32_BOOT_MACHDEP_H_ +#ifndef _ARM32_MACHDEP_H_ +#define _ARM32_MACHDEP_H_ /* Define various stack sizes in pages */ #ifndef IRQ_STACK_SIZE
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Tue Aug 29 06:28:27 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Revert the *_PROT_RO_* define changes and do all the work in the *_PROT() macros for RO kernel pages. cats boots again - no idea how it slipped through my testing previously To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.151 src/sys/arch/arm/include/arm32/pmap.h:1.152 --- src/sys/arch/arm/include/arm32/pmap.h:1.151 Tue Jul 11 20:42:17 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Tue Aug 29 06:28:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.151 2017/07/11 20:42:17 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.152 2017/08/29 06:28:26 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -728,12 +728,12 @@ extern void (*pmap_zero_page_func)(paddr */ #define L1_S_PROT_U_generic (L1_S_AP(AP_U)) #define L1_S_PROT_W_generic (L1_S_AP(AP_W)) -#define L1_S_PROT_RO_generic (L1_S_AP(AP_R)) /* AP_W == AP_R */ +#define L1_S_PROT_RO_generic (0) #define L1_S_PROT_MASK_generic (L1_S_PROT_U|L1_S_PROT_W|L1_S_PROT_RO) #define L1_S_PROT_U_xscale (L1_S_AP(AP_U)) #define L1_S_PROT_W_xscale (L1_S_AP(AP_W)) -#define L1_S_PROT_RO_xscale (L1_S_AP(AP_R)) /* AP_W == AP_R */ +#define L1_S_PROT_RO_xscale (0) #define L1_S_PROT_MASK_xscale (L1_S_PROT_U|L1_S_PROT_W|L1_S_PROT_RO) #define L1_S_PROT_U_armv6 (L1_S_AP(AP_R) | L1_S_AP(AP_U)) @@ -754,12 +754,12 @@ extern void (*pmap_zero_page_func)(paddr #define L2_L_PROT_U_generic (L2_AP(AP_U)) #define L2_L_PROT_W_generic (L2_AP(AP_W)) -#define L2_L_PROT_RO_generic (L2_AP(AP_R)) +#define L2_L_PROT_RO_generic (0) #define L2_L_PROT_MASK_generic (L2_L_PROT_U|L2_L_PROT_W|L2_L_PROT_RO) #define L2_L_PROT_U_xscale (L2_AP(AP_U)) #define L2_L_PROT_W_xscale (L2_AP(AP_W)) -#define L2_L_PROT_RO_xscale (L2_AP(AP_R)) +#define L2_L_PROT_RO_xscale (0) #define L2_L_PROT_MASK_xscale (L2_L_PROT_U|L2_L_PROT_W|L2_L_PROT_RO) #define L2_L_PROT_U_armv6n (L2_AP0(AP_R) | L2_AP0(AP_U)) @@ -780,12 +780,12 @@ extern void (*pmap_zero_page_func)(paddr #define L2_S_PROT_U_generic (L2_AP(AP_U)) #define L2_S_PROT_W_generic (L2_AP(AP_W)) -#define L2_S_PROT_RO_generic (L2_AP(AP_R)) +#define L2_S_PROT_RO_generic (0) #define L2_S_PROT_MASK_generic (L2_S_PROT_U|L2_S_PROT_W|L2_S_PROT_RO) #define L2_S_PROT_U_xscale (L2_AP0(AP_U)) #define L2_S_PROT_W_xscale (L2_AP0(AP_W)) -#define L2_S_PROT_RO_xscale (L2_AP(AP_R)) +#define L2_S_PROT_RO_xscale (0) #define L2_S_PROT_MASK_xscale (L2_S_PROT_U|L2_S_PROT_W|L2_S_PROT_RO) #define L2_S_PROT_U_armv6n (L2_AP0(AP_R) | L2_AP0(AP_U)) @@ -1028,31 +1028,44 @@ extern void (*pmap_zero_page_func)(paddr #define l1pte_set_writable(pte) (((pte) & ~L1_S_PROT_RO) | L1_S_PROT_W) #define l1pte_set_readonly(pte) (((pte) & ~L1_S_PROT_W) | L1_S_PROT_RO) -#define l2pte_set_writable(pte) (L2_S_PROT_W == L2_S_PROT_RO ? \ -((pte) | L2_S_PROT_W) : (((pte) & ~L2_S_PROT_RO) | L2_S_PROT_W)) - -#define l2pte_set_readonly(pte) (L2_S_PROT_W == L2_S_PROT_RO ? \ -((pte) & ~L2_S_PROT_RO) : (((pte) & ~L2_S_PROT_W) | L2_S_PROT_RO)) +#define l2pte_set_writable(pte) (((pte) & ~L2_S_PROT_RO) | L2_S_PROT_W) +#define l2pte_set_readonly(pte) (((pte) & ~L2_S_PROT_W) | L2_S_PROT_RO) #define l2pte_writable_p(pte) (((pte) & L2_S_PROT_W) == L2_S_PROT_W && \ - (L2_S_PROT_W == L2_S_PROT_RO || \ + (L2_S_PROT_RO == 0 || \ ((pte) & L2_S_PROT_RO) != L2_S_PROT_RO)) /* * These macros return various bits based on kernel/user and protection. * Note that the compiler will usually fold these at compile time. */ -#define L1_S_PROT(ku, pr) ku) == PTE_USER) ? L1_S_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L1_S_PROT_W : \ - (L1_S_PROT_W == L1_S_PROT_RO ? 0 : L1_S_PROT_RO))) - -#define L2_L_PROT(ku, pr) ku) == PTE_USER) ? L2_L_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L2_L_PROT_W : \ - (L2_L_PROT_W == L2_L_PROT_RO ? 0 : L2_L_PROT_RO))) - -#define L2_S_PROT(ku, pr) ku) == PTE_USER) ? L2_S_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L2_S_PROT_W : \ - (L2_S_PROT_W == L2_S_PROT_RO ? 0 : L2_S_PROT_RO))) + +#define L1_S_PROT(ku, pr) ( \ + (((ku) == PTE_USER) ? \ + L1_S_PROT_U | (((pr) & VM_PROT_WRITE) ? L1_S_PROT_W : 0) \ + : \ + (((L1_S_PROT_RO && \ + ((pr) & (VM_PROT_READ | VM_PROT_WRITE)) == VM_PROT_READ) ? \ + L1_S_PROT_RO : L1_S_PROT_W))) \ +) + +#define L2_L_PROT(ku, pr) ( \ + (((ku) == PTE_USER) ? \ + L2_L_PROT_U | (((pr) & VM_PROT_WRITE) ? L2_L_PROT_W : 0) \ + : \ + (((L2_L_PROT_RO && \ + ((pr) & (VM_PROT_READ | VM_PROT_WRITE)) == VM_PROT_READ) ? \ + L2_L_PROT_RO :
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Tue Aug 29 06:28:27 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Revert the *_PROT_RO_* define changes and do all the work in the *_PROT() macros for RO kernel pages. cats boots again - no idea how it slipped through my testing previously To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Tue Jul 11 20:42:17 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Fix up L{1_S,2_L,2_S}_PROT for recent changes to the L{1_S,2_L,2_S}_PROT_RO* values. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Tue Jul 11 20:42:17 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Fix up L{1_S,2_L,2_S}_PROT for recent changes to the L{1_S,2_L,2_S}_PROT_RO* values. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.150 src/sys/arch/arm/include/arm32/pmap.h:1.151 --- src/sys/arch/arm/include/arm32/pmap.h:1.150 Thu Jul 6 15:17:47 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Tue Jul 11 20:42:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.150 2017/07/06 15:17:47 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.151 2017/07/11 20:42:17 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -1043,13 +1043,16 @@ extern void (*pmap_zero_page_func)(paddr * Note that the compiler will usually fold these at compile time. */ #define L1_S_PROT(ku, pr) ku) == PTE_USER) ? L1_S_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L1_S_PROT_W : L1_S_PROT_RO)) + (((pr) & VM_PROT_WRITE) ? L1_S_PROT_W : \ + (L1_S_PROT_W == L1_S_PROT_RO ? 0 : L1_S_PROT_RO))) #define L2_L_PROT(ku, pr) ku) == PTE_USER) ? L2_L_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L2_L_PROT_W : L2_L_PROT_RO)) + (((pr) & VM_PROT_WRITE) ? L2_L_PROT_W : \ + (L2_L_PROT_W == L2_L_PROT_RO ? 0 : L2_L_PROT_RO))) #define L2_S_PROT(ku, pr) ku) == PTE_USER) ? L2_S_PROT_U : 0) | \ - (((pr) & VM_PROT_WRITE) ? L2_S_PROT_W : L2_S_PROT_RO)) + (((pr) & VM_PROT_WRITE) ? L2_S_PROT_W : \ + (L2_S_PROT_W == L2_S_PROT_RO ? 0 : L2_S_PROT_RO))) /* * Macros to test if a mapping is mappable with an L1 SuperSection,
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Fri Jul 7 16:59:35 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Fixup the non-KDTRACE_HOOKS case of PUSHDTRACEGAP - we need to copy the stack pointer to r2. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32/frame.h diff -u src/sys/arch/arm/include/arm32/frame.h:1.44 src/sys/arch/arm/include/arm32/frame.h:1.45 --- src/sys/arch/arm/include/arm32/frame.h:1.44 Fri Jul 7 00:34:09 2017 +++ src/sys/arch/arm/include/arm32/frame.h Fri Jul 7 16:59:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.44 2017/07/07 00:34:09 chs Exp $ */ +/* $NetBSD: frame.h,v 1.45 2017/07/07 16:59:35 skrll Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -455,7 +455,8 @@ LOCK_CAS_DEBUG_LOCALS mov r2, sp; \ subeq r2, r2, #(4 * 16); /* if so, leave a gap for dtrace */ #else -#define PUSHDTRACEGAP /* nothing */ +#define PUSHDTRACEGAP \ + mov r2, sp #endif #define PUSHTRAPFRAME(rX) \
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Fri Jul 7 16:59:35 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Fixup the non-KDTRACE_HOOKS case of PUSHDTRACEGAP - we need to copy the stack pointer to r2. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu Jul 6 15:17:47 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: KNF two comments To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.149 src/sys/arch/arm/include/arm32/pmap.h:1.150 --- src/sys/arch/arm/include/arm32/pmap.h:1.149 Thu Jul 6 15:07:56 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Thu Jul 6 15:17:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.149 2017/07/06 15:07:56 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.150 2017/07/06 15:17:47 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -924,8 +924,10 @@ extern void (*pmap_zero_page_func)(paddr #define L2_L_CACHE_MASK L2_L_CACHE_MASK_armv6n #define L2_S_CACHE_MASK L2_S_CACHE_MASK_armv6n -/* These prototypes make writeable mappings, while the other MMU types - * make read-only mappings. */ +/* + * These prototypes make writeable mappings, while the other MMU types + * make read-only mappings. + */ #define L1_SS_PROTO L1_SS_PROTO_armv6 #define L1_S_PROTO L1_S_PROTO_armv6 #define L1_C_PROTO L1_C_PROTO_armv6 @@ -1007,8 +1009,10 @@ extern void (*pmap_zero_page_func)(paddr #define L2_L_CACHE_MASK L2_L_CACHE_MASK_armv7 #define L2_S_CACHE_MASK L2_S_CACHE_MASK_armv7 -/* These prototypes make writeable mappings, while the other MMU types - * make read-only mappings. */ +/* + * These prototypes make writeable mappings, while the other MMU types + * make read-only mappings. + */ #define L1_SS_PROTO L1_SS_PROTO_armv7 #define L1_S_PROTO L1_S_PROTO_armv7 #define L1_C_PROTO L1_C_PROTO_armv7
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Thu Jul 6 15:17:47 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: KNF two comments To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu Jul 6 15:07:56 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Re-define the L*_PROT_RO for MMUs that don't really support RO mapping and adjust l2pte_set_{writeable,readony} to the new values. This allows RO mappings for MMUs that actually support them. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu Jul 6 15:07:56 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Re-define the L*_PROT_RO for MMUs that don't really support RO mapping and adjust l2pte_set_{writeable,readony} to the new values. This allows RO mappings for MMUs that actually support them. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.148 src/sys/arch/arm/include/arm32/pmap.h:1.149 --- src/sys/arch/arm/include/arm32/pmap.h:1.148 Thu Jul 6 06:31:24 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Thu Jul 6 15:07:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.148 2017/07/06 06:31:24 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.149 2017/07/06 15:07:56 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -728,12 +728,12 @@ extern void (*pmap_zero_page_func)(paddr */ #define L1_S_PROT_U_generic (L1_S_AP(AP_U)) #define L1_S_PROT_W_generic (L1_S_AP(AP_W)) -#define L1_S_PROT_RO_generic (0) +#define L1_S_PROT_RO_generic (L1_S_AP(AP_R)) /* AP_W == AP_R */ #define L1_S_PROT_MASK_generic (L1_S_PROT_U|L1_S_PROT_W|L1_S_PROT_RO) #define L1_S_PROT_U_xscale (L1_S_AP(AP_U)) #define L1_S_PROT_W_xscale (L1_S_AP(AP_W)) -#define L1_S_PROT_RO_xscale (0) +#define L1_S_PROT_RO_xscale (L1_S_AP(AP_R)) /* AP_W == AP_R */ #define L1_S_PROT_MASK_xscale (L1_S_PROT_U|L1_S_PROT_W|L1_S_PROT_RO) #define L1_S_PROT_U_armv6 (L1_S_AP(AP_R) | L1_S_AP(AP_U)) @@ -754,12 +754,12 @@ extern void (*pmap_zero_page_func)(paddr #define L2_L_PROT_U_generic (L2_AP(AP_U)) #define L2_L_PROT_W_generic (L2_AP(AP_W)) -#define L2_L_PROT_RO_generic (0) +#define L2_L_PROT_RO_generic (L2_AP(AP_R)) #define L2_L_PROT_MASK_generic (L2_L_PROT_U|L2_L_PROT_W|L2_L_PROT_RO) #define L2_L_PROT_U_xscale (L2_AP(AP_U)) #define L2_L_PROT_W_xscale (L2_AP(AP_W)) -#define L2_L_PROT_RO_xscale (0) +#define L2_L_PROT_RO_xscale (L2_AP(AP_R)) #define L2_L_PROT_MASK_xscale (L2_L_PROT_U|L2_L_PROT_W|L2_L_PROT_RO) #define L2_L_PROT_U_armv6n (L2_AP0(AP_R) | L2_AP0(AP_U)) @@ -780,12 +780,12 @@ extern void (*pmap_zero_page_func)(paddr #define L2_S_PROT_U_generic (L2_AP(AP_U)) #define L2_S_PROT_W_generic (L2_AP(AP_W)) -#define L2_S_PROT_RO_generic (0) +#define L2_S_PROT_RO_generic (L2_AP(AP_R)) #define L2_S_PROT_MASK_generic (L2_S_PROT_U|L2_S_PROT_W|L2_S_PROT_RO) #define L2_S_PROT_U_xscale (L2_AP0(AP_U)) #define L2_S_PROT_W_xscale (L2_AP0(AP_W)) -#define L2_S_PROT_RO_xscale (0) +#define L2_S_PROT_RO_xscale (L2_AP(AP_R)) #define L2_S_PROT_MASK_xscale (L2_S_PROT_U|L2_S_PROT_W|L2_S_PROT_RO) #define L2_S_PROT_U_armv6n (L2_AP0(AP_R) | L2_AP0(AP_U)) @@ -1023,11 +1023,15 @@ extern void (*pmap_zero_page_func)(paddr */ #define l1pte_set_writable(pte) (((pte) & ~L1_S_PROT_RO) | L1_S_PROT_W) #define l1pte_set_readonly(pte) (((pte) & ~L1_S_PROT_W) | L1_S_PROT_RO) -#define l2pte_set_writable(pte) (((pte) & ~L2_S_PROT_RO) | L2_S_PROT_W) -#define l2pte_set_readonly(pte) (((pte) & ~L2_S_PROT_W) | L2_S_PROT_RO) + +#define l2pte_set_writable(pte) (L2_S_PROT_W == L2_S_PROT_RO ? \ +((pte) | L2_S_PROT_W) : (((pte) & ~L2_S_PROT_RO) | L2_S_PROT_W)) + +#define l2pte_set_readonly(pte) (L2_S_PROT_W == L2_S_PROT_RO ? \ +((pte) & ~L2_S_PROT_RO) : (((pte) & ~L2_S_PROT_W) | L2_S_PROT_RO)) #define l2pte_writable_p(pte) (((pte) & L2_S_PROT_W) == L2_S_PROT_W && \ - (L2_S_PROT_RO == 0 || \ + (L2_S_PROT_W == L2_S_PROT_RO || \ ((pte) & L2_S_PROT_RO) != L2_S_PROT_RO)) /*
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Thu Jul 6 06:31:24 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.147 src/sys/arch/arm/include/arm32/pmap.h:1.148 --- src/sys/arch/arm/include/arm32/pmap.h:1.147 Thu May 25 20:42:41 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Thu Jul 6 06:31:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.147 2017/05/25 20:42:41 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.148 2017/07/06 06:31:24 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -488,7 +488,7 @@ extern int pmap_needs_pte_sync; * Finally, MEMC, GENERIC and XSCALE MMUs do not need PTE syncs. * * Use run time evaluation for all other cases. - * + * */ #if (ARM_NMMUS == 1) #if (ARM_MMU_SA1 + ARM_MMU_V6 != 0)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Thu Jul 6 06:31:24 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu Jun 22 08:44:21 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/include/arm32/frame.h 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/include/arm32/frame.h diff -u src/sys/arch/arm/include/arm32/frame.h:1.42 src/sys/arch/arm/include/arm32/frame.h:1.43 --- src/sys/arch/arm/include/arm32/frame.h:1.42 Fri Apr 17 17:28:33 2015 +++ src/sys/arch/arm/include/arm32/frame.h Thu Jun 22 08:44:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.42 2015/04/17 17:28:33 matt Exp $ */ +/* $NetBSD: frame.h,v 1.43 2017/06/22 08:44:21 skrll Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -64,7 +64,7 @@ struct switchframe { u_int sf_sp; u_int sf_pc; }; - + /* * System stack frames. */ @@ -240,7 +240,7 @@ void validate_trapframe(trapframe_t *, i #define ENABLE_ALIGNMENT_FAULTS \ and r7, r0, #(PSR_MODE) /* Test for USR32 mode */ ;\ GET_CURCPU(r4) /* r4 = cpuinfo */ - + #define DO_AST_AND_RESTORE_ALIGNMENT_FAULTS\ DO_PENDING_SOFTINTS ;\ @@ -423,7 +423,7 @@ LOCK_CAS_DEBUG_LOCALS * This should only be used if the processor is not currently in SVC32 * mode. The processor mode is switched to SVC mode and the trap frame is * stored. The SVC lr field is used to store the previous value of - * lr in SVC mode. + * lr in SVC mode. * * NOTE: r13 and r14 are stored separately as a work around for the * SA110 rev 2 STM^ bug
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Thu Jun 22 08:44:21 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/include/arm32/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/arm/include/arm32
This breaks kernel builds: /home/jmcneill/netbsd/cvs-src/sys/uvm/pmap/pmap_tlb.c: In function 'pmap_tlb_update_addr': /home/jmcneill/netbsd/cvs-src/sys/uvm/pmap/pmap_tlb.c:739:13: error: implicit declaration of function 'pte_valid_p' [-Werror=implicit-function-declaration] KASSERTMSG(pte_valid_p(pte), "va %#"PRIxVADDR" %#"PRIxPTE, On Thu, 25 May 2017, Nick Hudson wrote: Module Name:src Committed By: skrll Date: Thu May 25 20:42:41 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Use the define name PMAP_HWPAGEWALKER and not PMAP_TLB_HWPAGEWALKER To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu May 25 20:42:41 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Use the define name PMAP_HWPAGEWALKER and not PMAP_TLB_HWPAGEWALKER To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.146 src/sys/arch/arm/include/arm32/pmap.h:1.147 --- src/sys/arch/arm/include/arm32/pmap.h:1.146 Thu May 25 20:32:48 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Thu May 25 20:42:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.146 2017/05/25 20:32:48 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.147 2017/05/25 20:42:41 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -84,8 +84,8 @@ #endif #ifdef ARM_MMU_EXTENDED +#define PMAP_HWPAGEWALKER 1 #define PMAP_TLB_MAX 1 -#define PMAP_TLB_HWPAGEWALKER 1 #if PMAP_TLB_MAX > 1 #define PMAP_TLB_NEED_SHOOTDOWN 1 #endif
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Thu May 25 20:42:41 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Use the define name PMAP_HWPAGEWALKER and not PMAP_TLB_HWPAGEWALKER To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Thu May 25 20:32:48 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Spell ARM_MMU_EXTENDED correctly To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.145 src/sys/arch/arm/include/arm32/pmap.h:1.146 --- src/sys/arch/arm/include/arm32/pmap.h:1.145 Thu Feb 23 08:22:20 2017 +++ src/sys/arch/arm/include/arm32/pmap.h Thu May 25 20:32:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.145 2017/02/23 08:22:20 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.146 2017/05/25 20:32:48 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -167,7 +167,7 @@ #ifndef _LOCORE -#ifndef PMAP_MMU_EXTENDED +#ifndef ARM_MMU_EXTENDED struct l1_ttable; struct l2_dtable;
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Thu May 25 20:32:48 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Spell ARM_MMU_EXTENDED correctly To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/arm/include/arm32/pmap.h 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/include/arm32
Module Name:src Committed By: skrll Date: Mon Feb 20 17:23:54 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: Whitespace in comment To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32
Module Name:src Committed By: skrll Date: Mon Feb 20 17:23:54 UTC 2017 Modified Files: src/sys/arch/arm/include/arm32: machdep.h Log Message: Whitespace in comment To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/arm32/machdep.h 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/include/arm32/machdep.h diff -u src/sys/arch/arm/include/arm32/machdep.h:1.20 src/sys/arch/arm/include/arm32/machdep.h:1.21 --- src/sys/arch/arm/include/arm32/machdep.h:1.20 Mon Feb 20 17:22:26 2017 +++ src/sys/arch/arm/include/arm32/machdep.h Mon Feb 20 17:23:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.20 2017/02/20 17:22:26 skrll Exp $ */ +/* $NetBSD: machdep.h,v 1.21 2017/02/20 17:23:54 skrll Exp $ */ #ifndef _ARM32_BOOT_MACHDEP_H_ #define _ARM32_BOOT_MACHDEP_H_ @@ -69,7 +69,7 @@ void undefinedinstruction_bounce(trapfra void dumpsys(void); /* - * note that we use void *as all the platforms have different ideas on what + * note that we use void * as all the platforms have different ideas on what * the structure is */ u_int initarm(void *);