18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _UAPI_LINUX_NVRAM_H 38c2ecf20Sopenharmony_ci#define _UAPI_LINUX_NVRAM_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/ioctl.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* /dev/nvram ioctls */ 88c2ecf20Sopenharmony_ci#define NVRAM_INIT _IO('p', 0x40) /* initialize NVRAM and set checksum */ 98c2ecf20Sopenharmony_ci#define NVRAM_SETCKS _IO('p', 0x41) /* recalculate checksum */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* for all current systems, this is where NVRAM starts */ 128c2ecf20Sopenharmony_ci#define NVRAM_FIRST_BYTE 14 138c2ecf20Sopenharmony_ci/* all these functions expect an NVRAM offset, not an absolute */ 148c2ecf20Sopenharmony_ci#define NVRAM_OFFSET(x) ((x)-NVRAM_FIRST_BYTE) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#endif /* _UAPI_LINUX_NVRAM_H */ 18