[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] quick pointer on adding a new chardev
From: |
Herb Peyerl |
Subject: |
Re: [Qemu-discuss] quick pointer on adding a new chardev |
Date: |
Tue, 21 Feb 2017 06:13:11 -0700 |
> On Feb 21, 2017, at 2:55 AM, Peter Maydell <address@hidden> wrote:
> You need to create a property for your device which will say
> "my property 'chardev' corresponds to s->chr in my struct".
> (You probably already have this code or the command line above
> wouldn't work I think.)
You’re right, I did have it but accesses to s->chr were SEGV’ing so I assumed I
needed to allocate it in some way; then I figured out how to bind ‘-chardev’ to
‘-global’ and didn’t understand that ‘-chardev’ already creates one…
> Then in your 'realize' function, if s->chr is NULL then the
> user didn't specify the chardev on the command line. Otherwise
> it should be a properly initialized chardev you can use
> (add your receive handlers to, call functions to send on, etc).
Yes, thank you. Now my receive handlers are being called and all is well.
It all actually makes sense now and I can proceed with the rest of my
emulation.
The Xilinx fork is intending to update to 2.8 in the coming weeks so I’ll
probably have to rototill portions of this anyway...
Thanks for straightening me out and for your help.
- [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/20
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/21
- Re: [Qemu-discuss] quick pointer on adding a new chardev,
Herb Peyerl <=