Deleted Added
full compact
virtio_mmio_if.m (274655) virtio_mmio_if.m (275647)
1#-
2# Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com>
3# All rights reserved.
4#
5# This software was developed by SRI International and the University of
6# Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
7# ("CTSRD"), as part of the DARPA CRASH research programme.
8#

--- 13 unchanged lines hidden (view full) ---

22# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28# SUCH DAMAGE.
29#
1#-
2# Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com>
3# All rights reserved.
4#
5# This software was developed by SRI International and the University of
6# Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
7# ("CTSRD"), as part of the DARPA CRASH research programme.
8#

--- 13 unchanged lines hidden (view full) ---

22# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28# SUCH DAMAGE.
29#
30# $FreeBSD: head/sys/dev/virtio/mmio/virtio_mmio_if.m 274655 2014-11-18 14:11:14Z br $
30# $FreeBSD: head/sys/dev/virtio/mmio/virtio_mmio_if.m 275647 2014-12-09 16:39:21Z br $
31#
32
33#include <sys/types.h>
34
35#
36# This is optional interface to virtio mmio backend.
37# Useful when backend is implemented not by the hardware but software, e.g.
38# by using another cpu core.
39#
40
41INTERFACE virtio_mmio;
42
43CODE {
44 static int
31#
32
33#include <sys/types.h>
34
35#
36# This is optional interface to virtio mmio backend.
37# Useful when backend is implemented not by the hardware but software, e.g.
38# by using another cpu core.
39#
40
41INTERFACE virtio_mmio;
42
43CODE {
44 static int
45 virtio_mmio_write(device_t dev, size_t offset)
45 virtio_mmio_note(device_t dev, size_t offset, int val)
46 {
47
48 return (1);
49 }
50
51 static int
52 virtio_mmio_setup_intr(device_t dev, device_t mmio_dev,
53 void *handler, void *ih_user)

--- 4 unchanged lines hidden (view full) ---

58};
59
60#
61# Inform backend we have data wrotten to offset.
62#
63METHOD int note {
64 device_t dev;
65 size_t offset;
46 {
47
48 return (1);
49 }
50
51 static int
52 virtio_mmio_setup_intr(device_t dev, device_t mmio_dev,
53 void *handler, void *ih_user)

--- 4 unchanged lines hidden (view full) ---

58};
59
60#
61# Inform backend we have data wrotten to offset.
62#
63METHOD int note {
64 device_t dev;
65 size_t offset;
66} DEFAULT virtio_mmio_write;
66 int val;
67} DEFAULT virtio_mmio_note;
67
68#
69# Setup backend-specific interrupts.
70#
71METHOD int setup_intr {
72 device_t dev;
73 device_t mmio_dev;
74 void *handler;
75 void *ih_user;
76} DEFAULT virtio_mmio_setup_intr;
68
69#
70# Setup backend-specific interrupts.
71#
72METHOD int setup_intr {
73 device_t dev;
74 device_t mmio_dev;
75 void *handler;
76 void *ih_user;
77} DEFAULT virtio_mmio_setup_intr;