Path: blob/master/arch/powerpc/include/uapi/asm/opal-prd.h
26516 views
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */1/*2* OPAL Runtime Diagnostics interface driver3* Supported on POWERNV platform4*5* (C) Copyright IBM 20156*7* Author: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>8* Author: Jeremy Kerr <[email protected]>9*10* This program is free software; you can redistribute it and/or modify11* it under the terms of the GNU General Public License as published by12* the Free Software Foundation; either version 2, or (at your option)13* any later version.14*15* This program is distributed in the hope that it will be useful,16* but WITHOUT ANY WARRANTY; without even the implied warranty of17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18* GNU General Public License for more details.19*/2021#ifndef _UAPI_ASM_POWERPC_OPAL_PRD_H_22#define _UAPI_ASM_POWERPC_OPAL_PRD_H_2324#include <linux/types.h>2526/**27* The version of the kernel interface of the PRD system. This describes the28* interface available for the /dev/opal-prd device. The actual PRD message29* layout and content is private to the firmware <--> userspace interface, so30* is not covered by this versioning.31*32* Future interface versions are backwards-compatible; if a later kernel33* version is encountered, functionality provided in earlier versions34* will work.35*/36#define OPAL_PRD_KERNEL_VERSION 13738#define OPAL_PRD_GET_INFO _IOR('o', 0x01, struct opal_prd_info)39#define OPAL_PRD_SCOM_READ _IOR('o', 0x02, struct opal_prd_scom)40#define OPAL_PRD_SCOM_WRITE _IOW('o', 0x03, struct opal_prd_scom)4142#ifndef __ASSEMBLY__4344struct opal_prd_info {45__u64 version;46__u64 reserved[3];47};4849struct opal_prd_scom {50__u64 chip;51__u64 addr;52__u64 data;53__s64 rc;54};5556#endif /* __ASSEMBLY__ */5758#endif /* _UAPI_ASM_POWERPC_OPAL_PRD_H */596061