* $FreeBSD$
*/
-#ifndef _ARM64_INCLUDE__ALIGN_H_
-#define _ARM64_INCLUDE__ALIGN_H_
+#ifndef _MACHINE__ALIGN_H_
+#define _MACHINE__ALIGN_H_
/*
* Round p (pointer or byte index) up to a correctly-aligned value
#define _ALIGNBYTES (sizeof(long long) - 1)
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
-#endif /* !_ARM64_INCLUDE__ALIGN_H_ */
+#endif /* !_MACHINE__ALIGN_H_ */
* $FreeBSD$
*/
-#ifndef ARM64_INCLUDE__BUS_H
-#define ARM64_INCLUDE__BUS_H
+#ifndef _MACHINE__BUS_H_
+#define _MACHINE__BUS_H_
/*
* Addresses (in bus space).
typedef u_long bus_space_handle_t;
typedef struct bus_space *bus_space_tag_t;
-#endif /* ARM64_INCLUDE__BUS_H */
+#endif /* !_MACHINE__BUS_H_ */
* $FreeBSD$
*/
-#ifndef _MACHINE_INTTYPES_H_
-#define _MACHINE_INTTYPES_H_
+#ifndef _MACHINE__INTTYPES_H_
+#define _MACHINE__INTTYPES_H_
/*
* Macros for format specifiers.
#define SCNxMAX "jx" /* uintmax_t */
#define SCNxPTR "lx" /* uintptr_t */
-#endif /* !_MACHINE_INTTYPES_H_ */
+#endif /* !_MACHINE__INTTYPES_H_ */
#endif /* __GNUCLIKE_BUILTIN_VARARGS */
#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \
&& !defined(__NO_GNUC_VA_LIST)
-#define __GNUC_VA_LIST
+#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#define TCR_TxSZ(x) (((x) << TCR_T1SZ_SHIFT) | ((x) << TCR_T0SZ_SHIFT))
/* Saved Program Status Register */
-#define DBG_SPSR_SS (0x1 << 21)
+#define DBG_SPSR_SS (0x1 << 21)
/* Monitor Debug System Control Register */
-#define DBG_MDSCR_SS (0x1 << 0)
-#define DBG_MDSCR_KDE (0x1 << 13)
-#define DBG_MDSCR_MDE (0x1 << 15)
+#define DBG_MDSCR_SS (0x1 << 0)
+#define DBG_MDSCR_KDE (0x1 << 13)
+#define DBG_MDSCR_MDE (0x1 << 15)
-#endif
+#endif /* !_MACHINE_ARMREG_H_ */
#undef __FBSDID
#if !defined(lint) && !defined(STRIP_FBSDID)
-#define __FBSDID(s) .ident s
+#define __FBSDID(s) .ident s
#else
-#define __FBSDID(s) /* nothing */
+#define __FBSDID(s) /* nothing */
#endif
#define _C_LABEL(x) x
.text; .globl sym; .align 2; sym:
#define EENTRY(sym) \
.globl sym; sym:
-#define END(sym) .size sym, . - sym
+#define END(sym) .size sym, . - sym
#define EEND(sym)
#define WEAK_REFERENCE(sym, alias) \
#ifndef _MACHINE_ATOMIC_H_
#define _MACHINE_ATOMIC_H_
-#define isb() __asm __volatile("isb" : : : "memory")
-#define dsb() __asm __volatile("dsb sy" : : : "memory")
-#define dmb() __asm __volatile("dmb sy" : : : "memory")
+#define isb() __asm __volatile("isb" : : : "memory")
+#define dsb() __asm __volatile("dsb sy" : : : "memory")
+#define dmb() __asm __volatile("dmb sy" : : : "memory")
-#define mb() dmb()
-#define wmb() dmb()
-#define rmb() dmb()
+#define mb() dmb()
+#define wmb() dmb()
+#define rmb() dmb()
static __inline void
atomic_add_32(volatile uint32_t *p, uint32_t val)
*/
#ifndef _MACHINE_BUS_H_
-#define _MACHINE_BUS_H_
+#define _MACHINE_BUS_H_
#include <machine/_bus.h>
-#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
-#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFFUL
-#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFFUL
-#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFFUL
-#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFFUL
+#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFFUL
+#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFFUL
+#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFFUL
+#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFFUL
-#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFUL
-#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFFUL
+#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFUL
+#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFFUL
#define BUS_SPACE_MAP_CACHEABLE 0x01
#define BUS_SPACE_MAP_LINEAR 0x02
#define bus_space_read_4(t, h, o) __bs_rs(4,(t),(h),(o))
#define bus_space_read_8(t, h, o) __bs_rs(8,(t),(h),(o))
-#define bus_space_read_stream_1(t, h, o) __bs_rs_s(1,(t), (h), (o))
-#define bus_space_read_stream_2(t, h, o) __bs_rs_s(2,(t), (h), (o))
-#define bus_space_read_stream_4(t, h, o) __bs_rs_s(4,(t), (h), (o))
+#define bus_space_read_stream_1(t, h, o) __bs_rs_s(1,(t), (h), (o))
+#define bus_space_read_stream_2(t, h, o) __bs_rs_s(2,(t), (h), (o))
+#define bus_space_read_stream_4(t, h, o) __bs_rs_s(4,(t), (h), (o))
#define bus_space_read_stream_8(t, h, o) __bs_rs_s(8,8,(t),(h),(o))
/*
#include <machine/bus_dma.h>
-#if 0
-/*
- * Get the physical address of a bus space memory-mapped resource.
- * Doing this as a macro is a temporary solution until a more robust fix is
- * designed. It also serves to mark the locations needing that fix.
- */
-#define BUS_SPACE_PHYSADDR(res, offs) \
- ((u_int)(rman_get_start(res)+(offs)))
-#endif
-
#endif /* _MACHINE_BUS_H_ */
/* $FreeBSD$ */
-#ifndef _ARM64_BUS_DMA_H_
-#define _ARM64_BUS_DMA_H_
+#ifndef _MACHINE_BUS_DMA_H_
+#define _MACHINE_BUS_DMA_H_
#include <sys/bus_dma.h>
-#endif /* _ARM64_BUS_DMA_H_ */
+#endif /* !_MACHINE_BUS_DMA_H_ */
* $FreeBSD$
*/
-#ifndef __ARM64_BUS_DMA_IMPL_H
-#define __ARM64_BUS_DMA_IMPL_H
+#ifndef _MACHINE_BUS_DMA_IMPL_H_
+#define _MACHINE_BUS_DMA_IMPL_H_
struct bus_dma_tag_common {
struct bus_dma_impl *impl;
extern struct bus_dma_impl bus_dma_bounce_impl;
-#endif
+#endif /* !_MACHINE_BUS_DMA_IMPL_H_ */
* $FreeBSD$
*/
-#ifndef __MACHINE_COUNTER_H__
-#define __MACHINE_COUNTER_H__
+#ifndef _MACHINE_COUNTER_H_
+#define _MACHINE_COUNTER_H_
#include <sys/pcpu.h>
#ifdef INVARIANTS
counter_exit();
}
-#endif /* ! __MACHINE_COUNTER_H__ */
+#endif /* ! _MACHINE_COUNTER_H_ */
* $FreeBSD$
*/
-#ifndef MACHINE_CPU_H
-#define MACHINE_CPU_H
+#ifndef _MACHINE_CPU_H_
+#define _MACHINE_CPU_H_
#include <machine/atomic.h>
#include <machine/frame.h>
#endif
-#endif /* !MACHINE_CPU_H */
+#endif /* !_MACHINE_CPU_H_ */
#include <machine/frame.h>
#include <machine/trap.h>
-#define T_BREAKPOINT (EXCP_BRK)
-#define T_WATCHPOINT (EXCP_WATCHPT_EL1)
+#define T_BREAKPOINT (EXCP_BRK)
+#define T_WATCHPOINT (EXCP_WATCHPT_EL1)
typedef vm_offset_t db_addr_t;
typedef long db_expr_t;
kdb_frame->tf_elr += BKPT_SIZE; \
} while (0)
-#define db_clear_single_step kdb_cpu_clear_singlestep
-#define db_set_single_step kdb_cpu_set_singlestep
+#define db_clear_single_step kdb_cpu_clear_singlestep
+#define db_set_single_step kdb_cpu_set_singlestep
#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT)
#define IS_WATCHPOINT_TRAP(type, code) (type == T_WATCHPOINT)
#define inst_call(ins) (((ins) & 0xfc000000u) == 0x94000000u || /* BL */ \
((ins) & 0xfffffc1fu) == 0xd63f0000u) /* BLR */
-#define inst_load(ins) ({ \
+#define inst_load(ins) ({ \
uint32_t tmp_instr = db_get_value(PC_REGS(), sizeof(uint32_t), FALSE); \
is_load_instr(tmp_instr); \
})
-#define inst_store(ins) ({ \
+#define inst_store(ins) ({ \
uint32_t tmp_instr = db_get_value(PC_REGS(), sizeof(uint32_t), FALSE); \
is_store_instr(tmp_instr); \
})
(((ins) & 0x3bc00000u) == 0x28800000u) || /* pair (post-indexed) */ \
(((ins) & 0x3bc00000u) == 0x29800000u)) /* pair (pre-indexed) */
-#define next_instr_address(pc, bd) ((bd) ? (pc) : ((pc) + 4))
+#define next_instr_address(pc, bd) ((bd) ? (pc) : ((pc) + 4))
#define DB_SMALL_VALUE_MAX (0x7fffffff)
#define DB_SMALL_VALUE_MIN (-0x40001)
*/
#ifndef _MACHINE_DEBUG_MONITOR_H_
-#define _MACHINE_DEBUG_MONITOR_H_
+#define _MACHINE_DEBUG_MONITOR_H_
#ifdef KDB
*/
#ifndef _MACHINE_ELF_H_
-#define _MACHINE_ELF_H_ 1
+#define _MACHINE_ELF_H_
/*
* ELF definitions for the AArch64 architecture.
* $FreeBSD$
*/
-#ifndef _ENDIAN_H_
-#define _ENDIAN_H_
+#ifndef _MACHINE_ENDIAN_H_
+#define _MACHINE_ENDIAN_H_
#include <sys/_types.h>
* Definitions for byte order, according to byte significance from low
* address to high.
*/
-#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
-#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
-#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
+#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
+#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
+#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
#define _BYTE_ORDER _LITTLE_ENDIAN
#if __BSD_VISIBLE
-#define LITTLE_ENDIAN _LITTLE_ENDIAN
-#define BIG_ENDIAN _BIG_ENDIAN
-#define PDP_ENDIAN _PDP_ENDIAN
-#define BYTE_ORDER _BYTE_ORDER
+#define LITTLE_ENDIAN _LITTLE_ENDIAN
+#define BIG_ENDIAN _BIG_ENDIAN
+#define PDP_ENDIAN _PDP_ENDIAN
+#define BYTE_ORDER _BYTE_ORDER
#endif
-#define _QUAD_HIGHWORD 1
-#define _QUAD_LOWWORD 0
-#define __ntohl(x) (__bswap32(x))
-#define __ntohs(x) (__bswap16(x))
-#define __htonl(x) (__bswap32(x))
-#define __htons(x) (__bswap16(x))
+#define _QUAD_HIGHWORD 1
+#define _QUAD_LOWWORD 0
+#define __ntohl(x) (__bswap32(x))
+#define __ntohs(x) (__bswap16(x))
+#define __htonl(x) (__bswap32(x))
+#define __htons(x) (__bswap16(x))
static __inline __uint64_t
__bswap64(__uint64_t x)
#ifdef __OPTIMIZE__
-#define __bswap32_constant(x) \
+#define __bswap32_constant(x) \
((((x) & 0xff000000U) >> 24) | \
(((x) & 0x00ff0000U) >> 8) | \
(((x) & 0x0000ff00U) << 8) | \
(((x) & 0x000000ffU) << 24))
-#define __bswap16_constant(x) \
+#define __bswap16_constant(x) \
((((x) & 0xff00) >> 8) | \
(((x) & 0x00ff) << 8))
-#define __bswap16(x) \
+#define __bswap16(x) \
((__uint16_t)(__builtin_constant_p(x) ? \
__bswap16_constant(x) : \
__bswap16_var(x)))
-#define __bswap32(x) \
+#define __bswap32(x) \
((__uint32_t)(__builtin_constant_p(x) ? \
__bswap32_constant(x) : \
__bswap32_var(x)))
#else
-#define __bswap16(x) __bswap16_var(x)
-#define __bswap32(x) __bswap32_var(x)
+#define __bswap16(x) __bswap16_var(x)
+#define __bswap32(x) __bswap32_var(x)
#endif /* __OPTIMIZE__ */
-#endif /* !_ENDIAN_H_ */
+#endif /* !_MACHINE_ENDIAN_H_ */
-/*-
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_EXEC_H_
-#define _MACHINE_EXEC_H_
-
-#endif /* !_MACHINE_EXEC_H_ */
+/* $FreeBSD$ */
*/
#ifndef _MACHINE_FLOAT_H_
-#define _MACHINE_FLOAT_H_ 1
+#define _MACHINE_FLOAT_H_
#include <sys/cdefs.h>
extern int __flt_rounds(void);
__END_DECLS
-#define FLT_RADIX 2 /* b */
+#define FLT_RADIX 2 /* b */
#define FLT_ROUNDS __flt_rounds()
#if __ISO_C_VISIBLE >= 1999
#define FLT_EVAL_METHOD 0
#define DECIMAL_DIG 17 /* max precision in decimal digits */
#endif
-#define FLT_MANT_DIG 24 /* p */
-#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
-#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
-#define FLT_MIN_EXP (-125) /* emin */
-#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
-#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */
-#define FLT_MAX_EXP 128 /* emax */
-#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
-#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+#define FLT_MANT_DIG 24 /* p */
+#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
+#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
+#define FLT_MIN_EXP (-125) /* emin */
+#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
+#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */
+#define FLT_MAX_EXP 128 /* emax */
+#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
+#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
#if __ISO_C_VISIBLE >= 2011
#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */
#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */
#define FLT_HAS_SUBNORM 1
#endif /* __ISO_C_VISIBLE >= 2011 */
-#define DBL_MANT_DIG 53
-#define DBL_EPSILON 2.2204460492503131E-16
-#define DBL_DIG 15
-#define DBL_MIN_EXP (-1021)
-#define DBL_MIN 2.2250738585072014E-308
-#define DBL_MIN_10_EXP (-307)
-#define DBL_MAX_EXP 1024
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MAX_10_EXP 308
+#define DBL_MANT_DIG 53
+#define DBL_EPSILON 2.2204460492503131E-16
+#define DBL_DIG 15
+#define DBL_MIN_EXP (-1021)
+#define DBL_MIN 2.2250738585072014E-308
+#define DBL_MIN_10_EXP (-307)
+#define DBL_MAX_EXP 1024
+#define DBL_MAX 1.7976931348623157E+308
+#define DBL_MAX_10_EXP 308
#if __ISO_C_VISIBLE >= 2011
#define DBL_TRUE_MIN 4.9406564584124654E-324
#define DBL_DECIMAL_DIG 17
#define DBL_HAS_SUBNORM 1
#endif /* __ISO_C_VISIBLE >= 2011 */
-#define LDBL_MANT_DIG 113
-#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
-#define LDBL_DIG 33
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_EXP (+16384)
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
-#define LDBL_MAX_10_EXP (+4932)
+#define LDBL_MANT_DIG 113
+#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
+#define LDBL_DIG 33
+#define LDBL_MIN_EXP (-16381)
+#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
+#define LDBL_MIN_10_EXP (-4931)
+#define LDBL_MAX_EXP (+16384)
+#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
+#define LDBL_MAX_10_EXP (+4932)
#if __ISO_C_VISIBLE >= 2011
#define LDBL_TRUE_MIN 6.475175119438025110924438958227646552E-4966L
#define LDBL_DECIMAL_DIG 36
*/
#ifndef _MACHINE_IEEEFP_H_
-#define _MACHINE_IEEEFP_H_
+#define _MACHINE_IEEEFP_H_
/* Deprecated FPU control interface */
/* FP exception codes */
-#define FP_EXCEPT_INV 0
-#define FP_EXCEPT_DZ 1
-#define FP_EXCEPT_OFL 2
-#define FP_EXCEPT_UFL 3
-#define FP_EXCEPT_IMP 4
-#define FP_EXCEPT_DNML 7
+#define FP_EXCEPT_INV 0
+#define FP_EXCEPT_DZ 1
+#define FP_EXCEPT_OFL 2
+#define FP_EXCEPT_UFL 3
+#define FP_EXCEPT_IMP 4
+#define FP_EXCEPT_DNML 7
typedef int fp_except_t;
*/
#ifndef _MACHINE_INTR_H_
-#define _MACHINE_INTR_H_
+#define _MACHINE_INTR_H_
int arm_config_intr(u_int, enum intr_trigger, enum intr_polarity);
void arm_cpu_intr(struct trapframe *);
*/
#ifndef _MACHINE_KDB_H_
-#define _MACHINE_KDB_H_
+#define _MACHINE_KDB_H_
#include <machine/cpufunc.h>
*/
#ifndef _MACHINE_OFW_MACHDEP_H_
-#define _MACHINE_OFW_MACHDEP_H_
+#define _MACHINE_OFW_MACHDEP_H_
#include <vm/vm.h>
* $FreeBSD$
*/
-#ifndef _ARM64_INCLUDE_PARAM_H_
-#define _ARM64_INCLUDE_PARAM_H_
+#ifndef _MACHINE_PARAM_H_
+#define _MACHINE_PARAM_H_
/*
* Machine dependent constants for arm64.
#include <machine/_align.h>
-#define STACKALIGNBYTES (16 - 1)
-#define STACKALIGN(p) ((uint64_t)(p) & ~STACKALIGNBYTES)
+#define STACKALIGNBYTES (16 - 1)
+#define STACKALIGN(p) ((uint64_t)(p) & ~STACKALIGNBYTES)
#ifndef MACHINE
#define MACHINE "arm64"
#define MAXPAGESIZES 1 /* maximum number of supported page sizes */
#ifndef KSTACK_PAGES
-#define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */
+#define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */
#endif
-#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */
-#define PCPU_PAGES 1
+#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */
+#define PCPU_PAGES 1
/*
* Ceiling on size of buffer cache (really only effects write queueing,
* the kern.maxbcache /boot/loader.conf variable.
*/
#ifndef VM_BCACHE_SIZE_MAX
-#define VM_BCACHE_SIZE_MAX (400 * 1024 * 1024)
+#define VM_BCACHE_SIZE_MAX (400 * 1024 * 1024)
#endif
/*
#define NO_FUEWORD 1
#endif
-#endif /* !_ARM64_INCLUDE_PARAM_H_ */
+#endif /* !_MACHINE_PARAM_H_ */
return (td);
}
-#define curthread get_curthread()
+#define curthread get_curthread()
#define PCPU_GET(member) (get_pcpu()->pc_ ## member)
#define PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value))
#ifdef _KERNEL
-#define vtophys(va) pmap_kextract((vm_offset_t)(va))
+#define vtophys(va) pmap_kextract((vm_offset_t)(va))
#endif
#ifdef _KERNEL
extern struct pmap kernel_pmap_store;
-#define kernel_pmap (&kernel_pmap_store)
-#define pmap_kernel() kernel_pmap
+#define kernel_pmap (&kernel_pmap_store)
+#define pmap_kernel() kernel_pmap
#define PMAP_ASSERT_LOCKED(pmap) \
mtx_assert(&(pmap)->pm_mtx, MA_OWNED)
#ifndef _MACHINE_PROC_H_
#define _MACHINE_PROC_H_
-#include <machine/utrap.h>
-
-#if 0
-struct md_utrap {
- utrap_entry_t *ut_precise[UT_MAX]; /* must be first */
- int ut_refcnt;
-};
-#endif
-
struct mdthread {
int md_spinlock_count; /* (k) */
register_t md_saved_daif; /* (k) */
int dummy;
};
-#define KINFO_PROC_SIZE 1088
+#define KINFO_PROC_SIZE 1088
#ifdef _KERNEL
-#define MAXARGS 8
+#define MAXARGS 8
struct syscall_args {
u_int code;
struct sysent *callp;
-/* $NetBSD: pte.h,v 1.1 2001/11/23 17:39:04 thorpej Exp $ */
-
/*-
- * Copyright (c) 1994 Mark Brinicombe.
+ * Copyright (c) 2014 Andrew Turner
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
* All rights reserved.
*
+ * This software was developed by Andrew Turner under
+ * sponsorship from the FreeBSD Foundation.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the RiscBSD team.
- * 4. The name "RiscBSD" nor the name of the author may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY RISCBSD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL RISCBSD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
* $FreeBSD$
*/
#ifndef _MACHINE_PTE_H_
-#define _MACHINE_PTE_H_
+#define _MACHINE_PTE_H_
#ifndef LOCORE
typedef uint64_t pd_entry_t; /* page directory entry */
*/
#ifndef _MACHINE_SF_BUF_H_
-#define _MACHINE_SF_BUF_H_
+#define _MACHINE_SF_BUF_H_
/*
* On this machine, the only purpose for which sf_buf is used is to implement
* Architecture specific syscalls (arm64)
*/
#ifndef _MACHINE_SYSARCH_H_
-#define _MACHINE_SYSARCH_H_
+#define _MACHINE_SYSARCH_H_
#ifndef _KERNEL
#define _MACHINE_UCONTEXT_H_
struct gpregs {
- unsigned long long gp_sp;
+ unsigned long long gp_x[30];
unsigned long long gp_lr;
+ unsigned long long gp_sp;
unsigned long long gp_elr;
unsigned long long gp_spsr;
- unsigned long long gp_x[30];
};
struct fpregs {
__uint128_t fp_q[32];
- uint32_t fp_cr;
uint32_t fp_sr;
+ uint32_t fp_cr;
u_int fp_flags;
};
+++ /dev/null
-/*-
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_UTRAP_H_
-#define _MACHINE_UTRAP_H_
-
-#define UT_INSTRUCTION_EXCEPTION 1
-#define UT_INSTRUCTION_ERROR 2
-#define UT_INSTRUCTION_PROTECTION 3
-#define UT_ILLTRAP_INSTRUCTION 4
-#define UT_ILLEGAL_INSTRUCTION 5
-#define UT_PRIVILEGED_OPCODE 6
-#define UT_FP_DISABLED 7
-#define UT_FP_EXCEPTION_IEEE_754 8
-#define UT_FP_EXCEPTION_OTHER 9
-#define UT_TAG_OVERFLOW 10
-#define UT_DIVISION_BY_ZERO 11
-#define UT_DATA_EXCEPTION 12
-#define UT_DATA_ERROR 13
-#define UT_DATA_PROTECTION 14
-#define UT_MEM_ADDRESS_NOT_ALIGNED 15
-#define UT_PRIVILEGED_ACTION 16
-#define UT_ASYNC_DATA_ERROR 17
-#define UT_TRAP_INSTRUCTION_16 18
-#define UT_TRAP_INSTRUCTION_17 19
-#define UT_TRAP_INSTRUCTION_18 20
-#define UT_TRAP_INSTRUCTION_19 21
-#define UT_TRAP_INSTRUCTION_20 22
-#define UT_TRAP_INSTRUCTION_21 23
-#define UT_TRAP_INSTRUCTION_22 24
-#define UT_TRAP_INSTRUCTION_23 25
-#define UT_TRAP_INSTRUCTION_24 26
-#define UT_TRAP_INSTRUCTION_25 27
-#define UT_TRAP_INSTRUCTION_26 28
-#define UT_TRAP_INSTRUCTION_27 29
-#define UT_TRAP_INSTRUCTION_28 30
-#define UT_TRAP_INSTRUCTION_29 31
-#define UT_TRAP_INSTRUCTION_30 32
-#define UT_TRAP_INSTRUCTION_31 33
-#define UT_INSTRUCTION_MISS 34
-#define UT_DATA_MISS 35
-#define UT_MAX 36
-
-#define ST_SUNOS_SYSCALL 0
-#define ST_BREAKPOINT 1
-#define ST_DIVISION_BY_ZERO 2
-#define ST_FLUSH_WINDOWS 3 /* XXX implement! */
-#define ST_CLEAN_WINDOW 4
-#define ST_RANGE_CHECK 5
-#define ST_FIX_ALIGNMENT 6
-#define ST_INTEGER_OVERFLOW 7
-/* 8 is 32-bit ABI syscall (old solaris syscall?) */
-#define ST_BSD_SYSCALL 9
-#define ST_FP_RESTORE 10
-/* 11-15 are available */
-/* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */
-/* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */
-/* 16-31 are reserved for user applications (utraps) */
-#define ST_GETCC 32 /* XXX implement! */
-#define ST_SETCC 33 /* XXX implement! */
-#define ST_GETPSR 34 /* XXX implement! */
-#define ST_SETPSR 35 /* XXX implement! */
-/* 36-63 are available */
-#define ST_SOLARIS_SYSCALL 64
-#define ST_SYSCALL 65
-#define ST_SYSCALL32 66
-/* 67 is reserved to OS source licensee */
-/* 68 is return from deferred trap (not supported) */
-/* 69-95 are reserved to SPARC international */
-/* 96-108 are available */
-/* 109 is linux 64 bit syscall */
-/* 110 is linux 64 bit getcontext (?) */
-/* 111 is linux 64 bit setcontext (?) */
-/* 112-255 are available */
-
-#define UTH_NOCHANGE (-1)
-
-#ifndef __ASM__
-
-typedef int utrap_entry_t;
-typedef void *utrap_handler_t;
-
-#endif
-
-#endif
* $FreeBSD$
*/
-#ifndef _ARM64_VDSO_H
-#define _ARM64_VDSO_H
+#ifndef _MACHINE_VDSO_H_
+#define _MACHINE_VDSO_H_
#define VDSO_TIMEHANDS_MD \
uint32_t th_res[8];
-#endif
+#endif /* !_MACHINE_VDSO_H_ */
* $FreeBSD$
*/
-#ifndef _MACHINE__VFP_H_
-#define _MACHINE__VFP_H_
+#ifndef _MACHINE_VFP_H_
+#define _MACHINE_VFP_H_
#ifdef _KERNEL
#endif
-#endif
+#endif /* !_MACHINE_VFP_H_ */