1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells #ifndef _UAPI_LINUX_NVRAM_H 3607ca46eSDavid Howells #define _UAPI_LINUX_NVRAM_H 4607ca46eSDavid Howells 5607ca46eSDavid Howells #include <linux/ioctl.h> 6607ca46eSDavid Howells 7607ca46eSDavid Howells /* /dev/nvram ioctls */ 8607ca46eSDavid Howells #define NVRAM_INIT _IO('p', 0x40) /* initialize NVRAM and set checksum */ 9607ca46eSDavid Howells #define NVRAM_SETCKS _IO('p', 0x41) /* recalculate checksum */ 10607ca46eSDavid Howells 11607ca46eSDavid Howells /* for all current systems, this is where NVRAM starts */ 12607ca46eSDavid Howells #define NVRAM_FIRST_BYTE 14 13607ca46eSDavid Howells /* all these functions expect an NVRAM offset, not an absolute */ 14607ca46eSDavid Howells #define NVRAM_OFFSET(x) ((x)-NVRAM_FIRST_BYTE) 15607ca46eSDavid Howells 16607ca46eSDavid Howells 17607ca46eSDavid Howells #endif /* _UAPI_LINUX_NVRAM_H */ 18