1*53ee8cc1Swenshuai.xi /* toshiba.h -- Linux driver for accessing the SMM on Toshiba laptops 2*53ee8cc1Swenshuai.xi * 3*53ee8cc1Swenshuai.xi * Copyright (c) 1996-2000 Jonathan A. Buzzard (jonathan@buzzard.org.uk) 4*53ee8cc1Swenshuai.xi * 5*53ee8cc1Swenshuai.xi * Thanks to Juergen Heinzl <juergen@monocerus.demon.co.uk> for the pointers 6*53ee8cc1Swenshuai.xi * on making sure the structure is aligned and packed. 7*53ee8cc1Swenshuai.xi * 8*53ee8cc1Swenshuai.xi * This program is free software; you can redistribute it and/or modify it 9*53ee8cc1Swenshuai.xi * under the terms of the GNU General Public License as published by the 10*53ee8cc1Swenshuai.xi * Free Software Foundation; either version 2, or (at your option) any 11*53ee8cc1Swenshuai.xi * later version. 12*53ee8cc1Swenshuai.xi * 13*53ee8cc1Swenshuai.xi * This program is distributed in the hope that it will be useful, but 14*53ee8cc1Swenshuai.xi * WITHOUT ANY WARRANTY; without even the implied warranty of 15*53ee8cc1Swenshuai.xi * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16*53ee8cc1Swenshuai.xi * General Public License for more details. 17*53ee8cc1Swenshuai.xi * 18*53ee8cc1Swenshuai.xi */ 19*53ee8cc1Swenshuai.xi 20*53ee8cc1Swenshuai.xi #ifndef _LINUX_TOSHIBA_H 21*53ee8cc1Swenshuai.xi #define _LINUX_TOSHIBA_H 22*53ee8cc1Swenshuai.xi 23*53ee8cc1Swenshuai.xi #define TOSH_PROC "/proc/toshiba" 24*53ee8cc1Swenshuai.xi #define TOSH_DEVICE "/dev/toshiba" 25*53ee8cc1Swenshuai.xi #define TOSH_SMM _IOWR('t', 0x90, int) /* broken: meant 24 bytes */ 26*53ee8cc1Swenshuai.xi 27*53ee8cc1Swenshuai.xi typedef struct { 28*53ee8cc1Swenshuai.xi unsigned int eax; 29*53ee8cc1Swenshuai.xi unsigned int ebx __attribute__ ((packed)); 30*53ee8cc1Swenshuai.xi unsigned int ecx __attribute__ ((packed)); 31*53ee8cc1Swenshuai.xi unsigned int edx __attribute__ ((packed)); 32*53ee8cc1Swenshuai.xi unsigned int esi __attribute__ ((packed)); 33*53ee8cc1Swenshuai.xi unsigned int edi __attribute__ ((packed)); 34*53ee8cc1Swenshuai.xi } SMMRegisters; 35*53ee8cc1Swenshuai.xi 36*53ee8cc1Swenshuai.xi int tosh_smm(SMMRegisters *regs); 37*53ee8cc1Swenshuai.xi 38*53ee8cc1Swenshuai.xi #endif 39