Home
last modified time | relevance | path

Searched full:psp (Results 1 – 25 of 145) sorted by relevance

123456

/linux/drivers/crypto/ccp/
H A Dplatform-access.c3 * AMD Platform Security Processor (PSP) Platform Access interface
34 /* Expect mbox_cmd to be cleared and ready bit to be set by PSP */ in wait_cmd()
38 * Check for readiness of PSP mailbox in a tight loop in order to in wait_cmd()
47 struct psp_device *psp = psp_get_master_device(); in psp_check_platform_access_status() local
49 if (!psp || !psp->platform_access_data) in psp_check_platform_access_status()
59 struct psp_device *psp = psp_get_master_device(); in psp_send_platform_access_msg() local
66 if (!psp || !psp->platform_access_data) in psp_send_platform_access_msg()
69 pa_dev = psp->platform_access_data; in psp_send_platform_access_msg()
75 cmd = psp->io_regs + pa_dev->vdata->cmdresp_reg; in psp_send_platform_access_msg()
76 lo = psp->io_regs + pa_dev->vdata->cmdbuff_addr_lo_reg; in psp_send_platform_access_msg()
[all …]
H A Dhsti.c12 #include "psp-dev.h"
27 struct psp_device *psp = sp->psp_data; \
28 return sysfs_emit(buf, "%d\n", psp->capability.name); \
67 struct psp_device *psp = sp->psp_data; in psp_security_is_visible() local
69 if (psp && psp->capability.security_reporting) in psp_security_is_visible()
80 static int psp_populate_hsti(struct psp_device *psp) in psp_populate_hsti() argument
86 if (psp->capability.security_reporting) in psp_populate_hsti()
101 dev_dbg(psp->dev, "failed to populate HSTI state: %d\n", req->header.status); in psp_populate_hsti()
106 psp->capability.security_reporting = 1; in psp_populate_hsti()
107 psp->capability.raw |= req->hsti << PSP_CAPABILITY_PSP_SECURITY_OFFSET; in psp_populate_hsti()
[all …]
H A Dtee-dev.c17 #include <linux/psp.h>
18 #include <linux/psp-tee.h>
20 #include "psp-dev.h"
94 ret = psp_mailbox_command(tee->psp, PSP_CMD_TEE_RING_DESTROY, NULL, in tee_send_destroy_cmd()
137 * CPU-PSP message registers in tee_init_ring()
140 ret = psp_mailbox_command(tee->psp, PSP_CMD_TEE_RING_INIT, cmd, in tee_init_ring()
189 int tee_dev_init(struct psp_device *psp) in tee_dev_init() argument
191 struct device *dev = psp->dev; in tee_dev_init()
200 psp->tee_data = tee; in tee_dev_init()
203 tee->psp = psp; in tee_dev_init()
[all …]
H A Dsfs.h3 * AMD Platform Security Processor (PSP) Seamless Firmware (SFS) Support.
13 #include <uapi/linux/psp-sfs.h>
17 #include <linux/psp-sev.h>
18 #include <linux/psp-platform-access.h>
21 #include "psp-dev.h"
36 struct psp_device *psp; member
44 void sfs_dev_destroy(struct psp_device *psp);
45 int sfs_dev_init(struct psp_device *psp);
H A Ddbc.h3 * AMD Platform Security Processor (PSP) Dynamic Boost Control support
13 #include <uapi/linux/psp-dbc.h>
17 #include <linux/psp-platform-access.h>
19 #include "psp-dev.h"
23 struct psp_device *psp; member
44 void dbc_dev_destroy(struct psp_device *psp);
45 int dbc_dev_init(struct psp_device *psp);
H A Dplatform-access.h3 * AMD Platform Security Processor (PSP) Platform Access interface
16 #include <linux/psp-platform-access.h>
18 #include "psp-dev.h"
22 struct psp_device *psp; member
32 void platform_access_dev_destroy(struct psp_device *psp);
33 int platform_access_dev_init(struct psp_device *psp);
H A Dsfs.c31 ret = psp_extended_mailbox_cmd(sfs_dev->psp, in send_sfs_cmd()
36 "msg 0x%x failed with PSP error: 0x%x, extended status: 0x%x\n", in send_sfs_cmd()
133 * if PSP status indicated success or command error. in sfs_ioctl()
162 * if PSP status indicated success or command error. in sfs_ioctl()
192 void sfs_dev_destroy(struct psp_device *psp) in sfs_dev_destroy() argument
194 struct sfs_device *sfs_dev = psp->sfs_data; in sfs_dev_destroy()
209 psp->sfs_data = NULL; in sfs_dev_destroy()
251 int sfs_dev_init(struct psp_device *psp) in sfs_dev_init() argument
253 struct device *dev = psp->dev; in sfs_dev_init()
288 psp->sfs_data = sfs_dev; in sfs_dev_init()
[all …]
H A Dsev-dev.h3 * AMD Platform Security Processor (PSP) interface driver
24 #include <linux/psp-sev.h>
41 struct psp_device *psp; member
71 int sev_dev_init(struct psp_device *psp);
72 void sev_dev_destroy(struct psp_device *psp);
/linux/drivers/gpu/drm/amd/amdgpu/
H A Dpsp_v15_0.c37 static int psp_v15_0_0_init_microcode(struct psp_context *psp) in psp_v15_0_0_init_microcode() argument
39 struct amdgpu_device *adev = psp->adev; in psp_v15_0_0_init_microcode()
45 err = psp_init_toc_microcode(psp, ucode_prefix); in psp_v15_0_0_init_microcode()
49 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v15_0_0_init_microcode()
56 static int psp_v15_0_0_ring_stop(struct psp_context *psp, in psp_v15_0_0_ring_stop() argument
60 struct amdgpu_device *adev = psp->adev; in psp_v15_0_0_ring_stop()
69 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, regMPASP_SMN_C2PMSG_101), in psp_v15_0_0_ring_stop()
78 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, regMPASP_PCRU1_MPASP_C2PMSG_64), in psp_v15_0_0_ring_stop()
85 static int psp_v15_0_0_ring_create(struct psp_context *psp, in psp_v15_0_0_ring_create() argument
90 struct psp_ring *ring = &psp->km_ring; in psp_v15_0_0_ring_create()
[all …]
H A Dpsp_v11_0_8.c31 static int psp_v11_0_8_ring_stop(struct psp_context *psp, in psp_v11_0_8_ring_stop() argument
35 struct amdgpu_device *adev = psp->adev; in psp_v11_0_8_ring_stop()
45 psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v11_0_8_ring_stop()
55 psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v11_0_8_ring_stop()
62 static int psp_v11_0_8_ring_create(struct psp_context *psp, in psp_v11_0_8_ring_create() argument
67 struct psp_ring *ring = &psp->km_ring; in psp_v11_0_8_ring_create()
68 struct amdgpu_device *adev = psp->adev; in psp_v11_0_8_ring_create()
71 ret = psp_v11_0_8_ring_stop(psp, ring_type); in psp_v11_0_8_ring_create()
93 psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v11_0_8_ring_create()
99 psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v11_0_8_ring_create()
[all …]
H A Damdgpu_psp_ta.c72 static void set_ta_context_funcs(struct psp_context *psp, in set_ta_context_funcs() argument
78 *pcontext = &psp->ras_context.context; in set_ta_context_funcs()
79 psp->ta_funcs = &ras_ta_funcs; in set_ta_context_funcs()
153 struct psp_context *psp = &adev->psp; in ta_if_load_debugfs_write() local
179 set_ta_context_funcs(psp, ta_type, &context); in ta_if_load_debugfs_write()
181 if (!psp->ta_funcs || !psp->ta_funcs->fn_ta_terminate) { in ta_if_load_debugfs_write()
192 ret = psp_ta_init_shared_buf(psp, &context->mem_context); in ta_if_load_debugfs_write()
199 ret = psp_fn_ta_terminate(psp); in ta_if_load_debugfs_write()
215 if (!psp->ta_funcs->fn_ta_initialize) { in ta_if_load_debugfs_write()
221 ret = psp_fn_ta_initialize(psp); in ta_if_load_debugfs_write()
[all …]
H A Damdgpu_psp_ta.h28 #define psp_fn_ta_initialize(psp) ((psp)->ta_funcs->fn_ta_initialize((psp))) argument
29 #define psp_fn_ta_invoke(psp, ta_cmd_id) ((psp)->ta_funcs->fn_ta_invoke((psp), (ta_cmd_id))) argument
30 #define psp_fn_ta_terminate(psp) ((psp)->ta_funcs->fn_ta_terminate((psp))) argument
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dpsp.c4 #include <net/psp.h>
5 #include <linux/psp.h>
7 #include "psp.h"
9 #include "en_accel/psp.h"
29 struct mutex mutex; /* Protect PSP TX steering */
71 /* PSP RX flow steering */
162 "fail to alloc psp copy modify_header_id err=%d\n", err); in accel_psp_fs_rx_err_add_rule()
179 mlx5_core_err(mdev, "fail to add psp rx err copy rule err=%d\n", err); in accel_psp_fs_rx_err_add_rule()
196 mlx5_core_err(mdev, "fail to add psp rx auth fail drop rule err=%d\n", in accel_psp_fs_rx_err_add_rule()
214 mlx5_core_err(mdev, "fail to add psp rx framing err drop rule err=%d\n", in accel_psp_fs_rx_err_add_rule()
[all …]
H A Dpsp_rxtx.c10 #include <net/psp/types.h>
13 #include "psp.h"
15 #include "en_accel/psp.h"
49 /* Set SWP additional flags for packet of type IP|UDP|PSP|[ TCP | UDP ] */ in mlx5e_psp_set_swp()
79 /* Tunnel(VXLAN TCP/UDP) over Transport Mode PSP i.e. PSP payload is vxlan tunnel */ in mlx5e_psp_set_swp()
127 u16 dev_id = priv->psp->psp->id; in mlx5e_psp_offload_handle_rx_skb()
158 /* Special WA for PSP LSO in ConnectX7 */ in mlx5e_psp_tx_build_eseg()
187 atomic_inc(&priv->psp->tx_drop); in mlx5e_psp_handle_tx_skb()
/linux/drivers/i2c/busses/
H A Di2c-designware-amdpsp.c5 #include <linux/psp-platform-access.h>
6 #include <linux/psp.h>
38 /* Helper to verify status returned by PSP */
43 /* Status field in command-response buffer is updated by PSP */ in check_i2c_req_sts()
58 * Errors in x86-PSP i2c-arbitration protocol may occur at two levels:
59 * 1. mailbox communication - PSP is not operational or some IO errors with
61 * 2. i2c-requests - PSP refuses to grant i2c arbitration to x86 for too long.
110 dev_err(psp_i2c_dev, "Timed out waiting for PSP to %s I2C bus\n", in psp_send_i2c_req()
118 dev_err(psp_i2c_dev, "PSP communication error\n"); in psp_send_i2c_req()
122 dev_dbg(psp_i2c_dev, "Request accepted by PSP after %ums\n", in psp_send_i2c_req()
[all …]
/linux/net/psp/
H A DKconfig3 # PSP configuration
6 bool "PSP Security Protocol support"
12 Enable kernel support for the PSP Security Protocol (PSP).
14 https://raw.githubusercontent.com/google/psp/main/doc/PSP_Arch_Spec.pdf
H A Dpsp_main.c8 #include <net/psp.h>
11 #include "psp.h"
12 #include "psp-nl-gen.h"
18 * DOC: PSP locking
27 * psp_dev_check_access() - check if user in a given net ns can access PSP dev
28 * @psd: PSP device structure user is trying to access
36 * Return: 0 if PSP device should be visible in @net, errno otherwise. in psp_dev_check_access()
50 * psp_dev_create() - create and register PSP device in psp_dev_create()
56 * Return: pointer to allocated PSP device, or ERR_PTR. in psp_dev_create()
105 * implicit expectations about the PSP de in psp_dev_free()
[all...]
/linux/tools/testing/selftests/net/
H A Dsrv6_end_flavors_test.sh13 # - Penultimate Segment Pop (PSP);
19 # Currently in this selftest we consider only the PSP flavor for the SRv6 End
23 # The purpose of the PSP flavor consists in instructing the penultimate node
26 # A PSP enabled SRv6 End behavior instance processes the SRH by:
33 # the IPv6 DA updated during the PSP operation (i.e. the IPv6 DA corresponding
36 # Although the PSP flavor can be set for any SRv6 End behavior instance on any
42 # - a PSP enabled SRv6 End behavior bound to SID Y will apply the PSP operation
45 # - a PSP enabled SRv6 End behavior bound to SID X will *NOT* apply the PSP
[all...]
/linux/drivers/staging/greybus/
H A Dpower_supply.c106 static int get_psp_from_gb_prop(int gb_prop, enum power_supply_property *psp) in get_psp_from_gb_prop() argument
305 *psp = (enum power_supply_property)prop; in get_psp_from_gb_prop()
316 enum power_supply_property psp) in get_psy_prop() argument
321 if (gbpsy->props[i].prop == psp) in get_psy_prop()
327 enum power_supply_property psp) in is_psy_prop_writeable() argument
331 prop = get_psy_prop(gbpsy, psp); in is_psy_prop_writeable()
337 static int is_prop_valint(enum power_supply_property psp) in is_prop_valint() argument
339 return ((psp < POWER_SUPPLY_PROP_MODEL_NAME) ? 1 : 0); in is_prop_valint()
513 enum power_supply_property psp; in gb_power_supply_prop_descriptors_get() local
539 ret = get_psp_from_gb_prop(resp->props[i].property, &psp); in gb_power_supply_prop_descriptors_get()
[all …]
/linux/include/uapi/linux/
H A Dpsp-dbc.h25 * @auth_needed: Whether the PSP should authenticate this request (input).
26 * 0: no authentication, PSP will return single use nonce.
27 * 1: authentication: PSP will return multi-use nonce.
56 * PSP to allow software to validate the authenticity of the
74 * -ENODEV: driver not bound with PSP device
87 * DBCIOCNONCE - Fetch a nonce from the PSP for authenticating commands.
105 * DBCIOCPARAM - Set or get a parameter from the PSP.
113 * updated by the PSP for software to authenticate the results.
/linux/drivers/power/supply/
H A Dmp2629_charger.c213 enum power_supply_property psp, in mp2629_charger_battery_get_prop() argument
220 switch (psp) { in mp2629_charger_battery_get_prop()
316 enum power_supply_property psp, in mp2629_charger_battery_set_prop() argument
321 switch (psp) { in mp2629_charger_battery_set_prop()
340 enum power_supply_property psp, in mp2629_charger_usb_get_prop() argument
347 switch (psp) { in mp2629_charger_usb_get_prop()
405 enum power_supply_property psp, in mp2629_charger_usb_set_prop() argument
410 switch (psp) { in mp2629_charger_usb_set_prop()
423 enum power_supply_property psp) in mp2629_charger_battery_prop_writeable() argument
425 return (psp == POWER_SUPPLY_PROP_PRECHARGE_CURRENT) || in mp2629_charger_battery_prop_writeable()
[all …]
H A Drn5t618_power.c352 enum power_supply_property psp, in rn5t618_battery_get_property() argument
358 switch (psp) { in rn5t618_battery_get_property()
403 enum power_supply_property psp, in rn5t618_battery_set_property() argument
408 switch (psp) { in rn5t618_battery_set_property()
417 enum power_supply_property psp) in rn5t618_battery_property_is_writeable() argument
419 switch (psp) { in rn5t618_battery_property_is_writeable()
428 enum power_supply_property psp, in rn5t618_adp_get_property() argument
443 switch (psp) { in rn5t618_adp_get_property()
482 enum power_supply_property psp, in rn5t618_adp_set_property() argument
488 switch (psp) { in rn5t618_adp_set_property()
[all …]
H A Dtest_power.c47 enum power_supply_property psp, in test_power_get_ac_property() argument
50 switch (psp) { in test_power_get_ac_property()
61 enum power_supply_property psp, in test_power_get_usb_property() argument
64 switch (psp) { in test_power_get_usb_property()
75 enum power_supply_property psp, in test_power_get_battery_property() argument
78 switch (psp) { in test_power_get_battery_property()
146 enum power_supply_property psp) in test_power_battery_property_is_writeable() argument
148 return psp == POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR || psp == POWER_SUPPLY_PROP_CHARGE_TYPES; in test_power_battery_property_is_writeable()
152 enum power_supply_property psp, in test_power_set_battery_property() argument
155 switch (psp) { in test_power_set_battery_property()
[all …]
H A Dchagall-battery.c94 enum power_supply_property psp, u32 *val) in chagall_battery_get_value() argument
96 if (psp >= ARRAY_SIZE(chagall_battery_prop_offs)) in chagall_battery_get_value()
98 if (!chagall_battery_prop_offs[psp]) in chagall_battery_get_value()
102 return regmap_bulk_read(cg->regmap, chagall_battery_prop_offs[psp], val, 2); in chagall_battery_get_value()
116 enum power_supply_property psp, in chagall_battery_get_property() argument
122 switch (psp) { in chagall_battery_get_property()
128 ret = chagall_battery_get_value(cg, psp, &val->intval); in chagall_battery_get_property()
132 switch (psp) { in chagall_battery_get_property()
H A Daxp20x_battery.c277 enum power_supply_property psp, in axp20x_battery_get_prop() argument
283 switch (psp) { in axp20x_battery_get_prop()
429 enum power_supply_property psp, in axp717_battery_get_prop() argument
435 switch (psp) { in axp717_battery_get_prop()
770 enum power_supply_property psp, in axp20x_battery_set_prop() argument
775 switch (psp) { in axp20x_battery_set_prop()
806 enum power_supply_property psp, in axp717_battery_set_prop() argument
811 switch (psp) { in axp717_battery_set_prop()
870 enum power_supply_property psp) in axp20x_battery_prop_writeable() argument
872 return psp == POWER_SUPPLY_PROP_STATUS || in axp20x_battery_prop_writeable()
[all …]

123456