1/* $Id: systeminfo.h,v 1.1.1.1 2008/10/15 03:27:17 james26_jang Exp $ 2 * 3 * This file is subject to the terms and conditions of the GNU General Public 4 * License. See the file "COPYING" in the main directory of this archive 5 * for more details. 6 * 7 * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved. 8 */ 9#ifndef _ASM_IA64_SN_SYSTEMINFO_H 10#define _ASM_IA64_SN_SYSTEMINFO_H 11 12#include <linux/types.h> 13 14#ifdef __cplusplus 15extern "C" { 16#endif 17 18#define MAX_SERIAL_SIZE 16 19 20typedef struct module_info_s { 21 uint64_t serial_num; 22 int mod_num; 23 char serial_str[MAX_SERIAL_SIZE]; 24} module_info_t; 25 26 27 28/* 29 * Commands to sysinfo() 30 */ 31 32#define SI_SYSNAME 1 /* return name of operating system */ 33#define SI_HOSTNAME 2 /* return name of node */ 34#define SI_RELEASE 3 /* return release of operating system */ 35#define SI_VERSION 4 /* return version field of utsname */ 36#define SI_MACHINE 5 /* return kind of machine */ 37#define SI_ARCHITECTURE 6 /* return instruction set arch */ 38#define SI_HW_SERIAL 7 /* return hardware serial number */ 39#define SI_HW_PROVIDER 8 /* return hardware manufacturer */ 40#define SI_SRPC_DOMAIN 9 /* return secure RPC domain */ 41#define SI_INITTAB_NAME 10 /* return name of inittab file used */ 42 43#define _MIPS_SI_VENDOR 100 /* return system provider */ 44#define _MIPS_SI_OS_PROVIDER 101 /* return OS manufacturer */ 45#define _MIPS_SI_OS_NAME 102 /* return OS name */ 46#define _MIPS_SI_HW_NAME 103 /* return system name */ 47#define _MIPS_SI_NUM_PROCESSORS 104 /* return number of processors */ 48#define _MIPS_SI_HOSTID 105 /* return hostid */ 49#define _MIPS_SI_OSREL_MAJ 106 /* return OS major release number */ 50#define _MIPS_SI_OSREL_MIN 107 /* return OS minor release number */ 51#define _MIPS_SI_OSREL_PATCH 108 /* return OS release number */ 52#define _MIPS_SI_PROCESSORS 109 /* return CPU revison id */ 53#define _MIPS_SI_AVAIL_PROCESSORS 110 /* return number of available processors */ 54#define _MIPS_SI_SERIAL 111 55/* 56 * These commands are unpublished interfaces to sysinfo(). 57 */ 58#define SI_SET_HOSTNAME 258 /* set name of node */ 59 /* -unpublished option */ 60#define SI_SET_SRPC_DOMAIN 265 /* set secure RPC domain */ 61 /* -unpublished option */ 62 63#if !defined(__KERNEL__) 64int sysinfo(int, char *, long); 65int get_num_modules(void); 66int get_module_info(int, module_info_t *, size_t); 67#endif 68 69#ifdef __cplusplus 70} 71#endif 72 73#endif /* _ASM_IA64_SN_SYSTEMINFO_H */ 74