sim: dv-core: add hw_detach_address method [PR sim/25211]
authorMike Frysinger <vapier@gentoo.org>
Thu, 10 Nov 2022 15:20:15 +0000 (22:20 +0700)
committerMike Frysinger <vapier@gentoo.org>
Tue, 20 Dec 2022 01:31:02 +0000 (20:31 -0500)
commit09d236daec8ff0b02516d3fa088fda3da8ba9cdc
treecdfdf88d926dc84f3af58c3c202ecd17937b6e72
parent309b9a1abf77d9c643206f512d3db3ed7a23b854
sim: dv-core: add hw_detach_address method [PR sim/25211]

The core device has an attach address method as the root of the tree
which calls out to the sim API.  But it doesn't have a corresponding
detach method which means we just crash if anything tries to detach
itself from the core.  In practice, the m68hc11 is the only model
that actually tries to detach itself on the fly, so no one noticed
earlier.

With this in place, we can delete the existing detach code from the
m68hc11 model since it defaults to "passthru" callback which will in
turn call the dv-core detach, and they have the same behavior -- call
the sim core API to detach from the address space.

Bug: https://sourceware.org/PR25211
sim/common/dv-core.c
sim/m68hc11/dv-m68hc11.c