130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* toshiba.h -- Linux driver for accessing the SMM on Toshiba laptops 230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Copyright (c) 1996-2000 Jonathan A. Buzzard (jonathan@buzzard.org.uk) 430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Thanks to Juergen Heinzl <juergen@monocerus.demon.co.uk> for the pointers 630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * on making sure the structure is aligned and packed. 730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * This program is free software; you can redistribute it and/or modify it 930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * under the terms of the GNU General Public License as published by the 1030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Free Software Foundation; either version 2, or (at your option) any 1130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * later version. 1230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 1330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * This program is distributed in the hope that it will be useful, but 1430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * WITHOUT ANY WARRANTY; without even the implied warranty of 1530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * General Public License for more details. 1730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 1830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng */ 1930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 2030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#ifndef _UAPI_LINUX_TOSHIBA_H 2130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define _UAPI_LINUX_TOSHIBA_H 2230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 2330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define TOSH_PROC "/proc/toshiba" 2430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define TOSH_DEVICE "/dev/toshiba" 2530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define TOSH_SMM _IOWR('t', 0x90, int) /* broken: meant 24 bytes */ 2630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 2730692c65c4174412c90e79489e98ab85c1a7412fBen Chengtypedef struct { 2830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng unsigned int eax; 2930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng unsigned int ebx __attribute__ ((packed)); 3030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng unsigned int ecx __attribute__ ((packed)); 3130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng unsigned int edx __attribute__ ((packed)); 3230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng unsigned int esi __attribute__ ((packed)); 3330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng unsigned int edi __attribute__ ((packed)); 3430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng} SMMRegisters; 3530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 3630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng 3730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#endif /* _UAPI_LINUX_TOSHIBA_H */ 38