intel_dmar.h (264008) | intel_dmar.h (277023) |
---|---|
1/*- 2 * Copyright (c) 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Konstantin Belousov <kib@FreeBSD.org> 6 * under sponsorship from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Konstantin Belousov <kib@FreeBSD.org> 6 * under sponsorship from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/x86/iommu/intel_dmar.h 264008 2014-04-01 15:48:46Z rstone $ | 29 * $FreeBSD: head/sys/x86/iommu/intel_dmar.h 277023 2015-01-11 20:27:15Z kib $ |
30 */ 31 32#ifndef __X86_IOMMU_INTEL_DMAR_H 33#define __X86_IOMMU_INTEL_DMAR_H 34 35/* Host or physical memory address, after translation. */ 36typedef uint64_t dmar_haddr_t; 37/* Guest or bus address, before translation. */ --- 185 unchanged lines hidden (view full) --- 223dmar_gaddr_t pglvl_page_size(int total_pglvl, int lvl); 224dmar_gaddr_t ctx_page_size(struct dmar_ctx *ctx, int lvl); 225int calc_am(struct dmar_unit *unit, dmar_gaddr_t base, dmar_gaddr_t size, 226 dmar_gaddr_t *isizep); 227struct vm_page *dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags); 228void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); 229void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, 230 struct sf_buf **sf); | 30 */ 31 32#ifndef __X86_IOMMU_INTEL_DMAR_H 33#define __X86_IOMMU_INTEL_DMAR_H 34 35/* Host or physical memory address, after translation. */ 36typedef uint64_t dmar_haddr_t; 37/* Guest or bus address, before translation. */ --- 185 unchanged lines hidden (view full) --- 223dmar_gaddr_t pglvl_page_size(int total_pglvl, int lvl); 224dmar_gaddr_t ctx_page_size(struct dmar_ctx *ctx, int lvl); 225int calc_am(struct dmar_unit *unit, dmar_gaddr_t base, dmar_gaddr_t size, 226 dmar_gaddr_t *isizep); 227struct vm_page *dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags); 228void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); 229void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, 230 struct sf_buf **sf); |
231void dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent); | 231void dmar_unmap_pgtbl(struct sf_buf *sf); |
232int dmar_load_root_entry_ptr(struct dmar_unit *unit); 233int dmar_inv_ctx_glob(struct dmar_unit *unit); 234int dmar_inv_iotlb_glob(struct dmar_unit *unit); 235int dmar_flush_write_bufs(struct dmar_unit *unit); | 232int dmar_load_root_entry_ptr(struct dmar_unit *unit); 233int dmar_inv_ctx_glob(struct dmar_unit *unit); 234int dmar_inv_iotlb_glob(struct dmar_unit *unit); 235int dmar_flush_write_bufs(struct dmar_unit *unit); |
236void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst); 237void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst); 238void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); |
|
236int dmar_enable_translation(struct dmar_unit *unit); 237int dmar_disable_translation(struct dmar_unit *unit); 238bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); 239void dmar_barrier_exit(struct dmar_unit *dmar, u_int barrier_id); 240 241int dmar_fault_intr(void *arg); 242void dmar_enable_fault_intr(struct dmar_unit *unit); 243void dmar_disable_fault_intr(struct dmar_unit *unit); --- 189 unchanged lines hidden --- | 239int dmar_enable_translation(struct dmar_unit *unit); 240int dmar_disable_translation(struct dmar_unit *unit); 241bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); 242void dmar_barrier_exit(struct dmar_unit *dmar, u_int barrier_id); 243 244int dmar_fault_intr(void *arg); 245void dmar_enable_fault_intr(struct dmar_unit *unit); 246void dmar_disable_fault_intr(struct dmar_unit *unit); --- 189 unchanged lines hidden --- |