From owner-svn-src-head@freebsd.org Wed Feb 21 15:15:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CE1AF0AFB7; Wed, 21 Feb 2018 15:15:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8B880B92; Wed, 21 Feb 2018 15:15:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A2211A316; Wed, 21 Feb 2018 15:15:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1LFFWNb023165; Wed, 21 Feb 2018 15:15:32 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1LFFW4h023164; Wed, 21 Feb 2018 15:15:32 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201802211515.w1LFFW4h023164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 21 Feb 2018 15:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329720 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 329720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 15:15:32 -0000 Author: nwhitehorn Date: Wed Feb 21 15:15:31 2018 New Revision: 329720 URL: https://svnweb.freebsd.org/changeset/base/329720 Log: Add definitions for the new Radix MMU mode on POWER9+ CPUs. Modified: head/sys/powerpc/include/pte.h Modified: head/sys/powerpc/include/pte.h ============================================================================== --- head/sys/powerpc/include/pte.h Wed Feb 21 15:12:14 2018 (r329719) +++ head/sys/powerpc/include/pte.h Wed Feb 21 15:15:31 2018 (r329720) @@ -125,6 +125,37 @@ struct lpteg { #define LPTE_RW LPTE_BW #define LPTE_RO LPTE_BR +/* POWER ISA 3.0 Radix Table Definitions */ +#define RPTE_VALID 0x8000000000000000ULL +#define RPTE_LEAF 0x4000000000000000ULL /* is a PTE: always 1 */ +#define RPTE_SW0 0x2000000000000000ULL +#define RPTE_RPN_MASK 0x00FFFFFFFFFFF000ULL +#define RPTE_RPN_SHIFT 12 +#define RPTE_SW1 0x0000000000000800ULL +#define RPTE_SW2 0x0000000000000400ULL +#define RPTE_SW3 0x0000000000000200ULL +#define RPTE_R 0x0000000000000100ULL +#define RPTE_C 0x0000000000000080ULL + +#define RPTE_ATTR_MASK 0x0000000000000030ULL +#define RPTE_ATTR_MEM 0x0000000000000000ULL /* PTE M */ +#define RPTE_ATTR_SAO 0x0000000000000010ULL /* PTE WIM */ +#define RPTE_ATTR_GUARDEDIO 0x0000000000000020ULL /* PTE IMG */ +#define RPTE_ATTR_UNGUARDEDIO 0x0000000000000030ULL /* PTE IM */ + +#define RPTE_EAA_MASK 0x000000000000000FULL +#define RPTE_EAA_P 0x0000000000000008ULL /* Supervisor only */ +#define RPTE_EAA_R 0x0000000000000004ULL /* Read allowed */ +#define RPTE_EAA_W 0x0000000000000002ULL /* Write (+read) */ +#define RPTE_EAA_X 0x0000000000000001ULL /* Execute allowed */ + +#define RPDE_VALID RPTE_VALID +#define RPDE_LEAF RPTE_LEAF /* is a PTE: always 0 */ +#define RPDE_NLB_MASK 0x0FFFFFFFFFFFFF00ULL +#define RPDE_NLB_SHIFT 8 +#define RPDE_NLS_MASK 0x000000000000001FULL + + #ifndef LOCORE typedef struct pte pte_t; typedef struct lpte lpte_t;