1 /* $NetBSD: types.h,v 1.7 2021/04/01 04:35:46 simonb Exp $ */ 2 3 /*- 4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Matt Thomas of 3am Software Foundry. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #ifndef _OR1K_TYPES_H_ 33 #define _OR1K_TYPES_H_ 34 35 #include <sys/cdefs.h> 36 #include <sys/featuretest.h> 37 #include <or1k/int_types.h> 38 39 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) 40 typedef unsigned long vm_offset_t; /* deprecated */ 41 typedef unsigned long vm_size_t; /* deprecated */ 42 43 typedef __UINTPTR_TYPE__ paddr_t; 44 typedef __UINTPTR_TYPE__ psize_t; 45 typedef __UINTPTR_TYPE__ vaddr_t; 46 typedef __UINTPTR_TYPE__ vsize_t; 47 #define PRIxPADDR PRIxPTR 48 #define PRIxPSIZE PRIxPTR 49 #define PRIuPSIZE PRIuPTR 50 #define PRIxVADDR PRIxPTR 51 #define PRIxVSIZE PRIxPTR 52 #define PRIuVSIZE PRIuPTR 53 54 typedef unsigned long int register_t; 55 56 typedef unsigned short tlb_asid_t; 57 #endif 58 59 #if defined(_KERNEL) 60 typedef struct label_t { /* Used by setjmp & longjmp */ 61 register_t lb_reg[32]; /* */ 62 } label_t; 63 #endif 64 65 typedef unsigned int __cpu_simple_lock_nv_t; 66 typedef unsigned long int __register_t; 67 68 #define __SIMPLELOCK_LOCKED 1 69 #define __SIMPLELOCK_UNLOCKED 0 70 71 #define __HAVE_FAST_SOFTINTS 72 #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS 73 #define __HAVE_CPU_COUNTER 74 #define __HAVE_SYSCALL_INTERN 75 #define __HAVE_NEW_STYLE_BUS_H 76 #define __HAVE_MINIMAL_EMUL 77 #define __HAVE_CPU_DATA_FIRST 78 #define __HAVE___LWP_GETPRIVATE_FAST 79 #define __HAVE_COMMON___TLS_GET_ADDR 80 #define __HAVE_TLS_VARIANT_I 81 #define __HAVE_BUS_SPACE_8 82 83 #if defined(_KERNEL) 84 #define __HAVE_RAS 85 #endif 86 87 #endif /* _OR1K_TYPES_H_ */ 88