1e999111aSAlan Cox /*- 2*af3dc4a7SPedro F. Giffuni * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3*af3dc4a7SPedro F. Giffuni * 4e999111aSAlan Cox * Copyright (c) 2009 Alan L. Cox <alc@cs.rice.edu> 5e999111aSAlan Cox * All rights reserved. 6e999111aSAlan Cox * 7e999111aSAlan Cox * Redistribution and use in source and binary forms, with or without 8e999111aSAlan Cox * modification, are permitted provided that the following conditions 9e999111aSAlan Cox * are met: 10e999111aSAlan Cox * 1. Redistributions of source code must retain the above copyright 11e999111aSAlan Cox * notice, this list of conditions and the following disclaimer. 12e999111aSAlan Cox * 2. Redistributions in binary form must reproduce the above copyright 13e999111aSAlan Cox * notice, this list of conditions and the following disclaimer in the 14e999111aSAlan Cox * documentation and/or other materials provided with the distribution. 15e999111aSAlan Cox * 16e999111aSAlan Cox * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17e999111aSAlan Cox * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18e999111aSAlan Cox * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19e999111aSAlan Cox * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20e999111aSAlan Cox * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21e999111aSAlan Cox * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22e999111aSAlan Cox * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23e999111aSAlan Cox * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24e999111aSAlan Cox * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25e999111aSAlan Cox * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26e999111aSAlan Cox * SUCH DAMAGE. 27e999111aSAlan Cox * 28e999111aSAlan Cox * $FreeBSD$ 29e999111aSAlan Cox */ 30e999111aSAlan Cox 31e999111aSAlan Cox #ifndef _MACHINE_VM_H_ 32e999111aSAlan Cox #define _MACHINE_VM_H_ 33e999111aSAlan Cox 3441a7c569SMichal Meloun #if __ARM_ARCH >= 6 3582f313b3SSvatopluk Kraus #define VM_MEMATTR_WB_WA ((vm_memattr_t)0) 3682f313b3SSvatopluk Kraus #define VM_MEMATTR_NOCACHE ((vm_memattr_t)1) 3782f313b3SSvatopluk Kraus #define VM_MEMATTR_DEVICE ((vm_memattr_t)2) 3882f313b3SSvatopluk Kraus #define VM_MEMATTR_SO ((vm_memattr_t)3) 3982f313b3SSvatopluk Kraus #define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)4) 4084233ddbSIan Lepore 4184233ddbSIan Lepore #define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA 42e53ea2abSMichal Meloun #define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */ 4341a7c569SMichal Meloun #ifdef _KERNEL 4441a7c569SMichal Meloun /* Don't export aliased VM_MEMATTR to userland */ 4583242da4SMichal Meloun #define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH /* for DRM */ 46e53ea2abSMichal Meloun #define VM_MEMATTR_WRITE_BACK VM_MEMATTR_WB_WA /* for DRM */ 4741a7c569SMichal Meloun #endif 4884233ddbSIan Lepore #else 4965d79ed7SOlivier Houchard /* Memory attribute configuration. */ 503153e878SAlan Cox #define VM_MEMATTR_DEFAULT 0 5165d79ed7SOlivier Houchard #define VM_MEMATTR_UNCACHEABLE 1 5284233ddbSIan Lepore #endif 53e999111aSAlan Cox 545797795fSAlan Cox #endif /* !_MACHINE_VM_H_ */ 55