CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Mon May 6 07:29:30 UTC 2024 Modified Files: src/sys/arch/arm/include: setjmp.h Log Message: Improve the comment. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/include/setjmp.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
Module Name:src Committed By: skrll Date: Mon May 6 07:29:30 UTC 2024 Modified Files: src/sys/arch/arm/include: setjmp.h Log Message: Improve the comment. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/include/setjmp.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/setjmp.h diff -u src/sys/arch/arm/include/setjmp.h:1.5 src/sys/arch/arm/include/setjmp.h:1.6 --- src/sys/arch/arm/include/setjmp.h:1.5 Fri Jan 11 13:56:32 2013 +++ src/sys/arch/arm/include/setjmp.h Mon May 6 07:29:30 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.h,v 1.5 2013/01/11 13:56:32 matt Exp $ */ +/* $NetBSD: setjmp.h,v 1.6 2024/05/06 07:29:30 skrll Exp $ */ /* * machine/setjmp.h: machine dependent setjmp-related information. @@ -10,11 +10,12 @@ * NOTE: The internal structure of a jmp_buf is *PRIVATE* * This information is provided as there is software * that fiddles with this with obtain the stack pointer - * (yes really ! and its commercial !). + * (yes really ! and it's commercial !). * * Description of the setjmp buffer * - * word 0 magic number (dependent on creator) + * Word Field Comment + * 0 magic number (dependent on creator) * 13 fpscr vfp status control register * 14 r4 register 4 * 15 r5 register 5 @@ -47,13 +48,13 @@ * A side note I should mention - Please do not tamper * with the floating point fields. While they are * always saved and restored at the moment this cannot - * be garenteed especially if the compiler happens + * be guaranteed especially if the compiler happens * to be generating soft-float code so no fp * registers will be used. * - * Whilst this can be seen an encouraging people to + * Whilst this can be seen as encouraging people to * use the setjmp buffer in this way I think that it - * is for the best then if changes occur compiles will + * is for the best then, if changes occur, compiles will * break rather than just having new builds falling over * mysteriously. */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: riastradh Date: Tue Jul 11 11:01:18 UTC 2023 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: arm/cpu.h: Need sys/param.h for COHERENCY_UNIT. Nix machine/param.h -- not meant to be used directly, pulled in by sys/param.h. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/arch/arm/include/cpu.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/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.124 src/sys/arch/arm/include/cpu.h:1.125 --- src/sys/arch/arm/include/cpu.h:1.124 Sun Jun 25 07:16:14 2023 +++ src/sys/arch/arm/include/cpu.h Tue Jul 11 11:01:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.124 2023/06/25 07:16:14 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.125 2023/07/11 11:01:18 riastradh Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -150,6 +150,8 @@ static inline void set_curcpl(int); static inline void cpu_dosoftints(void); #endif +#include + #ifdef _KMEMUSER #include #endif @@ -158,8 +160,6 @@ static inline void cpu_dosoftints(void); #include #include -#include - /* * Cache info variables. */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: riastradh Date: Tue Jul 11 11:01:18 UTC 2023 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: arm/cpu.h: Need sys/param.h for COHERENCY_UNIT. Nix machine/param.h -- not meant to be used directly, pulled in by sys/param.h. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/arch/arm/include/cpu.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
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:41:58 UTC 2023 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: arm/mutex.h: Need machine/intr.h, machine/lock.h. For ipl_cookie_t and __cpu_simple_lock_t. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/include/mutex.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
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:41:58 UTC 2023 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: arm/mutex.h: Need machine/intr.h, machine/lock.h. For ipl_cookie_t and __cpu_simple_lock_t. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/include/mutex.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/mutex.h diff -u src/sys/arch/arm/include/mutex.h:1.27 src/sys/arch/arm/include/mutex.h:1.28 --- src/sys/arch/arm/include/mutex.h:1.27 Sun Dec 26 08:41:29 2021 +++ src/sys/arch/arm/include/mutex.h Tue Jul 11 10:41:58 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.27 2021/12/26 08:41:29 skrll Exp $ */ +/* $NetBSD: mutex.h,v 1.28 2023/07/11 10:41:58 riastradh Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -32,6 +32,11 @@ #ifndef _ARM_MUTEX_H_ #define _ARM_MUTEX_H_ +#ifdef _KERNEL +#include +#include +#endif + /* * The ARM mutex implementation is troublesome, because pre-v6 ARM lacks a * compare-and-swap operation. However, there aren't any MP pre-v6 ARM
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Jun 25 07:16:14 UTC 2023 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: G/C an unused struct cpu_info member To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/arm/include/cpu.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/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.123 src/sys/arch/arm/include/cpu.h:1.124 --- src/sys/arch/arm/include/cpu.h:1.123 Sat Jun 25 12:41:56 2022 +++ src/sys/arch/arm/include/cpu.h Sun Jun 25 07:16:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.123 2022/06/25 12:41:56 jmcneill Exp $ */ +/* $NetBSD: cpu.h,v 1.124 2023/06/25 07:16:14 skrll Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -236,8 +236,6 @@ struct cpu_info { uint32_t ci_vfp_id; uint64_t ci_lastintr; - struct pmap_tlb_info * - ci_tlb_info; struct pmap * ci_pmap_lastuser; struct pmap * ci_pmap_cur; tlb_asid_t ci_pmap_asid_cur;
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Jun 25 07:16:14 UTC 2023 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: G/C an unused struct cpu_info member To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/arm/include/cpu.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: 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
Module Name:src Committed By: skrll Date: Tue Apr 18 11:06:57 UTC 2023 Modified Files: src/sys/arch/arm/include: bus_funcs.h Log Message: G/C unnecessary extern paddr_t physical_start, physical_end; To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/bus_funcs.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/bus_funcs.h diff -u src/sys/arch/arm/include/bus_funcs.h:1.12 src/sys/arch/arm/include/bus_funcs.h:1.13 --- src/sys/arch/arm/include/bus_funcs.h:1.12 Sat Nov 19 12:15:22 2022 +++ src/sys/arch/arm/include/bus_funcs.h Tue Apr 18 11:06:57 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_funcs.h,v 1.12 2022/11/19 12:15:22 skrll Exp $ */ +/* $NetBSD: bus_funcs.h,v 1.13 2023/04/18 11:06:57 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -708,8 +708,6 @@ void bus_dmamap_sync(bus_dma_tag_t, bus_ #ifdef _ARM32_BUS_DMA_PRIVATE -extern paddr_t physical_start, physical_end; - int arm32_dma_range_intersect(struct arm32_dma_range *, int, paddr_t pa, psize_t size, paddr_t *pap, psize_t *sizep);
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Apr 18 11:06:57 UTC 2023 Modified Files: src/sys/arch/arm/include: bus_funcs.h Log Message: G/C unnecessary extern paddr_t physical_start, physical_end; To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/bus_funcs.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
Module Name:src Committed By: skrll Date: Sat Nov 19 12:15:22 UTC 2022 Modified Files: src/sys/arch/arm/include: bus_funcs.h Log Message: Fix _bus_dmamem_alloc_range function declaration - low and high are paddr_t To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/bus_funcs.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/bus_funcs.h diff -u src/sys/arch/arm/include/bus_funcs.h:1.11 src/sys/arch/arm/include/bus_funcs.h:1.12 --- src/sys/arch/arm/include/bus_funcs.h:1.11 Sun Jan 24 13:33:56 2021 +++ src/sys/arch/arm/include/bus_funcs.h Sat Nov 19 12:15:22 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_funcs.h,v 1.11 2021/01/24 13:33:56 martin Exp $ */ +/* $NetBSD: bus_funcs.h,v 1.12 2022/11/19 12:15:22 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -769,7 +769,7 @@ paddr_t _bus_dmamem_mmap(bus_dma_tag_t t int _bus_dmamem_alloc_range(bus_dma_tag_t tag, bus_size_t size, bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags, - vaddr_t low, vaddr_t high); + paddr_t low, paddr_t high); int _bus_dmatag_subregion(bus_dma_tag_t, bus_addr_t, bus_addr_t, bus_dma_tag_t *, int);
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Nov 19 12:15:22 UTC 2022 Modified Files: src/sys/arch/arm/include: bus_funcs.h Log Message: Fix _bus_dmamem_alloc_range function declaration - low and high are paddr_t To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/bus_funcs.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
Module Name:src Committed By: riastradh Date: Sat Aug 20 10:54:44 UTC 2022 Modified Files: src/sys/arch/arm/include: efi.h Log Message: arm/efi.h: Add explicit padding to efi_systbl. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/include/efi.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/efi.h diff -u src/sys/arch/arm/include/efi.h:1.5 src/sys/arch/arm/include/efi.h:1.6 --- src/sys/arch/arm/include/efi.h:1.5 Sat Aug 20 10:54:34 2022 +++ src/sys/arch/arm/include/efi.h Sat Aug 20 10:54:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: efi.h,v 1.5 2022/08/20 10:54:34 riastradh Exp $ */ +/* $NetBSD: efi.h,v 1.6 2022/08/20 10:54:44 riastradh Exp $ */ /*- * Copyright (c) 2004 Marcel Moolenaar @@ -164,6 +164,9 @@ struct efi_systbl { #define EFI_SYSTBL_SIG 0x5453595320494249UL efi_char *st_fwvendor; uint32_t st_fwrev; +#ifdef _LP64 + uint32_t __pad; +#endif void *st_cin; void *st_cinif; void *st_cout;
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: riastradh Date: Sat Aug 20 10:54:44 UTC 2022 Modified Files: src/sys/arch/arm/include: efi.h Log Message: arm/efi.h: Add explicit padding to efi_systbl. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/include/efi.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
Module Name:src Committed By: riastradh Date: Sat Aug 20 10:54:34 UTC 2022 Modified Files: src/sys/arch/arm/include: efi.h Log Message: arm/efi.h: Assert size of struct efi_systbl. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/include/efi.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/efi.h diff -u src/sys/arch/arm/include/efi.h:1.4 src/sys/arch/arm/include/efi.h:1.5 --- src/sys/arch/arm/include/efi.h:1.4 Sat Aug 20 09:43:27 2022 +++ src/sys/arch/arm/include/efi.h Sat Aug 20 10:54:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: efi.h,v 1.4 2022/08/20 09:43:27 riastradh Exp $ */ +/* $NetBSD: efi.h,v 1.5 2022/08/20 10:54:34 riastradh Exp $ */ /*- * Copyright (c) 2004 Marcel Moolenaar @@ -175,5 +175,10 @@ struct efi_systbl { u_long st_entries; struct efi_cfgtbl *st_cfgtbl; }; +#ifdef _LP64 +__CTASSERT(sizeof(struct efi_systbl) == 120); +#else +__CTASSERT(sizeof(struct efi_systbl) == 72); +#endif #endif /* _ARM_EFI_H_ */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: riastradh Date: Sat Aug 20 10:54:34 UTC 2022 Modified Files: src/sys/arch/arm/include: efi.h Log Message: arm/efi.h: Assert size of struct efi_systbl. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/include/efi.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
Module Name:src Committed By: riastradh Date: Sat Aug 20 09:40:13 UTC 2022 Modified Files: src/sys/arch/arm/include: efi.h Log Message: arm/efi.h: Fix whitespace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/efi.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/efi.h diff -u src/sys/arch/arm/include/efi.h:1.2 src/sys/arch/arm/include/efi.h:1.3 --- src/sys/arch/arm/include/efi.h:1.2 Sat Aug 20 09:09:06 2022 +++ src/sys/arch/arm/include/efi.h Sat Aug 20 09:40:13 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: efi.h,v 1.2 2022/08/20 09:09:06 riastradh Exp $ */ +/* $NetBSD: efi.h,v 1.3 2022/08/20 09:40:13 riastradh Exp $ */ /*- * Copyright (c) 2004 Marcel Moolenaar @@ -38,9 +38,9 @@ #include -#defineEFI_PAGE_SHIFT 12 -#defineEFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) -#defineEFI_PAGE_MASK (EFI_PAGE_SIZE - 1) +#define EFI_PAGE_SHIFT 12 +#define EFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) +#define EFI_PAGE_MASK (EFI_PAGE_SIZE - 1) #define EFI_TABLE_ACPI20 \ {0x8868e871,0xe4f1,0x11d3,0xbc,0x22,{0x00,0x80,0xc7,0x3c,0x88,0x81}} @@ -65,115 +65,115 @@ enum efi_reset { EFI_RESET_PLATFORM_SPECIFIC, }; -typedef uint16_t efi_char; +typedef uint16_t efi_char; typedef unsigned long efi_status; struct efi_cfgtbl { - struct uuid ct_uuid; - void *ct_data; + struct uuid ct_uuid; + void *ct_data; }; struct efi_md { - uint32_tmd_type; -#defineEFI_MD_TYPE_NULL0 -#defineEFI_MD_TYPE_CODE1 /* Loader text. */ -#defineEFI_MD_TYPE_DATA2 /* Loader data. */ -#defineEFI_MD_TYPE_BS_CODE 3 /* Boot services text. */ -#defineEFI_MD_TYPE_BS_DATA 4 /* Boot services data. */ -#defineEFI_MD_TYPE_RT_CODE 5 /* Runtime services text. */ -#defineEFI_MD_TYPE_RT_DATA 6 /* Runtime services data. */ -#defineEFI_MD_TYPE_FREE7 /* Unused/free memory. */ -#defineEFI_MD_TYPE_BAD 8 /* Bad memory */ -#defineEFI_MD_TYPE_RECLAIM 9 /* ACPI reclaimable memory. */ -#defineEFI_MD_TYPE_FIRMWARE10 /* ACPI NV memory */ -#defineEFI_MD_TYPE_IOMEM 11 /* Memory-mapped I/O. */ -#defineEFI_MD_TYPE_IOPORT 12 /* I/O port space. */ -#defineEFI_MD_TYPE_PALCODE 13 /* PAL */ -#defineEFI_MD_TYPE_PMEM14 /* Persistent memory. */ - uint32_t__pad; - uint64_tmd_phys; - uint64_tmd_virt; - uint64_tmd_pages; - uint64_tmd_attr; -#defineEFI_MD_ATTR_UC 0x0001UL -#defineEFI_MD_ATTR_WC 0x0002UL -#defineEFI_MD_ATTR_WT 0x0004UL -#defineEFI_MD_ATTR_WB 0x0008UL -#defineEFI_MD_ATTR_UCE 0x0010UL -#defineEFI_MD_ATTR_WP 0x1000UL -#defineEFI_MD_ATTR_RP 0x2000UL -#defineEFI_MD_ATTR_XP 0x4000UL -#defineEFI_MD_ATTR_NV 0x8000UL -#defineEFI_MD_ATTR_MORE_RELIABLE 0x0001UL -#defineEFI_MD_ATTR_RO 0x0002UL -#defineEFI_MD_ATTR_SP 0x0004UL -#defineEFI_MD_ATTR_CPU_CRYPTO 0x0008UL -#defineEFI_MD_ATTR_RT 0x8000UL + uint32_t md_type; +#define EFI_MD_TYPE_NULL 0 +#define EFI_MD_TYPE_CODE 1 /* Loader text. */ +#define EFI_MD_TYPE_DATA 2 /* Loader data. */ +#define EFI_MD_TYPE_BS_CODE 3 /* Boot services text. */ +#define EFI_MD_TYPE_BS_DATA 4 /* Boot services data. */ +#define EFI_MD_TYPE_RT_CODE 5 /* Runtime services text. */ +#define EFI_MD_TYPE_RT_DATA 6 /* Runtime services data. */ +#define EFI_MD_TYPE_FREE 7 /* Unused/free memory. */ +#define EFI_MD_TYPE_BAD 8 /* Bad memory */ +#define EFI_MD_TYPE_RECLAIM 9 /* ACPI reclaimable memory. */ +#define EFI_MD_TYPE_FIRMWARE 10 /* ACPI NV memory */ +#define EFI_MD_TYPE_IOMEM 11 /* Memory-mapped I/O. */ +#define EFI_MD_TYPE_IOPORT 12 /* I/O port space. */ +#define EFI_MD_TYPE_PALCODE 13 /* PAL */ +#define EFI_MD_TYPE_PMEM 14 /* Persistent memory. */ + uint32_t __pad; + uint64_t md_phys; + uint64_t md_virt; + uint64_t md_pages; + uint64_t md_attr; +#define EFI_MD_ATTR_UC 0x0001UL +#define EFI_MD_ATTR_WC 0x0002UL +#define EFI_MD_ATTR_WT 0x0004UL +#define EFI_MD_ATTR_WB 0x0008UL +#define EFI_MD_ATTR_UCE 0x0010UL +#define EFI_MD_ATTR_WP 0x1000UL +#define EFI_MD_ATTR_RP 0x2000UL +#define EFI_MD_ATTR_XP 0x4000UL +#define
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: riastradh Date: Sat Aug 20 09:40:13 UTC 2022 Modified Files: src/sys/arch/arm/include: efi.h Log Message: arm/efi.h: Fix whitespace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/efi.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
Module Name:src Committed By: skrll Date: Thu Apr 28 10:05:47 UTC 2022 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/arm/include/cpufunc.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/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.89 src/sys/arch/arm/include/cpufunc.h:1.90 --- src/sys/arch/arm/include/cpufunc.h:1.89 Mon Nov 1 14:45:24 2021 +++ src/sys/arch/arm/include/cpufunc.h Thu Apr 28 10:05:47 2022 @@ -265,10 +265,6 @@ void cpufunc_domains (u_int); u_int cpufunc_faultstatus (void); u_int cpufunc_faultaddress (void); -#define setttb cpu_setttb -#define drain_writebuf cpu_drain_writebuf - - #if defined(CPU_XSCALE) #define cpu_cpwait() cpufuncs.cf_cpwait() #endif
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Thu Apr 28 10:05:47 UTC 2022 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/arm/include/cpufunc.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
Module Name:src Committed By: skrll Date: Sun Dec 26 08:41:29 UTC 2021 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: port-arm/50563: pool allocator corruption due to __MUTEX_PRIVATE This file has moved on somewhat since the PR was raised, but nevertheless let's add the CTASSERT "just in case". To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/mutex.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/mutex.h diff -u src/sys/arch/arm/include/mutex.h:1.26 src/sys/arch/arm/include/mutex.h:1.27 --- src/sys/arch/arm/include/mutex.h:1.26 Wed Aug 25 04:13:41 2021 +++ src/sys/arch/arm/include/mutex.h Sun Dec 26 08:41:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.26 2021/08/25 04:13:41 thorpej Exp $ */ +/* $NetBSD: mutex.h,v 1.27 2021/12/26 08:41:29 skrll Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -82,4 +82,6 @@ struct kmutex { #endif /* __MUTEX_PRIVATE */ +__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t)); + #endif /* _ARM_MUTEX_H_ */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Dec 26 08:41:29 UTC 2021 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: port-arm/50563: pool allocator corruption due to __MUTEX_PRIVATE This file has moved on somewhat since the PR was raised, but nevertheless let's add the CTASSERT "just in case". To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/mutex.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
Module Name:src Committed By: riastradh Date: Sat Dec 18 16:41:37 UTC 2021 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: arm: Forward-declare `struct proc' before using in prototype. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/arch/arm/include/cpu.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
Module Name:src Committed By: riastradh Date: Sat Dec 18 16:41:37 UTC 2021 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: arm: Forward-declare `struct proc' before using in prototype. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/arch/arm/include/cpu.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/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.121 src/sys/arch/arm/include/cpu.h:1.122 --- src/sys/arch/arm/include/cpu.h:1.121 Mon Nov 1 14:45:24 2021 +++ src/sys/arch/arm/include/cpu.h Sat Dec 18 16:41:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.121 2021/11/01 14:45:24 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.122 2021/12/18 16:41:37 riastradh Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -67,6 +67,8 @@ void cpu_set_hatched(int); #endif +struct proc; + void cpu_proc_fork(struct proc *, struct proc *); #endif /* !_LOCORE */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Nov 27 08:25:18 UTC 2021 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add the Cortex A17 Diagnostic control registers To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/arch/arm/include/armreg.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/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.133 src/sys/arch/arm/include/armreg.h:1.134 --- src/sys/arch/arm/include/armreg.h:1.133 Sat Nov 13 01:48:12 2021 +++ src/sys/arch/arm/include/armreg.h Sat Nov 27 08:25:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.133 2021/11/13 01:48:12 jmcneill Exp $ */ +/* $NetBSD: armreg.h,v 1.134 2021/11/27 08:25:18 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -916,7 +916,16 @@ ARMREG_WRITE64_INLINE(cntv_cval, "p15,3, ARMREG_READ64_INLINE(cntvoff, "p15,4,%Q0,%R0,c14") /* Virtual Offset Register */ ARMREG_WRITE64_INLINE(cntvoff, "p15,4,%Q0,%R0,c14") /* Virtual Offset Register */ /* cp15 c15 registers */ +/* Cortex A17 Diagnostic control registers */ +ARMREG_READ_INLINE(dgnctlr0, "p15,0,%0,c15,c0,0") /* DGNCTLR0 */ +ARMREG_WRITE_INLINE(dgnctlr0, "p15,0,%0,c15,c0,0") /* DGNCTLR0 */ +ARMREG_READ_INLINE(dgnctlr1, "p15,0,%0,c15,c0,1") /* DGNCTLR1 */ +ARMREG_WRITE_INLINE(dgnctlr1, "p15,0,%0,c15,c0,1") /* DGNCTLR1 */ +ARMREG_READ_INLINE(dgnctlr2, "p15,0,%0,c15,c0,2") /* DGNCTLR2 */ +ARMREG_WRITE_INLINE(dgnctlr2, "p15,0,%0,c15,c0,2") /* DGNCTLR2 */ + ARMREG_READ_INLINE(cbar, "p15,4,%0,c15,c0,0") /* Configuration Base Address Register */ + ARMREG_READ_INLINE(pmcrv6, "p15,0,%0,c15,c12,0") /* PMC Control Register (armv6) */ ARMREG_WRITE_INLINE(pmcrv6, "p15,0,%0,c15,c12,0") /* PMC Control Register (armv6) */ ARMREG_READ_INLINE(pmccntrv6, "p15,0,%0,c15,c12,1") /* PMC Cycle Counter (armv6) */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Nov 27 08:25:18 UTC 2021 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add the Cortex A17 Diagnostic control registers To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/arch/arm/include/armreg.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
Module Name:src Committed By: simonb Date: Sat Nov 13 01:09:51 UTC 2021 Modified Files: src/sys/arch/arm/include: cputypes.h Log Message: Fix tyop in a comment. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/cputypes.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/cputypes.h diff -u src/sys/arch/arm/include/cputypes.h:1.15 src/sys/arch/arm/include/cputypes.h:1.16 --- src/sys/arch/arm/include/cputypes.h:1.15 Fri Nov 12 06:44:46 2021 +++ src/sys/arch/arm/include/cputypes.h Sat Nov 13 01:09:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cputypes.h,v 1.15 2021/11/12 06:44:46 skrll Exp $ */ +/* $NetBSD: cputypes.h,v 1.16 2021/11/13 01:09:51 simonb Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -209,7 +209,7 @@ #define CPU_ID_THUNDERX2RX 0x43000af0 /* - * Chip-specific errata. This defines are intended to be + * Chip-specific errata. These defines are intended to be * booleans used within if statements. When an appropriate * kernel option is disabled, these defines must be defined * as 0 to allow the compiler to remove a dead code thus
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: simonb Date: Sat Nov 13 01:09:51 UTC 2021 Modified Files: src/sys/arch/arm/include: cputypes.h Log Message: Fix tyop in a comment. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/cputypes.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
Module Name:src Committed By: skrll Date: Mon Nov 1 14:45:24 UTC 2021 Modified Files: src/sys/arch/arm/include: cpu.h cpufunc.h Log Message: Move arm_cache_info from cpufunc.h to cpu.h To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/arch/arm/include/cpu.h cvs rdiff -u -r1.88 -r1.89 src/sys/arch/arm/include/cpufunc.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/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.120 src/sys/arch/arm/include/cpu.h:1.121 --- src/sys/arch/arm/include/cpu.h:1.120 Sun Oct 31 16:23:47 2021 +++ src/sys/arch/arm/include/cpu.h Mon Nov 1 14:45:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.120 2021/10/31 16:23:47 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.121 2021/11/01 14:45:24 skrll Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -156,9 +156,37 @@ static inline void cpu_dosoftints(void); #include #include -#include #include +/* + * Cache info variables. + */ +#define CACHE_TYPE_VIVT 0 +#define CACHE_TYPE_xxPT 1 +#define CACHE_TYPE_VIPT 1 +#define CACHE_TYPE_PIxx 2 +#define CACHE_TYPE_PIPT 3 + +/* PRIMARY CACHE VARIABLES */ +struct arm_cache_info { + u_int icache_size; + u_int icache_line_size; + u_int icache_ways; + u_int icache_way_size; + u_int icache_sets; + + u_int dcache_size; + u_int dcache_line_size; + u_int dcache_ways; + u_int dcache_way_size; + u_int dcache_sets; + + uint8_t cache_type; + bool cache_unified; + uint8_t icache_type; + uint8_t dcache_type; +}; + struct cpu_info { struct cpu_data ci_data; /* MI per-cpu data */ device_t ci_dev; /* Device corresponding to this CPU */ Index: src/sys/arch/arm/include/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.88 src/sys/arch/arm/include/cpufunc.h:1.89 --- src/sys/arch/arm/include/cpufunc.h:1.88 Mon Mar 1 11:29:14 2021 +++ src/sys/arch/arm/include/cpufunc.h Mon Nov 1 14:45:24 2021 @@ -410,35 +410,6 @@ u_int GetCPSR(void); void cpu_reset (void) __dead; -/* - * Cache info variables. - */ -#define CACHE_TYPE_VIVT 0 -#define CACHE_TYPE_xxPT 1 -#define CACHE_TYPE_VIPT 1 -#define CACHE_TYPE_PIxx 2 -#define CACHE_TYPE_PIPT 3 - -/* PRIMARY CACHE VARIABLES */ -struct arm_cache_info { - u_int icache_size; - u_int icache_line_size; - u_int icache_ways; - u_int icache_way_size; - u_int icache_sets; - - u_int dcache_size; - u_int dcache_line_size; - u_int dcache_ways; - u_int dcache_way_size; - u_int dcache_sets; - - uint8_t cache_type; - bool cache_unified; - uint8_t icache_type; - uint8_t dcache_type; -}; - #if (ARM_MMU_V6 + ARM_MMU_V7) != 0 extern u_int arm_cache_prefer_mask; #endif
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Mon Nov 1 14:45:24 UTC 2021 Modified Files: src/sys/arch/arm/include: cpu.h cpufunc.h Log Message: Move arm_cache_info from cpufunc.h to cpu.h To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/arch/arm/include/cpu.h cvs rdiff -u -r1.88 -r1.89 src/sys/arch/arm/include/cpufunc.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
Module Name:src Committed By: thorpej Date: Sat Oct 30 19:54:58 UTC 2021 Modified Files: src/sys/arch/arm/include: signal.h Log Message: Fix the previous to only apply to the non-AArch64 case. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/signal.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/signal.h diff -u src/sys/arch/arm/include/signal.h:1.19 src/sys/arch/arm/include/signal.h:1.20 --- src/sys/arch/arm/include/signal.h:1.19 Sat Oct 30 15:51:52 2021 +++ src/sys/arch/arm/include/signal.h Sat Oct 30 19:54:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.19 2021/10/30 15:51:52 thorpej Exp $ */ +/* $NetBSD: signal.h,v 1.20 2021/10/30 19:54:58 thorpej Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -49,14 +49,14 @@ #include #include -#define __HAVE_STRUCT_SIGCONTEXT - #ifndef _LOCORE typedef int sig_atomic_t; #endif #if defined(__arm__) +#define __HAVE_STRUCT_SIGCONTEXT + #if defined(_NETBSD_SOURCE) #ifndef _LOCORE
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: thorpej Date: Sat Oct 30 19:54:58 UTC 2021 Modified Files: src/sys/arch/arm/include: signal.h Log Message: Fix the previous to only apply to the non-AArch64 case. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/signal.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
Module Name:src Committed By: thorpej Date: Sat Oct 30 15:51:52 UTC 2021 Modified Files: src/sys/arch/arm/include: signal.h Log Message: Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/include/signal.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/signal.h diff -u src/sys/arch/arm/include/signal.h:1.18 src/sys/arch/arm/include/signal.h:1.19 --- src/sys/arch/arm/include/signal.h:1.18 Wed Oct 27 01:09:36 2021 +++ src/sys/arch/arm/include/signal.h Sat Oct 30 15:51:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.18 2021/10/27 01:09:36 thorpej Exp $ */ +/* $NetBSD: signal.h,v 1.19 2021/10/30 15:51:52 thorpej Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -49,6 +49,8 @@ #include #include +#define __HAVE_STRUCT_SIGCONTEXT + #ifndef _LOCORE typedef int sig_atomic_t; #endif @@ -93,7 +95,6 @@ struct sigcontext13 { #endif /* _KERNEL */ #if defined(_LIBC) || defined(_KERNEL) -#define __HAVE_STRUCT_SIGCONTEXT struct sigcontext { int sc_onstack; /* sigstack state to restore */ int __sc_mask13; /* signal mask to restore (old style) */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: thorpej Date: Sat Oct 30 15:51:52 UTC 2021 Modified Files: src/sys/arch/arm/include: signal.h Log Message: Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/include/signal.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
Module Name:src Committed By: thorpej Date: Wed Oct 27 01:09:36 UTC 2021 Modified Files: src/sys/arch/arm/include: signal.h Log Message: Make sigcontext13 visible only to _KERNEL. Make sigcontext visible only to _LIBC and _KERNEL. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/signal.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/signal.h diff -u src/sys/arch/arm/include/signal.h:1.17 src/sys/arch/arm/include/signal.h:1.18 --- src/sys/arch/arm/include/signal.h:1.17 Tue Oct 26 16:16:34 2021 +++ src/sys/arch/arm/include/signal.h Wed Oct 27 01:09:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.17 2021/10/26 16:16:34 christos Exp $ */ +/* $NetBSD: signal.h,v 1.18 2021/10/27 01:09:36 thorpej Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -66,7 +66,7 @@ typedef int sig_atomic_t; * a non-standard exit is performed. */ -#if defined(__LIBC12_SOURCE__) || defined(_KERNEL) +#if defined(_KERNEL) struct sigcontext13 { int sc_onstack; /* sigstack state to restore */ int sc_mask; /* signal mask to restore (old style) */ @@ -90,8 +90,9 @@ struct sigcontext13 { unsigned int sc_svc_lr; unsigned int sc_pc; }; -#endif /* __LIBC12_SOURCE__ || _KERNEL */ +#endif /* _KERNEL */ +#if defined(_LIBC) || defined(_KERNEL) #define __HAVE_STRUCT_SIGCONTEXT struct sigcontext { int sc_onstack; /* sigstack state to restore */ @@ -118,6 +119,7 @@ struct sigcontext { sigset_t sc_mask; /* signal mask to restore (new style) */ }; +#endif /* _LIBC || _KERNEL */ #endif /* !_LOCORE */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: thorpej Date: Wed Oct 27 01:09:36 UTC 2021 Modified Files: src/sys/arch/arm/include: signal.h Log Message: Make sigcontext13 visible only to _KERNEL. Make sigcontext visible only to _LIBC and _KERNEL. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/signal.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 };
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Oct 10 08:36:49 UTC 2021 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add a placeholder for PRRR To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/arch/arm/include/armreg.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/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.131 src/sys/arch/arm/include/armreg.h:1.132 --- src/sys/arch/arm/include/armreg.h:1.131 Fri Sep 3 21:55:00 2021 +++ src/sys/arch/arm/include/armreg.h Sun Oct 10 08:36:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.131 2021/09/03 21:55:00 andvar Exp $ */ +/* $NetBSD: armreg.h,v 1.132 2021/10/10 08:36:49 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -538,6 +538,7 @@ #define PRRR_TR_STRONG 0 // Strongly Ordered #define PRRR_TR_DEVICE 1 // Device #define PRRR_TR_NORMAL 2 // Normal Memory + // 3 is reserved /* ARMv7 MPIDR, Multiprocessor Affinity Register generic format */ #define MPIDR_MP __BIT(31) /* 1 = Have MP Extension */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Oct 10 08:36:49 UTC 2021 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add a placeholder for PRRR To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/arch/arm/include/armreg.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
Module Name:src Committed By: skrll Date: Wed Oct 6 05:33:15 UTC 2021 Modified Files: src/sys/arch/arm/include: aeabi.h blockio.h fenv.h ieeefp.h int_limits.h mcontext.h netbsd32_machdep.h signal.h sysarch.h Log Message: More trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/include/aeabi.h \ src/sys/arch/arm/include/fenv.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/blockio.h \ src/sys/arch/arm/include/netbsd32_machdep.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/include/ieeefp.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/int_limits.h cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/mcontext.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/signal.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/sysarch.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/aeabi.h diff -u src/sys/arch/arm/include/aeabi.h:1.5 src/sys/arch/arm/include/aeabi.h:1.6 --- src/sys/arch/arm/include/aeabi.h:1.5 Thu Aug 1 22:20:40 2013 +++ src/sys/arch/arm/include/aeabi.h Wed Oct 6 05:33:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: aeabi.h,v 1.5 2013/08/01 22:20:40 matt Exp $ */ +/* $NetBSD: aeabi.h,v 1.6 2021/10/06 05:33:15 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -127,7 +127,7 @@ long long __aeabi_lmul(long long, long l /* * A pair of (unsigned) long longs is returned in {{r0, r1}, {r2, r3}}, - * the quotient in {r0, r1}, and the remainder in {r2, r3}. + * the quotient in {r0, r1}, and the remainder in {r2, r3}. */ typedef struct { long long quot; long long rem; } lldiv_t; __value_in_regs lldiv_t __aeabi_ldivmod(long long n, long long d); // signed long long division and remainder, {q, r} = n / d [2] Index: src/sys/arch/arm/include/fenv.h diff -u src/sys/arch/arm/include/fenv.h:1.5 src/sys/arch/arm/include/fenv.h:1.6 --- src/sys/arch/arm/include/fenv.h:1.5 Sun Apr 9 15:15:34 2017 +++ src/sys/arch/arm/include/fenv.h Wed Oct 6 05:33:15 2021 @@ -1,6 +1,6 @@ -/* $NetBSD: fenv.h,v 1.5 2017/04/09 15:15:34 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.6 2021/10/06 05:33:15 skrll Exp $ */ -/* +/* * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995 * Public domain. */ Index: src/sys/arch/arm/include/blockio.h diff -u src/sys/arch/arm/include/blockio.h:1.2 src/sys/arch/arm/include/blockio.h:1.3 --- src/sys/arch/arm/include/blockio.h:1.2 Sat Jun 2 10:44:56 2001 +++ src/sys/arch/arm/include/blockio.h Wed Oct 6 05:33:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: blockio.h,v 1.2 2001/06/02 10:44:56 bjh21 Exp $ */ +/* $NetBSD: blockio.h,v 1.3 2021/10/06 05:33:15 skrll Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -14,7 +14,7 @@ *documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products *derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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. Index: src/sys/arch/arm/include/netbsd32_machdep.h diff -u src/sys/arch/arm/include/netbsd32_machdep.h:1.2 src/sys/arch/arm/include/netbsd32_machdep.h:1.3 --- src/sys/arch/arm/include/netbsd32_machdep.h:1.2 Tue Oct 31 12:37:23 2017 +++ src/sys/arch/arm/include/netbsd32_machdep.h Wed Oct 6 05:33:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.h,v 1.2 2017/10/31 12:37:23 martin Exp $ */ +/* $NetBSD: netbsd32_machdep.h,v 1.3 2021/10/06 05:33:15 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -64,9 +64,9 @@ typedef netbsd32_pointer_t netbsd32_si #define NETBSD32_MID_MACHINE MID_MACHINE #define USRSTACK32 USRSTACK #define MAXTSIZ32 MAXTSIZ -#define DFLDSIZ32 DFLDSIZ -#define MAXDSIZ32 MAXDSIZ -#define DFLSSIZ32 DFLSSIZ -#define MAXSSIZ32 MAXSSIZ +#define DFLDSIZ32 DFLDSIZ +#define MAXDSIZ32 MAXDSIZ +#define DFLSSIZ32 DFLSSIZ +#define MAXSSIZ32 MAXSSIZ #endif /* _ARM_NETBSD32_H_ */ Index: src/sys/arch/arm/include/ieeefp.h diff -u src/sys/arch/arm/include/ieeefp.h:1.4 src/sys/arch/arm/include/ieeefp.h:1.5 --- src/sys/arch/arm/include/ieeefp.h:1.4 Wed Mar 22 23:11:09 2017 +++ src/sys/arch/arm/include/ieeefp.h Wed Oct 6 05:33:15 2021 @@ -1,6 +1,6 @@ -/* $NetBSD: ieeefp.h,v 1.4 2017/03/22 23:11:09 chs Exp $ */ +/* $NetBSD: ieeefp.h,v 1.5 2021/10/06 05:33:15 skrll Exp $ */ -/* +/* * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995 * Public domain. */ @@ -20,7 +20,7 @@ typedef int fp_except; -/* adjust for FP_* and FE_* value differences */ +/* adjust for FP_* and FE_* value differences */ #define __FPE(x) (x) #define __FEE(x) (x) #define __FPR(x) (x) Index: src/sys/arch/arm/include/int_limits.h diff -u
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Wed Oct 6 05:33:15 UTC 2021 Modified Files: src/sys/arch/arm/include: aeabi.h blockio.h fenv.h ieeefp.h int_limits.h mcontext.h netbsd32_machdep.h signal.h sysarch.h Log Message: More trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/include/aeabi.h \ src/sys/arch/arm/include/fenv.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/blockio.h \ src/sys/arch/arm/include/netbsd32_machdep.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/include/ieeefp.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/int_limits.h cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/mcontext.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/signal.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/sysarch.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
Module Name:src Committed By: skrll Date: Wed Oct 6 05:29:32 UTC 2021 Modified Files: src/sys/arch/arm/include: frame.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/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/frame.h diff -u src/sys/arch/arm/include/frame.h:1.21 src/sys/arch/arm/include/frame.h:1.22 --- src/sys/arch/arm/include/frame.h:1.21 Wed Jan 24 19:42:30 2018 +++ src/sys/arch/arm/include/frame.h Wed Oct 6 05:29:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.21 2018/01/24 19:42:30 skrll Exp $ */ +/* $NetBSD: frame.h,v 1.22 2021/10/06 05:29:32 skrll Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -110,5 +110,5 @@ __END_DECLS #endif /* _LOCORE */ #endif /* _ARM_FRAME_H_ */ - + /* End of frame.h */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Wed Oct 6 05:29:32 UTC 2021 Modified Files: src/sys/arch/arm/include: frame.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/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
Module Name:src Committed By: ryo Date: Wed Sep 22 11:33:54 UTC 2021 Modified Files: src/sys/arch/arm/include: mcontext.h Log Message: fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/mcontext.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/mcontext.h diff -u src/sys/arch/arm/include/mcontext.h:1.21 src/sys/arch/arm/include/mcontext.h:1.22 --- src/sys/arch/arm/include/mcontext.h:1.21 Fri Oct 12 01:28:58 2018 +++ src/sys/arch/arm/include/mcontext.h Wed Sep 22 11:33:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.21 2018/10/12 01:28:58 ryo Exp $ */ +/* $NetBSD: mcontext.h,v 1.22 2021/09/22 11:33:54 ryo Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ * General register state */ #if defined(__aarch64__) -#define _NGREG 35 /* GR0-30, SP, PC, APSR, TPIDR */ +#define _NGREG 35 /* GR0-30, SP, PC, SPSR, TPIDR */ #define _NGREG32 17 typedef __uint64_t __greg_t; typedef unsigned int __greg32_t;
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: ryo Date: Wed Sep 22 11:33:54 UTC 2021 Modified Files: src/sys/arch/arm/include: mcontext.h Log Message: fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/mcontext.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
Module Name:src Committed By: skrll Date: Fri Aug 27 09:11:52 UTC 2021 Modified Files: src/sys/arch/arm/include: undefined.h Log Message: KNF a comment To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/undefined.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/undefined.h diff -u src/sys/arch/arm/include/undefined.h:1.13 src/sys/arch/arm/include/undefined.h:1.14 --- src/sys/arch/arm/include/undefined.h:1.13 Sun Mar 17 08:34:20 2019 +++ src/sys/arch/arm/include/undefined.h Fri Aug 27 09:11:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: undefined.h,v 1.13 2019/03/17 08:34:20 skrll Exp $ */ +/* $NetBSD: undefined.h,v 1.14 2021/08/27 09:11:52 skrll Exp $ */ /* * Copyright (c) 1995-1996 Mark Brinicombe. @@ -65,7 +65,7 @@ enum arm_coprocs { DEBUG_COPROC = 14, SYSTEM_COPROC = 15, /* - *The following are not really co-processors, but are on the end + * The following are not really co-processors, but are on the end * of the unknown instruction table for each coproc. */ CORE_UNKNOWN_HANDLER = 16,
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Fri Aug 27 09:11:52 UTC 2021 Modified Files: src/sys/arch/arm/include: undefined.h Log Message: KNF a comment To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/undefined.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
"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
Module Name:src Committed By: joerg Date: Sun May 30 02:28:59 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Don't use V8 atomic instruction for AA32 mode. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/lock.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/lock.h diff -u src/sys/arch/arm/include/lock.h:1.38 src/sys/arch/arm/include/lock.h:1.39 --- src/sys/arch/arm/include/lock.h:1.38 Tue Apr 27 06:03:09 2021 +++ src/sys/arch/arm/include/lock.h Sun May 30 02:28:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.38 2021/04/27 06:03:09 skrll Exp $ */ +/* $NetBSD: lock.h,v 1.39 2021/05/30 02:28:59 joerg Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -204,7 +204,7 @@ static __inline void __unused __cpu_simple_unlock(__cpu_simple_lock_t *__alp) { -#if defined(_ARM_ARCH_8) +#if defined(_ARM_ARCH_8) && defined(__LP64__) if (sizeof(*__alp) == 1) { __asm __volatile("stlrb\t%w0, [%1]" :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: joerg Date: Sun May 30 02:28:59 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Don't use V8 atomic instruction for AA32 mode. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/lock.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 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
Module Name:src Committed By: skrll Date: Tue Apr 27 06:03:09 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Fix the barrier confusion. From Riastradh - thanks!. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/include/lock.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/lock.h diff -u src/sys/arch/arm/include/lock.h:1.37 src/sys/arch/arm/include/lock.h:1.38 --- src/sys/arch/arm/include/lock.h:1.37 Mon Apr 26 16:35:54 2021 +++ src/sys/arch/arm/include/lock.h Tue Apr 27 06:03:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.37 2021/04/26 16:35:54 skrll Exp $ */ +/* $NetBSD: lock.h,v 1.38 2021/04/27 06:03:09 skrll Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -131,32 +131,34 @@ __swp(int __val, __cpu_simple_lock_t *__ } #endif /* !_ARM_ARCH_6 */ +/* load/dmb implies load-acquire */ static __inline void -__arm_membar_producer(void) +__arm_load_dmb(void) { #if defined(_ARM_ARCH_7) - __asm __volatile("dsb" ::: "memory"); + __asm __volatile("dmb ish" ::: "memory"); #elif defined(_ARM_ARCH_6) - __asm __volatile("mcr\tp15,0,%0,c7,c10,4" :: "r"(0) : "memory"); + __asm __volatile("mcr\tp15,0,%0,c7,c10,5" :: "r"(0) : "memory"); #endif } +/* dmb/store implies store-release */ static __inline void -__arm_membar_consumer(void) +__arm_dmb_store(void) { #if defined(_ARM_ARCH_7) - __asm __volatile("dmb" ::: "memory"); + __asm __volatile("dmb ish" ::: "memory"); #elif defined(_ARM_ARCH_6) __asm __volatile("mcr\tp15,0,%0,c7,c10,5" :: "r"(0) : "memory"); #endif } + static __inline void __unused __cpu_simple_lock_init(__cpu_simple_lock_t *__alp) { *__alp = __SIMPLELOCK_UNLOCKED; - __arm_membar_producer(); } #if !defined(__thumb__) || defined(_ARM_ARCH_T2) @@ -164,12 +166,11 @@ static __inline void __unused __cpu_simple_lock(__cpu_simple_lock_t *__alp) { #if defined(_ARM_ARCH_6) - __arm_membar_consumer(); do { /* spin */ } while (__arm_load_exclusive(__alp) != __SIMPLELOCK_UNLOCKED || __arm_store_exclusive(__alp, __SIMPLELOCK_LOCKED)); - __arm_membar_producer(); + __arm_load_dmb(); #else while (__swp(__SIMPLELOCK_LOCKED, __alp) != __SIMPLELOCK_UNLOCKED) continue; @@ -184,13 +185,12 @@ static __inline int __unused __cpu_simple_lock_try(__cpu_simple_lock_t *__alp) { #if defined(_ARM_ARCH_6) - __arm_membar_consumer(); do { if (__arm_load_exclusive(__alp) != __SIMPLELOCK_UNLOCKED) { return 0; } } while (__arm_store_exclusive(__alp, __SIMPLELOCK_LOCKED)); - __arm_membar_producer(); + __arm_load_dmb(); return 1; #else return (__swp(__SIMPLELOCK_LOCKED, __alp) == __SIMPLELOCK_UNLOCKED); @@ -213,9 +213,8 @@ __cpu_simple_unlock(__cpu_simple_lock_t :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory"); } #else - __arm_membar_consumer(); + __arm_dmb_store(); *__alp = __SIMPLELOCK_UNLOCKED; - __arm_membar_producer(); #endif }
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Apr 27 06:03:09 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Fix the barrier confusion. From Riastradh - thanks!. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/include/lock.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
Module Name:src Committed By: skrll Date: Mon Apr 26 16:35:54 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Change #ifdef FOO to #if defined(FOO). NFCI. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/include/lock.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/lock.h diff -u src/sys/arch/arm/include/lock.h:1.36 src/sys/arch/arm/include/lock.h:1.37 --- src/sys/arch/arm/include/lock.h:1.36 Sat Apr 24 07:58:12 2021 +++ src/sys/arch/arm/include/lock.h Mon Apr 26 16:35:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.36 2021/04/24 07:58:12 skrll Exp $ */ +/* $NetBSD: lock.h,v 1.37 2021/04/26 16:35:54 skrll Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ __cpu_simple_lock_set(__cpu_simple_lock_ *__ptr = __SIMPLELOCK_LOCKED; } -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) static __inline unsigned int __arm_load_exclusive(__cpu_simple_lock_t *__alp) { @@ -134,7 +134,7 @@ __swp(int __val, __cpu_simple_lock_t *__ static __inline void __arm_membar_producer(void) { -#ifdef _ARM_ARCH_7 +#if defined(_ARM_ARCH_7) __asm __volatile("dsb" ::: "memory"); #elif defined(_ARM_ARCH_6) __asm __volatile("mcr\tp15,0,%0,c7,c10,4" :: "r"(0) : "memory"); @@ -144,7 +144,7 @@ __arm_membar_producer(void) static __inline void __arm_membar_consumer(void) { -#ifdef _ARM_ARCH_7 +#if defined(_ARM_ARCH_7) __asm __volatile("dmb" ::: "memory"); #elif defined(_ARM_ARCH_6) __asm __volatile("mcr\tp15,0,%0,c7,c10,5" :: "r"(0) : "memory"); @@ -163,7 +163,7 @@ __cpu_simple_lock_init(__cpu_simple_lock static __inline void __unused __cpu_simple_lock(__cpu_simple_lock_t *__alp) { -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) __arm_membar_consumer(); do { /* spin */ @@ -183,7 +183,7 @@ void __cpu_simple_lock(__cpu_simple_lock static __inline int __unused __cpu_simple_lock_try(__cpu_simple_lock_t *__alp) { -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) __arm_membar_consumer(); do { if (__arm_load_exclusive(__alp) != __SIMPLELOCK_UNLOCKED) { @@ -204,7 +204,7 @@ static __inline void __unused __cpu_simple_unlock(__cpu_simple_lock_t *__alp) { -#ifdef _ARM_ARCH_8 +#if defined(_ARM_ARCH_8) if (sizeof(*__alp) == 1) { __asm __volatile("stlrb\t%w0, [%1]" :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Mon Apr 26 16:35:54 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Change #ifdef FOO to #if defined(FOO). NFCI. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/include/lock.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
Module Name:src Committed By: skrll Date: Sat Apr 24 07:58:12 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Fix ARMv8 instructions To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/include/lock.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/lock.h diff -u src/sys/arch/arm/include/lock.h:1.35 src/sys/arch/arm/include/lock.h:1.36 --- src/sys/arch/arm/include/lock.h:1.35 Sat Apr 24 06:38:39 2021 +++ src/sys/arch/arm/include/lock.h Sat Apr 24 07:58:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.35 2021/04/24 06:38:39 skrll Exp $ */ +/* $NetBSD: lock.h,v 1.36 2021/04/24 07:58:12 skrll Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -206,10 +206,10 @@ __cpu_simple_unlock(__cpu_simple_lock_t #ifdef _ARM_ARCH_8 if (sizeof(*__alp) == 1) { - __asm __volatile("stlb\t%0, [%1]" + __asm __volatile("stlrb\t%w0, [%1]" :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory"); } else { - __asm __volatile("stl\t%0, [%1]" + __asm __volatile("stlr\t%0, [%1]" :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory"); } #else
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Apr 24 07:58:12 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Fix ARMv8 instructions To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/include/lock.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
Module Name:src Committed By: skrll Date: Sat Apr 24 06:38:39 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/include/lock.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/lock.h diff -u src/sys/arch/arm/include/lock.h:1.34 src/sys/arch/arm/include/lock.h:1.35 --- src/sys/arch/arm/include/lock.h:1.34 Fri Nov 29 20:05:19 2019 +++ src/sys/arch/arm/include/lock.h Sat Apr 24 06:38:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.34 2019/11/29 20:05:19 riastradh Exp $ */ +/* $NetBSD: lock.h,v 1.35 2021/04/24 06:38:39 skrll Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -65,11 +65,6 @@ __cpu_simple_lock_set(__cpu_simple_lock_ *__ptr = __SIMPLELOCK_LOCKED; } -#ifdef _KERNEL -/* XXX Formerly included for obsolete mb_* API, maybe no longer needed. */ -#include -#endif - #ifdef _ARM_ARCH_6 static __inline unsigned int __arm_load_exclusive(__cpu_simple_lock_t *__alp)
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Apr 24 06:38:39 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/include/lock.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
Module Name:src Committed By: skrll Date: Fri Apr 23 06:02:48 UTC 2021 Modified Files: src/sys/arch/arm/include: bus_defs.h Log Message: Trialing whitespace To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/bus_defs.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
Module Name:src Committed By: skrll Date: Fri Apr 23 06:02:48 UTC 2021 Modified Files: src/sys/arch/arm/include: bus_defs.h Log Message: Trialing whitespace To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/bus_defs.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/bus_defs.h diff -u src/sys/arch/arm/include/bus_defs.h:1.15 src/sys/arch/arm/include/bus_defs.h:1.16 --- src/sys/arch/arm/include/bus_defs.h:1.15 Mon Apr 13 07:09:51 2020 +++ src/sys/arch/arm/include/bus_defs.h Fri Apr 23 06:02:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_defs.h,v 1.15 2020/04/13 07:09:51 maxv Exp $ */ +/* $NetBSD: bus_defs.h,v 1.16 2021/04/23 06:02:48 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -157,7 +157,7 @@ struct bus_space { bus_size_t, uint32_t *, bus_size_t); void (*bs_rm_8)(void *, bus_space_handle_t, bus_size_t, uint64_t *, bus_size_t); - + /* read region */ void (*bs_rr_1)(void *, bus_space_handle_t, bus_size_t, uint8_t *, bus_size_t);
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: jmcneill Date: Sun Feb 7 21:15:41 UTC 2021 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: Add ENABLE_INTERRUPT() / DISABLE_INTERRUPT() macros for compatibility with aarch64. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/arm/include/cpufunc.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
Module Name:src Committed By: jmcneill Date: Sun Feb 7 21:15:41 UTC 2021 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: Add ENABLE_INTERRUPT() / DISABLE_INTERRUPT() macros for compatibility with aarch64. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/arm/include/cpufunc.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/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.86 src/sys/arch/arm/include/cpufunc.h:1.87 --- src/sys/arch/arm/include/cpufunc.h:1.86 Thu Dec 3 07:45:52 2020 +++ src/sys/arch/arm/include/cpufunc.h Sun Feb 7 21:15:40 2021 @@ -353,6 +353,9 @@ enable_interrupts(uint32_t mask) #define restore_interrupts(old_cpsr) \ (__set_cpsr_c((I32_bit | F32_bit), (old_cpsr) & (I32_bit | F32_bit))) +#define ENABLE_INTERRUPT() cpsie(I32_bit) +#define DISABLE_INTERRUPT() cpsid(I32_bit) + static inline void cpsie(register_t psw) __attribute__((__unused__)); static inline register_t cpsid(register_t psw) __attribute__((__unused__));
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Jan 31 06:18:50 UTC 2021 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Fix (unused) PRRR_NOSn #define To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/arch/arm/include/armreg.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/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.129 src/sys/arch/arm/include/armreg.h:1.130 --- src/sys/arch/arm/include/armreg.h:1.129 Tue Oct 29 16:18:23 2019 +++ src/sys/arch/arm/include/armreg.h Sun Jan 31 06:18:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.129 2019/10/29 16:18:23 joerg Exp $ */ +/* $NetBSD: armreg.h,v 1.130 2021/01/31 06:18:50 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -529,7 +529,7 @@ #define NMRR_WBWA 1 // write-back write-allocate #define NMRR_WT 2 // write-through #define NMRR_WB 3 // write-back -#define PRRR_NOSn(n) __BITS(24+2*(n))// Memory region is Inner Shareable +#define PRRR_NOSn(n) __BITS(24+(n)) // Memory region is Inner Shareable only #define PRRR_NS1 __BIT(19) // Normal Shareable S=1 is Shareable #define PRRR_NS0 __BIT(18) // Normal Shareable S=0 is Shareable #define PRRR_DS1 __BIT(17) // Device Shareable S=1 is Shareable
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Jan 31 06:18:50 UTC 2021 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Fix (unused) PRRR_NOSn #define To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/arch/arm/include/armreg.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
Module Name:src Committed By: skrll Date: Wed Jan 27 08:40:32 UTC 2021 Modified Files: src/sys/arch/arm/include: asan.h Log Message: Style. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/asan.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
Module Name:src Committed By: skrll Date: Wed Jan 27 08:40:32 UTC 2021 Modified Files: src/sys/arch/arm/include: asan.h Log Message: Style. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/asan.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/asan.h diff -u src/sys/arch/arm/include/asan.h:1.6 src/sys/arch/arm/include/asan.h:1.7 --- src/sys/arch/arm/include/asan.h:1.6 Thu Sep 10 14:10:47 2020 +++ src/sys/arch/arm/include/asan.h Wed Jan 27 08:40:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: asan.h,v 1.6 2020/09/10 14:10:47 maxv Exp $ */ +/* $NetBSD: asan.h,v 1.7 2021/01/27 08:40:32 skrll Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -222,9 +222,7 @@ kasan_md_init(void) kasan_shadow_map((void *)kasan_kernelstart, kasan_kernelsize); /* The VAs we've created until now. */ - vaddr_t eva; - - eva = pmap_growkernel(VM_KERNEL_VM_BASE); + vaddr_t eva = pmap_growkernel(VM_KERNEL_VM_BASE); kasan_shadow_map((void *)VM_KERNEL_VM_BASE, eva - VM_KERNEL_VM_BASE); }
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: rin Date: Mon Dec 14 01:58:48 UTC 2020 Modified Files: src/sys/arch/arm/include: ptrace.h Log Message: Obsolete PT_STEP and friends, that have never been implemented. PT_STEP was exposed to userland for NetBSD 1.6 to 9, and PT_SETSTEP and PT_CLEARSTEP was for 8 to 9. Therefore, they cannot be reused for other purposes. PT_STEP was introduced to arm/ptrace.h rev 1.2: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/include/ptrace.h#rev1.2 This was for workaround against GDB, which assumes PT_STEP is 9 (even today!!), if it is undefined. But, this should have been dealt with differently... To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/ptrace.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/ptrace.h diff -u src/sys/arch/arm/include/ptrace.h:1.16 src/sys/arch/arm/include/ptrace.h:1.17 --- src/sys/arch/arm/include/ptrace.h:1.16 Tue Dec 1 02:48:29 2020 +++ src/sys/arch/arm/include/ptrace.h Mon Dec 14 01:58:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.16 2020/12/01 02:48:29 rin Exp $ */ +/* $NetBSD: ptrace.h,v 1.17 2020/12/14 01:58:48 rin Exp $ */ /* * Copyright (c) 1995 Frank Lancaster @@ -36,7 +36,8 @@ /* * arm-dependent ptrace definitions */ -#ifndef _KERNEL +#if 0 +/* Exposed to userland for NetBSD 1.6 to 9. Do not reuse for other purpose. */ #define PT_STEP (PT_FIRSTMACH + 0) /* Not implemented */ #endif #define PT_GETREGS (PT_FIRSTMACH + 1) @@ -44,21 +45,22 @@ /* 3 and 4 are for FPE registers */ #define PT_GETFPREGS (PT_FIRSTMACH + 5) #define PT_SETFPREGS (PT_FIRSTMACH + 6) -#ifndef _KERNEL +#if 0 +/* Exposed to userland for NetBSD 8 to 9. Do not reuse for other purpose. */ #define PT_SETSTEP (PT_FIRSTMACH + 7) /* Not implemented */ #define PT_CLEARSTEP (PT_FIRSTMACH + 8) /* Not implemented */ #endif #define PT_MACHDEP_STRINGS \ - "PT_STEP", \ + "n/a PT_STEP", \ "PT_GETREGS", \ "PT_SETREGS", \ "old PT_GETFPREGS", \ "old PT_SETFPREGS", \ "PT_GETFPREGS", \ "PT_SETFPREGS", \ - "PT_SETSTEP", \ - "PT_CLEARSTEP", + "n/a PT_SETSTEP", \ + "n/a PT_CLEARSTEP", #include #define PTRACE_REG_PC(_r) (_r)->r_pc
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: rin Date: Mon Dec 14 01:58:48 UTC 2020 Modified Files: src/sys/arch/arm/include: ptrace.h Log Message: Obsolete PT_STEP and friends, that have never been implemented. PT_STEP was exposed to userland for NetBSD 1.6 to 9, and PT_SETSTEP and PT_CLEARSTEP was for 8 to 9. Therefore, they cannot be reused for other purposes. PT_STEP was introduced to arm/ptrace.h rev 1.2: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/include/ptrace.h#rev1.2 This was for workaround against GDB, which assumes PT_STEP is 9 (even today!!), if it is undefined. But, this should have been dealt with differently... To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/ptrace.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
Module Name:src Committed By: skrll Date: Tue Dec 1 14:53:48 UTC 2020 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: G/C MUTEX_PAUSE_{PAUSE,WAKE} To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/mutex.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/mutex.h diff -u src/sys/arch/arm/include/mutex.h:1.24 src/sys/arch/arm/include/mutex.h:1.25 --- src/sys/arch/arm/include/mutex.h:1.24 Tue Dec 1 14:52:36 2020 +++ src/sys/arch/arm/include/mutex.h Tue Dec 1 14:53:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.24 2020/12/01 14:52:36 skrll Exp $ */ +/* $NetBSD: mutex.h,v 1.25 2020/12/01 14:53:47 skrll Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -82,10 +82,6 @@ struct kmutex { #define MUTEX_CAS(p, o, n) \ (atomic_cas_ulong((volatile unsigned long *)(p), (o), (n)) == (o)) -#ifdef MULTIPROCESSOR -#define MUTEX_SMT_PAUSE() __asm __volatile("wfe") -#define MUTEX_SMT_WAKE() __asm __volatile("sev") -#endif #endif /* __MUTEX_PRIVATE */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Dec 1 14:53:48 UTC 2020 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: G/C MUTEX_PAUSE_{PAUSE,WAKE} To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/mutex.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
Module Name:src Committed By: skrll Date: Tue Dec 1 14:52:36 UTC 2020 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/include/mutex.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/mutex.h diff -u src/sys/arch/arm/include/mutex.h:1.23 src/sys/arch/arm/include/mutex.h:1.24 --- src/sys/arch/arm/include/mutex.h:1.23 Thu Mar 5 17:58:08 2020 +++ src/sys/arch/arm/include/mutex.h Tue Dec 1 14:52:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.23 2020/03/05 17:58:08 riastradh Exp $ */ +/* $NetBSD: mutex.h,v 1.24 2020/12/01 14:52:36 skrll Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ * So, what we have done is implement simple mutexes using a compare-and-swap. * We support pre-ARMv6 by implementing CAS as a restartable atomic sequence * that is checked by the IRQ vector. - * + * */ struct kmutex {
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Dec 1 14:52:36 UTC 2020 Modified Files: src/sys/arch/arm/include: mutex.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/include/mutex.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
Module Name:src Committed By: skrll Date: Tue Nov 3 08:34:17 UTC 2020 Modified Files: src/sys/arch/arm/include: cdefs.h Log Message: The ARM C Language Extenstion document defines __ARCH_ARM as the integer macro indicating the current ARM instruction set. Let's use it. PR/55778: evbarm64 GENERIC64 kernel fails to build with clang XXX Handle the fact that for an ARM architecture ARMvX.Y then, XXX __ARM_ARCH= X * 100 + Y. E.g. for ARMv8.1 __ARM_ARCH = 801. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/cdefs.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
Module Name:src Committed By: skrll Date: Tue Nov 3 08:34:17 UTC 2020 Modified Files: src/sys/arch/arm/include: cdefs.h Log Message: The ARM C Language Extenstion document defines __ARCH_ARM as the integer macro indicating the current ARM instruction set. Let's use it. PR/55778: evbarm64 GENERIC64 kernel fails to build with clang XXX Handle the fact that for an ARM architecture ARMvX.Y then, XXX __ARM_ARCH= X * 100 + Y. E.g. for ARMv8.1 __ARM_ARCH = 801. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/cdefs.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/cdefs.h diff -u src/sys/arch/arm/include/cdefs.h:1.17 src/sys/arch/arm/include/cdefs.h:1.18 --- src/sys/arch/arm/include/cdefs.h:1.17 Sun Oct 11 16:22:02 2020 +++ src/sys/arch/arm/include/cdefs.h Tue Nov 3 08:34:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.17 2020/10/11 16:22:02 skrll Exp $ */ +/* $NetBSD: cdefs.h,v 1.18 2020/11/03 08:34:17 skrll Exp $ */ #ifndef _ARM_CDEFS_H_ #define _ARM_CDEFS_H_ @@ -10,7 +10,8 @@ #endif -#if defined (__ARM_ARCH_8A__) || defined (__ARM_ARCH_8A) +#if defined (__ARM_ARCH_8A__) || defined (__ARM_ARCH_8A) || \ +__ARM_ARCH == 8 /* __ARM_ARCH_8A__ is a typo */ #define _ARM_ARCH_8 #endif
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Oct 31 13:58:22 UTC 2020 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: Fix armv6 builds by providing an armv6 is macro To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/arch/arm/include/cpufunc.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
Module Name:src Committed By: skrll Date: Sat Oct 31 13:58:22 UTC 2020 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: Fix armv6 builds by providing an armv6 is macro To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/arch/arm/include/cpufunc.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/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.84 src/sys/arch/arm/include/cpufunc.h:1.85 --- src/sys/arch/arm/include/cpufunc.h:1.84 Tue Sep 29 18:13:29 2020 +++ src/sys/arch/arm/include/cpufunc.h Sat Oct 31 13:58:22 2020 @@ -42,8 +42,6 @@ #ifndef _ARM_CPUFUNC_H_ #define _ARM_CPUFUNC_H_ -#define isb() __asm __volatile("isb" : : : "memory") - #ifdef _ARM_ARCH_7 /* * Options for DMB and DSB: @@ -62,12 +60,16 @@ */ #define dsb(opt) __asm __volatile("dsb " __STRING(opt) : : : "memory") #define dmb(opt) __asm __volatile("dmb " __STRING(opt) : : : "memory") +#define isb() __asm __volatile("isb" : : : "memory") + #else #define dsb(opt) \ __asm __volatile("mcr p15, 0, %0, c7, c10, 4" :: "r" (0) : "memory") #define dmb(opt) \ __asm __volatile("mcr p15, 0, %0, c7, c10, 5" :: "r" (0) : "memory") +#define isb() \ + __asm __volatile("mcr p15, 0, %0, c7, c5, 4" :: "r" (0) : "memory") #endif
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
Module Name:src Committed By: skrll Date: Tue Sep 29 18:13:29 UTC 2020 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: Fix RPI (armv6) build To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/arm/include/cpufunc.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
Module Name:src Committed By: skrll Date: Tue Sep 29 18:13:29 UTC 2020 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: Fix RPI (armv6) build To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/arm/include/cpufunc.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/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.83 src/sys/arch/arm/include/cpufunc.h:1.84 --- src/sys/arch/arm/include/cpufunc.h:1.83 Sat Sep 26 12:58:22 2020 +++ src/sys/arch/arm/include/cpufunc.h Tue Sep 29 18:13:29 2020 @@ -44,6 +44,7 @@ #define isb() __asm __volatile("isb" : : : "memory") +#ifdef _ARM_ARCH_7 /* * Options for DMB and DSB: * oshld Outer Shareable, load @@ -61,6 +62,14 @@ */ #define dsb(opt) __asm __volatile("dsb " __STRING(opt) : : : "memory") #define dmb(opt) __asm __volatile("dmb " __STRING(opt) : : : "memory") +#else + +#define dsb(opt) \ + __asm __volatile("mcr p15, 0, %0, c7, c10, 4" :: "r" (0) : "memory") +#define dmb(opt) \ + __asm __volatile("mcr p15, 0, %0, c7, c10, 5" :: "r" (0) : "memory") + +#endif #ifdef __arm__
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: jakllsch Date: Sat Sep 5 16:04:31 UTC 2020 Modified Files: src/sys/arch/arm/include: bus_funcs.h Log Message: Add missing prototypes for __bs_c(f,_bs_sm_?_swap) (implementations of these already exist for aarch64) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/include/bus_funcs.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
Module Name:src Committed By: jakllsch Date: Sat Sep 5 16:04:31 UTC 2020 Modified Files: src/sys/arch/arm/include: bus_funcs.h Log Message: Add missing prototypes for __bs_c(f,_bs_sm_?_swap) (implementations of these already exist for aarch64) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/include/bus_funcs.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/bus_funcs.h diff -u src/sys/arch/arm/include/bus_funcs.h:1.9 src/sys/arch/arm/include/bus_funcs.h:1.10 --- src/sys/arch/arm/include/bus_funcs.h:1.9 Mon Apr 13 07:09:51 2020 +++ src/sys/arch/arm/include/bus_funcs.h Sat Sep 5 16:04:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_funcs.h,v 1.9 2020/04/13 07:09:51 maxv Exp $ */ +/* $NetBSD: bus_funcs.h,v 1.10 2020/09/05 16:04:31 jakllsch Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -493,14 +493,20 @@ void __bs_c(f,_bs_sm_1)(void *t, bus_spa #define bs_sm_2_proto(f) \ void __bs_c(f,_bs_sm_2)(void *t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t value, bus_size_t count); \ +void __bs_c(f,_bs_sm_2_swap)(void *t, bus_space_handle_t bsh, \ bus_size_t offset, uint16_t value, bus_size_t count); #define bs_sm_4_proto(f) \ void __bs_c(f,_bs_sm_4)(void *t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t value, bus_size_t count); \ +void __bs_c(f,_bs_sm_4_swap)(void *t, bus_space_handle_t bsh, \ bus_size_t offset, uint32_t value, bus_size_t count); #define bs_sm_8_proto(f) \ void __bs_c(f,_bs_sm_8)(void *t, bus_space_handle_t bsh, \ + bus_size_t offset, uint64_t value, bus_size_t count); \ +void __bs_c(f,_bs_sm_8_swap)(void *t, bus_space_handle_t bsh, \ bus_size_t offset, uint64_t value, bus_size_t count); #define bs_sr_1_proto(f) \
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
Module Name:src Committed By: mrg Date: Mon Aug 17 01:52:59 UTC 2020 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: swap sys/param.h for machine/param.h. this still obtains the wanted COHERENCY_UNIT, while avoiding have a cascade of failures where sys/mutex.h ends up including arm/cpu.h which ends up including sys/resourcevar.h and then sys/mutex.h, but as the first includer of sys/mutex.h has defined the idempotent header define, the second one is empty, and as kmutex_t isn't defined by the first attempt yet the kmutex_t used in resourcevar.h generates an error. should fix evbarm v5/v5eb, hpcarm, iyonix and zaurus builds. tested building iyonix, zaurus and evbarmv7hf. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/arm/include/cpu.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/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.113 src/sys/arch/arm/include/cpu.h:1.114 --- src/sys/arch/arm/include/cpu.h:1.113 Sun Aug 16 16:01:35 2020 +++ src/sys/arch/arm/include/cpu.h Mon Aug 17 01:52:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.113 2020/08/16 16:01:35 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.114 2020/08/17 01:52:59 mrg Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -154,7 +154,7 @@ static inline void cpu_dosoftints(void); #include #include #include -#include +#include struct cpu_info { struct cpu_data ci_data; /* MI per-cpu data */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: mrg Date: Mon Aug 17 01:52:59 UTC 2020 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: swap sys/param.h for machine/param.h. this still obtains the wanted COHERENCY_UNIT, while avoiding have a cascade of failures where sys/mutex.h ends up including arm/cpu.h which ends up including sys/resourcevar.h and then sys/mutex.h, but as the first includer of sys/mutex.h has defined the idempotent header define, the second one is empty, and as kmutex_t isn't defined by the first attempt yet the kmutex_t used in resourcevar.h generates an error. should fix evbarm v5/v5eb, hpcarm, iyonix and zaurus builds. tested building iyonix, zaurus and evbarmv7hf. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/arm/include/cpu.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
Module Name:src Committed By: skrll Date: Sun Aug 16 16:01:35 UTC 2020 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: G/C MP_CPU_INFO_MEMBERS To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/arm/include/cpu.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
Module Name:src Committed By: skrll Date: Sun Aug 16 16:01:35 UTC 2020 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: G/C MP_CPU_INFO_MEMBERS To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/arm/include/cpu.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/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.112 src/sys/arch/arm/include/cpu.h:1.113 --- src/sys/arch/arm/include/cpu.h:1.112 Fri Aug 14 16:18:36 2020 +++ src/sys/arch/arm/include/cpu.h Sun Aug 16 16:01:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.112 2020/08/14 16:18:36 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.113 2020/08/16 16:01:35 skrll Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -219,10 +219,6 @@ struct cpu_info { struct arm_cache_info * ci_cacheinfo; - -#if defined(MP_CPU_INFO_MEMBERS) - MP_CPU_INFO_MEMBERS -#endif }; extern struct cpu_info cpu_info_store[];
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Aug 16 09:37:30 UTC 2020 Modified Files: src/sys/arch/arm/include: param.h Log Message: Define COHERENCY_UNIT and CACHE_LINE_SIZE to fix arm builds. The recent change to cpu.h and struct cpu_info needs an early definition for the ARM_INTR_IMPLs that want to inline the spl functions and get {,set_}curcpl() from cpu.h To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/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/param.h diff -u src/sys/arch/arm/include/param.h:1.22 src/sys/arch/arm/include/param.h:1.23 --- src/sys/arch/arm/include/param.h:1.22 Mon Jan 7 22:00:30 2019 +++ src/sys/arch/arm/include/param.h Sun Aug 16 09:37:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.22 2019/01/07 22:00:30 jdolecek Exp $ */ +/* $NetBSD: param.h,v 1.23 2020/08/16 09:37:30 skrll Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -186,4 +186,7 @@ #endif #endif /* _KERNEL */ +#define COHERENCY_UNIT 64 +#define CACHE_LINE_SIZE 64 + #endif /* _ARM_PARAM_H_ */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sun Aug 16 09:37:30 UTC 2020 Modified Files: src/sys/arch/arm/include: param.h Log Message: Define COHERENCY_UNIT and CACHE_LINE_SIZE to fix arm builds. The recent change to cpu.h and struct cpu_info needs an early definition for the ARM_INTR_IMPLs that want to inline the spl functions and get {,set_}curcpl() from cpu.h To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/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 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)