1*4bf97069SCharlie Jenkins /* SPDX-License-Identifier: GPL-2.0-only */ 2*4bf97069SCharlie Jenkins /* 3*4bf97069SCharlie Jenkins * Interface for managing mitigations for riscv vulnerabilities. 4*4bf97069SCharlie Jenkins * 5*4bf97069SCharlie Jenkins * Copyright (C) 2024 Rivos Inc. 6*4bf97069SCharlie Jenkins */ 7*4bf97069SCharlie Jenkins 8*4bf97069SCharlie Jenkins #ifndef __ASM_BUGS_H 9*4bf97069SCharlie Jenkins #define __ASM_BUGS_H 10*4bf97069SCharlie Jenkins 11*4bf97069SCharlie Jenkins /* Watch out, ordering is important here. */ 12*4bf97069SCharlie Jenkins enum mitigation_state { 13*4bf97069SCharlie Jenkins UNAFFECTED, 14*4bf97069SCharlie Jenkins MITIGATED, 15*4bf97069SCharlie Jenkins VULNERABLE, 16*4bf97069SCharlie Jenkins }; 17*4bf97069SCharlie Jenkins 18*4bf97069SCharlie Jenkins void ghostwrite_set_vulnerable(void); 19*4bf97069SCharlie Jenkins bool ghostwrite_enable_mitigation(void); 20*4bf97069SCharlie Jenkins enum mitigation_state ghostwrite_get_state(void); 21*4bf97069SCharlie Jenkins 22*4bf97069SCharlie Jenkins #endif /* __ASM_BUGS_H */ 23