QEMU data passing between modules
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
[no private messages please]
Quoted 7 lines · boddu pavan
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
Yes its hardware block, and yes they are of same SOC. status is 16bit.
On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini <[email protected]> wrote:
[no private messages please]
Quoted 7 lines · boddu pavan
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
Quoted 1 line · boddu pavan
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
Quoted 26 lines
On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini <[email protected]> wrote:
[no private messages please]
Quoted 8 lines · boddu pavan
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
yup, thanks Paolo.
But i have another basic question. I hope we have some docs on this. QOM model.I always really confuse with this series obj->DeviceState->SysBusDevice->hw_perip state. I simple assume that all the hw_emulations will be connected to SysBus(mostly). The device state is different for each one. and an object. Does all the hw_peripherals has any root node kind of thing. Which makes all our nodes connected ?
On Tuesday, February 10, 2015 7:15 PM, Paolo Bonzini <[email protected]> wrote:
Quoted 1 line · boddu pavan
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
Quoted 26 lines
On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini <[email protected]> wrote:
[no private messages please]
Quoted 8 lines · boddu pavan
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
Quoted 4 lines · boddu pavan
Does all the
hw_peripheralshas any root node kind of thing. Which makes all our nodes connected ?
The common superclass of the devices is DeviceState.
The root object that connects the devices is the QEMUMachine.
Paolo
Ok fine.
I always think there should be basic doc for QOM model for the QEMU beginners as this point. Or if we already have some in-mails explanations or any blogs can any one point out here. Thanks.Sai Pavan
On Tuesday, February 10, 2015 7:57 PM, Paolo Bonzini <[email protected]> wrote:
Quoted 4 lines · boddu pavan
Does all the
hw_peripheralshas any root node kind of thing. Which makes all our nodes connected ?
The common superclass of the devices is DeviceState.
The root object that connects the devices is the QEMUMachine.
Paolo
Ping again!
Are there any docs for QOM ?? or the historical parent of QOM , so that it is easy to relate. Thanks,Sai Pavan
On Tuesday, February 10, 2015 11:50 PM, boddu pavan <[email protected]> wrote:
Ok fine.
I always think there should be basic doc for QOM model for the QEMU beginners as this point. Or if we already have some in-mails explanations or any blogs can any one point out here. Thanks.Sai Pavan
On Tuesday, February 10, 2015 7:57 PM, Paolo Bonzini <[email protected]> wrote:
Quoted 4 lines · boddu pavan
Does all the
hw_peripheralshas any root node kind of thing. Which makes all our nodes connected ?
The common superclass of the devices is DeviceState.
The root object that connects the devices is the QEMUMachine.
Paolo