virtio_mmio.h revision 274655
1274655Sbr/*- 2274655Sbr * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3274655Sbr * All rights reserved. 4274655Sbr * 5274655Sbr * This software was developed by SRI International and the University of 6274655Sbr * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7274655Sbr * ("CTSRD"), as part of the DARPA CRASH research programme. 8274655Sbr * 9274655Sbr * Redistribution and use in source and binary forms, with or without 10274655Sbr * modification, are permitted provided that the following conditions 11274655Sbr * are met: 12274655Sbr * 1. Redistributions of source code must retain the above copyright 13274655Sbr * notice, this list of conditions and the following disclaimer. 14274655Sbr * 2. Redistributions in binary form must reproduce the above copyright 15274655Sbr * notice, this list of conditions and the following disclaimer in the 16274655Sbr * documentation and/or other materials provided with the distribution. 17274655Sbr * 18274655Sbr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19274655Sbr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20274655Sbr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21274655Sbr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22274655Sbr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23274655Sbr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24274655Sbr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25274655Sbr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26274655Sbr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27274655Sbr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28274655Sbr * SUCH DAMAGE. 29274655Sbr * 30274655Sbr * $FreeBSD: head/sys/dev/virtio/mmio/virtio_mmio.h 274655 2014-11-18 14:11:14Z br $ 31274655Sbr */ 32274655Sbr 33274655Sbr#ifndef _VIRTIO_MMIO_H 34274655Sbr#define _VIRTIO_MMIO_H 35274655Sbr 36274655Sbr#define VIRTIO_MMIO_MAGIC_VALUE 0x000 37274655Sbr#define VIRTIO_MMIO_VERSION 0x004 38274655Sbr#define VIRTIO_MMIO_DEVICE_ID 0x008 39274655Sbr 40274655Sbr#define VIRTIO_MMIO_MAGIC_VALUE 0x000 41274655Sbr#define VIRTIO_MMIO_VERSION 0x004 42274655Sbr#define VIRTIO_MMIO_DEVICE_ID 0x008 43274655Sbr#define VIRTIO_MMIO_VENDOR_ID 0x00c 44274655Sbr#define VIRTIO_MMIO_HOST_FEATURES 0x010 45274655Sbr#define VIRTIO_MMIO_HOST_FEATURES_SEL 0x014 46274655Sbr#define VIRTIO_MMIO_GUEST_FEATURES 0x020 47274655Sbr#define VIRTIO_MMIO_GUEST_FEATURES_SEL 0x024 48274655Sbr#define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028 49274655Sbr#define VIRTIO_MMIO_QUEUE_SEL 0x030 50274655Sbr#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034 51274655Sbr#define VIRTIO_MMIO_QUEUE_NUM 0x038 52274655Sbr#define VIRTIO_MMIO_QUEUE_ALIGN 0x03c 53274655Sbr#define VIRTIO_MMIO_QUEUE_PFN 0x040 54274655Sbr#define VIRTIO_MMIO_QUEUE_NOTIFY 0x050 55274655Sbr#define VIRTIO_MMIO_INTERRUPT_STATUS 0x060 56274655Sbr#define VIRTIO_MMIO_INTERRUPT_ACK 0x064 57274655Sbr#define VIRTIO_MMIO_STATUS 0x070 58274655Sbr#define VIRTIO_MMIO_CONFIG 0x100 59274655Sbr#define VIRTIO_MMIO_INT_VRING (1 << 0) 60274655Sbr#define VIRTIO_MMIO_INT_CONFIG (1 << 1) 61274655Sbr#define VIRTIO_MMIO_VRING_ALIGN 4096 62274655Sbr 63274655Sbr#endif /* _VIRTIO_MMIO_H */ 64