Path: blob/master/arch/powerpc/include/uapi/asm/epapr_hcalls.h
26516 views
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */1/*2* ePAPR hcall interface3*4* Copyright 2008-2011 Freescale Semiconductor, Inc.5*6* Author: Timur Tabi <[email protected]>7*8* This file is provided under a dual BSD/GPL license. When using or9* redistributing this file, you may do so under either license.10*11* Redistribution and use in source and binary forms, with or without12* modification, are permitted provided that the following conditions are met:13* * Redistributions of source code must retain the above copyright14* notice, this list of conditions and the following disclaimer.15* * Redistributions in binary form must reproduce the above copyright16* notice, this list of conditions and the following disclaimer in the17* documentation and/or other materials provided with the distribution.18* * Neither the name of Freescale Semiconductor nor the19* names of its contributors may be used to endorse or promote products20* derived from this software without specific prior written permission.21*22*23* ALTERNATIVELY, this software may be distributed under the terms of the24* GNU General Public License ("GPL") as published by the Free Software25* Foundation, either version 2 of that License or (at your option) any26* later version.27*28* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY29* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED30* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE31* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY32* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES33* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;34* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND35* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT36* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS37* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.38*/3940#ifndef _UAPI_ASM_POWERPC_EPAPR_HCALLS_H41#define _UAPI_ASM_POWERPC_EPAPR_HCALLS_H4243#define EV_BYTE_CHANNEL_SEND 144#define EV_BYTE_CHANNEL_RECEIVE 245#define EV_BYTE_CHANNEL_POLL 346#define EV_INT_SET_CONFIG 447#define EV_INT_GET_CONFIG 548#define EV_INT_SET_MASK 649#define EV_INT_GET_MASK 750#define EV_INT_IACK 951#define EV_INT_EOI 1052#define EV_INT_SEND_IPI 1153#define EV_INT_SET_TASK_PRIORITY 1254#define EV_INT_GET_TASK_PRIORITY 1355#define EV_DOORBELL_SEND 1456#define EV_MSGSND 1557#define EV_IDLE 165859/* vendor ID: epapr */60#define EV_LOCAL_VENDOR_ID 0 /* for private use */61#define EV_EPAPR_VENDOR_ID 162#define EV_FSL_VENDOR_ID 2 /* Freescale Semiconductor */63#define EV_IBM_VENDOR_ID 3 /* IBM */64#define EV_GHS_VENDOR_ID 4 /* Green Hills Software */65#define EV_ENEA_VENDOR_ID 5 /* Enea */66#define EV_WR_VENDOR_ID 6 /* Wind River Systems */67#define EV_AMCC_VENDOR_ID 7 /* Applied Micro Circuits */68#define EV_KVM_VENDOR_ID 42 /* KVM */6970/* The max number of bytes that a byte channel can send or receive per call */71#define EV_BYTE_CHANNEL_MAX_BYTES 16727374#define _EV_HCALL_TOKEN(id, num) (((id) << 16) | (num))75#define EV_HCALL_TOKEN(hcall_num) _EV_HCALL_TOKEN(EV_EPAPR_VENDOR_ID, hcall_num)7677/* epapr return codes */78#define EV_SUCCESS 079#define EV_EPERM 1 /* Operation not permitted */80#define EV_ENOENT 2 /* Entry Not Found */81#define EV_EIO 3 /* I/O error occurred */82#define EV_EAGAIN 4 /* The operation had insufficient83* resources to complete and should be84* retried85*/86#define EV_ENOMEM 5 /* There was insufficient memory to87* complete the operation */88#define EV_EFAULT 6 /* Bad guest address */89#define EV_ENODEV 7 /* No such device */90#define EV_EINVAL 8 /* An argument supplied to the hcall91was out of range or invalid */92#define EV_INTERNAL 9 /* An internal error occurred */93#define EV_CONFIG 10 /* A configuration error was detected */94#define EV_INVALID_STATE 11 /* The object is in an invalid state */95#define EV_UNIMPLEMENTED 12 /* Unimplemented hypercall */96#define EV_BUFFER_OVERFLOW 13 /* Caller-supplied buffer too small */9798#endif /* _UAPI_ASM_POWERPC_EPAPR_HCALLS_H */99100101