Module Name: src Committed By: riastradh Date: Sun Aug 21 09:12:43 UTC 2022
Modified Files: src/sys/arch/amd64/include: pmap_private.h pte.h src/sys/arch/i386/include: pmap_private.h pte.h Log Message: x86 Move VA_SIGN_POS/NEG to machine/pte.h. It's used by pl[1-4]_pi, also defined in machine/pte.h, and used in libkvm without pmap_private.h. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/include/pmap_private.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/include/pte.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/include/pmap_private.h cvs rdiff -u -r1.35 -r1.36 src/sys/arch/i386/include/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/include/pmap_private.h diff -u src/sys/arch/amd64/include/pmap_private.h:1.3 src/sys/arch/amd64/include/pmap_private.h:1.4 --- src/sys/arch/amd64/include/pmap_private.h:1.3 Sat Aug 20 23:49:48 2022 +++ src/sys/arch/amd64/include/pmap_private.h Sun Aug 21 09:12:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_private.h,v 1.3 2022/08/20 23:49:48 riastradh Exp $ */ +/* $NetBSD: pmap_private.h,v 1.4 2022/08/21 09:12:43 riastradh Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -86,14 +86,6 @@ #include <xen/xenpmap.h> #endif -/* - * Mask to get rid of the sign-extended part of addresses. - */ -#define VA_SIGN_MASK 0xffff000000000000 -#define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK) -/* XXXfvdl this one's not right. */ -#define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK) - #ifdef KASAN #define L4_SLOT_KASAN 256 #define NL4_SLOT_KASAN 32 Index: src/sys/arch/amd64/include/pte.h diff -u src/sys/arch/amd64/include/pte.h:1.16 src/sys/arch/amd64/include/pte.h:1.17 --- src/sys/arch/amd64/include/pte.h:1.16 Sat Aug 20 23:19:08 2022 +++ src/sys/arch/amd64/include/pte.h Sun Aug 21 09:12:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.16 2022/08/20 23:19:08 riastradh Exp $ */ +/* $NetBSD: pte.h,v 1.17 2022/08/21 09:12:43 riastradh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -74,6 +74,14 @@ typedef uint64_t pt_entry_t; /* PTE */ #endif /* + * Mask to get rid of the sign-extended part of addresses. + */ +#define VA_SIGN_MASK 0xffff000000000000 +#define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK) +/* XXXfvdl this one's not right. */ +#define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK) + +/* * Now we define various constants for playing with virtual addresses. */ #define L1_SHIFT 12 Index: src/sys/arch/i386/include/pmap_private.h diff -u src/sys/arch/i386/include/pmap_private.h:1.3 src/sys/arch/i386/include/pmap_private.h:1.4 --- src/sys/arch/i386/include/pmap_private.h:1.3 Sat Aug 20 23:49:48 2022 +++ src/sys/arch/i386/include/pmap_private.h Sun Aug 21 09:12:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_private.h,v 1.3 2022/08/20 23:49:48 riastradh Exp $ */ +/* $NetBSD: pmap_private.h,v 1.4 2022/08/21 09:12:43 riastradh Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -204,16 +204,6 @@ */ /* - * Mask to get rid of the sign-extended part of addresses. - */ -#define VA_SIGN_MASK 0 -#define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK) -/* - * XXXfvdl this one's not right. - */ -#define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK) - -/* * the following defines give the virtual addresses of various MMU * data structures: * PTE_BASE: the base VA of the linear PTE mappings Index: src/sys/arch/i386/include/pte.h diff -u src/sys/arch/i386/include/pte.h:1.35 src/sys/arch/i386/include/pte.h:1.36 --- src/sys/arch/i386/include/pte.h:1.35 Sat Aug 20 23:19:08 2022 +++ src/sys/arch/i386/include/pte.h Sun Aug 21 09:12:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.35 2022/08/20 23:19:08 riastradh Exp $ */ +/* $NetBSD: pte.h,v 1.36 2022/08/21 09:12:43 riastradh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -97,6 +97,16 @@ typedef uint32_t pt_entry_t; /* PTE */ #endif +/* + * Mask to get rid of the sign-extended part of addresses. + */ +#define VA_SIGN_MASK 0 +#define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK) +/* + * XXXfvdl this one's not right. + */ +#define VA_SIGN_POS(va) ((va) & ~VA_SIGN_MASK) + #ifdef PAE #define L1_SHIFT 12 #define L2_SHIFT 21