mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: ccp - Add support for fetching a nonce for dynamic boost control
Dynamic Boost Control is a feature offered on AMD client platforms that allows software to request and set power or frequency limits. Only software that has authenticated with the PSP can retrieve or set these limits. Create a character device and ioctl for fetching the nonce. This ioctl supports optionally passing authentication information which will influence how many calls the nonce is valid for. Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
b8440d55f7
commit
c04cf9e14f
@@ -15,6 +15,7 @@
|
||||
#include "sev-dev.h"
|
||||
#include "tee-dev.h"
|
||||
#include "platform-access.h"
|
||||
#include "dbc.h"
|
||||
|
||||
struct psp_device *psp_master;
|
||||
|
||||
@@ -112,6 +113,12 @@ static void psp_init_platform_access(struct psp_device *psp)
|
||||
dev_warn(psp->dev, "platform access init failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* dbc must come after platform access as it tests the feature */
|
||||
ret = dbc_dev_init(psp);
|
||||
if (ret)
|
||||
dev_warn(psp->dev, "failed to init dynamic boost control: %d\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
static int psp_init(struct psp_device *psp)
|
||||
@@ -217,6 +224,8 @@ void psp_dev_destroy(struct sp_device *sp)
|
||||
|
||||
tee_dev_destroy(psp);
|
||||
|
||||
dbc_dev_destroy(psp);
|
||||
|
||||
platform_access_dev_destroy(psp);
|
||||
|
||||
sp_free_psp_irq(sp, psp);
|
||||
|
||||
Reference in New Issue
Block a user