1221828Sgrehan/*- 2221828Sgrehan * Copyright (c) 2011 NetApp, Inc. 3221828Sgrehan * All rights reserved. 4221828Sgrehan * 5221828Sgrehan * Redistribution and use in source and binary forms, with or without 6221828Sgrehan * modification, are permitted provided that the following conditions 7221828Sgrehan * are met: 8221828Sgrehan * 1. Redistributions of source code must retain the above copyright 9221828Sgrehan * notice, this list of conditions and the following disclaimer. 10221828Sgrehan * 2. Redistributions in binary form must reproduce the above copyright 11221828Sgrehan * notice, this list of conditions and the following disclaimer in the 12221828Sgrehan * documentation and/or other materials provided with the distribution. 13221828Sgrehan * 14221828Sgrehan * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND 15221828Sgrehan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16221828Sgrehan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17221828Sgrehan * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE 18221828Sgrehan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19221828Sgrehan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20221828Sgrehan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21221828Sgrehan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22221828Sgrehan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23221828Sgrehan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24221828Sgrehan * SUCH DAMAGE. 25221828Sgrehan * 26221828Sgrehan * $FreeBSD: releng/10.2/sys/amd64/vmm/amd/amdv.c 284900 2015-06-28 03:22:26Z neel $ 27221828Sgrehan */ 28221828Sgrehan 29221828Sgrehan#include <sys/cdefs.h> 30221828Sgrehan__FBSDID("$FreeBSD: releng/10.2/sys/amd64/vmm/amd/amdv.c 284900 2015-06-28 03:22:26Z neel $"); 31221828Sgrehan 32221828Sgrehan#include <sys/param.h> 33221828Sgrehan#include <sys/systm.h> 34221828Sgrehan#include <sys/errno.h> 35221828Sgrehan 36221828Sgrehan#include <machine/vmm.h> 37221828Sgrehan#include "io/iommu.h" 38221828Sgrehan 39221828Sgrehanstatic int 40221828Sgrehanamd_iommu_init(void) 41221828Sgrehan{ 42221828Sgrehan 43221828Sgrehan printf("amd_iommu_init: not implemented\n"); 44221828Sgrehan return (ENXIO); 45221828Sgrehan} 46221828Sgrehan 47221828Sgrehanstatic void 48221828Sgrehanamd_iommu_cleanup(void) 49221828Sgrehan{ 50221828Sgrehan 51221828Sgrehan printf("amd_iommu_cleanup: not implemented\n"); 52221828Sgrehan} 53221828Sgrehan 54221828Sgrehanstatic void 55221828Sgrehanamd_iommu_enable(void) 56221828Sgrehan{ 57221828Sgrehan 58221828Sgrehan printf("amd_iommu_enable: not implemented\n"); 59221828Sgrehan} 60221828Sgrehan 61221828Sgrehanstatic void 62221828Sgrehanamd_iommu_disable(void) 63221828Sgrehan{ 64221828Sgrehan 65221828Sgrehan printf("amd_iommu_disable: not implemented\n"); 66221828Sgrehan} 67221828Sgrehan 68221828Sgrehanstatic void * 69221828Sgrehanamd_iommu_create_domain(vm_paddr_t maxaddr) 70221828Sgrehan{ 71221828Sgrehan 72221828Sgrehan printf("amd_iommu_create_domain: not implemented\n"); 73221828Sgrehan return (NULL); 74221828Sgrehan} 75221828Sgrehan 76221828Sgrehanstatic void 77221828Sgrehanamd_iommu_destroy_domain(void *domain) 78221828Sgrehan{ 79221828Sgrehan 80221828Sgrehan printf("amd_iommu_destroy_domain: not implemented\n"); 81221828Sgrehan} 82221828Sgrehan 83221828Sgrehanstatic uint64_t 84221828Sgrehanamd_iommu_create_mapping(void *domain, vm_paddr_t gpa, vm_paddr_t hpa, 85221828Sgrehan uint64_t len) 86221828Sgrehan{ 87221828Sgrehan 88221828Sgrehan printf("amd_iommu_create_mapping: not implemented\n"); 89221828Sgrehan return (0); 90221828Sgrehan} 91221828Sgrehan 92241362Sneelstatic uint64_t 93241362Sneelamd_iommu_remove_mapping(void *domain, vm_paddr_t gpa, uint64_t len) 94241362Sneel{ 95241362Sneel 96241362Sneel printf("amd_iommu_remove_mapping: not implemented\n"); 97241362Sneel return (0); 98241362Sneel} 99241362Sneel 100221828Sgrehanstatic void 101279470Srstoneamd_iommu_add_device(void *domain, uint16_t rid) 102221828Sgrehan{ 103221828Sgrehan 104221828Sgrehan printf("amd_iommu_add_device: not implemented\n"); 105221828Sgrehan} 106221828Sgrehan 107221828Sgrehanstatic void 108279470Srstoneamd_iommu_remove_device(void *domain, uint16_t rid) 109221828Sgrehan{ 110221828Sgrehan 111221828Sgrehan printf("amd_iommu_remove_device: not implemented\n"); 112221828Sgrehan} 113221828Sgrehan 114241362Sneelstatic void 115241362Sneelamd_iommu_invalidate_tlb(void *domain) 116241362Sneel{ 117241362Sneel 118241362Sneel printf("amd_iommu_invalidate_tlb: not implemented\n"); 119241362Sneel} 120241362Sneel 121221828Sgrehanstruct iommu_ops iommu_ops_amd = { 122221828Sgrehan amd_iommu_init, 123221828Sgrehan amd_iommu_cleanup, 124221828Sgrehan amd_iommu_enable, 125221828Sgrehan amd_iommu_disable, 126221828Sgrehan amd_iommu_create_domain, 127221828Sgrehan amd_iommu_destroy_domain, 128221828Sgrehan amd_iommu_create_mapping, 129241362Sneel amd_iommu_remove_mapping, 130221828Sgrehan amd_iommu_add_device, 131221828Sgrehan amd_iommu_remove_device, 132241362Sneel amd_iommu_invalidate_tlb, 133221828Sgrehan}; 134