Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2017 12:54:36 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324493 - in head/sys/arm64: arm64 include
Message-ID:  <201710101254.v9ACsaSD081550@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Tue Oct 10 12:54:36 2017
New Revision: 324493
URL: https://svnweb.freebsd.org/changeset/base/324493

Log:
  Move the pmap_l0_index, etc. macros to pte.h. These will be used by the
  EFI Runtime Services code.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/arm64/arm64/pmap.c
  head/sys/arm64/include/pte.h

Modified: head/sys/arm64/arm64/pmap.c
==============================================================================
--- head/sys/arm64/arm64/pmap.c	Tue Oct 10 12:36:41 2017	(r324492)
+++ head/sys/arm64/arm64/pmap.c	Tue Oct 10 12:54:36 2017	(r324493)
@@ -306,11 +306,6 @@ pagecopy(void *s, void *d)
 	memcpy(d, s, PAGE_SIZE);
 }
 
-#define	pmap_l0_index(va)	(((va) >> L0_SHIFT) & L0_ADDR_MASK)
-#define	pmap_l1_index(va)	(((va) >> L1_SHIFT) & Ln_ADDR_MASK)
-#define	pmap_l2_index(va)	(((va) >> L2_SHIFT) & Ln_ADDR_MASK)
-#define	pmap_l3_index(va)	(((va) >> L3_SHIFT) & Ln_ADDR_MASK)
-
 static __inline pd_entry_t *
 pmap_l0(pmap_t pmap, vm_offset_t va)
 {

Modified: head/sys/arm64/include/pte.h
==============================================================================
--- head/sys/arm64/include/pte.h	Tue Oct 10 12:36:41 2017	(r324492)
+++ head/sys/arm64/include/pte.h	Tue Oct 10 12:54:36 2017	(r324493)
@@ -118,6 +118,11 @@ typedef	uint64_t	pt_entry_t;		/* page table entry */
 #define	Ln_ADDR_MASK	(Ln_ENTRIES - 1)
 #define	Ln_TABLE_MASK	((1 << 12) - 1)
 
+#define	pmap_l0_index(va)	(((va) >> L0_SHIFT) & L0_ADDR_MASK)
+#define	pmap_l1_index(va)	(((va) >> L1_SHIFT) & Ln_ADDR_MASK)
+#define	pmap_l2_index(va)	(((va) >> L2_SHIFT) & Ln_ADDR_MASK)
+#define	pmap_l3_index(va)	(((va) >> L3_SHIFT) & Ln_ADDR_MASK)
+
 #endif /* !_MACHINE_PTE_H_ */
 
 /* End of pte.h */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710101254.v9ACsaSD081550>