| /linux/drivers/crypto/ccp/ |
| H A D | psp-dev.c | 3 * AMD Platform Security Processor (PSP) interface 17 #include "psp-dev.h" 46 int psp_mailbox_command(struct psp_device *psp, enum psp_cmd cmd, void *cmdbuff, in psp_mailbox_command() argument 52 if (!psp || !psp->vdata || !psp->vdata->cmdresp_reg || in psp_mailbox_command() 53 !psp->vdata->cmdbuff_addr_lo_reg || !psp->vdata->cmdbuff_addr_hi_reg) in psp_mailbox_command() 56 cmdresp_reg = psp->io_regs + psp->vdata->cmdresp_reg; in psp_mailbox_command() 57 cmdbuff_lo_reg = psp->io_regs + psp->vdata->cmdbuff_addr_lo_reg; in psp_mailbox_command() 58 cmdbuff_hi_reg = psp->io_regs + psp->vdata->cmdbuff_addr_hi_reg; in psp_mailbox_command() 60 mutex_lock(&psp->mailbox_mutex); in psp_mailbox_command() 78 mutex_unlock(&psp->mailbox_mutex); in psp_mailbox_command() [all …]
|
| H A D | platform-access.c | 3 * 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 D | tee-dev.c | 17 #include <linux/psp.h> 18 #include <linux/psp-tee.h> 20 #include "psp-dev.h" 113 * CPU-PSP message registers in tee_init_ring() 115 ret = psp_mailbox_command(tee->psp, PSP_CMD_TEE_RING_INIT, cmd, in tee_init_ring() 148 ret = psp_mailbox_command(tee->psp, PSP_CMD_TEE_RING_DESTROY, NULL, in tee_destroy_ring() 162 int tee_dev_init(struct psp_device *psp) in tee_dev_init() argument 164 struct device *dev = psp->dev; in tee_dev_init() 173 psp->tee_data = tee; in tee_dev_init() 176 tee->psp = psp; in tee_dev_init() [all …]
|
| H A D | sfs.h | 3 * 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 D | dbc.h | 3 * 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 D | psp-dev.h | 3 * AMD Platform Security Processor (PSP) interface driver 18 #include <linux/psp.h> 19 #include <linux/psp-platform-access.h> 77 void psp_set_sev_irq_handler(struct psp_device *psp, psp_irq_handler_t handler, 79 void psp_clear_sev_irq_handler(struct psp_device *psp); 84 * enum psp_cmd - PSP mailbox commands 97 int psp_mailbox_command(struct psp_device *psp, enum psp_cmd cmd, void *cmdbuff, 118 * enum psp_sub_cmd - PSP mailbox sub commands 135 int psp_extended_mailbox_cmd(struct psp_device *psp, unsigned int timeout_msecs,
|
| H A D | platform-access.h | 3 * 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 D | sfs.c | 31 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 …]
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_psp.h | 112 * These values map to the way the PSP kernel identifies the 141 int (*init_microcode)(struct psp_context *psp); 142 int (*wait_for_bootloader)(struct psp_context *psp); 143 int (*bootloader_load_kdb)(struct psp_context *psp); 144 int (*bootloader_load_spl)(struct psp_context *psp); 145 int (*bootloader_load_sysdrv)(struct psp_context *psp); 146 int (*bootloader_load_soc_drv)(struct psp_context *psp); 147 int (*bootloader_load_intf_drv)(struct psp_context *psp); 148 int (*bootloader_load_dbg_drv)(struct psp_context *psp); 149 int (*bootloader_load_ras_drv)(struct psp_context *psp); [all …]
|
| H A D | psp_v13_0_4.c | 35 static int psp_v13_0_4_init_microcode(struct psp_context *psp) in psp_v13_0_4_init_microcode() argument 37 struct amdgpu_device *adev = psp->adev; in psp_v13_0_4_init_microcode() 45 err = psp_init_toc_microcode(psp, ucode_prefix); in psp_v13_0_4_init_microcode() 48 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v13_0_4_init_microcode() 59 static bool psp_v13_0_4_is_sos_alive(struct psp_context *psp) in psp_v13_0_4_is_sos_alive() argument 61 struct amdgpu_device *adev = psp->adev; in psp_v13_0_4_is_sos_alive() 69 static int psp_v13_0_4_wait_for_bootloader(struct psp_context *psp) in psp_v13_0_4_wait_for_bootloader() argument 71 struct amdgpu_device *adev = psp->adev; in psp_v13_0_4_wait_for_bootloader() 80 psp, SOC15_REG_OFFSET(MP0, 0, regMP0_SMN_C2PMSG_35), in psp_v13_0_4_wait_for_bootloader() 90 static int psp_v13_0_4_bootloader_load_component(struct psp_context *psp, in psp_v13_0_4_bootloader_load_component() argument [all …]
|
| H A D | psp_v13_0.c | 83 static int psp_v13_0_init_microcode(struct psp_context *psp) in psp_v13_0_init_microcode() argument 85 struct amdgpu_device *adev = psp->adev; in psp_v13_0_init_microcode() 93 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v13_0_init_microcode() 98 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v13_0_init_microcode() 111 err = psp_init_toc_microcode(psp, ucode_prefix); in psp_v13_0_init_microcode() 114 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v13_0_init_microcode() 124 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v13_0_init_microcode() 128 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v13_0_init_microcode() 139 static bool psp_v13_0_is_sos_alive(struct psp_context *psp) in psp_v13_0_is_sos_alive() argument 141 struct amdgpu_device *adev = psp->adev; in psp_v13_0_is_sos_alive() [all …]
|
| H A D | psp_v14_0.c | 61 static int psp_v14_0_init_microcode(struct psp_context *psp) in psp_v14_0_init_microcode() argument 63 struct amdgpu_device *adev = psp->adev; in psp_v14_0_init_microcode() 72 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v14_0_init_microcode() 75 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v14_0_init_microcode() 80 err = psp_init_toc_microcode(psp, ucode_prefix); in psp_v14_0_init_microcode() 83 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v14_0_init_microcode() 94 static bool psp_v14_0_is_sos_alive(struct psp_context *psp) in psp_v14_0_is_sos_alive() argument 96 struct amdgpu_device *adev = psp->adev; in psp_v14_0_is_sos_alive() 104 static int psp_v14_0_wait_for_bootloader(struct psp_context *psp) in psp_v14_0_wait_for_bootloader() argument 106 struct amdgpu_device *adev = psp->adev; in psp_v14_0_wait_for_bootloader() [all …]
|
| H A D | psp_v11_0.c | 88 static int psp_v11_0_init_microcode(struct psp_context *psp) in psp_v11_0_init_microcode() argument 90 struct amdgpu_device *adev = psp->adev; in psp_v11_0_init_microcode() 101 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v11_0_init_microcode() 104 err = psp_init_asd_microcode(psp, ucode_prefix); in psp_v11_0_init_microcode() 107 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v11_0_init_microcode() 108 adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0; in psp_v11_0_init_microcode() 113 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v11_0_init_microcode() 116 err = psp_init_asd_microcode(psp, ucode_prefix); in psp_v11_0_init_microcode() 119 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v11_0_init_microcode() 120 adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0; in psp_v11_0_init_microcode() [all …]
|
| H A D | psp_v3_1.c | 54 static int psp_v3_1_ring_stop(struct psp_context *psp, 57 static int psp_v3_1_init_microcode(struct psp_context *psp) in psp_v3_1_init_microcode() argument 59 struct amdgpu_device *adev = psp->adev; in psp_v3_1_init_microcode() 67 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v3_1_init_microcode() 71 err = psp_init_asd_microcode(psp, ucode_prefix); in psp_v3_1_init_microcode() 78 static int psp_v3_1_bootloader_load_sysdrv(struct psp_context *psp) in psp_v3_1_bootloader_load_sysdrv() argument 82 struct amdgpu_device *adev = psp->adev; in psp_v3_1_bootloader_load_sysdrv() 93 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sysdrv() 98 /* Copy PSP System Driver binary to memory */ in psp_v3_1_bootloader_load_sysdrv() 99 psp_copy_fw(psp, psp->sys.start_addr, psp->sys.size_bytes); in psp_v3_1_bootloader_load_sysdrv() [all …]
|
| H A D | psp_v12_0.c | 45 static int psp_v12_0_init_microcode(struct psp_context *psp) in psp_v12_0_init_microcode() argument 47 struct amdgpu_device *adev = psp->adev; in psp_v12_0_init_microcode() 54 err = psp_init_asd_microcode(psp, ucode_prefix); in psp_v12_0_init_microcode() 58 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v12_0_init_microcode() 64 adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0; in psp_v12_0_init_microcode() 69 static int psp_v12_0_bootloader_load_sysdrv(struct psp_context *psp) in psp_v12_0_bootloader_load_sysdrv() argument 73 struct amdgpu_device *adev = psp->adev; in psp_v12_0_bootloader_load_sysdrv() 84 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v12_0_bootloader_load_sysdrv() 89 /* Copy PSP System Driver binary to memory */ in psp_v12_0_bootloader_load_sysdrv() 90 psp_copy_fw(psp, psp->sys.start_addr, psp->sys.size_bytes); in psp_v12_0_bootloader_load_sysdrv() [all …]
|
| H A D | psp_v10_0.c | 47 static int psp_v10_0_init_microcode(struct psp_context *psp) in psp_v10_0_init_microcode() argument 49 struct amdgpu_device *adev = psp->adev; in psp_v10_0_init_microcode() 56 err = psp_init_asd_microcode(psp, ucode_prefix); in psp_v10_0_init_microcode() 60 err = psp_init_ta_microcode(psp, ucode_prefix); in psp_v10_0_init_microcode() 63 (psp->securedisplay_context.context.bin_desc.fw_version >= in psp_v10_0_init_microcode() 65 adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0; in psp_v10_0_init_microcode() 70 static int psp_v10_0_ring_create(struct psp_context *psp, in psp_v10_0_ring_create() argument 75 struct psp_ring *ring = &psp->km_ring; in psp_v10_0_ring_create() 76 struct amdgpu_device *adev = psp->adev; in psp_v10_0_ring_create() 96 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v10_0_ring_create() [all …]
|
| H A D | psp_v11_0_8.c | 31 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 D | amdgpu_psp_ta.h | 28 #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
|
| H A D | amdgpu_dev_coredump.c | 121 drm_printf(p, "PSP SOS feature version: %u, fw version: 0x%08x\n", in amdgpu_devcoredump_fw_info() 122 adev->psp.sos.feature_version, adev->psp.sos.fw_version); in amdgpu_devcoredump_fw_info() 123 drm_printf(p, "PSP ASD feature version: %u, fw version: 0x%08x\n", in amdgpu_devcoredump_fw_info() 124 adev->psp.asd_context.bin_desc.feature_version, in amdgpu_devcoredump_fw_info() 125 adev->psp.asd_context.bin_desc.fw_version); in amdgpu_devcoredump_fw_info() 128 adev->psp.xgmi_context.context.bin_desc.feature_version, in amdgpu_devcoredump_fw_info() 129 adev->psp.xgmi_context.context.bin_desc.fw_version); in amdgpu_devcoredump_fw_info() 131 adev->psp.ras_context.context.bin_desc.feature_version, in amdgpu_devcoredump_fw_info() 132 adev->psp.ras_context.context.bin_desc.fw_version); in amdgpu_devcoredump_fw_info() 134 adev->psp.hdcp_context.context.bin_desc.feature_version, in amdgpu_devcoredump_fw_info() [all …]
|
| /linux/drivers/accel/amdxdna/ |
| H A D | aie2_psp.c | 20 /* PSP commands */ 25 /* PSP special arguments */ 28 /* PSP response error code */ 47 static int psp_exec(struct psp_device *psp, u32 *reg_vals) in psp_exec() argument 55 writel(reg_vals[i], PSP_REG(psp, i)); in psp_exec() 57 /* clear and set PSP INTR register to kick off */ in psp_exec() 58 writel(0, PSP_REG(psp, PSP_INTR_REG)); in psp_exec() 59 writel(1, PSP_REG(psp, PSP_INTR_REG)); in psp_exec() 61 /* PSP should be busy. Wait for ready, so we know task is done. */ in psp_exec() 62 ret = readx_poll_timeout(readl, PSP_REG(psp, PSP_STATUS_REG), ready, in psp_exec() [all …]
|
| /linux/drivers/gpu/drm/amd/display/modules/hdcp/ |
| H A D | hdcp_psp.c | 51 struct psp_context *psp = hdcp->config.psp.handle; in remove_display_from_topology_v2() local 57 dtm_cmd = (struct ta_dtm_shared_memory *)psp->dtm_context.context.mem_context.shared_buf; in remove_display_from_topology_v2() 62 mutex_lock(&psp->dtm_context.mutex); in remove_display_from_topology_v2() 71 psp_dtm_invoke(psp, dtm_cmd->cmd_id); in remove_display_from_topology_v2() 80 mutex_unlock(&psp->dtm_context.mutex); in remove_display_from_topology_v2() 87 struct psp_context *psp = hdcp->config.psp.handle; in remove_display_from_topology_v3() local 93 dtm_cmd = (struct ta_dtm_shared_memory *)psp->dtm_context.context.mem_context.shared_buf; in remove_display_from_topology_v3() 98 mutex_lock(&psp->dtm_context.mutex); in remove_display_from_topology_v3() 107 psp_dtm_invoke(psp, dtm_cmd->cmd_id); in remove_display_from_topology_v3() 108 mutex_unlock(&psp->dtm_context.mutex); in remove_display_from_topology_v3() [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | srv6_end_flavors_test.sh | 13 # - 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 D | power_supply.c | 106 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 D | psp-dbc.h | 25 * @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 D | power_supply_core.c | 411 enum power_supply_property psp; member 420 if (!power_supply_get_property(epsy, data->psp, data->val)) in __power_supply_get_supplier_property() 427 enum power_supply_property psp, in power_supply_get_property_from_supplier() argument 432 .psp = psp, in power_supply_get_property_from_supplier() 439 * suppliers, we simply pick the first supply to report the psp. in power_supply_get_property_from_supplier() 879 enum power_supply_property psp) in power_supply_battery_info_has_prop() argument 884 switch (psp) { in power_supply_battery_info_has_prop() 922 enum power_supply_property psp, in power_supply_battery_info_get_prop() argument 928 if (!power_supply_battery_info_has_prop(info, psp)) in power_supply_battery_info_get_prop() 931 switch (psp) { in power_supply_battery_info_get_prop() [all …]
|