19cb805fdSAlexey Kardashevskiy /* 29cb805fdSAlexey Kardashevskiy * NMI monitor handler class and helpers definitions. 39cb805fdSAlexey Kardashevskiy * 49cb805fdSAlexey Kardashevskiy * Copyright IBM Corp., 2014 59cb805fdSAlexey Kardashevskiy * 69cb805fdSAlexey Kardashevskiy * Author: Alexey Kardashevskiy <aik@ozlabs.ru> 79cb805fdSAlexey Kardashevskiy * 89cb805fdSAlexey Kardashevskiy * This program is free software; you can redistribute it and/or modify 99cb805fdSAlexey Kardashevskiy * it under the terms of the GNU General Public License as published by 109cb805fdSAlexey Kardashevskiy * the Free Software Foundation; either version 2 of the License, 119cb805fdSAlexey Kardashevskiy * or (at your option) any later version. 129cb805fdSAlexey Kardashevskiy * 139cb805fdSAlexey Kardashevskiy * This program is distributed in the hope that it will be useful, 149cb805fdSAlexey Kardashevskiy * but WITHOUT ANY WARRANTY; without even the implied warranty of 159cb805fdSAlexey Kardashevskiy * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 169cb805fdSAlexey Kardashevskiy * GNU General Public License for more details. 179cb805fdSAlexey Kardashevskiy * 189cb805fdSAlexey Kardashevskiy * You should have received a copy of the GNU General Public License 199cb805fdSAlexey Kardashevskiy * along with this program; if not, see <http://www.gnu.org/licenses/>. 209cb805fdSAlexey Kardashevskiy */ 219cb805fdSAlexey Kardashevskiy 229cb805fdSAlexey Kardashevskiy #ifndef NMI_H 23*175de524SMarkus Armbruster #define NMI_H 249cb805fdSAlexey Kardashevskiy 259cb805fdSAlexey Kardashevskiy #include "qemu-common.h" 269cb805fdSAlexey Kardashevskiy #include "qom/object.h" 279cb805fdSAlexey Kardashevskiy 289cb805fdSAlexey Kardashevskiy #define TYPE_NMI "nmi" 299cb805fdSAlexey Kardashevskiy 309cb805fdSAlexey Kardashevskiy #define NMI_CLASS(klass) \ 319cb805fdSAlexey Kardashevskiy OBJECT_CLASS_CHECK(NMIClass, (klass), TYPE_NMI) 329cb805fdSAlexey Kardashevskiy #define NMI_GET_CLASS(obj) \ 339cb805fdSAlexey Kardashevskiy OBJECT_GET_CLASS(NMIClass, (obj), TYPE_NMI) 349cb805fdSAlexey Kardashevskiy #define NMI(obj) \ 359cb805fdSAlexey Kardashevskiy INTERFACE_CHECK(NMI, (obj), TYPE_NMI) 369cb805fdSAlexey Kardashevskiy 379cb805fdSAlexey Kardashevskiy typedef struct NMIState { 389cb805fdSAlexey Kardashevskiy Object parent_obj; 399cb805fdSAlexey Kardashevskiy } NMIState; 409cb805fdSAlexey Kardashevskiy 419cb805fdSAlexey Kardashevskiy typedef struct NMIClass { 429cb805fdSAlexey Kardashevskiy InterfaceClass parent_class; 439cb805fdSAlexey Kardashevskiy 449cb805fdSAlexey Kardashevskiy void (*nmi_monitor_handler)(NMIState *n, int cpu_index, Error **errp); 459cb805fdSAlexey Kardashevskiy } NMIClass; 469cb805fdSAlexey Kardashevskiy 479cb805fdSAlexey Kardashevskiy void nmi_monitor_handle(int cpu_index, Error **errp); 489cb805fdSAlexey Kardashevskiy 499cb805fdSAlexey Kardashevskiy #endif /* NMI_H */ 50