Re: Remoteproc v3.10 arm-microblaze
From: Michal Simek
Date: Wed Jul 17 2013 - 08:16:48 EST
Hi,
On 07/17/2013 01:37 PM, Michal Simek wrote:
> Hi Ohad,
>
> I am working on another remoteproc driver.
> Currently less problematic than arm-arm.
> It is arm to microblaze on zynq.
>
> I have two problems:
> 1. I need to allocate carveout first because my firmware must be added to that
> space first. (I don't have any other mapping mechanism ready for use)
> I have simple solution I am calling rproc_handle_resources in rproc_fw_config_virtio()
> just for carveouts before rproc_count_vrings_handler and rproc_vdev_handler are called
> which ensure that carveout is allocated first.
>
> 2. I am getting problem with rproc_handle_vdev().
> Here is the flow which I see:
> request_firmware_nowait() calls
> rproc_fw_config_virtio() calls
> rproc_handle_vdev() calls
> rproc_add_virtio_dev() calls
> register_virtio_device() calls dev->config->reset() without setup pointer rproc->table_ptr().
>
> But rproc->table_ptr is setup in rproc_fw_boot()
> which is called from rproc_boot() much later.
>
> Which is causing that all rproc_virtio_config_ops operations
> are using incorrect table_ptr().
> Problematic for me are rproc_virtio_get_status, rproc_virtio_set_status
> and especially rproc_virtio_reset();
>
> And with BUG_ON I am getting problem virtio_dev_remove() where status should
> be zero - WARN_ON_ONCE(dev->config->get_status(dev));
>
> Below is log with some of my debug messages. (comments explain what's going on there)
Let me correct myself. It is caused by switching from loaded_table back to cached_table
in rproc_shutdown where old cached_table is probably used and there are probably be still old values.
What's the purpose of cached_table? Shouldn't be synchronized with loaded one in rproc shutdown?
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Attachment:
signature.asc
Description: OpenPGP digital signature