10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*8819SJason.Beloro@Sun.COM * Common Development and Distribution License (the "License"). 6*8819SJason.Beloro@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*8819SJason.Beloro@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_MACHASI_H 270Sstevel@tonic-gate #define _SYS_MACHASI_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate /* 300Sstevel@tonic-gate * alternate address space identifiers 310Sstevel@tonic-gate * 320Sstevel@tonic-gate * 0x00 - 0x2F are privileged 330Sstevel@tonic-gate * 0x30 - 0x7f are hyperprivileged 340Sstevel@tonic-gate * 0x80 - 0xFF can be used by users 350Sstevel@tonic-gate */ 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* 380Sstevel@tonic-gate * ASIs specific to sun4v compliant processors. 390Sstevel@tonic-gate */ 400Sstevel@tonic-gate 410Sstevel@tonic-gate #ifdef __cplusplus 420Sstevel@tonic-gate extern "C" { 430Sstevel@tonic-gate #endif 440Sstevel@tonic-gate 450Sstevel@tonic-gate #define ASI_BLK_AIUP 0x16 /* block as if user primary */ 460Sstevel@tonic-gate #define ASI_BLK_AIUS 0x17 /* block as if user secondary */ 470Sstevel@tonic-gate #define ASI_BLK_AIUPL 0x1E /* block as if user primary little */ 480Sstevel@tonic-gate #define ASI_BLK_AIUSL 0x1F /* block as if user secondary little */ 490Sstevel@tonic-gate 500Sstevel@tonic-gate #define ASI_NQUAD_LD 0x24 /* 128-bit atomic load */ 510Sstevel@tonic-gate #define ASI_NQUAD_LD_L 0x2C /* 128-bit atomic load little */ 520Sstevel@tonic-gate #define ASI_QUAD_LDD_PHYS 0x26 /* 128-bit physical atomic load */ 530Sstevel@tonic-gate #define ASI_QUAD_LDD_PHYS_L 0x2E /* 128-bit phys. atomic load little */ 540Sstevel@tonic-gate 550Sstevel@tonic-gate #define ASI_SCRATCHPAD 0x20 /* sun4v scratch pad registers ASI */ 560Sstevel@tonic-gate #define ASI_MMU 0x21 /* sun4v ctx register ASI */ 570Sstevel@tonic-gate #define ASI_MMU_CTX ASI_MMU 580Sstevel@tonic-gate 590Sstevel@tonic-gate #define ASI_QUEUE 0x25 600Sstevel@tonic-gate 610Sstevel@tonic-gate /* 620Sstevel@tonic-gate * MMU fault status area (see sys/hypervisor_api.h for layout) 630Sstevel@tonic-gate */ 640Sstevel@tonic-gate #define MMU_FAULT_STATUS_AREA(REG) \ 650Sstevel@tonic-gate ldxa [%g0]ASI_SCRATCHPAD, REG 660Sstevel@tonic-gate 670Sstevel@tonic-gate /* 680Sstevel@tonic-gate * Scratch pad registers 690Sstevel@tonic-gate * (0x0 through 0x18 guaranteed fast, rest may be slow) 700Sstevel@tonic-gate */ 710Sstevel@tonic-gate #define SCRATCHPAD_MMUMISSAREA 0x0 /* Shared with OBP - set by OBP */ 720Sstevel@tonic-gate #define SCRATCHPAD_CPUID 0x8 /* Shared with OBP - set by HV */ 730Sstevel@tonic-gate #define SCRATCHPAD_UTSBREG1 0x10 740Sstevel@tonic-gate #define SCRATCHPAD_UTSBREG2 0x18 750Sstevel@tonic-gate /* 0x20 & 0x28 HV only */ 760Sstevel@tonic-gate #define SCRATCHPAD_UNUSED1 0x30 770Sstevel@tonic-gate #define SCRATCHPAD_UNUSED2 0x38 /* reserved for OBP */ 780Sstevel@tonic-gate 790Sstevel@tonic-gate /* 800Sstevel@tonic-gate * Ancillary state registers, for asrset_t 810Sstevel@tonic-gate */ 820Sstevel@tonic-gate #define ASR_GSR (3) 830Sstevel@tonic-gate 840Sstevel@tonic-gate #ifdef __cplusplus 850Sstevel@tonic-gate } 860Sstevel@tonic-gate #endif 870Sstevel@tonic-gate 880Sstevel@tonic-gate #endif /* _SYS_MACHASI_H */ 89