qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU data passing between modules


From: Paolo Bonzini
Subject: Re: [Qemu-devel] QEMU data passing between modules
Date: Tue, 10 Feb 2015 14:39:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


On 10/02/2015 14:34, boddu pavan wrote:
> Yes its hardware block, and yes they are of same SOC. status is 16bit.

For simplicity you can make them the same DeviceState.

In order of increasing accuracy:

- save the AES module's address in a global variable, and add a qemu_irq
raised by the AES module when the status changes.  When the irq is
raised, the register module uses the global variable to find the AES
module and fetch the status

- store the AES module's address using object_property_add_child, add a
qemu_irq raised by the AES module when the status changes.  The register
module uses object_resolve_path() to get a pointer to the AES module.
When the irq is raised, the register module uses the pointer to fetch
the status.

- add a link property in the register module that points to the AES
module (object_property_add_link), and a qemu_irq raised by the AES
module when the status changes.  Initialize the link property in the
creation function for the board.  When the irq is raised, the register
module uses the DeviceState* field corresponding to the link to find the
AES module and fetch the status

Paolo

> 
> On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini
> <address@hidden> wrote:
> 
> 
> [no private messages please]
> 
> On 10/02/2015 14:27, boddu pavan wrote:
>> Hi paolo,
>> I have a aes module and its status should also be updated in register of
>> another block, which is said to be public register. The one in which its
>> updating is a private register.
>> How to get the data passed and updated in another module. I see using a
>> dma for register update is heavy, is there any simple one.
> 
>>
> 
> How do you define a "module"?  Is it a hardware block that you're
> emulating (a DeviceState)?  Are the two modules part of the same SoC?
> How large is the status?
> 
> Paolo
> 
> 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]