1*ba7cbe76Scherry /* $NetBSD: pal.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */ 2*ba7cbe76Scherry 3*ba7cbe76Scherry /*- 4*ba7cbe76Scherry * Copyright (c) 2000 Doug Rabson 5*ba7cbe76Scherry * All rights reserved. 6*ba7cbe76Scherry * 7*ba7cbe76Scherry * Redistribution and use in source and binary forms, with or without 8*ba7cbe76Scherry * modification, are permitted provided that the following conditions 9*ba7cbe76Scherry * are met: 10*ba7cbe76Scherry * 1. Redistributions of source code must retain the above copyright 11*ba7cbe76Scherry * notice, this list of conditions and the following disclaimer. 12*ba7cbe76Scherry * 2. Redistributions in binary form must reproduce the above copyright 13*ba7cbe76Scherry * notice, this list of conditions and the following disclaimer in the 14*ba7cbe76Scherry * documentation and/or other materials provided with the distribution. 15*ba7cbe76Scherry * 16*ba7cbe76Scherry * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17*ba7cbe76Scherry * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*ba7cbe76Scherry * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*ba7cbe76Scherry * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20*ba7cbe76Scherry * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*ba7cbe76Scherry * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*ba7cbe76Scherry * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*ba7cbe76Scherry * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*ba7cbe76Scherry * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*ba7cbe76Scherry * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*ba7cbe76Scherry * SUCH DAMAGE. 27*ba7cbe76Scherry * 28*ba7cbe76Scherry * $FreeBSD$ 29*ba7cbe76Scherry */ 30*ba7cbe76Scherry 31*ba7cbe76Scherry #ifndef _MACHINE_PAL_H_ 32*ba7cbe76Scherry #define _MACHINE_PAL_H_ 33*ba7cbe76Scherry 34*ba7cbe76Scherry /* 35*ba7cbe76Scherry * Architected static calling convention procedures. 36*ba7cbe76Scherry */ 37*ba7cbe76Scherry #define PAL_CACHE_FLUSH 1 38*ba7cbe76Scherry #define PAL_CACHE_INFO 2 39*ba7cbe76Scherry #define PAL_CACHE_INIT 3 40*ba7cbe76Scherry #define PAL_CACHE_SUMMARY 4 41*ba7cbe76Scherry #define PAL_MEM_ATTRIB 5 42*ba7cbe76Scherry #define PAL_PTCE_INFO 6 43*ba7cbe76Scherry #define PAL_VM_INFO 7 44*ba7cbe76Scherry #define PAL_VM_SUMMARY 8 45*ba7cbe76Scherry #define PAL_BUS_GET_FEATURES 9 46*ba7cbe76Scherry #define PAL_BUS_SET_FEATURES 10 47*ba7cbe76Scherry #define PAL_DEBUG_INFO 11 48*ba7cbe76Scherry #define PAL_FIXED_ADDR 12 49*ba7cbe76Scherry #define PAL_FREQ_BASE 13 50*ba7cbe76Scherry #define PAL_FREQ_RATIOS 14 51*ba7cbe76Scherry #define PAL_PERF_MON_INFO 15 52*ba7cbe76Scherry #define PAL_PLATFORM_ADDR 16 53*ba7cbe76Scherry #define PAL_PROC_GET_FEATURE 17 54*ba7cbe76Scherry #define PAL_PROC_SET_FEATURE 18 55*ba7cbe76Scherry #define PAL_RSE_INFO 19 56*ba7cbe76Scherry #define PAL_VERSION 20 57*ba7cbe76Scherry #define PAL_MC_CLEAR_LOG 21 58*ba7cbe76Scherry #define PAL_MC_DRAIN 22 59*ba7cbe76Scherry #define PAL_MC_DYNAMIC_STATE 24 60*ba7cbe76Scherry #define PAL_MC_ERROR_INFO 25 61*ba7cbe76Scherry #define PAL_MC_EXPECTED 23 62*ba7cbe76Scherry #define PAL_MC_REGISTER_MEM 27 63*ba7cbe76Scherry #define PAL_MC_RESUME 26 64*ba7cbe76Scherry #define PAL_HALT 28 65*ba7cbe76Scherry #define PAL_HALT_LIGHT 29 66*ba7cbe76Scherry #define PAL_COPY_INFO 30 67*ba7cbe76Scherry #define PAL_CACHE_LINE_INIT 31 68*ba7cbe76Scherry #define PAL_PMI_ENTRYPOINT 32 69*ba7cbe76Scherry #define PAL_ENTER_IA_32_ENV 33 70*ba7cbe76Scherry #define PAL_VM_PAGE_SIZE 34 71*ba7cbe76Scherry #define PAL_MEM_FOR_TEST 37 72*ba7cbe76Scherry #define PAL_CACHE_PROT_INFO 38 73*ba7cbe76Scherry #define PAL_REGISTER_INFO 39 74*ba7cbe76Scherry #define PAL_SHUTDOWN 40 75*ba7cbe76Scherry #define PAL_PREFETCH_VISIBILITY 41 76*ba7cbe76Scherry 77*ba7cbe76Scherry /* 78*ba7cbe76Scherry * Architected stacked calling convention procedures. 79*ba7cbe76Scherry */ 80*ba7cbe76Scherry #define PAL_COPY_PAL 256 81*ba7cbe76Scherry #define PAL_HALT_INFO 257 82*ba7cbe76Scherry #define PAL_TEST_PROC 258 83*ba7cbe76Scherry #define PAL_CACHE_READ 259 84*ba7cbe76Scherry #define PAL_CACHE_WRITE 260 85*ba7cbe76Scherry #define PAL_VM_TR_READ 261 86*ba7cbe76Scherry 87*ba7cbe76Scherry /* 88*ba7cbe76Scherry * Default physical address of the Processor Interrupt Block (PIB). 89*ba7cbe76Scherry * See also: IA-64 SDM, rev 1.1, volume 2, page 5-31. 90*ba7cbe76Scherry */ 91*ba7cbe76Scherry #define PAL_PIB_DEFAULT_ADDR 0x00000000FEE00000L 92*ba7cbe76Scherry 93*ba7cbe76Scherry struct ia64_pal_result { 94*ba7cbe76Scherry int64_t pal_status; 95*ba7cbe76Scherry u_int64_t pal_result[3]; 96*ba7cbe76Scherry }; 97*ba7cbe76Scherry 98*ba7cbe76Scherry extern struct ia64_pal_result 99*ba7cbe76Scherry ia64_call_pal_static(u_int64_t proc, u_int64_t arg1, 100*ba7cbe76Scherry u_int64_t arg2, u_int64_t arg3); 101*ba7cbe76Scherry extern struct ia64_pal_result 102*ba7cbe76Scherry ia64_call_pal_static_physical(u_int64_t proc, u_int64_t arg1, 103*ba7cbe76Scherry u_int64_t arg2, u_int64_t arg3); 104*ba7cbe76Scherry extern struct ia64_pal_result 105*ba7cbe76Scherry ia64_call_pal_stacked(u_int64_t proc, u_int64_t arg1, 106*ba7cbe76Scherry u_int64_t arg2, u_int64_t arg3); 107*ba7cbe76Scherry extern struct ia64_pal_result 108*ba7cbe76Scherry ia64_call_pal_stacked_physical(u_int64_t proc, u_int64_t arg1, 109*ba7cbe76Scherry u_int64_t arg2, u_int64_t arg3); 110*ba7cbe76Scherry 111*ba7cbe76Scherry #endif /* _MACHINE_PAL_H_ */ 112