2026-01-29 22:25:33 +08:00

31 lines
828 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* HYGON Platform Security Processor (PSP) interface
*
* Copyright (C) 2024 Hygon Info Technologies Ltd.
*
* Author: Liyang Han <hanliyang@hygon.cn>
*
* 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 <linux/psp-hygon.h>
#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;
}