[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Bug] Bring up Dom0 on Arm board
On 16/01/2023 05:59, 蔡力刚 wrote: Hi, Hi, About the mali and sdmmc drivers problem, I compare the log between boot with xen and boot without xen. And found an error log as below: [ 65.517345] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled. (XEN) d0v2 Unhandled SMC/HVC: 0x82000010 [ 66.559382] arm-scmi firmware:scmi: unable to communicate with SCMI [ 66.559516] arm-scmi: probe of firmware:scmi failed with error -95 It seems SCMI driver probe failed. So I did an experiment, disable SCMI driver and rebuild the Linux kernel, boot up in normal way without xen, and reproduces the problem that mali and sdmmc did not bring up. It looks like a high probability SCMI cause the problem. I read the Linux code and targeting located the error -95, It seems SCMI probe failed cause by SMCCC not supported, code as below: static int smc_send_message(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) { struct scmi_smc *scmi_info = cinfo->transport_info; struct arm_smccc_res res; mutex_lock(&scmi_info->shmem_lock); shmem_tx_prepare(scmi_info->shmem, xfer); if (scmi_info->irq) reinit_completion(&scmi_info->tx_complete); arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res); if (scmi_info->irq) wait_for_completion(&scmi_info->tx_complete); scmi_rx_callback(scmi_info->cinfo, shmem_read_header(scmi_info->shmem)); mutex_unlock(&scmi_info->shmem_lock); /* Only SMCCC_RET_NOT_SUPPORTED is valid error code */ if (res.a0) return -EOPNOTSUPP; return 0; } #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ I also check the code where Unhandled SMC/HVC print in xen, and found the log cause by unhandled SMCCC call in function vsmccc_handle_call(). Could it be xen unhandle SMCCC call cause SCMI driver probe failed ?Yes. The domain would need to talk to the host SCMI. This is not yet supported because Xen doesn't provide a mediator (this is necessary to ensure the safety of the call).If you are *only* looking to use the Mali driver in dom0. So you could add some code in Xen to forward simply forward the request to the host and check if it helps you.How can I pass the requset to the host? I'm not familiar with xen code, is there anyreference code in xen? There are a couple of solution:1) You request the hypervisor to avoid trapping SVC. This would also need some changes in Linux to force the Mali driver to use SVC rather than HVC. There is a patch on xen-devel, to avoid trapping (see [1]). 2) Add an allow list of the SMCCC operations. There are some examples how to "emulate" SMC call in Xen (see vsmccc_handle_call()). Cheers,[1] https://lore.kernel.org/xen-devel/alpine.DEB.2.21.2106241749310.24906@sstabellini-ThinkPad-T480s/ Best regards Cailigang -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |