// SPDX-License-Identifier: GPL-2.0-only /* * HYGON Platform Security Processor (PSP) interface * * Copyright (C) 2024 Hygon Info Technologies Ltd. * * Author: Liyang Han * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include #include "psp-dev.h" /* Function and variable pointers for hooks */ struct hygon_psp_hooks_table hygon_psp_hooks; int fixup_hygon_psp_caps(struct psp_device *psp) { /* the hygon psp is unavailable if bit0 is cleared in feature reg */ if (!(psp->capability & PSP_CAPABILITY_SEV)) return -ENODEV; psp->capability &= ~(PSP_CAPABILITY_TEE | PSP_CAPABILITY_PSP_SECURITY_REPORTING); return 0; }